diff --git a/assets/Access.83adb1a9.js b/assets/Access.83adb1a9.js
deleted file mode 100644
index a5a22e3..0000000
--- a/assets/Access.83adb1a9.js
+++ /dev/null
@@ -1 +0,0 @@
-var P=Object.defineProperty;var A=(i,o,n)=>o in i?P(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n;var a=(i,o,n)=>(A(i,typeof o!="symbol"?o+"":o,n),n);import{u as v}from"./index.e0544e65.js";import{S as D}from"./Spinner.5acc2245.js";import{f as F,u as I,x as d,o as s,c as l,l as E,t as h,h as e,F as p,P as f,k as N,p as w}from"./vendor.495b01ec.js";class R{constructor(){a(this,"id");a(this,"name");a(this,"name_en");a(this,"deletedAt");a(this,"createdAt");a(this,"updatedAt");a(this,"Permissions")}}const S={key:0},T={class:"d-flex my-3"},O={key:0,class:"table table-striped table-danger table-hover"},V={key:0,scope:"col"},L=e("th",{scope:"col"},"ID",-1),M=e("th",{scope:"col"},"ACTION",-1),$=e("th",{scope:"col"},"ITEM",-1),j=e("th",{scope:"col"},"DESCRIPTION",-1),q=["onClick"],z={key:0},G={class:"form-check"},H=["checked"],J=e("label",{class:"form-check-label",for:"flexCheckChecked"},null,-1),K={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},Z=F({setup(i){const o=I(),n=d(!0),r=d(!1),m=d(new R),_=d([]),u=d([]),b=async function(){try{const{data:t}=await v.role.getOne(Number(o.params.id));m.value=t.data,n.value=!1}catch(t){console.error("error",t)}},y=async function(){try{const{data:t}=await v.permission.getAll();_.value=t.data,n.value=!1}catch(t){console.error("error",t)}},C=()=>{r.value=!0,u.value=m.value.Permissions.map(t=>t.id)},g=t=>{if(r.value)if(!u.value.includes(t))u.value.push(t);else{const k=u.value.findIndex(c=>c===t);u.value.splice(k,1)}},x=()=>{r.value=!1};return b(),y(),(t,k)=>n.value?(s(),w(D,{key:1})):(s(),l("div",S,[E(h(u.value)+" ",1),e("div",T,[r.value?(s(),l(p,{key:1},[e("button",{onClick:k[0]||(k[0]=c=>r.value=!1),class:"btn btn-secondary me-3"},"\u53D6\u6D88\u7DE8\u8F2F"),e("button",{onClick:x,class:"btn btn-warning"},"\u78BA\u5B9A\u7DE8\u8F2F")],64)):(s(),l("button",{key:0,onClick:C,class:"btn btn-primary"},"\u958B\u59CB\u7DE8\u8F2F"))]),_.value.length?(s(),l("table",O,[e("thead",null,[e("tr",null,[r.value?(s(),l("th",V,"#")):f("",!0),L,M,$,j])]),e("tbody",null,[(s(!0),l(p,null,N(_.value,(c,B)=>(s(),l("tr",{key:B,onClick:Q=>g(c.id)},[r.value?(s(),l("td",z,[e("div",G,[e("input",{class:"form-check-input",type:"checkbox",value:"",id:"flexCheckChecked",checked:u.value.includes(c.id)},null,8,H),J])])):f("",!0),e("td",null,h(c.id),1),e("td",null,h(c.action),1),e("td",null,h(c.item),1),e("td",null,h(c.description),1)],8,q))),128))])])):(s(),l("img",K))]))}});export{Z as default};
diff --git a/assets/ClosedRecord.69250e9b.js b/assets/ClosedRecord.8c5bcebb.js
similarity index 59%
rename from assets/ClosedRecord.69250e9b.js
rename to assets/ClosedRecord.8c5bcebb.js
index 124c557..ad8d97f 100644
--- a/assets/ClosedRecord.69250e9b.js
+++ b/assets/ClosedRecord.8c5bcebb.js
@@ -1 +1 @@
-import{r as v}from"./record.faac3df9.js";import{g as D,d as n}from"./dateFormat.26b8f760.js";import{S as y}from"./Spinner.5acc2245.js";import{_ as g,d as k}from"./dateFilter.34232561.js";import{_ as B}from"./index.e0544e65.js";import{f as S,x as u,g as F,C as Y,o as s,c as r,j as A,m as d,h as t,F as b,k as x,t as a,p as w,A as C,B as E}from"./vendor.495b01ec.js";const I=c=>(C("data-v-252006ce"),c=c(),E(),c),L={key:0},M={key:0,class:"table table-striped table-info table-hover"},R=I(()=>t("thead",null,[t("tr",null,[t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u5546\u5BB6"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u65E5\u671F"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),t("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),N={id:"column-item"},j={id:"column-item"},O={id:"column-item"},P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},V=S({setup(c){const m=u(!0),o=u([]),i=u({searchMode:"\u6708\u4EFD",filter:{year:0,month:0,startDate:"",finishDate:""}}),h=async function(){try{const{data:l}=await v.getAll();o.value=l.data.filter(_=>_.isClosed===!0),i.value.filter={year:n(o.value[0].date).year(),month:n(o.value[0].date).month()+1,startDate:n(o.value[0].date).startOf("month").format("YYYY-MM-DD"),finishDate:n(o.value[0].date).endOf("month").format("YYYY-MM-DD")},m.value=!1}catch(l){console.error("error",l)}},p=F(()=>k(i.value,o.value));return h(),Y("dateFilterData",i),(l,_)=>m.value?(s(),w(y,{key:1})):(s(),r("div",L,[A(g),d(p).length?(s(),r("table",M,[R,t("tbody",null,[(s(!0),r(b,null,x(d(p),(e,f)=>(s(),r("tr",{key:f},[t("td",null,a(e.item),1),t("td",null,a(e.merchant),1),t("td",null,a(e.amount),1),t("td",null,a(new Date(e.date).toLocaleDateString()+" "+d(D)(e.date)),1),t("td",N,a(e.User.displayName),1),t("td",j,a(new Date(e.createdAt).toLocaleString()),1),t("td",O,a(new Date(e.updatedAt).toLocaleString()),1)]))),128))])])):(s(),r("img",P))]))}});var J=B(V,[["__scopeId","data-v-252006ce"]]);export{J as default};
+import{r as v}from"./record.38b4f7fd.js";import{g as D,d as c}from"./dateFormat.a9df66b7.js";import{S as y}from"./Spinner.ba92d55b.js";import{_ as g,d as k}from"./dateFilter.a11ea60c.js";import{_ as B}from"./index.05ca804e.js";import{e as S,x as u,f as F,C as Y,o as s,g as r,j as A,m as d,h as t,F as b,k as x,t as a,p as w,A as C,B as E}from"./vendor.961f4417.js";const I=l=>(C("data-v-252006ce"),l=l(),E(),l),L={key:0},M={key:0,class:"table table-striped table-info table-hover"},R=I(()=>t("thead",null,[t("tr",null,[t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u5546\u5BB6"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u65E5\u671F"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),t("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),t("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),N={id:"column-item"},j={id:"column-item"},O={id:"column-item"},P={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},V=S({setup(l){const m=u(!0),o=u([]),i=u({searchMode:"\u6708\u4EFD",filter:{year:0,month:0,startDate:"",finishDate:""}}),h=async function(){try{const{data:n}=await v.getAll();o.value=n.data.filter(_=>_.isClosed===!0),i.value.filter={year:c(o.value[0].date).year(),month:c(o.value[0].date).month()+1,startDate:c(o.value[0].date).startOf("month").format("YYYY-MM-DD"),finishDate:c(o.value[0].date).endOf("month").format("YYYY-MM-DD")},m.value=!1}catch(n){console.error("error",n)}},p=F(()=>k(i.value,o.value));return h(),Y("dateFilterData",i),(n,_)=>m.value?(s(),w(y,{key:1})):(s(),r("div",L,[A(g),d(p).length?(s(),r("table",M,[R,t("tbody",null,[(s(!0),r(b,null,x(d(p),(e,f)=>(s(),r("tr",{key:f},[t("td",null,a(e.item),1),t("td",null,a(e.merchant),1),t("td",null,a(e.amount),1),t("td",null,a(new Date(e.date).toLocaleDateString()+" "+d(D)(e.date)),1),t("td",N,a(e.User.displayName),1),t("td",j,a(new Date(e.createdAt).toLocaleString()),1),t("td",O,a(new Date(e.updatedAt).toLocaleString()),1)]))),128))])])):(s(),r("img",P))]))}});var J=B(V,[["__scopeId","data-v-252006ce"]]);export{J as default};
diff --git a/assets/CreateRecordModalButton.0fd49ef8.js b/assets/CreateRecordModalButton.0fd49ef8.js
new file mode 100644
index 0000000..9e18b98
--- /dev/null
+++ b/assets/CreateRecordModalButton.0fd49ef8.js
@@ -0,0 +1,35 @@
+import{b as f,c as v,d as b,T as s,C as B}from"./index.05ca804e.js";import{r as C}from"./record.38b4f7fd.js";import{e as w,K as h,i as F,o as y,g as E,h as D,S as x}from"./vendor.961f4417.js";var g={push(t){return f.post("/push",t)}};const A=async t=>{try{const u={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:t}};await g.push(u)}catch(u){console.error("error",u)}},R=w({props:{view:null},setup(t){const u=t,o=v(),i=h(),d=F("refetchRecords"),m=async()=>{try{const{value:e}=await b.fire({title:"\u65B0\u589E\u8CC7\u6599",html:`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,preConfirm:()=>{var n;const a=document.getElementById("swal-item").value,c=document.getElementById("swal-merchant").value,l=document.getElementById("swal-amount").value,r=new Date(document.getElementById("swal-date").value);if((!a||!c||!l||!r)&&x.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01\u82E5\u7D00\u9304\u8005\u70BA\u7A7A\uFF0C\u8ACB\u767B\u5165~"),o.currentUser)return{input:{item:a,merchant:c,amount:l,date:r,UserId:(n=o.currentUser)==null?void 0:n.id}};s.fire({icon:"error",title:"\u7121\u6CD5\u53D6\u5F97\u4F7F\u7528\u8005ID"})}});e!=null&&e.input&&p(e)}catch(e){console.error("error",e)}},p=async function(e){try{await C.create(e.input),s.fire({icon:"success",title:"\u6210\u529F\u5EFA\u7ACB\u8CC7\u6599\uFF01"}),u.view==="Record"?d():i.push({name:"Record"}),A(`${o.nickName}${o.icon}\u65B0\u589E\u4E86\u4E00\u7B46\u7D00\u9304 \u2192
+${e.input.merchant}-${e.input.item} ${e.input.amount}`),B("Speak",`\u6210\u529F\u7D00\u9304${e.input.amount}\u5143`)}catch(a){console.error("error",a),s.fire({icon:"error",title:"\u65B0\u589E\u8CC7\u6599\u5931\u6557\uFF01"})}};return(e,a)=>(y(),E("div",null,[D("button",{type:"button",class:"btn btn-success",onClick:m},"\u65B0\u589E\u8CC7\u6599")]))}});export{R as _,g as l,A as p};
diff --git a/assets/CreateRecordModalButton.e30c1d0f.js b/assets/CreateRecordModalButton.e30c1d0f.js
deleted file mode 100644
index ed89440..0000000
--- a/assets/CreateRecordModalButton.e30c1d0f.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import{f,K as v,i as b,o as B,c as w,h as C,S as h}from"./vendor.495b01ec.js";import{b as y,c as E,d as F,T as n,C as x}from"./index.e0544e65.js";import{r as g}from"./record.faac3df9.js";var A={push(t){return y.post("/push",t)}};const D=async t=>{try{const a={to:["Ub3557f7c812e4e78293959fe4fccd414","Ue5746fb7f35d2322a698d62dc9c9a21d"],messages:{type:"text",text:t}};await A.push(a)}catch(a){console.error("error",a)}},R=f({props:{view:null},setup(t){const a=t,s=E(),i=v(),d=b("refetchRecords"),m=async()=>{try{const{value:e}=await F.fire({title:"\u65B0\u589E\u8CC7\u6599",html:`
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,preConfirm:()=>{var r;const o=document.getElementById("swal-item").value,u=document.getElementById("swal-merchant").value,c=document.getElementById("swal-amount").value,l=new Date(document.getElementById("swal-date").value);return(!o||!u||!c||!l)&&h.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01\u82E5\u7D00\u9304\u8005\u70BA\u7A7A\uFF0C\u8ACB\u767B\u5165~"),{input:{item:o,merchant:u,amount:c,date:l,UserId:(r=s.currentUser)==null?void 0:r.id}}}});e&&p(e)}catch(e){console.error("error",e)}},p=async function(e){try{await g.create(e.input),n.fire({icon:"success",title:"\u6210\u529F\u5EFA\u7ACB\u8CC7\u6599\uFF01"}),a.view==="Record"?d():i.push({name:"Record"}),D(`${s.nickName}${s.icon}\u65B0\u589E\u4E86\u4E00\u7B46\u7D00\u9304 \u2192
-${e.input.merchant}-${e.input.item} ${e.input.amount}`),x("Speak",`\u6210\u529F\u7D00\u9304${e.input.amount}\u5143`)}catch(o){console.error("error",o),n.fire({icon:"error",title:"\u65B0\u589E\u8CC7\u6599\u5931\u6557\uFF01"})}};return(e,o)=>(B(),w("div",null,[C("button",{type:"button",class:"btn btn-success",onClick:m},"\u65B0\u589E\u8CC7\u6599")]))}});export{R as _,A as l,D as p};
diff --git a/assets/Expense.76d6b23d.css b/assets/Expense.76d6b23d.css
new file mode 100644
index 0000000..d0a91e5
--- /dev/null
+++ b/assets/Expense.76d6b23d.css
@@ -0,0 +1 @@
+span[data-v-28cddca8]:hover{cursor:pointer;color:#ff8c00}i[data-v-3a3dba24]:hover{color:#e21313;cursor:pointer}i[data-v-8a7b6312]:hover{color:#1ec539;cursor:pointer}.scroll[data-v-661d09f9]{overflow-y:auto}.nav-link[data-v-661d09f9]{cursor:pointer}i[data-v-05ea8b43]:hover{color:#1ec539;cursor:pointer}i[data-v-5dc5c3f6]:hover{color:#e21313;cursor:pointer}
diff --git a/assets/Expense.8b3219d8.js b/assets/Expense.8b3219d8.js
new file mode 100644
index 0000000..99b514b
--- /dev/null
+++ b/assets/Expense.8b3219d8.js
@@ -0,0 +1,163 @@
+import{e as F,i as y,o as m,g as v,S as I,x as C,p as P,w as O,h as t,j as w,n as M,k as L,F as S,t as E,P as T,m as g,l as z,f as D,U as Y,y as N,V as J,C as $,R as q,T as G}from"./vendor.961f4417.js";import{a as b,_ as U,d as R,T as h,R as K,c as j}from"./index.05ca804e.js";import{d as V,g as Q}from"./dateFormat.a9df66b7.js";import{S as W}from"./Spinner.ba92d55b.js";import{_ as X,d as Z}from"./dateFilter.a11ea60c.js";var k={expense:{getAll(){return b.get("/expense/all")},getOne(i){return b.get(`/expense/${i}`)},create(i){return b.post("/expense/create",i)},edit(i,o){return b.put(`/expense/edit/${i}`,o)},delete(i){return b.delete(`/expense/delete/${i}`)}},category:{getAll(){return b.get("/category/all")},getOne(i){return b.get(`/category/${i}`)},create(i){return b.post("/category/create",i)},edit(i,o){return b.put(`/category/edit/${i}`,o)},delete(i){return b.delete(`/category/delete/${i}`)}}};const ee=F({setup(i){const o=y("refetchCategories"),u=async()=>{try{const{value:a}=await R.fire({title:"\u65B0\u589E\u985E\u5225",html:`
+
+ `,preConfirm:()=>{const f=document.getElementById("swal-categoryId").value,x=document.getElementById("swal-item").value,B=document.getElementById("swal-amount").value,r=new Date(document.getElementById("swal-date").value),p=document.getElementById("swal-note").value;if((!x||!B||!r)&&I.showValidationMessage("\u9664\u4E86[\u5099\u8A3B]\uFF0C\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01"),u.currentUser)return{input:{UserId:u.currentUser.id,CategoryId:Number(f),item:x,amount:B,note:p,date:r}};h.fire({icon:"error",title:"\u7121\u6CD5\u53D6\u5F97\u4F7F\u7528\u8005ID"})}});console.log("formValues",c),c!=null&&c.input&&n(c)}catch(l){console.error("error",l)}},n=async function(l){try{const{data:c}=await k.expense.edit(o.expense.id,l.input);if(c.status!=="success")throw new Error(`[SERVER ERROR] ${c.message}`);d(),h.fire({icon:"success",title:`\u6210\u529F\u7DE8\u8F2F\u8A18\u5E33[${c.data.item}]`})}catch(c){console.error("error",c),h.fire({icon:"error",title:"\u7DE8\u8F2F\u8A18\u5E33\u5931\u6557\uFF01"})}};return(l,c)=>(m(),v("i",{class:"fas fa-edit",onClick:e}))}});var we=U(Ee,[["__scopeId","data-v-05ea8b43"]]);const Fe=F({props:{expense:null},setup(i){const o=i,u=y("refetchExpenses"),d=async()=>{try{const{isConfirmed:s}=await R.fire({title:`\u78BA\u5B9A\u522A\u9664\u8A18\u5E33[${o.expense.item}]\u561B\uFF1F`,showCancelButton:!0});s&&a(o.expense.id)}catch(s){console.error("error",s)}},a=async function(s){try{const{data:e}=await k.expense.delete(s);if(e.status!=="success")throw new Error(`[SERVER ERROR] ${e.message}`);u(),h.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u8A18\u5E33[${e.data.item}]`})}catch(e){console.error("error",e),h.fire({icon:"error",title:"\u522A\u9664\u8A18\u5E33\u5931\u6557\uFF01"})}};return(s,e)=>(m(),v("i",{class:"fas fa-trash",onClick:d}))}});var xe=U(Fe,[["__scopeId","data-v-5dc5c3f6"]]);const Ce={class:"bg-secondary me-3 p-3"},ke={class:"form-check form-switch mb-4"},Be=t("label",{class:"form-check-label",for:"flexSwitchCheckChecked"},"\u5168\u9078",-1),$e=["value","id","checked","onClick"],Ae=["for"],De=F({props:{allCategories:null},setup(i){const o=i,u=C(!0),d=y("categoriesByType"),a=y("categoryFilters"),s=e=>{a.value.includes(e)?a.value.forEach((n,l)=>{if(e===n){a.value.splice(l,1);return}}):a.value.push(e)};return Y(u,()=>{u.value?a.value=o.allCategories:a.value=[]}),(e,n)=>(m(),v("div",Ce,[t("div",ke,[Be,N(t("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked","onUpdate:modelValue":n[0]||(n[0]=l=>u.value=l)},null,512),[[J,u.value]])]),(m(!0),v(S,null,L(g(d),(l,c)=>(m(),v("div",{class:"form-check mb-2",key:c},[t("input",{class:"form-check-input",type:"checkbox",value:l.id,id:l.name,checked:g(a).includes(l.id),onClick:f=>s(l.id)},null,8,$e),t("label",{class:"form-check-label",for:l.name},E(l.name),9,Ae)]))),128))]))}}),Ie={key:0},Ue={class:"d-flex mb-3",style:{width:"100vw"}},Re={class:"d-flex mb-4",style:{width:"100%"}},Me={class:"mt-4",style:{width:"100px"}},Ve=t("label",{for:"type",style:{float:"left","font-size":"0.7em"}},"TYPE",-1),Se=t("option",{selected:""},"ALL",-1),Pe=t("option",null,"\u652F\u51FA",-1),Oe=t("option",null,"\u6536\u5165",-1),Le=[Se,Pe,Oe],Te={class:"d-flex align-items-center mb-4",style:{width:"100%"}},Ye={class:"badge bg-warning text-dark fs-3"},Ne=t("i",{class:"fas fa-minus mx-2"},null,-1),je={class:"badge bg-success fs-3"},He=t("i",{class:"fas fa-equals mx-2"},null,-1),ze={class:"badge bg-info fs-3"},Je={class:"d-flex align-items-start"},qe={key:0,class:"table table-striped table-success table-hover"},Ge=t("thead",null,[t("tr",{class:"table-light"},[t("th",{scope:"col"},"#"),t("th",{scope:"col"},"#"),t("th",{scope:"col"},"\u985E\u5225"),t("th",{scope:"col"},"\u9805\u76EE"),t("th",{scope:"col"},"\u91D1\u984D"),t("th",{scope:"col"},"\u5099\u8A3B"),t("th",{scope:"col"},"\u65E5\u671F")])],-1),Ke={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},tt=F({setup(i){const o=C(),u=C(),d=C(!1),a=C([]),s=C({searchMode:"\u6708\u4EFD",filter:{year:V().year(),month:V().month()+1,startDate:V().startOf("month").format("YYYY-MM-DD hh:mm:ss"),finishDate:V().endOf("month").format("YYYY-MM-DD hh:mm:ss")}}),e=C("ALL"),n=D(()=>e.value!=="ALL"?u.value.filter(r=>r.type===e.value).map(r=>r.id):u.value.map(r=>r.id)),l=D(()=>e.value==="ALL"?u.value:u.value.filter(r=>r.type===e.value)),c=D(()=>{let r=[];return r=o.value.filter(p=>a.value.includes(p.Category.id)),Z(s.value,r)}),f=D(()=>{let r=0,p=0;return c.value.forEach(A=>{A.Category.type==="\u652F\u51FA"?p+=A.amount:r+=A.amount}),{income:r,expense:p}}),x=async function(){try{const{data:r}=await k.expense.getAll();o.value=r.data}catch(r){console.error("error",r)}},B=async()=>{try{const{data:r}=await k.category.getAll();u.value=r.data,a.value=u.value.map(p=>p.id)}catch(r){console.error("error",r)}};return x(),B(),Y(e,r=>{r!=="ALL"?a.value=u.value.filter(p=>p.type===e.value).map(p=>p.id):a.value=u.value.map(p=>p.id)}),$("refetchExpenses",x),$("refetchCategories",B),$("categories",u),$("categoryFilters",a),$("dateFilterData",s),$("categoryRPOpen",d),$("categoriesByType",l),(r,p)=>{var A;return o.value&&u.value?(m(),v("div",Ie,[t("div",Ue,[w(be),t("button",{type:"button",class:"btn btn-warning text-dark",onClick:p[0]||(p[0]=_=>d.value=!0)},"\u67E5\u770B\u985E\u5225")]),t("div",Re,[t("div",Me,[Ve,N(t("select",{class:"form-select",id:"type","aria-label":"Default select example","onUpdate:modelValue":p[1]||(p[1]=_=>e.value=_)},Le,512),[[q,e.value]])]),t("div",null,[w(X,{style:{width:"250px"}})])]),t("div",Te,[t("span",Ye,"\u6536\u5165 $ "+E(g(f).income),1),Ne,t("span",je,"\u652F\u51FA $ "+E(g(f).expense),1),He,t("span",ze,"$ "+E(g(f).income-g(f).expense),1)]),t("div",Je,[w(De,{allCategories:g(n)},null,8,["allCategories"]),(A=g(c))!=null&&A.length?(m(),v("table",qe,[Ge,t("tbody",null,[(m(!0),v(S,null,L(g(c),(_,H)=>(m(),v("tr",{key:H,class:M(_.Category.type==="\u652F\u51FA"?"table-success":"table-warning")},[t("td",null,[w(we,{expense:_},null,8,["expense"])]),t("td",null,[w(xe,{expense:_},null,8,["expense"])]),t("td",null,[t("i",{class:M(_.Category.icon)},null,2)]),t("td",null,E(_.item),1),t("td",null,E(_.amount),1),t("td",null,E(_.note),1),t("td",null,E(new Date(_.date).toLocaleDateString()+" "+g(Q)(_.date)),1)],2))),128))])])):(m(),v("img",Ke))]),w(G,{name:"slide-right"},{default:O(()=>[d.value?(m(),P(ge,{key:0})):T("",!0)]),_:1})])):(m(),P(W,{key:1}))}}});export{tt as default};
diff --git a/assets/Expense.e2bf2766.js b/assets/Expense.e2bf2766.js
deleted file mode 100644
index eca8429..0000000
--- a/assets/Expense.e2bf2766.js
+++ /dev/null
@@ -1,163 +0,0 @@
-import{f as F,i as _,o as m,c as v,S as I,x as k,p as P,w as O,h as t,j as x,n as M,k as L,F as S,t as w,P as T,m as g,l as z,g as D,U as Y,y as N,V as J,C as A,R as q,T as G}from"./vendor.495b01ec.js";import{a as b,_ as R,d as U,T as y,R as K,c as j}from"./index.e0544e65.js";import{d as V,g as Q}from"./dateFormat.26b8f760.js";import{S as W}from"./Spinner.5acc2245.js";import{_ as X,d as Z}from"./dateFilter.34232561.js";var B={expense:{getAll(){return b.get("/expense/all")},getOne(c){return b.get(`/expense/${c}`)},create(c){return b.post("/expense/create",c)},edit(c,u){return b.put(`/expense/edit/${c}`,u)},delete(c){return b.delete(`/expense/delete/${c}`)}},category:{getAll(){return b.get("/category/all")},getOne(c){return b.get(`/category/${c}`)},create(c){return b.post("/category/create",c)},edit(c,u){return b.put(`/category/edit/${c}`,u)},delete(c){return b.delete(`/category/delete/${c}`)}}};const ee=F({setup(c){const u=_("refetchCategories"),n=async()=>{try{const{value:a}=await U.fire({title:"\u65B0\u589E\u985E\u5225",html:`
-
`,Ho=(e,t)=>{const o=lt();if(!t.imageUrl)return k(o);y(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt),G(o,"width",t.imageWidth),G(o,"height",t.imageHeight),o.className=s.image,$(o,t,"image")},jo=e=>{const t=document.createElement("li");return d(t,s["progress-step"]),v(t,e),t},Vo=e=>{const t=document.createElement("li");return d(t,s["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t},qo=(e,t)=>{const o=ct();if(!t.progressSteps||t.progressSteps.length===0)return k(o);y(o),o.textContent="",t.currentProgressStep>=t.progressSteps.length&&A("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach((n,i)=>{const r=jo(n);if(o.appendChild(r),i===t.currentProgressStep&&d(r,s["active-progress-step"]),i!==t.progressSteps.length-1){const p=Vo(t);o.appendChild(p)}})},Wo=(e,t)=>{const o=rt();be(o,t.title||t.titleText,"block"),t.title&&Ie(t.title,o),t.titleText&&(o.innerText=t.titleText),$(o,t,"title")},No=(e,t)=>{const o=C(),n=f();t.toast?(G(o,"width",t.width),n.style.width="100%",n.insertBefore(K(),ne())):G(n,"width",t.width),G(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),k(pe()),Ro(n,t)},Ro=(e,t)=>{e.className=`${s.popup} ${E(e)?t.showClass.popup:""}`,t.toast?(d([document.documentElement,document.body],s["toast-shown"]),d(e,s.toast)):d(e,s.modal),$(e,t,"popup"),typeof t.customClass=="string"&&d(e,t.customClass),t.icon&&d(e,s[`icon-${t.icon}`])},gt=(e,t)=>{No(e,t),Po(e,t),qo(e,t),Io(e,t),Ho(e,t),Wo(e,t),Do(e,t),xo(e,t),bo(e,t),To(e,t),typeof t.didRender=="function"&&t.didRender(f())},Y=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Uo=()=>{S(document.body.children).forEach(t=>{t===C()||t.contains(C())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})},mt=()=>{S(document.body.children).forEach(t=>{t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})},bt=["swal-title","swal-html","swal-footer"],zo=e=>{const t=typeof e.template=="string"?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return Qo(o),Object.assign(Ko(o),Yo(o),Zo(o),Jo(o),Xo(o),Go(o,bt))},Ko=e=>{const t={};return S(e.querySelectorAll("swal-param")).forEach(o=>{q(o,["name","value"]);const n=o.getAttribute("name"),i=o.getAttribute("value");typeof R[n]=="boolean"&&i==="false"&&(t[n]=!1),typeof R[n]=="object"&&(t[n]=JSON.parse(i))}),t},Yo=e=>{const t={};return S(e.querySelectorAll("swal-button")).forEach(o=>{q(o,["type","color","aria-label"]);const n=o.getAttribute("type");t[`${n}ButtonText`]=o.innerHTML,t[`show${_e(n)}Button`]=!0,o.hasAttribute("color")&&(t[`${n}ButtonColor`]=o.getAttribute("color")),o.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=o.getAttribute("aria-label"))}),t},Zo=e=>{const t={},o=e.querySelector("swal-image");return o&&(q(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt"))),t},Jo=e=>{const t={},o=e.querySelector("swal-icon");return o&&(q(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},Xo=e=>{const t={},o=e.querySelector("swal-input");o&&(q(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=e.querySelectorAll("swal-input-option");return n.length&&(t.inputOptions={},S(n).forEach(i=>{q(i,["value"]);const r=i.getAttribute("value"),p=i.innerHTML;t.inputOptions[r]=p})),t},Go=(e,t)=>{const o={};for(const n in t){const i=t[n],r=e.querySelector(i);r&&(q(r,[]),o[i.replace(/^swal-/,"")]=r.innerHTML.trim())}return o},Qo=e=>{const t=bt.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);S(e.children).forEach(o=>{const n=o.tagName.toLowerCase();t.indexOf(n)===-1&&A(`Unrecognized element <${n}>`)})},q=(e,t)=>{S(e.attributes).forEach(o=>{t.indexOf(o.name)===-1&&A([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,`${t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."}`])})};var Ke={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function en(e){e.inputValidator||Object.keys(Ke).forEach(t=>{e.input===t&&(e.inputValidator=Ke[t])})}function tn(e){(!e.target||typeof e.target=="string"&&!document.querySelector(e.target)||typeof e.target!="string"&&!e.target.appendChild)&&(A('Target parameter is not valid, defaulting to "body"'),e.target="body")}function on(e){en(e),e.showLoaderOnConfirm&&!e.preConfirm&&A(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
+showLoaderOnConfirm should be used together with preConfirm, see usage example:
+https://sweetalert2.github.io/#ajax-request`),tn(e),typeof e.title=="string"&&(e.title=e.title.split(`
+`).join(" ")),ho(e)}class nn{constructor(t,o){this.callback=t,this.remaining=o,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(t){const o=this.running;return o&&this.stop(),this.remaining+=t,o&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const sn=()=>{U.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(U.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${U.previousBodyPadding+mo()}px`)},rn=()=>{U.previousBodyPadding!==null&&(document.body.style.paddingRight=`${U.previousBodyPadding}px`,U.previousBodyPadding=null)},ln=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!L(document.body,s.iosfix)){const t=document.body.scrollTop;document.body.style.top=`${t*-1}px`,d(document.body,s.iosfix),an(),cn()}},cn=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),o=!!e.match(/WebKit/i);t&&o&&!e.match(/CriOS/i)&&f().scrollHeight>window.innerHeight-44&&(C().style.paddingBottom=`${44}px`)},an=()=>{const e=C();let t;e.ontouchstart=o=>{t=un(o)},e.ontouchmove=o=>{t&&(o.preventDefault(),o.stopPropagation())}},un=e=>{const t=e.target,o=C();return dn(e)||fn(e)?!1:t===o||!Ne(o)&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"&&!(Ne(ue())&&ue().contains(t))},dn=e=>e.touches&&e.touches.length&&e.touches[0].touchType==="stylus",fn=e=>e.touches&&e.touches.length>1,hn=()=>{if(L(document.body,s.iosfix)){const e=parseInt(document.body.style.top,10);I(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=e*-1}},yt=10,pn=e=>{const t=C(),o=f();typeof e.willOpen=="function"&&e.willOpen(o);const i=window.getComputedStyle(document.body).overflowY;bn(t,o,e),setTimeout(()=>{gn(t,o)},yt),xe()&&(mn(t,e.scrollbarPadding,i),Uo()),!me()&&!a.previousActiveElement&&(a.previousActiveElement=document.activeElement),typeof e.didOpen=="function"&&setTimeout(()=>e.didOpen(o)),I(t,s["no-transition"])},wt=e=>{const t=f();if(e.target!==t)return;const o=C();t.removeEventListener(Q,wt),o.style.overflowY="auto"},gn=(e,t)=>{Q&&ft(t)?(e.style.overflowY="hidden",t.addEventListener(Q,wt)):e.style.overflowY="auto"},mn=(e,t,o)=>{ln(),t&&o!=="hidden"&&sn(),setTimeout(()=>{e.scrollTop=0})},bn=(e,t,o)=>{d(e,o.showClass.backdrop),t.style.setProperty("opacity","0","important"),y(t,"grid"),setTimeout(()=>{d(t,o.showClass.popup),t.style.removeProperty("opacity")},yt),d([document.documentElement,document.body],s.shown),o.heightAuto&&o.backdrop&&!o.toast&&d([document.documentElement,document.body],s["height-auto"])},z=e=>{let t=f();t||new fe,t=f();const o=K();me()?k(ne()):yn(t,e),y(o),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},yn=(e,t)=>{const o=se(),n=K();!t&&E(T())&&(t=T()),y(o),t&&(k(t),n.setAttribute("data-button-to-replace",t.className)),n.parentNode.insertBefore(n,t),d([e,o],s.loading)},wn=(e,t)=>{t.input==="select"||t.input==="radio"?Bn(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(Ae(t.inputValue)||Ee(t.inputValue))&&(z(T()),_n(e,t))},vn=(e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return Cn(o);case"radio":return kn(o);case"file":return Pn(o);default:return t.inputAutoTrim?o.value.trim():o.value}},Cn=e=>e.checked?1:0,kn=e=>e.checked?e.value:null,Pn=e=>e.files.length?e.getAttribute("multiple")!==null?e.files:e.files[0]:null,Bn=(e,t)=>{const o=f(),n=i=>An[t.input](o,Ce(i),t);Ae(t.inputOptions)||Ee(t.inputOptions)?(z(T()),te(t.inputOptions).then(i=>{e.hideLoading(),n(i)})):typeof t.inputOptions=="object"?n(t.inputOptions):W(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`)},_n=(e,t)=>{const o=e.getInput();k(o),te(t.inputValue).then(n=>{o.value=t.input==="number"?parseFloat(n)||0:`${n}`,y(o),o.focus(),e.hideLoading()}).catch(n=>{W(`Error in inputValue promise: ${n}`),o.value="",y(o),o.focus(),e.hideLoading()})},An={select:(e,t,o)=>{const n=M(e,s.select),i=(r,p,B)=>{const b=document.createElement("option");b.value=B,v(b,p),b.selected=Ye(B,o.inputValue),r.appendChild(b)};t.forEach(r=>{const p=r[0],B=r[1];if(Array.isArray(B)){const b=document.createElement("optgroup");b.label=p,b.disabled=!1,n.appendChild(b),B.forEach(w=>i(b,w[1],w[0]))}else i(n,B,p)}),n.focus()},radio:(e,t,o)=>{const n=M(e,s.radio);t.forEach(r=>{const p=r[0],B=r[1],b=document.createElement("input"),w=document.createElement("label");b.type="radio",b.name=s.radio,b.value=p,Ye(p,o.inputValue)&&(b.checked=!0);const D=document.createElement("span");v(D,B),D.className=s.label,w.appendChild(b),w.appendChild(D),n.appendChild(w)});const i=n.querySelectorAll("input");i.length&&i[0].focus()}},Ce=e=>{const t=[];return typeof Map!="undefined"&&e instanceof Map?e.forEach((o,n)=>{let i=o;typeof i=="object"&&(i=Ce(i)),t.push([n,i])}):Object.keys(e).forEach(o=>{let n=e[o];typeof n=="object"&&(n=Ce(n)),t.push([o,n])}),t},Ye=(e,t)=>t&&t.toString()===e.toString();function Ze(){const e=u.innerParams.get(this);if(!e)return;const t=u.domCache.get(this);k(t.loader),me()?e.icon&&y(ne()):En(t),I([t.popup,t.actions],s.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const En=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?y(t[0],"inline-block"):to()&&k(e.actions)};function Sn(e){const t=u.innerParams.get(e||this),o=u.domCache.get(e||this);return o?Te(o.popup,t.input):null}var ee={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const $n=()=>E(f()),vt=()=>T()&&T().click(),xn=()=>F()&&F().click(),Tn=()=>V()&&V().click(),Ct=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Dn=(e,t,o,n)=>{Ct(t),o.toast||(t.keydownHandler=i=>Ln(e,i,n),t.keydownTarget=o.keydownListenerCapture?window:f(),t.keydownListenerCapture=o.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},ke=(e,t,o)=>{const n=$e();if(n.length)return t=t+o,t===n.length?t=0:t===-1&&(t=n.length-1),n[t].focus();f().focus()},kt=["ArrowRight","ArrowDown"],In=["ArrowLeft","ArrowUp"],Ln=(e,t,o)=>{const n=u.innerParams.get(e);!n||t.isComposing||t.keyCode===229||(n.stopKeydownPropagation&&t.stopPropagation(),t.key==="Enter"?On(e,t,n):t.key==="Tab"?Mn(t,n):[...kt,...In].includes(t.key)?Fn(t.key):t.key==="Escape"&&Hn(t,n,o))},On=(e,t,o)=>{if(!!he(o.allowEnterKey)&&t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;vt(),t.preventDefault()}},Mn=(e,t)=>{const o=e.target,n=$e();let i=-1;for(let r=0;r{const t=T(),o=F(),n=V();if(![t,o,n].includes(document.activeElement))return;const i=kt.includes(e)?"nextElementSibling":"previousElementSibling";let r=document.activeElement;for(let p=0;p{he(t.allowEscapeKey)&&(e.preventDefault(),o(Y.esc))};function Pt(e,t,o,n){me()?Je(e,n):(io(o).then(()=>Je(e,n)),Ct(a)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),xe()&&(rn(),hn(),mt()),jn()}function jn(){I([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function ae(e){e=Nn(e);const t=ee.swalPromiseResolve.get(this),o=qn(this);this.isAwaitingPromise()?e.isDismissed||(re(this),t(e)):o&&t(e)}function Vn(){return!!u.awaitingPromise.get(this)}const qn=e=>{const t=f();if(!t)return!1;const o=u.innerParams.get(e);if(!o||L(t,o.hideClass.popup))return!1;I(t,o.showClass.popup),d(t,o.hideClass.popup);const n=C();return I(n,o.showClass.backdrop),d(n,o.hideClass.backdrop),Rn(e,t,o),!0};function Wn(e){const t=ee.swalPromiseReject.get(this);re(this),t&&t(e)}const re=e=>{e.isAwaitingPromise()&&(u.awaitingPromise.delete(e),u.innerParams.get(e)||e._destroy())},Nn=e=>typeof e=="undefined"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Rn=(e,t,o)=>{const n=C(),i=Q&&ft(t);typeof o.willClose=="function"&&o.willClose(t),i?Un(e,t,n,o.returnFocus,o.didClose):Pt(e,n,o.returnFocus,o.didClose)},Un=(e,t,o,n,i)=>{a.swalCloseEventFinishedCallback=Pt.bind(null,e,o,n,i),t.addEventListener(Q,function(r){r.target===t&&(a.swalCloseEventFinishedCallback(),delete a.swalCloseEventFinishedCallback)})},Je=(e,t)=>{setTimeout(()=>{typeof t=="function"&&t.bind(e.params)(),e._destroy()})};function Bt(e,t,o){const n=u.domCache.get(e);t.forEach(i=>{n[i].disabled=o})}function _t(e,t){if(!e)return!1;if(e.type==="radio"){const n=e.parentNode.parentNode.querySelectorAll("input");for(let i=0;i{const t={};return Object.keys(e).forEach(o=>{st(o)?t[o]=e[o]:A(`Invalid parameter to update: "${o}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
+
+If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),t};function ts(){const e=u.domCache.get(this),t=u.innerParams.get(this);if(!t){At(this);return}e.popup&&a.swalCloseEventFinishedCallback&&(a.swalCloseEventFinishedCallback(),delete a.swalCloseEventFinishedCallback),a.deferDisposalTimer&&(clearTimeout(a.deferDisposalTimer),delete a.deferDisposalTimer),typeof t.didDestroy=="function"&&t.didDestroy(),os(this)}const os=e=>{At(e),delete e.params,delete a.keydownHandler,delete a.keydownTarget,delete a.currentInstance},At=e=>{e.isAwaitingPromise()?(we(u,e),u.awaitingPromise.set(e,!0)):(we(ee,e),we(u,e))},we=(e,t)=>{for(const o in e)e[o].delete(t)};var Et=Object.freeze(Object.defineProperty({__proto__:null,hideLoading:Ze,disableLoading:Ze,getInput:Sn,close:ae,isAwaitingPromise:Vn,rejectPromise:Wn,handleAwaitingPromise:re,closePopup:ae,closeModal:ae,closeToast:ae,enableButtons:zn,disableButtons:Kn,enableInput:Yn,disableInput:Zn,showValidationMessage:Jn,resetValidationMessage:Xn,getProgressSteps:Gn,update:Qn,_destroy:ts},Symbol.toStringTag,{value:"Module"}));const ns=e=>{const t=u.innerParams.get(e);e.disableButtons(),t.input?St(e,"confirm"):Me(e,!0)},ss=e=>{const t=u.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?St(e,"deny"):Oe(e,!1)},is=(e,t)=>{e.disableButtons(),t(Y.cancel)},St=(e,t)=>{const o=u.innerParams.get(e);if(!o.input)return W(`The "input" parameter is needed to be set when using returnInputValueOn${_e(t)}`);const n=vn(e,o);o.inputValidator?rs(e,n,t):e.getInput().checkValidity()?t==="deny"?Oe(e,n):Me(e,n):(e.enableButtons(),e.showValidationMessage(o.validationMessage))},rs=(e,t,o)=>{const n=u.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>te(n.inputValidator(t,n.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):o==="deny"?Oe(e,t):Me(e,t)})},Oe=(e,t)=>{const o=u.innerParams.get(e||globalThis);o.showLoaderOnDeny&&z(F()),o.preDeny?(u.awaitingPromise.set(e||globalThis,!0),Promise.resolve().then(()=>te(o.preDeny(t,o.validationMessage))).then(i=>{i===!1?(e.hideLoading(),re(e)):e.closePopup({isDenied:!0,value:typeof i=="undefined"?t:i})}).catch(i=>$t(e||globalThis,i))):e.closePopup({isDenied:!0,value:t})},Xe=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},$t=(e,t)=>{e.rejectPromise(t)},Me=(e,t)=>{const o=u.innerParams.get(e||globalThis);o.showLoaderOnConfirm&&z(),o.preConfirm?(e.resetValidationMessage(),u.awaitingPromise.set(e||globalThis,!0),Promise.resolve().then(()=>te(o.preConfirm(t,o.validationMessage))).then(i=>{E(pe())||i===!1?(e.hideLoading(),re(e)):Xe(e,typeof i=="undefined"?t:i)}).catch(i=>$t(e||globalThis,i))):Xe(e,t)},ls=(e,t,o)=>{u.innerParams.get(e).toast?cs(e,t,o):(us(t),ds(t),fs(e,t,o))},cs=(e,t,o)=>{t.popup.onclick=()=>{const n=u.innerParams.get(e);n&&(as(n)||n.timer||n.input)||o(Y.close)}},as=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let de=!1;const us=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(de=!0)}}},ds=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(de=!0)}}},fs=(e,t,o)=>{t.container.onclick=n=>{const i=u.innerParams.get(e);if(de){de=!1;return}n.target===t.container&&he(i.allowOutsideClick)&&o(Y.backdrop)}},hs=e=>typeof e=="object"&&e.jquery,Ge=e=>e instanceof Element||hs(e),ps=e=>{const t={};return typeof e[0]=="object"&&!Ge(e[0])?Object.assign(t,e[0]):["title","html","icon"].forEach((o,n)=>{const i=e[n];typeof i=="string"||Ge(i)?t[o]=i:i!==void 0&&W(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof i}`)}),t};function gs(...e){const t=this;return new t(...e)}function ms(e){class t extends this{_main(n,i){return super._main(n,Object.assign({},e,i))}}return t}const bs=()=>a.timeout&&a.timeout.getTimerLeft(),xt=()=>{if(a.timeout)return oo(),a.timeout.stop()},Tt=()=>{if(a.timeout){const e=a.timeout.start();return De(e),e}},ys=()=>{const e=a.timeout;return e&&(e.running?xt():Tt())},ws=e=>{if(a.timeout){const t=a.timeout.increase(e);return De(t,!0),t}},vs=()=>a.timeout&&a.timeout.isRunning();let Qe=!1;const Pe={};function Cs(e="data-swal-template"){Pe[e]=this,Qe||(document.body.addEventListener("click",ks),Qe=!0)}const ks=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const o in Pe){const n=t.getAttribute(o);if(n){Pe[o].fire({template:n});return}}};var Ps=Object.freeze(Object.defineProperty({__proto__:null,isValidParameter:nt,isUpdatableParameter:st,isDeprecatedParameter:ve,argsToParams:ps,getContainer:C,getPopup:f,getTitle:rt,getHtmlContainer:ue,getImage:lt,getIcon:ne,getInputLabel:Xt,getCloseButton:Se,getActions:se,getConfirmButton:T,getDenyButton:F,getCancelButton:V,getLoader:K,getFooter:at,getTimerProgressBar:ge,getFocusableElements:$e,getValidationMessage:pe,isLoading:Qt,isVisible:$n,clickConfirm:vt,clickDeny:xn,clickCancel:Tn,fire:gs,mixin:ms,showLoading:z,enableLoading:z,getTimerLeft:bs,stopTimer:xt,resumeTimer:Tt,toggleTimer:ys,increaseTimer:ws,isTimerRunning:vs,bindClickHandler:Cs},Symbol.toStringTag,{value:"Module"}));let Be;class Z{constructor(...t){if(typeof window=="undefined")return;Be=this;const o=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const n=this._main(this.params);u.promise.set(this,n)}_main(t,o={}){Zt(Object.assign({},o,t)),a.currentInstance&&(a.currentInstance._destroy(),xe()&&mt()),a.currentInstance=this;const n=_s(t,o);on(n),Object.freeze(n),a.timeout&&(a.timeout.stop(),delete a.timeout),clearTimeout(a.restoreFocusTimeout);const i=As(this);return gt(this,n),u.innerParams.set(this,n),Bs(this,i,n)}then(t){return u.promise.get(this).then(t)}finally(t){return u.promise.get(this).finally(t)}}const Bs=(e,t,o)=>new Promise((n,i)=>{const r=p=>{e.closePopup({isDismissed:!0,dismiss:p})};ee.swalPromiseResolve.set(e,n),ee.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>ns(e),t.denyButton.onclick=()=>ss(e),t.cancelButton.onclick=()=>is(e,r),t.closeButton.onclick=()=>r(Y.close),ls(e,t,r),Dn(e,a,o,r),wn(e,o),pn(o),Es(a,o,r),Ss(t,o),setTimeout(()=>{t.container.scrollTop=0})}),_s=(e,t)=>{const o=zo(e),n=Object.assign({},R,t,o,e);return n.showClass=Object.assign({},R.showClass,n.showClass),n.hideClass=Object.assign({},R.hideClass,n.hideClass),n},As=e=>{const t={popup:f(),container:C(),actions:se(),confirmButton:T(),denyButton:F(),cancelButton:V(),loader:K(),closeButton:Se(),validationMessage:pe(),progressSteps:ct()};return u.domCache.set(e,t),t},Es=(e,t,o)=>{const n=ge();k(n),t.timer&&(e.timeout=new nn(()=>{o("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(y(n),$(n,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&De(t.timer)})))},Ss=(e,t)=>{if(!t.toast){if(!he(t.allowEnterKey))return xs();$s(e,t)||ke(t,-1,1)}},$s=(e,t)=>t.focusDeny&&E(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&E(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&E(e.confirmButton)?(e.confirmButton.focus(),!0):!1,xs=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(Z.prototype,Et);Object.assign(Z,Ps);Object.keys(Et).forEach(e=>{Z[e]=function(...t){if(Be)return Be[e](...t)}});Z.DismissReason=Y;Z.version="11.4.8";const fe=Z;fe.default=fe;const Fe=e=>(Ht("data-v-e4c5480a"),e=e(),jt(),e),Ts={key:0},Ds={id:"pc",style:{width:"100vw"}},Is={class:"btn-group mb-3",role:"group","aria-label":"Basic radio toggle button group"},Ls=["id","checked"],Os=["for","onClick"],Ms={class:"col-3 mt-4"},Fs={class:"fw-bold"},Hs={class:"fw-bold"},js={class:"col-9"},Vs={class:"bg-white border p-3"},qs={class:"d-flex"},Ws={key:0,src:et,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},Ns={key:1,src:tt,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},Rs={class:"text-start mt-2"},Us={class:"px-1 me-1",style:{"background-color":"yellow"}},zs={style:{color:"salmon"}},Ks=Fe(()=>c("i",{class:"fas fa-chevron-right m-2"},null,-1)),Ys={style:{color:"blue"}},Zs=P(" | "),Js={style:{color:"brown"}},Xs=P(" | "),Gs={style:{color:"orange"}},Qs=P(" | "),ei={style:{color:"green"}},ti=Fe(()=>c("br",null,null,-1)),oi=P(" \u539F\u7D00\u9304\uFF1A"),ni={style:{color:"blue"}},si=P(" | "),ii={style:{color:"brown"}},ri=P(" | "),li={style:{color:"orange"}},ci=P(" | "),ai={style:{color:"green"}},ui=P(" \u7D50\u7B97\u91D1\u984D "),di={style:{color:"orange"}},fi=["onClick"],hi={id:"mobile",class:"card text-center",style:{width:"100vw"}},pi={class:"card-header"},gi={class:"nav nav-tabs card-header-tabs"},mi=["onClick"],bi={class:"card-body"},yi={class:"card-header"},wi={class:"card-body d-flex"},vi={key:0,src:et,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},Ci={key:1,src:tt,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},ki={class:"text-start mt-2"},Pi={class:"px-1 me-1",style:{"background-color":"yellow"}},Bi={style:{color:"salmon"}},_i=Fe(()=>c("i",{class:"fas fa-chevron-right m-2"},null,-1)),Ai={key:0},Ei={style:{color:"blue"}},Si=P(" | "),$i={style:{color:"brown"}},xi=P(" | "),Ti={style:{color:"orange"}},Di=P(" | "),Ii={style:{color:"green"}},Li={key:1},Oi=P(" \u539F\u7D00\u9304\uFF1A"),Mi={style:{color:"blue"}},Fi=P(" | "),Hi={style:{color:"brown"}},ji=P(" | "),Vi={style:{color:"orange"}},qi=P(" | "),Wi={style:{color:"green"}},Ni={key:2},Ri=P(" \u7D50\u7B97\u91D1\u984D "),Ui={style:{color:"orange"}},zi=["onClick"],Ki={class:"mt-3"},Yi=Ot({setup(e){const t=[{title:"\u7E3D\u89BD",btnColor:"secondary"},{title:"\u65B0\u589E",btnColor:"primary"},{title:"\u7DE8\u8F2F",btnColor:"success"},{title:"\u7D50\u7B97",btnColor:"danger"}],o=le(!0),n=le([]),i=le("\u7E3D\u89BD"),r=le({\u7E3D\u89BD:5,\u65B0\u589E:5,\u7DE8\u8F2F:5,\u7D50\u7B97:5}),p=Mt(()=>i.value==="\u7E3D\u89BD"?n.value:n.value.filter(w=>w.action===i.value)),B=async function(){try{const{data:w}=await Dt.getLogs();n.value=w.data,o.value=!1}catch(w){console.error("error",w)}},b=async w=>{if(!w.length)return;let D='
\u9805\u76EE
\u5546\u5BB6
\u91D1\u984D
\u65E5\u671F
';for(const l of w)D+=`
${l.item}
${l.merchant}
${l.amount}
${new Date(l.date).toLocaleDateString()}
`;D+=`
${document.documentElement.scrollWidth>=500?"":""}`,await fe.fire({title:"\u7D50\u7B97\u7D00\u9304",html:D})};return B(),(w,D)=>o.value?(g(),Ft(It,{key:1})):(g(),m("div",Ts,[c("div",Ds,[c("div",Is,[(g(),m(O,null,ce(t,(l,N)=>(g(),m(O,{key:N},[c("input",{type:"radio",class:"btn-check",name:"btnradio",id:l.title,autocomplete:"off",checked:i.value===l.title},null,8,Ls),c("label",{class:Ve(`btn btn-outline-${l.btnColor}`),for:l.title,onClick:He=>i.value=l.title},h(l.title),11,Os)],64))),64))]),(g(!0),m(O,null,ce(J(p),(l,N)=>(g(),m("div",{class:"row h-20 mb-3",key:N},[c("div",Ms,[c("div",Fs,h(new Date(l.createdAt).toLocaleDateString()+" "+J(je)(l.createdAt)),1),c("div",Hs,h(new Date(l.createdAt).toLocaleTimeString()),1)]),c("div",js,[c("div",Vs,[c("div",qs,[l.User.displayName==="\u5EFA\u55B5"?(g(),m("img",Ws)):(g(),m("img",Ns)),c("div",Rs,[c("strong",Us,h(l.User.displayName),1),c("strong",zs,h(l.action)+"\u7D00\u9304",1),Ks,l.action==="\u65B0\u589E"||l.action==="\u7DE8\u8F2F"?(g(),m(O,{key:0},[c("strong",Ys,h(l.item),1),Zs,c("strong",Js,h(l.merchant),1),Xs,c("strong",Gs,"$ "+h(l.amount),1),Qs,c("strong",ei,h(new Date(l.date||"").toLocaleDateString()),1)],64)):H("",!0),l.action==="\u7DE8\u8F2F"?(g(),m(O,{key:1},[ti,c("h6",null,[oi,c("strong",ni,h(l.itemBefore),1),si,c("strong",ii,h(l.merchantBefore),1),ri,c("strong",li,"$ "+h(l.amountBefore),1),ci,c("strong",ai,h(new Date(l.dateBefore||"").toLocaleDateString()),1)])],64)):H("",!0),l.action==="\u7D50\u7B97"?(g(),m(O,{key:2},[c("span",null,[ui,c("strong",di,"$ "+h(l.closeAmount),1)]),c("i",{class:"far fa-list-alt fa-lg ms-2",id:"records",onClick:He=>b(l.Records)},null,8,fi)],64)):H("",!0)])])])])]))),128))]),c("div",hi,[c("div",pi,[c("ul",gi,[(g(),m(O,null,ce(t,l=>c("li",{class:"nav-item",key:l.title,onClick:N=>i.value=l.title},[c("span",{class:Ve(["nav-link",{active:i.value===l.title}])},h(l.title),3)],8,mi)),64))])]),c("div",bi,[(g(!0),m(O,null,ce(J(p).slice(0,r.value[i.value]),(l,N)=>(g(),m("div",{class:"card mb-3",key:N},[c("div",yi,h(new Date(l.createdAt).toLocaleDateString()+" "+J(je)(l.createdAt)+new Date(l.createdAt).toLocaleTimeString()),1),c("div",wi,[l.User.displayName==="\u5EFA\u55B5"?(g(),m("img",vi)):(g(),m("img",Ci)),c("div",ki,[c("strong",Pi,h(l.User.displayName),1),c("strong",Bi,h(l.action)+"\u7D00\u9304",1),_i,l.action==="\u65B0\u589E"||l.action==="\u7DE8\u8F2F"?(g(),m("h6",Ai,[c("strong",Ei,h(l.item),1),Si,c("strong",$i,h(l.merchant),1),xi,c("strong",Ti,"$ "+h(l.amount),1),Di,c("strong",Ii,h(new Date(l.date||"").toLocaleDateString()),1)])):H("",!0),l.action==="\u7DE8\u8F2F"?(g(),m("h6",Li,[Oi,c("strong",Mi,h(l.itemBefore),1),Fi,c("strong",Hi,h(l.merchantBefore),1),ji,c("strong",Vi,"$ "+h(l.amountBefore),1),qi,c("strong",Wi,h(new Date(l.dateBefore||"").toLocaleDateString()),1)])):H("",!0),l.action==="\u7D50\u7B97"?(g(),m("h6",Ni,[c("span",null,[Ri,c("strong",Ui,"$ "+h(l.closeAmount),1)]),c("i",{class:"far fa-list-alt fa-lg ms-2",id:"records",onClick:He=>b(l.Records)},null,8,zi)])):H("",!0)])])]))),128)),c("div",Ki,[r.value[i.value]r.value[i.value]+=5)}," \u66F4\u591A\u7D00\u9304 ")):H("",!0)])])])]))}});var er=Lt(Yi,[["__scopeId","data-v-e4c5480a"]]);export{er as default};
diff --git a/assets/Logs.4ace55bd.js b/assets/Logs.4ace55bd.js
deleted file mode 100644
index 33b1598..0000000
--- a/assets/Logs.4ace55bd.js
+++ /dev/null
@@ -1 +0,0 @@
-import{g as w}from"./dateFormat.26b8f760.js";import{r as $}from"./record.faac3df9.js";import{f as L,x as m,g as A,o as s,c as n,h as e,F as i,k as y,n as F,t as o,m as _,P as l,p as x,A as N,B as I,l as c,S as T}from"./vendor.495b01ec.js";import{S as U}from"./Spinner.5acc2245.js";import{_ as V}from"./index.e0544e65.js";var E="/assets/favicon.90f8b31e.ico",C="/assets/karol.27263ac1.png";const D=h=>(N("data-v-e4c5480a"),h=h(),I(),h),z={key:0},P={id:"pc",style:{width:"100vw"}},R={class:"btn-group mb-3",role:"group","aria-label":"Basic radio toggle button group"},W=["id","checked"],j=["for","onClick"],q={class:"col-3 mt-4"},G={class:"fw-bold"},H={class:"fw-bold"},J={class:"col-9"},K={class:"bg-white border p-3"},M={class:"d-flex"},O={key:0,src:E,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},Q={key:1,src:C,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},X={class:"text-start mt-2"},Y={class:"px-1 me-1",style:{"background-color":"yellow"}},Z={style:{color:"salmon"}},tt=D(()=>e("i",{class:"fas fa-chevron-right m-2"},null,-1)),et={style:{color:"blue"}},ot=c(" | "),st={style:{color:"brown"}},nt=c(" | "),ct={style:{color:"orange"}},at=c(" | "),rt={style:{color:"green"}},it=D(()=>e("br",null,null,-1)),lt=c(" \u539F\u7D00\u9304\uFF1A"),dt={style:{color:"blue"}},ut=c(" | "),_t={style:{color:"brown"}},ht=c(" | "),mt={style:{color:"orange"}},yt=c(" | "),vt={style:{color:"green"}},ft=c(" \u7D50\u7B97\u91D1\u984D "),pt={style:{color:"orange"}},Dt=["onClick"],gt={id:"mobile",class:"card text-center",style:{width:"100vw"}},bt={class:"card-header"},kt={class:"nav nav-tabs card-header-tabs"},Bt=["onClick"],wt={class:"card-body"},Ft={class:"card-header"},Et={class:"card-body d-flex"},Ct={key:0,src:E,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},St={key:1,src:C,class:"my-auto img-thumbnail me-2",width:"60",height:"60"},$t={class:"text-start mt-2"},Lt={class:"px-1 me-1",style:{"background-color":"yellow"}},At={style:{color:"salmon"}},xt=D(()=>e("i",{class:"fas fa-chevron-right m-2"},null,-1)),Nt={key:0},It={style:{color:"blue"}},Tt=c(" | "),Ut={style:{color:"brown"}},Vt=c(" | "),zt={style:{color:"orange"}},Pt=c(" | "),Rt={style:{color:"green"}},Wt={key:1},jt=c(" \u539F\u7D00\u9304\uFF1A"),qt={style:{color:"blue"}},Gt=c(" | "),Ht={style:{color:"brown"}},Jt=c(" | "),Kt={style:{color:"orange"}},Mt=c(" | "),Ot={style:{color:"green"}},Qt={key:2},Xt=c(" \u7D50\u7B97\u91D1\u984D "),Yt={style:{color:"orange"}},Zt=["onClick"],te={class:"mt-3"},ee=L({setup(h){const g=[{title:"\u7E3D\u89BD",btnColor:"secondary"},{title:"\u65B0\u589E",btnColor:"primary"},{title:"\u7DE8\u8F2F",btnColor:"success"},{title:"\u7D50\u7B97",btnColor:"danger"}],b=m(!0),v=m([]),a=m("\u7E3D\u89BD"),f=m({\u7E3D\u89BD:5,\u65B0\u589E:5,\u7DE8\u8F2F:5,\u7D50\u7B97:5}),p=A(()=>a.value==="\u7E3D\u89BD"?v.value:v.value.filter(r=>r.action===a.value)),S=async function(){try{const{data:r}=await $.getLogs();v.value=r.data,b.value=!1}catch(r){console.error("error",r)}},k=async r=>{if(!r.length)return;let d='
\u9805\u76EE
\u5546\u5BB6
\u91D1\u984D
\u65E5\u671F
';for(const t of r)d+=`
${t.item}
${t.merchant}
${t.amount}
${new Date(t.date).toLocaleDateString()}
`;d+=`
${document.documentElement.scrollWidth>=500?"":""}`,await T.fire({title:"\u7D50\u7B97\u7D00\u9304",html:d})};return S(),(r,d)=>b.value?(s(),x(U,{key:1})):(s(),n("div",z,[e("div",P,[e("div",R,[(s(),n(i,null,y(g,(t,u)=>(s(),n(i,{key:u},[e("input",{type:"radio",class:"btn-check",name:"btnradio",id:t.title,autocomplete:"off",checked:a.value===t.title},null,8,W),e("label",{class:F(`btn btn-outline-${t.btnColor}`),for:t.title,onClick:B=>a.value=t.title},o(t.title),11,j)],64))),64))]),(s(!0),n(i,null,y(_(p),(t,u)=>(s(),n("div",{class:"row h-20 mb-3",key:u},[e("div",q,[e("div",G,o(new Date(t.createdAt).toLocaleDateString()+" "+_(w)(t.createdAt)),1),e("div",H,o(new Date(t.createdAt).toLocaleTimeString()),1)]),e("div",J,[e("div",K,[e("div",M,[t.User.displayName==="\u5EFA\u55B5"?(s(),n("img",O)):(s(),n("img",Q)),e("div",X,[e("strong",Y,o(t.User.displayName),1),e("strong",Z,o(t.action)+"\u7D00\u9304",1),tt,t.action==="\u65B0\u589E"||t.action==="\u7DE8\u8F2F"?(s(),n(i,{key:0},[e("strong",et,o(t.item),1),ot,e("strong",st,o(t.merchant),1),nt,e("strong",ct,"$ "+o(t.amount),1),at,e("strong",rt,o(new Date(t.date||"").toLocaleDateString()),1)],64)):l("",!0),t.action==="\u7DE8\u8F2F"?(s(),n(i,{key:1},[it,e("h6",null,[lt,e("strong",dt,o(t.itemBefore),1),ut,e("strong",_t,o(t.merchantBefore),1),ht,e("strong",mt,"$ "+o(t.amountBefore),1),yt,e("strong",vt,o(new Date(t.dateBefore||"").toLocaleDateString()),1)])],64)):l("",!0),t.action==="\u7D50\u7B97"?(s(),n(i,{key:2},[e("span",null,[ft,e("strong",pt,"$ "+o(t.closeAmount),1)]),e("i",{class:"far fa-list-alt fa-lg ms-2",id:"records",onClick:B=>k(t.Records)},null,8,Dt)],64)):l("",!0)])])])])]))),128))]),e("div",gt,[e("div",bt,[e("ul",kt,[(s(),n(i,null,y(g,t=>e("li",{class:"nav-item",key:t.title,onClick:u=>a.value=t.title},[e("span",{class:F(["nav-link",{active:a.value===t.title}])},o(t.title),3)],8,Bt)),64))])]),e("div",wt,[(s(!0),n(i,null,y(_(p).slice(0,f.value[a.value]),(t,u)=>(s(),n("div",{class:"card mb-3",key:u},[e("div",Ft,o(new Date(t.createdAt).toLocaleDateString()+" "+_(w)(t.createdAt)+new Date(t.createdAt).toLocaleTimeString()),1),e("div",Et,[t.User.displayName==="\u5EFA\u55B5"?(s(),n("img",Ct)):(s(),n("img",St)),e("div",$t,[e("strong",Lt,o(t.User.displayName),1),e("strong",At,o(t.action)+"\u7D00\u9304",1),xt,t.action==="\u65B0\u589E"||t.action==="\u7DE8\u8F2F"?(s(),n("h6",Nt,[e("strong",It,o(t.item),1),Tt,e("strong",Ut,o(t.merchant),1),Vt,e("strong",zt,"$ "+o(t.amount),1),Pt,e("strong",Rt,o(new Date(t.date||"").toLocaleDateString()),1)])):l("",!0),t.action==="\u7DE8\u8F2F"?(s(),n("h6",Wt,[jt,e("strong",qt,o(t.itemBefore),1),Gt,e("strong",Ht,o(t.merchantBefore),1),Jt,e("strong",Kt,"$ "+o(t.amountBefore),1),Mt,e("strong",Ot,o(new Date(t.dateBefore||"").toLocaleDateString()),1)])):l("",!0),t.action==="\u7D50\u7B97"?(s(),n("h6",Qt,[e("span",null,[Xt,e("strong",Yt,"$ "+o(t.closeAmount),1)]),e("i",{class:"far fa-list-alt fa-lg ms-2",id:"records",onClick:B=>k(t.Records)},null,8,Zt)])):l("",!0)])])]))),128)),e("div",te,[f.value[a.value]<_(p).length?(s(),n("button",{key:0,type:"button",class:"btn btn-secondary",onClick:d[0]||(d[0]=t=>f.value[a.value]+=5)}," \u66F4\u591A\u7D00\u9304 ")):l("",!0)])])])]))}});var re=V(ee,[["__scopeId","data-v-e4c5480a"]]);export{re as default};
diff --git a/assets/NotFound.52f07c53.js b/assets/NotFound.bfcca2c6.js
similarity index 73%
rename from assets/NotFound.52f07c53.js
rename to assets/NotFound.bfcca2c6.js
index cdf368e..a244c44 100644
--- a/assets/NotFound.52f07c53.js
+++ b/assets/NotFound.bfcca2c6.js
@@ -1 +1 @@
-import{_ as e}from"./index.e0544e65.js";import{o as t,c as o,h as r}from"./vendor.495b01ec.js";const s={},c=r("img",{src:"https://www.lifewire.com/thmb/-zkZkHWjYJ1eAIRKzvAksPDMrzg=/3000x2000/filters:no_upscale():max_bytes(150000):strip_icc()/404-not-found-error-explained-2622936-Final-fde7be1b7e2e499c9f039d97183e7f52.jpg",alt:"404",style:{height:"70vh",width:"70vw"}},null,-1),n=[c];function a(i,_){return t(),o("div",null,n)}var f=e(s,[["render",a]]);export{f as default};
+import{_ as e}from"./index.05ca804e.js";import{o as t,g as o,h as r}from"./vendor.961f4417.js";const s={},c=r("img",{src:"https://www.lifewire.com/thmb/-zkZkHWjYJ1eAIRKzvAksPDMrzg=/3000x2000/filters:no_upscale():max_bytes(150000):strip_icc()/404-not-found-error-explained-2622936-Final-fde7be1b7e2e499c9f039d97183e7f52.jpg",alt:"404",style:{height:"70vh",width:"70vw"}},null,-1),n=[c];function a(i,_){return t(),o("div",null,n)}var f=e(s,[["render",a]]);export{f as default};
diff --git a/assets/Permission.25be350c.js b/assets/Permission.25be350c.js
deleted file mode 100644
index e7c06e2..0000000
--- a/assets/Permission.25be350c.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import{d as F,u as v,T as d,_ as y}from"./index.e0544e65.js";import{S as A}from"./Spinner.5acc2245.js";import{f as _,i as E,g as C,o as a,c as u,S as w,x as b,C as g,h as o,j as h,F as x,k as P,t as f,p as $}from"./vendor.495b01ec.js";const k=_({setup(m){const i=["\u67E5\u770B","\u65B0\u589E","\u7DE8\u8F2F","\u522A\u9664","\u505C\u7528","\u64CD\u4F5C"],r=E("refetchPermissions"),n=C(()=>{let e='",e}),c=async()=>{try{const{value:e}=await F.fire({title:"\u65B0\u589E\u6B0A\u9650",html:`
-
- `,preConfirm:()=>{const p=document.getElementById("swal-action").value,B=document.getElementById("swal-item").value,I=document.getElementById("swal-description").value;return(!p||!B)&&w.showValidationMessage("\u9664\u4E86[DESCRIPTION]\uFF0C\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01"),{input:{action:p,item:B,description:I}}}});s&&e(s)}catch(t){console.error("error",t)}},e=async function(t){try{const{data:s}=await v.permission.edit(i.permission.id,t.input);if(s.status!=="success")throw new Error(`[SERVER ERROR] ${s.message}`);n(),d.fire({icon:"success",title:`\u6210\u529F\u7DE8\u8F2F\u6B0A\u9650[${s.data.action}-${s.data.item}]`})}catch(s){console.error("error",s),d.fire({icon:"error",title:"\u7DE8\u8F2F\u6B0A\u9650\u5931\u6557\uFF01"})}};return(t,s)=>(a(),u("i",{class:"fas fa-edit",onClick:l}))}});var R=y(D,[["__scopeId","data-v-7a0ff386"]]);const T=_({props:{permission:null},setup(m){const i=m,r=E("refetchPermissions"),n=async()=>{try{const{isConfirmed:l}=await F.fire({title:`\u78BA\u5B9A\u522A\u9664\u6B0A\u9650[${i.permission.action}-${i.permission.item}]\u561B\uFF1F`,showCancelButton:!0});l&&c(i.permission.id)}catch(l){console.error("error",l)}},c=async function(l){try{const{data:e}=await v.permission.delete(l);if(e.status!=="success")throw new Error(`[SERVER ERROR] ${e.message}`);r(),d.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u6B0A\u9650[${e.data.action}-${e.data.item}]`})}catch(e){console.error("error",e),d.fire({icon:"error",title:"\u522A\u9664\u6B0A\u9650\u5931\u6557\uFF01"})}};return(l,e)=>(a(),u("i",{class:"fas fa-trash",onClick:n}))}});var S=y(T,[["__scopeId","data-v-3846beed"]]);const N={key:0},O={class:"d-flex my-3"},M={key:0,class:"table table-striped table-danger table-hover"},V=o("thead",null,[o("tr",null,[o("th",{scope:"col"},"ID"),o("th",{scope:"col"},"ACTION"),o("th",{scope:"col"},"ITEM"),o("th",{scope:"col"},"DESCRIPTION"),o("th",{scope:"col"},"#")])],-1),j={key:1,class:"img-fluid",src:"https://stickershop.line-scdn.net/stickershop/v1/sticker/208430466/iPhone/sticker_animation@2x.png",alt:"img"},z=_({setup(m){const i=b(!0),r=b([]),n=async function(){try{const{data:c}=await v.permission.getAll();r.value=c.data,i.value=!1}catch(c){console.error("error",c)}};return n(),g("refetchPermissions",n),(c,l)=>i.value?(a(),$(A,{key:1})):(a(),u("div",N,[o("div",O,[h(k)]),r.value.length?(a(),u("table",M,[V,o("tbody",null,[(a(!0),u(x,null,P(r.value,(e,t)=>(a(),u("tr",{key:t},[o("td",null,f(e.id),1),o("td",null,f(e.action),1),o("td",null,f(e.item),1),o("td",null,f(e.description),1),o("td",null,[h(R,{permission:e},null,8,["permission"]),h(S,{permission:e,class:"ms-2"},null,8,["permission"])])]))),128))])])):(a(),u("img",j))]))}});export{z as default};
diff --git a/assets/Permission.3c9c7f92.css b/assets/Permission.3c9c7f92.css
deleted file mode 100644
index b0850d7..0000000
--- a/assets/Permission.3c9c7f92.css
+++ /dev/null
@@ -1 +0,0 @@
-i[data-v-7a0ff386]:hover{color:#1ec539;cursor:pointer}i[data-v-3846beed]:hover{color:#e21313;cursor:pointer}
diff --git a/assets/Record.598ee635.js b/assets/Record.598ee635.js
deleted file mode 100644
index 052241e..0000000
--- a/assets/Record.598ee635.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import{r as C}from"./record.faac3df9.js";import{g as S}from"./dateFormat.26b8f760.js";import{_ as y,c as R,d as k,T as _}from"./index.e0544e65.js";import{S as I}from"./Spinner.5acc2245.js";import{f as D,i as w,o as a,c as m,S as N,F as b,j as E,h as o,t as v,x as B,C as U,k as M,n as L,p as F,m as $,P as j,A as T,B as O}from"./vendor.495b01ec.js";import{p as x,_ as P}from"./CreateRecordModalButton.e30c1d0f.js";const V=D({props:{record:null},setup(i){const p=i,d=R(),l=w("refetchRecords"),c=async()=>{try{const e=p.record,{value:n}=await k.fire({title:"\u8CC7\u6599\u7DE8\u8F2F",html:`
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,preConfirm:()=>{var h;const t=document.getElementById("swal-item").value,u=document.getElementById("swal-merchant").value,s=document.getElementById("swal-amount").value,f=new Date(document.getElementById("swal-date").value);return(!t||!u||!s||!f)&&N.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01\u82E5\u7DE8\u8F2F\u8005\u70BA\u7A7A\uFF0C\u8ACB\u767B\u5165~"),{id:e.id,input:{item:t,merchant:u,amount:s,date:f,UserId:(h=d.currentUser)==null?void 0:h.id}}}});n&&r(n)}catch(e){console.error("error",e)}},r=async function(e){try{await C.edit(e.id,e.input),l(),_.fire({icon:"success",title:"\u6210\u529F\u7DE8\u8F2F\u8CC7\u6599\uFF01"}),x(`${d.nickName}${d.icon}\u7DE8\u8F2F\u4E86\u4E00\u7B46\u7D00\u9304 \u2192
-${e.input.merchant}-${e.input.item} $${e.input.amount}`)}catch(n){console.error("error",n),_.fire({icon:"error",title:"\u7DE8\u8F2F\u8CC7\u6599\u5931\u6557\uFF01"})}};return(e,n)=>(a(),m("i",{class:"fas fa-edit",onClick:c}))}});var z=y(V,[["__scopeId","data-v-0dbb6de0"]]);const q={class:"d-flex mb-3",style:{width:"100vw"}},G={class:"btn btn-info fw-bold"},H=D({props:{propData:null},emits:["closeFunction"],setup(i,{emit:p}){const d=i,l=R(),c=w("refetchRecords"),r=async()=>{var t;const{isConfirmed:n}=await k.fire({icon:"info",title:"\u78BA\u5B9A\u7D50\u7B97\u8CC7\u6599\uFF1F",text:`\u7D50\u7B97\u91D1\u984D\u70BA $${d.propData.closeRecordsAmount} [\u7D50\u7B97\u8005: ${(t=l.currentUser)==null?void 0:t.displayName}]`});n&&e(d.propData.closeRecordsAmount)},e=async n=>{var t;try{if(l.currentUser){const{data:u}=await C.close({records:d.propData.closeRecords.toString(),totalAmount:n,UserId:(t=l.currentUser)==null?void 0:t.id});p("closeFunction","closeRecord"),c(),u.data.recordsNotFound.length||u.data.recordsClosedBefore.length?_.fire({icon:"success",title:"\u6210\u529F\u7D50\u7B97\u8CC7\u6599\uFF01\u6709\u90E8\u5206\u8CC7\u6599\u672A\u80FD\u627E\u5230\u6216\u662F\u5DF2\u7D93\u7D50\u7B97\u904E\u3002"}):_.fire({icon:"success",title:"\u6210\u529F\u7D50\u7B97\u8CC7\u6599\uFF01"}),x(`${l.nickName}${l.icon}\u7D50\u7B97\u7D00\u9304 \u2192 \u7E3D\u91D1\u984D $${n}`)}}catch(u){console.error("error",u),_.fire({icon:"error",title:"\u7D50\u7B97\u8CC7\u6599\u5931\u6557\uFF01"})}};return(n,t)=>(a(),m("div",q,[i.propData.isCloseStatus?(a(),m(b,{key:1},[o("div",G,"\u7D50\u7B97\u91D1\u984D $"+v(i.propData.closeRecordsAmount),1),o("button",{type:"button",class:"btn btn-secondary ms-3",onClick:t[1]||(t[1]=u=>p("closeFunction","cancelBtnClick"))}," \u53D6\u6D88\u7D50\u7B97 "),o("button",{type:"button",class:"btn btn-success ms-3",onClick:r},"\u78BA\u5B9A\u7D50\u7B97")],64)):(a(),m(b,{key:0},[E(P,{view:"Record",class:"me-3"}),o("button",{type:"button",class:"btn btn-danger",onClick:t[0]||(t[0]=u=>p("closeFunction","closeBtnClick"))},"\u958B\u59CB\u7D50\u7B97")],64))]))}});const J=D({props:{record:null},setup(i){const p=i,d=w("refetchRecords"),l=async()=>{try{const{isConfirmed:r}=await k.fire({title:`\u78BA\u5B9A\u522A\u9664\u7D00\u9304[${p.record.item}]\u561B\uFF1F`,showCancelButton:!0});r&&c(p.record.id)}catch(r){console.error("error",r)}},c=async function(r){try{const{data:e}=await C.delete(r);if(e.status!=="success")throw new Error(`[SERVER ERROR] ${e.message}`);d(),_.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u7D00\u9304[${e.data.item}]`})}catch(e){console.error("error",e),_.fire({icon:"error",title:"\u522A\u9664\u7D00\u9304\u5931\u6557\uFF01"})}};return(r,e)=>(a(),m("i",{class:"fas fa-trash",onClick:l}))}});var K=y(J,[["__scopeId","data-v-841b8e8a"]]);const Q=i=>(T("data-v-072f01d7"),i=i(),O(),i),W={key:0},X={key:0,class:"table table-info table-hover"},Y=Q(()=>o("thead",null,[o("tr",null,[o("th",{scope:"col"},"#"),o("th",{scope:"col"}),o("th",{scope:"col"},"\u9805\u76EE"),o("th",{scope:"col"},"\u5546\u5BB6"),o("th",{scope:"col"},"\u91D1\u984D"),o("th",{scope:"col"},"\u65E5\u671F"),o("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),o("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),o("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),Z=["onClick"],ee=["checked"],te={id:"column-item"},oe={id:"column-item"},se={id:"column-item"},ce={key:1,class:"img-fluid",src:"https://memeprod.sgp1.digitaloceanspaces.com/user-wtf/1581909112681.jpg",alt:""},ue=D({setup(i){const p=R(),d=B(!0),l=B([]),c=B({isCloseStatus:!1,closeRecords:[],closeRecordsAmount:0}),r=async function(){try{const{data:t}=await C.getAll();l.value=t.data.filter(u=>u.isClosed===!1),d.value=!1}catch(t){console.error("error",t)}},e=(t,u)=>{if(console.log("checkboxClick"),c.value.isCloseStatus){const s=c.value.closeRecords.findIndex(f=>f===t);s!==void 0&&(s!==-1?(c.value.closeRecords.splice(s,1),c.value.closeRecordsAmount-=u):(c.value.closeRecords.push(t),c.value.closeRecordsAmount+=u))}},n=t=>{if(t==="cancelBtnClick"&&(c.value.isCloseStatus=!1,c.value.closeRecords=[],c.value.closeRecordsAmount=0),t==="closeBtnClick"){c.value.isCloseStatus=!0;const u=[];let s=0;for(let f of l.value)u.push(f.id),s+=f.amount;c.value.closeRecords=u,c.value.closeRecordsAmount=s}t==="closeRecord"&&(c.value.isCloseStatus=!1)};return r(),U("refetchRecords",r),(t,u)=>d.value?(a(),F(I,{key:1})):(a(),m("div",W,[E(H,{propData:c.value,onCloseFunction:n},null,8,["propData"]),l.value.length?(a(),m("table",X,[Y,o("tbody",null,[(a(!0),m(b,null,M(l.value,(s,f)=>{var h,g,A;return a(),m("tr",{key:f,class:L({"table-success":(h=c.value.closeRecords)==null?void 0:h.includes(s.id)}),onClick:le=>e(s.id,s.amount)},[o("td",null,[c.value.isCloseStatus?(a(),m("input",{key:0,class:"form-check-input",type:"checkbox",checked:(g=c.value.closeRecords)==null?void 0:g.includes(s.id)},null,8,ee)):(a(),F(z,{key:1,record:s},null,8,["record"]))]),o("td",null,[((A=$(p).currentUser)==null?void 0:A.Role.name_en)==="root"?(a(),F(K,{key:0,record:s},null,8,["record"])):j("",!0)]),o("td",null,v(s.item),1),o("td",null,v(s.merchant),1),o("td",null,v(s.amount),1),o("td",null,v(new Date(s.date).toLocaleDateString()+" "+$(S)(s.date)),1),o("td",te,v(s.User.displayName),1),o("td",oe,v(new Date(s.createdAt).toLocaleString()),1),o("td",se,v(new Date(s.updatedAt).toLocaleString()),1)],10,Z)}),128))])])):(a(),m("img",ce))]))}});var pe=y(ue,[["__scopeId","data-v-072f01d7"]]);export{pe as default};
diff --git a/assets/Record.6e88edfd.js b/assets/Record.6e88edfd.js
new file mode 100644
index 0000000..4dda955
--- /dev/null
+++ b/assets/Record.6e88edfd.js
@@ -0,0 +1,35 @@
+import{r as h}from"./record.38b4f7fd.js";import{g as S}from"./dateFormat.a9df66b7.js";import{_ as y,c as b,d as R,T as _}from"./index.05ca804e.js";import{S as I}from"./Spinner.ba92d55b.js";import{p as E,_ as U}from"./CreateRecordModalButton.0fd49ef8.js";import{e as D,i as k,o as r,g as m,S as N,F as B,j as x,h as o,t as v,x as C,C as M,k as L,n as j,p as F,m as $,P as T,A as O,B as P}from"./vendor.961f4417.js";const z=D({props:{record:null},setup(d){const p=d,n=b(),a=k("refetchRecords"),u=async()=>{try{const e=p.record,{value:l}=await R.fire({title:"\u8CC7\u6599\u7DE8\u8F2F",html:`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,preConfirm:()=>{const t=document.getElementById("swal-item").value,c=document.getElementById("swal-merchant").value,s=document.getElementById("swal-amount").value,f=new Date(document.getElementById("swal-date").value);if((!t||!c||!s||!f)&&N.showValidationMessage("\u6240\u6709\u8CC7\u6599\u90FD\u662F\u5FC5\u586B\uFF01\u82E5\u7DE8\u8F2F\u8005\u70BA\u7A7A\uFF0C\u8ACB\u767B\u5165~"),n.currentUser)return{id:e.id,input:{item:t,merchant:c,amount:s,date:f,UserId:n.currentUser.id}};_.fire({icon:"error",title:"\u7121\u6CD5\u53D6\u5F97\u4F7F\u7528\u8005ID"})}});l!=null&&l.input&&i(l)}catch(e){console.error("error",e)}},i=async function(e){try{await h.edit(e.id,e.input),a(),_.fire({icon:"success",title:"\u6210\u529F\u7DE8\u8F2F\u8CC7\u6599\uFF01"}),E(`${n.nickName}${n.icon}\u7DE8\u8F2F\u4E86\u4E00\u7B46\u7D00\u9304 \u2192
+${e.input.merchant}-${e.input.item} $${e.input.amount}`)}catch(l){console.error("error",l),_.fire({icon:"error",title:"\u7DE8\u8F2F\u8CC7\u6599\u5931\u6557\uFF01"})}};return(e,l)=>(r(),m("i",{class:"fas fa-edit",onClick:u}))}});var q=y(z,[["__scopeId","data-v-34229604"]]);const G={class:"d-flex mb-3",style:{width:"100vw"}},H={class:"btn btn-info fw-bold"},J=D({props:{propData:null},emits:["closeFunction"],setup(d,{emit:p}){const n=d,a=b(),u=k("refetchRecords"),i=async()=>{var t;const{isConfirmed:l}=await R.fire({icon:"info",title:"\u78BA\u5B9A\u7D50\u7B97\u8CC7\u6599\uFF1F",text:`\u7D50\u7B97\u91D1\u984D\u70BA $${n.propData.closeRecordsAmount} [\u7D50\u7B97\u8005: ${(t=a.currentUser)==null?void 0:t.displayName}]`});l&&e(n.propData.closeRecordsAmount)},e=async l=>{var t;try{if(a.currentUser){const{data:c}=await h.close({records:n.propData.closeRecords.toString(),totalAmount:l,UserId:(t=a.currentUser)==null?void 0:t.id});p("closeFunction","closeRecord"),u(),c.data.recordsNotFound.length||c.data.recordsClosedBefore.length?_.fire({icon:"success",title:"\u6210\u529F\u7D50\u7B97\u8CC7\u6599\uFF01\u6709\u90E8\u5206\u8CC7\u6599\u672A\u80FD\u627E\u5230\u6216\u662F\u5DF2\u7D93\u7D50\u7B97\u904E\u3002"}):_.fire({icon:"success",title:"\u6210\u529F\u7D50\u7B97\u8CC7\u6599\uFF01"}),E(`${a.nickName}${a.icon}\u7D50\u7B97\u7D00\u9304 \u2192 \u7E3D\u91D1\u984D $${l}`)}}catch(c){console.error("error",c),_.fire({icon:"error",title:"\u7D50\u7B97\u8CC7\u6599\u5931\u6557\uFF01"})}};return(l,t)=>(r(),m("div",G,[d.propData.isCloseStatus?(r(),m(B,{key:1},[o("div",H,"\u7D50\u7B97\u91D1\u984D $"+v(d.propData.closeRecordsAmount),1),o("button",{type:"button",class:"btn btn-secondary ms-3",onClick:t[1]||(t[1]=c=>p("closeFunction","cancelBtnClick"))}," \u53D6\u6D88\u7D50\u7B97 "),o("button",{type:"button",class:"btn btn-success ms-3",onClick:i},"\u78BA\u5B9A\u7D50\u7B97")],64)):(r(),m(B,{key:0},[x(U,{view:"Record",class:"me-3"}),o("button",{type:"button",class:"btn btn-danger",onClick:t[0]||(t[0]=c=>p("closeFunction","closeBtnClick"))},"\u958B\u59CB\u7D50\u7B97")],64))]))}});const K=D({props:{record:null},setup(d){const p=d,n=k("refetchRecords"),a=async()=>{try{const{isConfirmed:i}=await R.fire({title:`\u78BA\u5B9A\u522A\u9664\u7D00\u9304[${p.record.item}]\u561B\uFF1F`,showCancelButton:!0});i&&u(p.record.id)}catch(i){console.error("error",i)}},u=async function(i){try{const{data:e}=await h.delete(i);if(e.status!=="success")throw new Error(`[SERVER ERROR] ${e.message}`);n(),_.fire({icon:"success",title:`\u6210\u529F\u522A\u9664\u7D00\u9304[${e.data.item}]`})}catch(e){console.error("error",e),_.fire({icon:"error",title:"\u522A\u9664\u7D00\u9304\u5931\u6557\uFF01"})}};return(i,e)=>(r(),m("i",{class:"fas fa-trash",onClick:a}))}});var Q=y(K,[["__scopeId","data-v-841b8e8a"]]);const V=d=>(O("data-v-072f01d7"),d=d(),P(),d),W={key:0},X={key:0,class:"table table-info table-hover"},Y=V(()=>o("thead",null,[o("tr",null,[o("th",{scope:"col"},"#"),o("th",{scope:"col"}),o("th",{scope:"col"},"\u9805\u76EE"),o("th",{scope:"col"},"\u5546\u5BB6"),o("th",{scope:"col"},"\u91D1\u984D"),o("th",{scope:"col"},"\u65E5\u671F"),o("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u8005"),o("th",{scope:"col",id:"column-item"},"\u9996\u6B21\u8A18\u9304\u6642\u9593"),o("th",{scope:"col",id:"column-item"},"\u66F4\u65B0\u6642\u9593")])],-1)),Z=["onClick"],ee=["checked"],te={id:"column-item"},oe={id:"column-item"},se={id:"column-item"},ue={key:1,class:"img-fluid",src:"https://memeprod.sgp1.digitaloceanspaces.com/user-wtf/1581909112681.jpg",alt:""},ce=D({setup(d){const p=b(),n=C(!0),a=C([]),u=C({isCloseStatus:!1,closeRecords:[],closeRecordsAmount:0}),i=async function(){try{const{data:t}=await h.getAll();a.value=t.data.filter(c=>c.isClosed===!1),n.value=!1}catch(t){console.error("error",t)}},e=(t,c)=>{if(console.log("checkboxClick"),u.value.isCloseStatus){const s=u.value.closeRecords.findIndex(f=>f===t);s!==void 0&&(s!==-1?(u.value.closeRecords.splice(s,1),u.value.closeRecordsAmount-=c):(u.value.closeRecords.push(t),u.value.closeRecordsAmount+=c))}},l=t=>{if(t==="cancelBtnClick"&&(u.value.isCloseStatus=!1,u.value.closeRecords=[],u.value.closeRecordsAmount=0),t==="closeBtnClick"){u.value.isCloseStatus=!0;const c=[];let s=0;for(let f of a.value)c.push(f.id),s+=f.amount;u.value.closeRecords=c,u.value.closeRecordsAmount=s}t==="closeRecord"&&(u.value.isCloseStatus=!1)};return i(),M("refetchRecords",i),(t,c)=>n.value?(r(),F(I,{key:1})):(r(),m("div",W,[x(J,{propData:u.value,onCloseFunction:l},null,8,["propData"]),a.value.length?(r(),m("table",X,[Y,o("tbody",null,[(r(!0),m(B,null,L(a.value,(s,f)=>{var w,g,A;return r(),m("tr",{key:f,class:j({"table-success":(w=u.value.closeRecords)==null?void 0:w.includes(s.id)}),onClick:le=>e(s.id,s.amount)},[o("td",null,[u.value.isCloseStatus?(r(),m("input",{key:0,class:"form-check-input",type:"checkbox",checked:(g=u.value.closeRecords)==null?void 0:g.includes(s.id)},null,8,ee)):(r(),F(q,{key:1,record:s},null,8,["record"]))]),o("td",null,[((A=$(p).currentUser)==null?void 0:A.Role.name_en)==="root"?(r(),F(Q,{key:0,record:s},null,8,["record"])):T("",!0)]),o("td",null,v(s.item),1),o("td",null,v(s.merchant),1),o("td",null,v(s.amount),1),o("td",null,v(new Date(s.date).toLocaleDateString()+" "+$(S)(s.date)),1),o("td",te,v(s.User.displayName),1),o("td",oe,v(new Date(s.createdAt).toLocaleString()),1),o("td",se,v(new Date(s.updatedAt).toLocaleString()),1)],10,Z)}),128))])])):(r(),m("img",ue))]))}});var pe=y(ce,[["__scopeId","data-v-072f01d7"]]);export{pe as default};
diff --git a/assets/Record.e0b853ce.css b/assets/Record.f001a8f1.css
similarity index 78%
rename from assets/Record.e0b853ce.css
rename to assets/Record.f001a8f1.css
index 90633ae..a7fc8b2 100644
--- a/assets/Record.e0b853ce.css
+++ b/assets/Record.f001a8f1.css
@@ -1 +1 @@
-i[data-v-0dbb6de0]:hover{color:#1ec539;cursor:pointer}i[data-v-841b8e8a]:hover{color:#e21313;cursor:pointer}span[data-v-072f01d7]{margin-top:.1em}i[class~=fa-edit][data-v-072f01d7]:hover{color:#1ec539;cursor:pointer}@media screen and (max-width: 400px){#column-item[data-v-072f01d7]{display:none}}
+i[data-v-34229604]:hover{color:#1ec539;cursor:pointer}i[data-v-841b8e8a]:hover{color:#e21313;cursor:pointer}span[data-v-072f01d7]{margin-top:.1em}i[class~=fa-edit][data-v-072f01d7]:hover{color:#1ec539;cursor:pointer}@media screen and (max-width: 400px){#column-item[data-v-072f01d7]{display:none}}
diff --git a/assets/Register.6118c7d7.js b/assets/Register.d331bd41.js
similarity index 88%
rename from assets/Register.6118c7d7.js
rename to assets/Register.d331bd41.js
index 3f98f78..89870af 100644
--- a/assets/Register.6118c7d7.js
+++ b/assets/Register.d331bd41.js
@@ -1 +1 @@
-import{f as _,K as f,x as v,o as g,c as h,h as e,m as B,y as l,z as i,A as w,B as F}from"./vendor.495b01ec.js";import{_ as b}from"./logo2.e884e5c2.js";import{_ as y,F as C,T as n,u as p}from"./index.e0544e65.js";const u=a=>(w("data-v-0e827606"),a=a(),F(),a),U={class:"m-auto",style:{width:"70vw"}},A=u(()=>e("img",{src:b,alt:"",width:"150",height:"150"},null,-1)),D=u(()=>e("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Register",-1)),R={class:"form-floating"},x=u(()=>e("label",{for:"name-register"},"\u540D\u7A31",-1)),E={class:"form-floating"},I=u(()=>e("label",{for:"photoUrl-register"},"\u5927\u982D\u8CBC(url)",-1)),L={class:"form-floating"},N=u(()=>e("label",{for:"email-register"},"\u4FE1\u7BB1",-1)),k={class:"form-floating"},V=u(()=>e("label",{for:"password-register"},"\u5BC6\u78BC",-1)),S=_({setup(a){const d=f(),t=v(new C),m=async()=>{try{const{displayName:r,email:o,password:s}=t.value;if(!r||!o||!s)return n.fire({icon:"warning",title:"\u540D\u7A31\u3001\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});if(s.length<6)return n.fire({icon:"warning",title:"\u5BC6\u78BC\u81F3\u5C11\u89816\u4F4D\uFF01"});const{data:c}=await p.user.firebase_email_register(t.value);await p.user.create({email:t.value.email,displayName:t.value.displayName,photoURL:t.value.photoURL,firebaseUid:c.data.uid}),n.fire({icon:"success",title:"\u8A3B\u518A\u6210\u529F\uFF01"}),d.push({name:"Login"})}catch(r){console.error("error",r),n.fire({icon:"error",title:"\u8A3B\u518A\u5931\u6557\uFF01"})}};return(r,o)=>(g(),h("div",null,[e("button",{class:"btn btn-info login-btn",type:"button",onClick:o[0]||(o[0]=s=>B(d).push({name:"Login"}))},"\u524D\u5F80\u767B\u5165"),e("div",U,[e("form",null,[A,D,e("div",R,[l(e("input",{type:"text",class:"form-control",id:"name-register","onUpdate:modelValue":o[1]||(o[1]=s=>t.value.displayName=s),autocomplete:"on"},null,512),[[i,t.value.displayName]]),x]),e("div",E,[l(e("input",{type:"url",class:"form-control",id:"photoUrl-register","onUpdate:modelValue":o[2]||(o[2]=s=>t.value.photoURL=s),autocomplete:"on"},null,512),[[i,t.value.photoURL]]),I]),e("div",L,[l(e("input",{type:"email",class:"form-control",id:"email-register","onUpdate:modelValue":o[3]||(o[3]=s=>t.value.email=s),autocomplete:"on"},null,512),[[i,t.value.email]]),N]),e("div",k,[l(e("input",{type:"password",class:"form-control",id:"password-register","onUpdate:modelValue":o[4]||(o[4]=s=>t.value.password=s),autocomplete:"on"},null,512),[[i,t.value.password]]),V]),e("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:m,style:{color:"white","background-color":"mediumaquamarine"}}," \u53D6\u5F97\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u7684\u9580\u7968 ")])])]))}});var K=y(S,[["__scopeId","data-v-0e827606"]]);export{K as default};
+import{e as _,K as f,x as g,o as v,g as h,h as e,m as B,y as l,z as i,A as w,B as F}from"./vendor.961f4417.js";import{_ as b}from"./logo2.e884e5c2.js";import{_ as y,F as C,T as n,u as p}from"./index.05ca804e.js";const u=a=>(w("data-v-0e827606"),a=a(),F(),a),U={class:"m-auto",style:{width:"70vw"}},A=u(()=>e("img",{src:b,alt:"",width:"150",height:"150"},null,-1)),D=u(()=>e("h1",{class:"h3 mb-3 fw-normal"},"\u81ED\u5EFA\u55B5\u8A18\u5E33 Register",-1)),R={class:"form-floating"},x=u(()=>e("label",{for:"name-register"},"\u540D\u7A31",-1)),E={class:"form-floating"},I=u(()=>e("label",{for:"photoUrl-register"},"\u5927\u982D\u8CBC(url)",-1)),L={class:"form-floating"},N=u(()=>e("label",{for:"email-register"},"\u4FE1\u7BB1",-1)),k={class:"form-floating"},V=u(()=>e("label",{for:"password-register"},"\u5BC6\u78BC",-1)),S=_({setup(a){const d=f(),t=g(new C),m=async()=>{try{const{displayName:r,email:o,password:s}=t.value;if(!r||!o||!s)return n.fire({icon:"warning",title:"\u540D\u7A31\u3001\u4FE1\u7BB1\u3001\u5BC6\u78BC\u70BA\u5FC5\u586B\u9078\u9805\uFF01"});if(s.length<6)return n.fire({icon:"warning",title:"\u5BC6\u78BC\u81F3\u5C11\u89816\u4F4D\uFF01"});const{data:c}=await p.user.firebase_email_register(t.value);await p.user.create({email:t.value.email,displayName:t.value.displayName,photoURL:t.value.photoURL,firebaseUid:c.data.uid}),n.fire({icon:"success",title:"\u8A3B\u518A\u6210\u529F\uFF01"}),d.push({name:"Login"})}catch(r){console.error("error",r),n.fire({icon:"error",title:"\u8A3B\u518A\u5931\u6557\uFF01"})}};return(r,o)=>(v(),h("div",null,[e("button",{class:"btn btn-info login-btn",type:"button",onClick:o[0]||(o[0]=s=>B(d).push({name:"Login"}))},"\u524D\u5F80\u767B\u5165"),e("div",U,[e("form",null,[A,D,e("div",R,[l(e("input",{type:"text",class:"form-control",id:"name-register","onUpdate:modelValue":o[1]||(o[1]=s=>t.value.displayName=s),autocomplete:"on"},null,512),[[i,t.value.displayName]]),x]),e("div",E,[l(e("input",{type:"url",class:"form-control",id:"photoUrl-register","onUpdate:modelValue":o[2]||(o[2]=s=>t.value.photoURL=s),autocomplete:"on"},null,512),[[i,t.value.photoURL]]),I]),e("div",L,[l(e("input",{type:"email",class:"form-control",id:"email-register","onUpdate:modelValue":o[3]||(o[3]=s=>t.value.email=s),autocomplete:"on"},null,512),[[i,t.value.email]]),N]),e("div",k,[l(e("input",{type:"password",class:"form-control",id:"password-register","onUpdate:modelValue":o[4]||(o[4]=s=>t.value.password=s),autocomplete:"on"},null,512),[[i,t.value.password]]),V]),e("button",{class:"w-100 btn btn-lg mt-3",type:"button",onClick:m,style:{color:"white","background-color":"mediumaquamarine"}}," \u53D6\u5F97\u9032\u5165\u8C6C\u8C6C\u4E16\u754C\u7684\u9580\u7968 ")])])]))}});var K=y(S,[["__scopeId","data-v-0e827606"]]);export{K as default};
diff --git a/assets/Role.3adec45e.js b/assets/Role.3adec45e.js
deleted file mode 100644
index 4760f55..0000000
--- a/assets/Role.3adec45e.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import{d as h,u as p,T as i,_ as b}from"./index.e0544e65.js";import{S as E}from"./Spinner.5acc2245.js";import{f as v,i as F,o as n,c,S as D,x as y,C as w,r as B,h as s,j as f,F as x,k,t as _,w as C,p as R}from"./vendor.495b01ec.js";const g=v({setup(d){const a=F("refetchRoles"),r=async()=>{try{const{value:o}=await h.fire({title:"\u65B0\u589E\u89D2\u8272",html:`
-
"),hy=(a,c)=>{const h=Ue();if(!c.imageUrl)return Ye(h);Ce(h,""),h.setAttribute("src",c.imageUrl),h.setAttribute("alt",c.imageAlt),Re(h,"width",c.imageWidth),Re(h,"height",c.imageHeight),h.className=g.image,N(h,c,"image")},py=a=>{const c=document.createElement("li");return ne(c,g["progress-step"]),Q(c,a),c},my=a=>{const c=document.createElement("li");return ne(c,g["progress-step-line"]),a.progressStepsDistance&&(c.style.width=a.progressStepsDistance),c},gy=(a,c)=>{const h=We();if(!c.progressSteps||c.progressSteps.length===0)return Ye(h);Ce(h),h.textContent="",c.currentProgressStep>=c.progressSteps.length&&o("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),c.progressSteps.forEach((_,Y)=>{const ue=py(_);if(h.appendChild(ue),Y===c.currentProgressStep&&ne(ue,g["active-progress-step"]),Y!==c.progressSteps.length-1){const tt=my(c);h.appendChild(tt)}})},vy=(a,c)=>{const h=Te();or(h,c.title||c.titleText,"block"),c.title&&Wa(c.title,h),c.titleText&&(h.innerText=c.titleText),N(h,c,"title")},yy=(a,c)=>{const h=V(),_=G();c.toast?(Re(h,"width",c.width),_.style.width="100%",_.insertBefore(z(),le())):Re(_,"width",c.width),Re(_,"padding",c.padding),c.color&&(_.style.color=c.color),c.background&&(_.style.background=c.background),Ye(xe()),_y(_,c)},_y=(a,c)=>{a.className="".concat(g.popup," ").concat(it(a)?c.showClass.popup:""),c.toast?(ne([document.documentElement,document.body],g["toast-shown"]),ne(a,g.toast)):ne(a,g.modal),N(a,c,"popup"),typeof c.customClass=="string"&&ne(a,c.customClass),c.icon&&ne(a,g["icon-".concat(c.icon)])},Yu=(a,c)=>{yy(a,c),Qv(a,c),gy(a,c),ly(a,c),hy(a,c),vy(a,c),ay(a,c),sy(a,c),Yv(a,c),oy(a,c),typeof c.didRender=="function"&&c.didRender(G())},Xr=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),by=()=>{s(document.body.children).forEach(c=>{c===V()||c.contains(V())||(c.hasAttribute("aria-hidden")&&c.setAttribute("data-previous-aria-hidden",c.getAttribute("aria-hidden")),c.setAttribute("aria-hidden","true"))})},Ku=()=>{s(document.body.children).forEach(c=>{c.hasAttribute("data-previous-aria-hidden")?(c.setAttribute("aria-hidden",c.getAttribute("data-previous-aria-hidden")),c.removeAttribute("data-previous-aria-hidden")):c.removeAttribute("aria-hidden")})},zu=["swal-title","swal-html","swal-footer"],wy=a=>{const c=typeof a.template=="string"?document.querySelector(a.template):a.template;if(!c)return{};const h=c.content;return Iy(h),Object.assign(Ey(h),Ty(h),Cy(h),Sy(h),Ay(h),Oy(h,zu))},Ey=a=>{const c={};return s(a.querySelectorAll("swal-param")).forEach(h=>{lr(h,["name","value"]);const _=h.getAttribute("name"),Y=h.getAttribute("value");typeof T[_]=="boolean"&&Y==="false"&&(c[_]=!1),typeof T[_]=="object"&&(c[_]=JSON.parse(Y))}),c},Ty=a=>{const c={};return s(a.querySelectorAll("swal-button")).forEach(h=>{lr(h,["type","color","aria-label"]);const _=h.getAttribute("type");c["".concat(_,"ButtonText")]=h.innerHTML,c["show".concat(i(_),"Button")]=!0,h.hasAttribute("color")&&(c["".concat(_,"ButtonColor")]=h.getAttribute("color")),h.hasAttribute("aria-label")&&(c["".concat(_,"ButtonAriaLabel")]=h.getAttribute("aria-label"))}),c},Cy=a=>{const c={},h=a.querySelector("swal-image");return h&&(lr(h,["src","width","height","alt"]),h.hasAttribute("src")&&(c.imageUrl=h.getAttribute("src")),h.hasAttribute("width")&&(c.imageWidth=h.getAttribute("width")),h.hasAttribute("height")&&(c.imageHeight=h.getAttribute("height")),h.hasAttribute("alt")&&(c.imageAlt=h.getAttribute("alt"))),c},Sy=a=>{const c={},h=a.querySelector("swal-icon");return h&&(lr(h,["type","color"]),h.hasAttribute("type")&&(c.icon=h.getAttribute("type")),h.hasAttribute("color")&&(c.iconColor=h.getAttribute("color")),c.iconHtml=h.innerHTML),c},Ay=a=>{const c={},h=a.querySelector("swal-input");h&&(lr(h,["type","label","placeholder","value"]),c.input=h.getAttribute("type")||"text",h.hasAttribute("label")&&(c.inputLabel=h.getAttribute("label")),h.hasAttribute("placeholder")&&(c.inputPlaceholder=h.getAttribute("placeholder")),h.hasAttribute("value")&&(c.inputValue=h.getAttribute("value")));const _=a.querySelectorAll("swal-input-option");return _.length&&(c.inputOptions={},s(_).forEach(Y=>{lr(Y,["value"]);const ue=Y.getAttribute("value"),tt=Y.innerHTML;c.inputOptions[ue]=tt})),c},Oy=(a,c)=>{const h={};for(const _ in c){const Y=c[_],ue=a.querySelector(Y);ue&&(lr(ue,[]),h[Y.replace(/^swal-/,"")]=ue.innerHTML.trim())}return h},Iy=a=>{const c=zu.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);s(a.children).forEach(h=>{const _=h.tagName.toLowerCase();c.indexOf(_)===-1&&o("Unrecognized element <".concat(_,">"))})},lr=(a,c)=>{s(a.attributes).forEach(h=>{c.indexOf(h.name)===-1&&o(['Unrecognized attribute "'.concat(h.name,'" on <').concat(a.tagName.toLowerCase(),">."),"".concat(c.length?"Allowed attributes are: ".concat(c.join(", ")):"To set the value, use HTML within the element.")])})};var Gu={email:(a,c)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(a)?Promise.resolve():Promise.resolve(c||"Invalid email address"),url:(a,c)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(a)?Promise.resolve():Promise.resolve(c||"Invalid URL")};function ky(a){a.inputValidator||Object.keys(Gu).forEach(c=>{a.input===c&&(a.inputValidator=Gu[c])})}function Dy(a){(!a.target||typeof a.target=="string"&&!document.querySelector(a.target)||typeof a.target!="string"&&!a.target.appendChild)&&(o('Target parameter is not valid, defaulting to "body"'),a.target="body")}function Py(a){ky(a),a.showLoaderOnConfirm&&!a.preConfirm&&o(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
+showLoaderOnConfirm should be used together with preConfirm, see usage example:
+https://sweetalert2.github.io/#ajax-request`),Dy(a),typeof a.title=="string"&&(a.title=a.title.split(`
+`).join(" ")),Vv(a)}class Ny{constructor(c,h){this.callback=c,this.remaining=h,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(c){const h=this.running;return h&&this.stop(),this.remaining+=c,h&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const xy=()=>{X.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(X.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(X.previousBodyPadding+qv(),"px"))},My=()=>{X.previousBodyPadding!==null&&(document.body.style.paddingRight="".concat(X.previousBodyPadding,"px"),X.previousBodyPadding=null)},Ry=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!q(document.body,g.iosfix)){const c=document.body.scrollTop;document.body.style.top="".concat(c*-1,"px"),ne(document.body,g.iosfix),$y(),Ly()}},Ly=()=>{const a=navigator.userAgent,c=!!a.match(/iPad/i)||!!a.match(/iPhone/i),h=!!a.match(/WebKit/i);c&&h&&!a.match(/CriOS/i)&&G().scrollHeight>window.innerHeight-44&&(V().style.paddingBottom="".concat(44,"px"))},$y=()=>{const a=V();let c;a.ontouchstart=h=>{c=By(h)},a.ontouchmove=h=>{c&&(h.preventDefault(),h.stopPropagation())}},By=a=>{const c=a.target,h=V();return Uy(a)||Hy(a)?!1:c===h||!ut(h)&&c.tagName!=="INPUT"&&c.tagName!=="TEXTAREA"&&!(ut(He())&&He().contains(c))},Uy=a=>a.touches&&a.touches.length&&a.touches[0].touchType==="stylus",Hy=a=>a.touches&&a.touches.length>1,Fy=()=>{if(q(document.body,g.iosfix)){const a=parseInt(document.body.style.top,10);ye(document.body,g.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},Xu=10,Vy=a=>{const c=V(),h=G();typeof a.willOpen=="function"&&a.willOpen(h);const Y=window.getComputedStyle(document.body).overflowY;qy(c,h,a),setTimeout(()=>{jy(c,h)},Xu),P()&&(Wy(c,a.scrollbarPadding,Y),by()),!M()&&!Oe.previousActiveElement&&(Oe.previousActiveElement=document.activeElement),typeof a.didOpen=="function"&&setTimeout(()=>a.didOpen(h)),ye(c,g["no-transition"])},Ju=a=>{const c=G();if(a.target!==c)return;const h=V();c.removeEventListener(Ki,Ju),h.style.overflowY="auto"},jy=(a,c)=>{Ki&&Tt(c)?(a.style.overflowY="hidden",c.addEventListener(Ki,Ju)):a.style.overflowY="auto"},Wy=(a,c,h)=>{Ry(),c&&h!=="hidden"&&xy(),setTimeout(()=>{a.scrollTop=0})},qy=(a,c,h)=>{ne(a,h.showClass.backdrop),c.style.setProperty("opacity","0","important"),Ce(c,"grid"),setTimeout(()=>{ne(c,h.showClass.popup),c.style.removeProperty("opacity")},Xu),ne([document.documentElement,document.body],g.shown),h.heightAuto&&h.backdrop&&!h.toast&&ne([document.documentElement,document.body],g["height-auto"])},Jr=a=>{let c=G();c||new so,c=G();const h=z();M()?Ye(le()):Yy(c,a),Ce(h),c.setAttribute("data-loading",!0),c.setAttribute("aria-busy",!0),c.focus()},Yy=(a,c)=>{const h=be(),_=z();!c&&it(qe())&&(c=qe()),Ce(h),c&&(Ye(c),_.setAttribute("data-button-to-replace",c.className)),_.parentNode.insertBefore(_,c),ne([a,h],g.loading)},Ky=(a,c)=>{c.input==="select"||c.input==="radio"?Qy(a,c):["text","email","number","tel","textarea"].includes(c.input)&&(v(c.inputValue)||S(c.inputValue))&&(Jr(qe()),Zy(a,c))},zy=(a,c)=>{const h=a.getInput();if(!h)return null;switch(c.input){case"checkbox":return Gy(h);case"radio":return Xy(h);case"file":return Jy(h);default:return c.inputAutoTrim?h.value.trim():h.value}},Gy=a=>a.checked?1:0,Xy=a=>a.checked?a.value:null,Jy=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,Qy=(a,c)=>{const h=G(),_=Y=>e_[c.input](h,Ka(Y),c);v(c.inputOptions)||S(c.inputOptions)?(Jr(qe()),m(c.inputOptions).then(Y=>{a.hideLoading(),_(Y)})):typeof c.inputOptions=="object"?_(c.inputOptions):l("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof c.inputOptions))},Zy=(a,c)=>{const h=a.getInput();Ye(h),m(c.inputValue).then(_=>{h.value=c.input==="number"?parseFloat(_)||0:"".concat(_),Ce(h),h.focus(),a.hideLoading()}).catch(_=>{l("Error in inputValue promise: ".concat(_)),h.value="",Ce(h),h.focus(),a.hideLoading()})},e_={select:(a,c,h)=>{const _=Ne(a,g.select),Y=(ue,tt,Ct)=>{const mt=document.createElement("option");mt.value=Ct,Q(mt,tt),mt.selected=Qu(Ct,h.inputValue),ue.appendChild(mt)};c.forEach(ue=>{const tt=ue[0],Ct=ue[1];if(Array.isArray(Ct)){const mt=document.createElement("optgroup");mt.label=tt,mt.disabled=!1,_.appendChild(mt),Ct.forEach(Zr=>Y(mt,Zr[1],Zr[0]))}else Y(_,Ct,tt)}),_.focus()},radio:(a,c,h)=>{const _=Ne(a,g.radio);c.forEach(ue=>{const tt=ue[0],Ct=ue[1],mt=document.createElement("input"),Zr=document.createElement("label");mt.type="radio",mt.name=g.radio,mt.value=tt,Qu(tt,h.inputValue)&&(mt.checked=!0);const el=document.createElement("span");Q(el,Ct),el.className=g.label,Zr.appendChild(mt),Zr.appendChild(el),_.appendChild(Zr)});const Y=_.querySelectorAll("input");Y.length&&Y[0].focus()}},Ka=a=>{const c=[];return typeof Map!="undefined"&&a instanceof Map?a.forEach((h,_)=>{let Y=h;typeof Y=="object"&&(Y=Ka(Y)),c.push([_,Y])}):Object.keys(a).forEach(h=>{let _=a[h];typeof _=="object"&&(_=Ka(_)),c.push([h,_])}),c},Qu=(a,c)=>c&&c.toString()===a.toString();function Zu(){const a=De.innerParams.get(this);if(!a)return;const c=De.domCache.get(this);Ye(c.loader),M()?a.icon&&Ce(le()):t_(c),ye([c.popup,c.actions],g.loading),c.popup.removeAttribute("aria-busy"),c.popup.removeAttribute("data-loading"),c.confirmButton.disabled=!1,c.denyButton.disabled=!1,c.cancelButton.disabled=!1}const t_=a=>{const c=a.popup.getElementsByClassName(a.loader.getAttribute("data-button-to-replace"));c.length?Ce(c[0],"inline-block"):no()&&Ye(a.actions)};function n_(a){const c=De.innerParams.get(a||this),h=De.domCache.get(a||this);return h?J(h.popup,c.input):null}var Gi={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const r_=()=>it(G()),ed=()=>qe()&&qe().click(),i_=()=>L()&&L().click(),s_=()=>se()&&se().click(),td=a=>{a.keydownTarget&&a.keydownHandlerAdded&&(a.keydownTarget.removeEventListener("keydown",a.keydownHandler,{capture:a.keydownListenerCapture}),a.keydownHandlerAdded=!1)},o_=(a,c,h,_)=>{td(c),h.toast||(c.keydownHandler=Y=>l_(a,Y,_),c.keydownTarget=h.keydownListenerCapture?window:G(),c.keydownListenerCapture=h.keydownListenerCapture,c.keydownTarget.addEventListener("keydown",c.keydownHandler,{capture:c.keydownListenerCapture}),c.keydownHandlerAdded=!0)},za=(a,c,h)=>{const _=E();if(_.length)return c=c+h,c===_.length?c=0:c===-1&&(c=_.length-1),_[c].focus();G().focus()},nd=["ArrowRight","ArrowDown"],a_=["ArrowLeft","ArrowUp"],l_=(a,c,h)=>{const _=De.innerParams.get(a);!_||c.isComposing||c.keyCode===229||(_.stopKeydownPropagation&&c.stopPropagation(),c.key==="Enter"?c_(a,c,_):c.key==="Tab"?u_(c,_):[...nd,...a_].includes(c.key)?d_(c.key):c.key==="Escape"&&f_(c,_,h))},c_=(a,c,h)=>{if(!!p(h.allowEnterKey)&&c.target&&a.getInput()&&c.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(h.input))return;ed(),c.preventDefault()}},u_=(a,c)=>{const h=a.target,_=E();let Y=-1;for(let ue=0;ue<_.length;ue++)if(h===_[ue]){Y=ue;break}a.shiftKey?za(c,Y,-1):za(c,Y,1),a.stopPropagation(),a.preventDefault()},d_=a=>{const c=qe(),h=L(),_=se();if(![c,h,_].includes(document.activeElement))return;const Y=nd.includes(a)?"nextElementSibling":"previousElementSibling";let ue=document.activeElement;for(let tt=0;tt{p(c.allowEscapeKey)&&(a.preventDefault(),h(Xr.esc))};function rd(a,c,h,_){M()?id(a,_):(Rv(h).then(()=>id(a,_)),td(Oe)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(c.setAttribute("style","display:none !important"),c.removeAttribute("class"),c.innerHTML=""):c.remove(),P()&&(My(),Fy(),Ku()),h_()}function h_(){ye([document.documentElement,document.body],[g.shown,g["height-auto"],g["no-backdrop"],g["toast-shown"]])}function ro(a){a=v_(a);const c=Gi.swalPromiseResolve.get(this),h=m_(this);this.isAwaitingPromise()?a.isDismissed||(Xi(this),c(a)):h&&c(a)}function p_(){return!!De.awaitingPromise.get(this)}const m_=a=>{const c=G();if(!c)return!1;const h=De.innerParams.get(a);if(!h||q(c,h.hideClass.popup))return!1;ye(c,h.showClass.popup),ne(c,h.hideClass.popup);const _=V();return ye(_,h.showClass.backdrop),ne(_,h.hideClass.backdrop),y_(a,c,h),!0};function g_(a){const c=Gi.swalPromiseReject.get(this);Xi(this),c&&c(a)}const Xi=a=>{a.isAwaitingPromise()&&(De.awaitingPromise.delete(a),De.innerParams.get(a)||a._destroy())},v_=a=>typeof a=="undefined"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},a),y_=(a,c,h)=>{const _=V(),Y=Ki&&Tt(c);typeof h.willClose=="function"&&h.willClose(c),Y?__(a,c,_,h.returnFocus,h.didClose):rd(a,_,h.returnFocus,h.didClose)},__=(a,c,h,_,Y)=>{Oe.swalCloseEventFinishedCallback=rd.bind(null,a,h,_,Y),c.addEventListener(Ki,function(ue){ue.target===c&&(Oe.swalCloseEventFinishedCallback(),delete Oe.swalCloseEventFinishedCallback)})},id=(a,c)=>{setTimeout(()=>{typeof c=="function"&&c.bind(a.params)(),a._destroy()})};function sd(a,c,h){const _=De.domCache.get(a);c.forEach(Y=>{_[Y].disabled=h})}function od(a,c){if(!a)return!1;if(a.type==="radio"){const _=a.parentNode.parentNode.querySelectorAll("input");for(let Y=0;Y<_.length;Y++)_[Y].disabled=c}else a.disabled=c}function b_(){sd(this,["confirmButton","denyButton","cancelButton"],!1)}function w_(){sd(this,["confirmButton","denyButton","cancelButton"],!0)}function E_(){return od(this.getInput(),!1)}function T_(){return od(this.getInput(),!0)}function C_(a){const c=De.domCache.get(this),h=De.innerParams.get(this);Q(c.validationMessage,a),c.validationMessage.className=g["validation-message"],h.customClass&&h.customClass.validationMessage&&ne(c.validationMessage,h.customClass.validationMessage),Ce(c.validationMessage);const _=this.getInput();_&&(_.setAttribute("aria-invalid",!0),_.setAttribute("aria-describedby",g["validation-message"]),U(_),ne(_,g.inputerror))}function S_(){const a=De.domCache.get(this);a.validationMessage&&Ye(a.validationMessage);const c=this.getInput();c&&(c.removeAttribute("aria-invalid"),c.removeAttribute("aria-describedby"),ye(c,g.inputerror))}function A_(){return De.domCache.get(this).progressSteps}function O_(a){const c=G(),h=De.innerParams.get(this);if(!c||q(c,h.hideClass.popup))return o("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const _=I_(a),Y=Object.assign({},h,_);Yu(this,Y),De.innerParams.set(this,Y),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}const I_=a=>{const c={};return Object.keys(a).forEach(h=>{D(h)?c[h]=a[h]:o('Invalid parameter to update: "'.concat(h,`". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
+
+If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`))}),c};function k_(){const a=De.domCache.get(this),c=De.innerParams.get(this);if(!c){ad(this);return}a.popup&&Oe.swalCloseEventFinishedCallback&&(Oe.swalCloseEventFinishedCallback(),delete Oe.swalCloseEventFinishedCallback),Oe.deferDisposalTimer&&(clearTimeout(Oe.deferDisposalTimer),delete Oe.deferDisposalTimer),typeof c.didDestroy=="function"&&c.didDestroy(),D_(this)}const D_=a=>{ad(a),delete a.params,delete Oe.keydownHandler,delete Oe.keydownTarget,delete Oe.currentInstance},ad=a=>{a.isAwaitingPromise()?(Ga(De,a),De.awaitingPromise.set(a,!0)):(Ga(Gi,a),Ga(De,a))},Ga=(a,c)=>{for(const h in a)a[h].delete(c)};var ld=Object.freeze({hideLoading:Zu,disableLoading:Zu,getInput:n_,close:ro,isAwaitingPromise:p_,rejectPromise:g_,handleAwaitingPromise:Xi,closePopup:ro,closeModal:ro,closeToast:ro,enableButtons:b_,disableButtons:w_,enableInput:E_,disableInput:T_,showValidationMessage:C_,resetValidationMessage:S_,getProgressSteps:A_,update:O_,_destroy:k_});const P_=a=>{const c=De.innerParams.get(a);a.disableButtons(),c.input?cd(a,"confirm"):Ja(a,!0)},N_=a=>{const c=De.innerParams.get(a);a.disableButtons(),c.returnInputValueOnDeny?cd(a,"deny"):Xa(a,!1)},x_=(a,c)=>{a.disableButtons(),c(Xr.cancel)},cd=(a,c)=>{const h=De.innerParams.get(a);if(!h.input)return l('The "input" parameter is needed to be set when using returnInputValueOn'.concat(i(c)));const _=zy(a,h);h.inputValidator?M_(a,_,c):a.getInput().checkValidity()?c==="deny"?Xa(a,_):Ja(a,_):(a.enableButtons(),a.showValidationMessage(h.validationMessage))},M_=(a,c,h)=>{const _=De.innerParams.get(a);a.disableInput(),Promise.resolve().then(()=>m(_.inputValidator(c,_.validationMessage))).then(ue=>{a.enableButtons(),a.enableInput(),ue?a.showValidationMessage(ue):h==="deny"?Xa(a,c):Ja(a,c)})},Xa=(a,c)=>{const h=De.innerParams.get(a||void 0);h.showLoaderOnDeny&&Jr(L()),h.preDeny?(De.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(h.preDeny(c,h.validationMessage))).then(Y=>{Y===!1?(a.hideLoading(),Xi(a)):a.closePopup({isDenied:!0,value:typeof Y=="undefined"?c:Y})}).catch(Y=>dd(a||void 0,Y))):a.closePopup({isDenied:!0,value:c})},ud=(a,c)=>{a.closePopup({isConfirmed:!0,value:c})},dd=(a,c)=>{a.rejectPromise(c)},Ja=(a,c)=>{const h=De.innerParams.get(a||void 0);h.showLoaderOnConfirm&&Jr(),h.preConfirm?(a.resetValidationMessage(),De.awaitingPromise.set(a||void 0,!0),Promise.resolve().then(()=>m(h.preConfirm(c,h.validationMessage))).then(Y=>{it(xe())||Y===!1?(a.hideLoading(),Xi(a)):ud(a,typeof Y=="undefined"?c:Y)}).catch(Y=>dd(a||void 0,Y))):ud(a,c)},R_=(a,c,h)=>{De.innerParams.get(a).toast?L_(a,c,h):(B_(c),U_(c),H_(a,c,h))},L_=(a,c,h)=>{c.popup.onclick=()=>{const _=De.innerParams.get(a);_&&($_(_)||_.timer||_.input)||h(Xr.close)}},$_=a=>a.showConfirmButton||a.showDenyButton||a.showCancelButton||a.showCloseButton;let io=!1;const B_=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(c){a.container.onmouseup=void 0,c.target===a.container&&(io=!0)}}},U_=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(c){a.popup.onmouseup=void 0,(c.target===a.popup||a.popup.contains(c.target))&&(io=!0)}}},H_=(a,c,h)=>{c.container.onclick=_=>{const Y=De.innerParams.get(a);if(io){io=!1;return}_.target===c.container&&p(Y.allowOutsideClick)&&h(Xr.backdrop)}},F_=a=>typeof a=="object"&&a.jquery,fd=a=>a instanceof Element||F_(a),V_=a=>{const c={};return typeof a[0]=="object"&&!fd(a[0])?Object.assign(c,a[0]):["title","html","icon"].forEach((h,_)=>{const Y=a[_];typeof Y=="string"||fd(Y)?c[h]=Y:Y!==void 0&&l("Unexpected type of ".concat(h,'! Expected "string" or "Element", got ').concat(typeof Y))}),c};function j_(){const a=this;for(var c=arguments.length,h=new Array(c),_=0;_Oe.timeout&&Oe.timeout.getTimerLeft(),hd=()=>{if(Oe.timeout)return Nv(),Oe.timeout.stop()},pd=()=>{if(Oe.timeout){const a=Oe.timeout.start();return Gr(a),a}},Y_=()=>{const a=Oe.timeout;return a&&(a.running?hd():pd())},K_=a=>{if(Oe.timeout){const c=Oe.timeout.increase(a);return Gr(c,!0),c}},z_=()=>Oe.timeout&&Oe.timeout.isRunning();let md=!1;const Qa={};function G_(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Qa[a]=this,md||(document.body.addEventListener("click",X_),md=!0)}const X_=a=>{for(let c=a.target;c&&c!==document;c=c.parentNode)for(const h in Qa){const _=c.getAttribute(h);if(_){Qa[h].fire({template:_});return}}};var J_=Object.freeze({isValidParameter:C,isUpdatableParameter:D,isDeprecatedParameter:B,argsToParams:V_,isVisible:r_,clickConfirm:ed,clickDeny:i_,clickCancel:s_,getContainer:V,getPopup:G,getTitle:Te,getHtmlContainer:He,getImage:Ue,getIcon:le,getInputLabel:re,getCloseButton:pe,getActions:be,getConfirmButton:qe,getDenyButton:L,getCancelButton:se,getLoader:z,getFooter:ve,getTimerProgressBar:de,getFocusableElements:E,getValidationMessage:xe,isLoading:$,fire:j_,mixin:W_,showLoading:Jr,enableLoading:Jr,getTimerLeft:q_,stopTimer:hd,resumeTimer:pd,toggleTimer:Y_,increaseTimer:K_,isTimerRunning:z_,bindClickHandler:G_});let Za;class Qr{constructor(){if(typeof window=="undefined")return;Za=this;for(var c=arguments.length,h=new Array(c),_=0;_1&&arguments[1]!==void 0?arguments[1]:{};R(Object.assign({},h,c)),Oe.currentInstance&&(Oe.currentInstance._destroy(),P()&&Ku()),Oe.currentInstance=this;const _=Z_(c,h);Py(_),Object.freeze(_),Oe.timeout&&(Oe.timeout.stop(),delete Oe.timeout),clearTimeout(Oe.restoreFocusTimeout);const Y=eb(this);return Yu(this,_),De.innerParams.set(this,_),Q_(this,Y,_)}then(c){return De.promise.get(this).then(c)}finally(c){return De.promise.get(this).finally(c)}}const Q_=(a,c,h)=>new Promise((_,Y)=>{const ue=tt=>{a.closePopup({isDismissed:!0,dismiss:tt})};Gi.swalPromiseResolve.set(a,_),Gi.swalPromiseReject.set(a,Y),c.confirmButton.onclick=()=>P_(a),c.denyButton.onclick=()=>N_(a),c.cancelButton.onclick=()=>x_(a,ue),c.closeButton.onclick=()=>ue(Xr.close),R_(a,c,ue),o_(a,Oe,h,ue),Ky(a,h),Vy(h),tb(Oe,h,ue),nb(c,h),setTimeout(()=>{c.container.scrollTop=0})}),Z_=(a,c)=>{const h=wy(a),_=Object.assign({},T,c,h,a);return _.showClass=Object.assign({},T.showClass,_.showClass),_.hideClass=Object.assign({},T.hideClass,_.hideClass),_},eb=a=>{const c={popup:G(),container:V(),actions:be(),confirmButton:qe(),denyButton:L(),cancelButton:se(),loader:z(),closeButton:pe(),validationMessage:xe(),progressSteps:We()};return De.domCache.set(a,c),c},tb=(a,c,h)=>{const _=de();Ye(_),c.timer&&(a.timeout=new Ny(()=>{h("timer"),delete a.timeout},c.timer),c.timerProgressBar&&(Ce(_),N(_,c,"timerProgressBar"),setTimeout(()=>{a.timeout&&a.timeout.running&&Gr(c.timer)})))},nb=(a,c)=>{if(!c.toast){if(!p(c.allowEnterKey))return ib();rb(a,c)||za(c,-1,1)}},rb=(a,c)=>c.focusDeny&&it(a.denyButton)?(a.denyButton.focus(),!0):c.focusCancel&&it(a.cancelButton)?(a.cancelButton.focus(),!0):c.focusConfirm&&it(a.confirmButton)?(a.confirmButton.focus(),!0):!1,ib=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(Qr.prototype,ld),Object.assign(Qr,J_),Object.keys(ld).forEach(a=>{Qr[a]=function(){if(Za)return Za[a](...arguments)}}),Qr.DismissReason=Xr,Qr.version="11.4.8";const so=Qr;return so.default=so,so}),typeof Mn!="undefined"&&Mn.Sweetalert2&&(Mn.swal=Mn.sweetAlert=Mn.Swal=Mn.SweetAlert=Mn.Sweetalert2)})(pm);var bx=pm.exports;/*!
+ * vue-router v4.0.12
+ * (c) 2021 Eduardo San Martin Morote
+ * @license MIT
+ */const mm=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Fi=t=>mm?Symbol(t):"_vr_"+t,B0=Fi("rvlm"),tf=Fi("rvd"),ya=Fi("r"),iu=Fi("rl"),lc=Fi("rvl"),ui=typeof window!="undefined";function U0(t){return t.__esModule||mm&&t[Symbol.toStringTag]==="Module"}const Ke=Object.assign;function al(t,e){const n={};for(const r in e){const i=e[r];n[r]=Array.isArray(i)?i.map(t):t(i)}return n}const ys=()=>{},H0=/\/$/,F0=t=>t.replace(H0,"");function ll(t,e,n="/"){let r,i={},s="",o="";const l=e.indexOf("?"),u=e.indexOf("#",l>-1?l:0);return l>-1&&(r=e.slice(0,l),s=e.slice(l+1,u>-1?u:e.length),i=t(s)),u>-1&&(r=r||e.slice(0,u),o=e.slice(u,e.length)),r=q0(r!=null?r:e,n),{fullPath:r+(s&&"?")+s+o,path:r,query:i,hash:o}}function V0(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function nf(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function j0(t,e,n){const r=e.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Ai(e.matched[r],n.matched[i])&&gm(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Ai(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function gm(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!W0(t[n],e[n]))return!1;return!0}function W0(t,e){return Array.isArray(t)?rf(t,e):Array.isArray(e)?rf(e,t):t===e}function rf(t,e){return Array.isArray(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t.length===1&&t[0]===e}function q0(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),r=t.split("/");let i=n.length-1,s,o;for(s=0;s({left:window.pageXOffset,top:window.pageYOffset});function X0(t){let e;if("el"in t){const n=t.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=G0(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function sf(t,e){return(history.state?history.state.position-e:-1)+t}const cc=new Map;function J0(t,e){cc.set(t,e)}function Q0(t){const e=cc.get(t);return cc.delete(t),e}let Z0=()=>location.protocol+"//"+location.host;function vm(t,e){const{pathname:n,search:r,hash:i}=e,s=t.indexOf("#");if(s>-1){let l=i.includes(t.slice(s))?t.slice(s).length:1,u=i.slice(l);return u[0]!=="/"&&(u="/"+u),nf(u,"")}return nf(n,t)+r+i}function eE(t,e,n,r){let i=[],s=[],o=null;const l=({state:v})=>{const m=vm(t,location),S=n.value,T=e.value;let A=0;if(v){if(n.value=m,e.value=v,o&&o===S){o=null;return}A=T?v.position-T.position:0}else r(m);i.forEach(O=>{O(n.value,S,{delta:A,type:$s.pop,direction:A?A>0?_s.forward:_s.back:_s.unknown})})};function u(){o=n.value}function d(v){i.push(v);const m=()=>{const S=i.indexOf(v);S>-1&&i.splice(S,1)};return s.push(m),m}function f(){const{history:v}=window;!v.state||v.replaceState(Ke({},v.state,{scroll:_a()}),"")}function p(){for(const v of s)v();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",f),{pauseListeners:u,listen:d,destroy:p}}function of(t,e,n,r=!1,i=!1){return{back:t,current:e,forward:n,replaced:r,position:window.history.length,scroll:i?_a():null}}function tE(t){const{history:e,location:n}=window,r={value:vm(t,n)},i={value:e.state};i.value||s(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,d,f){const p=t.indexOf("#"),v=p>-1?(n.host&&document.querySelector("base")?t:t.slice(p))+u:Z0()+t+u;try{e[f?"replaceState":"pushState"](d,"",v),i.value=d}catch(m){console.error(m),n[f?"replace":"assign"](v)}}function o(u,d){const f=Ke({},e.state,of(i.value.back,u,i.value.forward,!0),d,{position:i.value.position});s(u,f,!0),r.value=u}function l(u,d){const f=Ke({},i.value,e.state,{forward:u,scroll:_a()});s(f.current,f,!0);const p=Ke({},of(r.value,u,null),{position:f.position+1},d);s(u,p,!1),r.value=u}return{location:r,state:i,push:l,replace:o}}function wx(t){t=Y0(t);const e=tE(t),n=eE(t,e.state,e.location,e.replace);function r(s,o=!0){o||n.pauseListeners(),history.go(s)}const i=Ke({location:"",base:t,go:r,createHref:z0.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function nE(t){return typeof t=="string"||t&&typeof t=="object"}function ym(t){return typeof t=="string"||typeof t=="symbol"}const Rn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},_m=Fi("nf");var af;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(af||(af={}));function Oi(t,e){return Ke(new Error,{type:t,[_m]:!0},e)}function fr(t,e){return t instanceof Error&&_m in t&&(e==null||!!(t.type&e))}const lf="[^/]+?",rE={sensitive:!1,strict:!1,start:!0,end:!0},iE=/[.+*?^${}()[\]/\\]/g;function sE(t,e){const n=Ke({},rE,e),r=[];let i=n.start?"^":"";const s=[];for(const d of t){const f=d.length?[]:[90];n.strict&&!d.length&&(i+="/");for(let p=0;pe.length?e.length===1&&e[0]===40+40?1:-1:0}function aE(t,e){let n=0;const r=t.score,i=e.score;for(;n1&&(u==="*"||u==="+")&&e(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:d,regexp:f,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),d="")}function v(){d+=u}for(;l{o(k)}:ys}function o(f){if(ym(f)){const p=r.get(f);p&&(r.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(o),p.alias.forEach(o))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&r.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function l(){return n}function u(f){let p=0;for(;p=0;)p++;n.splice(p,0,f),f.record.name&&!cf(f)&&r.set(f.record.name,f)}function d(f,p){let v,m={},S,T;if("name"in f&&f.name){if(v=r.get(f.name),!v)throw Oi(1,{location:f});T=v.record.name,m=Ke(hE(p.params,v.keys.filter(k=>!k.optional).map(k=>k.name)),f.params),S=v.stringify(m)}else if("path"in f)S=f.path,v=n.find(k=>k.re.test(S)),v&&(m=v.parse(S),T=v.record.name);else{if(v=p.name?r.get(p.name):n.find(k=>k.re.test(p.path)),!v)throw Oi(1,{location:f,currentLocation:p});T=v.record.name,m=Ke({},p.params,f.params),S=v.stringify(m)}const A=[];let O=v;for(;O;)A.unshift(O.record),O=O.parent;return{name:T,path:S,params:m,matched:A,meta:gE(A)}}return t.forEach(f=>s(f)),{addRoute:s,resolve:d,removeRoute:o,getRoutes:l,getRecordMatcher:i}}function hE(t,e){const n={};for(const r of e)r in t&&(n[r]=t[r]);return n}function pE(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:mE(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||{}:{default:t.component}}}function mE(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const r in t.components)e[r]=typeof n=="boolean"?n:n[r];return e}function cf(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function gE(t){return t.reduce((e,n)=>Ke(e,n.meta),{})}function uf(t,e){const n={};for(const r in t)n[r]=r in e?e[r]:t[r];return n}const bm=/#/g,vE=/&/g,yE=/\//g,_E=/=/g,bE=/\?/g,wm=/\+/g,wE=/%5B/g,EE=/%5D/g,Em=/%5E/g,TE=/%60/g,Tm=/%7B/g,CE=/%7C/g,Cm=/%7D/g,SE=/%20/g;function su(t){return encodeURI(""+t).replace(CE,"|").replace(wE,"[").replace(EE,"]")}function AE(t){return su(t).replace(Tm,"{").replace(Cm,"}").replace(Em,"^")}function uc(t){return su(t).replace(wm,"%2B").replace(SE,"+").replace(bm,"%23").replace(vE,"%26").replace(TE,"`").replace(Tm,"{").replace(Cm,"}").replace(Em,"^")}function OE(t){return uc(t).replace(_E,"%3D")}function IE(t){return su(t).replace(bm,"%23").replace(bE,"%3F")}function kE(t){return t==null?"":IE(t).replace(yE,"%2F")}function qo(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function DE(t){const e={};if(t===""||t==="?")return e;const r=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;is&&uc(s)):[r&&uc(r)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+n,s!=null&&(e+="="+s))})}return e}function PE(t){const e={};for(const n in t){const r=t[n];r!==void 0&&(e[n]=Array.isArray(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return e}function Zi(){let t=[];function e(r){return t.push(r),()=>{const i=t.indexOf(r);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t,reset:n}}function jn(t,e,n,r,i){const s=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((o,l)=>{const u=p=>{p===!1?l(Oi(4,{from:n,to:e})):p instanceof Error?l(p):nE(p)?l(Oi(2,{from:e,to:p})):(s&&r.enterCallbacks[i]===s&&typeof p=="function"&&s.push(p),o())},d=t.call(r&&r.instances[i],e,n,u);let f=Promise.resolve(d);t.length<3&&(f=f.then(u)),f.catch(p=>l(p))})}function cl(t,e,n,r){const i=[];for(const s of t)for(const o in s.components){let l=s.components[o];if(!(e!=="beforeRouteEnter"&&!s.instances[o]))if(NE(l)){const d=(l.__vccOpts||l)[e];d&&i.push(jn(d,n,r,s,o))}else{let u=l();i.push(()=>u.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${s.path}"`));const f=U0(d)?d.default:d;s.components[o]=f;const v=(f.__vccOpts||f)[e];return v&&jn(v,n,r,s,o)()}))}}return i}function NE(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function ff(t){const e=ht(ya),n=ht(iu),r=ce(()=>e.resolve(I(t.to))),i=ce(()=>{const{matched:u}=r.value,{length:d}=u,f=u[d-1],p=n.matched;if(!f||!p.length)return-1;const v=p.findIndex(Ai.bind(null,f));if(v>-1)return v;const m=hf(u[d-2]);return d>1&&hf(f)===m&&p[p.length-1].path!==m?p.findIndex(Ai.bind(null,u[d-2])):v}),s=ce(()=>i.value>-1&&LE(n.params,r.value.params)),o=ce(()=>i.value>-1&&i.value===n.matched.length-1&&gm(n.params,r.value.params));function l(u={}){return RE(u)?e[I(t.replace)?"replace":"push"](I(t.to)).catch(ys):Promise.resolve()}return{route:r,href:ce(()=>r.value.href),isActive:s,isExactActive:o,navigate:l}}const xE=Gt({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ff,setup(t,{slots:e}){const n=Hi(ff(t)),{options:r}=ht(ya),i=ce(()=>({[pf(t.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[pf(t.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=e.default&&e.default(n);return t.custom?s:ru("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},s)}}}),ME=xE;function RE(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function LE(t,e){for(const n in e){const r=e[n],i=t[n];if(typeof r=="string"){if(r!==i)return!1}else if(!Array.isArray(i)||i.length!==r.length||r.some((s,o)=>s!==i[o]))return!1}return!0}function hf(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const pf=(t,e,n)=>t!=null?t:e!=null?e:n,$E=Gt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(t,{attrs:e,slots:n}){const r=ht(lc),i=ce(()=>t.route||r.value),s=ht(tf,0),o=ce(()=>i.value.matched[s]);Ir(tf,s+1),Ir(B0,o),Ir(lc,i);const l=Se();return cn(()=>[l.value,o.value,t.name],([u,d,f],[p,v,m])=>{d&&(d.instances[f]=u,v&&v!==d&&u&&u===p&&(d.leaveGuards.size||(d.leaveGuards=v.leaveGuards),d.updateGuards.size||(d.updateGuards=v.updateGuards))),u&&d&&(!v||!Ai(d,v)||!p)&&(d.enterCallbacks[f]||[]).forEach(S=>S(u))},{flush:"post"}),()=>{const u=i.value,d=o.value,f=d&&d.components[t.name],p=t.name;if(!f)return mf(n.default,{Component:f,route:u});const v=d.props[t.name],m=v?v===!0?u.params:typeof v=="function"?v(u):v:null,T=ru(f,Ke({},m,e,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(d.instances[p]=null)},ref:l}));return mf(n.default,{Component:T,route:u})||T}}});function mf(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const BE=$E;function Ex(t){const e=fE(t.routes,t),n=t.parseQuery||DE,r=t.stringifyQuery||df,i=t.history,s=Zi(),o=Zi(),l=Zi(),u=Zb(Rn);let d=Rn;ui&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=al.bind(null,L=>""+L),p=al.bind(null,kE),v=al.bind(null,qo);function m(L,re){let z,se;return ym(L)?(z=e.getRecordMatcher(L),se=re):se=L,e.addRoute(se,z)}function S(L){const re=e.getRecordMatcher(L);re&&e.removeRoute(re)}function T(){return e.getRoutes().map(L=>L.record)}function A(L){return!!e.getRecordMatcher(L)}function O(L,re){if(re=Ke({},re||u.value),typeof L=="string"){const pe=ll(n,L,re.path),y=e.resolve({path:pe.path},re),E=i.createHref(pe.fullPath);return Ke(pe,y,{params:v(y.params),hash:qo(pe.hash),redirectedFrom:void 0,href:E})}let z;if("path"in L)z=Ke({},L,{path:ll(n,L.path,re.path).path});else{const pe=Ke({},L.params);for(const y in pe)pe[y]==null&&delete pe[y];z=Ke({},L,{params:p(L.params)}),re.params=p(re.params)}const se=e.resolve(z,re),be=L.hash||"";se.params=f(v(se.params));const ve=V0(r,Ke({},L,{hash:AE(be),path:se.path})),de=i.createHref(ve);return Ke({fullPath:ve,hash:be,query:r===df?PE(L.query):L.query||{}},se,{redirectedFrom:void 0,href:de})}function k(L){return typeof L=="string"?ll(n,L,u.value.path):Ke({},L)}function C(L,re){if(d!==L)return Oi(8,{from:re,to:L})}function D(L){return b(L)}function B(L){return D(Ke(k(L),{replace:!0}))}function j(L){const re=L.matched[L.matched.length-1];if(re&&re.redirect){const{redirect:z}=re;let se=typeof z=="function"?z(L):z;return typeof se=="string"&&(se=se.includes("?")||se.includes("#")?se=k(se):{path:se},se.params={}),Ke({query:L.query,hash:L.hash,params:L.params},se)}}function b(L,re){const z=d=O(L),se=u.value,be=L.state,ve=L.force,de=L.replace===!0,pe=j(z);if(pe)return b(Ke(k(pe),{state:be,force:ve,replace:de}),re||z);const y=z;y.redirectedFrom=re;let E;return!ve&&j0(r,se,z)&&(E=Oi(16,{to:y,from:se}),He(se,se,!0,!1)),(E?Promise.resolve(E):R(y,se)).catch(P=>fr(P)?P:G(P,y,se)).then(P=>{if(P){if(fr(P,2))return b(Ke(k(P.to),{state:be,force:ve,replace:de}),re||y)}else P=w(y,se,!0,de,be);return H(y,se,P),P})}function x(L,re){const z=C(L,re);return z?Promise.reject(z):Promise.resolve()}function R(L,re){let z;const[se,be,ve]=UE(L,re);z=cl(se.reverse(),"beforeRouteLeave",L,re);for(const pe of se)pe.leaveGuards.forEach(y=>{z.push(jn(y,L,re))});const de=x.bind(null,L,re);return z.push(de),ni(z).then(()=>{z=[];for(const pe of s.list())z.push(jn(pe,L,re));return z.push(de),ni(z)}).then(()=>{z=cl(be,"beforeRouteUpdate",L,re);for(const pe of be)pe.updateGuards.forEach(y=>{z.push(jn(y,L,re))});return z.push(de),ni(z)}).then(()=>{z=[];for(const pe of L.matched)if(pe.beforeEnter&&!re.matched.includes(pe))if(Array.isArray(pe.beforeEnter))for(const y of pe.beforeEnter)z.push(jn(y,L,re));else z.push(jn(pe.beforeEnter,L,re));return z.push(de),ni(z)}).then(()=>(L.matched.forEach(pe=>pe.enterCallbacks={}),z=cl(ve,"beforeRouteEnter",L,re),z.push(de),ni(z))).then(()=>{z=[];for(const pe of o.list())z.push(jn(pe,L,re));return z.push(de),ni(z)}).catch(pe=>fr(pe,8)?pe:Promise.reject(pe))}function H(L,re,z){for(const se of l.list())se(L,re,z)}function w(L,re,z,se,be){const ve=C(L,re);if(ve)return ve;const de=re===Rn,pe=ui?history.state:{};z&&(se||de?i.replace(L.fullPath,Ke({scroll:de&&pe&&pe.scroll},be)):i.push(L.fullPath,be)),u.value=L,He(L,re,z,de),Te()}let g;function F(){g=i.listen((L,re,z)=>{const se=O(L),be=j(se);if(be){b(Ke(be,{replace:!0}),se).catch(ys);return}d=se;const ve=u.value;ui&&J0(sf(ve.fullPath,z.delta),_a()),R(se,ve).catch(de=>fr(de,12)?de:fr(de,2)?(b(de.to,se).then(pe=>{fr(pe,20)&&!z.delta&&z.type===$s.pop&&i.go(-1,!1)}).catch(ys),Promise.reject()):(z.delta&&i.go(-z.delta,!1),G(de,se,ve))).then(de=>{de=de||w(se,ve,!1),de&&(z.delta?i.go(-z.delta,!1):z.type===$s.pop&&fr(de,20)&&i.go(-1,!1)),H(se,ve,de)}).catch(ys)})}let V=Zi(),ae=Zi(),ee;function G(L,re,z){Te(L);const se=ae.list();return se.length?se.forEach(be=>be(L,re,z)):console.error(L),Promise.reject(L)}function le(){return ee&&u.value!==Rn?Promise.resolve():new Promise((L,re)=>{V.add([L,re])})}function Te(L){ee||(ee=!0,F(),V.list().forEach(([re,z])=>L?z(L):re()),V.reset())}function He(L,re,z,se){const{scrollBehavior:be}=t;if(!ui||!be)return Promise.resolve();const ve=!z&&Q0(sf(L.fullPath,0))||(se||!z)&&history.state&&history.state.scroll||null;return da().then(()=>be(L,re,ve)).then(de=>de&&X0(de)).catch(de=>G(de,L,re))}const Ue=L=>i.go(L);let We;const xe=new Set;return{currentRoute:u,addRoute:m,removeRoute:S,hasRoute:A,getRoutes:T,resolve:O,options:t,push:D,replace:B,go:Ue,back:()=>Ue(-1),forward:()=>Ue(1),beforeEach:s.add,beforeResolve:o.add,afterEach:l.add,onError:ae.add,isReady:le,install(L){const re=this;L.component("RouterLink",ME),L.component("RouterView",BE),L.config.globalProperties.$router=re,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>I(u)}),ui&&!We&&u.value===Rn&&(We=!0,D(i.location).catch(be=>{}));const z={};for(const be in Rn)z[be]=ce(()=>u.value[be]);L.provide(ya,re),L.provide(iu,Hi(z)),L.provide(lc,u);const se=L.unmount;xe.add(L),L.unmount=function(){xe.delete(L),xe.size<1&&(d=Rn,g&&g(),u.value=Rn,We=!1,ee=!1),se()}}}}function ni(t){return t.reduce((e,n)=>e.then(()=>n()),Promise.resolve())}function UE(t,e){const n=[],r=[],i=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;oAi(d,l))?r.push(l):n.push(l));const u=t.matched[o];u&&(e.matched.find(d=>Ai(d,u))||i.push(u))}return[n,r,i]}function Tx(){return ht(ya)}function Cx(){return ht(iu)}var HE=!1;/*!
+ * pinia v2.0.6
+ * (c) 2021 Eduardo San Martin Morote
+ * @license MIT
+ */let Sm;const ba=t=>Sm=t,Am=Symbol();function dc(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var bs;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(bs||(bs={}));function Sx(){const t=gp(!0),e=t.run(()=>Se({}));let n=[],r=[];const i=Ei({install(s){ba(i),i._a=s,s.provide(Am,i),s.config.globalProperties.$pinia=i,r.forEach(o=>n.push(o)),r=[]},use(s){return!this._a&&!HE?r.push(s):n.push(s),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}function gf(t,e,n){t.push(e);const r=()=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)};return!n&&va()&&ma(r),r}function vf(t,...e){t.forEach(n=>{n(...e)})}function fc(t,e){for(const n in e){const r=e[n],i=t[n];dc(i)&&dc(r)&&!Xe(r)&&!Jn(r)?t[n]=fc(i,r):t[n]=r}return t}const FE=Symbol();function VE(t){return!dc(t)||!t.hasOwnProperty(FE)}const{assign:bn}=Object;function jE(t){return!!(Xe(t)&&t.effect)}function WE(t,e,n,r){const{state:i,actions:s,getters:o}=e,l=n.state.value[t];let u;function d(){l||(n.state.value[t]=i?i():{});const f=nw(n.state.value[t]);return bn(f,s,Object.keys(o||{}).reduce((p,v)=>(p[v]=Ei(ce(()=>{ba(n);const m=n._s.get(t);return o[v].call(m,m)})),p),{}))}return u=Om(t,d,e,n),u.$reset=function(){const p=i?i():{};this.$patch(v=>{bn(v,p)})},u}const ul=()=>{};function Om(t,e,n={},r,i){let s;const o=n.state,l=bn({actions:{}},n),u={deep:!0};let d,f=Ei([]),p=Ei([]),v;const m=r.state.value[t];!o&&!m&&(r.state.value[t]={}),Se({});function S(B){let j;d=!1,typeof B=="function"?(B(r.state.value[t]),j={type:bs.patchFunction,storeId:t,events:v}):(fc(r.state.value[t],B),j={type:bs.patchObject,payload:B,storeId:t,events:v}),d=!0,vf(f,j,r.state.value[t])}const T=ul;function A(){s.stop(),f=[],p=[],r._s.delete(t)}function O(B,j){return function(){ba(r);const b=Array.from(arguments);let x=ul,R=ul;function H(V){x=V}function w(V){R=V}vf(p,{args:b,name:B,store:C,after:H,onError:w});let g;try{g=j.apply(this&&this.$id===t?this:C,b)}catch(V){if(R(V)!==!1)throw V}if(g instanceof Promise)return g.then(V=>{const ae=x(V);return ae===void 0?V:ae}).catch(V=>{if(R(V)!==!1)return Promise.reject(V)});const F=x(g);return F===void 0?g:F}}const k={_p:r,$id:t,$onAction:gf.bind(null,p),$patch:S,$reset:T,$subscribe(B,j={}){const b=gf(f,B,j.detached),x=s.run(()=>cn(()=>r.state.value[t],H=>{d&&B({storeId:t,type:bs.direct,events:v},H)},bn({},u,j)));return()=>{x(),b()}},$dispose:A},C=Hi(bn({},k));r._s.set(t,C);const D=r._e.run(()=>(s=gp(),s.run(()=>e())));for(const B in D){const j=D[B];if(Xe(j)&&!jE(j)||Jn(j))o||(m&&VE(j)&&(Xe(j)?j.value=m[B]:fc(j,m[B])),r.state.value[t][B]=j);else if(typeof j=="function"){const b=O(B,j);D[B]=b,l.actions[B]=j}}return bn(C,D),bn(Be(C),D),Object.defineProperty(C,"$state",{get:()=>r.state.value[t],set:B=>{S(j=>{bn(j,B)})}}),r._p.forEach(B=>{bn(C,s.run(()=>B({store:C,app:r._a,pinia:r,options:l})))}),m&&o&&n.hydrate&&n.hydrate(C.$state,m),d=!0,C}function Ax(t,e,n){let r,i;const s=typeof e=="function";typeof t=="string"?(r=t,i=s?n:e):(i=t,r=t.id);function o(l,u){const d=va();return l=l||d&&ht(Am),l&&ba(l),l=Sm,l._s.has(r)||(s?Om(r,e,i,l):WE(r,i,l)),l._s.get(r)}return o.$id=r,o}var ou={exports:{}},Im=function(e,n){return function(){for(var i=new Array(arguments.length),s=0;s=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},_f=xt,ET=_f.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(s){var o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){var l=_f.isString(o)?i(o):o;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function cu(t){this.message=t}cu.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};cu.prototype.__CANCEL__=!0;var Ea=cu,go=xt,TT=hT,CT=pT,ST=Pm,AT=_T,OT=wT,IT=ET,fl=xm,kT=Ca,DT=Ea,bf=function(e){return new Promise(function(r,i){var s=e.data,o=e.headers,l=e.responseType,u;function d(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}go.isFormData(s)&&delete o["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(p+":"+v)}var m=AT(e.baseURL,e.url);f.open(e.method.toUpperCase(),ST(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function S(){if(!!f){var A="getAllResponseHeaders"in f?OT(f.getAllResponseHeaders()):null,O=!l||l==="text"||l==="json"?f.responseText:f.response,k={data:O,status:f.status,statusText:f.statusText,headers:A,config:e,request:f};TT(function(D){r(D),d()},function(D){i(D),d()},k),f=null}}if("onloadend"in f?f.onloadend=S:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(S)},f.onabort=function(){!f||(i(fl("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){i(fl("Network Error",e,null,f)),f=null},f.ontimeout=function(){var O=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",k=e.transitional||kT.transitional;e.timeoutErrorMessage&&(O=e.timeoutErrorMessage),i(fl(O,e,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},go.isStandardBrowserEnv()){var T=(e.withCredentials||IT(m))&&e.xsrfCookieName?CT.read(e.xsrfCookieName):void 0;T&&(o[e.xsrfHeaderName]=T)}"setRequestHeader"in f&&go.forEach(o,function(O,k){typeof s=="undefined"&&k.toLowerCase()==="content-type"?delete o[k]:f.setRequestHeader(k,O)}),go.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),l&&l!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(A){!f||(i(!A||A&&A.type?new DT("canceled"):A),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),f.send(s)})},at=xt,wf=uT,PT=Nm,NT={"Content-Type":"application/x-www-form-urlencoded"};function Ef(t,e){!at.isUndefined(t)&&at.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function xT(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=bf),t}function MT(t,e,n){if(at.isString(t))try{return(e||JSON.parse)(t),at.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var Ta={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:xT(),transformRequest:[function(e,n){return wf(n,"Accept"),wf(n,"Content-Type"),at.isFormData(e)||at.isArrayBuffer(e)||at.isBuffer(e)||at.isStream(e)||at.isFile(e)||at.isBlob(e)?e:at.isArrayBufferView(e)?e.buffer:at.isURLSearchParams(e)?(Ef(n,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):at.isObject(e)||n&&n["Content-Type"]==="application/json"?(Ef(n,"application/json"),MT(e)):e}],transformResponse:[function(e){var n=this.transitional||Ta.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,s=!r&&this.responseType==="json";if(s||i&&at.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?PT(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};at.forEach(["delete","get","head"],function(e){Ta.headers[e]={}});at.forEach(["post","put","patch"],function(e){Ta.headers[e]=at.merge(NT)});var Ca=Ta,RT=xt,LT=Ca,$T=function(e,n,r){var i=this||LT;return RT.forEach(r,function(o){e=o.call(i,e,n)}),e},Mm=function(e){return!!(e&&e.__CANCEL__)},Tf=xt,hl=$T,BT=Mm,UT=Ca,HT=Ea;function pl(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new HT("canceled")}var FT=function(e){pl(e),e.headers=e.headers||{},e.data=hl.call(e,e.data,e.headers,e.transformRequest),e.headers=Tf.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Tf.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var n=e.adapter||UT.adapter;return n(e).then(function(i){return pl(e),i.data=hl.call(e,i.data,i.headers,e.transformResponse),i},function(i){return BT(i)||(pl(e),i&&i.response&&(i.response.data=hl.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},St=xt,Rm=function(e,n){n=n||{};var r={};function i(f,p){return St.isPlainObject(f)&&St.isPlainObject(p)?St.merge(f,p):St.isPlainObject(p)?St.merge({},p):St.isArray(p)?p.slice():p}function s(f){if(St.isUndefined(n[f])){if(!St.isUndefined(e[f]))return i(void 0,e[f])}else return i(e[f],n[f])}function o(f){if(!St.isUndefined(n[f]))return i(void 0,n[f])}function l(f){if(St.isUndefined(n[f])){if(!St.isUndefined(e[f]))return i(void 0,e[f])}else return i(void 0,n[f])}function u(f){if(f in n)return i(e[f],n[f]);if(f in e)return i(void 0,e[f])}var d={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u};return St.forEach(Object.keys(e).concat(Object.keys(n)),function(p){var v=d[p]||s,m=v(p);St.isUndefined(m)&&v!==u||(r[p]=m)}),r},Lm={version:"0.24.0"},VT=Lm.version,uu={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){uu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var Cf={};uu.transitional=function(e,n,r){function i(s,o){return"[Axios v"+VT+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return function(s,o,l){if(e===!1)throw new Error(i(o," has been removed"+(n?" in "+n:"")));return n&&!Cf[o]&&(Cf[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,l):!0}};function jT(t,e,n){if(typeof t!="object")throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],o=e[s];if(o){var l=t[s],u=l===void 0||o(l,s,t);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(n!==!0)throw Error("Unknown option "+s)}}var WT={assertOptions:jT,validators:uu},$m=xt,qT=Pm,Sf=lT,Af=FT,Sa=Rm,Bm=WT,ii=Bm.validators;function Ws(t){this.defaults=t,this.interceptors={request:new Sf,response:new Sf}}Ws.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Sa(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;n!==void 0&&Bm.assertOptions(n,{silentJSONParsing:ii.transitional(ii.boolean),forcedJSONParsing:ii.transitional(ii.boolean),clarifyTimeoutError:ii.transitional(ii.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(e)===!1||(i=i&&v.synchronous,r.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var o;if(!i){var l=[Af,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(s),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var u=e;r.length;){var d=r.shift(),f=r.shift();try{u=d(u)}catch(p){f(p);break}}try{o=Af(u)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Ws.prototype.getUri=function(e){return e=Sa(this.defaults,e),qT(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};$m.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(n,r){return this.request(Sa(r||{},{method:e,url:n,data:(r||{}).data}))}});$m.forEach(["post","put","patch"],function(e){Ws.prototype[e]=function(n,r,i){return this.request(Sa(i||{},{method:e,url:n,data:r}))}});var YT=Ws,KT=Ea;function Ii(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var n=this;this.promise.then(function(r){if(!!n._listeners){var i,s=n._listeners.length;for(i=0;i>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},tC=function(t){const e=[];let n=0,r=0;for(;n191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],l=t[n++],u=((i&7)<<18|(s&63)<<12|(o&63)<<6|l&63)-65536;e[r++]=String.fromCharCode(55296+(u>>10)),e[r++]=String.fromCharCode(56320+(u&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},nC={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i>2,p=(s&3)<<4|l>>4;let v=(l&15)<<2|d>>6,m=d&63;u||(m=64,o||(v=64)),r.push(n[f],n[p],n[v],n[m])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(eC(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):tC(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i>4;if(r.push(v),d!==64){const m=l<<4&240|d>>2;if(r.push(m),p!==64){const S=d<<6&192|p;r.push(S)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},rC=function(t){try{return nC.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
+ * @license
+ * Copyright 2017 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class iC{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/**
+ * @license
+ * Copyright 2017 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function pt(){return typeof navigator!="undefined"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function sC(){return typeof window!="undefined"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pt())}function oC(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function aC(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function lC(){const t=pt();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}/**
+ * @license
+ * Copyright 2017 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const cC="FirebaseError";class Vi extends Error{constructor(e,n,r){super(n);this.code=e,this.customData=r,this.name=cC,Object.setPrototypeOf(this,Vi.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,qs.prototype.create)}}class qs{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?uC(s,r):"Error",l=`${this.serviceName}: ${o} (${i}).`;return new Vi(i,l,r)}}function uC(t,e){return t.replace(dC,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const dC=/\{\$([^}]+)}/g;function fC(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Yo(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(If(s)&&If(o)){if(!Yo(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function If(t){return t!==null&&typeof t=="object"}/**
+ * @license
+ * Copyright 2017 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Ys(t){const e=[];for(const[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function ds(t){const e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function fs(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function hC(t,e){const n=new pC(t,e);return n.subscribe.bind(n)}class pC{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");mC(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=ml),i.error===void 0&&(i.error=ml),i.complete===void 0&&(i.complete=ml);const s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console!="undefined"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function mC(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function ml(){}/**
+ * @license
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Yr(t){return t&&t._delegate?t._delegate:t}class Bs{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const vr="[DEFAULT]";/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class gC{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new iC;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(yC(e))try{this.getOrInitializeService({instanceIdentifier:vr})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=vr){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=vr){return this.instances.has(e)}getOptions(e=vr){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(s);r===l&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(!!r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:vC(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=vr){return this.component?this.component.multipleInstances?e:vr:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function vC(t){return t===vr?void 0:t}function yC(t){return t.instantiationMode==="EAGER"}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class _C{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new gC(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
+ * @license
+ * Copyright 2017 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */var Ge;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Ge||(Ge={}));const bC={debug:Ge.DEBUG,verbose:Ge.VERBOSE,info:Ge.INFO,warn:Ge.WARN,error:Ge.ERROR,silent:Ge.SILENT},wC=Ge.INFO,EC={[Ge.DEBUG]:"log",[Ge.VERBOSE]:"log",[Ge.INFO]:"info",[Ge.WARN]:"warn",[Ge.ERROR]:"error"},TC=(t,e,...n)=>{if(e{if(SC(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function SC(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const mc="@firebase/app",kf="0.7.13";/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const du=new Hm("@firebase/app"),AC="@firebase/app-compat",OC="@firebase/analytics-compat",IC="@firebase/analytics",kC="@firebase/app-check-compat",DC="@firebase/app-check",PC="@firebase/auth",NC="@firebase/auth-compat",xC="@firebase/database",MC="@firebase/database-compat",RC="@firebase/functions",LC="@firebase/functions-compat",$C="@firebase/installations",BC="@firebase/installations-compat",UC="@firebase/messaging",HC="@firebase/messaging-compat",FC="@firebase/performance",VC="@firebase/performance-compat",jC="@firebase/remote-config",WC="@firebase/remote-config-compat",qC="@firebase/storage",YC="@firebase/storage-compat",KC="@firebase/firestore",zC="@firebase/firestore-compat",GC="firebase",XC="9.6.3";/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const Fm="[DEFAULT]",JC={[mc]:"fire-core",[AC]:"fire-core-compat",[IC]:"fire-analytics",[OC]:"fire-analytics-compat",[DC]:"fire-app-check",[kC]:"fire-app-check-compat",[PC]:"fire-auth",[NC]:"fire-auth-compat",[xC]:"fire-rtdb",[MC]:"fire-rtdb-compat",[RC]:"fire-fn",[LC]:"fire-fn-compat",[$C]:"fire-iid",[BC]:"fire-iid-compat",[UC]:"fire-fcm",[HC]:"fire-fcm-compat",[FC]:"fire-perf",[VC]:"fire-perf-compat",[jC]:"fire-rc",[WC]:"fire-rc-compat",[qC]:"fire-gcs",[YC]:"fire-gcs-compat",[KC]:"fire-fst",[zC]:"fire-fst-compat","fire-js":"fire-js",[GC]:"fire-js-all"};/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const Ko=new Map,gc=new Map;function QC(t,e){try{t.container.addComponent(e)}catch(n){du.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function zo(t){const e=t.name;if(gc.has(e))return du.debug(`There were multiple attempts to register component ${e}.`),!1;gc.set(e,t);for(const n of Ko.values())QC(n,t);return!0}function Vm(t,e){return t.container.getProvider(e)}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const ZC={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function."},Go=new qs("app","Firebase",ZC);/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class eS{constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Bs("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Go.create("app-deleted",{appName:this._name})}}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const Aa=XC;function Ix(t,e={}){typeof e!="object"&&(e={name:e});const n=Object.assign({name:Fm,automaticDataCollectionEnabled:!1},e),r=n.name;if(typeof r!="string"||!r)throw Go.create("bad-app-name",{appName:String(r)});const i=Ko.get(r);if(i){if(Yo(t,i.options)&&Yo(n,i.config))return i;throw Go.create("duplicate-app",{appName:r})}const s=new _C(r);for(const l of gc.values())s.addComponent(l);const o=new eS(t,n,s);return Ko.set(r,o),o}function tS(t=Fm){const e=Ko.get(t);if(!e)throw Go.create("no-app",{appName:t});return e}function vi(t,e,n){var r;let i=(r=JC[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const l=[`Unable to register library "${i}" with version "${e}":`];s&&l.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),du.warn(l.join(" "));return}zo(new Bs(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function nS(t){zo(new Bs("platform-logger",e=>new CC(e),"PRIVATE")),vi(mc,kf,t),vi(mc,kf,"esm2017"),vi("fire-js","")}nS("");/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */function fu(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie,"Short delay should be less than long delay!"),this.isMobile=sC()||aC()}get(){return lS()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function pu(t,e){In(t.emulator,"Emulator should always be set here");const{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class qm{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self!="undefined"&&"fetch"in self)return self.fetch;Tn("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self!="undefined"&&"Headers"in self)return self.Headers;Tn("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self!="undefined"&&"Response"in self)return self.Response;Tn("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const uS={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error"};/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const dS=new Ks(3e4,6e4);function Oa(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function zs(t,e,n,r,i={}){return Ym(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});const l=Ys(Object.assign({key:t.config.apiKey},o)).slice(1),u=await t._getAdditionalHeaders();return u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode),qm.fetch()(Km(t,t.config.apiHost,n,l),Object.assign({method:e,headers:u,referrerPolicy:"no-referrer"},s))})}async function Ym(t,e,n){t._canInitEmulator=!1;const r=Object.assign(Object.assign({},uS),e);try{const i=new fS(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const o=await s.json();if("needConfirmation"in o)throw gl(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{const l=s.ok?o.errorMessage:o.error.message,[u,d]=l.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw gl(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw gl(t,"email-already-in-use",o);const f=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(d)throw iS(t,f,d);zt(t,f)}}catch(i){if(i instanceof Vi)throw i;zt(t,"network-request-failed")}}async function Ia(t,e,n,r,i={}){const s=await zs(t,e,n,r,i);return"mfaPendingCredential"in s&&zt(t,"multi-factor-auth-required",{_serverResponse:s}),s}function Km(t,e,n,r){const i=`${e}${n}?${r}`;return t.config.emulator?pu(t.config,i):`${t.config.apiScheme}://${i}`}class fS{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(fn(this.auth,"timeout")),dS.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function gl(t,e,n){const r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=fn(t,e,r);return i.customData._tokenResponse=n,i}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function hS(t,e){return zs(t,"POST","/v1/accounts:delete",e)}async function pS(t,e){return zs(t,"POST","/v1/accounts:lookup",e)}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function ws(t){if(!!t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function mS(t,e=!1){const n=Yr(t),r=await n.getIdToken(e),i=mu(r);Ee(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const s=typeof i.firebase=="object"?i.firebase:void 0,o=s==null?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:ws(vl(i.auth_time)),issuedAtTime:ws(vl(i.iat)),expirationTime:ws(vl(i.exp)),signInProvider:o||null,signInSecondFactor:(s==null?void 0:s.sign_in_second_factor)||null}}function vl(t){return Number(t)*1e3}function mu(t){const[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return ko("JWT malformed, contained fewer than 3 sections"),null;try{const i=rC(n);return i?JSON.parse(i):(ko("Failed to decode base64 JWT payload"),null)}catch(i){return ko("Caught error parsing JWT payload as JSON",i),null}}function gS(t){const e=mu(t);return Ee(e,"internal-error"),Ee(typeof e.exp!="undefined","internal-error"),Ee(typeof e.iat!="undefined","internal-error"),Number(e.exp)-Number(e.iat)}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function Us(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof Vi&&vS(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function vS({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class yS{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){!this.isRunning||(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var n;if(e){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class zm{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=ws(this.lastLoginAt),this.creationTime=ws(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function Xo(t){var e;const n=t.auth,r=await t.getIdToken(),i=await Us(t,pS(n,{idToken:r}));Ee(i==null?void 0:i.users.length,n,"internal-error");const s=i.users[0];t._notifyReloadListener(s);const o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?wS(s.providerUserInfo):[],l=bS(t.providerData,o),u=t.isAnonymous,d=!(t.email&&s.passwordHash)&&!(l!=null&&l.length),f=u?d:!1,p={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new zm(s.createdAt,s.lastLoginAt),isAnonymous:f};Object.assign(t,p)}async function _S(t){const e=Yr(t);await Xo(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function bS(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function wS(t){return t.map(e=>{var{providerId:n}=e,r=fu(e,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function ES(t,e){const n=await Ym(t,{},async()=>{const r=Ys({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=Km(t,i,"/v1/token",`key=${s}`),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",qm.fetch()(o,{method:"POST",headers:l,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Hs{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ee(e.idToken,"internal-error"),Ee(typeof e.idToken!="undefined","internal-error"),Ee(typeof e.refreshToken!="undefined","internal-error");const n="expiresIn"in e&&typeof e.expiresIn!="undefined"?Number(e.expiresIn):gS(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}async getToken(e,n=!1){return Ee(!this.accessToken||this.refreshToken,e,"user-token-expired"),!n&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){const{accessToken:r,refreshToken:i,expiresIn:s}=await ES(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){const{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new Hs;return r&&(Ee(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(Ee(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(Ee(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Hs,this.toJSON())}_performRefresh(){return Tn("not implemented")}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Ln(t,e){Ee(typeof t=="string"||typeof t=="undefined","internal-error",{appName:e})}class Pr{constructor(e){var{uid:n,auth:r,stsTokenManager:i}=e,s=fu(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.emailVerified=!1,this.isAnonymous=!1,this.tenantId=null,this.providerData=[],this.proactiveRefresh=new yS(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.metadata=new zm(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(e){const n=await Us(this,this.stsTokenManager.getToken(this.auth,e));return Ee(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return mS(this,e)}reload(){return _S(this)}_assign(e){this!==e&&(Ee(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(n=>Object.assign({},n)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new Pr(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){Ee(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await Xo(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Us(this,hS(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,n){var r,i,s,o,l,u,d,f;const p=(r=n.displayName)!==null&&r!==void 0?r:void 0,v=(i=n.email)!==null&&i!==void 0?i:void 0,m=(s=n.phoneNumber)!==null&&s!==void 0?s:void 0,S=(o=n.photoURL)!==null&&o!==void 0?o:void 0,T=(l=n.tenantId)!==null&&l!==void 0?l:void 0,A=(u=n._redirectEventId)!==null&&u!==void 0?u:void 0,O=(d=n.createdAt)!==null&&d!==void 0?d:void 0,k=(f=n.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:C,emailVerified:D,isAnonymous:B,providerData:j,stsTokenManager:b}=n;Ee(C&&b,e,"internal-error");const x=Hs.fromJSON(this.name,b);Ee(typeof C=="string",e,"internal-error"),Ln(p,e.name),Ln(v,e.name),Ee(typeof D=="boolean",e,"internal-error"),Ee(typeof B=="boolean",e,"internal-error"),Ln(m,e.name),Ln(S,e.name),Ln(T,e.name),Ln(A,e.name),Ln(O,e.name),Ln(k,e.name);const R=new Pr({uid:C,auth:e,email:v,emailVerified:D,displayName:p,isAnonymous:B,photoURL:S,phoneNumber:m,tenantId:T,stsTokenManager:x,createdAt:O,lastLoginAt:k});return j&&Array.isArray(j)&&(R.providerData=j.map(H=>Object.assign({},H))),A&&(R._redirectEventId=A),R}static async _fromIdTokenResponse(e,n,r=!1){const i=new Hs;i.updateFromServerResponse(n);const s=new Pr({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await Xo(s),s}}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Gm{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){const n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}}Gm.type="NONE";const xf=Gm;/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Do(t,e,n){return`firebase:${t}:${e}:${n}`}class yi{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;const{config:i,name:s}=this.auth;this.fullUserKey=Do(this.userKey,i.apiKey,s),this.fullPersistenceKey=Do("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Pr._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new yi(Cn(xf),e,r);const i=(await Promise.all(n.map(async d=>{if(await d._isAvailable())return d}))).filter(d=>d);let s=i[0]||Cn(xf);const o=Do(r,e.config.apiKey,e.name);let l=null;for(const d of n)try{const f=await d._get(o);if(f){const p=Pr._fromJSON(e,f);d!==s&&(l=p),s=d;break}}catch{}const u=i.filter(d=>d._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new yi(s,e,r):(s=u[0],l&&await s._set(o,l.toJSON()),await Promise.all(n.map(async d=>{if(d!==s)try{await d._remove(o)}catch{}})),new yi(s,e,r))}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Mf(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Qm(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Xm(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(eg(e))return"Blackberry";if(tg(e))return"Webos";if(gu(e))return"Safari";if((e.includes("chrome/")||Jm(e))&&!e.includes("edge/"))return"Chrome";if(Zm(e))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Xm(t=pt()){return/firefox\//i.test(t)}function gu(t=pt()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Jm(t=pt()){return/crios\//i.test(t)}function Qm(t=pt()){return/iemobile/i.test(t)}function Zm(t=pt()){return/android/i.test(t)}function eg(t=pt()){return/blackberry/i.test(t)}function tg(t=pt()){return/webos/i.test(t)}function ka(t=pt()){return/iphone|ipad|ipod/i.test(t)}function TS(t=pt()){var e;return ka(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function CS(){return lC()&&document.documentMode===10}function ng(t=pt()){return ka(t)||Zm(t)||tg(t)||eg(t)||/windows phone/i.test(t)||Qm(t)}function SS(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function rg(t,e=[]){let n;switch(t){case"Browser":n=Mf(pt());break;case"Worker":n=`${Mf(pt())}-${t}`;break;default:n=t}const r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${Aa}/${r}`}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class AS{constructor(e,n){this.app=e,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Rf(this),this.idTokenSubscription=new Rf(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Wm,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=Cn(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await yi.create(this,e),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e)}}async initializeCurrentUser(e){var n;let r=await this.assertedPersistence.getCurrentUser();if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const i=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=r==null?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);(!i||i===s)&&(o==null?void 0:o.user)&&(r=o.user)}return r?r._redirectEventId?(Ee(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)):this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}async tryRedirectSignIn(e){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await Xo(e)}catch(n){if(n.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=cS()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const n=e?Yr(e):null;return n&&Ee(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e){if(!this._deleted)return e&&Ee(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Cn(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new qs("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,n){const r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const n=e&&Cn(e)||this._popupRedirectResolver;Ee(n,this,"argument-error"),this.redirectPersistenceManager=await yi.create(this,[Cn(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===e?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,n,r,i){if(this._deleted)return()=>{};const s=typeof n=="function"?n:n.next.bind(n),o=this._isInitialized?Promise.resolve():this._initializationPromise;return Ee(o,this,"internal-error"),o.then(()=>s(this.currentUser)),typeof n=="function"?e.addObserver(n,r,i):e.addObserver(n)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&(this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh()),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ee(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=rg(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const e={["X-Client-Version"]:this.clientVersion};return this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId),e}}function vu(t){return Yr(t)}class Rf{constructor(e){this.auth=e,this.observer=null,this.addObserver=hC(n=>this.observer=n)}get next(){return Ee(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class yu{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return Tn("not implemented")}_getIdTokenResponse(e){return Tn("not implemented")}_linkToIdToken(e,n){return Tn("not implemented")}_getReauthenticationResolver(e){return Tn("not implemented")}}async function OS(t,e){return zs(t,"POST","/v1/accounts:update",e)}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function IS(t,e){return Ia(t,"POST","/v1/accounts:signInWithPassword",Oa(t,e))}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function kS(t,e){return Ia(t,"POST","/v1/accounts:signInWithEmailLink",Oa(t,e))}async function DS(t,e){return Ia(t,"POST","/v1/accounts:signInWithEmailLink",Oa(t,e))}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Fs extends yu{constructor(e,n,r,i=null){super("password",r);this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new Fs(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new Fs(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e;if((n==null?void 0:n.email)&&(n==null?void 0:n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return IS(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return kS(e,{email:this._email,oobCode:this._password});default:zt(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":return OS(e,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return DS(e,{idToken:n,email:this._email,oobCode:this._password});default:zt(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function _i(t,e){return Ia(t,"POST","/v1/accounts:signInWithIdp",Oa(t,e))}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const PS="http://localhost";class $r extends yu{constructor(){super(...arguments);this.pendingToken=null}static _fromParams(e){const n=new $r(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):zt("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i}=n,s=fu(n,["providerId","signInMethod"]);if(!r||!i)return null;const o=new $r(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){const n=this.buildRequest();return _i(e,n)}_linkToIdToken(e,n){const r=this.buildRequest();return r.idToken=n,_i(e,r)}_getReauthenticationResolver(e){const n=this.buildRequest();return n.autoCreate=!1,_i(e,n)}buildRequest(){const e={requestUri:PS,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=Ys(n)}return e}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function NS(t){switch(t){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function xS(t){const e=ds(fs(t)).link,n=e?ds(fs(e)).deep_link_id:null,r=ds(fs(t)).deep_link_id;return(r?ds(fs(r)).link:null)||r||n||e||t}class _u{constructor(e){var n,r,i,s,o,l;const u=ds(fs(e)),d=(n=u.apiKey)!==null&&n!==void 0?n:null,f=(r=u.oobCode)!==null&&r!==void 0?r:null,p=NS((i=u.mode)!==null&&i!==void 0?i:null);Ee(d&&f&&p,"argument-error"),this.apiKey=d,this.operation=p,this.code=f,this.continueUrl=(s=u.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=u.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(l=u.tenantId)!==null&&l!==void 0?l:null}static parseLink(e){const n=xS(e);try{return new _u(n)}catch{return null}}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class ji{constructor(){this.providerId=ji.PROVIDER_ID}static credential(e,n){return Fs._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){const r=_u.parseLink(n);return Ee(r,"argument-error"),Fs._fromEmailAndCode(e,r.code,r.tenantId)}}ji.PROVIDER_ID="password";ji.EMAIL_PASSWORD_SIGN_IN_METHOD="password";ji.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class ig{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Gs extends ig{constructor(){super(...arguments);this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Yn extends Gs{constructor(){super("facebook.com")}static credential(e){return $r._fromParams({providerId:Yn.PROVIDER_ID,signInMethod:Yn.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Yn.credentialFromTaggedObject(e)}static credentialFromError(e){return Yn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Yn.credential(e.oauthAccessToken)}catch{return null}}}Yn.FACEBOOK_SIGN_IN_METHOD="facebook.com";Yn.PROVIDER_ID="facebook.com";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Kn extends Gs{constructor(){super("google.com");this.addScope("profile")}static credential(e,n){return $r._fromParams({providerId:Kn.PROVIDER_ID,signInMethod:Kn.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return Kn.credentialFromTaggedObject(e)}static credentialFromError(e){return Kn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return Kn.credential(n,r)}catch{return null}}}Kn.GOOGLE_SIGN_IN_METHOD="google.com";Kn.PROVIDER_ID="google.com";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class zn extends Gs{constructor(){super("github.com")}static credential(e){return $r._fromParams({providerId:zn.PROVIDER_ID,signInMethod:zn.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return zn.credentialFromTaggedObject(e)}static credentialFromError(e){return zn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return zn.credential(e.oauthAccessToken)}catch{return null}}}zn.GITHUB_SIGN_IN_METHOD="github.com";zn.PROVIDER_ID="github.com";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Gn extends Gs{constructor(){super("twitter.com")}static credential(e,n){return $r._fromParams({providerId:Gn.PROVIDER_ID,signInMethod:Gn.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return Gn.credentialFromTaggedObject(e)}static credentialFromError(e){return Gn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return Gn.credential(n,r)}catch{return null}}}Gn.TWITTER_SIGN_IN_METHOD="twitter.com";Gn.PROVIDER_ID="twitter.com";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class ki{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){const s=await Pr._fromIdTokenResponse(e,r,i),o=Lf(r);return new ki({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);const i=Lf(r);return new ki({user:e,providerId:i,_tokenResponse:r,operationType:n})}}function Lf(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Jo extends Vi{constructor(e,n,r,i){var s;super(n.code,n.message);this.operationType=r,this.user=i,Object.setPrototypeOf(this,Jo.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new Jo(e,n,r,i)}}function sg(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Jo._fromErrorAndOperation(t,s,e,r):s})}async function MS(t,e,n=!1){const r=await Us(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return ki._forOperation(t,"link",r)}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function RS(t,e,n=!1){const{auth:r}=t,i="reauthenticate";try{const s=await Us(t,sg(r,i,e,t),n);Ee(s.idToken,r,"internal-error");const o=mu(s.idToken);Ee(o,r,"internal-error");const{sub:l}=o;return Ee(t.uid===l,r,"user-mismatch"),ki._forOperation(t,i,s)}catch(s){throw(s==null?void 0:s.code)==="auth/user-not-found"&&zt(r,"user-mismatch"),s}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function og(t,e,n=!1){const r="signIn",i=await sg(t,r,e),s=await ki._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}async function LS(t,e){return og(vu(t),e)}function kx(t,e,n){return LS(Yr(t),ji.credential(e,n))}function Dx(t,e,n,r){return Yr(t).onAuthStateChanged(e,n,r)}function Px(t){return Yr(t).signOut()}const Qo="__sak";/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class ag{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(Qo,"1"),this.storage.removeItem(Qo),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){const n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function $S(){const t=pt();return gu(t)||ka(t)}const BS=1e3,US=10;class lg extends ag{constructor(){super(()=>window.localStorage,"LOCAL");this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=$S()&&SS(),this.fallbackToPolling=ng(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,l,u)=>{this.notifyListeners(o,u)});return}const r=e.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(r);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(r,e.newValue):this.storage.removeItem(r);else if(this.localCache[r]===e.newValue&&!n)return}const i=()=>{const o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);CS()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,US):i()}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},BS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){const n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}}lg.type="LOCAL";const HS=lg;/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class cg extends ag{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}}cg.type="SESSION";const ug=cg;/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function FS(t){return Promise.all(t.map(async e=>{try{const n=await e;return{fulfilled:!0,value:n}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class Da{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;const r=new Da(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const l=Array.from(o).map(async d=>d(n.origin,s)),u=await FS(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Da.receivers=[];/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function bu(t="",e=10){let n="";for(let r=0;r{const d=bu("",20);i.port1.start();const f=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(p){const v=p;if(v.data.eventId===d)switch(v.data.status){case"ack":clearTimeout(f),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),l(v.data.response);break;default:clearTimeout(f),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:d,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function hn(){return window}function jS(t){hn().location.href=t}/**
+ * @license
+ * Copyright 2020 Google LLC.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function dg(){return typeof hn().WorkerGlobalScope!="undefined"&&typeof hn().importScripts=="function"}async function WS(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function qS(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function YS(){return dg()?self:null}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const fg="firebaseLocalStorageDb",KS=1,Zo="firebaseLocalStorage",hg="fbase_key";class Xs{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Pa(t,e){return t.transaction([Zo],e?"readwrite":"readonly").objectStore(Zo)}function zS(){const t=indexedDB.deleteDatabase(fg);return new Xs(t).toPromise()}function yc(){const t=indexedDB.open(fg,KS);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{const r=t.result;try{r.createObjectStore(Zo,{keyPath:hg})}catch(i){n(i)}}),t.addEventListener("success",async()=>{const r=t.result;r.objectStoreNames.contains(Zo)?e(r):(r.close(),await zS(),e(await yc()))})})}async function $f(t,e,n){const r=Pa(t,!0).put({[hg]:e,value:n});return new Xs(r).toPromise()}async function GS(t,e){const n=Pa(t,!1).get(e),r=await new Xs(n).toPromise();return r===void 0?null:r.value}function Bf(t,e){const n=Pa(t,!0).delete(e);return new Xs(n).toPromise()}const XS=800,JS=3;class pg{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await yc(),this.db)}async _withRetries(e){let n=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(n++>JS)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return dg()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Da._getInstance(YS()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){var e,n;if(this.activeServiceWorker=await WS(),!this.activeServiceWorker)return;this.sender=new VS(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);!r||((e=r[0])===null||e===void 0?void 0:e.fulfilled)&&((n=r[0])===null||n===void 0?void 0:n.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||qS()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await yc();return await $f(e,Qo,"1"),await Bf(e,Qo),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>$f(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){const n=await this._withRetries(r=>GS(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Bf(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Pa(i,!1).getAll();return new Xs(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),XS)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}pg.type="LOCAL";const QS=pg;/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function ZS(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}function eA(t){return new Promise((e,n)=>{const r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{const s=fn("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",ZS().appendChild(r)})}function tA(t){return`__${t}${Math.floor(Math.random()*1e6)}`}new Ks(3e4,6e4);/**
+ * @license
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function nA(t,e){return e?Cn(e):(Ee(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/**
+ * @license
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class wu extends yu{constructor(e){super("custom","custom");this.params=e}_getIdTokenResponse(e){return _i(e,this._buildIdpRequest())}_linkToIdToken(e,n){return _i(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return _i(e,this._buildIdpRequest())}_buildIdpRequest(e){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(n.idToken=e),n}}function rA(t){return og(t.auth,new wu(t),t.bypassAuthState)}function iA(t){const{auth:e,user:n}=t;return Ee(n,e,"internal-error"),RS(n,new wu(t),t.bypassAuthState)}async function sA(t){const{auth:e,user:n}=t;return Ee(n,e,"internal-error"),MS(n,new wu(t),t.bypassAuthState)}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class mg{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){const{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:l}=e;if(o){this.reject(o);return}const u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(u))}catch(d){this.reject(d)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return rA;case"linkViaPopup":case"linkViaRedirect":return sA;case"reauthViaPopup":case"reauthViaRedirect":return iA;default:zt(this.auth,"internal-error")}}resolve(e){In(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){In(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const oA=new Ks(2e3,1e4);class hi extends mg{constructor(e,n,r,i,s){super(e,n,i,s);this.provider=r,this.authWindow=null,this.pollId=null,hi.currentPopupAction&&hi.currentPopupAction.cancel(),hi.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ee(e,this.auth,"internal-error"),e}async onExecution(){In(this.filter.length===1,"Popup operations only handle one event");const e=bu();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(fn(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(fn(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,hi.currentPopupAction=null}pollUserCancellation(){const e=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(fn(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,oA.get())};e()}}hi.currentPopupAction=null;/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const aA="pendingRedirect",yl=new Map;class lA extends mg{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r);this.eventId=null}async execute(){let e=yl.get(this.auth._key());if(!e){try{const r=await cA(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}yl.set(this.auth._key(),e)}return this.bypassAuthState||yl.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function cA(t,e){const n=dA(e),r=uA(t);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function uA(t){return Cn(t._redirectPersistence)}function dA(t){return Do(aA,t.config.apiKey,t.name)}async function fA(t,e,n=!1){const r=vu(t),i=nA(r,e),o=await new lA(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const hA=10*60*1e3;class pA{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!mA(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){var r;if(e.error&&!gg(e)){const i=((r=e.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(fn(this.auth,i))}else n.onAuthEvent(e)}isEventForConsumer(e,n){const r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=hA&&this.cachedEventUids.clear(),this.cachedEventUids.has(Uf(e))}saveEventToCache(e){this.cachedEventUids.add(Uf(e)),this.lastProcessedEventTime=Date.now()}}function Uf(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function gg({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function mA(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return gg(t);default:return!1}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */async function gA(t,e={}){return zs(t,"GET","/v1/projects",e)}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const vA=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,yA=/^https?/;async function _A(t){if(t.config.emulator)return;const{authorizedDomains:e}=await gA(t);for(const n of e)try{if(bA(n))return}catch{}zt(t,"unauthorized-domain")}function bA(t){const e=vc(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){const o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!yA.test(n))return!1;if(vA.test(t))return r===t;const i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
+ * @license
+ * Copyright 2020 Google LLC.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const wA=new Ks(3e4,6e4);function Hf(){const t=hn().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n{var r,i,s;function o(){Hf(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Hf(),n(fn(t,"network-request-failed"))},timeout:wA.get()})}if(!((i=(r=hn().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((s=hn().gapi)===null||s===void 0)&&s.load)o();else{const l=tA("iframefcb");return hn()[l]=()=>{gapi.load?o():n(fn(t,"network-request-failed"))},eA(`https://apis.google.com/js/api.js?onload=${l}`).catch(u=>n(u))}}).catch(e=>{throw Po=null,e})}let Po=null;function TA(t){return Po=Po||EA(t),Po}/**
+ * @license
+ * Copyright 2020 Google LLC.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const CA=new Ks(5e3,15e3),SA="__/auth/iframe",AA="emulator/auth/iframe",OA={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},IA=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function kA(t){const e=t.config;Ee(e.authDomain,t,"auth-domain-config-required");const n=e.emulator?pu(e,AA):`https://${t.config.authDomain}/${SA}`,r={apiKey:e.apiKey,appName:t.name,v:Aa},i=IA.get(t.config.apiHost);i&&(r.eid=i);const s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${Ys(r).slice(1)}`}async function DA(t){const e=await TA(t),n=hn().gapi;return Ee(n,t,"internal-error"),e.open({where:document.body,url:kA(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:OA,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});const o=fn(t,"network-request-failed"),l=hn().setTimeout(()=>{s(o)},CA.get());function u(){hn().clearTimeout(l),i(r)}r.ping(u).then(u,()=>{s(o)})}))}/**
+ * @license
+ * Copyright 2020 Google LLC.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const PA={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},NA=500,xA=600,MA="_blank",RA="http://localhost";class Ff{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function LA(t,e,n,r=NA,i=xA){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const u=Object.assign(Object.assign({},PA),{width:r.toString(),height:i.toString(),top:s,left:o}),d=pt().toLowerCase();n&&(l=Jm(d)?MA:n),Xm(d)&&(e=e||RA,u.scrollbars="yes");const f=Object.entries(u).reduce((v,[m,S])=>`${v}${m}=${S},`,"");if(TS(d)&&l!=="_self")return $A(e||"",l),new Ff(null);const p=window.open(e||"",l,f);Ee(p,t,"popup-blocked");try{p.focus()}catch{}return new Ff(p)}function $A(t,e){const n=document.createElement("a");n.href=t,n.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
+ * @license
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const BA="__/auth/handler",UA="emulator/auth/handler";function Vf(t,e,n,r,i,s){Ee(t.config.authDomain,t,"auth-domain-config-required"),Ee(t.config.apiKey,t,"invalid-api-key");const o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:Aa,eventId:i};if(e instanceof ig){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",fC(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[u,d]of Object.entries(s||{}))o[u]=d}if(e instanceof Gs){const u=e.getScopes().filter(d=>d!=="");u.length>0&&(o.scopes=u.join(","))}t.tenantId&&(o.tid=t.tenantId);const l=o;for(const u of Object.keys(l))l[u]===void 0&&delete l[u];return`${HA(t)}?${Ys(l).slice(1)}`}function HA({config:t}){return t.emulator?pu(t,UA):`https://${t.authDomain}/${BA}`}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */const _l="webStorageSupport";class FA{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=ug,this._completeRedirectFn=fA}async _openPopup(e,n,r,i){var s;In((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=Vf(e,n,r,vc(),i);return LA(e,o,bu())}async _openRedirect(e,n,r,i){return await this._originValidation(e),jS(Vf(e,n,r,vc(),i)),new Promise(()=>{})}_initialize(e){const n=e._key();if(this.eventManagers[n]){const{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(In(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){const n=await DA(e),r=new pA(e);return n.register("authEvent",i=>(Ee(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(_l,{type:_l},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[_l];o!==void 0&&n(!!o),zt(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=_A(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return ng()||gu()||ka()}}const VA=FA;var jf="@firebase/auth",Wf="0.19.5";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */class jA{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const n=this.auth.onIdTokenChanged(r=>{var i;e(((i=r)===null||i===void 0?void 0:i.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const n=this.internalListeners.get(e);!n||(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){Ee(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function WA(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function qA(t){zo(new Bs("auth",(e,{options:n})=>{const r=e.getProvider("app").getImmediate(),{apiKey:i,authDomain:s}=r.options;return(o=>{Ee(i&&!i.includes(":"),"invalid-api-key",{appName:o.name}),Ee(!(s!=null&&s.includes(":")),"argument-error",{appName:o.name});const l={apiKey:i,authDomain:s,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:rg(t)},u=new AS(o,l);return oS(u,n),u})(r)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),zo(new Bs("auth-internal",e=>{const n=vu(e.getProvider("auth").getImmediate());return(r=>new jA(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),vi(jf,Wf,WA(t)),vi(jf,Wf,"esm2017")}/**
+ * @license
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */function Nx(t=tS()){const e=Vm(t,"auth");return e.isInitialized()?e.getImmediate():sS(t,{popupRedirectResolver:VA,persistence:[QS,HS,ug]})}qA("Browser");var YA="firebase",KA="9.6.3";/**
+ * @license
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */vi(YA,KA,"app");function me(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function _e(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function Ae(t){_e(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function Nr(t,e){_e(2,arguments);var n=Ae(t),r=me(e);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Js(t,e){_e(2,arguments);var n=Ae(t),r=me(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var o=s.getDate();return i>=o?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function zA(t,e){if(_e(2,arguments),!e||typeof e!="object")return new Date(NaN);var n=e.years?me(e.years):0,r=e.months?me(e.months):0,i=e.weeks?me(e.weeks):0,s=e.days?me(e.days):0,o=e.hours?me(e.hours):0,l=e.minutes?me(e.minutes):0,u=e.seconds?me(e.seconds):0,d=Ae(t),f=r||n?Js(d,r+n*12):d,p=s||i?Nr(f,s+i*7):f,v=l+o*60,m=u+v*60,S=m*1e3,T=new Date(p.getTime()+S);return T}function GA(t,e){_e(2,arguments);var n=Ae(t).getTime(),r=me(e);return new Date(n+r)}function vg(t,e){_e(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,s=i==null?0:me(i),o=n.weekStartsOn==null?s:me(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Ae(t),u=l.getDay(),d=(u=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function JA(t){_e(1,arguments);var e=XA(t),n=new Date(0);n.setFullYear(e,0,4),n.setHours(0,0,0,0);var r=ea(n);return r}function yg(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function _g(t){return _e(1,arguments),t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Es(t){if(_e(1,arguments),!_g(t)&&typeof t!="number")return!1;var e=Ae(t);return!isNaN(Number(e))}var QA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZA=function(t,e,n){var r,i=QA[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},eO=ZA;function bl(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var tO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iO={date:bl({formats:tO,defaultWidth:"full"}),time:bl({formats:nO,defaultWidth:"full"}),dateTime:bl({formats:rO,defaultWidth:"full"})},sO=iO,oO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aO=function(t,e,n,r){return oO[t]},lO=aO;function es(t){return function(e,n){var r=n||{},i=r.context?String(r.context):"standalone",s;if(i==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,l=r.width?String(r.width):o;s=t.formattingValues[l]||t.formattingValues[o]}else{var u=t.defaultWidth,d=r.width?String(r.width):t.defaultWidth;s=t.values[d]||t.values[u]}var f=t.argumentCallback?t.argumentCallback(e):e;return s[f]}}var cO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},dO={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"]},fO={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"]},hO={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"}},pO={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"}},mO=function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},gO={ordinalNumber:mO,era:es({values:cO,defaultWidth:"wide"}),quarter:es({values:uO,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:es({values:dO,defaultWidth:"wide"}),day:es({values:fO,defaultWidth:"wide"}),dayPeriod:es({values:hO,defaultWidth:"wide",formattingValues:pO,defaultFormattingWidth:"wide"})},vO=gO;function ts(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;var o=s[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(l)?_O(l,function(p){return p.test(o)}):yO(l,function(p){return p.test(o)}),d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;var f=e.slice(o.length);return{value:d,rest:f}}}function yO(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function _O(t,e){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var i=r[0],s=e.match(t.parsePattern);if(!s)return null;var o=t.valueCallback?t.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;var l=e.slice(i.length);return{value:o,rest:l}}}var wO=/^(\d+)(th|st|nd|rd)?/i,EO=/\d+/i,TO={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},CO={any:[/^b/i,/^(a|c)/i]},SO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},AO={any:[/1/i,/2/i,/3/i,/4/i]},OO={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},IO={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]},kO={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},DO={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]},PO={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},NO={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}},xO={ordinalNumber:bO({matchPattern:wO,parsePattern:EO,valueCallback:function(t){return parseInt(t,10)}}),era:ts({matchPatterns:TO,defaultMatchWidth:"wide",parsePatterns:CO,defaultParseWidth:"any"}),quarter:ts({matchPatterns:SO,defaultMatchWidth:"wide",parsePatterns:AO,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ts({matchPatterns:OO,defaultMatchWidth:"wide",parsePatterns:IO,defaultParseWidth:"any"}),day:ts({matchPatterns:kO,defaultMatchWidth:"wide",parsePatterns:DO,defaultParseWidth:"any"}),dayPeriod:ts({matchPatterns:PO,defaultMatchWidth:"any",parsePatterns:NO,defaultParseWidth:"any"})},MO=xO,RO={code:"en-US",formatDistance:eO,formatLong:sO,formatRelative:lO,localize:vO,match:MO,options:{weekStartsOn:0,firstWeekContainsDate:1}},bg=RO;function wg(t,e){_e(2,arguments);var n=me(e);return GA(t,-n)}var LO=864e5;function $O(t){_e(1,arguments);var e=Ae(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/LO)+1}function Di(t){_e(1,arguments);var e=1,n=Ae(t),r=n.getUTCDay(),i=(r=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function BO(t){_e(1,arguments);var e=Eg(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Di(n);return r}var UO=6048e5;function Tg(t){_e(1,arguments);var e=Ae(t),n=Di(e).getTime()-BO(e).getTime();return Math.round(n/UO)+1}function xr(t,e){_e(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.weekStartsOn,s=i==null?0:me(i),o=n.weekStartsOn==null?s:me(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Ae(t),u=l.getUTCDay(),d=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(r+1,0,u),d.setUTCHours(0,0,0,0);var f=xr(d,e),p=new Date(0);p.setUTCFullYear(r,0,u),p.setUTCHours(0,0,0,0);var v=xr(p,e);return n.getTime()>=f.getTime()?r+1:n.getTime()>=v.getTime()?r:r-1}function HO(t,e){_e(1,arguments);var n=e||{},r=n.locale,i=r&&r.options&&r.options.firstWeekContainsDate,s=i==null?1:me(i),o=n.firstWeekContainsDate==null?s:me(n.firstWeekContainsDate),l=Eu(t,e),u=new Date(0);u.setUTCFullYear(l,0,o),u.setUTCHours(0,0,0,0);var d=xr(u,e);return d}var FO=6048e5;function Cg(t,e){_e(1,arguments);var n=Ae(t),r=xr(n,e).getTime()-HO(n,e).getTime();return Math.round(r/FO)+1}function je(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?n:1-n;return je(e==="yy"?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return e==="M"?String(n+1):je(n+1,2)},d:function(t,e){return je(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,e){return je(t.getUTCHours()%12||12,e.length)},H:function(t,e){return je(t.getUTCHours(),e.length)},m:function(t,e){return je(t.getUTCMinutes(),e.length)},s:function(t,e){return je(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,n-3));return je(i,e.length)}},$n=VO,si={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jO={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $n.y(t,e)},Y:function(t,e,n,r){var i=Eu(t,r),s=i>0?i:1-i;if(e==="YY"){var o=s%100;return je(o,2)}return e==="Yo"?n.ordinalNumber(s,{unit:"year"}):je(s,e.length)},R:function(t,e){var n=Eg(t);return je(n,e.length)},u:function(t,e){var n=t.getUTCFullYear();return je(n,e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return je(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return je(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return $n.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return je(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=Cg(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):je(i,e.length)},I:function(t,e,n){var r=Tg(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):je(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):$n.d(t,e)},D:function(t,e,n){var r=$O(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):je(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":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"})}},e:function(t,e,n,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return je(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return je(s,e.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return je(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r=t.getUTCHours(),i;switch(r===12?i=si.noon:r===0?i=si.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r=t.getUTCHours(),i;switch(r>=17?i=si.evening:r>=12?i=si.afternoon:r>=4?i=si.morning:i=si.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $n.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):$n.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):je(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$n.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):$n.s(t,e)},S:function(t,e){return $n.S(t,e)},X:function(t,e,n,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return Yf(s);case"XXXX":case"XX":return yr(s);case"XXXXX":case"XXX":default:return yr(s,":")}},x:function(t,e,n,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return Yf(s);case"xxxx":case"xx":return yr(s);case"xxxxx":case"xxx":default:return yr(s,":")}},O:function(t,e,n,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+qf(s,":");case"OOOO":default:return"GMT"+yr(s,":")}},z:function(t,e,n,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+qf(s,":");case"zzzz":default:return"GMT"+yr(s,":")}},t:function(t,e,n,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return je(s,e.length)},T:function(t,e,n,r){var i=r._originalDate||t,s=i.getTime();return je(s,e.length)}};function qf(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=r%60;if(s===0)return n+String(i);var o=e||"";return n+String(i)+o+je(s,2)}function Yf(t,e){if(t%60===0){var n=t>0?"-":"+";return n+je(Math.abs(t)/60,2)}return yr(t,e)}function yr(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t),s=je(Math.floor(i/60),2),o=je(i%60,2);return r+s+n+o}var WO=jO;function Kf(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function Sg(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}function qO(t,e){var n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Kf(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Kf(r,e)).replace("{{time}}",Sg(i,e))}var YO={p:Sg,P:qO},Ag=YO,KO=["D","DD"],zO=["YY","YYYY"];function Og(t){return KO.indexOf(t)!==-1}function Ig(t){return zO.indexOf(t)!==-1}function ta(t,e,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var GO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JO=/^'([^]*?)'?$/,QO=/''/g,ZO=/[a-zA-Z]/;function zf(t,e,n){_e(2,arguments);var r=String(e),i=n||{},s=i.locale||bg,o=s.options&&s.options.firstWeekContainsDate,l=o==null?1:me(o),u=i.firstWeekContainsDate==null?l:me(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=s.options&&s.options.weekStartsOn,f=d==null?0:me(d),p=i.weekStartsOn==null?f:me(i.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!s.localize)throw new RangeError("locale must contain localize property");if(!s.formatLong)throw new RangeError("locale must contain formatLong property");var v=Ae(t);if(!Es(v))throw new RangeError("Invalid time value");var m=yg(v),S=wg(v,m),T={firstWeekContainsDate:u,weekStartsOn:p,locale:s,_originalDate:v},A=r.match(XO).map(function(O){var k=O[0];if(k==="p"||k==="P"){var C=Ag[k];return C(O,s.formatLong,T)}return O}).join("").match(GO).map(function(O){if(O==="''")return"'";var k=O[0];if(k==="'")return eI(O);var C=WO[k];if(C)return!i.useAdditionalWeekYearTokens&&Ig(O)&&ta(O,e,t),!i.useAdditionalDayOfYearTokens&&Og(O)&&ta(O,e,t),C(S,O,s.localize,T);if(k.match(ZO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return O}).join("");return A}function eI(t){return t.match(JO)[1].replace(QO,"'")}function tI(t,e){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");e=e||{};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function nI(t){_e(1,arguments);var e=Ae(t),n=e.getDay();return n}function rI(t){_e(1,arguments);var e=Ae(t),n=e.getFullYear(),r=e.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function jt(t){_e(1,arguments);var e=Ae(t),n=e.getHours();return n}var iI=6048e5;function sI(t){_e(1,arguments);var e=Ae(t),n=ea(e).getTime()-JA(e).getTime();return Math.round(n/iI)+1}function Wt(t){_e(1,arguments);var e=Ae(t),n=e.getMinutes();return n}function Ot(t){_e(1,arguments);var e=Ae(t),n=e.getMonth();return n}function Xn(t){_e(1,arguments);var e=Ae(t),n=e.getSeconds();return n}function ln(t){return _e(1,arguments),Ae(t).getFullYear()}function oI(t,e){_e(2,arguments);var n=me(e);return Nr(t,-n)}function kg(t,e){_e(2,arguments);var n=me(e);return Js(t,-n)}function aI(t,e){if(_e(2,arguments),!e||typeof e!="object")return new Date(NaN);var n=e.years?me(e.years):0,r=e.months?me(e.months):0,i=e.weeks?me(e.weeks):0,s=e.days?me(e.days):0,o=e.hours?me(e.hours):0,l=e.minutes?me(e.minutes):0,u=e.seconds?me(e.seconds):0,d=kg(t,r+n*12),f=oI(d,s+i*7),p=l+o*60,v=u+p*60,m=v*1e3,S=new Date(f.getTime()-m);return S}function lI(t,e){_e(2,arguments);var n=Ae(t),r=Ae(e);return n.getTime()>r.getTime()}function cI(t,e){_e(2,arguments);var n=Ae(t),r=Ae(e);return n.getTime()=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Ae(t),d=me(e),f=u.getUTCDay(),p=d%7,v=(p+7)%7,m=(v0,r=n?e:1-e,i;if(r<=50)i=t||100;else{var s=r+50,o=Math.floor(s/100)*100,l=t>=s%100;i=t+o-(l?100:0)}return n?i:1-i}var vI=[31,28,31,30,31,30,31,31,30,31,30,31],yI=[31,29,31,30,31,30,31,31,30,31,30,31];function Jf(t){return t%400===0||t%4===0&&t%100!==0}var _I={G:{priority:140,parse:function(t,e,n,r){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}},set:function(t,e,n,r){return e.era=n,t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,n,r){var i=function(s){return{year:s,isTwoDigitYear:e==="yy"}};switch(e){case"y":return Ze(4,t,i);case"yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return Ze(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n,r){var i=t.getUTCFullYear();if(n.isTwoDigitYear){var s=Xf(n.year,i);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}var o=!("era"in e)||e.era===1?n.year:1-n.year;return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,n,r){var i=function(s){return{year:s,isTwoDigitYear:e==="YY"}};switch(e){case"Y":return Ze(4,t,i);case"Yo":return n.ordinalNumber(t,{unit:"year",valueCallback:i});default:return Ze(e.length,t,i)}},validate:function(t,e,n){return e.isTwoDigitYear||e.year>0},set:function(t,e,n,r){var i=Eu(t,r);if(n.isTwoDigitYear){var s=Xf(n.year,i);return t.setUTCFullYear(s,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),xr(t,r)}var o=!("era"in e)||e.era===1?n.year:1-n.year;return t.setUTCFullYear(o,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),xr(t,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,n,r){return vo(e==="R"?4:e.length,t)},set:function(t,e,n,r){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),Di(i)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,n,r){return vo(e==="u"?4:e.length,t)},set:function(t,e,n,r){return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,n,r){switch(e){case"Q":case"QQ":return Ze(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n,r){return t.setUTCMonth((n-1)*3,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,n,r){switch(e){case"q":case"qq":return Ze(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=1&&e<=4},set:function(t,e,n,r){return t.setUTCMonth((n-1)*3,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,n,r){var i=function(s){return s-1};switch(e){case"M":return Je(nt.month,t,i);case"MM":return Ze(2,t,i);case"Mo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,n,r){var i=function(s){return s-1};switch(e){case"L":return Je(nt.month,t,i);case"LL":return Ze(2,t,i);case"Lo":return n.ordinalNumber(t,{unit:"month",valueCallback:i});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){return t.setUTCMonth(n,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,n,r){switch(e){case"w":return Je(nt.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n,r){return xr(hI(t,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,n,r){switch(e){case"I":return Je(nt.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=53},set:function(t,e,n,r){return Di(fI(t,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,n,r){switch(e){case"d":return Je(nt.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return Ze(e.length,t)}},validate:function(t,e,n){var r=t.getUTCFullYear(),i=Jf(r),s=t.getUTCMonth();return i?e>=1&&e<=yI[s]:e>=1&&e<=vI[s]},set:function(t,e,n,r){return t.setUTCDate(n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,n,r){switch(e){case"D":case"DD":return Je(nt.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return Ze(e.length,t)}},validate:function(t,e,n){var r=t.getUTCFullYear(),i=Jf(r);return i?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,n,r){return t.setUTCMonth(0,n),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,n,r){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return t=wl(t,n,r),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,n,r){var i=function(s){var o=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+o};switch(e){case"e":case"ee":return Ze(e.length,t,i);case"eo":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return t=wl(t,n,r),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,n,r){var i=function(s){var o=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+o};switch(e){case"c":case"cc":return Ze(e.length,t,i);case"co":return n.ordinalNumber(t,{unit:"day",valueCallback:i});case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,n){return e>=0&&e<=6},set:function(t,e,n,r){return t=wl(t,n,r),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,n,r){var i=function(s){return s===0?7:s};switch(e){case"i":case"ii":return Ze(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i});case"iiii":default:return n.day(t,{width:"wide",context:"formatting",valueCallback:i})||n.day(t,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(t,{width:"short",context:"formatting",valueCallback:i})||n.day(t,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(t,e,n){return e>=1&&e<=7},set:function(t,e,n,r){return t=dI(t,n,r),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(t,e,n,r){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(El(n),0,0,0),t},incompatibleTokens:["b","B","H","k","t","T"]},b:{priority:80,parse:function(t,e,n,r){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(El(n),0,0,0),t},incompatibleTokens:["a","B","H","k","t","T"]},B:{priority:80,parse:function(t,e,n,r){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}},set:function(t,e,n,r){return t.setUTCHours(El(n),0,0,0),t},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(t,e,n,r){switch(e){case"h":return Je(nt.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=12},set:function(t,e,n,r){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):!i&&n===12?t.setUTCHours(0,0,0,0):t.setUTCHours(n,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,n,r){switch(e){case"H":return Je(nt.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=23},set:function(t,e,n,r){return t.setUTCHours(n,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,n,r){switch(e){case"K":return Je(nt.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=11},set:function(t,e,n,r){var i=t.getUTCHours()>=12;return i&&n<12?t.setUTCHours(n+12,0,0,0):t.setUTCHours(n,0,0,0),t},incompatibleTokens:["h","H","k","t","T"]},k:{priority:70,parse:function(t,e,n,r){switch(e){case"k":return Je(nt.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=1&&e<=24},set:function(t,e,n,r){var i=n<=24?n%24:n;return t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,n,r){switch(e){case"m":return Je(nt.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n,r){return t.setUTCMinutes(n,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,n,r){switch(e){case"s":return Je(nt.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return Ze(e.length,t)}},validate:function(t,e,n){return e>=0&&e<=59},set:function(t,e,n,r){return t.setUTCSeconds(n,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,n,r){var i=function(s){return Math.floor(s*Math.pow(10,-e.length+3))};return Ze(e.length,t,i)},set:function(t,e,n,r){return t.setUTCMilliseconds(n),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,n,r){switch(e){case"X":return en(Zt.basicOptionalMinutes,t);case"XX":return en(Zt.basic,t);case"XXXX":return en(Zt.basicOptionalSeconds,t);case"XXXXX":return en(Zt.extendedOptionalSeconds,t);case"XXX":default:return en(Zt.extended,t)}},set:function(t,e,n,r){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,n,r){switch(e){case"x":return en(Zt.basicOptionalMinutes,t);case"xx":return en(Zt.basic,t);case"xxxx":return en(Zt.basicOptionalSeconds,t);case"xxxxx":return en(Zt.extendedOptionalSeconds,t);case"xxx":default:return en(Zt.extended,t)}},set:function(t,e,n,r){return e.timestampIsSet?t:new Date(t.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,n,r){return Gf(t)},set:function(t,e,n,r){return[new Date(n*1e3),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,n,r){return Gf(t)},set:function(t,e,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},bI=_I,wI=10,EI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CI=/^'([^]*?)'?$/,SI=/''/g,AI=/\S/,OI=/[a-zA-Z]/;function II(t,e,n,r){_e(3,arguments);var i=String(t),s=String(e),o=r||{},l=o.locale||bg;if(!l.match)throw new RangeError("locale must contain match property");var u=l.options&&l.options.firstWeekContainsDate,d=u==null?1:me(u),f=o.firstWeekContainsDate==null?d:me(o.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=l.options&&l.options.weekStartsOn,v=p==null?0:me(p),m=o.weekStartsOn==null?v:me(o.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(s==="")return i===""?Ae(n):new Date(NaN);var S={firstWeekContainsDate:f,weekStartsOn:m,locale:l},T=[{priority:wI,subPriority:-1,set:kI,index:0}],A,O=s.match(TI).map(function(G){var le=G[0];if(le==="p"||le==="P"){var Te=Ag[le];return Te(G,l.formatLong,S)}return G}).join("").match(EI),k=[];for(A=0;A0&&AI.test(i))return new Date(NaN);var w=T.map(function(G){return G.priority}).sort(function(G,le){return le-G}).filter(function(G,le,Te){return Te.indexOf(G)===le}).map(function(G){return T.filter(function(le){return le.priority===G}).sort(function(le,Te){return Te.subPriority-le.subPriority})}).map(function(G){return G[0]}),g=Ae(n);if(isNaN(g))return new Date(NaN);var F=wg(g,yg(g)),V={};for(A=0;At.length)&&(e=t.length);for(var n=0,r=new Array(e);n=o.getTime())&&(!i[1]||i[1].getTime()>=o.getTime())&&r:i.getTime()>=o.getTime()&&r}return r};function Wn(t){return function(e){if(Array.isArray(e))return _c(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||xg(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var rh=function(t,e,n,r){var i=[],s=new Date(e,t),o=new Date(e,t+1,0);return function l(u){var d=function(f,p,v){for(var m=new Date(JSON.parse(JSON.stringify(f))),S=[],T=0;T<7;T++){var A=Nr(m,T),O=Ot(A)!==p;S.push({text:v&&O?"":A.getDate(),value:A,current:!O})}return S}(u,t,r);i.push({days:d}),i[i.length-1].days.some(function(f){return Lt(tr(f.value),tr(o))})||l(Nr(u,7))}(vg(s,{weekStartsOn:n})),i},zI=function(t){return function(e){for(var n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=r.length,s=0;s+r.maxValue,O=!!r.minValue&&+T<+r.minValue;return A||O},m=function(){var T=$t(s);if(T){var A=$t(o);A&&(A.scrollTop=T.offsetTop-A.offsetTop-(A.getBoundingClientRect().height/2-T.getBoundingClientRect().height))}},S=function(T){r.disabledValues.some(function(A){return A===T})||r.minValue&&!(+r.minValue<=T)||r.maxValue&&!(+r.maxValue>=T)||(n("update:modelValue",T),n("selected"))};return function(T,A){return K(),oe("div",{class:Ve(["dp__overlay",I(u)]),ref_key:"gridWrapRef",ref:o,role:"dialog",tabindex:"0"},[fe("div",e1,[fe("div",t1,[he(T.$slots,"header")]),(K(!0),oe(Me,null,dt(I(f),function(O,k){return K(),oe("div",{class:"dp__overlay_row",key:I(zI)(k),role:"row"},[(K(!0),oe(Me,null,dt(O,function(C){return K(),oe("div",{role:"gridcell",class:Ve(I(d)),key:C.value,"aria-selected":C.value===t.modelValue&&!t.disabledValues.includes(C.value),"aria-disabled":C.className.dp__overlay_cell_disabled,ref_for:!0,ref:function(D){C.value!==t.modelValue||t.disabledValues.includes(C.value)||(s.value=D)},tabindex:"0",onClick:function(D){return S(C.value)},onKeydown:Fe(function(D){return S(C.value)},["enter"])},[fe("div",{class:Ve(C.className)},[T.$slots.item?he(T.$slots,"item",{key:0,item:C}):W("",!0),T.$slots.item?W("",!0):(K(),oe(Me,{key:1},[Yt(st(C.text),1)],64))],2)],42,n1)}),128))])}),128)),T.$slots["button-icon"]?(K(),oe("div",{key:0,role:"button","aria-label":"Toggle overlay",class:Ve(I(p)),tabindex:"0",onClick:A[0]||(A[0]=function(O){return T.$emit("toggle")}),onKeydown:A[1]||(A[1]=Fe(function(O){return T.$emit("toggle")},["enter"]))},[he(T.$slots,"button-icon")],34)):W("",!0)])],2)}}}),Cu=function(){var t=ht("transitions");return{transitionName:ce(function(){return function(e){return t!=null&&t.value?e?t.value.open:t.value.close:""}}),showTransition:!(t==null||!t.value)}},r1={class:"dp__time_input"},i1=["onKeydown"],s1=["onKeydown"],o1=["onKeydown"],a1={key:2},l1=["onKeydown"],Nl=Gt({props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},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},is24:{type:Boolean,default:!0},filters:{type:Object,default:function(){return{}}},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1}},emits:["setHours","setMinutes","update:hours","update:minutes","update:seconds"],setup:function(t,e){var n=e.emit,r=t,i=Se(!1),s=Se(!1),o=Se(!1),l=Se("AM"),u=Cu(),d=u.transitionName,f=u.showTransition,p=ce(function(){return{dp__time_col:!0,dp__time_col_reg:!r.enableSeconds&&r.is24,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}}),v=ce(function(){var b=B(r.hours);return{text:b<10?"0".concat(b):"".concat(b),value:b}}),m=ce(function(){return{text:r.minutes<10?"0".concat(r.minutes):"".concat(r.minutes),value:r.minutes}}),S=ce(function(){return{text:r.seconds<10?"0".concat(r.seconds):"".concat(r.seconds),value:r.seconds}}),T=function(b,x){return function(R,H){for(var w=[],g=0;g1&&arguments[1]!==void 0?arguments[1]:3,ae=[],ee=0;ee1&&arguments[1]!==void 0)||arguments[1],R=C(b,x),H=R[b];n("update:".concat(b),H)},B=function(b){return r.is24?b:(l.value=b>=12?"PM":"AM",[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][b])},j=function(){l.value==="PM"?(l.value="AM",n("update:hours",r.hours-12)):(l.value="PM",n("update:hours",r.hours+12))};return function(b,x){return K(),oe("div",r1,[fe("div",{class:Ve(I(p))},[fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Increment hours",tabindex:"0",onKeydown:x[0]||(x[0]=Fe(function(R){return D("hours")},["enter"])),onClick:x[1]||(x[1]=function(R){return D("hours")})},[b.$slots["arrow-up"]?he(b.$slots,"arrow-up",{key:0}):W("",!0),b.$slots["arrow-up"]?W("",!0):(K(),Pe(I(Tl),{key:1}))],32),fe("div",{role:"button","aria-label":"Open hours overlay",class:Ve(t.noHoursOverlay?"":"dp__time_display"),tabindex:"0",onKeydown:Fe(A,["enter"]),onClick:A},[b.$slots.hours?he(b.$slots,"hours",{key:0,text:I(v).text,value:I(v).value}):W("",!0),b.$slots.hours?W("",!0):(K(),oe(Me,{key:1},[Yt(st(I(v).text),1)],64))],42,i1),fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Decrement hours",tabindex:"0",onKeydown:x[2]||(x[2]=Fe(function(R){return D("hours",!1)},["enter"])),onClick:x[3]||(x[3]=function(R){return D("hours",!1)})},[b.$slots["arrow-down"]?he(b.$slots,"arrow-down",{key:0}):W("",!0),b.$slots["arrow-down"]?W("",!0):(K(),Pe(I(Cl),{key:1}))],32)],2),fe("div",{class:Ve(I(p))},":",2),fe("div",{class:Ve(I(p))},[fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Increment minutes",tabindex:"0",onKeydown:x[4]||(x[4]=Fe(function(R){return D("minutes")},["enter"])),onClick:x[5]||(x[5]=function(R){return D("minutes")})},[b.$slots["arrow-up"]?he(b.$slots,"arrow-up",{key:0}):W("",!0),b.$slots["arrow-up"]?W("",!0):(K(),Pe(I(Tl),{key:1}))],32),fe("div",{"aria-label":"Open minutes overlay",role:"button",class:Ve(t.noMinutesOverlay?"":"dp__time_display"),tabindex:"0",onKeydown:Fe(O,["enter"]),onClick:O},[b.$slots.minutes?he(b.$slots,"minutes",{key:0,text:I(m).text,value:I(m).value}):W("",!0),b.$slots.minutes?W("",!0):(K(),oe(Me,{key:1},[Yt(st(I(m).text),1)],64))],42,s1),fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Decrement minutes",tabindex:"0",onKeydown:x[6]||(x[6]=Fe(function(R){return D("minutes",!1)},["enter"])),onClick:x[7]||(x[7]=function(R){return D("minutes",!1)})},[b.$slots["arrow-down"]?he(b.$slots,"arrow-down",{key:0}):W("",!0),b.$slots["arrow-down"]?W("",!0):(K(),Pe(I(Cl),{key:1}))],32)],2),t.enableSeconds?(K(),oe("div",{key:0,class:Ve(I(p))},":",2)):W("",!0),t.enableSeconds?(K(),oe("div",{key:1,class:Ve(I(p))},[fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Increment seconds",tabindex:"0",onKeydown:x[8]||(x[8]=Fe(function(R){return D("seconds")},["enter"])),onClick:x[9]||(x[9]=function(R){return D("seconds")})},[b.$slots["arrow-up"]?he(b.$slots,"arrow-up",{key:0}):W("",!0),b.$slots["arrow-up"]?W("",!0):(K(),Pe(I(Tl),{key:1}))],32),fe("div",{role:"button","aria-label":"Open seconds overlay",class:Ve(t.noSecondsOverlay?"":"dp__time_display"),tabindex:"0",onKeydown:Fe(k,["enter"]),onClick:k},[b.$slots.seconds?he(b.$slots,"hours",{key:0,text:I(S).text,value:I(S).value}):W("",!0),b.$slots.seconds?W("",!0):(K(),oe(Me,{key:1},[Yt(st(I(S).text),1)],64))],42,o1),fe("div",{class:"dp__inc_dec_button",role:"button","aria-label":"Decrement seconds",tabindex:"0",onKeydown:x[10]||(x[10]=Fe(function(R){return D("seconds",!1)},["enter"])),onClick:x[11]||(x[11]=function(R){return D("seconds",!1)})},[b.$slots["arrow-down"]?he(b.$slots,"arrow-down",{key:0}):W("",!0),b.$slots["arrow-down"]?W("",!0):(K(),Pe(I(Cl),{key:1}))],32)],2)):W("",!0),t.is24?W("",!0):(K(),oe("div",a1,[b.$slots["am-pm-button"]?he(b.$slots,"am-pm-button",{key:0,toggle:j,value:l.value}):W("",!0),b.$slots["am-pm-button"]?W("",!0):(K(),oe("button",{key:1,class:"dp__pm_am_button",role:"button","aria-label":"Switch AM/PM mode",tabindex:"0",onClick:j,onKeydown:Fe(j,["enter"])},st(l.value),41,l1))])),Qe(dn,{name:I(d)(i.value),css:I(f)},{default:$e(function(){return[i.value?(K(),Pe(Sr,{key:0,items:T(t.is24?24:12,t.hoursGridIncrement),"disabled-values":t.filters.times.hours,"onUpdate:modelValue":x[12]||(x[12]=function(R){return b.$emit("update:hours",R)}),onSelected:A,onToggle:A},ft({"button-icon":$e(function(){return[b.$slots["clock-icon"]?he(b.$slots,"clock-icon",{key:0}):W("",!0),b.$slots["clock-icon"]?W("",!0):(K(),Pe(I(No),{key:1}))]}),_:2},[b.$slots["hours-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"hours-overlay",{text:H.text,value:H.value})]})}:void 0]),1032,["items","disabled-values"])):W("",!0)]}),_:3},8,["name","css"]),Qe(dn,{name:I(d)(s.value),css:I(f)},{default:$e(function(){return[s.value?(K(),Pe(Sr,{key:0,items:T(60,t.minutesGridIncrement),"disabled-values":t.filters.times.minutes,"onUpdate:modelValue":x[13]||(x[13]=function(R){return b.$emit("update:minutes",R)}),onSelected:O,onToggle:O},ft({"button-icon":$e(function(){return[b.$slots["clock-icon"]?he(b.$slots,"clock-icon",{key:0}):W("",!0),b.$slots["clock-icon"]?W("",!0):(K(),Pe(I(No),{key:1}))]}),_:2},[b.$slots["minutes-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"minutes-overlay",{text:H.text,value:H.value})]})}:void 0]),1032,["items","disabled-values"])):W("",!0)]}),_:3},8,["name","css"]),Qe(dn,{name:I(d)(o.value),css:I(f)},{default:$e(function(){return[o.value?(K(),Pe(Sr,{key:0,items:T(60,t.secondsGridIncrement),"disabled-values":t.filters.times.seconds,"onUpdate:modelValue":x[14]||(x[14]=function(R){return b.$emit("update:seconds",R)}),onSelected:k,onToggle:k},ft({"button-icon":$e(function(){return[b.$slots["clock-icon"]?he(b.$slots,"clock-icon",{key:0}):W("",!0),b.$slots["clock-icon"]?W("",!0):(K(),Pe(I(No),{key:1}))]}),_:2},[b.$slots["seconds-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"seconds-overlay",{text:H.text,value:H.value})]})}:void 0]),1032,["items","disabled-values"])):W("",!0)]}),_:3},8,["name","css"])])}}}),rs=[{name:"clock-icon",use:["time","calendar"]},{name:"arrow-left",use:["month-year","calendar"]},{name:"arrow-right",use:["month-year","calendar"]},{name:"arrow-up",use:["time","calendar"]},{name:"arrow-down",use:["time","calendar"]},{name:"calendar-icon",use:["month-year","time","calendar"]},{name:"day",use:["calendar"]},{name:"month-overlay",use:["calendar","month-year"]},{name:"year-overlay",use:["calendar","month-year"]},{name:"hours-overlay",use:["calendar","time"]},{name:"minutes-overlay",use:["calendar","time"]},{name:"seconds-overlay",use:["calendar","time"]},{name:"hours",use:["calendar","time"]},{name:"minutes",use:["calendar","time"]},{name:"month",use:["calendar","month-year"]},{name:"year",use:["calendar","month-year"]},{name:"action-select",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar"]},{name:"marker-tooltip",use:["calendar"]},{name:"now-button",use:[]},{name:"time-picker-overlay",use:["calendar","time"]},{name:"am-pm-button",use:["calendar","time"]}],c1=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],u1={all:function(){return rs},monthYear:function(){return rs.filter(function(t){return t.use.includes("month-year")})},input:function(){return c1},timePicker:function(){return rs.filter(function(t){return t.use.includes("time")})},action:function(){return rs.filter(function(t){return t.use.includes("action")})},calendar:function(){return rs.filter(function(t){return t.use.includes("calendar")})}},Br=function(t,e){var n=[];return u1[e]().forEach(function(r){t[r.name]&&n.push(r.name)}),n},d1={key:0,class:"dp__overlay"},f1={class:"dp__overlay_container"},h1={key:1,class:"dp__overlay_row"},p1=Gt({props:{hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},is24:{type:Boolean,default:!0},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},range:{type:Boolean,default:!1},filters:{type:Object,default:function(){return{}}},timePicker:{type:Boolean,default:!1},hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},instance:{type:[Number,Array],default:1},twoCalendars:{type:Boolean,default:!1},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},customProps:{type:Object,default:null},enableSeconds:{type:Boolean,default:!1}},emits:["update:hours","update:minutes","update:seconds"],setup:function(t,e){var n=e.emit,r=t,i=js(),s=ht("autoApply",!1),o=Cu(),l=o.transitionName,u=o.showTransition,d=Se(!1),f=function(O){d.value=O},p=ce(function(){return{dp__button:!0,dp__button_bottom:s}}),v=Br(i,"timePicker"),m=ce(function(){return{is24:r.is24,hoursGridIncrement:r.hoursGridIncrement,minutesGridIncrement:r.minutesGridIncrement,secondsGridIncrement:r.secondsGridIncrement,hoursIncrement:r.hoursIncrement,minutesIncrement:r.minutesIncrement,secondsIncrement:r.secondsIncrement,filters:r.filters,noHoursOverlay:r.noHoursOverlay,noMinutesOverlay:r.noMinutesOverlay,noSecondsOverlay:r.noSecondsOverlay,enableSeconds:r.enableSeconds}}),S=function(O){n("update:hours",O)},T=function(O){n("update:minutes",O)},A=function(O){n("update:seconds",O)};return function(O,k){return K(),oe("div",null,[t.timePicker?W("",!0):(K(),oe("div",{key:0,class:Ve(I(p)),role:"button","aria-label":"Open time picker",tabindex:"0",onKeydown:k[0]||(k[0]=Fe(function(C){return f(!0)},["enter"])),onClick:k[1]||(k[1]=function(C){return f(!0)})},[O.$slots["clock-icon"]?he(O.$slots,"clock-icon",{key:0}):W("",!0),O.$slots["clock-icon"]?W("",!0):(K(),Pe(I(No),{key:1}))],34)),Qe(dn,{name:I(l)(d.value),css:I(u)},{default:$e(function(){return[d.value||t.timePicker?(K(),oe("div",d1,[fe("div",f1,[O.$slots["time-picker-overlay"]?he(O.$slots,"time-picker-overlay",{key:0,range:t.range,instance:t.instance,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:S,setMinutes:T,setSeconds:A}):W("",!0),O.$slots["time-picker-overlay"]?W("",!0):(K(),oe("div",h1,[t.range?W("",!0):(K(),Pe(Nl,wt({key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds},I(m),{"onUpdate:hours":k[2]||(k[2]=function(C){return S(C)}),"onUpdate:minutes":k[3]||(k[3]=function(C){return T(C)}),"onUpdate:seconds":k[4]||(k[4]=function(C){return A(C)})}),ft({_:2},[dt(I(v),function(C,D){return{name:C,fn:$e(function(B){return[he(O.$slots,C,An(un(B)))]})}})]),1040,["hours","minutes","seconds"])),t.range?(K(),oe(Me,{key:1},[t.twoCalendars&&t.instance!==1?W("",!0):(K(),Pe(Nl,wt({key:0,hours:t.hours[0],minutes:t.minutes[0]},I(m),{"onUpdate:hours":k[5]||(k[5]=function(C){return S([C,t.hours[1]])}),"onUpdate:minutes":k[6]||(k[6]=function(C){return T([C,t.minutes[1]])})}),ft({_:2},[dt(I(v),function(C,D){return{name:C,fn:$e(function(B){return[he(O.$slots,C,An(un(B)))]})}})]),1040,["hours","minutes"])),t.twoCalendars&&t.instance!==2?W("",!0):(K(),Pe(Nl,wt({key:1,hours:t.hours[1],minutes:t.minutes[1]},I(m),{"onUpdate:hours":k[7]||(k[7]=function(C){return S([t.hours[0],C])}),"onUpdate:minutes":k[8]||(k[8]=function(C){return T([t.minutes[0],C])})}),ft({_:2},[dt(I(v),function(C,D){return{name:C,fn:$e(function(B){return[he(O.$slots,C,An(un(B)))]})}})]),1040,["hours","minutes"]))],64)):W("",!0)])),t.timePicker?W("",!0):(K(),oe("div",{key:2,class:Ve(I(p)),role:"button","aria-label":"Close time picker",tabindex:"0",onKeydown:k[9]||(k[9]=Fe(function(C){return f(!1)},["enter"])),onClick:k[10]||(k[10]=function(C){return f(!1)})},[O.$slots["calendar-icon"]?he(O.$slots,"calendar-icon",{key:0}):W("",!0),O.$slots["calendar-icon"]?W("",!0):(K(),Pe(I(Ts),{key:1}))],34))])])):W("",!0)]}),_:3},8,["name","css"])])}}}),m1={class:"dp__month_year_row"},g1={class:"dp__inner_nav",role:"button","aria-label":"Previous month"},v1=["onKeydown"],y1=["onKeydown"],_1={class:"dp__inner_nav",role:"button","aria-label":"Next month"},b1={class:"dp__month_picker_header"},w1={class:"dp__inner_nav",role:"button","aria-label":"Previous month"},E1=["onKeydown"],T1={class:"dp__inner_nav",role:"button","aria-label":"Next month"},C1=Gt({props:{months:{type:Array,default:function(){return[]}},years:{type:Array,default:function(){return[]}},year:{type:Number,default:0},month:{type:Number,default:0},filters:{type:Object,default:function(){return{}}},monthPicker:{type:Boolean,default:!1},instance:{type:Number,default:1},customProps:{type:Object,default:null},twoCalendars:{type:Boolean,default:!1},twoCalendarsSolo:{type:Boolean,default:!1}},emits:["update:month","update:year","monthYearSelect"],setup:function(t,e){var n=e.emit,r=t,i=Cu(),s=i.transitionName,o=i.showTransition,l=Se(!1),u=Se(!1),d=function(b,x){var R=b.months.map(function(V){return V.value}),H=b.years.map(function(V){return V.value}),w=R.filter(function(V){return!b.filters.months.some(function(ae){return ae===V})}),g=H.filter(function(V){return!b.filters.years.some(function(ae){return ae===V})}),F=function(V,ae){x("update:month",V),x("update:year",ae)};return{onNext:function(){var V,ae=b.month,ee=b.year;if(b.month===11?(ae=0,ee=b.year+1):ae+=1,b.filters.months.includes(ae)&&(V=ae=ae===0?Math.min.apply(Math,Wn(w)):Math.max.apply(Math,Wn(w))),ae===V&&(ae=Math.min.apply(Math,Wn(w)),ee=b.year+1),b.filters.years.includes(ee)){var G=g.find(function(le){return le>ee});G&&(ee=G)}ee<=H[H.length-1]&&F(ae,ee)},onPrev:function(){var V,ae=b.month,ee=b.year;if(b.month===0?(ae=11,ee=b.year-1):ae-=1,b.filters.months.includes(ae)&&(V=ae=ae===11?Math.max.apply(Math,Wn(w)):Math.min.apply(Math,Wn(w))),ae===V&&(ae=Math.max.apply(Math,Wn(w)),ee=b.year-1),b.filters.years.includes(ee)){var G=g.reverse().find(function(le){return le=H[0]&&F(ae,ee)}}}(r,n),f=d.onNext,p=d.onPrev,v=function(b){n("update:month",b),n("monthYearSelect"),D()},m=function(b){n("update:year",b),n("monthYearSelect",!0),B()},S=function(b){for(var x=[],R=0;R0&&arguments[0]!==void 0&&arguments[0];if(b){var x=r.year+1;n("update:year",x)}else{var R=r.year-1;n("update:year",R)}};return function(b,x){return K(),oe("div",m1,[t.monthPicker?W("",!0):(K(),oe(Me,{key:0},[I(k)?(K(),oe("div",{key:0,class:"dp__month_year_col_nav",onClick:x[0]||(x[0]=function(){return I(p)&&I(p).apply(void 0,arguments)}),onKeydown:x[1]||(x[1]=Fe(function(){return I(p)&&I(p).apply(void 0,arguments)},["enter"])),tabindex:"0"},[fe("div",g1,[b.$slots["arrow-left"]?he(b.$slots,"arrow-left",{key:0}):W("",!0),b.$slots["arrow-left"]?W("",!0):(K(),Pe(I(Qf),{key:1}))])],32)):W("",!0),fe("div",{class:"dp__month_year_select",onClick:D,onKeydown:Fe(D,["enter"]),role:"button","aria-label":"Open months overlay",tabindex:"0"},[b.$slots.month?he(b.$slots,"month",{key:0,value:I(T).value,text:I(T).text}):W("",!0),b.$slots.month?W("",!0):(K(),oe(Me,{key:1},[Yt(st(I(T).text),1)],64))],40,v1),fe("div",{class:"dp__month_year_select",onClick:B,onKeydown:Fe(B,["enter"]),role:"button","aria-label":"Open years overlay",tabindex:"0"},[b.$slots.year?he(b.$slots,"year",{key:0,year:t.year}):W("",!0),b.$slots.year?W("",!0):(K(),oe(Me,{key:1},[Yt(st(t.year),1)],64))],40,y1),Qe(dn,{name:I(s)(l.value),css:I(o)},{default:$e(function(){return[l.value?(K(),Pe(Sr,wt({key:0},{modelValue:t.month,items:I(A),disabledValues:t.filters.months},{"onUpdate:modelValue":v,onToggle:D}),ft({"button-icon":$e(function(){return[b.$slots["calendar-icon"]?he(b.$slots,"calendar-icon",{key:0}):W("",!0),b.$slots["calendar-icon"]?W("",!0):(K(),Pe(I(Ts),{key:1}))]}),_:2},[b.$slots["month-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"month-overlay",{text:H.text,value:H.value})]})}:void 0]),1040)):W("",!0)]}),_:3},8,["name","css"]),Qe(dn,{name:I(s)(u.value),css:I(o)},{default:$e(function(){return[u.value?(K(),Pe(Sr,wt({key:0},{modelValue:t.year,items:I(O),disabledValues:t.filters.years},{"onUpdate:modelValue":m,onToggle:B}),ft({"button-icon":$e(function(){return[b.$slots["calendar-icon"]?he(b.$slots,"calendar-icon",{key:0}):W("",!0),b.$slots["calendar-icon"]?W("",!0):(K(),Pe(I(Ts),{key:1}))]}),_:2},[b.$slots["year-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"year-overlay",{text:H.text,value:H.value})]})}:void 0]),1040)):W("",!0)]}),_:3},8,["name","css"]),I(C)?(K(),oe("div",{key:1,class:"dp__month_year_col_nav",onClick:x[2]||(x[2]=function(){return I(f)&&I(f).apply(void 0,arguments)}),onKeydown:x[3]||(x[3]=Fe(function(){return I(f)&&I(f).apply(void 0,arguments)},["enter"])),tabindex:"0"},[fe("div",_1,[b.$slots["arrow-right"]?he(b.$slots,"arrow-right",{key:0}):W("",!0),b.$slots["arrow-right"]?W("",!0):(K(),Pe(I(Zf),{key:1}))])],32)):W("",!0)],64)),t.monthPicker?(K(),Pe(Sr,wt({key:1},{modelValue:t.month,items:I(A),disabledValues:t.filters.months},{"onUpdate:modelValue":v,onToggle:D}),ft({header:$e(function(){return[fe("div",b1,[fe("div",{class:"dp__month_year_col_nav",tabindex:"0",onClick:x[4]||(x[4]=function(R){return j(!1)}),onKeydown:x[5]||(x[5]=Fe(function(R){return j(!1)},["enter"]))},[fe("div",w1,[b.$slots["arrow-left"]?he(b.$slots,"arrow-left",{key:0}):W("",!0),b.$slots["arrow-left"]?W("",!0):(K(),Pe(I(Qf),{key:1}))])],32),fe("div",{class:"dp__pointer",role:"button","aria-label":"Open years overlay",tabindex:"0",onClick:B,onKeydown:Fe(B,["enter"])},[b.$slots.year?he(b.$slots,"year",{key:0,year:t.year}):W("",!0),b.$slots.year?W("",!0):(K(),oe(Me,{key:1},[Yt(st(t.year),1)],64))],40,E1),fe("div",{class:"dp__month_year_col_nav",tabindex:"0",onClick:x[6]||(x[6]=function(R){return j(!0)}),onKeydown:x[7]||(x[7]=Fe(function(R){return j(!0)},["enter"]))},[fe("div",T1,[b.$slots["arrow-right"]?he(b.$slots,"arrow-right",{key:0}):W("",!0),b.$slots["arrow-right"]?W("",!0):(K(),Pe(I(Zf),{key:1}))])],32)]),Qe(dn,{name:I(s)(u.value),css:I(o)},{default:$e(function(){return[u.value?(K(),Pe(Sr,wt({key:0},{modelValue:t.year,items:I(O),disabledValues:t.filters.years},{"onUpdate:modelValue":m,onToggle:B}),ft({"button-icon":$e(function(){return[b.$slots["calendar-icon"]?he(b.$slots,"calendar-icon",{key:0}):W("",!0),b.$slots["calendar-icon"]?W("",!0):(K(),Pe(I(Ts),{key:1}))]}),_:2},[b.$slots["year-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"year-overlay",{text:H.text,value:H.value})]})}:void 0]),1040)):W("",!0)]}),_:3},8,["name","css"])]}),_:2},[b.$slots["month-overlay"]?{name:"item",fn:$e(function(R){var H=R.item;return[he(b.$slots,"month-overlay",{text:H.text,value:H.value})]})}:void 0]),1040)):W("",!0)])}}}),S1={class:"db__calendar_header",role:"row"},A1={key:0,class:"dp__calendar_header_item",role:"gridcell"},O1=fe("div",{class:"dp__calendar_header_separator"},null,-1),I1={key:0,class:"dp__calendar",role:"grid","aria-label":"Calendar days"},k1={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},D1={class:"dp__cell_inner"},P1=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],N1=fe("div",{class:"dp__arrow_bottom_tp"},null,-1),x1=Gt({props:{locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:Boolean,default:!1},mappedDates:{type:Array,default:function(){return[]}},enableTimePicker:{type:Boolean,default:!0},timePickerComponent:{type:Object,default:null},monthYearComponent:{type:Object,default:null},is24:{type:Boolean,default:!0},hoursIncrement:{type:[String,Number],default:1},minutesIncrement:{type:[String,Number],default:1},secondsIncrement:{type:[String,Number],default:1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},range:{type:Boolean,default:!1},filters:{type:Object,default:function(){return{}}},customProps:{type:Object,default:null},hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},calendarClassName:{type:String,default:null},monthPicker:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},getWeekNum:{type:Function,default:function(){return""}},instance:{type:Number,default:1},twoCalendars:{type:Boolean,default:!1},years:{type:Array,default:function(){return[]}},months:{type:Array,default:function(){return[]}},month:{type:Number,default:0},year:{type:Number,default:0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},twoCalendarsSolo:{type:Boolean,default:!1},modeHeight:{type:[Number,String],default:255},enableSeconds:{type:Boolean,default:!1}},emits:["update:hours","update:minutes","update:seconds","selectDate","setHoverDate","update:month","update:year","monthYearSelect","handleScroll"],setup:function(t,e){var n=e.emit,r=t,i=js(),s=Se(null),o=Se({bottom:"",left:"",transform:""}),l=Se([]),u=Se(!0),d=ht("transitions"),f=Se(""),p=$o(r,"month"),v=$o(r,"year"),m=Se(),S=Se(!1),T=ce(function(){return function(H,w){var g,F,V=[1,2,3,4,5,6,7].map(function(G){return new Intl.DateTimeFormat(H,{weekday:"short",timeZone:"UTC"}).format(new Date("2017-01-0".concat(G,"T00:00:00+00:00"))).slice(0,2)}),ae=V.slice(0,w),ee=V.slice(w+1,V.length);return(g=(F=[V[w]]).concat.apply(F,Wn(ee))).concat.apply(g,Wn(ae))}(r.locale,+r.weekStart)});Wr(function(){m.value=Mr(new Date,r.month,r.year)});var A=Br(i,"timePicker"),O=Br(i,"monthYear"),k=ce(function(){return r.monthPicker||r.timePicker});cn([p,v],function(){if(d!=null&&d.value){var H=Mr(new Date,r.month,r.year);f.value=Fn(Mr(new Date,r.month,r.year),m.value)?d.value.next:d.value.previous,m.value=H,S.value&&(u.value=!1,da(function(){u.value=!0}))}S.value||(S.value=!0)});var C=ce(function(){return Zn({dp__calendar_wrap:!0},r.calendarClassName,!!r.calendarClassName)}),D=ce(function(){return function(H){var w=function(g){return Object.assign({type:"dot"},g)}(H);return{dp__marker_dot:w.type==="dot",dp__marker_line:w.type==="line"}}}),B=ce(function(){return function(H){return Lt(H,s.value)}}),j=ce(function(){return{dp__calendar:!0,dp__calendar_next:r.instance===2}}),b=ce(function(){return{dp__calendar_content_wrap:!0}}),x=ce(function(){return k.value?{height:"".concat(r.modeHeight,"px")}:null}),R=function(){s.value=null};return function(H,w){return K(),oe("div",{class:Ve(I(j))},[fe("div",{class:Ve(I(b)),style:En(I(x))},[t.disableMonthYearSelect||t.timePicker?W("",!0):(K(),Pe(rc(t.monthYearComponent?t.monthYearComponent:C1),wt({key:0},{months:t.months,years:t.years,filters:t.filters,monthPicker:t.monthPicker,month:t.month,year:t.year,customProps:t.customProps,twoCalendars:t.twoCalendars,twoCalendarsSolo:t.twoCalendarsSolo,instance:t.instance},{"onUpdate:month":w[0]||(w[0]=function(g){return H.$emit("update:month",g)}),"onUpdate:year":w[1]||(w[1]=function(g){return H.$emit("update:year",g)}),onMonthYearSelect:w[2]||(w[2]=function(g){return H.$emit("monthYearSelect",g)})}),ft({_:2},[dt(I(O),function(g,F){return{name:g,fn:$e(function(V){return[he(H.$slots,g,An(un(V)))]})}})]),1040)),I(k)?W("",!0):(K(),oe("div",{key:1,class:Ve(I(C)),role:"grid","aria-label":"Calendar wrapper",onWheel:w[4]||(w[4]=ac(function(g){return H.$emit("handleScroll",g)},["prevent"]))},[fe("div",S1,[t.weekNumbers?(K(),oe("div",A1,st(t.weekNumName),1)):W("",!0),(K(!0),oe(Me,null,dt(I(T),function(g,F){return K(),oe("div",{class:"dp__calendar_header_item",role:"gridcell",key:F},[H.$slots["calendar-header"]?he(H.$slots,"calendar-header",{key:0,day:g,index:F}):W("",!0),H.$slots["calendar-header"]?W("",!0):(K(),oe(Me,{key:1},[Yt(st(g),1)],64))])}),128))]),O1,Qe(dn,{name:f.value,css:!!I(d)},{default:$e(function(){return[u.value?(K(),oe("div",I1,[(K(!0),oe(Me,null,dt(t.mappedDates,function(g,F){return K(),oe("div",{class:"dp__calendar_row",role:"row",key:F},[t.weekNumbers?(K(),oe("div",k1,[fe("div",D1,st(t.getWeekNum(g.days)),1)])):W("",!0),(K(!0),oe(Me,null,dt(g.days,function(V,ae){return K(),oe("div",{role:"gridcell",class:"dp__calendar_item",ref_for:!0,ref:function(ee){ee&&(l.value[ae+F]=ee)},key:ae+F,"aria-selected":V.classData.dp__active_date||V.classData.dp__range_start||V.classData.dp__range_start,"aria-disabled":V.classData.dp__cell_disabled,tabindex:"0",onClick:function(ee){return H.$emit("selectDate",V)},onKeydown:Fe(function(ee){return H.$emit("selectDate",V)},["enter"]),onMouseover:function(ee){return function(G,le){var Te,He;if(n("setHoverDate",G),(Te=G.marker)!==null&&Te!==void 0&&(He=Te.tooltip)!==null&&He!==void 0&&He.length){var Ue=$t(l.value[le]);if(Ue){var We=Ue.getBoundingClientRect(),xe=We.width,qe=We.height;o.value={bottom:"".concat(qe,"px"),left:"".concat(xe/2,"px"),transform:"translateX(-50%)"},s.value=G.value}}}(V,ae+F)},onMouseleave:R},[fe("div",{class:Ve(["dp__cell_inner",V.classData])},[H.$slots.day?he(H.$slots,"day",{key:0,day:+V.text,date:V.value}):W("",!0),H.$slots.day?W("",!0):(K(),oe(Me,{key:1},[Yt(st(V.text),1)],64)),V.marker?(K(),oe("div",{key:2,class:Ve(I(D)(V.marker)),style:En(V.marker.color?{backgroundColor:V.marker.color}:{})},null,6)):W("",!0),I(B)(V.value)?(K(),oe("div",{key:3,class:"dp__marker_tooltip",style:En(o.value)},[fe("div",{class:"dp__tooltip_content",onClick:w[3]||(w[3]=ac(function(){},["stop"]))},[(K(!0),oe(Me,null,dt(V.marker.tooltip,function(ee,G){return K(),oe("div",{key:G,class:"dp__tooltip_text"},[H.$slots["marker-tooltip"]?he(H.$slots,"marker-tooltip",{key:0,tooltop:ee,day:V.value}):W("",!0),H.$slots["marker-tooltip"]?W("",!0):(K(),oe(Me,{key:1},[fe("div",{class:"dp__tooltip_mark",style:En(ee.color?{backgroundColor:ee.color}:{})},null,4),fe("div",null,st(ee.text),1)],64))])}),128)),N1])],4)):W("",!0)],2)],40,P1)}),128))])}),128))])):W("",!0)]}),_:3},8,["name","css"])],34)),t.enableTimePicker?(K(),Pe(rc(t.timePickerComponent?t.timePickerComponent:p1),wt({key:2},{is24:t.is24,hoursIncrement:t.hoursIncrement,minutesIncrement:t.minutesIncrement,hoursGridIncrement:t.hoursGridIncrement,secondsIncrement:t.secondsIncrement,minutesGridIncrement:t.minutesGridIncrement,secondsGridIncrement:t.secondsGridIncrement,noHoursOverlay:t.noHoursOverlay,noMinutesOverlay:t.noMinutesOverlay,noSecondsOverlay:t.noSecondsOverlay,range:t.range,filters:t.filters,timePicker:t.timePicker,hours:t.hours,minutes:t.minutes,seconds:t.seconds,customProps:t.customProps,twoCalendars:t.twoCalendars,instance:t.instance,enableSeconds:t.enableSeconds},{"onUpdate:hours":w[5]||(w[5]=function(g){return H.$emit("update:hours",g)}),"onUpdate:minutes":w[6]||(w[6]=function(g){return H.$emit("update:minutes",g)}),"onUpdate:seconds":w[7]||(w[7]=function(g){return H.$emit("update:seconds",g)})}),ft({_:2},[dt(I(A),function(g,F){return{name:g,fn:$e(function(V){return[he(H.$slots,g,An(un(V)))]})}})]),1040)):W("",!0)],6)],2)}}});function Cs(t){return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(t)}var ah=function(t,e){return e},di=function(t){return Array.isArray(t)},Bn=function(t){return Array.isArray(t)},Cc=function(t){return Array.isArray(t)&&t.length===2},lh=function(t){return typeof t=="string"},M1={class:"dp__selection_preview"},R1={class:"dp__action_buttons"},L1=["onKeydown"],$1=Gt({props:{selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},internalModelValue:{type:[Date,Array],default:null},range:{type:Boolean,default:!1},previewFormat:{type:[String,Function],default:function(){return""}},inline:{type:Boolean,default:!1},monthPicker:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},twoCalendars:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},menuMount:{type:Boolean,default:!1},customProps:{type:Object,default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},enableTimePicker:{type:Boolean,default:!0}},emits:["closePicker","selectDate"],setup:function(t,e){var n=e.emit,r=t,i=ht("formatLocale"),s=ce(function(){return{dp__action:!0,dp__select:!0,dp__action_disabled:!o.value}}),o=ce(function(){return!r.enableTimePicker||Tc(r.internalModelValue,r.maxTime,r.minTime)}),l=ce(function(){return r.internalModelValue&&r.menuMount?typeof r.previewFormat=="string"?di(r.internalModelValue)?r.internalModelValue.length===2&&r.internalModelValue[1]?r.twoCalendars?"".concat(_r(r.internalModelValue[0],r.previewFormat,i==null?void 0:i.value)," - ").concat(_r(r.internalModelValue[1],r.previewFormat,i==null?void 0:i.value)):[_r(r.internalModelValue[0],r.previewFormat,i==null?void 0:i.value),_r(r.internalModelValue[1],r.previewFormat,i==null?void 0:i.value)]:"".concat(_r(r.internalModelValue[0],r.previewFormat,i==null?void 0:i.value)," -"):_r(r.internalModelValue,r.previewFormat,i==null?void 0:i.value):r.timePicker?r.previewFormat(Ec(r.internalModelValue)):r.monthPicker?r.previewFormat(wc(r.internalModelValue)):r.previewFormat(r.internalModelValue):""}),u=function(){o.value&&n("selectDate")};return function(d,f){return K(),oe("div",{class:"dp__action_row",style:En(t.calendarWidth?{width:"".concat(t.calendarWidth,"px")}:{})},[fe("div",M1,[d.$slots["action-preview"]?he(d.$slots,"action-preview",{key:0,value:t.internalModelValue}):W("",!0),d.$slots["action-preview"]?W("",!0):(K(),oe(Me,{key:1},[Array.isArray(I(l))?W("",!0):(K(),oe(Me,{key:0},[Yt(st(I(l)),1)],64)),Array.isArray(I(l))?(K(),oe(Me,{key:1},[fe("div",null,st(I(l)[0]),1),fe("div",null,st(I(l)[1]),1)],64)):W("",!0)],64))]),fe("div",R1,[d.$slots["action-select"]?he(d.$slots,"action-select",{key:0,value:t.internalModelValue}):W("",!0),d.$slots["action-select"]?W("",!0):(K(),oe(Me,{key:1},[t.inline?W("",!0):(K(),oe("span",{key:0,class:"dp__action dp__cancel",tabindex:"0",onClick:f[0]||(f[0]=function(p){return d.$emit("closePicker")}),onKeydown:f[1]||(f[1]=Fe(function(p){return d.$emit("closePicker")},["enter"]))},st(t.cancelText),33)),fe("span",{class:Ve(I(s)),tabindex:"0",onKeydown:Fe(u,["enter"]),onClick:u},st(t.selectText),43,L1)],64))])],4)}}}),B1=function(t,e){var n=Se(new Date),r=Se(),i=Se(Ot(new Date)),s=Se(ln(new Date)),o=Se(ns(new Date).month),l=Se(ns(new Date).year),u=Se(t.range?[jt(new Date),jt(new Date)]:jt(new Date)),d=Se(t.range?[Wt(new Date),Wt(new Date)]:Wt(new Date)),f=Se(t.range?[0,0]:0);Wr(function(){O(),m.value||(t.startDate&&(i.value=Ot(new Date(t.startDate)),s.value=ln(new Date(t.startDate)),t.twoCalendars&&(o.value=ns(new Date(t.startDate)).month,l.value=ns(new Date(t.startDate)).year)),t.startTime&&v())});var p=function(){var w=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return t.enableSeconds?Array.isArray(f.value)?w?f.value[0]:f.value[1]:f.value:0},v=function(){var w;t.startTime&&(w=t.startTime,Array.isArray(w)?(u.value=[+t.startTime[0].hours,+t.startTime[1].hours],d.value=[+t.startTime[0].minutes,+t.startTime[1].minutes],t.enableSeconds&&(f.value=[+t.startTime[0].seconds,+t.startTime[1].seconds])):(u.value=+t.startTime.hours,d.value=+t.startTime.minutes,t.enableSeconds&&(f.value=+t.startTime.seconds)))},m=ce({get:function(){return t.internalModelValue},set:function(w){t.readonly||t.disabled||e("update:internalModelValue",w)}});cn(m,function(){return O()});var S=function(w){var g=!!t.maxDate&&Fn(tn(w),tn(new Date(t.maxDate))),F=!!t.minDate&&nn(tn(w),tn(new Date(t.minDate))),V=typeof t.disabledDates=="function"?t.disabledDates(w):t.disabledDates.some(function(Ue){return Lt(tn(new Date(Ue)),tn(w))}),ae=t.filters.months.length?t.filters.months.map(function(Ue){return+Ue}):[],ee=ae.includes(Ot(w)),G=!!t.disabledWeekDays.length&&t.disabledWeekDays.some(function(Ue){return+Ue===nI(w)}),le=!!t.allowedDates.length&&!t.allowedDates.some(function(Ue){return Lt(tn(new Date(Ue)),tn(w))}),Te=ln(w),He=Te<+t.yearRange[0]||Te>+t.yearRange[1];return g||F||V||ee||He||G||le},T=function(w){return!!m.value&&!(t.hideOffsetDates&&!w.current)&&!t.range&&Lt(w.value,m.value?m.value:n.value)},A=function(w){i.value=Ot(w),s.value=ln(w)},O=function(){m.value?di(m.value)?(m.value.length===2&&(A(m.value[0]),u.value=[jt(m.value[0]),m.value[1]?jt(m.value[1]):jt(new Date)],d.value=[Wt(m.value[0]),m.value[1]?Wt(m.value[1]):Wt(new Date)],f.value=[Xn(m.value[0]),m.value[1]?Xn(m.value[1]):Xn(new Date)]),t.twoCalendars&&C()):(A(m.value),u.value=jt(m.value),d.value=Wt(m.value),f.value=Xn(m.value)):t.timePicker?(v(),t.range?Bn(u.value)&&Bn(d.value)&&(m.value=[At(new Date,u.value[0],d.value[0],p()),At(new Date,u.value[1],d.value[1],p(!1))]):m.value=At(new Date,u.value,d.value,p())):t.monthPicker&&(m.value=Mr(new Date,i.value,s.value))},k=function(w){var g=Ot(new Date(w)),F=ln(new Date(w)),V=ns(new Date(w));i.value=g,s.value=F,o.value=V.month,l.value=V.year},C=function(){if(Array.isArray(m.value)&&m.value.length===2){var w=new Date(m.value[1]?m.value[1]:Js(m.value[0],1));if(o.value===i.value&&l.value===s.value||!t.twoCalendarsSolo){var g=Dl(i.value,s.value);o.value=g.month,l.value=g.year}else Ot(m.value[0])!==Ot(m.value[1])&&(o.value=Ot(w),l.value=ln(w))}},D=function(w,g){if(!t.twoCalendarsSolo){var F=th(w,g);i.value=F.month,s.value=F.year}},B=function(w,g){if(!t.twoCalendarsSolo){var F=Dl(w,g);o.value=F.month,l.value=F.year}},j=function(w){var g=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],F=arguments.length>2&&arguments[2]!==void 0&&arguments[2];g?F?(D(w,l.value),o.value=w):(B(w,s.value),i.value=w):F?(D(o.value,w),l.value=w):(B(i.value,w),s.value=w),t.monthPicker&&(m.value?m.value=Mr(m.value,i.value,s.value):m.value=Mr(new Date,i.value,s.value))},b=function(w){di(w)&&di(m.value)&&Bn(u.value)&&Bn(d.value)?(w[0]&&m.value[0]&&(m.value[0]=At(w[0],u.value[0],d.value[0],p())),w[1]&&m.value[1]&&(m.value[1]=At(w[1],u.value[1],d.value[1],p(!1)))):t.range||Cc(w)||(m.value=At(w,u.value,d.value,p())),e("timeUpdate")},x=function(w){return!(ah(m.value,t.range)&&m.value[0]&&r.value)||(w?Fn(r.value,m.value[0]):nn(r.value,m.value[0]))},R=function(w){var g=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return t.range&&Cc(m.value)?!(t.hideOffsetDates&&!w.current)&&Lt(new Date(w.value),m.value[g?0:1]):!!t.range&&(Lt(new Date(w.value),m.value&&Array.isArray(m.value)?g?m.value[0]||null:m.value[1]:null)&&(!g||!nn(r.value||null,Array.isArray(m.value)?m.value[0]:null))||Lt(w.value,Array.isArray(m.value)?m.value[0]:null)&&x(g))},H=function(w,g){var F=g?[o.value,l.value]:[i.value,s.value],V=w<0?Dl.apply(void 0,F):th.apply(void 0,F);j(V.month,!0,g),j(V.year,!1,g)};return{today:n,hours:u,month:i,year:s,monthNext:o,yearNext:l,minutes:d,seconds:f,monthYearSelect:function(){var w=arguments.length>0&&arguments[0]!==void 0&&arguments[0];t.autoApply&&t.monthPicker&&e("autoApply",w)},isDisabled:S,updateTime:function(w){var g=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],F=arguments.length>2&&arguments[2]!==void 0&&arguments[2];g?u.value=w:g||F?F&&(f.value=w):d.value=w,m.value?b(m.value):t.timePicker&&b(t.range?[new Date,new Date]:new Date)},setHoverDate:function(w){!w.current&&t.hideOffsetDates||(r.value=w.value)},getWeekNum:function(w){var g=w.find(function(F){return F.current});return g?sI(g.value):""},selectDate:function(w){var g=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!S(w.value)&&(w.current||!t.hideOffsetDates))if(t.range||Bn(u.value)||Bn(d.value)){if(Bn(u.value)&&Bn(d.value)){var F=m.value?m.value.slice():[];F.length===2&&(F=[]),t.autoRange?(g&&k(w.value),F=[new Date(w.value),Nr(new Date(w.value),+t.autoRange)]):F[0]?nn(new Date(w.value),new Date(F[0]))?F.unshift(new Date(w.value)):F[1]=new Date(w.value):F[0]=new Date(w.value),F[0]&&!F[1]?F[0]=At(F[0],u.value[0],d.value[0],p()):(F[0]=At(F[0],u.value[0],d.value[0],p()),F[1]=At(F[1],u.value[1],d.value[1],p(!1))),m.value=F,F[0]&&F[1]&&t.autoApply&&e("autoApply")}}else m.value=At(new Date(w.value),u.value,d.value,p()),t.autoApply&&e("autoApply")},rangeActive:function(w){return di(m.value)&&m.value[0]&&m.value[1]?Fn(w.value,m.value[0])&&nn(w.value,m.value[1]):!!(di(m.value)&&m.value[0]&&r.value)&&(Fn(w.value,m.value[0])&&nn(w.value,r.value)||nn(w.value,m.value[0])&&Fn(w.value,r.value))},isActiveDate:T,updateMonthYear:j,isHoverRangeEnd:function(w){if(t.autoRange){if(r.value){if(t.hideOffsetDates&&!w.current)return!1;var g=Nr(r.value,+t.autoRange);return Lt(g,new Date(w.value))}return!1}return!1},isAutoRangeInBetween:function(w){if(t.autoRange){if(r.value){var g=Nr(r.value,+t.autoRange);return!(t.hideOffsetDates&&!w.current)&&Fn(w.value,r.value)&&nn(w.value,g)}return!1}return!1},isAutoRangeStart:function(w){return!!t.autoRange&&!!r.value&&!(t.hideOffsetDates&&!w.current)&&Lt(r.value,w.value)},clearHoverDate:function(){r.value=null},rangeActiveStartEnd:R,handleScroll:function(w){var g=arguments.length>1&&arguments[1]!==void 0&&arguments[1];t.monthChangeOnScroll&&H(t.monthChangeOnScroll==="inverse"?-w.deltaY:w.deltaY,g)},getMarker:function(w){return t.markers.find(function(g){return Lt(tn(new Date(w.value)),tn(new Date(g.date)))})},handleArrow:function(w){var g=arguments.length>1&&arguments[1]!==void 0&&arguments[1];t.monthChangeOnArrows&&H(w==="right"?-1:1,g)},selectCurrentDate:function(){t.range?ah(m.value,t.range)&&(m.value&&m.value[0]?m.value=nn(new Date,m.value[0])?[new Date,m.value[0]]:[m.value[0],new Date]:m.value=[new Date]):e("update:internalModelValue",new Date),t.autoApply&&e("selectDate")},isHoverDate:function(w,g){return(!Array.isArray(t.internalModelValue)||!t.internalModelValue.length)&&!(w||T(g)||!g.current&&t.hideOffsetDates||t.range&&(R(g)||R(g,!1)))},isHoverDateStartEnd:function(w,g,F){return!(!Array.isArray(t.internalModelValue)||!t.internalModelValue[0]||t.internalModelValue.length!==1)&&!w&&(F?Fn(t.internalModelValue[0],g.value):nn(t.internalModelValue[0],g.value))}}};function ch(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yo(t){for(var e=1;e=1:p.value.length===2:!!p.value)}}},j1=typeof window!="undefined"?window:void 0,xl=function(){},W1=function(t,e,n,r){if(!t)return xl;var i,s=xl,o=cn(function(){return I(t)},function(u){s(),u&&(u.addEventListener(e,n,r),s=function(){u.removeEventListener(e,n,r),s=xl})},{immediate:!0,flush:"post"}),l=function(){o(),s()};return i=l,Cb()&&Sb(i),l};function uh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function q1(t){for(var e=1;e0&&arguments[0]!==void 0)||arguments[0],$=$t(be);if($){var X=$.getBoundingClientRect(),Q=X.left,q=X.width,te=X.height,N=(z?y($):pe($)).top,J={top:"".concat(te+N+10,"px"),left:"",transform:"none"};re===Ss.left&&(J.left="".concat(Q,"px")),re===Ss.right&&(J.left="".concat(Q+q,"px"),J.transform="translateX(-100%)"),re===Ss.center&&(J.left="".concat(Q+q/2,"px"),J.transform="translateX(-50%)"),ve.value=J,M&&P()}},P=function(){var M=$t(be);if(M){var $=M.getBoundingClientRect(),X=$.height,Q=$.top,q=(z?y(M):pe(M)).top,te=window.innerHeight-Q-X,N=$t(se);if(N){var J=N.getBoundingClientRect().height,U=J+X;U>Q&&U>te?Qte?(ve.value.top="".concat(q-J-10,"px"),de.value=!0):(E(!1),de.value=!1)}}};return{openOnTop:de,menuPosition:ve,setMenuPosition:E,recalculatePosition:P}}(i.position,i.altPosition,u,d),S=m.openOnTop,T=m.menuPosition,A=m.setMenuPosition,O=m.recalculatePosition,k=V1(i.format,i.timePicker,i.monthPicker,i.range,i.partialRange,i.is24,i.enableTimePicker,i.enableSeconds,f,r),C=k.internalModelValue,D=k.inputValue,B=k.parseExternalModelValue,j=k.emitModelValue,b=k.checkBeforeEmit,x=ce(function(){return{dp__main:!0,dp__theme_dark:i.dark,dp__theme_light:!i.dark,dp__flex_display:i.inline}}),R=ce(function(){return lh(i.format)?i.format:Mg(null,i.is24,i.enableSeconds,i.monthPicker,i.timePicker,i.enableTimePicker)}),H=ce(function(){return i.previewFormat?i.previewFormat:lh(R.value)?R.value:i.format}),w=ce(function(){return typeof i.transitions=="boolean"?!!i.transitions&&ih({}):ih(i.transitions)});Ir("transitions",w);var g=ce(function(){return i.dark?"dp__theme_dark":"dp__theme_light"}),F=ce(function(){return Object.assign({enterSubmit:!0,tabSubmit:!0,openMenu:!0,rangeSeparator:"-"},i.textInputOptions)}),V=ce(function(){return re=i.filters,Object.assign({months:[],years:[],times:{hours:[],minutes:[],seconds:[]}},re);var re}),ae=ce(function(){var re=function(z){var se={hours:jt(new Date),minutes:Wt(new Date),seconds:Xn(new Date)};return Object.assign(se,z)};return i.range?i.startTime&&Array.isArray(i.startTime)?[re(i.startTime[0]),re(i.startTime[1])]:null:i.startTime&&!Array.isArray(i.startTime)?re(i.startTime):null}),ee=function re(){o.value&&(i.closeOnScroll?xe():i.autoPosition?A():window.removeEventListener("scroll",re))},G=function(){o.value&&A()},le=function(){i.disabled||i.readonly||(A(),o.value=!o.value,o.value||We(),o.value&&(r("open"),r("focus")),B(i.modelValue))},Te=function(){D.value="",We(),r("update:modelValue",null),r("cleared"),xe()},He=function(){b()&&(j(),xe())},Ue=function(){var re=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.autoApply){var z=!i.enableTimePicker||Tc(C.value,i.maxTime,i.minTime);z&&(j(),i.closeOnAutoApply&&!re&&xe())}},We=function(){C.value=null},xe=function(){i.inline||(o.value&&(o.value=!1,r("closed"),r("blur")),We(),d.value&&d.value.unFocus())},qe=function(re,z){re?(C.value=re,z&&(He(),r("textSubmit"))):C.value=null},L=function(){i.autoApply&&Tc(C.value,i.maxTime,i.minTime)&&j()};return function(re,z,se){var be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ve=be.window,de=ve===void 0?j1:ve,pe=be.event,y=pe===void 0?"pointerdown":pe;if(de){var E=function(P){var M=$t(re),$=$t(z);M&&$&&(M===P.target||P.composedPath().includes(M)||P.composedPath().includes($)||se(P))};W1(de,y,E,{passive:!0})}}(u,d,xe),n({closeMenu:xe,selectDate:He,clearValue:Te,openMenu:le,onScroll:ee}),function(re,z){return K(),oe("div",{class:Ve(I(x))},[Qe(ZI,wt({ref_key:"inputRef",ref:d},{placeholder:t.placeholder,hideInputIcon:t.hideInputIcon,readonly:t.readonly,disabled:t.disabled,inputClassName:t.inputClassName,clearable:t.clearable,state:t.state,inline:t.inline,textInput:t.textInput,textInputOptions:I(F),range:t.range,isMenuOpen:o.value,pattern:I(R),autoApply:t.autoApply,uid:t.uid,openMenuOnFocus:t.openMenuOnFocus,required:t.required},{"input-value":I(D),"onUpdate:input-value":z[0]||(z[0]=function(se){return Xe(D)?D.value=se:null}),onClear:Te,onOpen:le,onSetInputDate:qe,onSetEmptyDate:I(j),onSelectDate:He,onClose:xe}),ft({_:2},[dt(I(v),function(se,be){return{name:se,fn:$e(function(ve){return[he(re.$slots,se,An(un(ve)))]})}})]),1040,["input-value","onSetEmptyDate"]),o.value?(K(),Pe(zw,{key:0,to:t.teleport,disabled:t.inline},[o.value?(K(),Pe(F1,wt({key:0,ref_key:"dpMenuRef",ref:u,class:I(g),style:I(T)},{weekNumbers:t.weekNumbers,weekStart:t.weekStart,disableMonthYearSelect:t.disableMonthYearSelect,menuClassName:t.menuClassName,calendarClassName:t.calendarClassName,yearRange:t.yearRange,range:t.range,twoCalendars:t.twoCalendars,calendarCellClassName:t.calendarCellClassName,enableTimePicker:t.enableTimePicker,is24:t.is24,hoursIncrement:t.hoursIncrement,minutesIncrement:t.minutesIncrement,hoursGridIncrement:t.hoursGridIncrement,minutesGridIncrement:t.minutesGridIncrement,minDate:t.minDate,maxDate:t.maxDate,autoApply:t.autoApply,selectText:t.selectText,cancelText:t.cancelText,previewFormat:I(H),locale:t.locale,weekNumName:t.weekNumName,disabledDates:t.disabledDates,filters:I(V),minTime:t.minTime,maxTime:t.maxTime,inline:t.inline,openOnTop:I(S),monthPicker:t.monthPicker,timePicker:t.timePicker,monthNameFormat:t.monthNameFormat,startDate:t.startDate,startTime:I(ae),monthYearComponent:t.monthYearComponent,timePickerComponent:t.timePickerComponent,actionRowComponent:t.actionRowComponent,customProps:t.customProps,hideOffsetDates:t.hideOffsetDates,autoRange:t.autoRange,noToday:t.noToday,noHoursOverlay:t.noHoursOverlay,noMinutesOverlay:t.noMinutesOverlay,twoCalendarsSolo:t.twoCalendarsSolo,disabledWeekDays:t.disabledWeekDays,allowedDates:t.allowedDates,showNowButton:t.showNowButton,nowButtonLabel:t.nowButtonLabel,monthChangeOnScroll:t.monthChangeOnScroll,markers:t.markers,uid:t.uid,modeHeight:t.modeHeight,enableSeconds:t.enableSeconds,secondsIncrement:t.secondsIncrement,secondsGridIncrement:t.secondsGridIncrement,noSecondsOverlay:t.noSecondsOverlay,escClose:t.escClose,spaceConfirm:t.spaceConfirm,monthChangeOnArrows:t.monthChangeOnArrows,textInput:t.textInput,disabled:t.disabled,readonly:t.readonly},{internalModelValue:I(C),"onUpdate:internalModelValue":z[1]||(z[1]=function(se){return Xe(C)?C.value=se:null}),onClosePicker:xe,onSelectDate:He,onDpOpen:I(O),onAutoApply:Ue,onTimeUpdate:L}),ft({_:2},[dt(I(p),function(se,be){return{name:se,fn:$e(function(ve){return[he(re.$slots,se,An(un(q1({},ve))))]})}})]),1040,["class","style","internalModelValue","onDpOpen"])):W("",!0)],8,["to","disabled"])):W("",!0)],2)}}}),xx=function(){var t=Y1;return t.install=function(e){e.component("Vue3DatePicker",t)},t}(),vt="top",Pt="bottom",Nt="right",yt="left",Ma="auto",Wi=[vt,Pt,Nt,yt],Ur="start",Pi="end",Rg="clippingParents",Su="viewport",fi="popper",Lg="reference",Sc=Wi.reduce(function(t,e){return t.concat([e+"-"+Ur,e+"-"+Pi])},[]),Au=[].concat(Wi,[Ma]).reduce(function(t,e){return t.concat([e,e+"-"+Ur,e+"-"+Pi])},[]),$g="beforeRead",Bg="read",Ug="afterRead",Hg="beforeMain",Fg="main",Vg="afterMain",jg="beforeWrite",Wg="write",qg="afterWrite",Yg=[$g,Bg,Ug,Hg,Fg,Vg,jg,Wg,qg];function gn(t){return t?(t.nodeName||"").toLowerCase():null}function Xt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ni(t){var e=Xt(t).Element;return t instanceof e||t instanceof Element}function Ht(t){var e=Xt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ou(t){if(typeof ShadowRoot=="undefined")return!1;var e=Xt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function K1(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];!Ht(s)||!gn(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var l=i[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function z1(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=o.reduce(function(u,d){return u[d]="",u},{});!Ht(i)||!gn(i)||(Object.assign(i.style,l),Object.keys(s).forEach(function(u){i.removeAttribute(u)}))})}}var Iu={name:"applyStyles",enabled:!0,phase:"write",fn:K1,effect:z1,requires:["computeStyles"]};function pn(t){return t.split("-")[0]}var Rr=Math.max,na=Math.min,xi=Math.round;function Mi(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(Ht(t)&&e){var s=t.offsetHeight,o=t.offsetWidth;o>0&&(r=xi(n.width)/o||1),s>0&&(i=xi(n.height)/s||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function ku(t){var e=Mi(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Kg(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ou(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function kn(t){return Xt(t).getComputedStyle(t)}function G1(t){return["table","td","th"].indexOf(gn(t))>=0}function ir(t){return((Ni(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ra(t){return gn(t)==="html"?t:t.assignedSlot||t.parentNode||(Ou(t)?t.host:null)||ir(t)}function dh(t){return!Ht(t)||kn(t).position==="fixed"?null:t.offsetParent}function X1(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ht(t)){var r=kn(t);if(r.position==="fixed")return null}var i=Ra(t);for(Ou(i)&&(i=i.host);Ht(i)&&["html","body"].indexOf(gn(i))<0;){var s=kn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function Qs(t){for(var e=Xt(t),n=dh(t);n&&G1(n)&&kn(n).position==="static";)n=dh(n);return n&&(gn(n)==="html"||gn(n)==="body"&&kn(n).position==="static")?e:n||X1(t)||e}function Du(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function As(t,e,n){return Rr(t,na(e,n))}function J1(t,e,n){var r=As(t,e,n);return r>n?n:r}function zg(){return{top:0,right:0,bottom:0,left:0}}function Gg(t){return Object.assign({},zg(),t)}function Xg(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Q1=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Gg(typeof e!="number"?e:Xg(e,Wi))};function Z1(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,l=pn(n.placement),u=Du(l),d=[yt,Nt].indexOf(l)>=0,f=d?"height":"width";if(!(!s||!o)){var p=Q1(i.padding,n),v=ku(s),m=u==="y"?vt:yt,S=u==="y"?Pt:Nt,T=n.rects.reference[f]+n.rects.reference[u]-o[u]-n.rects.popper[f],A=o[u]-n.rects.reference[u],O=Qs(s),k=O?u==="y"?O.clientHeight||0:O.clientWidth||0:0,C=T/2-A/2,D=p[m],B=k-v[f]-p[S],j=k/2-v[f]/2+C,b=As(D,j,B),x=u;n.modifiersData[r]=(e={},e[x]=b,e.centerOffset=b-j,e)}}function ek(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!Kg(e.elements.popper,i)||(e.elements.arrow=i))}var Jg={name:"arrow",enabled:!0,phase:"main",fn:Z1,effect:ek,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ri(t){return t.split("-")[1]}var tk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nk(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:xi(e*i)/i||0,y:xi(n*i)/i||0}}function fh(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,l=t.position,u=t.gpuAcceleration,d=t.adaptive,f=t.roundOffsets,p=t.isFixed,v=o.x,m=v===void 0?0:v,S=o.y,T=S===void 0?0:S,A=typeof f=="function"?f({x:m,y:T}):{x:m,y:T};m=A.x,T=A.y;var O=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),C=yt,D=vt,B=window;if(d){var j=Qs(n),b="clientHeight",x="clientWidth";if(j===Xt(n)&&(j=ir(n),kn(j).position!=="static"&&l==="absolute"&&(b="scrollHeight",x="scrollWidth")),j=j,i===vt||(i===yt||i===Nt)&&s===Pi){D=Pt;var R=p&&j===B&&B.visualViewport?B.visualViewport.height:j[b];T-=R-r.height,T*=u?1:-1}if(i===yt||(i===vt||i===Pt)&&s===Pi){C=Nt;var H=p&&j===B&&B.visualViewport?B.visualViewport.width:j[x];m-=H-r.width,m*=u?1:-1}}var w=Object.assign({position:l},d&&tk),g=f===!0?nk({x:m,y:T}):{x:m,y:T};if(m=g.x,T=g.y,u){var F;return Object.assign({},w,(F={},F[D]=k?"0":"",F[C]=O?"0":"",F.transform=(B.devicePixelRatio||1)<=1?"translate("+m+"px, "+T+"px)":"translate3d("+m+"px, "+T+"px, 0)",F))}return Object.assign({},w,(e={},e[D]=k?T+"px":"",e[C]=O?m+"px":"",e.transform="",e))}function rk(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,l=n.roundOffsets,u=l===void 0?!0:l,d={placement:pn(e.placement),variation:Ri(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,fh(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,fh(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Pu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rk,data:{}},_o={passive:!0};function ik(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,l=o===void 0?!0:o,u=Xt(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&d.forEach(function(f){f.addEventListener("scroll",n.update,_o)}),l&&u.addEventListener("resize",n.update,_o),function(){s&&d.forEach(function(f){f.removeEventListener("scroll",n.update,_o)}),l&&u.removeEventListener("resize",n.update,_o)}}var Nu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ik,data:{}},sk={left:"right",right:"left",bottom:"top",top:"bottom"};function xo(t){return t.replace(/left|right|bottom|top/g,function(e){return sk[e]})}var ok={start:"end",end:"start"};function hh(t){return t.replace(/start|end/g,function(e){return ok[e]})}function xu(t){var e=Xt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Mu(t){return Mi(ir(t)).left+xu(t).scrollLeft}function ak(t){var e=Xt(t),n=ir(t),r=e.visualViewport,i=n.clientWidth,s=n.clientHeight,o=0,l=0;return r&&(i=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,l=r.offsetTop)),{width:i,height:s,x:o+Mu(t),y:l}}function lk(t){var e,n=ir(t),r=xu(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=Rr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Rr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Mu(t),u=-r.scrollTop;return kn(i||n).direction==="rtl"&&(l+=Rr(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:l,y:u}}function Ru(t){var e=kn(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Qg(t){return["html","body","#document"].indexOf(gn(t))>=0?t.ownerDocument.body:Ht(t)&&Ru(t)?t:Qg(Ra(t))}function Os(t,e){var n;e===void 0&&(e=[]);var r=Qg(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=Xt(r),o=i?[s].concat(s.visualViewport||[],Ru(r)?r:[]):r,l=e.concat(o);return i?l:l.concat(Os(Ra(o)))}function Ac(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ck(t){var e=Mi(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ph(t,e){return e===Su?Ac(ak(t)):Ni(e)?ck(e):Ac(lk(ir(t)))}function uk(t){var e=Os(Ra(t)),n=["absolute","fixed"].indexOf(kn(t).position)>=0,r=n&&Ht(t)?Qs(t):t;return Ni(r)?e.filter(function(i){return Ni(i)&&Kg(i,r)&&gn(i)!=="body"}):[]}function dk(t,e,n){var r=e==="clippingParents"?uk(t):[].concat(e),i=[].concat(r,[n]),s=i[0],o=i.reduce(function(l,u){var d=ph(t,u);return l.top=Rr(d.top,l.top),l.right=na(d.right,l.right),l.bottom=na(d.bottom,l.bottom),l.left=Rr(d.left,l.left),l},ph(t,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Zg(t){var e=t.reference,n=t.element,r=t.placement,i=r?pn(r):null,s=r?Ri(r):null,o=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,u;switch(i){case vt:u={x:o,y:e.y-n.height};break;case Pt:u={x:o,y:e.y+e.height};break;case Nt:u={x:e.x+e.width,y:l};break;case yt:u={x:e.x-n.width,y:l};break;default:u={x:e.x,y:e.y}}var d=i?Du(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(s){case Ur:u[d]=u[d]-(e[f]/2-n[f]/2);break;case Pi:u[d]=u[d]+(e[f]/2-n[f]/2);break}}return u}function Li(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.boundary,o=s===void 0?Rg:s,l=n.rootBoundary,u=l===void 0?Su:l,d=n.elementContext,f=d===void 0?fi:d,p=n.altBoundary,v=p===void 0?!1:p,m=n.padding,S=m===void 0?0:m,T=Gg(typeof S!="number"?S:Xg(S,Wi)),A=f===fi?Lg:fi,O=t.rects.popper,k=t.elements[v?A:f],C=dk(Ni(k)?k:k.contextElement||ir(t.elements.popper),o,u),D=Mi(t.elements.reference),B=Zg({reference:D,element:O,strategy:"absolute",placement:i}),j=Ac(Object.assign({},O,B)),b=f===fi?j:D,x={top:C.top-b.top+T.top,bottom:b.bottom-C.bottom+T.bottom,left:C.left-b.left+T.left,right:b.right-C.right+T.right},R=t.modifiersData.offset;if(f===fi&&R){var H=R[i];Object.keys(x).forEach(function(w){var g=[Nt,Pt].indexOf(w)>=0?1:-1,F=[vt,Pt].indexOf(w)>=0?"y":"x";x[w]+=H[F]*g})}return x}function fk(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?Au:u,f=Ri(r),p=f?l?Sc:Sc.filter(function(S){return Ri(S)===f}):Wi,v=p.filter(function(S){return d.indexOf(S)>=0});v.length===0&&(v=p);var m=v.reduce(function(S,T){return S[T]=Li(t,{placement:T,boundary:i,rootBoundary:s,padding:o})[pn(T)],S},{});return Object.keys(m).sort(function(S,T){return m[S]-m[T]})}function hk(t){if(pn(t)===Ma)return[];var e=xo(t);return[hh(t),e,hh(e)]}function pk(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,d=n.padding,f=n.boundary,p=n.rootBoundary,v=n.altBoundary,m=n.flipVariations,S=m===void 0?!0:m,T=n.allowedAutoPlacements,A=e.options.placement,O=pn(A),k=O===A,C=u||(k||!S?[xo(A)]:hk(A)),D=[A].concat(C).reduce(function(qe,L){return qe.concat(pn(L)===Ma?fk(e,{placement:L,boundary:f,rootBoundary:p,padding:d,flipVariations:S,allowedAutoPlacements:T}):L)},[]),B=e.rects.reference,j=e.rects.popper,b=new Map,x=!0,R=D[0],H=0;H=0,ae=V?"width":"height",ee=Li(e,{placement:w,boundary:f,rootBoundary:p,altBoundary:v,padding:d}),G=V?F?Nt:yt:F?Pt:vt;B[ae]>j[ae]&&(G=xo(G));var le=xo(G),Te=[];if(s&&Te.push(ee[g]<=0),l&&Te.push(ee[G]<=0,ee[le]<=0),Te.every(function(qe){return qe})){R=w,x=!1;break}b.set(w,Te)}if(x)for(var He=S?3:1,Ue=function(L){var re=D.find(function(z){var se=b.get(z);if(se)return se.slice(0,L).every(function(be){return be})});if(re)return R=re,"break"},We=He;We>0;We--){var xe=Ue(We);if(xe==="break")break}e.placement!==R&&(e.modifiersData[r]._skip=!0,e.placement=R,e.reset=!0)}}var ev={name:"flip",enabled:!0,phase:"main",fn:pk,requiresIfExists:["offset"],data:{_skip:!1}};function mh(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function gh(t){return[vt,Nt,Pt,yt].some(function(e){return t[e]>=0})}function mk(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=Li(e,{elementContext:"reference"}),l=Li(e,{altBoundary:!0}),u=mh(o,r),d=mh(l,i,s),f=gh(u),p=gh(d);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var tv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mk};function gk(t,e,n){var r=pn(t),i=[yt,vt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],l=s[1];return o=o||0,l=(l||0)*i,[yt,Nt].indexOf(r)>=0?{x:l,y:o}:{x:o,y:l}}function vk(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=Au.reduce(function(f,p){return f[p]=gk(p,e.rects,s),f},{}),l=o[e.placement],u=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=o}var nv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vk};function yk(t){var e=t.state,n=t.name;e.modifiersData[n]=Zg({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Lu={name:"popperOffsets",enabled:!0,phase:"read",fn:yk,data:{}};function _k(t){return t==="x"?"y":"x"}function bk(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.padding,v=n.tether,m=v===void 0?!0:v,S=n.tetherOffset,T=S===void 0?0:S,A=Li(e,{boundary:u,rootBoundary:d,padding:p,altBoundary:f}),O=pn(e.placement),k=Ri(e.placement),C=!k,D=Du(O),B=_k(D),j=e.modifiersData.popperOffsets,b=e.rects.reference,x=e.rects.popper,R=typeof T=="function"?T(Object.assign({},e.rects,{placement:e.placement})):T,H=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),w=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,g={x:0,y:0};if(!!j){if(s){var F,V=D==="y"?vt:yt,ae=D==="y"?Pt:Nt,ee=D==="y"?"height":"width",G=j[D],le=G+A[V],Te=G-A[ae],He=m?-x[ee]/2:0,Ue=k===Ur?b[ee]:x[ee],We=k===Ur?-x[ee]:-b[ee],xe=e.elements.arrow,qe=m&&xe?ku(xe):{width:0,height:0},L=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:zg(),re=L[V],z=L[ae],se=As(0,b[ee],qe[ee]),be=C?b[ee]/2-He-se-re-H.mainAxis:Ue-se-re-H.mainAxis,ve=C?-b[ee]/2+He+se+z+H.mainAxis:We+se+z+H.mainAxis,de=e.elements.arrow&&Qs(e.elements.arrow),pe=de?D==="y"?de.clientTop||0:de.clientLeft||0:0,y=(F=w==null?void 0:w[D])!=null?F:0,E=G+be-y-pe,P=G+ve-y,M=As(m?na(le,E):le,G,m?Rr(Te,P):Te);j[D]=M,g[D]=M-G}if(l){var $,X=D==="x"?vt:yt,Q=D==="x"?Pt:Nt,q=j[B],te=B==="y"?"height":"width",N=q+A[X],J=q-A[Q],U=[vt,yt].indexOf(O)!==-1,ie=($=w==null?void 0:w[B])!=null?$:0,ne=U?N:q-b[te]-x[te]-ie+H.altAxis,ye=U?q+b[te]+x[te]-ie-H.altAxis:J,Ne=m&&U?J1(ne,q,ye):As(m?ne:N,q,m?ye:J);j[B]=Ne,g[B]=Ne-q}e.modifiersData[r]=g}}var rv={name:"preventOverflow",enabled:!0,phase:"main",fn:bk,requiresIfExists:["offset"]};function wk(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Ek(t){return t===Xt(t)||!Ht(t)?xu(t):wk(t)}function Tk(t){var e=t.getBoundingClientRect(),n=xi(e.width)/t.offsetWidth||1,r=xi(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Ck(t,e,n){n===void 0&&(n=!1);var r=Ht(e),i=Ht(e)&&Tk(e),s=ir(e),o=Mi(t,i),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((gn(e)!=="body"||Ru(s))&&(l=Ek(e)),Ht(e)?(u=Mi(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=Mu(s))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function Sk(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=e.get(l);u&&i(u)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function Ak(t){var e=Sk(t);return Yg.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function Ok(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Ik(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var vh={placement:"bottom",modifiers:[],strategy:"absolute"};function yh(){for(var t=arguments.length,e=new Array(t),n=0;nt==null?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Lk=t=>{do t+=Math.floor(Math.random()*xk);while(document.getElementById(t));return t},sv=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e},Bu=t=>{const e=sv(t);return e&&document.querySelector(e)?e:null},nr=t=>{const e=sv(t);return e?document.querySelector(e):null},$k=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),i=Number.parseFloat(n);return!r&&!i?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*Mk)},ov=t=>{t.dispatchEvent(new Event(Oc))},Hr=t=>!t||typeof t!="object"?!1:(typeof t.jquery!="undefined"&&(t=t[0]),typeof t.nodeType!="undefined"),rr=t=>Hr(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(t):null,yn=(t,e,n)=>{Object.keys(n).forEach(r=>{const i=n[r],s=e[r],o=s&&Hr(s)?"element":Rk(s);if(!new RegExp(i).test(o))throw new TypeError(`${t.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)})},Zs=t=>!Hr(t)||t.getClientRects().length===0?!1:getComputedStyle(t).getPropertyValue("visibility")==="visible",Lr=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled!="undefined"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",av=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?av(t.parentNode):null},ra=()=>{},qi=t=>{t.offsetHeight},lv=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},Ml=[],Bk=t=>{document.readyState==="loading"?(Ml.length||document.addEventListener("DOMContentLoaded",()=>{Ml.forEach(e=>e())}),Ml.push(t)):t()},Et=()=>document.documentElement.dir==="rtl",Ft=t=>{Bk(()=>{const e=lv();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},Tr=t=>{typeof t=="function"&&t()},cv=(t,e,n=!0)=>{if(!n){Tr(t);return}const r=5,i=$k(e)+r;let s=!1;const o=({target:l})=>{l===e&&(s=!0,e.removeEventListener(Oc,o),Tr(t))};e.addEventListener(Oc,o),setTimeout(()=>{s||ov(e)},i)},uv=(t,e,n,r)=>{let i=t.indexOf(e);if(i===-1)return t[!n&&r?t.length-1:0];const s=t.length;return i+=n?1:-1,r&&(i=(i+s)%s),t[Math.max(0,Math.min(i,s-1))]},Uk=/[^.]*(?=\..*)\.|.*/,Hk=/\..*/,Fk=/::\d+$/,Rl={};let _h=1;const Vk={mouseenter:"mouseover",mouseleave:"mouseout"},jk=/^(mouseenter|mouseleave)/i,dv=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 fv(t,e){return e&&`${e}::${_h++}`||t.uidEvent||_h++}function hv(t){const e=fv(t);return t.uidEvent=e,Rl[e]=Rl[e]||{},Rl[e]}function Wk(t,e){return function n(r){return r.delegateTarget=t,n.oneOff&&Z.off(t,r.type,e),e.apply(t,[r])}}function qk(t,e,n){return function r(i){const s=t.querySelectorAll(e);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let l=s.length;l--;)if(s[l]===o)return i.delegateTarget=o,r.oneOff&&Z.off(t,i.type,e,n),n.apply(o,[i]);return null}}function pv(t,e,n=null){const r=Object.keys(t);for(let i=0,s=r.length;ifunction(T){if(!T.relatedTarget||T.relatedTarget!==T.delegateTarget&&!T.delegateTarget.contains(T.relatedTarget))return S.call(this,T)};r?r=m(r):n=m(n)}const[s,o,l]=mv(e,n,r),u=hv(t),d=u[l]||(u[l]={}),f=pv(d,o,s?n:null);if(f){f.oneOff=f.oneOff&&i;return}const p=fv(o,e.replace(Uk,"")),v=s?qk(t,n,r):Wk(t,n);v.delegationSelector=s?n:null,v.originalHandler=o,v.oneOff=i,v.uidEvent=p,d[p]=v,t.addEventListener(l,v,s)}function Ic(t,e,n,r,i){const s=pv(e[n],r,i);!s||(t.removeEventListener(n,s,Boolean(i)),delete e[n][s.uidEvent])}function Yk(t,e,n,r){const i=e[n]||{};Object.keys(i).forEach(s=>{if(s.includes(r)){const o=i[s];Ic(t,e,n,o.originalHandler,o.delegationSelector)}})}function gv(t){return t=t.replace(Hk,""),Vk[t]||t}const Z={on(t,e,n,r){bh(t,e,n,r,!1)},one(t,e,n,r){bh(t,e,n,r,!0)},off(t,e,n,r){if(typeof e!="string"||!t)return;const[i,s,o]=mv(e,n,r),l=o!==e,u=hv(t),d=e.startsWith(".");if(typeof s!="undefined"){if(!u||!u[o])return;Ic(t,u,o,s,i?n:null);return}d&&Object.keys(u).forEach(p=>{Yk(t,u,p,e.slice(1))});const f=u[o]||{};Object.keys(f).forEach(p=>{const v=p.replace(Fk,"");if(!l||e.includes(v)){const m=f[p];Ic(t,u,o,m.originalHandler,m.delegationSelector)}})},trigger(t,e,n){if(typeof e!="string"||!t)return null;const r=lv(),i=gv(e),s=e!==i,o=dv.has(i);let l,u=!0,d=!0,f=!1,p=null;return s&&r&&(l=r.Event(e,n),r(t).trigger(l),u=!l.isPropagationStopped(),d=!l.isImmediatePropagationStopped(),f=l.isDefaultPrevented()),o?(p=document.createEvent("HTMLEvents"),p.initEvent(i,u,!0)):p=new CustomEvent(e,{bubbles:u,cancelable:!0}),typeof n!="undefined"&&Object.keys(n).forEach(v=>{Object.defineProperty(p,v,{get(){return n[v]}})}),f&&p.preventDefault(),d&&t.dispatchEvent(p),p.defaultPrevented&&typeof l!="undefined"&&l.preventDefault(),p}},Un=new Map,Is={set(t,e,n){Un.has(t)||Un.set(t,new Map);const r=Un.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,n)},get(t,e){return Un.has(t)&&Un.get(t).get(e)||null},remove(t,e){if(!Un.has(t))return;const n=Un.get(t);n.delete(e),n.size===0&&Un.delete(t)}},Kk="5.1.3";class Jt{constructor(e){e=rr(e),e&&(this._element=e,Is.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Is.remove(this._element,this.constructor.DATA_KEY),Z.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(e=>{this[e]=null})}_queueCallback(e,n,r=!0){cv(e,n,r)}static getInstance(e){return Is.get(rr(e),this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return Kk}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const $a=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;Z.on(document,n,`[data-bs-dismiss="${r}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Lr(this))return;const s=nr(this)||this.closest(`.${r}`);t.getOrCreateInstance(s)[e]()})},zk="alert",Gk="bs.alert",vv=`.${Gk}`,Xk=`close${vv}`,Jk=`closed${vv}`,Qk="fade",Zk="show";class Ba extends Jt{static get NAME(){return zk}close(){if(Z.trigger(this._element,Xk).defaultPrevented)return;this._element.classList.remove(Zk);const n=this._element.classList.contains(Qk);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),Z.trigger(this._element,Jk),this.dispose()}static jQueryInterface(e){return this.each(function(){const n=Ba.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}$a(Ba,"close");Ft(Ba);const eD="button",tD="bs.button",nD=`.${tD}`,rD=".data-api",iD="active",wh='[data-bs-toggle="button"]',sD=`click${nD}${rD}`;class Ua extends Jt{static get NAME(){return eD}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(iD))}static jQueryInterface(e){return this.each(function(){const n=Ua.getOrCreateInstance(this);e==="toggle"&&n[e]()})}}Z.on(document,sD,wh,t=>{t.preventDefault();const e=t.target.closest(wh);Ua.getOrCreateInstance(e).toggle()});Ft(Ua);function Eh(t){return t==="true"?!0:t==="false"?!1:t===Number(t).toString()?Number(t):t===""||t==="null"?null:t}function Ll(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const lt={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${Ll(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Ll(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(n=>n.startsWith("bs")).forEach(n=>{let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),e[r]=Eh(t.dataset[n])}),e},getDataAttribute(t,e){return Eh(t.getAttribute(`data-bs-${Ll(e)}`))},offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position(t){return{top:t.offsetTop,left:t.offsetLeft}}},oD=3,we={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(n=>n.matches(e))},parents(t,e){const n=[];let r=t.parentNode;for(;r&&r.nodeType===Node.ELEMENT_NODE&&r.nodeType!==oD;)r.matches(e)&&n.push(r),r=r.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(", ");return this.find(e,t).filter(n=>!Lr(n)&&Zs(n))}},Th="carousel",aD="bs.carousel",Mt=`.${aD}`,yv=".data-api",lD="ArrowLeft",cD="ArrowRight",uD=500,dD=40,Ch={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},fD={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},hr="next",pr="prev",br="left",hs="right",hD={[lD]:hs,[cD]:br},pD=`slide${Mt}`,Sh=`slid${Mt}`,mD=`keydown${Mt}`,gD=`mouseenter${Mt}`,vD=`mouseleave${Mt}`,yD=`touchstart${Mt}`,_D=`touchmove${Mt}`,bD=`touchend${Mt}`,wD=`pointerdown${Mt}`,ED=`pointerup${Mt}`,TD=`dragstart${Mt}`,CD=`load${Mt}${yv}`,SD=`click${Mt}${yv}`,AD="carousel",mr="active",OD="slide",ID="carousel-item-end",kD="carousel-item-start",DD="carousel-item-next",PD="carousel-item-prev",ND="pointer-event",xD=".active",bo=".active.carousel-item",MD=".carousel-item",RD=".carousel-item img",LD=".carousel-item-next, .carousel-item-prev",$D=".carousel-indicators",BD="[data-bs-target]",UD="[data-bs-slide], [data-bs-slide-to]",HD='[data-bs-ride="carousel"]',FD="touch",VD="pen";class Sn extends Jt{constructor(e,n){super(e);this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(n),this._indicatorsElement=we.findOne($D,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Ch}static get NAME(){return Th}next(){this._slide(hr)}nextWhenVisible(){!document.hidden&&Zs(this._element)&&this.next()}prev(){this._slide(pr)}pause(e){e||(this._isPaused=!0),we.findOne(LD,this._element)&&(ov(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=we.findOne(bo,this._element);const n=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding){Z.one(this._element,Sh,()=>this.to(e));return}if(n===e){this.pause(),this.cycle();return}const r=e>n?hr:pr;this._slide(r,this._items[e])}_getConfig(e){return e=Ie(Ie(Ie({},Ch),lt.getDataAttributes(this._element)),typeof e=="object"?e:{}),yn(Th,e,fD),e}_handleSwipe(){const e=Math.abs(this.touchDeltaX);if(e<=dD)return;const n=e/this.touchDeltaX;this.touchDeltaX=0,n&&this._slide(n>0?hs:br)}_addEventListeners(){this._config.keyboard&&Z.on(this._element,mD,e=>this._keydown(e)),this._config.pause==="hover"&&(Z.on(this._element,gD,e=>this.pause(e)),Z.on(this._element,vD,e=>this.cycle(e))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=s=>this._pointerEvent&&(s.pointerType===VD||s.pointerType===FD),n=s=>{e(s)?this.touchStartX=s.clientX:this._pointerEvent||(this.touchStartX=s.touches[0].clientX)},r=s=>{this.touchDeltaX=s.touches&&s.touches.length>1?0:s.touches[0].clientX-this.touchStartX},i=s=>{e(s)&&(this.touchDeltaX=s.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(o=>this.cycle(o),uD+this._config.interval))};we.find(RD,this._element).forEach(s=>{Z.on(s,TD,o=>o.preventDefault())}),this._pointerEvent?(Z.on(this._element,wD,s=>n(s)),Z.on(this._element,ED,s=>i(s)),this._element.classList.add(ND)):(Z.on(this._element,yD,s=>n(s)),Z.on(this._element,_D,s=>r(s)),Z.on(this._element,bD,s=>i(s)))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const n=hD[e.key];n&&(e.preventDefault(),this._slide(n))}_getItemIndex(e){return this._items=e&&e.parentNode?we.find(MD,e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,n){const r=e===hr;return uv(this._items,n,r,this._config.wrap)}_triggerSlideEvent(e,n){const r=this._getItemIndex(e),i=this._getItemIndex(we.findOne(bo,this._element));return Z.trigger(this._element,pD,{relatedTarget:e,direction:n,from:i,to:r})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const n=we.findOne(xD,this._indicatorsElement);n.classList.remove(mr),n.removeAttribute("aria-current");const r=we.find(BD,this._indicatorsElement);for(let i=0;i{Z.trigger(this._element,Sh,{relatedTarget:o,direction:v,from:s,to:l})};if(this._element.classList.contains(OD)){o.classList.add(p),qi(o),i.classList.add(f),o.classList.add(f);const T=()=>{o.classList.remove(f,p),o.classList.add(mr),i.classList.remove(mr,p,f),this._isSliding=!1,setTimeout(S,0)};this._queueCallback(T,i,!0)}else i.classList.remove(mr),o.classList.add(mr),this._isSliding=!1,S();u&&this.cycle()}_directionToOrder(e){return[hs,br].includes(e)?Et()?e===br?pr:hr:e===br?hr:pr:e}_orderToDirection(e){return[hr,pr].includes(e)?Et()?e===pr?br:hs:e===pr?hs:br:e}static carouselInterface(e,n){const r=Sn.getOrCreateInstance(e,n);let{_config:i}=r;typeof n=="object"&&(i=Ie(Ie({},i),n));const s=typeof n=="string"?n:i.slide;if(typeof n=="number")r.to(n);else if(typeof s=="string"){if(typeof r[s]=="undefined")throw new TypeError(`No method named "${s}"`);r[s]()}else i.interval&&i.ride&&(r.pause(),r.cycle())}static jQueryInterface(e){return this.each(function(){Sn.carouselInterface(this,e)})}static dataApiClickHandler(e){const n=nr(this);if(!n||!n.classList.contains(AD))return;const r=Ie(Ie({},lt.getDataAttributes(n)),lt.getDataAttributes(this)),i=this.getAttribute("data-bs-slide-to");i&&(r.interval=!1),Sn.carouselInterface(n,r),i&&Sn.getInstance(n).to(i),e.preventDefault()}}Z.on(document,SD,UD,Sn.dataApiClickHandler);Z.on(window,CD,()=>{const t=we.find(HD);for(let e=0,n=t.length;ed===this._element);l!==null&&u.length&&(this._selector=l,this._triggerArray.push(o))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Oh}static get NAME(){return Ah}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[],n;if(this._config.parent){const d=we.find(kh,this._config.parent);e=we.find(ZD,this._config.parent).filter(f=>!d.includes(f))}const r=we.findOne(this._selector);if(e.length){const d=e.find(f=>r!==f);if(n=d?bi.getInstance(d):null,n&&n._isTransitioning)return}if(Z.trigger(this._element,qD).defaultPrevented)return;e.forEach(d=>{r!==d&&bi.getOrCreateInstance(d,{toggle:!1}).hide(),n||Is.set(d,_v,null)});const s=this._getDimension();this._element.classList.remove(pi),this._element.classList.add(wo),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(wo),this._element.classList.add(pi,$l),this._element.style[s]="",Z.trigger(this._element,YD)},u=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[s]=`${this._element[u]}px`}hide(){if(this._isTransitioning||!this._isShown()||Z.trigger(this._element,KD).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,qi(this._element),this._element.classList.add(wo),this._element.classList.remove(pi,$l);const r=this._triggerArray.length;for(let s=0;s{this._isTransitioning=!1,this._element.classList.remove(wo),this._element.classList.add(pi),Z.trigger(this._element,zD)};this._element.style[n]="",this._queueCallback(i,this._element,!0)}_isShown(e=this._element){return e.classList.contains($l)}_getConfig(e){return e=Ie(Ie(Ie({},Oh),lt.getDataAttributes(this._element)),e),e.toggle=Boolean(e.toggle),e.parent=rr(e.parent),yn(Ah,e,WD),e}_getDimension(){return this._element.classList.contains(XD)?JD:QD}_initializeChildren(){if(!this._config.parent)return;const e=we.find(kh,this._config.parent);we.find(kc,this._config.parent).filter(n=>!e.includes(n)).forEach(n=>{const r=nr(n);r&&this._addAriaAndCollapsedClass([n],this._isShown(r))})}_addAriaAndCollapsedClass(e,n){!e.length||e.forEach(r=>{n?r.classList.remove(Ih):r.classList.add(Ih),r.setAttribute("aria-expanded",n)})}static jQueryInterface(e){return this.each(function(){const n={};typeof e=="string"&&/show|hide/.test(e)&&(n.toggle=!1);const r=bi.getOrCreateInstance(this,n);if(typeof e=="string"){if(typeof r[e]=="undefined")throw new TypeError(`No method named "${e}"`);r[e]()}})}}Z.on(document,GD,kc,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();const e=Bu(this);we.find(e).forEach(r=>{bi.getOrCreateInstance(r,{toggle:!1}).toggle()})});Ft(bi);const Bl="dropdown",eP="bs.dropdown",Kr=`.${eP}`,Uu=".data-api",Mo="Escape",Dh="Space",Ph="Tab",Dc="ArrowUp",Ro="ArrowDown",tP=2,nP=new RegExp(`${Dc}|${Ro}|${Mo}`),rP=`hide${Kr}`,iP=`hidden${Kr}`,sP=`show${Kr}`,oP=`shown${Kr}`,bv=`click${Kr}${Uu}`,wv=`keydown${Kr}${Uu}`,aP=`keyup${Kr}${Uu}`,oi="show",lP="dropup",cP="dropend",uP="dropstart",dP="navbar",ks='[data-bs-toggle="dropdown"]',Pc=".dropdown-menu",fP=".navbar-nav",hP=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",pP=Et()?"top-end":"top-start",mP=Et()?"top-start":"top-end",gP=Et()?"bottom-end":"bottom-start",vP=Et()?"bottom-start":"bottom-end",yP=Et()?"left-start":"right-start",_P=Et()?"right-start":"left-start",bP={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},wP={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Bt extends Jt{constructor(e,n){super(e);this._popper=null,this._config=this._getConfig(n),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return bP}static get DefaultType(){return wP}static get NAME(){return Bl}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Lr(this._element)||this._isShown(this._menu))return;const e={relatedTarget:this._element};if(Z.trigger(this._element,sP,e).defaultPrevented)return;const r=Bt.getParentFromElement(this._element);this._inNavbar?lt.setDataAttribute(this._menu,"popper","none"):this._createPopper(r),"ontouchstart"in document.documentElement&&!r.closest(fP)&&[].concat(...document.body.children).forEach(i=>Z.on(i,"mouseover",ra)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(oi),this._element.classList.add(oi),Z.trigger(this._element,oP,e)}hide(){if(Lr(this._element)||!this._isShown(this._menu))return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){Z.trigger(this._element,rP,e).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(r=>Z.off(r,"mouseover",ra)),this._popper&&this._popper.destroy(),this._menu.classList.remove(oi),this._element.classList.remove(oi),this._element.setAttribute("aria-expanded","false"),lt.removeDataAttribute(this._menu,"popper"),Z.trigger(this._element,iP,e))}_getConfig(e){if(e=Ie(Ie(Ie({},this.constructor.Default),lt.getDataAttributes(this._element)),e),yn(Bl,e,this.constructor.DefaultType),typeof e.reference=="object"&&!Hr(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Bl.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(e){if(typeof iv=="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let n=this._element;this._config.reference==="parent"?n=e:Hr(this._config.reference)?n=rr(this._config.reference):typeof this._config.reference=="object"&&(n=this._config.reference);const r=this._getPopperConfig(),i=r.modifiers.find(s=>s.name==="applyStyles"&&s.enabled===!1);this._popper=$u(n,this._menu,r),i&<.setDataAttribute(this._menu,"popper","static")}_isShown(e=this._element){return e.classList.contains(oi)}_getMenuElement(){return we.next(this._element,Pc)[0]}_getPlacement(){const e=this._element.parentNode;if(e.classList.contains(cP))return yP;if(e.classList.contains(uP))return _P;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(lP)?n?mP:pP:n?vP:gP}_detectNavbar(){return this._element.closest(`.${dP}`)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),Ie(Ie({},e),typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig)}_selectMenuItem({key:e,target:n}){const r=we.find(hP,this._menu).filter(Zs);!r.length||uv(r,n,e===Ro,!r.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const n=Bt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}static clearMenus(e){if(e&&(e.button===tP||e.type==="keyup"&&e.key!==Ph))return;const n=we.find(ks);for(let r=0,i=n.length;rn+e),this._setElementAttributes(Nh,"paddingRight",n=>n+e),this._setElementAttributes(xh,"marginRight",n=>n-e)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,r){const i=this.getWidth(),s=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,n);const l=window.getComputedStyle(o)[n];o.style[n]=`${r(Number.parseFloat(l))}px`};this._applyManipulationCallback(e,s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(Nh,"paddingRight"),this._resetElementAttributes(xh,"marginRight")}_saveInitialAttribute(e,n){const r=e.style[n];r&<.setDataAttribute(e,n,r)}_resetElementAttributes(e,n){const r=i=>{const s=lt.getDataAttribute(i,n);typeof s=="undefined"?i.style.removeProperty(n):(lt.removeDataAttribute(i,n),i.style[n]=s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,n){Hr(e)?n(e):we.find(e,this._element).forEach(n)}isOverflowing(){return this.getWidth()>0}}const EP={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},TP={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Ev="backdrop",CP="fade",Mh="show",Rh=`mousedown.bs.${Ev}`;class Tv{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){if(!this._config.isVisible){Tr(e);return}this._append(),this._config.isAnimated&&qi(this._getElement()),this._getElement().classList.add(Mh),this._emulateAnimation(()=>{Tr(e)})}hide(e){if(!this._config.isVisible){Tr(e);return}this._getElement().classList.remove(Mh),this._emulateAnimation(()=>{this.dispose(),Tr(e)})}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(CP),this._element=e}return this._element}_getConfig(e){return e=Ie(Ie({},EP),typeof e=="object"?e:{}),e.rootElement=rr(e.rootElement),yn(Ev,e,TP),e}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),Z.on(this._getElement(),Rh,()=>{Tr(this._config.clickCallback)}),this._isAppended=!0)}dispose(){!this._isAppended||(Z.off(this._element,Rh),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){cv(e,this._getElement(),this._config.isAnimated)}}const SP={trapElement:null,autofocus:!0},AP={trapElement:"element",autofocus:"boolean"},OP="focustrap",IP="bs.focustrap",ia=`.${IP}`,kP=`focusin${ia}`,DP=`keydown.tab${ia}`,PP="Tab",NP="forward",Lh="backward";class Cv{constructor(e){this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:e,autofocus:n}=this._config;this._isActive||(n&&e.focus(),Z.off(document,ia),Z.on(document,kP,r=>this._handleFocusin(r)),Z.on(document,DP,r=>this._handleKeydown(r)),this._isActive=!0)}deactivate(){!this._isActive||(this._isActive=!1,Z.off(document,ia))}_handleFocusin(e){const{target:n}=e,{trapElement:r}=this._config;if(n===document||n===r||r.contains(n))return;const i=we.focusableChildren(r);i.length===0?r.focus():this._lastTabNavDirection===Lh?i[i.length-1].focus():i[0].focus()}_handleKeydown(e){e.key===PP&&(this._lastTabNavDirection=e.shiftKey?Lh:NP)}_getConfig(e){return e=Ie(Ie({},SP),typeof e=="object"?e:{}),yn(OP,e,AP),e}}const $h="modal",xP="bs.modal",Vt=`.${xP}`,MP=".data-api",Bh="Escape",Uh={backdrop:!0,keyboard:!0,focus:!0},RP={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},LP=`hide${Vt}`,$P=`hidePrevented${Vt}`,Sv=`hidden${Vt}`,Av=`show${Vt}`,BP=`shown${Vt}`,Hh=`resize${Vt}`,Fh=`click.dismiss${Vt}`,Vh=`keydown.dismiss${Vt}`,UP=`mouseup.dismiss${Vt}`,jh=`mousedown.dismiss${Vt}`,HP=`click${Vt}${MP}`,Wh="modal-open",FP="fade",qh="show",Ul="modal-static",VP=".modal.show",jP=".modal-dialog",WP=".modal-body",qP='[data-bs-toggle="modal"]';class $i extends Jt{constructor(e,n){super(e);this._config=this._getConfig(n),this._dialog=we.findOne(jP,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Nc}static get Default(){return Uh}static get NAME(){return $h}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||Z.trigger(this._element,Av,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Wh),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),Z.on(this._dialog,jh,()=>{Z.one(this._element,UP,r=>{r.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(e)))}hide(){if(!this._isShown||this._isTransitioning||Z.trigger(this._element,LP).defaultPrevented)return;this._isShown=!1;const n=this._isAnimated();n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(qh),Z.off(this._element,Fh),Z.off(this._dialog,jh),this._queueCallback(()=>this._hideModal(),this._element,n)}dispose(){[window,this._dialog].forEach(e=>Z.off(e,Vt)),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Tv({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Cv({trapElement:this._element})}_getConfig(e){return e=Ie(Ie(Ie({},Uh),lt.getDataAttributes(this._element)),typeof e=="object"?e:{}),yn($h,e,RP),e}_showElement(e){const n=this._isAnimated(),r=we.findOne(WP,this._dialog);(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE)&&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,r&&(r.scrollTop=0),n&&qi(this._element),this._element.classList.add(qh);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,Z.trigger(this._element,BP,{relatedTarget:e})};this._queueCallback(i,this._dialog,n)}_setEscapeEvent(){this._isShown?Z.on(this._element,Vh,e=>{this._config.keyboard&&e.key===Bh?(e.preventDefault(),this.hide()):!this._config.keyboard&&e.key===Bh&&this._triggerBackdropTransition()}):Z.off(this._element,Vh)}_setResizeEvent(){this._isShown?Z.on(window,Hh,()=>this._adjustDialog()):Z.off(window,Hh)}_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(Wh),this._resetAdjustments(),this._scrollBar.reset(),Z.trigger(this._element,Sv)})}_showBackdrop(e){Z.on(this._element,Fh,n=>{if(this._ignoreBackdropClick){this._ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains(FP)}_triggerBackdropTransition(){if(Z.trigger(this._element,$P).defaultPrevented)return;const{classList:n,scrollHeight:r,style:i}=this._element,s=r>document.documentElement.clientHeight;!s&&i.overflowY==="hidden"||n.contains(Ul)||(s||(i.overflowY="hidden"),n.add(Ul),this._queueCallback(()=>{n.remove(Ul),s||this._queueCallback(()=>{i.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),r=n>0;(!r&&e&&!Et()||r&&!e&&Et())&&(this._element.style.paddingLeft=`${n}px`),(r&&!e&&!Et()||!r&&e&&Et())&&(this._element.style.paddingRight=`${n}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){const r=$i.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]=="undefined")throw new TypeError(`No method named "${e}"`);r[e](n)}})}}Z.on(document,HP,qP,function(t){const e=nr(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),Z.one(e,Av,i=>{i.defaultPrevented||Z.one(e,Sv,()=>{Zs(this)&&this.focus()})});const n=we.findOne(VP);n&&$i.getInstance(n).hide(),$i.getOrCreateInstance(e).toggle(this)});$a($i);Ft($i);const Yh="offcanvas",YP="bs.offcanvas",zr=`.${YP}`,Ov=".data-api",KP=`load${zr}${Ov}`,zP="Escape",Kh={backdrop:!0,keyboard:!0,scroll:!1},GP={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},zh="show",XP="offcanvas-backdrop",Iv=".offcanvas.show",JP=`show${zr}`,QP=`shown${zr}`,ZP=`hide${zr}`,kv=`hidden${zr}`,eN=`click${zr}${Ov}`,tN=`keydown.dismiss${zr}`,nN='[data-bs-toggle="offcanvas"]';class Fr extends Jt{constructor(e,n){super(e);this._config=this._getConfig(n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return Yh}static get Default(){return Kh}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||Z.trigger(this._element,JP,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||new Nc().hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(zh);const r=()=>{this._config.scroll||this._focustrap.activate(),Z.trigger(this._element,QP,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||Z.trigger(this._element,ZP).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(zh),this._backdrop.hide();const n=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new Nc().reset(),Z.trigger(this._element,kv)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(e){return e=Ie(Ie(Ie({},Kh),lt.getDataAttributes(this._element)),typeof e=="object"?e:{}),yn(Yh,e,GP),e}_initializeBackDrop(){return new Tv({className:XP,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Cv({trapElement:this._element})}_addEventListeners(){Z.on(this._element,tN,e=>{this._config.keyboard&&e.key===zP&&this.hide()})}static jQueryInterface(e){return this.each(function(){const n=Fr.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}Z.on(document,eN,nN,function(t){const e=nr(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Lr(this))return;Z.one(e,kv,()=>{Zs(this)&&this.focus()});const n=we.findOne(Iv);n&&n!==e&&Fr.getInstance(n).hide(),Fr.getOrCreateInstance(e).toggle(this)});Z.on(window,KP,()=>we.find(Iv).forEach(t=>Fr.getOrCreateInstance(t).show()));$a(Fr);Ft(Fr);const rN=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),iN=/^aria-[\w-]*$/i,sN=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,oN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,aN=(t,e)=>{const n=t.nodeName.toLowerCase();if(e.includes(n))return rN.has(n)?Boolean(sN.test(t.nodeValue)||oN.test(t.nodeValue)):!0;const r=e.filter(i=>i instanceof RegExp);for(let i=0,s=r.length;i{aN(v,p)||u.removeAttribute(v.nodeName)})}return i.body.innerHTML}const Xh="tooltip",cN="bs.tooltip",rn=`.${cN}`,uN="bs-tooltip",dN=new Set(["sanitize","allowList","sanitizeFn"]),fN={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},hN={AUTO:"auto",TOP:"top",RIGHT:Et()?"left":"right",BOTTOM:"bottom",LEFT:Et()?"right":"left"},pN={animation:!0,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:lN,popperConfig:null},mN={HIDE:`hide${rn}`,HIDDEN:`hidden${rn}`,SHOW:`show${rn}`,SHOWN:`shown${rn}`,INSERTED:`inserted${rn}`,CLICK:`click${rn}`,FOCUSIN:`focusin${rn}`,FOCUSOUT:`focusout${rn}`,MOUSEENTER:`mouseenter${rn}`,MOUSELEAVE:`mouseleave${rn}`},Eo="fade",gN="modal",is="show",ss="show",Hl="out",Jh=".tooltip-inner",Qh=`.${gN}`,Zh="hide.bs.modal",os="hover",Fl="focus",vN="click",yN="manual";class Yi extends Jt{constructor(e,n){if(typeof iv=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e);this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(n),this.tip=null,this._setListeners()}static get Default(){return pN}static get NAME(){return Xh}static get Event(){return mN}static get DefaultType(){return fN}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(!!this._isEnabled)if(e){const n=this._initializeOnDelegatedTarget(e);n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(this.getTipElement().classList.contains(is)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),Z.off(this._element.closest(Qh),Zh,this._hideModalHandler),this.tip&&this.tip.remove(),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 e=Z.trigger(this._element,this.constructor.Event.SHOW),n=av(this._element),r=n===null?this._element.ownerDocument.documentElement.contains(this._element):n.contains(this._element);if(e.defaultPrevented||!r)return;this.constructor.NAME==="tooltip"&&this.tip&&this.getTitle()!==this.tip.querySelector(Jh).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const i=this.getTipElement(),s=Lk(this.constructor.NAME);i.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this._config.animation&&i.classList.add(Eo);const o=typeof this._config.placement=="function"?this._config.placement.call(this,i,this._element):this._config.placement,l=this._getAttachment(o);this._addAttachmentClass(l);const{container:u}=this._config;Is.set(i,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(u.append(i),Z.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=$u(this._element,i,this._getPopperConfig(l)),i.classList.add(is);const d=this._resolvePossibleFunction(this._config.customClass);d&&i.classList.add(...d.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(v=>{Z.on(v,"mouseover",ra)});const f=()=>{const v=this._hoverState;this._hoverState=null,Z.trigger(this._element,this.constructor.Event.SHOWN),v===Hl&&this._leave(null,this)},p=this.tip.classList.contains(Eo);this._queueCallback(f,this.tip,p)}hide(){if(!this._popper)return;const e=this.getTipElement(),n=()=>{this._isWithActiveTrigger()||(this._hoverState!==ss&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),Z.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(Z.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(is),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(s=>Z.off(s,"mouseover",ra)),this._activeTrigger[vN]=!1,this._activeTrigger[Fl]=!1,this._activeTrigger[os]=!1;const i=this.tip.classList.contains(Eo);this._queueCallback(n,this.tip,i),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");e.innerHTML=this._config.template;const n=e.children[0];return this.setContent(n),n.classList.remove(Eo,is),this.tip=n,this.tip}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),Jh)}_sanitizeAndSetContent(e,n,r){const i=we.findOne(r,e);if(!n&&i){i.remove();return}this.setElementContent(i,n)}setElementContent(e,n){if(e!==null){if(Hr(n)){n=rr(n),this._config.html?n.parentNode!==e&&(e.innerHTML="",e.append(n)):e.textContent=n.textContent;return}this._config.html?(this._config.sanitize&&(n=Gh(n,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=n):e.textContent=n}}getTitle(){const e=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(e)}updateAttachment(e){return e==="right"?"end":e==="left"?"start":e}_initializeOnDelegatedTarget(e,n){return n||this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_resolvePossibleFunction(e){return typeof e=="function"?e.call(this._element):e}_getPopperConfig(e){const n={placement:e,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:"onChange",enabled:!0,phase:"afterWrite",fn:r=>this._handlePopperPlacementChange(r)}],onFirstUpdate:r=>{r.options.placement!==r.placement&&this._handlePopperPlacementChange(r)}};return Ie(Ie({},n),typeof this._config.popperConfig=="function"?this._config.popperConfig(n):this._config.popperConfig)}_addAttachmentClass(e){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(e)}`)}_getAttachment(e){return hN[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(n=>{if(n==="click")Z.on(this._element,this.constructor.Event.CLICK,this._config.selector,r=>this.toggle(r));else if(n!==yN){const r=n===os?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=n===os?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;Z.on(this._element,r,this._config.selector,s=>this._enter(s)),Z.on(this._element,i,this._config.selector,s=>this._leave(s))}}),this._hideModalHandler=()=>{this._element&&this.hide()},Z.on(this._element.closest(Qh),Zh,this._hideModalHandler),this._config.selector?this._config=oo(Ie({},this._config),{trigger:"manual",selector:""}):this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),n=typeof this._element.getAttribute("data-bs-original-title");(e||n!=="string")&&(this._element.setAttribute("data-bs-original-title",e||""),e&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,n){if(n=this._initializeOnDelegatedTarget(e,n),e&&(n._activeTrigger[e.type==="focusin"?Fl:os]=!0),n.getTipElement().classList.contains(is)||n._hoverState===ss){n._hoverState=ss;return}if(clearTimeout(n._timeout),n._hoverState=ss,!n._config.delay||!n._config.delay.show){n.show();return}n._timeout=setTimeout(()=>{n._hoverState===ss&&n.show()},n._config.delay.show)}_leave(e,n){if(n=this._initializeOnDelegatedTarget(e,n),e&&(n._activeTrigger[e.type==="focusout"?Fl:os]=n._element.contains(e.relatedTarget)),!n._isWithActiveTrigger()){if(clearTimeout(n._timeout),n._hoverState=Hl,!n._config.delay||!n._config.delay.hide){n.hide();return}n._timeout=setTimeout(()=>{n._hoverState===Hl&&n.hide()},n._config.delay.hide)}}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const n=lt.getDataAttributes(this._element);return Object.keys(n).forEach(r=>{dN.has(r)&&delete n[r]}),e=Ie(Ie(Ie({},this.constructor.Default),n),typeof e=="object"&&e?e:{}),e.container=e.container===!1?document.body:rr(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),yn(Xh,e,this.constructor.DefaultType),e.sanitize&&(e.template=Gh(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};for(const n in this._config)this.constructor.Default[n]!==this._config[n]&&(e[n]=this._config[n]);return e}_cleanTipClass(){const e=this.getTipElement(),n=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),r=e.getAttribute("class").match(n);r!==null&&r.length>0&&r.map(i=>i.trim()).forEach(i=>e.classList.remove(i))}_getBasicClassPrefix(){return uN}_handlePopperPlacementChange(e){const{state:n}=e;!n||(this.tip=n.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(n.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(e){return this.each(function(){const n=Yi.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}}Ft(Yi);const _N="popover",bN="bs.popover",sn=`.${bN}`,wN="bs-popover",EN=oo(Ie({},Yi.Default),{placement:"right",offset:[0,8],trigger:"click",content:"",template:'
'}),TN=oo(Ie({},Yi.DefaultType),{content:"(string|element|function)"}),CN={HIDE:`hide${sn}`,HIDDEN:`hidden${sn}`,SHOW:`show${sn}`,SHOWN:`shown${sn}`,INSERTED:`inserted${sn}`,CLICK:`click${sn}`,FOCUSIN:`focusin${sn}`,FOCUSOUT:`focusout${sn}`,MOUSEENTER:`mouseenter${sn}`,MOUSELEAVE:`mouseleave${sn}`},SN=".popover-header",AN=".popover-body";class Hu extends Yi{static get Default(){return EN}static get NAME(){return _N}static get Event(){return CN}static get DefaultType(){return TN}isWithContent(){return this.getTitle()||this._getContent()}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),SN),this._sanitizeAndSetContent(e,this._getContent(),AN)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return wN}static jQueryInterface(e){return this.each(function(){const n=Hu.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}}Ft(Hu);const ep="scrollspy",ON="bs.scrollspy",Ha=`.${ON}`,IN=".data-api",tp={offset:10,method:"auto",target:""},kN={offset:"number",method:"string",target:"(string|element)"},DN=`activate${Ha}`,PN=`scroll${Ha}`,NN=`load${Ha}${IN}`,Dv="dropdown-item",ai="active",xN='[data-bs-spy="scroll"]',MN=".nav, .list-group",xc=".nav-link",RN=".nav-item",Pv=".list-group-item",Vl=`${xc}, ${Pv}, .${Dv}`,LN=".dropdown",$N=".dropdown-toggle",BN="offset",np="position";class Fa extends Jt{constructor(e,n){super(e);this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(n),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,Z.on(this._scrollElement,PN,()=>this._process()),this.refresh(),this._process()}static get Default(){return tp}static get NAME(){return ep}refresh(){const e=this._scrollElement===this._scrollElement.window?BN:np,n=this._config.method==="auto"?e:this._config.method,r=n===np?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),we.find(Vl,this._config.target).map(s=>{const o=Bu(s),l=o?we.findOne(o):null;if(l){const u=l.getBoundingClientRect();if(u.width||u.height)return[lt[n](l).top+r,o]}return null}).filter(s=>s).sort((s,o)=>s[0]-o[0]).forEach(s=>{this._offsets.push(s[0]),this._targets.push(s[1])})}dispose(){Z.off(this._scrollElement,Ha),super.dispose()}_getConfig(e){return e=Ie(Ie(Ie({},tp),lt.getDataAttributes(this._element)),typeof e=="object"&&e?e:{}),e.target=rr(e.target)||document.documentElement,yn(ep,e,kN),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const e=this._getScrollTop()+this._config.offset,n=this._getScrollHeight(),r=this._config.offset+n-this._getOffsetHeight();if(this._scrollHeight!==n&&this.refresh(),e>=r){const i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i);return}if(this._activeTarget&&e0){this._activeTarget=null,this._clear();return}for(let i=this._offsets.length;i--;)this._activeTarget!==this._targets[i]&&e>=this._offsets[i]&&(typeof this._offsets[i+1]=="undefined"||e`${i}[data-bs-target="${e}"],${i}[href="${e}"]`),r=we.findOne(n.join(","),this._config.target);r.classList.add(ai),r.classList.contains(Dv)?we.findOne($N,r.closest(LN)).classList.add(ai):we.parents(r,MN).forEach(i=>{we.prev(i,`${xc}, ${Pv}`).forEach(s=>s.classList.add(ai)),we.prev(i,RN).forEach(s=>{we.children(s,xc).forEach(o=>o.classList.add(ai))})}),Z.trigger(this._scrollElement,DN,{relatedTarget:e})}_clear(){we.find(Vl,this._config.target).filter(e=>e.classList.contains(ai)).forEach(e=>e.classList.remove(ai))}static jQueryInterface(e){return this.each(function(){const n=Fa.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}}Z.on(window,NN,()=>{we.find(xN).forEach(t=>new Fa(t))});Ft(Fa);const UN="tab",HN="bs.tab",to=`.${HN}`,FN=".data-api",VN=`hide${to}`,jN=`hidden${to}`,WN=`show${to}`,qN=`shown${to}`,YN=`click${to}${FN}`,KN="dropdown-menu",as="active",rp="fade",ip="show",zN=".dropdown",GN=".nav, .list-group",sp=".active",op=":scope > li > .active",XN='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',JN=".dropdown-toggle",QN=":scope > .dropdown-menu .active";class Va extends Jt{static get NAME(){return UN}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(as))return;let e;const n=nr(this._element),r=this._element.closest(GN);if(r){const l=r.nodeName==="UL"||r.nodeName==="OL"?op:sp;e=we.find(l,r),e=e[e.length-1]}const i=e?Z.trigger(e,VN,{relatedTarget:this._element}):null;if(Z.trigger(this._element,WN,{relatedTarget:e}).defaultPrevented||i!==null&&i.defaultPrevented)return;this._activate(this._element,r);const o=()=>{Z.trigger(e,jN,{relatedTarget:this._element}),Z.trigger(this._element,qN,{relatedTarget:e})};n?this._activate(n,n.parentNode,o):o()}_activate(e,n,r){const s=(n&&(n.nodeName==="UL"||n.nodeName==="OL")?we.find(op,n):we.children(n,sp))[0],o=r&&s&&s.classList.contains(rp),l=()=>this._transitionComplete(e,s,r);s&&o?(s.classList.remove(ip),this._queueCallback(l,e,!0)):l()}_transitionComplete(e,n,r){if(n){n.classList.remove(as);const s=we.findOne(QN,n.parentNode);s&&s.classList.remove(as),n.getAttribute("role")==="tab"&&n.setAttribute("aria-selected",!1)}e.classList.add(as),e.getAttribute("role")==="tab"&&e.setAttribute("aria-selected",!0),qi(e),e.classList.contains(rp)&&e.classList.add(ip);let i=e.parentNode;if(i&&i.nodeName==="LI"&&(i=i.parentNode),i&&i.classList.contains(KN)){const s=e.closest(zN);s&&we.find(JN,s).forEach(o=>o.classList.add(as)),e.setAttribute("aria-expanded",!0)}r&&r()}static jQueryInterface(e){return this.each(function(){const n=Va.getOrCreateInstance(this);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}}Z.on(document,YN,XN,function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Lr(this))return;Va.getOrCreateInstance(this).show()});Ft(Va);const ap="toast",ZN="bs.toast",sr=`.${ZN}`,ex=`mouseover${sr}`,tx=`mouseout${sr}`,nx=`focusin${sr}`,rx=`focusout${sr}`,ix=`hide${sr}`,sx=`hidden${sr}`,ox=`show${sr}`,ax=`shown${sr}`,lx="fade",lp="hide",ls="show",To="showing",cx={animation:"boolean",autohide:"boolean",delay:"number"},cp={animation:!0,autohide:!0,delay:5e3};class ja extends Jt{constructor(e,n){super(e);this._config=this._getConfig(n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return cx}static get Default(){return cp}static get NAME(){return ap}show(){if(Z.trigger(this._element,ox).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(lx);const n=()=>{this._element.classList.remove(To),Z.trigger(this._element,ax),this._maybeScheduleHide()};this._element.classList.remove(lp),qi(this._element),this._element.classList.add(ls),this._element.classList.add(To),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ls)||Z.trigger(this._element,ix).defaultPrevented)return;const n=()=>{this._element.classList.add(lp),this._element.classList.remove(To),this._element.classList.remove(ls),Z.trigger(this._element,sx)};this._element.classList.add(To),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ls)&&this._element.classList.remove(ls),super.dispose()}_getConfig(e){return e=Ie(Ie(Ie({},cp),lt.getDataAttributes(this._element)),typeof e=="object"&&e?e:{}),yn(ap,e,this.constructor.DefaultType),e}_maybeScheduleHide(){!this._config.autohide||this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n;break}if(n){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){Z.on(this._element,ex,e=>this._onInteraction(e,!0)),Z.on(this._element,tx,e=>this._onInteraction(e,!1)),Z.on(this._element,nx,e=>this._onInteraction(e,!0)),Z.on(this._element,rx,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const n=ja.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}$a(ja);Ft(ja);export{dx as A,fx as B,Ir as C,yx as D,rc as E,Me as F,Dx as G,Ix as H,_x as I,Sx as J,Tx as K,Fe as L,kx as M,xx as N,En as O,W as P,Mn as Q,vx as R,bx as S,dn as T,cn as U,gx as V,Ox as a,wx as b,Ex as c,Ax as d,Gt as e,ce as f,oe as g,fe as h,ht as i,Qe as j,dt as k,Yt as l,I as m,Ve as n,K as o,Pe as p,Nx as q,px as r,Px as s,st as t,Cx as u,he as v,$e as w,Se as x,hx as y,mx as z};
diff --git a/index.html b/index.html
index 2e720f0..e7d5f9c 100644
--- a/index.html
+++ b/index.html
@@ -10,9 +10,9 @@
JM Expense
-
-
-
+
+
+