jplan-pack 0.5.48 → 0.5.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("vue"),zp=require("@vueuse/core"),qe=require("vuetify/lib/components/VBtn/index.mjs"),Zt=require("vuetify/components"),Ys=require("vuetify/lib/components/VIcon/index.mjs"),Bt=require("vuetify/lib/components/VCard/index.mjs"),Ms=require("vuetify/lib/components/VDialog/index.mjs"),Zi=require("vuetify/lib/components/VDivider/index.mjs"),pt=require("vuetify/lib/components/VGrid/index.mjs"),fk=require("vuetify/lib/components/VDataTable/index.mjs"),gk=require("vuetify/lib/components/VCheckbox/index.mjs"),Ut=require("vuetify/lib/components/VList/index.mjs"),Wp=require("vuetify/lib/components/VAvatar/index.mjs"),qp=require("vuetify/lib/components/VImg/index.mjs"),mk=require("vuetify/lib/components/VMenu/index.mjs"),ca=require("vuetify/lib/components/VLabel/index.mjs"),pk=require("vuetify/lib/components/VTextarea/index.mjs"),vk=require("vuetify/lib/components/VBtnToggle/index.mjs"),im=require("vuetify/lib/components/VSelect/index.mjs");var gu=typeof document<"u"?document.currentScript:null;function yk(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Ck=yk(zp),wk={key:0},_k={key:1},yc=u.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(r){const e=r,{copy:t,copied:n,isSupported:i}=zp.useClipboard();return(s,c)=>{const d=u.resolveComponent("CopyIcon");return u.unref(i)?(u.openBlock(),u.createElementBlock("span",wk,[u.createVNode(qe.VBtn,{icon:"",variant:"text",onClick:c[0]||(c[0]=f=>u.unref(t)(e.contentToCopy)),size:s.size,color:s.color},{default:u.withCtx(()=>[u.createVNode(d,{size:s.size},null,8,["size"])]),_:1},8,["size","color"]),u.unref(n)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("p",_k,"Your browser does not support Clipboard API"))}}}),am=u.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):u.createCommentVNode("",!0),typeof e.item=="string"?(u.openBlock(),u.createBlock(Ys.VIcon,{key:1,color:e.color,size:e.size},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.item),1)]),_:1},8,["color","size"])):u.createCommentVNode("",!0)],64))}}),Gp=u.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(r){const e=r,t=u.useSlots();return(n,i)=>n.tooltip?(u.openBlock(),u.createBlock(u.unref(Zt.VTooltip),{key:0,text:n.tooltip,"open-delay":"1000"},{activator:u.withCtx(({props:s})=>[u.createVNode(u.unref(Zt.VBtn),u.mergeProps(s,{variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[0]||(i[0]=c=>n.$emit("click"))}),{default:u.withCtx(()=>[!u.unref(t).default&&s.icon?(u.openBlock(),u.createBlock(am,{key:0,item:s.icon,size:s.size},null,8,["item","size"])):u.createCommentVNode("",!0),u.renderSlot(n.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(u.openBlock(),u.createBlock(u.unref(Zt.VBtn),{key:1,variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[1]||(i[1]=s=>n.$emit("click"))},{default:u.withCtx(()=>[!u.unref(t).default&&e.icon?(u.openBlock(),u.createBlock(am,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):u.createCommentVNode("",!0),u.renderSlot(n.$slots,"default")]),_:3},8,["variant","color","size"]))}}),jp=u.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(r){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Zt.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=n=>e.$emit("click"))},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text)+" ",1),u.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}}),Uo=u.ref({}),Cc=r=>{const e=u.computed(()=>r?Uo.value[r]||!1:Uo.value.default||!1),t=()=>{r?Uo.value[r]=!0:Uo.value.default=!0},n=()=>{r?Uo.value[r]=!1:Uo.value.default=!1};return u.onUnmounted(()=>{n()}),u.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},Tk={class:"d-flex align-center"},Ek={key:1},Sk={class:"ms-auto"},ma=u.defineComponent({__name:"JDialog",props:{dialogId:{},variant:{default:"global"},title:{},text:{},onSave:{},onCancel:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},setup(r){const e=r,t=u.ref(!1),{isDialogActive:n,closeDialog:i}=Cc(e.dialogId);async function s(){e.onCancel&&await e.onCancel(),i()}async function c(){e.onSave&&(t.value=!0,await e.onSave(),t.value=!1),i()}return(d,f)=>{const g=u.resolveComponent("ExclamationCircleIcon");return u.openBlock(),u.createElementBlock(u.Fragment,null,[d.variant==="global"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:0,scrim:e.scrim,width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[0]||(f[0]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.createVNode(Bt.VCard,{rounded:"",loading:t.value},{default:u.withCtx(()=>[u.createVNode(Bt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:u.withCtx(()=>[u.createElementVNode("div",Tk,[d.$slots.title?u.renderSlot(d.$slots,"title",{key:0}):(u.openBlock(),u.createElementBlock("div",Ek,u.toDisplayString(e.title),1))]),u.createElementVNode("div",Sk,[u.renderSlot(d.$slots,"heading-actions"),u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:s,variant:"plain"})])]),_:3}),u.createVNode(Zi.VDivider,{class:"mx-5"}),u.createVNode(Bt.VCardText,{class:"overflow-y-scroll"},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"default")]),_:3}),d.$slots.footer?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createVNode(Zi.VDivider,{class:"mx-5 mt-2"}),u.createVNode(Bt.VCardActions,null,{default:u.withCtx(()=>[u.renderSlot(d.$slots,"footer")]),_:3})],64)):u.createCommentVNode("",!0),e.buttons?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createVNode(Zi.VDivider,{class:"mx-5 mt-2"}),u.createVNode(Bt.VCardActions,null,{default:u.withCtx(()=>[d.$slots.metadata?(u.openBlock(),u.createBlock(pt.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"metadata")]),_:3})):u.createCommentVNode("",!0),u.createVNode(pt.VSpacer),u.createVNode(qe.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:s},{default:u.withCtx(()=>f[3]||(f[3]=[u.createTextVNode(" Cancel ")])),_:1}),u.createVNode(qe.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:c,loading:t.value},{default:u.withCtx(()=>f[4]||(f[4]=[u.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):u.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):u.createCommentVNode("",!0),d.variant==="confirm"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:1,scrim:"background",width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[1]||(f[1]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.createVNode(Bt.VCard,{loading:t.value,title:e.title,rounded:"","min-height":"300"},{prepend:u.withCtx(()=>[u.createVNode(g,{color:"rgb(var(--v-theme-secondary))"})]),append:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:s,variant:"plain"})]),default:u.withCtx(()=>[u.createVNode(Bt.VCardText,{class:"text-center mt-7"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text),1)]),_:1}),u.createVNode(Bt.VCardActions,{class:"d-flex"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:s},{default:u.withCtx(()=>f[5]||(f[5]=[u.createTextVNode(" Cancel ")])),_:1}),u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:c},{default:u.withCtx(()=>f[6]||(f[6]=[u.createTextVNode(" Confirm ")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):u.createCommentVNode("",!0),d.variant==="empty"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:2,scrim:e.scrim,width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[2]||(f[2]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):u.createCommentVNode("",!0)],64)}}});var Yp=!1;function vs(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function mu(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Ak(){return Jp().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Jp(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Ik=typeof Proxy=="function",bk="devtools-plugin:setup",kk="plugin:settings:set";let Bo,Yu;function Rk(){var r;return Bo!==void 0||(typeof window<"u"&&window.performance?(Bo=!0,Yu=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Bo=!0,Yu=globalThis.perf_hooks.performance):Bo=!1),Bo}function Ok(){return Rk()?Yu.now():Date.now()}class Nk{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const c in e.settings){const d=e.settings[c];n[c]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},n);try{const c=localStorage.getItem(i),d=JSON.parse(c);Object.assign(s,d)}catch{}this.fallbacks={getSettings(){return s},setSettings(c){try{localStorage.setItem(i,JSON.stringify(c))}catch{}s=c},now(){return Ok()}},t&&t.on(kk,(c,d)=>{c===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(c,d)=>this.target?this.target.on[d]:(...f)=>{this.onQueue.push({method:d,args:f})}}),this.proxiedTarget=new Proxy({},{get:(c,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...f)=>(this.targetQueue.push({method:d,args:f,resolve:()=>{}}),this.fallbacks[d](...f)):(...f)=>new Promise(g=>{this.targetQueue.push({method:d,args:f,resolve:g})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function Qp(r,e){const t=r,n=Jp(),i=Ak(),s=Ik&&t.enableEarlyProxy;if(i&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(bk,r,e);else{const c=s?new Nk(t,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:c}),c&&e(c.proxiedTarget)}}/*!
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("vue"),zp=require("@vueuse/core"),qe=require("vuetify/lib/components/VBtn/index.mjs"),Zt=require("vuetify/components"),Ys=require("vuetify/lib/components/VIcon/index.mjs"),Bt=require("vuetify/lib/components/VCard/index.mjs"),Ms=require("vuetify/lib/components/VDialog/index.mjs"),Zi=require("vuetify/lib/components/VDivider/index.mjs"),pt=require("vuetify/lib/components/VGrid/index.mjs"),gk=require("vuetify/lib/components/VDataTable/index.mjs"),mk=require("vuetify/lib/components/VCheckbox/index.mjs"),Ut=require("vuetify/lib/components/VList/index.mjs"),Wp=require("vuetify/lib/components/VAvatar/index.mjs"),qp=require("vuetify/lib/components/VImg/index.mjs"),pk=require("vuetify/lib/components/VMenu/index.mjs"),ca=require("vuetify/lib/components/VLabel/index.mjs"),vk=require("vuetify/lib/components/VTextarea/index.mjs"),yk=require("vuetify/lib/components/VBtnToggle/index.mjs"),im=require("vuetify/lib/components/VSelect/index.mjs");var gu=typeof document<"u"?document.currentScript:null;function Ck(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const wk=Ck(zp),_k={key:0},Tk={key:1},yc=u.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(r){const e=r,{copy:t,copied:n,isSupported:i}=zp.useClipboard();return(s,c)=>{const d=u.resolveComponent("CopyIcon");return u.unref(i)?(u.openBlock(),u.createElementBlock("span",_k,[u.createVNode(qe.VBtn,{icon:"",variant:"text",onClick:c[0]||(c[0]=f=>u.unref(t)(e.contentToCopy)),size:s.size,color:s.color},{default:u.withCtx(()=>[u.createVNode(d,{size:s.size},null,8,["size"])]),_:1},8,["size","color"]),u.unref(n)?(u.openBlock(),u.createElementBlock("span",{key:0,style:u.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("p",Tk,"Your browser does not support Clipboard API"))}}}),am=u.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(u.openBlock(),u.createBlock(u.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):u.createCommentVNode("",!0),typeof e.item=="string"?(u.openBlock(),u.createBlock(Ys.VIcon,{key:1,color:e.color,size:e.size},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.item),1)]),_:1},8,["color","size"])):u.createCommentVNode("",!0)],64))}}),Gp=u.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(r){const e=r,t=u.useSlots();return(n,i)=>n.tooltip?(u.openBlock(),u.createBlock(u.unref(Zt.VTooltip),{key:0,text:n.tooltip,"open-delay":"1000"},{activator:u.withCtx(({props:s})=>[u.createVNode(u.unref(Zt.VBtn),u.mergeProps(s,{variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[0]||(i[0]=c=>n.$emit("click"))}),{default:u.withCtx(()=>[!u.unref(t).default&&s.icon?(u.openBlock(),u.createBlock(am,{key:0,item:s.icon,size:s.size},null,8,["item","size"])):u.createCommentVNode("",!0),u.renderSlot(n.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(u.openBlock(),u.createBlock(u.unref(Zt.VBtn),{key:1,variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[1]||(i[1]=s=>n.$emit("click"))},{default:u.withCtx(()=>[!u.unref(t).default&&e.icon?(u.openBlock(),u.createBlock(am,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):u.createCommentVNode("",!0),u.renderSlot(n.$slots,"default")]),_:3},8,["variant","color","size"]))}}),jp=u.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(r){return(e,t)=>(u.openBlock(),u.createBlock(u.unref(Zt.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=n=>e.$emit("click"))},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text)+" ",1),u.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}}),Uo=u.ref({}),Cc=r=>{const e=u.computed(()=>r?Uo.value[r]||!1:Uo.value.default||!1),t=()=>{r?Uo.value[r]=!0:Uo.value.default=!0},n=()=>{r?Uo.value[r]=!1:Uo.value.default=!1};return u.onUnmounted(()=>{n()}),u.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},Ek={class:"d-flex align-center"},Sk={key:1},Ak={class:"ms-auto"},ma=u.defineComponent({__name:"JDialog",props:{dialogId:{},variant:{default:"global"},title:{},text:{},onSave:{},onCancel:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},setup(r){const e=r,t=u.ref(!1),{isDialogActive:n,closeDialog:i}=Cc(e.dialogId);async function s(){e.onCancel&&await e.onCancel(),i()}async function c(){e.onSave&&(t.value=!0,await e.onSave(),t.value=!1),i()}return(d,f)=>{const g=u.resolveComponent("ExclamationCircleIcon");return u.openBlock(),u.createElementBlock(u.Fragment,null,[d.variant==="global"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:0,scrim:e.scrim,width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[0]||(f[0]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.createVNode(Bt.VCard,{rounded:"",loading:t.value},{default:u.withCtx(()=>[u.createVNode(Bt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:u.withCtx(()=>[u.createElementVNode("div",Ek,[d.$slots.title?u.renderSlot(d.$slots,"title",{key:0}):(u.openBlock(),u.createElementBlock("div",Sk,u.toDisplayString(e.title),1))]),u.createElementVNode("div",Ak,[u.renderSlot(d.$slots,"heading-actions"),u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:s,variant:"plain"})])]),_:3}),u.createVNode(Zi.VDivider,{class:"mx-5"}),u.createVNode(Bt.VCardText,{class:"overflow-y-scroll"},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"default")]),_:3}),d.$slots.footer?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createVNode(Zi.VDivider,{class:"mx-5 mt-2"}),u.createVNode(Bt.VCardActions,null,{default:u.withCtx(()=>[u.renderSlot(d.$slots,"footer")]),_:3})],64)):u.createCommentVNode("",!0),e.buttons?(u.openBlock(),u.createElementBlock(u.Fragment,{key:1},[u.createVNode(Zi.VDivider,{class:"mx-5 mt-2"}),u.createVNode(Bt.VCardActions,null,{default:u.withCtx(()=>[d.$slots.metadata?(u.openBlock(),u.createBlock(pt.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"metadata")]),_:3})):u.createCommentVNode("",!0),u.createVNode(pt.VSpacer),u.createVNode(qe.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:s},{default:u.withCtx(()=>f[3]||(f[3]=[u.createTextVNode(" Cancel ")])),_:1}),u.createVNode(qe.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:c,loading:t.value},{default:u.withCtx(()=>f[4]||(f[4]=[u.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):u.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):u.createCommentVNode("",!0),d.variant==="confirm"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:1,scrim:"background",width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[1]||(f[1]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.createVNode(Bt.VCard,{loading:t.value,title:e.title,rounded:"","min-height":"300"},{prepend:u.withCtx(()=>[u.createVNode(g,{color:"rgb(var(--v-theme-secondary))"})]),append:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:s,variant:"plain"})]),default:u.withCtx(()=>[u.createVNode(Bt.VCardText,{class:"text-center mt-7"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text),1)]),_:1}),u.createVNode(Bt.VCardActions,{class:"d-flex"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:s},{default:u.withCtx(()=>f[5]||(f[5]=[u.createTextVNode(" Cancel ")])),_:1}),u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:c},{default:u.withCtx(()=>f[6]||(f[6]=[u.createTextVNode(" Confirm ")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):u.createCommentVNode("",!0),d.variant==="empty"?(u.openBlock(),u.createBlock(Ms.VDialog,{key:2,scrim:e.scrim,width:e.width,modelValue:u.unref(n),"onUpdate:modelValue":f[2]||(f[2]=p=>u.isRef(n)?n.value=p:null),"onClick:outside":s},{default:u.withCtx(()=>[u.renderSlot(d.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):u.createCommentVNode("",!0)],64)}}});var Yp=!1;function vs(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function mu(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Ik(){return Jp().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Jp(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const bk=typeof Proxy=="function",kk="devtools-plugin:setup",Rk="plugin:settings:set";let Bo,Yu;function Ok(){var r;return Bo!==void 0||(typeof window<"u"&&window.performance?(Bo=!0,Yu=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Bo=!0,Yu=globalThis.perf_hooks.performance):Bo=!1),Bo}function Nk(){return Ok()?Yu.now():Date.now()}class Pk{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const c in e.settings){const d=e.settings[c];n[c]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},n);try{const c=localStorage.getItem(i),d=JSON.parse(c);Object.assign(s,d)}catch{}this.fallbacks={getSettings(){return s},setSettings(c){try{localStorage.setItem(i,JSON.stringify(c))}catch{}s=c},now(){return Nk()}},t&&t.on(Rk,(c,d)=>{c===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(c,d)=>this.target?this.target.on[d]:(...f)=>{this.onQueue.push({method:d,args:f})}}),this.proxiedTarget=new Proxy({},{get:(c,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...f)=>(this.targetQueue.push({method:d,args:f,resolve:()=>{}}),this.fallbacks[d](...f)):(...f)=>new Promise(g=>{this.targetQueue.push({method:d,args:f,resolve:g})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function Qp(r,e){const t=r,n=Jp(),i=Ik(),s=bk&&t.enableEarlyProxy;if(i&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(kk,r,e);else{const c=s?new Pk(t,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:c}),c&&e(c.proxiedTarget)}}/*!
2
2
  * pinia v2.2.6
3
3
  * (c) 2024 Eduardo San Martin Morote
4
4
  * @license MIT
5
- */let Gi;const la=r=>Gi=r,Xp=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ui(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Zn;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Zn||(Zn={}));const co=typeof window<"u",sm=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Pk(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function kd(r,e,t){const n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){tv(n.response,e,t)},n.onerror=function(){console.error("could not download file")},n.send()}function Zp(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Ds(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const xs=typeof navigator=="object"?navigator:{userAgent:""},ev=/Macintosh/.test(xs.userAgent)&&/AppleWebKit/.test(xs.userAgent)&&!/Safari/.test(xs.userAgent),tv=co?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ev?Mk:"msSaveOrOpenBlob"in xs?Dk:xk:()=>{};function Mk(r,e="download",t){const n=document.createElement("a");n.download=e,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?Zp(n.href)?kd(r,e,t):(n.target="_blank",Ds(n)):Ds(n)):(n.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){Ds(n)},0))}function Dk(r,e="download",t){if(typeof r=="string")if(Zp(r))kd(r,e,t);else{const n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Ds(n)})}else navigator.msSaveOrOpenBlob(Pk(r,t),e)}function xk(r,e,t,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return kd(r,e,t);const i=r.type==="application/octet-stream",s=/constructor/i.test(String(sm.HTMLElement))||"safari"in sm,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s||ev)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let f=d.result;if(typeof f!="string")throw n=null,new Error("Wrong reader.result type");f=c?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location.assign(f),n=null},d.readAsDataURL(r)}else{const d=URL.createObjectURL(r);n?n.location.assign(d):location.href=d,n=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function ct(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Rd(r){return"_a"in r&&"install"in r}function nv(){if(!("clipboard"in navigator))return ct("Your browser doesn't support the Clipboard API","error"),!0}function rv(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(ct('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Lk(r){if(!nv())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),ct("Global state copied to clipboard.")}catch(e){if(rv(e))return;ct("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Uk(r){if(!nv())try{ov(r,JSON.parse(await navigator.clipboard.readText())),ct("Global state pasted from clipboard.")}catch(e){if(rv(e))return;ct("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function Bk(r){try{tv(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){ct("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let mr;function Fk(){mr||(mr=document.createElement("input"),mr.type="file",mr.accept=".json");function r(){return new Promise((e,t)=>{mr.onchange=async()=>{const n=mr.files;if(!n)return e(null);const i=n.item(0);return e(i?{text:await i.text(),file:i}:null)},mr.oncancel=()=>e(null),mr.onerror=t,mr.click()})}return r}async function Hk(r){try{const t=await Fk()();if(!t)return;const{text:n,file:i}=t;ov(r,JSON.parse(n)),ct(`Global state imported from "${i.name}".`)}catch(e){ct("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function ov(r,e){for(const t in e){const n=r.state.value[t];n?Object.assign(n,e[t]):r.state.value[t]=e[t]}}function Dn(r){return{_custom:{display:r}}}const iv="🍍 Pinia (root)",Ls="_root";function Vk(r){return Rd(r)?{id:Ls,label:iv}:{id:r.$id,label:r.$id}}function $k(r){if(Rd(r)){const t=Array.from(r._s.keys()),n=r._s;return{state:t.map(s=>({editable:!0,key:s,value:r.state.value[s]})),getters:t.filter(s=>n.get(s)._getters).map(s=>{const c=n.get(s);return{editable:!1,key:s,value:c._getters.reduce((d,f)=>(d[f]=c[f],d),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function Kk(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Dn(r.type),key:Dn(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function zk(r){switch(r){case Zn.direct:return"mutation";case Zn.patchFunction:return"$patch";case Zn.patchObject:return"$patch";default:return"unknown"}}let ni=!0;const Us=[],io="pinia:mutations",Et="pinia",{assign:Wk}=Object,Js=r=>"🍍 "+r;function qk(r,e){Qp({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Us,app:r},t=>{typeof t.now!="function"&&ct("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:io,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Et,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Lk(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Uk(e),t.sendInspectorTree(Et),t.sendInspectorState(Et)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Bk(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Hk(e),t.sendInspectorTree(Et),t.sendInspectorState(Et)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:n=>{const i=e._s.get(n);i?typeof i.$reset!="function"?ct(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),ct(`Store "${n}" reset.`)):ct(`Cannot reset "${n}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((n,i)=>{const s=n.componentInstance&&n.componentInstance.proxy;if(s&&s._pStores){const c=n.componentInstance.proxy._pStores;Object.values(c).forEach(d=>{n.instanceData.state.push({type:Js(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:u.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((f,g)=>(f[g]=d.$state[g],f),{})}),d._getters&&d._getters.length&&n.instanceData.state.push({type:Js(d.$id),key:"getters",editable:!1,value:d._getters.reduce((f,g)=>{try{f[g]=d[g]}catch(p){f[g]=p}return f},{})})})}}),t.on.getInspectorTree(n=>{if(n.app===r&&n.inspectorId===Et){let i=[e];i=i.concat(Array.from(e._s.values())),n.rootNodes=(n.filter?i.filter(s=>"$id"in s?s.$id.toLowerCase().includes(n.filter.toLowerCase()):iv.toLowerCase().includes(n.filter.toLowerCase())):i).map(Vk)}}),globalThis.$pinia=e,t.on.getInspectorState(n=>{if(n.app===r&&n.inspectorId===Et){const i=n.nodeId===Ls?e:e._s.get(n.nodeId);if(!i)return;i&&(n.nodeId!==Ls&&(globalThis.$store=u.toRaw(i)),n.state=$k(i))}}),t.on.editInspectorState((n,i)=>{if(n.app===r&&n.inspectorId===Et){const s=n.nodeId===Ls?e:e._s.get(n.nodeId);if(!s)return ct(`store "${n.nodeId}" not found`,"error");const{path:c}=n;Rd(s)?c.unshift("state"):(c.length!==1||!s._customProperties.has(c[0])||c[0]in s.$state)&&c.unshift("$state"),ni=!1,n.set(s,c,n.state.value),ni=!0}}),t.on.editComponentState(n=>{if(n.type.startsWith("🍍")){const i=n.type.replace(/^🍍\s*/,""),s=e._s.get(i);if(!s)return ct(`store "${i}" not found`,"error");const{path:c}=n;if(c[0]!=="state")return ct(`Invalid path for store "${i}":
5
+ */let Gi;const la=r=>Gi=r,Xp=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ui(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Zn;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Zn||(Zn={}));const co=typeof window<"u",sm=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Mk(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function kd(r,e,t){const n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){tv(n.response,e,t)},n.onerror=function(){console.error("could not download file")},n.send()}function Zp(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Ds(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const xs=typeof navigator=="object"?navigator:{userAgent:""},ev=/Macintosh/.test(xs.userAgent)&&/AppleWebKit/.test(xs.userAgent)&&!/Safari/.test(xs.userAgent),tv=co?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ev?Dk:"msSaveOrOpenBlob"in xs?xk:Lk:()=>{};function Dk(r,e="download",t){const n=document.createElement("a");n.download=e,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?Zp(n.href)?kd(r,e,t):(n.target="_blank",Ds(n)):Ds(n)):(n.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){Ds(n)},0))}function xk(r,e="download",t){if(typeof r=="string")if(Zp(r))kd(r,e,t);else{const n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Ds(n)})}else navigator.msSaveOrOpenBlob(Mk(r,t),e)}function Lk(r,e,t,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return kd(r,e,t);const i=r.type==="application/octet-stream",s=/constructor/i.test(String(sm.HTMLElement))||"safari"in sm,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&s||ev)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let f=d.result;if(typeof f!="string")throw n=null,new Error("Wrong reader.result type");f=c?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location.assign(f),n=null},d.readAsDataURL(r)}else{const d=URL.createObjectURL(r);n?n.location.assign(d):location.href=d,n=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function ct(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Rd(r){return"_a"in r&&"install"in r}function nv(){if(!("clipboard"in navigator))return ct("Your browser doesn't support the Clipboard API","error"),!0}function rv(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(ct('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Uk(r){if(!nv())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),ct("Global state copied to clipboard.")}catch(e){if(rv(e))return;ct("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Bk(r){if(!nv())try{ov(r,JSON.parse(await navigator.clipboard.readText())),ct("Global state pasted from clipboard.")}catch(e){if(rv(e))return;ct("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function Fk(r){try{tv(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){ct("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let mr;function Hk(){mr||(mr=document.createElement("input"),mr.type="file",mr.accept=".json");function r(){return new Promise((e,t)=>{mr.onchange=async()=>{const n=mr.files;if(!n)return e(null);const i=n.item(0);return e(i?{text:await i.text(),file:i}:null)},mr.oncancel=()=>e(null),mr.onerror=t,mr.click()})}return r}async function Vk(r){try{const t=await Hk()();if(!t)return;const{text:n,file:i}=t;ov(r,JSON.parse(n)),ct(`Global state imported from "${i.name}".`)}catch(e){ct("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function ov(r,e){for(const t in e){const n=r.state.value[t];n?Object.assign(n,e[t]):r.state.value[t]=e[t]}}function Dn(r){return{_custom:{display:r}}}const iv="🍍 Pinia (root)",Ls="_root";function $k(r){return Rd(r)?{id:Ls,label:iv}:{id:r.$id,label:r.$id}}function Kk(r){if(Rd(r)){const t=Array.from(r._s.keys()),n=r._s;return{state:t.map(s=>({editable:!0,key:s,value:r.state.value[s]})),getters:t.filter(s=>n.get(s)._getters).map(s=>{const c=n.get(s);return{editable:!1,key:s,value:c._getters.reduce((d,f)=>(d[f]=c[f],d),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function zk(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:Dn(r.type),key:Dn(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function Wk(r){switch(r){case Zn.direct:return"mutation";case Zn.patchFunction:return"$patch";case Zn.patchObject:return"$patch";default:return"unknown"}}let ni=!0;const Us=[],io="pinia:mutations",Et="pinia",{assign:qk}=Object,Js=r=>"🍍 "+r;function Gk(r,e){Qp({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Us,app:r},t=>{typeof t.now!="function"&&ct("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:io,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Et,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Uk(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Bk(e),t.sendInspectorTree(Et),t.sendInspectorState(Et)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Fk(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Vk(e),t.sendInspectorTree(Et),t.sendInspectorState(Et)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:n=>{const i=e._s.get(n);i?typeof i.$reset!="function"?ct(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),ct(`Store "${n}" reset.`)):ct(`Cannot reset "${n}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((n,i)=>{const s=n.componentInstance&&n.componentInstance.proxy;if(s&&s._pStores){const c=n.componentInstance.proxy._pStores;Object.values(c).forEach(d=>{n.instanceData.state.push({type:Js(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:u.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((f,g)=>(f[g]=d.$state[g],f),{})}),d._getters&&d._getters.length&&n.instanceData.state.push({type:Js(d.$id),key:"getters",editable:!1,value:d._getters.reduce((f,g)=>{try{f[g]=d[g]}catch(p){f[g]=p}return f},{})})})}}),t.on.getInspectorTree(n=>{if(n.app===r&&n.inspectorId===Et){let i=[e];i=i.concat(Array.from(e._s.values())),n.rootNodes=(n.filter?i.filter(s=>"$id"in s?s.$id.toLowerCase().includes(n.filter.toLowerCase()):iv.toLowerCase().includes(n.filter.toLowerCase())):i).map($k)}}),globalThis.$pinia=e,t.on.getInspectorState(n=>{if(n.app===r&&n.inspectorId===Et){const i=n.nodeId===Ls?e:e._s.get(n.nodeId);if(!i)return;i&&(n.nodeId!==Ls&&(globalThis.$store=u.toRaw(i)),n.state=Kk(i))}}),t.on.editInspectorState((n,i)=>{if(n.app===r&&n.inspectorId===Et){const s=n.nodeId===Ls?e:e._s.get(n.nodeId);if(!s)return ct(`store "${n.nodeId}" not found`,"error");const{path:c}=n;Rd(s)?c.unshift("state"):(c.length!==1||!s._customProperties.has(c[0])||c[0]in s.$state)&&c.unshift("$state"),ni=!1,n.set(s,c,n.state.value),ni=!0}}),t.on.editComponentState(n=>{if(n.type.startsWith("🍍")){const i=n.type.replace(/^🍍\s*/,""),s=e._s.get(i);if(!s)return ct(`store "${i}" not found`,"error");const{path:c}=n;if(c[0]!=="state")return ct(`Invalid path for store "${i}":
6
6
  ${c}
7
- Only state can be modified.`);c[0]="$state",ni=!1,n.set(s,c,n.state.value),ni=!0}})})}function Gk(r,e){Us.includes(Js(e.$id))||Us.push(Js(e.$id)),Qp({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Us,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const n=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:c,onError:d,name:f,args:g})=>{const p=av++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:Dn(e.$id),action:Dn(f),args:g},groupId:p}}),c(w=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛬 "+f,subtitle:"end",data:{store:Dn(e.$id),action:Dn(f),args:g,result:w},groupId:p}})}),d(w=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),logType:"error",title:"💥 "+f,subtitle:"end",data:{store:Dn(e.$id),action:Dn(f),args:g,error:w},groupId:p}})})},!0),e._customProperties.forEach(c=>{u.watch(()=>u.unref(e[c]),(d,f)=>{t.notifyComponentUpdate(),t.sendInspectorState(Et),ni&&t.addTimelineEvent({layerId:io,event:{time:n(),title:"Change",subtitle:c,data:{newValue:d,oldValue:f},groupId:$r}})},{deep:!0})}),e.$subscribe(({events:c,type:d},f)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Et),!ni)return;const g={time:n(),title:zk(d),data:Wk({store:Dn(e.$id)},Kk(c)),groupId:$r};d===Zn.patchFunction?g.subtitle="⤵️":d===Zn.patchObject?g.subtitle="🧩":c&&!Array.isArray(c)&&(g.subtitle=c.type),c&&(g.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),t.addTimelineEvent({layerId:io,event:g})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=u.markRaw(c=>{i(c),t.addTimelineEvent({layerId:io,event:{time:n(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:Dn(e.$id),info:Dn("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et)});const{$dispose:s}=e;e.$dispose=()=>{s(),t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et),t.getSettings().logStoreChanges&&ct(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et),t.getSettings().logStoreChanges&&ct(`"${e.$id}" store installed 🆕`)})}let av=0,$r;function cm(r,e,t){const n=e.reduce((i,s)=>(i[s]=u.toRaw(r)[s],i),{});for(const i in n)r[i]=function(){const s=av,c=t?new Proxy(r,{get(...f){return $r=s,Reflect.get(...f)},set(...f){return $r=s,Reflect.set(...f)}}):r;$r=s;const d=n[i].apply(c,arguments);return $r=void 0,d}}function jk({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){cm(e,Object.keys(t.actions),e._isOptionsAPI);const n=e._hotUpdate;u.toRaw(e)._hotUpdate=function(i){n.apply(this,arguments),cm(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}Gk(r,e)}}function Yk(){const r=u.effectScope(!0),e=r.run(()=>u.ref({}));let t=[],n=[];const i=u.markRaw({install(s){la(i),i._a=s,s.provide(Xp,i),s.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co&&qk(s,i),n.forEach(c=>t.push(c)),n=[]},use(s){return!this._a&&!Yp?n.push(s):t.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&i.use(jk),i}function sv(r,e){for(const t in e){const n=e[t];if(!(t in r))continue;const i=r[t];ui(i)&&ui(n)&&!u.isRef(n)&&!u.isReactive(n)?r[t]=sv(i,n):r[t]=n}return r}const Jk=()=>{};function lm(r,e,t,n=Jk){r.push(e);const i=()=>{const s=r.indexOf(e);s>-1&&(r.splice(s,1),n())};return!t&&u.getCurrentScope()&&u.onScopeDispose(i),i}function Fo(r,...e){r.slice().forEach(t=>{t(...e)})}const Qk=r=>r(),um=Symbol(),pu=Symbol();function cv(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,n)=>r.set(n,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t],i=r[t];ui(i)&&ui(n)&&r.hasOwnProperty(t)&&!u.isRef(n)&&!u.isReactive(n)?r[t]=cv(i,n):r[t]=n}return r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Tn}=Object;function dm(r){return!!(u.isRef(r)&&r.effect)}function hm(r,e,t,n){const{state:i,actions:s,getters:c}=e,d=t.state.value[r];let f;function g(){!d&&(process.env.NODE_ENV==="production"||!n)&&(t.state.value[r]=i?i():{});const p=process.env.NODE_ENV!=="production"&&n?u.toRefs(u.ref(i?i():{}).value):u.toRefs(t.state.value[r]);return Tn(p,s,Object.keys(c||{}).reduce((w,C)=>(process.env.NODE_ENV!=="production"&&C in p&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${C}" in store "${r}".`),w[C]=u.markRaw(u.computed(()=>{la(t);const S=t._s.get(r);return c[C].call(S,S)})),w),{}))}return f=Xk(r,g,e,t,n,!0),f}function Xk(r,e,t={},n,i,s){let c;const d=Tn({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!n._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!Yp&&(f.onTrigger=Y=>{g?S=Y:g==!1&&!W._hotUpdating&&(Array.isArray(S)?S.push(Y):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let g,p,w=[],C=[],S;const T=n.state.value[r],b=u.ref({});let N;function K(Y){let G;g=p=!1,process.env.NODE_ENV!=="production"&&(S=[]),typeof Y=="function"?(Y(n.state.value[r]),G={type:Zn.patchFunction,storeId:r,events:S}):(cv(n.state.value[r],Y),G={type:Zn.patchObject,payload:Y,storeId:r,events:S});const Te=N=Symbol();u.nextTick().then(()=>{N===Te&&(g=!0)}),p=!0,Fo(w,G,n.state.value[r])}const H=function(){const{state:G}=t,Te=G?G():{};this.$patch(Le=>{Tn(Le,Te)})};function V(){c.stop(),w=[],C=[],n._s.delete(r)}const z=(Y,G="")=>{if(um in Y)return Y[pu]=G,Y;const Te=function(){la(n);const Le=Array.from(arguments),vt=[],An=[];function sn(yt){vt.push(yt)}function Nt(yt){An.push(yt)}Fo(C,{args:Le,name:Te[pu],store:W,after:sn,onError:Nt});let Je;try{Je=Y.apply(this&&this.$id===r?this:W,Le)}catch(yt){throw Fo(An,yt),yt}return Je instanceof Promise?Je.then(yt=>(Fo(vt,yt),yt)).catch(yt=>(Fo(An,yt),Promise.reject(yt))):(Fo(vt,Je),Je)};return Te[um]=!0,Te[pu]=G,Te},Q=u.markRaw({actions:{},getters:{},state:[],hotState:b}),we={_p:n,$id:r,$onAction:lm.bind(null,C),$patch:K,$reset:H,$subscribe(Y,G={}){const Te=lm(w,Y,G.detached,()=>Le()),Le=c.run(()=>u.watch(()=>n.state.value[r],vt=>{(G.flush==="sync"?p:g)&&Y({storeId:r,type:Zn.direct,events:S},vt)},Tn({},f,G)));return Te},$dispose:V},W=u.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co?Tn({_hmrPayload:Q,_customProperties:u.markRaw(new Set)},we):we);n._s.set(r,W);const _e=(n._a&&n._a.runWithContext||Qk)(()=>n._e.run(()=>(c=u.effectScope()).run(()=>e({action:z}))));for(const Y in _e){const G=_e[Y];if(u.isRef(G)&&!dm(G)||u.isReactive(G))process.env.NODE_ENV!=="production"&&i&&vs(b.value,Y,u.toRef(_e,Y)),process.env.NODE_ENV!=="production"&&Q.state.push(Y);else if(typeof G=="function"){const Te=process.env.NODE_ENV!=="production"&&i?G:z(G,Y);_e[Y]=Te,process.env.NODE_ENV!=="production"&&(Q.actions[Y]=G),d.actions[Y]=G}else process.env.NODE_ENV!=="production"&&dm(G)&&(Q.getters[Y]=t.getters[Y],co&&(_e._getters||(_e._getters=u.markRaw([]))).push(Y))}if(Tn(W,_e),Tn(u.toRaw(W),_e),Object.defineProperty(W,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?b.value:n.state.value[r],set:Y=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");K(G=>{Tn(G,Y)})}}),process.env.NODE_ENV!=="production"&&(W._hotUpdate=u.markRaw(Y=>{W._hotUpdating=!0,Y._hmrPayload.state.forEach(G=>{if(G in W.$state){const Te=Y.$state[G],Le=W.$state[G];typeof Te=="object"&&ui(Te)&&ui(Le)?sv(Te,Le):Y.$state[G]=Le}vs(W,G,u.toRef(Y.$state,G))}),Object.keys(W.$state).forEach(G=>{G in Y.$state||mu(W,G)}),g=!1,p=!1,n.state.value[r]=u.toRef(Y._hmrPayload,"hotState"),p=!0,u.nextTick().then(()=>{g=!0});for(const G in Y._hmrPayload.actions){const Te=Y[G];vs(W,G,z(Te,G))}for(const G in Y._hmrPayload.getters){const Te=Y._hmrPayload.getters[G],Le=u.computed(()=>(la(n),Te.call(W,W)));vs(W,G,Le)}Object.keys(W._hmrPayload.getters).forEach(G=>{G in Y._hmrPayload.getters||mu(W,G)}),Object.keys(W._hmrPayload.actions).forEach(G=>{G in Y._hmrPayload.actions||mu(W,G)}),W._hmrPayload=Y._hmrPayload,W._getters=Y._getters,W._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const Y={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(G=>{Object.defineProperty(W,G,Tn({value:W[G]},Y))})}return n._p.forEach(Y=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const G=c.run(()=>Y({store:W,app:n._a,pinia:n,options:d}));Object.keys(G||{}).forEach(Te=>W._customProperties.add(Te)),Tn(W,G)}else Tn(W,c.run(()=>Y({store:W,app:n._a,pinia:n,options:d})))}),process.env.NODE_ENV!=="production"&&W.$state&&typeof W.$state=="object"&&typeof W.$state.constructor=="function"&&!W.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
7
+ Only state can be modified.`);c[0]="$state",ni=!1,n.set(s,c,n.state.value),ni=!0}})})}function jk(r,e){Us.includes(Js(e.$id))||Us.push(Js(e.$id)),Qp({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Us,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const n=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:c,onError:d,name:f,args:g})=>{const p=av++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:Dn(e.$id),action:Dn(f),args:g},groupId:p}}),c(w=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛬 "+f,subtitle:"end",data:{store:Dn(e.$id),action:Dn(f),args:g,result:w},groupId:p}})}),d(w=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),logType:"error",title:"💥 "+f,subtitle:"end",data:{store:Dn(e.$id),action:Dn(f),args:g,error:w},groupId:p}})})},!0),e._customProperties.forEach(c=>{u.watch(()=>u.unref(e[c]),(d,f)=>{t.notifyComponentUpdate(),t.sendInspectorState(Et),ni&&t.addTimelineEvent({layerId:io,event:{time:n(),title:"Change",subtitle:c,data:{newValue:d,oldValue:f},groupId:$r}})},{deep:!0})}),e.$subscribe(({events:c,type:d},f)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Et),!ni)return;const g={time:n(),title:Wk(d),data:qk({store:Dn(e.$id)},zk(c)),groupId:$r};d===Zn.patchFunction?g.subtitle="⤵️":d===Zn.patchObject?g.subtitle="🧩":c&&!Array.isArray(c)&&(g.subtitle=c.type),c&&(g.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),t.addTimelineEvent({layerId:io,event:g})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=u.markRaw(c=>{i(c),t.addTimelineEvent({layerId:io,event:{time:n(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:Dn(e.$id),info:Dn("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et)});const{$dispose:s}=e;e.$dispose=()=>{s(),t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et),t.getSettings().logStoreChanges&&ct(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Et),t.sendInspectorState(Et),t.getSettings().logStoreChanges&&ct(`"${e.$id}" store installed 🆕`)})}let av=0,$r;function cm(r,e,t){const n=e.reduce((i,s)=>(i[s]=u.toRaw(r)[s],i),{});for(const i in n)r[i]=function(){const s=av,c=t?new Proxy(r,{get(...f){return $r=s,Reflect.get(...f)},set(...f){return $r=s,Reflect.set(...f)}}):r;$r=s;const d=n[i].apply(c,arguments);return $r=void 0,d}}function Yk({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){cm(e,Object.keys(t.actions),e._isOptionsAPI);const n=e._hotUpdate;u.toRaw(e)._hotUpdate=function(i){n.apply(this,arguments),cm(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}jk(r,e)}}function Jk(){const r=u.effectScope(!0),e=r.run(()=>u.ref({}));let t=[],n=[];const i=u.markRaw({install(s){la(i),i._a=s,s.provide(Xp,i),s.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co&&Gk(s,i),n.forEach(c=>t.push(c)),n=[]},use(s){return!this._a&&!Yp?n.push(s):t.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&i.use(Yk),i}function sv(r,e){for(const t in e){const n=e[t];if(!(t in r))continue;const i=r[t];ui(i)&&ui(n)&&!u.isRef(n)&&!u.isReactive(n)?r[t]=sv(i,n):r[t]=n}return r}const Qk=()=>{};function lm(r,e,t,n=Qk){r.push(e);const i=()=>{const s=r.indexOf(e);s>-1&&(r.splice(s,1),n())};return!t&&u.getCurrentScope()&&u.onScopeDispose(i),i}function Fo(r,...e){r.slice().forEach(t=>{t(...e)})}const Xk=r=>r(),um=Symbol(),pu=Symbol();function cv(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,n)=>r.set(n,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t],i=r[t];ui(i)&&ui(n)&&r.hasOwnProperty(t)&&!u.isRef(n)&&!u.isReactive(n)?r[t]=cv(i,n):r[t]=n}return r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Tn}=Object;function dm(r){return!!(u.isRef(r)&&r.effect)}function hm(r,e,t,n){const{state:i,actions:s,getters:c}=e,d=t.state.value[r];let f;function g(){!d&&(process.env.NODE_ENV==="production"||!n)&&(t.state.value[r]=i?i():{});const p=process.env.NODE_ENV!=="production"&&n?u.toRefs(u.ref(i?i():{}).value):u.toRefs(t.state.value[r]);return Tn(p,s,Object.keys(c||{}).reduce((w,C)=>(process.env.NODE_ENV!=="production"&&C in p&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${C}" in store "${r}".`),w[C]=u.markRaw(u.computed(()=>{la(t);const S=t._s.get(r);return c[C].call(S,S)})),w),{}))}return f=Zk(r,g,e,t,n,!0),f}function Zk(r,e,t={},n,i,s){let c;const d=Tn({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!n._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!Yp&&(f.onTrigger=Y=>{g?S=Y:g==!1&&!W._hotUpdating&&(Array.isArray(S)?S.push(Y):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let g,p,w=[],C=[],S;const T=n.state.value[r],b=u.ref({});let N;function K(Y){let G;g=p=!1,process.env.NODE_ENV!=="production"&&(S=[]),typeof Y=="function"?(Y(n.state.value[r]),G={type:Zn.patchFunction,storeId:r,events:S}):(cv(n.state.value[r],Y),G={type:Zn.patchObject,payload:Y,storeId:r,events:S});const Te=N=Symbol();u.nextTick().then(()=>{N===Te&&(g=!0)}),p=!0,Fo(w,G,n.state.value[r])}const H=function(){const{state:G}=t,Te=G?G():{};this.$patch(Le=>{Tn(Le,Te)})};function V(){c.stop(),w=[],C=[],n._s.delete(r)}const z=(Y,G="")=>{if(um in Y)return Y[pu]=G,Y;const Te=function(){la(n);const Le=Array.from(arguments),vt=[],An=[];function sn(yt){vt.push(yt)}function Nt(yt){An.push(yt)}Fo(C,{args:Le,name:Te[pu],store:W,after:sn,onError:Nt});let Je;try{Je=Y.apply(this&&this.$id===r?this:W,Le)}catch(yt){throw Fo(An,yt),yt}return Je instanceof Promise?Je.then(yt=>(Fo(vt,yt),yt)).catch(yt=>(Fo(An,yt),Promise.reject(yt))):(Fo(vt,Je),Je)};return Te[um]=!0,Te[pu]=G,Te},Q=u.markRaw({actions:{},getters:{},state:[],hotState:b}),we={_p:n,$id:r,$onAction:lm.bind(null,C),$patch:K,$reset:H,$subscribe(Y,G={}){const Te=lm(w,Y,G.detached,()=>Le()),Le=c.run(()=>u.watch(()=>n.state.value[r],vt=>{(G.flush==="sync"?p:g)&&Y({storeId:r,type:Zn.direct,events:S},vt)},Tn({},f,G)));return Te},$dispose:V},W=u.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co?Tn({_hmrPayload:Q,_customProperties:u.markRaw(new Set)},we):we);n._s.set(r,W);const _e=(n._a&&n._a.runWithContext||Xk)(()=>n._e.run(()=>(c=u.effectScope()).run(()=>e({action:z}))));for(const Y in _e){const G=_e[Y];if(u.isRef(G)&&!dm(G)||u.isReactive(G))process.env.NODE_ENV!=="production"&&i&&vs(b.value,Y,u.toRef(_e,Y)),process.env.NODE_ENV!=="production"&&Q.state.push(Y);else if(typeof G=="function"){const Te=process.env.NODE_ENV!=="production"&&i?G:z(G,Y);_e[Y]=Te,process.env.NODE_ENV!=="production"&&(Q.actions[Y]=G),d.actions[Y]=G}else process.env.NODE_ENV!=="production"&&dm(G)&&(Q.getters[Y]=t.getters[Y],co&&(_e._getters||(_e._getters=u.markRaw([]))).push(Y))}if(Tn(W,_e),Tn(u.toRaw(W),_e),Object.defineProperty(W,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?b.value:n.state.value[r],set:Y=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");K(G=>{Tn(G,Y)})}}),process.env.NODE_ENV!=="production"&&(W._hotUpdate=u.markRaw(Y=>{W._hotUpdating=!0,Y._hmrPayload.state.forEach(G=>{if(G in W.$state){const Te=Y.$state[G],Le=W.$state[G];typeof Te=="object"&&ui(Te)&&ui(Le)?sv(Te,Le):Y.$state[G]=Le}vs(W,G,u.toRef(Y.$state,G))}),Object.keys(W.$state).forEach(G=>{G in Y.$state||mu(W,G)}),g=!1,p=!1,n.state.value[r]=u.toRef(Y._hmrPayload,"hotState"),p=!0,u.nextTick().then(()=>{g=!0});for(const G in Y._hmrPayload.actions){const Te=Y[G];vs(W,G,z(Te,G))}for(const G in Y._hmrPayload.getters){const Te=Y._hmrPayload.getters[G],Le=u.computed(()=>(la(n),Te.call(W,W)));vs(W,G,Le)}Object.keys(W._hmrPayload.getters).forEach(G=>{G in Y._hmrPayload.getters||mu(W,G)}),Object.keys(W._hmrPayload.actions).forEach(G=>{G in Y._hmrPayload.actions||mu(W,G)}),W._hmrPayload=Y._hmrPayload,W._getters=Y._getters,W._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const Y={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(G=>{Object.defineProperty(W,G,Tn({value:W[G]},Y))})}return n._p.forEach(Y=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const G=c.run(()=>Y({store:W,app:n._a,pinia:n,options:d}));Object.keys(G||{}).forEach(Te=>W._customProperties.add(Te)),Tn(W,G)}else Tn(W,c.run(()=>Y({store:W,app:n._a,pinia:n,options:d})))}),process.env.NODE_ENV!=="production"&&W.$state&&typeof W.$state=="object"&&typeof W.$state.constructor=="function"&&!W.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
8
8
  state: () => new MyClass()
9
- Found in store "${W.$id}".`),T&&s&&t.hydrate&&t.hydrate(W.$state,T),g=!0,p=!0,W}/*! #__NO_SIDE_EFFECTS__ */function Zk(r,e,t){let n,i;if(typeof r=="string")n=r,i=e;else if(i=r,n=r.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(c,d){const f=u.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Gi&&Gi._testing?null:c)||(f?u.inject(Xp,null):null),c&&la(c),process.env.NODE_ENV!=="production"&&!Gi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
9
+ Found in store "${W.$id}".`),T&&s&&t.hydrate&&t.hydrate(W.$state,T),g=!0,p=!0,W}/*! #__NO_SIDE_EFFECTS__ */function eR(r,e,t){let n,i;if(typeof r=="string")n=r,i=e;else if(i=r,n=r.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(c,d){const f=u.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Gi&&Gi._testing?null:c)||(f?u.inject(Xp,null):null),c&&la(c),process.env.NODE_ENV!=="production"&&!Gi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
10
10
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
11
- This will fail in production.`);c=Gi,c._s.has(n)||(hm(n,i,c),process.env.NODE_ENV!=="production"&&(s._pinia=c));const g=c._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const p="__hot:"+n,w=hm(p,Tn({},i),c,!0);d._hotUpdate(w),delete c.state.value[p],c._s.delete(p)}if(process.env.NODE_ENV!=="production"&&co){const p=u.getCurrentInstance();if(p&&p.proxy&&!d){const w=p.proxy,C="_pStores"in w?w._pStores:w._pStores={};C[n]=g}}return g}return s.$id=n,s}const eR=Zk({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),se=u.ref(!1),fm=u.ref(null);function tR(){const r=u.readonly(u.computed(()=>fm));function e(t){fm.value=t}return{setGlobalScope:e,globalScope:r}}var nR=Object.defineProperty,gm=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,oR=Object.prototype.propertyIsEnumerable,mm=(r,e,t)=>e in r?nR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,lv=(r,e)=>{for(var t in e||(e={}))rR.call(e,t)&&mm(r,t,e[t]);if(gm)for(var t of gm(e))oR.call(e,t)&&mm(r,t,e[t]);return r},wc=r=>typeof r=="function",_c=r=>typeof r=="string",uv=r=>_c(r)&&r.trim().length>0,iR=r=>typeof r=="number",lo=r=>typeof r>"u",ua=r=>typeof r=="object"&&r!==null,aR=r=>er(r,"tag")&&uv(r.tag),dv=r=>window.TouchEvent&&r instanceof TouchEvent,hv=r=>er(r,"component")&&fv(r.component),sR=r=>wc(r)||ua(r),fv=r=>!lo(r)&&(_c(r)||sR(r)||hv(r)),pm=r=>ua(r)&&["height","width","right","left","top","bottom"].every(e=>iR(r[e])),er=(r,e)=>(ua(r)||wc(r))&&e in r,cR=(r=>()=>r++)(0);function vu(r){return dv(r)?r.targetTouches[0].clientX:r.clientX}function vm(r){return dv(r)?r.targetTouches[0].clientY:r.clientY}var lR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},pa=r=>hv(r)?pa(r.component):aR(r)?u.defineComponent({render(){return r}}):typeof r=="string"?r:u.toRaw(u.unref(r)),uR=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ua(r.props)?r.props:{},t=er(r,"listeners")&&ua(r.listeners)?r.listeners:{};return{component:pa(r),props:e,listeners:t}},dR=()=>typeof window<"u",Od=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},hR=r=>["on","off","emit"].every(e=>er(r,e)&&wc(r[e])),tn;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(tn||(tn={}));var Qs;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(Qs||(Qs={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Un="Vue-Toastification",Ln={type:{type:String,default:tn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},gv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Bs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Ju={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},mv={transition:{type:[Object,String],default:`${Un}__bounce`}},fR={position:{type:String,default:Qs.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:Ju.timeout,hideProgressBar:Ju.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:gv.customIcon,closeButton:Bs.component,closeButtonClassName:Bs.classNames,showCloseButtonOnHover:Bs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Od}},gR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},mR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:mv.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:fR,TOAST:gR,CONTAINER:mR,PROGRESS_BAR:Ju,ICON:gv,TRANSITION:mv,CLOSE_BUTTON:Bs},pv=u.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Un}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function pR(r,e){return u.openBlock(),u.createElementBlock("div",{style:u.normalizeStyle(r.style),class:u.normalizeClass(r.cpClass)},null,6)}pv.render=pR;var vR=pv,vv=u.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?pa(this.component):"button"},classes(){const r=[`${Un}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),yR=u.createTextVNode(" × ");function CR(r,e){return u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.buttonComponent),u.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:u.withCtx(()=>[yR]),_:1},16,["aria-label","class"])}vv.render=CR;var wR=vv,yv={},_R={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},TR=u.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),ER=[TR];function SR(r,e){return u.openBlock(),u.createElementBlock("svg",_R,ER)}yv.render=SR;var AR=yv,Cv={},IR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},bR=u.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),kR=[bR];function RR(r,e){return u.openBlock(),u.createElementBlock("svg",IR,kR)}Cv.render=RR;var ym=Cv,wv={},OR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},NR=u.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),PR=[NR];function MR(r,e){return u.openBlock(),u.createElementBlock("svg",OR,PR)}wv.render=MR;var DR=wv,_v={},xR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},LR=u.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),UR=[LR];function BR(r,e){return u.openBlock(),u.createElementBlock("svg",xR,UR)}_v.render=BR;var FR=_v,Tv=u.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return _c(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:fv(this.customIcon)?pa(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[tn.DEFAULT]:ym,[tn.INFO]:ym,[tn.SUCCESS]:AR,[tn.ERROR]:FR,[tn.WARNING]:DR}[this.type]},iconClasses(){const r=[`${Un}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return uv(r)?r.trim():e}}});function HR(r,e){return u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.component),{class:u.normalizeClass(r.iconClasses)},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Tv.render=HR;var VR=Tv,Ev=u.defineComponent({name:"VtToast",components:{ProgressBar:vR,CloseButton:wR,Icon:VR},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Un}__toast`,`${Un}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Un}__toast--rtl`),r},bodyClasses(){return[`${Un}__toast-${_c(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return pm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:pa,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:vu(r),y:vm(r)},this.dragStart=vu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:vu(r),y:vm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,pm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),$R=["role"];function KR(r,e){const t=u.resolveComponent("Icon"),n=u.resolveComponent("CloseButton"),i=u.resolveComponent("ProgressBar");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(r.classes),style:u.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(u.openBlock(),u.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):u.createCommentVNode("v-if",!0),u.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:u.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(u.toDisplayString(r.content),1)],2112)):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),u.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},u.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,$R),r.closeButton?(u.openBlock(),u.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:u.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):u.createCommentVNode("v-if",!0),r.timeout?(u.openBlock(),u.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):u.createCommentVNode("v-if",!0)],38)}Ev.render=KR;var zR=Ev,Sv=u.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function WR(r,e){return u.openBlock(),u.createBlock(u.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:u.withCtx(()=>[u.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Sv.render=WR;var qR=Sv,Av=u.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:zR,VtTransition:qR},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(Qs),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){wc(r)&&(r=await r()),lR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=uR(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Un}__container`,r].concat(this.defaults.containerClassName)}}});function GR(r,e){const t=u.resolveComponent("Toast"),n=u.resolveComponent("VtTransition");return u.openBlock(),u.createElementBlock("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.positions,i=>(u.openBlock(),u.createElementBlock("div",{key:i},[u.createVNode(n,{transition:r.defaults.transition,class:u.normalizeClass(r.getClasses(i))},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.getPositionToasts(i),s=>(u.openBlock(),u.createBlock(t,u.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Av.render=GR;var jR=Av,Cm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Od;e&&u.nextTick(()=>{const s=u.createApp(jR,lv({},r)),c=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(c,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Un}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,c)=>{const d=Object.assign({},{id:cR(),type:tn.DEFAULT},c,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:c,options:d},f=!1){const g=Object.assign({},d,{content:c});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,c)=>n(s,Object.assign({},c,{type:tn.SUCCESS})),n.info=(s,c)=>n(s,Object.assign({},c,{type:tn.INFO})),n.error=(s,c)=>n(s,Object.assign({},c,{type:tn.ERROR})),n.warning=(s,c)=>n(s,Object.assign({},c,{type:tn.WARNING})),n},YR=()=>{const r=()=>console.warn(`[${Un}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function Qu(r){return dR()?hR(r)?Cm({eventBus:r},!1):Cm(r,!0):YR()}var Iv=Symbol("VueToastification"),bv=new Od,JR=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=Qu(lv({eventBus:bv},e));r.provide(Iv,t)},Vn=r=>{if(r)return Qu(r);const e=u.getCurrentInstance()?u.inject(Iv,void 0):void 0;return e||Qu(bv)},QR=JR;const kv=u.defineComponent({__name:"DeleteButton",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=Cc("delete-all-__J"),n=e;return(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(ma,{"dialog-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),u.createVNode(qe.VBtn,{onClick:u.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:u.withCtx(()=>s[0]||(s[0]=[u.createTextVNode(" Delete ")])),_:1},8,["onClick"])],64))}}),Rv=u.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(u.openBlock(),u.createBlock(qe.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:u.withCtx(()=>n[0]||(n[0]=[u.createTextVNode(" Edit ")])),_:1}))}});var XR={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M3 3l18 18"},null),u.createTextVNode(" ")])}},ZR={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" ")])}},eO={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" ")])}},tO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 9v4"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 16v.01"},null),u.createTextVNode(" ")])}},nO={name:"SearchIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M21 21l-6 -6"},null),u.createTextVNode(" ")])}};const rO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Ov=u.defineComponent({__name:"DotsMenu",props:{color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(u.openBlock(),u.createBlock(u.unref(Zt.VMenu),{"close-on-content-click":!0},{activator:u.withCtx(({props:i})=>[u.createVNode(u.unref(Zt.VBtn),u.mergeProps(i,{icon:""}),{default:u.withCtx(()=>[t.orientation==="y"?(u.openBlock(),u.createBlock(u.unref(ZR),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(u.openBlock(),u.createBlock(u.unref(eO),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040)]),default:u.withCtx(()=>[u.createVNode(u.unref(Zt.VList),null,{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.options,(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:s},[i.title?(u.openBlock(),u.createElementBlock("div",rO,u.toDisplayString(i.title),1)):u.createCommentVNode("",!0),i.action?(u.openBlock(),u.createBlock(u.unref(Zt.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:u.withCtx(()=>[u.createVNode(u.unref(Zt.VListItemTitle),null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):u.createCommentVNode("",!0),i.divider?(u.openBlock(),u.createBlock(u.unref(Zt.VDivider),{key:2,class:"mt-2"})):u.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),oO={class:"d-inline-flex"},iO={class:"d-inline-flex"},Nv=u.defineComponent({__name:"UiTable",props:{headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},setup(r){const e=r,t=u.computed(()=>{var n;if(e.headers)return e.headers;if(e.columns)return(n=e.columns)==null?void 0:n.filter(i=>i.checked)});return(n,i)=>(u.openBlock(),u.createBlock(fk.VDataTable,{"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:n.items,"items-length":n.items.length,loading:n.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":n.sortBy,class:"customize-table"},{top:u.withCtx(()=>i[0]||(i[0]=[u.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":u.withCtx(({item:s})=>[u.createElementVNode("div",oO,[u.renderSlot(n.$slots,"avatar",{item:s})])]),"item.actions":u.withCtx(({item:s})=>[u.createElementVNode("div",iO,[u.renderSlot(n.$slots,"actions",{item:s})])]),"no-data":u.withCtx(()=>[!n.loading&&n.items.length===0?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(" This table is empty. ")],64)):u.createCommentVNode("",!0)]),_:3},8,["headers","items","items-length","loading","sort-by"]))}});/*!
11
+ This will fail in production.`);c=Gi,c._s.has(n)||(hm(n,i,c),process.env.NODE_ENV!=="production"&&(s._pinia=c));const g=c._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const p="__hot:"+n,w=hm(p,Tn({},i),c,!0);d._hotUpdate(w),delete c.state.value[p],c._s.delete(p)}if(process.env.NODE_ENV!=="production"&&co){const p=u.getCurrentInstance();if(p&&p.proxy&&!d){const w=p.proxy,C="_pStores"in w?w._pStores:w._pStores={};C[n]=g}}return g}return s.$id=n,s}const tR=eR({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),se=u.ref(!1),fm=u.ref(null);function nR(){const r=u.readonly(u.computed(()=>fm));function e(t){fm.value=t}return{setGlobalScope:e,globalScope:r}}var rR=Object.defineProperty,gm=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,mm=(r,e,t)=>e in r?rR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,lv=(r,e)=>{for(var t in e||(e={}))oR.call(e,t)&&mm(r,t,e[t]);if(gm)for(var t of gm(e))iR.call(e,t)&&mm(r,t,e[t]);return r},wc=r=>typeof r=="function",_c=r=>typeof r=="string",uv=r=>_c(r)&&r.trim().length>0,aR=r=>typeof r=="number",lo=r=>typeof r>"u",ua=r=>typeof r=="object"&&r!==null,sR=r=>er(r,"tag")&&uv(r.tag),dv=r=>window.TouchEvent&&r instanceof TouchEvent,hv=r=>er(r,"component")&&fv(r.component),cR=r=>wc(r)||ua(r),fv=r=>!lo(r)&&(_c(r)||cR(r)||hv(r)),pm=r=>ua(r)&&["height","width","right","left","top","bottom"].every(e=>aR(r[e])),er=(r,e)=>(ua(r)||wc(r))&&e in r,lR=(r=>()=>r++)(0);function vu(r){return dv(r)?r.targetTouches[0].clientX:r.clientX}function vm(r){return dv(r)?r.targetTouches[0].clientY:r.clientY}var uR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},pa=r=>hv(r)?pa(r.component):sR(r)?u.defineComponent({render(){return r}}):typeof r=="string"?r:u.toRaw(u.unref(r)),dR=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ua(r.props)?r.props:{},t=er(r,"listeners")&&ua(r.listeners)?r.listeners:{};return{component:pa(r),props:e,listeners:t}},hR=()=>typeof window<"u",Od=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},fR=r=>["on","off","emit"].every(e=>er(r,e)&&wc(r[e])),tn;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(tn||(tn={}));var Qs;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(Qs||(Qs={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Un="Vue-Toastification",Ln={type:{type:String,default:tn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},gv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Bs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Ju={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},mv={transition:{type:[Object,String],default:`${Un}__bounce`}},gR={position:{type:String,default:Qs.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:Ju.timeout,hideProgressBar:Ju.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:gv.customIcon,closeButton:Bs.component,closeButtonClassName:Bs.classNames,showCloseButtonOnHover:Bs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Od}},mR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},pR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:mv.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:gR,TOAST:mR,CONTAINER:pR,PROGRESS_BAR:Ju,ICON:gv,TRANSITION:mv,CLOSE_BUTTON:Bs},pv=u.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Un}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function vR(r,e){return u.openBlock(),u.createElementBlock("div",{style:u.normalizeStyle(r.style),class:u.normalizeClass(r.cpClass)},null,6)}pv.render=vR;var yR=pv,vv=u.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?pa(this.component):"button"},classes(){const r=[`${Un}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),CR=u.createTextVNode(" × ");function wR(r,e){return u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.buttonComponent),u.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:u.withCtx(()=>[CR]),_:1},16,["aria-label","class"])}vv.render=wR;var _R=vv,yv={},TR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ER=u.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),SR=[ER];function AR(r,e){return u.openBlock(),u.createElementBlock("svg",TR,SR)}yv.render=AR;var IR=yv,Cv={},bR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},kR=u.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),RR=[kR];function OR(r,e){return u.openBlock(),u.createElementBlock("svg",bR,RR)}Cv.render=OR;var ym=Cv,wv={},NR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},PR=u.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),MR=[PR];function DR(r,e){return u.openBlock(),u.createElementBlock("svg",NR,MR)}wv.render=DR;var xR=wv,_v={},LR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},UR=u.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),BR=[UR];function FR(r,e){return u.openBlock(),u.createElementBlock("svg",LR,BR)}_v.render=FR;var HR=_v,Tv=u.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return _c(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:fv(this.customIcon)?pa(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[tn.DEFAULT]:ym,[tn.INFO]:ym,[tn.SUCCESS]:IR,[tn.ERROR]:HR,[tn.WARNING]:xR}[this.type]},iconClasses(){const r=[`${Un}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return uv(r)?r.trim():e}}});function VR(r,e){return u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.component),{class:u.normalizeClass(r.iconClasses)},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Tv.render=VR;var $R=Tv,Ev=u.defineComponent({name:"VtToast",components:{ProgressBar:yR,CloseButton:_R,Icon:$R},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Un}__toast`,`${Un}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Un}__toast--rtl`),r},bodyClasses(){return[`${Un}__toast-${_c(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return pm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:pa,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:vu(r),y:vm(r)},this.dragStart=vu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:vu(r),y:vm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,pm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),KR=["role"];function zR(r,e){const t=u.resolveComponent("Icon"),n=u.resolveComponent("CloseButton"),i=u.resolveComponent("ProgressBar");return u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(r.classes),style:u.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(u.openBlock(),u.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):u.createCommentVNode("v-if",!0),u.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:u.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(u.toDisplayString(r.content),1)],2112)):(u.openBlock(),u.createBlock(u.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),u.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},u.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,KR),r.closeButton?(u.openBlock(),u.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:u.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):u.createCommentVNode("v-if",!0),r.timeout?(u.openBlock(),u.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):u.createCommentVNode("v-if",!0)],38)}Ev.render=zR;var WR=Ev,Sv=u.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function qR(r,e){return u.openBlock(),u.createBlock(u.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:u.withCtx(()=>[u.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Sv.render=qR;var GR=Sv,Av=u.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:WR,VtTransition:GR},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(Qs),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){wc(r)&&(r=await r()),uR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=dR(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Un}__container`,r].concat(this.defaults.containerClassName)}}});function jR(r,e){const t=u.resolveComponent("Toast"),n=u.resolveComponent("VtTransition");return u.openBlock(),u.createElementBlock("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.positions,i=>(u.openBlock(),u.createElementBlock("div",{key:i},[u.createVNode(n,{transition:r.defaults.transition,class:u.normalizeClass(r.getClasses(i))},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.getPositionToasts(i),s=>(u.openBlock(),u.createBlock(t,u.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Av.render=jR;var YR=Av,Cm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Od;e&&u.nextTick(()=>{const s=u.createApp(YR,lv({},r)),c=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(c,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Un}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,c)=>{const d=Object.assign({},{id:lR(),type:tn.DEFAULT},c,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:c,options:d},f=!1){const g=Object.assign({},d,{content:c});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,c)=>n(s,Object.assign({},c,{type:tn.SUCCESS})),n.info=(s,c)=>n(s,Object.assign({},c,{type:tn.INFO})),n.error=(s,c)=>n(s,Object.assign({},c,{type:tn.ERROR})),n.warning=(s,c)=>n(s,Object.assign({},c,{type:tn.WARNING})),n},JR=()=>{const r=()=>console.warn(`[${Un}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function Qu(r){return hR()?fR(r)?Cm({eventBus:r},!1):Cm(r,!0):JR()}var Iv=Symbol("VueToastification"),bv=new Od,QR=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=Qu(lv({eventBus:bv},e));r.provide(Iv,t)},Vn=r=>{if(r)return Qu(r);const e=u.getCurrentInstance()?u.inject(Iv,void 0):void 0;return e||Qu(bv)},XR=QR;const kv=u.defineComponent({__name:"DeleteButton",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=Cc("delete-all-__J"),n=e;return(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(ma,{"dialog-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),u.createVNode(qe.VBtn,{onClick:u.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:u.withCtx(()=>s[0]||(s[0]=[u.createTextVNode(" Delete ")])),_:1},8,["onClick"])],64))}}),Rv=u.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(u.openBlock(),u.createBlock(qe.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:u.withCtx(()=>n[0]||(n[0]=[u.createTextVNode(" Edit ")])),_:1}))}});var ZR={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M3 3l18 18"},null),u.createTextVNode(" ")])}},eO={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" ")])}},tO={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),u.createTextVNode(" ")])}},nO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 9v4"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M12 16v.01"},null),u.createTextVNode(" ")])}},rO={name:"SearchIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return u.createVNode("svg",u.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[u.createTextVNode(" "),u.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null),u.createTextVNode(" "),u.createVNode("path",{d:"M21 21l-6 -6"},null),u.createTextVNode(" ")])}};const oO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Ov=u.defineComponent({__name:"DotsMenu",props:{color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(u.openBlock(),u.createBlock(u.unref(Zt.VMenu),{"close-on-content-click":!0},{activator:u.withCtx(({props:i})=>[u.createVNode(u.unref(Zt.VBtn),u.mergeProps(i,{icon:""}),{default:u.withCtx(()=>[t.orientation==="y"?(u.openBlock(),u.createBlock(u.unref(eO),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(u.openBlock(),u.createBlock(u.unref(tO),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040)]),default:u.withCtx(()=>[u.createVNode(u.unref(Zt.VList),null,{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.options,(i,s)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:s},[i.title?(u.openBlock(),u.createElementBlock("div",oO,u.toDisplayString(i.title),1)):u.createCommentVNode("",!0),i.action?(u.openBlock(),u.createBlock(u.unref(Zt.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:u.withCtx(()=>[u.createVNode(u.unref(Zt.VListItemTitle),null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):u.createCommentVNode("",!0),i.divider?(u.openBlock(),u.createBlock(u.unref(Zt.VDivider),{key:2,class:"mt-2"})):u.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),iO={class:"d-inline-flex"},aO={class:"d-inline-flex"},Nv=u.defineComponent({__name:"UiTable",props:{headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},setup(r){const e=r,t=u.computed(()=>{var n;if(e.headers)return e.headers;if(e.columns)return(n=e.columns)==null?void 0:n.filter(i=>i.checked)});return(n,i)=>(u.openBlock(),u.createBlock(gk.VDataTable,{"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:n.items,"items-length":n.items.length,loading:n.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":n.sortBy,class:"customize-table"},{top:u.withCtx(()=>i[0]||(i[0]=[u.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":u.withCtx(({item:s})=>[u.createElementVNode("div",iO,[u.renderSlot(n.$slots,"avatar",{item:s})])]),"item.actions":u.withCtx(({item:s})=>[u.createElementVNode("div",aO,[u.renderSlot(n.$slots,"actions",{item:s})])]),"no-data":u.withCtx(()=>[!n.loading&&n.items.length===0?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[u.createTextVNode(" This table is empty. ")],64)):u.createCommentVNode("",!0)]),_:3},8,["headers","items","items-length","loading","sort-by"]))}});/*!
12
12
  * vue-draggable-next v2.2.0
13
13
  * (c) 2023 Anish George
14
14
  * @license MIT
@@ -17,7 +17,7 @@ This will fail in production.`);c=Gi,c._s.has(n)||(hm(n,i,c),process.env.NODE_EN
17
17
  * @author RubaXa <trash@rubaxa.org>
18
18
  * @author owenm <owen23355@gmail.com>
19
19
  * @license MIT
20
- */function wm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?wm(Object(t),!0).forEach(function(n){aO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):wm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fs(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fs=function(e){return typeof e}:Fs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fs(r)}function aO(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function sO(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function cO(r,e){if(r==null)return{};var t=sO(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var lO="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),va=_r(/Edge/i),_m=_r(/firefox/i),ea=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),Pv=_r(/iP(ad|od|hone)/i),uO=_r(/chrome/i)&&_r(/android/i),Mv={capture:!1,passive:!1};function Se(r,e,t){r.addEventListener(e,t,!Ar&&Mv)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&Mv)}function Xs(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function dO(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&Xs(r,e):Xs(r,e))||n&&r===t)return r;if(r===t)break}while(r=dO(r))}return null}var Tm=/\s+/g;function jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Tm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Tm," ")}}function oe(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function si(r,e){var t="";if(typeof r=="string")t=r;else do{var n=oe(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Dv(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function ot(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,c,d,f,g,p,w;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),c=s.top,d=s.left,f=s.bottom,g=s.right,p=s.height,w=s.width):(c=0,d=0,f=window.innerHeight,g=window.innerWidth,p=window.innerHeight,w=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(oe(i,"transform")!=="none"||t&&oe(i,"position")!=="static")){var C=i.getBoundingClientRect();c-=C.top+parseInt(oe(i,"border-top-width")),d-=C.left+parseInt(oe(i,"border-left-width")),f=c+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=si(i||r),T=S&&S.a,b=S&&S.d;S&&(c/=b,d/=T,w/=T,p/=b,f=c+p,g=d+w)}return{top:c,left:d,bottom:f,right:g,width:w,height:p}}}function Em(r,e,t){for(var n=Kr(r,!0),i=ot(r)[e];n;){var s=ot(n)[t],c=void 0;if(c=i>=s,!c)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function di(r,e,t,n){for(var i=0,s=0,c=r.children;s<c.length;){if(c[s].style.display!=="none"&&c[s]!==ie.ghost&&(n||c[s]!==ie.dragged)&&Yn(c[s],t.draggable,r,!1)){if(i===e)return c[s];i++}s++}return null}function Nd(r,e){for(var t=r.lastElementChild;t&&(t===ie.ghost||oe(t,"display")==="none"||e&&!Xs(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==ie.clone&&(!e||Xs(r,e))&&t++;return t}function Sm(r){var e=0,t=0,n=tr();if(r)do{var i=si(r),s=i.a,c=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*c}while(r!==n&&(r=r.parentNode));return[e,t]}function hO(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=oe(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function fO(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function yu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ta;function xv(r,e){return function(){if(!ta){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ta=setTimeout(function(){ta=void 0},e)}}}function gO(){clearTimeout(ta),ta=void 0}function Lv(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function Uv(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function mO(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(oe(i,"display")==="none"||i===ie.ghost)){r.push({target:i,rect:ot(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var c=si(i,!0);c&&(s.top-=c.f,s.left-=c.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(hO(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,c=0;r.forEach(function(d){var f=0,g=d.target,p=g.fromRect,w=ot(g),C=g.prevFromRect,S=g.prevToRect,T=d.rect,b=si(g,!0);b&&(w.top-=b.f,w.left-=b.e),g.toRect=w,g.thisAnimationDuration&&yu(C,w)&&!yu(p,w)&&(T.top-w.top)/(T.left-w.left)===(p.top-w.top)/(p.left-w.left)&&(f=vO(T,C,S,i.options)),yu(w,p)||(g.prevFromRect=p,g.prevToRect=w,f||(f=i.options.animation),i.animate(g,T,w,f)),f&&(s=!0,c=Math.max(c,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},c):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,c){if(c){oe(n,"transition",""),oe(n,"transform","");var d=si(this.el),f=d&&d.a,g=d&&d.d,p=(i.left-s.left)/(f||1),w=(i.top-s.top)/(g||1);n.animatingX=!!p,n.animatingY=!!w,oe(n,"transform","translate3d("+p+"px,"+w+"px,0)"),this.forRepaintDummy=pO(n),oe(n,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),oe(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){oe(n,"transition",""),oe(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},c)}}}}function pO(r){return r.offsetWidth}function vO(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var Ho=[],Cu={initializeByDefault:!0},ya={mount:function(e){for(var t in Cu)Cu.hasOwnProperty(t)&&!(t in e)&&(e[t]=Cu[t]);Ho.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ho.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";Ho.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][s]&&t[c.pluginName][s](rr({sortable:t},n)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){Ho.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var c=this.modifyOption(e,s,e.options[s]);typeof c<"u"&&(e.options[s]=c)}},getEventProperties:function(e,t){var n={};return Ho.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return Ho.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function yO(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,c=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,p=r.oldDraggableIndex,w=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,T=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var b,N=e.options,K="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!va?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=c||t,b.from=d||t,b.item=i||t,b.clone=s,b.oldIndex=f,b.newIndex=g,b.oldDraggableIndex=p,b.newDraggableIndex=w,b.originalEvent=C,b.pullMode=S?S.lastPutMode:void 0;var H=rr(rr({},T),ya.getEventProperties(n,e));for(var V in H)b[V]=H[V];t&&t.dispatchEvent(b),N[K]&&N[K].call(e,b)}}var CO=["evt"],Lt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=cO(n,CO);ya.pluginEvent.bind(ie)(e,t,rr({dragEl:F,parentEl:ze,ghostEl:le,rootEl:Be,nextEl:ao,lastDownEl:Hs,cloneEl:We,cloneHidden:Fr,dragStarted:ji,putSortable:mt,activeSortable:ie.active,originalEvent:i,oldIndex:ri,oldDraggableIndex:na,newIndex:Yt,newDraggableIndex:Br,hideGhostForTarget:Vv,unhideGhostForTarget:$v,cloneNowHidden:function(){Fr=!0},cloneNowShown:function(){Fr=!1},dispatchSortableEvent:function(d){Rt({sortable:t,name:d,originalEvent:i})}},s))};function Rt(r){yO(rr({putSortable:mt,cloneEl:We,targetEl:F,rootEl:Be,oldIndex:ri,oldDraggableIndex:na,newIndex:Yt,newDraggableIndex:Br},r))}var F,ze,le,Be,ao,Hs,We,Fr,ri,Yt,na,Br,ys,mt,Jo=!1,Zs=!1,ec=[],ro,Pn,wu,_u,Am,Im,ji,Vo,ra,oa=!1,Cs=!1,Vs,_t,Tu=[],Xu=!1,tc=[],Tc=typeof document<"u",ws=Pv,bm=va||Ar?"cssFloat":"float",wO=Tc&&!uO&&!Pv&&"draggable"in document.createElement("div"),Bv=function(){if(Tc){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Fv=function(e,t){var n=oe(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=di(e,0,t),c=di(e,1,t),d=s&&oe(s),f=c&&oe(c),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+ot(s).width,p=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+ot(c).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var w=d.float==="left"?"left":"right";return c&&(f.clear==="both"||f.clear===w)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[bm]==="none"||c&&n[bm]==="none"&&g+p>i)?"vertical":"horizontal"},_O=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+c/2===d+g/2},TO=function(e,t){var n;return ec.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Nd(i))){var c=ot(i),d=e>=c.left-s&&e<=c.right+s,f=t>=c.top-s&&t<=c.bottom+s;if(d&&f)return n=i}}),n},Hv=function(e){function t(s,c){return function(d,f,g,p){var w=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(c||w))return!0;if(s==null||s===!1)return!1;if(c&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,p),c)(d,f,g,p);var C=(c?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||Fs(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Vv=function(){!Bv&&le&&oe(le,"display","none")},$v=function(){!Bv&&le&&oe(le,"display","")};Tc&&document.addEventListener("click",function(r){if(Zs)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),Zs=!1,!1},!0);var oo=function(e){if(F){e=e.touches?e.touches[0]:e;var t=TO(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},EO=function(e){F&&F.parentNode[rn]._isOutsideThisEl(e.target)};function ie(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fv(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ie.supportPointer!==!1&&"PointerEvent"in window&&!ea,emptyInsertThreshold:5};ya.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Hv(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:wO,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Se(r,"pointerdown",this._onTapStart):(Se(r,"mousedown",this._onTapStart),Se(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(r,"dragover",this),Se(r,"dragenter",this)),ec.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,mO())}ie.prototype={constructor:ie,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Vo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,F):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,p=i.filter;if(NO(n),!F&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ea&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&Hs!==f)){if(ri=En(f),na=En(f,i.draggable),typeof p=="function"){if(p.call(this,e,f,this)){Rt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Lt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(w){if(w=Yn(g,w.trim(),n,!1),w)return Rt({sortable:t,rootEl:w,name:"filter",targetEl:f,fromEl:n,toEl:n}),Lt("filter",t,{evt:e}),!0}),p)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,c=i.options,d=s.ownerDocument,f;if(n&&!F&&n.parentNode===s){var g=ot(n);if(Be=s,F=n,ze=F.parentNode,ao=F.nextSibling,Hs=n,ys=c.group,ie.dragged=F,ro={target:F,clientX:(t||e).clientX,clientY:(t||e).clientY},Am=ro.clientX-g.left,Im=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,F.style["will-change"]="all",f=function(){if(Lt("delayEnded",i,{evt:e}),ie.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!_m&&i.nativeDraggable&&(F.draggable=!0),i._triggerDragStart(e,t),Rt({sortable:i,name:"choose",originalEvent:e}),jt(F,c.chosenClass,!0)},c.ignore.split(",").forEach(function(p){Dv(F,p.trim(),Eu)}),Se(d,"dragover",oo),Se(d,"mousemove",oo),Se(d,"touchmove",oo),Se(d,"mouseup",i._onDrop),Se(d,"touchend",i._onDrop),Se(d,"touchcancel",i._onDrop),_m&&this.nativeDraggable&&(this.options.touchStartThreshold=4,F.draggable=!0),Lt("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(va||Ar))){if(ie.eventCanceled){this._onDrop();return}Se(d,"mouseup",i._disableDelayedDrag),Se(d,"touchend",i._disableDelayedDrag),Se(d,"touchcancel",i._disableDelayedDrag),Se(d,"mousemove",i._delayedDragTouchMoveHandler),Se(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Se(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,c.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){F&&Eu(F),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):t?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(F,"dragend",this),Se(Be,"dragstart",this._onDragStart));try{document.selection?$s(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jo=!1,Be&&F){Lt("dragStarted",this,{evt:t}),this.nativeDraggable&&Se(document,"dragover",EO);var n=this.options;!e&&jt(F,n.dragClass,!1),jt(F,n.ghostClass,!0),ie.active=this,e&&this._appendGhost(),Rt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,Vv();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(F.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);$v()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,c=le&&si(le,!0),d=le&&c&&c.a,f=le&&c&&c.d,g=ws&&_t&&Sm(_t),p=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Tu[0]:0)/(d||1),w=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Tu[1]:0)/(f||1);if(!ie.active&&!Jo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){c?(c.e+=p-(wu||0),c.f+=w-(_u||0)):c={a:1,b:0,c:0,d:1,e:p,f:w};var C="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");oe(le,"webkitTransform",C),oe(le,"mozTransform",C),oe(le,"msTransform",C),oe(le,"transform",C),wu=p,_u=w,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Be,t=ot(F,!0,ws,!0,e),n=this.options;if(ws){for(_t=e;oe(_t,"position")==="static"&&oe(_t,"transform")==="none"&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=tr()),t.top+=_t.scrollTop,t.left+=_t.scrollLeft):_t=tr(),Tu=Sm(_t)}le=F.cloneNode(!0),jt(le,n.ghostClass,!1),jt(le,n.fallbackClass,!0),jt(le,n.dragClass,!0),oe(le,"transition",""),oe(le,"transform",""),oe(le,"box-sizing","border-box"),oe(le,"margin",0),oe(le,"top",t.top),oe(le,"left",t.left),oe(le,"width",t.width),oe(le,"height",t.height),oe(le,"opacity","0.8"),oe(le,"position",ws?"absolute":"fixed"),oe(le,"zIndex","100000"),oe(le,"pointerEvents","none"),ie.ghost=le,e.appendChild(le),oe(le,"transform-origin",Am/parseInt(le.style.width)*100+"% "+Im/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Lt("dragStart",this,{evt:e}),ie.eventCanceled){this._onDrop();return}Lt("setupClone",this),ie.eventCanceled||(We=Uv(F),We.draggable=!1,We.style["will-change"]="",this._hideClone(),jt(We,this.options.chosenClass,!1),ie.clone=We),n.cloneId=$s(function(){Lt("clone",n),!ie.eventCanceled&&(n.options.removeCloneOnHide||Be.insertBefore(We,F),n._hideClone(),Rt({sortable:n,name:"clone"}))}),!t&&jt(F,s.dragClass,!0),t?(Zs=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,F)),Se(document,"drop",n),oe(F,"transform","translateZ(0)")),Jo=!0,n._dragStartId=$s(n._dragStarted.bind(n,t,e)),Se(document,"selectstart",n),ji=!0,ea&&oe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,c,d=this.options,f=d.group,g=ie.active,p=ys===f,w=d.sort,C=mt||g,S,T=this,b=!1;if(Xu)return;function N(Je,yt){Lt(Je,T,rr({evt:e,isOwner:p,axis:S?"vertical":"horizontal",revert:c,dragRect:i,targetRect:s,canSort:w,fromSortable:C,target:n,completed:H,onMove:function(Vt,qc){return _s(Be,t,F,i,Vt,ot(Vt),e,qc)},changed:V},yt))}function K(){N("dragOverAnimationCapture"),T.captureAnimationState(),T!==C&&C.captureAnimationState()}function H(Je){return N("dragOverCompleted",{insertion:Je}),Je&&(p?g._hideClone():g._showClone(T),T!==C&&(jt(F,mt?mt.options.ghostClass:g.options.ghostClass,!1),jt(F,d.ghostClass,!0)),mt!==T&&T!==ie.active?mt=T:T===ie.active&&mt&&(mt=null),C===T&&(T._ignoreWhileAnimating=n),T.animateAll(function(){N("dragOverAnimationComplete"),T._ignoreWhileAnimating=null}),T!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===F&&!F.animated||n===t&&!n.animated)&&(Vo=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(F.parentNode[rn]._isOutsideThisEl(e.target),!Je&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),b=!0}function V(){Yt=En(F),Br=En(F,d.draggable),Rt({sortable:T,name:"change",toEl:t,newIndex:Yt,newDraggableIndex:Br,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),N("dragOver"),ie.eventCanceled)return b;if(F.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||T._ignoreWhileAnimating===n)return H(!1);if(Zs=!1,g&&!d.disabled&&(p?w||(c=ze!==Be):mt===this||(this.lastPutMode=ys.checkPull(this,g,F,e))&&f.checkPut(this,g,F,e))){if(S=this._getDirection(e,n)==="vertical",i=ot(F),N("dragOverValid"),ie.eventCanceled)return b;if(c)return ze=Be,K(),this._hideClone(),N("revert"),ie.eventCanceled||(ao?Be.insertBefore(F,ao):Be.appendChild(F)),H(!0);var z=Nd(t,d.draggable);if(!z||bO(e,S,this)&&!z.animated){if(z===F)return H(!1);if(z&&t===e.target&&(n=z),n&&(s=ot(n)),_s(Be,t,F,i,n,s,e,!!n)!==!1)return K(),t.appendChild(F),ze=t,V(),H(!0)}else if(z&&IO(e,S,this)){var Q=di(t,0,d,!0);if(Q===F)return H(!1);if(n=Q,s=ot(n),_s(Be,t,F,i,n,s,e,!1)!==!1)return K(),t.insertBefore(F,Q),ze=t,V(),H(!0)}else if(n.parentNode===t){s=ot(n);var we=0,W,et=F.parentNode!==t,_e=!_O(F.animated&&F.toRect||i,n.animated&&n.toRect||s,S),Y=S?"top":"left",G=Em(n,"top","top")||Em(F,"top","top"),Te=G?G.scrollTop:void 0;Vo!==n&&(W=s[Y],oa=!1,Cs=!_e&&d.invertSwap||et),we=kO(e,n,s,S,_e?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Cs,Vo===n);var Le;if(we!==0){var vt=En(F);do vt-=we,Le=ze.children[vt];while(Le&&(oe(Le,"display")==="none"||Le===le))}if(we===0||Le===n)return H(!1);Vo=n,ra=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Nt=_s(Be,t,F,i,n,s,e,sn);if(Nt!==!1)return(Nt===1||Nt===-1)&&(sn=Nt===1),Xu=!0,setTimeout(AO,30),K(),sn&&!An?t.appendChild(F):n.parentNode.insertBefore(F,sn?An:n),G&&Lv(G,0,Te-G.scrollTop),ze=F.parentNode,W!==void 0&&!Cs&&(Vs=Math.abs(W-ot(n)[Y])),V(),H(!0)}if(t.contains(F))return H(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Yt=En(F),Br=En(F,n.draggable),Lt("drop",this,{evt:e}),ze=F&&F.parentNode,Yt=En(F),Br=En(F,n.draggable),ie.eventCanceled){this._nulling();return}Jo=!1,Cs=!1,oa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zu(this.cloneId),Zu(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ea&&oe(document.body,"user-select",""),oe(F,"transform",""),e&&(ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Be===ze||mt&&mt.lastPutMode!=="clone")&&We&&We.parentNode&&We.parentNode.removeChild(We),F&&(this.nativeDraggable&&Ce(F,"dragend",this),Eu(F),F.style["will-change"]="",ji&&!Jo&&jt(F,mt?mt.options.ghostClass:this.options.ghostClass,!1),jt(F,this.options.chosenClass,!1),Rt({sortable:this,name:"unchoose",toEl:ze,newIndex:null,newDraggableIndex:null,originalEvent:e}),Be!==ze?(Yt>=0&&(Rt({rootEl:ze,name:"add",toEl:ze,fromEl:Be,originalEvent:e}),Rt({sortable:this,name:"remove",toEl:ze,originalEvent:e}),Rt({rootEl:ze,name:"sort",toEl:ze,fromEl:Be,originalEvent:e}),Rt({sortable:this,name:"sort",toEl:ze,originalEvent:e})),mt&&mt.save()):Yt!==ri&&Yt>=0&&(Rt({sortable:this,name:"update",toEl:ze,originalEvent:e}),Rt({sortable:this,name:"sort",toEl:ze,originalEvent:e})),ie.active&&((Yt==null||Yt===-1)&&(Yt=ri,Br=na),Rt({sortable:this,name:"end",toEl:ze,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Lt("nulling",this),Be=F=ze=le=ao=We=Hs=Fr=ro=Pn=ji=Yt=Br=ri=na=Vo=ra=mt=ys=ie.dragged=ie.ghost=ie.clone=ie.active=null,tc.forEach(function(e){e.checked=!0}),tc.length=wu=_u=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":F&&(this._onDragOver(e),SO(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,c=this.options;i<s;i++)t=n[i],Yn(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||OO(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,c){var d=i.children[c];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=ya.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&Hv(n)},destroy:function(){Lt("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ec.splice(ec.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Fr){if(Lt("hideClone",this),ie.eventCanceled)return;oe(We,"display","none"),this.options.removeCloneOnHide&&We.parentNode&&We.parentNode.removeChild(We),Fr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Fr){if(Lt("showClone",this),ie.eventCanceled)return;F.parentNode==Be&&!this.options.group.revertClone?Be.insertBefore(We,F):ao?Be.insertBefore(We,ao):Be.appendChild(We),this.options.group.revertClone&&this.animate(F,We),oe(We,"display",""),Fr=!1}}};function SO(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function _s(r,e,t,n,i,s,c,d){var f,g=r[rn],p=g.options.onMove,w;return window.CustomEvent&&!Ar&&!va?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||ot(e),f.willInsertAfter=d,f.originalEvent=c,r.dispatchEvent(f),p&&(w=p.call(g,f,c)),w}function Eu(r){r.draggable=!1}function AO(){Xu=!1}function IO(r,e,t){var n=ot(di(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function bO(r,e,t){var n=ot(Nd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function kO(r,e,t,n,i,s,c,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,p=n?t.top:t.left,w=n?t.bottom:t.right,C=!1;if(!c){if(d&&Vs<g*i){if(!oa&&(ra===1?f>p+g*s/2:f<w-g*s/2)&&(oa=!0),oa)C=!0;else if(ra===1?f<p+Vs:f>w-Vs)return-ra}else if(f>p+g*(1-i)/2&&f<w-g*(1-i)/2)return RO(e)}return C=C||c,C&&(f<p+g*s/2||f>w-g*s/2)?f>p+g/2?1:-1:0}function RO(r){return En(F)<En(r)?1:-1}function OO(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function NO(r){tc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&tc.push(n)}}function $s(r){return setTimeout(r,0)}function Zu(r){return clearTimeout(r)}Tc&&Se(document,"touchmove",function(r){(ie.active||Jo)&&r.cancelable&&r.preventDefault()});ie.utils={on:Se,off:Ce,css:oe,find:Dv,is:function(e,t){return!!Yn(e,t,e,!1)},extend:fO,throttle:xv,closest:Yn,toggleClass:jt,clone:Uv,index:En,nextTick:$s,cancelNextTick:Zu,detectDirection:Fv,getChild:di};ie.get=function(r){return r[rn]};ie.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(ie.utils=rr(rr({},ie.utils),n.utils)),ya.mount(n)})};ie.create=function(r,e){return new ie(r,e)};ie.version=lO;var Qe=[],Yi,ed,td=!1,Su,Au,nc,Ji;function PO(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),km(),Ks(),gO()},nulling:function(){nc=ed=Yi=td=Ji=Su=Au=null,Qe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,c);if(nc=t,n||this.options.forceAutoScrollFallback||va||Ar||ea){Iu(t,this.options,d,n);var f=Kr(d,!0);td&&(!Ji||s!==Su||c!==Au)&&(Ji&&km(),Ji=setInterval(function(){var g=Kr(document.elementFromPoint(s,c),!0);g!==f&&(f=g,Ks()),Iu(t,i.options,g,n)},10),Su=s,Au=c)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){Ks();return}Iu(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function Ks(){Qe.forEach(function(r){clearInterval(r.pid)}),Qe=[]}function km(){clearInterval(Ji)}var Iu=xv(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,p;ed!==t&&(ed=t,Ks(),Yi=e.scroll,p=e.scrollFn,Yi===!0&&(Yi=Kr(t,!0)));var w=0,C=Yi;do{var S=C,T=ot(S),b=T.top,N=T.bottom,K=T.left,H=T.right,V=T.width,z=T.height,Q=void 0,we=void 0,W=S.scrollWidth,et=S.scrollHeight,_e=oe(S),Y=S.scrollLeft,G=S.scrollTop;S===f?(Q=V<W&&(_e.overflowX==="auto"||_e.overflowX==="scroll"||_e.overflowX==="visible"),we=z<et&&(_e.overflowY==="auto"||_e.overflowY==="scroll"||_e.overflowY==="visible")):(Q=V<W&&(_e.overflowX==="auto"||_e.overflowX==="scroll"),we=z<et&&(_e.overflowY==="auto"||_e.overflowY==="scroll"));var Te=Q&&(Math.abs(H-i)<=c&&Y+V<W)-(Math.abs(K-i)<=c&&!!Y),Le=we&&(Math.abs(N-s)<=c&&G+z<et)-(Math.abs(b-s)<=c&&!!G);if(!Qe[w])for(var vt=0;vt<=w;vt++)Qe[vt]||(Qe[vt]={});(Qe[w].vx!=Te||Qe[w].vy!=Le||Qe[w].el!==S)&&(Qe[w].el=S,Qe[w].vx=Te,Qe[w].vy=Le,clearInterval(Qe[w].pid),(Te!=0||Le!=0)&&(g=!0,Qe[w].pid=setInterval((function(){n&&this.layer===0&&ie.active._onTouchMove(nc);var An=Qe[this.layer].vy?Qe[this.layer].vy*d:0,sn=Qe[this.layer].vx?Qe[this.layer].vx*d:0;typeof p=="function"&&p.call(ie.dragged.parentNode[rn],sn,An,r,nc,Qe[this.layer].el)!=="continue"||Lv(Qe[this.layer].el,sn,An)}).bind({layer:w}),24))),w++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));td=g}},30),Kv=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,w=document.elementFromPoint(p.clientX,p.clientY);f(),g&&!g.el.contains(w)&&(c("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Pd(){}Pd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=di(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Kv};Er(Pd,{pluginName:"revertOnSpill"});function Md(){}Md.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Kv};Er(Md,{pluginName:"removeOnSpill"});ie.mount(new PO);ie.mount(Md,Pd);function MO(){return typeof window<"u"?window.console:global.console}const DO=MO();function xO(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const LO=/-(\w)/g,Rm=xO(r=>r.replace(LO,(e,t)=>t?t.toUpperCase():""));function bu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Om(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function UO(r,e){return Object.values(r).indexOf(e)}function BO(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function zv(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function FO(r){return e=>{this.realList!==null&&this["onDrag"+r](e),zv.call(this,r,e)}}function HO(r){return["transition-group","TransitionGroup"].includes(r)}function VO(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?HO(e.name):!1}function $O(r,e){return e?{...e.props,...e.attrs}:r}const nd=["Start","Add","Remove","Update","End"],rd=["Choose","Unchoose","Sort","Filter","Clone"],KO=["Move",...nd,...rd].map(r=>"on"+r);let ku=null;const zO={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},WO=u.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...nd.map(r=>r.toLowerCase()),...rd.map(r=>r.toLowerCase())],props:zO,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=$O(this.$attrs,this.componentData);return r?(this.transitionMode=VO(r),u.h(this.getTag(),e,r)):u.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&DO.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};nd.forEach(i=>{r["on"+i]=FO.call(this,i)}),rd.forEach(i=>{r["on"+i]=zv.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Rm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new ie(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?u.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Rm(e);KO.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=BO(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=UO(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),ku=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;bu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Om(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){bu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){bu(r.item),Om(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const c=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(c,e)},onDragEnd(){this.computeIndexes(),ku=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(c=>c.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(ku)!==-1||!e.willInsertAfter?i:i+1}}}),qO=u.defineComponent({__name:"SearchBar",props:{variant:{default:"plain"},closesearch:{},onSearch:{}},setup(r){const e=r,t=u.ref("");return u.watch(t,n=>{var i;(i=e.onSearch)==null||i.call(e,n)}),(n,i)=>(u.openBlock(),u.createBlock(u.unref(Zt.VTextField),{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:n.variant,"hide-details":"",density:"compact",modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s)},{"prepend-inner":u.withCtx(()=>[u.createVNode(u.unref(nO),{size:"15",class:"ma-1 me-1"})]),_:1},8,["variant","modelValue"]))}}),GO={class:"d-flex flex-row align-center"},Wv=u.defineComponent({__name:"ColumnSettingsDialog",props:{columns:{}},setup(r){return(e,t)=>{const n=u.resolveComponent("GripVerticalIcon"),i=u.resolveComponent("v-list-item-content");return u.openBlock(),u.createBlock(ma,{"dialog-id":"col-settings",buttons:!1,title:"Column settings"},{default:u.withCtx(()=>[u.createVNode(qO),u.createVNode(Ut.VList,null,{default:u.withCtx(()=>[u.createVNode(u.unref(WO),{list:e.columns,animation:200,"ghost-class":"ghost-card"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.columns,s=>(u.openBlock(),u.createBlock(Ut.VListItem,{key:s.key,class:"pa-0"},{default:u.withCtx(()=>[u.createElementVNode("div",GO,[u.createVNode(n,{class:"mb-2"}),u.createVNode(Ut.VListItemAction,null,{default:u.withCtx(()=>[u.createVNode(gk.VCheckbox,{modelValue:s.checked,"onUpdate:modelValue":c=>s.checked=c},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),u.createVNode(i,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,{class:"mb-1"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.title)+"  ",1)]),_:2},1024)]),_:2},1024),s.icon?(u.openBlock(),u.createBlock(Ys.VIcon,{key:0},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.icon),1)]),_:2},1024)):u.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),Ec=u.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(u.openBlock(),u.createBlock(Bt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:u.withCtx(()=>[e.title?(u.openBlock(),u.createBlock(Bt.VCardTitle,{key:0,class:"pa-0"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.title),1)]),_:1})):u.createCommentVNode("",!0),u.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),qv=u.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},callback:{},cancelCallback:{},width:{default:"500"},loading:{type:Boolean}},setup(r){return(e,t)=>(u.openBlock(),u.createBlock(Ms.VDialog,{scrim:"rgb(0,0,0,100)",width:e.width},{activator:u.withCtx(({isActive:n,props:i})=>[u.renderSlot(e.$slots,"button",u.normalizeProps(u.guardReactiveProps({isActive:n,props:i})))]),default:u.withCtx(({isActive:n})=>[u.createVNode(Bt.VCard,{title:e.title,rounded:"","min-height":"300"},{prepend:u.withCtx(()=>[u.createVNode(u.unref(tO),{color:"rgb(var(--v-theme-secondary))"})]),append:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:i=>n.value=!1,variant:"plain"},null,8,["onClick"])]),default:u.withCtx(()=>[u.createVNode(Bt.VCardText,{class:"text-center mt-7"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text),1)]),_:1}),u.createVNode(Bt.VCardActions,{class:"d-flex"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:i=>n.value=!1},{default:u.withCtx(()=>t[0]||(t[0]=[u.createTextVNode(" Cancel ")])),_:2},1032,["onClick"]),u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:e.callback},{default:u.withCtx(()=>t[1]||(t[1]=[u.createTextVNode(" Confirm ")])),_:1},8,["onClick"])]),_:2},1024)]),_:2},1032,["title"])]),_:3},8,["width"]))}}),Gv=u.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=new URL("@/assets/profile-placeholder.svg",typeof document>"u"?require("url").pathToFileURL(__filename).href:gu&&gu.tagName.toUpperCase()==="SCRIPT"&&gu.src||new URL("jplan-pack.cjs.js",document.baseURI).href).href,t=r,n=u.ref(t.src||e);function i(){n.value=e}return(s,c)=>(u.openBlock(),u.createBlock(Wp.VAvatar,{size:"50"},{default:u.withCtx(()=>[u.createVNode(qp.VImg,{src:n.value,"lazy-src":u.unref(e),onError:i,width:"50",alt:"profile-placeholder"},null,8,["src","lazy-src"])]),_:1}))}}),jv=u.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=u.ref(e.img||"/assets/profile-placeholder.svg");function n(){t.value="/assets/profile-placeholder.svg"}return(i,s)=>(u.openBlock(),u.createBlock(Wp.VAvatar,{size:i.size},{default:u.withCtx(()=>[u.createVNode(qp.VImg,{src:t.value,"lazy-src":"/assets/profile-placeholder.svg",onError:n,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),jO=u.defineComponent({__name:"ContextMenu",setup(r){const e=u.ref(!1),t=u.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return u.onMounted(()=>{document.addEventListener("click",i)}),u.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,c)=>(u.openBlock(),u.createElementBlock("div",{onContextmenu:u.withModifiers(n,["right"]),class:"relative w-full h-full"},[u.renderSlot(s.$slots,"default",{},void 0,!0),u.createVNode(mk.VMenu,{modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=d=>e.value=d),style:u.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:u.withCtx(()=>[u.createVNode(Ut.VList,null,{default:u.withCtx(()=>[u.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),Ca=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Yv=Ca(jO,[["__scopeId","data-v-a53b15af"]]),YO={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},Jv=u.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock("div",YO,u.toDisplayString(e.value),1))}}),JO={key:0,class:"mb-2 ms-1"},rc=u.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled");return(s,c)=>(u.openBlock(),u.createElementBlock("div",null,[s.name?(u.openBlock(),u.createElementBlock("p",JO,u.toDisplayString(s.name),1)):u.createCommentVNode("",!0),s.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.label),1)]),_:1})):u.createCommentVNode("",!0),s.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Zt.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(u.openBlock(),u.createBlock(Jv,{key:3,value:s.modelValue},null,8,["value"])):u.createCommentVNode("",!0)]))}}),QO={key:0,class:"mb-2 ms-1"},Qv=u.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled"),s=u.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),c=d=>{n("update:modelValue",d)};return(d,f)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[d.name?(u.openBlock(),u.createElementBlock("p",QO,u.toDisplayString(d.name),1)):u.createCommentVNode("",!0),d.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(d.label),1)]),_:1})):u.createCommentVNode("",!0),d.readonly?(u.openBlock(),u.createBlock(Jv,{key:3,value:s.value},null,8,["value"])):(u.openBlock(),u.createBlock(u.unref(Zt.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),c],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),XO={key:0,class:"mb-2 ms-1"},ZO={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},Xv=u.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled");return(s,c)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[s.name?(u.openBlock(),u.createElementBlock("p",XO,u.toDisplayString(s.name),1)):u.createCommentVNode("",!0),s.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.label),1)]),_:1})):u.createCommentVNode("",!0),s.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(pk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(u.openBlock(),u.createElementBlock("div",ZO,u.toDisplayString(s.modelValue),1)):u.createCommentVNode("",!0)],64))}}),eN={class:"text-faded mt-7"},tN={class:"d-flex align-baseline mb-1"},nN={class:"me-1"},rN={class:"max-w"},oN={key:0,class:"mb-1"},iN={key:1,class:"mb-1"},aN={class:"mb-1"},sN=u.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock("div",eN,[u.createVNode(pt.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:u.withCtx(()=>[e.id?(u.openBlock(),u.createBlock(pt.VCol,{key:0,cols:"auto",class:"pa-2"},{default:u.withCtx(()=>[t[1]||(t[1]=u.createElementVNode("p",{class:"d-flex align-baseline mb-1"},[u.createElementVNode("b",null," ID: "),u.createElementVNode("span",{class:"max-w"},"  -")],-1)),u.createElementVNode("p",tN,[u.createElementVNode("b",nN,u.toDisplayString(e.id.title)+": ",1),u.createElementVNode("span",rN,u.toDisplayString(e.meta[e.id.key]),1),u.createElementVNode("span",null,[u.createVNode(yc,{"content-to-copy":e.meta[e.id.key],size:15},null,8,["content-to-copy"])])]),u.createElementVNode("p",null,[t[0]||(t[0]=u.createElementVNode("b",null,"Created: ",-1)),u.createTextVNode(u.toDisplayString(e.meta.created_at)+" - "+u.toDisplayString(e.meta.created_by),1)])]),_:1})):u.createCommentVNode("",!0),u.createVNode(pt.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:u.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(u.openBlock(),u.createElementBlock("p",oN,[t[2]||(t[2]=u.createElementVNode("b",null,"Updated:  ",-1)),u.createTextVNode(u.toDisplayString(e.meta.updated_at)+" - "+u.toDisplayString(e.meta.updated_by),1)])):(u.openBlock(),u.createElementBlock("p",iN,[t[3]||(t[3]=u.createElementVNode("b",null,"Modified:  ",-1)),u.createTextVNode(u.toDisplayString(e.meta.modified_at)+" - "+u.toDisplayString(e.meta.modified_by),1)])),u.createElementVNode("p",aN,[t[4]||(t[4]=u.createElementVNode("b",null,"Delegated: ",-1)),u.createTextVNode(u.toDisplayString(e.meta.delegated_at)+" - "+u.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:1})]))}}),Zv=Ca(sN,[["__scopeId","data-v-61d006fd"]]),ey=u.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(u.openBlock(),u.createBlock(qe.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),ty=u.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=u.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,c)=>(u.openBlock(),u.createBlock(qe.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:u.withKeys(i,["enter"]),class:"j-btn-form"},{default:u.withCtx(()=>c[0]||(c[0]=[u.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),cN={class:"mt-4"},ny=u.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(u.openBlock(),u.createBlock(Ec,{title:n.title,class:"d-flex flex-column ma-0"},{default:u.withCtx(()=>[n.title?(u.openBlock(),u.createBlock(Zi.VDivider,{key:0})):u.createCommentVNode("",!0),u.createElementVNode("div",cN,[u.renderSlot(n.$slots,"default")]),u.createVNode(Bt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:u.withCtx(()=>[u.createVNode(pt.VRow,{justify:"space-between",class:"mt-4"},{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:u.withCtx(()=>[u.createVNode(Zv,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),u.createVNode(pt.VSpacer),u.createVNode(pt.VCol,{cols:"auto",class:"align-content-end"},{default:u.withCtx(()=>[u.createVNode(ey,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),u.createVNode(ty,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),lN={class:"d-flex align-items-center"},uN={key:0,class:"d-flex align-center"},dN={class:"ms-1"},hN={class:"d-flex"},fN={class:"d-flex mb-1 align-center"},gN={class:"min-w-100 relative"},ry=u.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=u.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,c=u.ref(t.readonly);function d(){c.value=!c.value,n("update:isEdition",c.value)}async function f(){n("delete"),n("disable")}return(p,w)=>(u.openBlock(),u.createElementBlock("div",lN,[p.id?(u.openBlock(),u.createElementBlock("div",uN,[w[0]||(w[0]=u.createElementVNode("b",null,"ID:",-1)),u.createElementVNode("span",dN,u.toDisplayString(p.id),1),u.createVNode(yc,{"content-to-copy":p.id,size:20},null,8,["content-to-copy"])])):u.createCommentVNode("",!0),u.createVNode(pt.VSpacer),u.createElementVNode("div",hN,[u.createVNode(qe.VBtn,{onClick:f,variant:"text"},{default:u.withCtx(()=>[s?(u.openBlock(),u.createBlock(u.unref(XR),{key:0,size:"11",class:"me-2"})):u.createCommentVNode("",!0),u.createVNode(Ys.VIcon,{class:"me-2"},{default:u.withCtx(()=>w[1]||(w[1]=[u.createTextVNode("mdi-delete-outline")])),_:1}),u.createTextVNode(" "+u.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),u.createElementVNode("div",fN,[u.createVNode(Zi.VDivider,{class:"mx-2 my-1",vertical:""}),u.createElementVNode("div",gN,[u.withDirectives(u.createVNode(qe.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:u.withCtx(()=>w[2]||(w[2]=[u.createTextVNode(" Edit ")])),_:1},512),[[u.vShow,!c.value]]),u.withDirectives(u.createVNode(qe.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:u.withCtx(()=>[u.createVNode(Ys.VIcon,{class:"pt-1 pe-2"},{default:u.withCtx(()=>w[3]||(w[3]=[u.createTextVNode("mdi-close")])),_:1}),w[4]||(w[4]=u.createTextVNode(" Cancel "))]),_:1},512),[[u.vShow,c.value]])])])])]))}}),mN={class:"d-flex flex-column"},pN={class:"height d-flex flex-column"},vN={class:"d-flex justify-between align-end"},yN=u.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=u.useAttrs();return(i,s)=>(u.openBlock(),u.createBlock(Ec,null,{default:u.withCtx(()=>[u.createElementVNode("div",mN,[u.createElementVNode("div",pN,[u.renderSlot(i.$slots,"default",{},void 0,!0)])]),u.createElementVNode("div",vN,[u.createVNode(pt.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:u.withCtx(()=>[u.createVNode(Zv,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(pt.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:u.withCtx(()=>["onCancel"in u.unref(n)?(u.openBlock(),u.createBlock(ey,{key:0,title:"Back",onCancel:s[0]||(s[0]=c=>t("onCancel"))})):u.createCommentVNode("",!0),"onSave"in u.unref(n)?(u.openBlock(),u.createBlock(ty,{key:1,onOnSave:s[1]||(s[1]=c=>t("onSave"))})):u.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),oy=Ca(yN,[["__scopeId","data-v-489d31c3"]]);/**
20
+ */function wm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?wm(Object(t),!0).forEach(function(n){sO(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):wm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fs(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fs=function(e){return typeof e}:Fs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fs(r)}function sO(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function cO(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function lO(r,e){if(r==null)return{};var t=cO(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var uO="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),va=_r(/Edge/i),_m=_r(/firefox/i),ea=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),Pv=_r(/iP(ad|od|hone)/i),dO=_r(/chrome/i)&&_r(/android/i),Mv={capture:!1,passive:!1};function Se(r,e,t){r.addEventListener(e,t,!Ar&&Mv)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&Mv)}function Xs(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function hO(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&Xs(r,e):Xs(r,e))||n&&r===t)return r;if(r===t)break}while(r=hO(r))}return null}var Tm=/\s+/g;function jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Tm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Tm," ")}}function oe(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function si(r,e){var t="";if(typeof r=="string")t=r;else do{var n=oe(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function Dv(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function ot(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,c,d,f,g,p,w;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),c=s.top,d=s.left,f=s.bottom,g=s.right,p=s.height,w=s.width):(c=0,d=0,f=window.innerHeight,g=window.innerWidth,p=window.innerHeight,w=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(oe(i,"transform")!=="none"||t&&oe(i,"position")!=="static")){var C=i.getBoundingClientRect();c-=C.top+parseInt(oe(i,"border-top-width")),d-=C.left+parseInt(oe(i,"border-left-width")),f=c+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=si(i||r),T=S&&S.a,b=S&&S.d;S&&(c/=b,d/=T,w/=T,p/=b,f=c+p,g=d+w)}return{top:c,left:d,bottom:f,right:g,width:w,height:p}}}function Em(r,e,t){for(var n=Kr(r,!0),i=ot(r)[e];n;){var s=ot(n)[t],c=void 0;if(c=i>=s,!c)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function di(r,e,t,n){for(var i=0,s=0,c=r.children;s<c.length;){if(c[s].style.display!=="none"&&c[s]!==ie.ghost&&(n||c[s]!==ie.dragged)&&Yn(c[s],t.draggable,r,!1)){if(i===e)return c[s];i++}s++}return null}function Nd(r,e){for(var t=r.lastElementChild;t&&(t===ie.ghost||oe(t,"display")==="none"||e&&!Xs(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==ie.clone&&(!e||Xs(r,e))&&t++;return t}function Sm(r){var e=0,t=0,n=tr();if(r)do{var i=si(r),s=i.a,c=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*c}while(r!==n&&(r=r.parentNode));return[e,t]}function fO(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=oe(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function gO(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function yu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ta;function xv(r,e){return function(){if(!ta){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ta=setTimeout(function(){ta=void 0},e)}}}function mO(){clearTimeout(ta),ta=void 0}function Lv(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function Uv(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function pO(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(oe(i,"display")==="none"||i===ie.ghost)){r.push({target:i,rect:ot(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var c=si(i,!0);c&&(s.top-=c.f,s.left-=c.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(fO(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,c=0;r.forEach(function(d){var f=0,g=d.target,p=g.fromRect,w=ot(g),C=g.prevFromRect,S=g.prevToRect,T=d.rect,b=si(g,!0);b&&(w.top-=b.f,w.left-=b.e),g.toRect=w,g.thisAnimationDuration&&yu(C,w)&&!yu(p,w)&&(T.top-w.top)/(T.left-w.left)===(p.top-w.top)/(p.left-w.left)&&(f=yO(T,C,S,i.options)),yu(w,p)||(g.prevFromRect=p,g.prevToRect=w,f||(f=i.options.animation),i.animate(g,T,w,f)),f&&(s=!0,c=Math.max(c,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},c):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,c){if(c){oe(n,"transition",""),oe(n,"transform","");var d=si(this.el),f=d&&d.a,g=d&&d.d,p=(i.left-s.left)/(f||1),w=(i.top-s.top)/(g||1);n.animatingX=!!p,n.animatingY=!!w,oe(n,"transform","translate3d("+p+"px,"+w+"px,0)"),this.forRepaintDummy=vO(n),oe(n,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),oe(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){oe(n,"transition",""),oe(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},c)}}}}function vO(r){return r.offsetWidth}function yO(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var Ho=[],Cu={initializeByDefault:!0},ya={mount:function(e){for(var t in Cu)Cu.hasOwnProperty(t)&&!(t in e)&&(e[t]=Cu[t]);Ho.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Ho.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";Ho.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][s]&&t[c.pluginName][s](rr({sortable:t},n)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){Ho.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var c=this.modifyOption(e,s,e.options[s]);typeof c<"u"&&(e.options[s]=c)}},getEventProperties:function(e,t){var n={};return Ho.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return Ho.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function CO(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,c=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,p=r.oldDraggableIndex,w=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,T=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var b,N=e.options,K="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!va?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=c||t,b.from=d||t,b.item=i||t,b.clone=s,b.oldIndex=f,b.newIndex=g,b.oldDraggableIndex=p,b.newDraggableIndex=w,b.originalEvent=C,b.pullMode=S?S.lastPutMode:void 0;var H=rr(rr({},T),ya.getEventProperties(n,e));for(var V in H)b[V]=H[V];t&&t.dispatchEvent(b),N[K]&&N[K].call(e,b)}}var wO=["evt"],Lt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=lO(n,wO);ya.pluginEvent.bind(ie)(e,t,rr({dragEl:F,parentEl:ze,ghostEl:le,rootEl:Be,nextEl:ao,lastDownEl:Hs,cloneEl:We,cloneHidden:Fr,dragStarted:ji,putSortable:mt,activeSortable:ie.active,originalEvent:i,oldIndex:ri,oldDraggableIndex:na,newIndex:Yt,newDraggableIndex:Br,hideGhostForTarget:Vv,unhideGhostForTarget:$v,cloneNowHidden:function(){Fr=!0},cloneNowShown:function(){Fr=!1},dispatchSortableEvent:function(d){Rt({sortable:t,name:d,originalEvent:i})}},s))};function Rt(r){CO(rr({putSortable:mt,cloneEl:We,targetEl:F,rootEl:Be,oldIndex:ri,oldDraggableIndex:na,newIndex:Yt,newDraggableIndex:Br},r))}var F,ze,le,Be,ao,Hs,We,Fr,ri,Yt,na,Br,ys,mt,Jo=!1,Zs=!1,ec=[],ro,Pn,wu,_u,Am,Im,ji,Vo,ra,oa=!1,Cs=!1,Vs,_t,Tu=[],Xu=!1,tc=[],Tc=typeof document<"u",ws=Pv,bm=va||Ar?"cssFloat":"float",_O=Tc&&!dO&&!Pv&&"draggable"in document.createElement("div"),Bv=function(){if(Tc){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Fv=function(e,t){var n=oe(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=di(e,0,t),c=di(e,1,t),d=s&&oe(s),f=c&&oe(c),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+ot(s).width,p=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+ot(c).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var w=d.float==="left"?"left":"right";return c&&(f.clear==="both"||f.clear===w)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[bm]==="none"||c&&n[bm]==="none"&&g+p>i)?"vertical":"horizontal"},TO=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,c=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+c/2===d+g/2},EO=function(e,t){var n;return ec.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Nd(i))){var c=ot(i),d=e>=c.left-s&&e<=c.right+s,f=t>=c.top-s&&t<=c.bottom+s;if(d&&f)return n=i}}),n},Hv=function(e){function t(s,c){return function(d,f,g,p){var w=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(c||w))return!0;if(s==null||s===!1)return!1;if(c&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,p),c)(d,f,g,p);var C=(c?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||Fs(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Vv=function(){!Bv&&le&&oe(le,"display","none")},$v=function(){!Bv&&le&&oe(le,"display","")};Tc&&document.addEventListener("click",function(r){if(Zs)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),Zs=!1,!1},!0);var oo=function(e){if(F){e=e.touches?e.touches[0]:e;var t=EO(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},SO=function(e){F&&F.parentNode[rn]._isOutsideThisEl(e.target)};function ie(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fv(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ie.supportPointer!==!1&&"PointerEvent"in window&&!ea,emptyInsertThreshold:5};ya.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Hv(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:_O,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Se(r,"pointerdown",this._onTapStart):(Se(r,"mousedown",this._onTapStart),Se(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(r,"dragover",this),Se(r,"dragenter",this)),ec.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,pO())}ie.prototype={constructor:ie,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Vo=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,F):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,p=i.filter;if(PO(n),!F&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ea&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&Hs!==f)){if(ri=En(f),na=En(f,i.draggable),typeof p=="function"){if(p.call(this,e,f,this)){Rt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Lt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(w){if(w=Yn(g,w.trim(),n,!1),w)return Rt({sortable:t,rootEl:w,name:"filter",targetEl:f,fromEl:n,toEl:n}),Lt("filter",t,{evt:e}),!0}),p)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,c=i.options,d=s.ownerDocument,f;if(n&&!F&&n.parentNode===s){var g=ot(n);if(Be=s,F=n,ze=F.parentNode,ao=F.nextSibling,Hs=n,ys=c.group,ie.dragged=F,ro={target:F,clientX:(t||e).clientX,clientY:(t||e).clientY},Am=ro.clientX-g.left,Im=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,F.style["will-change"]="all",f=function(){if(Lt("delayEnded",i,{evt:e}),ie.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!_m&&i.nativeDraggable&&(F.draggable=!0),i._triggerDragStart(e,t),Rt({sortable:i,name:"choose",originalEvent:e}),jt(F,c.chosenClass,!0)},c.ignore.split(",").forEach(function(p){Dv(F,p.trim(),Eu)}),Se(d,"dragover",oo),Se(d,"mousemove",oo),Se(d,"touchmove",oo),Se(d,"mouseup",i._onDrop),Se(d,"touchend",i._onDrop),Se(d,"touchcancel",i._onDrop),_m&&this.nativeDraggable&&(this.options.touchStartThreshold=4,F.draggable=!0),Lt("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(va||Ar))){if(ie.eventCanceled){this._onDrop();return}Se(d,"mouseup",i._disableDelayedDrag),Se(d,"touchend",i._disableDelayedDrag),Se(d,"touchcancel",i._disableDelayedDrag),Se(d,"mousemove",i._delayedDragTouchMoveHandler),Se(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Se(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,c.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){F&&Eu(F),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Se(document,"pointermove",this._onTouchMove):t?Se(document,"touchmove",this._onTouchMove):Se(document,"mousemove",this._onTouchMove):(Se(F,"dragend",this),Se(Be,"dragstart",this._onDragStart));try{document.selection?$s(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jo=!1,Be&&F){Lt("dragStarted",this,{evt:t}),this.nativeDraggable&&Se(document,"dragover",SO);var n=this.options;!e&&jt(F,n.dragClass,!1),jt(F,n.ghostClass,!0),ie.active=this,e&&this._appendGhost(),Rt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,Vv();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(F.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);$v()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,c=le&&si(le,!0),d=le&&c&&c.a,f=le&&c&&c.d,g=ws&&_t&&Sm(_t),p=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Tu[0]:0)/(d||1),w=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Tu[1]:0)/(f||1);if(!ie.active&&!Jo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){c?(c.e+=p-(wu||0),c.f+=w-(_u||0)):c={a:1,b:0,c:0,d:1,e:p,f:w};var C="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");oe(le,"webkitTransform",C),oe(le,"mozTransform",C),oe(le,"msTransform",C),oe(le,"transform",C),wu=p,_u=w,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Be,t=ot(F,!0,ws,!0,e),n=this.options;if(ws){for(_t=e;oe(_t,"position")==="static"&&oe(_t,"transform")==="none"&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=tr()),t.top+=_t.scrollTop,t.left+=_t.scrollLeft):_t=tr(),Tu=Sm(_t)}le=F.cloneNode(!0),jt(le,n.ghostClass,!1),jt(le,n.fallbackClass,!0),jt(le,n.dragClass,!0),oe(le,"transition",""),oe(le,"transform",""),oe(le,"box-sizing","border-box"),oe(le,"margin",0),oe(le,"top",t.top),oe(le,"left",t.left),oe(le,"width",t.width),oe(le,"height",t.height),oe(le,"opacity","0.8"),oe(le,"position",ws?"absolute":"fixed"),oe(le,"zIndex","100000"),oe(le,"pointerEvents","none"),ie.ghost=le,e.appendChild(le),oe(le,"transform-origin",Am/parseInt(le.style.width)*100+"% "+Im/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Lt("dragStart",this,{evt:e}),ie.eventCanceled){this._onDrop();return}Lt("setupClone",this),ie.eventCanceled||(We=Uv(F),We.draggable=!1,We.style["will-change"]="",this._hideClone(),jt(We,this.options.chosenClass,!1),ie.clone=We),n.cloneId=$s(function(){Lt("clone",n),!ie.eventCanceled&&(n.options.removeCloneOnHide||Be.insertBefore(We,F),n._hideClone(),Rt({sortable:n,name:"clone"}))}),!t&&jt(F,s.dragClass,!0),t?(Zs=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,F)),Se(document,"drop",n),oe(F,"transform","translateZ(0)")),Jo=!0,n._dragStartId=$s(n._dragStarted.bind(n,t,e)),Se(document,"selectstart",n),ji=!0,ea&&oe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,c,d=this.options,f=d.group,g=ie.active,p=ys===f,w=d.sort,C=mt||g,S,T=this,b=!1;if(Xu)return;function N(Je,yt){Lt(Je,T,rr({evt:e,isOwner:p,axis:S?"vertical":"horizontal",revert:c,dragRect:i,targetRect:s,canSort:w,fromSortable:C,target:n,completed:H,onMove:function(Vt,qc){return _s(Be,t,F,i,Vt,ot(Vt),e,qc)},changed:V},yt))}function K(){N("dragOverAnimationCapture"),T.captureAnimationState(),T!==C&&C.captureAnimationState()}function H(Je){return N("dragOverCompleted",{insertion:Je}),Je&&(p?g._hideClone():g._showClone(T),T!==C&&(jt(F,mt?mt.options.ghostClass:g.options.ghostClass,!1),jt(F,d.ghostClass,!0)),mt!==T&&T!==ie.active?mt=T:T===ie.active&&mt&&(mt=null),C===T&&(T._ignoreWhileAnimating=n),T.animateAll(function(){N("dragOverAnimationComplete"),T._ignoreWhileAnimating=null}),T!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===F&&!F.animated||n===t&&!n.animated)&&(Vo=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(F.parentNode[rn]._isOutsideThisEl(e.target),!Je&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),b=!0}function V(){Yt=En(F),Br=En(F,d.draggable),Rt({sortable:T,name:"change",toEl:t,newIndex:Yt,newDraggableIndex:Br,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),N("dragOver"),ie.eventCanceled)return b;if(F.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||T._ignoreWhileAnimating===n)return H(!1);if(Zs=!1,g&&!d.disabled&&(p?w||(c=ze!==Be):mt===this||(this.lastPutMode=ys.checkPull(this,g,F,e))&&f.checkPut(this,g,F,e))){if(S=this._getDirection(e,n)==="vertical",i=ot(F),N("dragOverValid"),ie.eventCanceled)return b;if(c)return ze=Be,K(),this._hideClone(),N("revert"),ie.eventCanceled||(ao?Be.insertBefore(F,ao):Be.appendChild(F)),H(!0);var z=Nd(t,d.draggable);if(!z||kO(e,S,this)&&!z.animated){if(z===F)return H(!1);if(z&&t===e.target&&(n=z),n&&(s=ot(n)),_s(Be,t,F,i,n,s,e,!!n)!==!1)return K(),t.appendChild(F),ze=t,V(),H(!0)}else if(z&&bO(e,S,this)){var Q=di(t,0,d,!0);if(Q===F)return H(!1);if(n=Q,s=ot(n),_s(Be,t,F,i,n,s,e,!1)!==!1)return K(),t.insertBefore(F,Q),ze=t,V(),H(!0)}else if(n.parentNode===t){s=ot(n);var we=0,W,et=F.parentNode!==t,_e=!TO(F.animated&&F.toRect||i,n.animated&&n.toRect||s,S),Y=S?"top":"left",G=Em(n,"top","top")||Em(F,"top","top"),Te=G?G.scrollTop:void 0;Vo!==n&&(W=s[Y],oa=!1,Cs=!_e&&d.invertSwap||et),we=RO(e,n,s,S,_e?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Cs,Vo===n);var Le;if(we!==0){var vt=En(F);do vt-=we,Le=ze.children[vt];while(Le&&(oe(Le,"display")==="none"||Le===le))}if(we===0||Le===n)return H(!1);Vo=n,ra=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Nt=_s(Be,t,F,i,n,s,e,sn);if(Nt!==!1)return(Nt===1||Nt===-1)&&(sn=Nt===1),Xu=!0,setTimeout(IO,30),K(),sn&&!An?t.appendChild(F):n.parentNode.insertBefore(F,sn?An:n),G&&Lv(G,0,Te-G.scrollTop),ze=F.parentNode,W!==void 0&&!Cs&&(Vs=Math.abs(W-ot(n)[Y])),V(),H(!0)}if(t.contains(F))return H(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Yt=En(F),Br=En(F,n.draggable),Lt("drop",this,{evt:e}),ze=F&&F.parentNode,Yt=En(F),Br=En(F,n.draggable),ie.eventCanceled){this._nulling();return}Jo=!1,Cs=!1,oa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zu(this.cloneId),Zu(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ea&&oe(document.body,"user-select",""),oe(F,"transform",""),e&&(ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Be===ze||mt&&mt.lastPutMode!=="clone")&&We&&We.parentNode&&We.parentNode.removeChild(We),F&&(this.nativeDraggable&&Ce(F,"dragend",this),Eu(F),F.style["will-change"]="",ji&&!Jo&&jt(F,mt?mt.options.ghostClass:this.options.ghostClass,!1),jt(F,this.options.chosenClass,!1),Rt({sortable:this,name:"unchoose",toEl:ze,newIndex:null,newDraggableIndex:null,originalEvent:e}),Be!==ze?(Yt>=0&&(Rt({rootEl:ze,name:"add",toEl:ze,fromEl:Be,originalEvent:e}),Rt({sortable:this,name:"remove",toEl:ze,originalEvent:e}),Rt({rootEl:ze,name:"sort",toEl:ze,fromEl:Be,originalEvent:e}),Rt({sortable:this,name:"sort",toEl:ze,originalEvent:e})),mt&&mt.save()):Yt!==ri&&Yt>=0&&(Rt({sortable:this,name:"update",toEl:ze,originalEvent:e}),Rt({sortable:this,name:"sort",toEl:ze,originalEvent:e})),ie.active&&((Yt==null||Yt===-1)&&(Yt=ri,Br=na),Rt({sortable:this,name:"end",toEl:ze,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Lt("nulling",this),Be=F=ze=le=ao=We=Hs=Fr=ro=Pn=ji=Yt=Br=ri=na=Vo=ra=mt=ys=ie.dragged=ie.ghost=ie.clone=ie.active=null,tc.forEach(function(e){e.checked=!0}),tc.length=wu=_u=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":F&&(this._onDragOver(e),AO(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,c=this.options;i<s;i++)t=n[i],Yn(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||NO(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,c){var d=i.children[c];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=ya.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&Hv(n)},destroy:function(){Lt("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ec.splice(ec.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Fr){if(Lt("hideClone",this),ie.eventCanceled)return;oe(We,"display","none"),this.options.removeCloneOnHide&&We.parentNode&&We.parentNode.removeChild(We),Fr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Fr){if(Lt("showClone",this),ie.eventCanceled)return;F.parentNode==Be&&!this.options.group.revertClone?Be.insertBefore(We,F):ao?Be.insertBefore(We,ao):Be.appendChild(We),this.options.group.revertClone&&this.animate(F,We),oe(We,"display",""),Fr=!1}}};function AO(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function _s(r,e,t,n,i,s,c,d){var f,g=r[rn],p=g.options.onMove,w;return window.CustomEvent&&!Ar&&!va?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||ot(e),f.willInsertAfter=d,f.originalEvent=c,r.dispatchEvent(f),p&&(w=p.call(g,f,c)),w}function Eu(r){r.draggable=!1}function IO(){Xu=!1}function bO(r,e,t){var n=ot(di(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function kO(r,e,t){var n=ot(Nd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function RO(r,e,t,n,i,s,c,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,p=n?t.top:t.left,w=n?t.bottom:t.right,C=!1;if(!c){if(d&&Vs<g*i){if(!oa&&(ra===1?f>p+g*s/2:f<w-g*s/2)&&(oa=!0),oa)C=!0;else if(ra===1?f<p+Vs:f>w-Vs)return-ra}else if(f>p+g*(1-i)/2&&f<w-g*(1-i)/2)return OO(e)}return C=C||c,C&&(f<p+g*s/2||f>w-g*s/2)?f>p+g/2?1:-1:0}function OO(r){return En(F)<En(r)?1:-1}function NO(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function PO(r){tc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&tc.push(n)}}function $s(r){return setTimeout(r,0)}function Zu(r){return clearTimeout(r)}Tc&&Se(document,"touchmove",function(r){(ie.active||Jo)&&r.cancelable&&r.preventDefault()});ie.utils={on:Se,off:Ce,css:oe,find:Dv,is:function(e,t){return!!Yn(e,t,e,!1)},extend:gO,throttle:xv,closest:Yn,toggleClass:jt,clone:Uv,index:En,nextTick:$s,cancelNextTick:Zu,detectDirection:Fv,getChild:di};ie.get=function(r){return r[rn]};ie.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(ie.utils=rr(rr({},ie.utils),n.utils)),ya.mount(n)})};ie.create=function(r,e){return new ie(r,e)};ie.version=uO;var Qe=[],Yi,ed,td=!1,Su,Au,nc,Ji;function MO(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Se(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Se(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Se(document,"touchmove",this._handleFallbackAutoScroll):Se(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),km(),Ks(),mO()},nulling:function(){nc=ed=Yi=td=Ji=Su=Au=null,Qe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,c);if(nc=t,n||this.options.forceAutoScrollFallback||va||Ar||ea){Iu(t,this.options,d,n);var f=Kr(d,!0);td&&(!Ji||s!==Su||c!==Au)&&(Ji&&km(),Ji=setInterval(function(){var g=Kr(document.elementFromPoint(s,c),!0);g!==f&&(f=g,Ks()),Iu(t,i.options,g,n)},10),Su=s,Au=c)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){Ks();return}Iu(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function Ks(){Qe.forEach(function(r){clearInterval(r.pid)}),Qe=[]}function km(){clearInterval(Ji)}var Iu=xv(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,p;ed!==t&&(ed=t,Ks(),Yi=e.scroll,p=e.scrollFn,Yi===!0&&(Yi=Kr(t,!0)));var w=0,C=Yi;do{var S=C,T=ot(S),b=T.top,N=T.bottom,K=T.left,H=T.right,V=T.width,z=T.height,Q=void 0,we=void 0,W=S.scrollWidth,et=S.scrollHeight,_e=oe(S),Y=S.scrollLeft,G=S.scrollTop;S===f?(Q=V<W&&(_e.overflowX==="auto"||_e.overflowX==="scroll"||_e.overflowX==="visible"),we=z<et&&(_e.overflowY==="auto"||_e.overflowY==="scroll"||_e.overflowY==="visible")):(Q=V<W&&(_e.overflowX==="auto"||_e.overflowX==="scroll"),we=z<et&&(_e.overflowY==="auto"||_e.overflowY==="scroll"));var Te=Q&&(Math.abs(H-i)<=c&&Y+V<W)-(Math.abs(K-i)<=c&&!!Y),Le=we&&(Math.abs(N-s)<=c&&G+z<et)-(Math.abs(b-s)<=c&&!!G);if(!Qe[w])for(var vt=0;vt<=w;vt++)Qe[vt]||(Qe[vt]={});(Qe[w].vx!=Te||Qe[w].vy!=Le||Qe[w].el!==S)&&(Qe[w].el=S,Qe[w].vx=Te,Qe[w].vy=Le,clearInterval(Qe[w].pid),(Te!=0||Le!=0)&&(g=!0,Qe[w].pid=setInterval((function(){n&&this.layer===0&&ie.active._onTouchMove(nc);var An=Qe[this.layer].vy?Qe[this.layer].vy*d:0,sn=Qe[this.layer].vx?Qe[this.layer].vx*d:0;typeof p=="function"&&p.call(ie.dragged.parentNode[rn],sn,An,r,nc,Qe[this.layer].el)!=="continue"||Lv(Qe[this.layer].el,sn,An)}).bind({layer:w}),24))),w++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));td=g}},30),Kv=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,w=document.elementFromPoint(p.clientX,p.clientY);f(),g&&!g.el.contains(w)&&(c("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Pd(){}Pd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=di(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Kv};Er(Pd,{pluginName:"revertOnSpill"});function Md(){}Md.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Kv};Er(Md,{pluginName:"removeOnSpill"});ie.mount(new MO);ie.mount(Md,Pd);function DO(){return typeof window<"u"?window.console:global.console}const xO=DO();function LO(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const UO=/-(\w)/g,Rm=LO(r=>r.replace(UO,(e,t)=>t?t.toUpperCase():""));function bu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Om(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function BO(r,e){return Object.values(r).indexOf(e)}function FO(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function zv(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function HO(r){return e=>{this.realList!==null&&this["onDrag"+r](e),zv.call(this,r,e)}}function VO(r){return["transition-group","TransitionGroup"].includes(r)}function $O(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?VO(e.name):!1}function KO(r,e){return e?{...e.props,...e.attrs}:r}const nd=["Start","Add","Remove","Update","End"],rd=["Choose","Unchoose","Sort","Filter","Clone"],zO=["Move",...nd,...rd].map(r=>"on"+r);let ku=null;const WO={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},qO=u.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...nd.map(r=>r.toLowerCase()),...rd.map(r=>r.toLowerCase())],props:WO,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=KO(this.$attrs,this.componentData);return r?(this.transitionMode=$O(r),u.h(this.getTag(),e,r)):u.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&xO.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};nd.forEach(i=>{r["on"+i]=HO.call(this,i)}),rd.forEach(i=>{r["on"+i]=zv.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Rm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new ie(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?u.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Rm(e);zO.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=FO(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=BO(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),ku=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;bu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Om(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){bu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){bu(r.item),Om(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const c=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(c,e)},onDragEnd(){this.computeIndexes(),ku=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(c=>c.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(ku)!==-1||!e.willInsertAfter?i:i+1}}}),GO=u.defineComponent({__name:"SearchBar",props:{variant:{default:"plain"},closesearch:{},onSearch:{}},setup(r){const e=r,t=u.ref("");return u.watch(t,n=>{var i;(i=e.onSearch)==null||i.call(e,n)}),(n,i)=>(u.openBlock(),u.createBlock(u.unref(Zt.VTextField),{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:n.variant,"hide-details":"",density:"compact",modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=s=>t.value=s)},{"prepend-inner":u.withCtx(()=>[u.createVNode(u.unref(rO),{size:"15",class:"ma-1 me-1"})]),_:1},8,["variant","modelValue"]))}}),jO={class:"d-flex flex-row align-center"},Wv=u.defineComponent({__name:"ColumnSettingsDialog",props:{columns:{}},setup(r){return(e,t)=>{const n=u.resolveComponent("GripVerticalIcon"),i=u.resolveComponent("v-list-item-content");return u.openBlock(),u.createBlock(ma,{"dialog-id":"col-settings",buttons:!1,title:"Column settings"},{default:u.withCtx(()=>[u.createVNode(GO),u.createVNode(Ut.VList,null,{default:u.withCtx(()=>[u.createVNode(u.unref(qO),{list:e.columns,animation:200,"ghost-class":"ghost-card"},{default:u.withCtx(()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.columns,s=>(u.openBlock(),u.createBlock(Ut.VListItem,{key:s.key,class:"pa-0"},{default:u.withCtx(()=>[u.createElementVNode("div",jO,[u.createVNode(n,{class:"mb-2"}),u.createVNode(Ut.VListItemAction,null,{default:u.withCtx(()=>[u.createVNode(mk.VCheckbox,{modelValue:s.checked,"onUpdate:modelValue":c=>s.checked=c},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),u.createVNode(i,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,{class:"mb-1"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.title)+"  ",1)]),_:2},1024)]),_:2},1024),s.icon?(u.openBlock(),u.createBlock(Ys.VIcon,{key:0},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.icon),1)]),_:2},1024)):u.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),Ec=u.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(u.openBlock(),u.createBlock(Bt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:u.withCtx(()=>[e.title?(u.openBlock(),u.createBlock(Bt.VCardTitle,{key:0,class:"pa-0"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.title),1)]),_:1})):u.createCommentVNode("",!0),u.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),qv=u.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},callback:{},cancelCallback:{},width:{default:"500"},loading:{type:Boolean}},setup(r){return(e,t)=>(u.openBlock(),u.createBlock(Ms.VDialog,{scrim:"rgb(0,0,0,100)",width:e.width},{activator:u.withCtx(({isActive:n,props:i})=>[u.renderSlot(e.$slots,"button",u.normalizeProps(u.guardReactiveProps({isActive:n,props:i})))]),default:u.withCtx(({isActive:n})=>[u.createVNode(Bt.VCard,{title:e.title,rounded:"","min-height":"300"},{prepend:u.withCtx(()=>[u.createVNode(u.unref(nO),{color:"rgb(var(--v-theme-secondary))"})]),append:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:i=>n.value=!1,variant:"plain"},null,8,["onClick"])]),default:u.withCtx(()=>[u.createVNode(Bt.VCardText,{class:"text-center mt-7"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(e.text),1)]),_:1}),u.createVNode(Bt.VCardActions,{class:"d-flex"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:i=>n.value=!1},{default:u.withCtx(()=>t[0]||(t[0]=[u.createTextVNode(" Cancel ")])),_:2},1032,["onClick"]),u.createVNode(qe.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:e.callback},{default:u.withCtx(()=>t[1]||(t[1]=[u.createTextVNode(" Confirm ")])),_:1},8,["onClick"])]),_:2},1024)]),_:2},1032,["title"])]),_:3},8,["width"]))}}),Gv=u.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=new URL("@/assets/profile-placeholder.svg",typeof document>"u"?require("url").pathToFileURL(__filename).href:gu&&gu.tagName.toUpperCase()==="SCRIPT"&&gu.src||new URL("jplan-pack.cjs.js",document.baseURI).href).href,t=r,n=u.ref(t.src||e);function i(){n.value=e}return(s,c)=>(u.openBlock(),u.createBlock(Wp.VAvatar,{size:"50"},{default:u.withCtx(()=>[u.createVNode(qp.VImg,{src:n.value,"lazy-src":u.unref(e),onError:i,width:"50",alt:"profile-placeholder"},null,8,["src","lazy-src"])]),_:1}))}}),jv=u.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=u.ref(e.img||"/assets/profile-placeholder.svg");function n(){t.value="/assets/profile-placeholder.svg"}return(i,s)=>(u.openBlock(),u.createBlock(Wp.VAvatar,{size:i.size},{default:u.withCtx(()=>[u.createVNode(qp.VImg,{src:t.value,"lazy-src":"/assets/profile-placeholder.svg",onError:n,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),YO=u.defineComponent({__name:"ContextMenu",setup(r){const e=u.ref(!1),t=u.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return u.onMounted(()=>{document.addEventListener("click",i)}),u.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,c)=>(u.openBlock(),u.createElementBlock("div",{onContextmenu:u.withModifiers(n,["right"]),class:"relative w-full h-full"},[u.renderSlot(s.$slots,"default",{},void 0,!0),u.createVNode(pk.VMenu,{modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=d=>e.value=d),style:u.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:u.withCtx(()=>[u.createVNode(Ut.VList,null,{default:u.withCtx(()=>[u.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),Ca=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Yv=Ca(YO,[["__scopeId","data-v-a53b15af"]]),JO={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},Jv=u.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock("div",JO,u.toDisplayString(e.value),1))}}),QO={key:0,class:"mb-2 ms-1"},rc=u.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled");return(s,c)=>(u.openBlock(),u.createElementBlock("div",null,[s.name?(u.openBlock(),u.createElementBlock("p",QO,u.toDisplayString(s.name),1)):u.createCommentVNode("",!0),s.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.label),1)]),_:1})):u.createCommentVNode("",!0),s.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(u.unref(Zt.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(u.openBlock(),u.createBlock(Jv,{key:3,value:s.modelValue},null,8,["value"])):u.createCommentVNode("",!0)]))}}),XO={key:0,class:"mb-2 ms-1"},Qv=u.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled"),s=u.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),c=d=>{n("update:modelValue",d)};return(d,f)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[d.name?(u.openBlock(),u.createElementBlock("p",XO,u.toDisplayString(d.name),1)):u.createCommentVNode("",!0),d.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(d.label),1)]),_:1})):u.createCommentVNode("",!0),d.readonly?(u.openBlock(),u.createBlock(Jv,{key:3,value:s.value},null,8,["value"])):(u.openBlock(),u.createBlock(u.unref(Zt.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),c],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),ZO={key:0,class:"mb-2 ms-1"},eN={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},Xv=u.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=u.computed(()=>t.readonly?"solo":"solo-filled");return(s,c)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[s.name?(u.openBlock(),u.createElementBlock("p",ZO,u.toDisplayString(s.name),1)):u.createCommentVNode("",!0),s.label?(u.openBlock(),u.createBlock(ca.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(s.label),1)]),_:1})):u.createCommentVNode("",!0),s.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(vk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(u.openBlock(),u.createElementBlock("div",eN,u.toDisplayString(s.modelValue),1)):u.createCommentVNode("",!0)],64))}}),tN={class:"text-faded mt-7"},nN={class:"d-flex align-baseline mb-1"},rN={class:"me-1"},oN={class:"max-w"},iN={key:0,class:"mb-1"},aN={key:1,class:"mb-1"},sN={class:"mb-1"},cN=u.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(u.openBlock(),u.createElementBlock("div",tN,[u.createVNode(pt.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:u.withCtx(()=>[e.id?(u.openBlock(),u.createBlock(pt.VCol,{key:0,cols:"auto",class:"pa-2"},{default:u.withCtx(()=>[t[1]||(t[1]=u.createElementVNode("p",{class:"d-flex align-baseline mb-1"},[u.createElementVNode("b",null," ID: "),u.createElementVNode("span",{class:"max-w"},"  -")],-1)),u.createElementVNode("p",nN,[u.createElementVNode("b",rN,u.toDisplayString(e.id.title)+": ",1),u.createElementVNode("span",oN,u.toDisplayString(e.meta[e.id.key]),1),u.createElementVNode("span",null,[u.createVNode(yc,{"content-to-copy":e.meta[e.id.key],size:15},null,8,["content-to-copy"])])]),u.createElementVNode("p",null,[t[0]||(t[0]=u.createElementVNode("b",null,"Created: ",-1)),u.createTextVNode(u.toDisplayString(e.meta.created_at)+" - "+u.toDisplayString(e.meta.created_by),1)])]),_:1})):u.createCommentVNode("",!0),u.createVNode(pt.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:u.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(u.openBlock(),u.createElementBlock("p",iN,[t[2]||(t[2]=u.createElementVNode("b",null,"Updated:  ",-1)),u.createTextVNode(u.toDisplayString(e.meta.updated_at)+" - "+u.toDisplayString(e.meta.updated_by),1)])):(u.openBlock(),u.createElementBlock("p",aN,[t[3]||(t[3]=u.createElementVNode("b",null,"Modified:  ",-1)),u.createTextVNode(u.toDisplayString(e.meta.modified_at)+" - "+u.toDisplayString(e.meta.modified_by),1)])),u.createElementVNode("p",sN,[t[4]||(t[4]=u.createElementVNode("b",null,"Delegated: ",-1)),u.createTextVNode(u.toDisplayString(e.meta.delegated_at)+" - "+u.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:1})]))}}),Zv=Ca(cN,[["__scopeId","data-v-61d006fd"]]),ey=u.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(u.openBlock(),u.createBlock(qe.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),ty=u.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=u.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,c)=>(u.openBlock(),u.createBlock(qe.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:u.withKeys(i,["enter"]),class:"j-btn-form"},{default:u.withCtx(()=>c[0]||(c[0]=[u.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),lN={class:"mt-4"},ny=u.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(u.openBlock(),u.createBlock(Ec,{title:n.title,class:"d-flex flex-column ma-0"},{default:u.withCtx(()=>[n.title?(u.openBlock(),u.createBlock(Zi.VDivider,{key:0})):u.createCommentVNode("",!0),u.createElementVNode("div",lN,[u.renderSlot(n.$slots,"default")]),u.createVNode(Bt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:u.withCtx(()=>[u.createVNode(pt.VRow,{justify:"space-between",class:"mt-4"},{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:u.withCtx(()=>[u.createVNode(Zv,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),u.createVNode(pt.VSpacer),u.createVNode(pt.VCol,{cols:"auto",class:"align-content-end"},{default:u.withCtx(()=>[u.createVNode(ey,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),u.createVNode(ty,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),uN={class:"d-flex align-items-center"},dN={key:0,class:"d-flex align-center"},hN={class:"ms-1"},fN={class:"d-flex"},gN={class:"d-flex mb-1 align-center"},mN={class:"min-w-100 relative"},ry=u.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=u.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,c=u.ref(t.readonly);function d(){c.value=!c.value,n("update:isEdition",c.value)}async function f(){n("delete"),n("disable")}return(p,w)=>(u.openBlock(),u.createElementBlock("div",uN,[p.id?(u.openBlock(),u.createElementBlock("div",dN,[w[0]||(w[0]=u.createElementVNode("b",null,"ID:",-1)),u.createElementVNode("span",hN,u.toDisplayString(p.id),1),u.createVNode(yc,{"content-to-copy":p.id,size:20},null,8,["content-to-copy"])])):u.createCommentVNode("",!0),u.createVNode(pt.VSpacer),u.createElementVNode("div",fN,[u.createVNode(qe.VBtn,{onClick:f,variant:"text"},{default:u.withCtx(()=>[s?(u.openBlock(),u.createBlock(u.unref(ZR),{key:0,size:"11",class:"me-2"})):u.createCommentVNode("",!0),u.createVNode(Ys.VIcon,{class:"me-2"},{default:u.withCtx(()=>w[1]||(w[1]=[u.createTextVNode("mdi-delete-outline")])),_:1}),u.createTextVNode(" "+u.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),u.createElementVNode("div",gN,[u.createVNode(Zi.VDivider,{class:"mx-2 my-1",vertical:""}),u.createElementVNode("div",mN,[u.withDirectives(u.createVNode(qe.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:u.withCtx(()=>w[2]||(w[2]=[u.createTextVNode(" Edit ")])),_:1},512),[[u.vShow,!c.value]]),u.withDirectives(u.createVNode(qe.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:u.withCtx(()=>[u.createVNode(Ys.VIcon,{class:"pt-1 pe-2"},{default:u.withCtx(()=>w[3]||(w[3]=[u.createTextVNode("mdi-close")])),_:1}),w[4]||(w[4]=u.createTextVNode(" Cancel "))]),_:1},512),[[u.vShow,c.value]])])])])]))}}),pN={class:"d-flex flex-column"},vN={class:"height d-flex flex-column"},yN={class:"d-flex justify-between align-end"},CN=u.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=u.useAttrs();return(i,s)=>(u.openBlock(),u.createBlock(Ec,null,{default:u.withCtx(()=>[u.createElementVNode("div",pN,[u.createElementVNode("div",vN,[u.renderSlot(i.$slots,"default",{},void 0,!0)])]),u.createElementVNode("div",yN,[u.createVNode(pt.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:u.withCtx(()=>[u.createVNode(Zv,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(pt.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:u.withCtx(()=>["onCancel"in u.unref(n)?(u.openBlock(),u.createBlock(ey,{key:0,title:"Back",onCancel:s[0]||(s[0]=c=>t("onCancel"))})):u.createCommentVNode("",!0),"onSave"in u.unref(n)?(u.openBlock(),u.createBlock(ty,{key:1,onOnSave:s[1]||(s[1]=c=>t("onSave"))})):u.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),oy=Ca(CN,[["__scopeId","data-v-489d31c3"]]);/**
21
21
  * @license @tabler/icons-vue v3.22.0 - MIT
22
22
  *
23
23
  * This source code is licensed under the MIT license.
@@ -32,43 +32,43 @@ This will fail in production.`);c=Gi,c._s.has(n)||(hm(n,i,c),process.env.NODE_EN
32
32
  *
33
33
  * This source code is licensed under the MIT license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */var CN=Sc("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
35
+ */var wN=Sc("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
36
36
  * @license @tabler/icons-vue v3.22.0 - MIT
37
37
  *
38
38
  * This source code is licensed under the MIT license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */var wN=Sc("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
40
+ */var _N=Sc("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
41
41
  * @license @tabler/icons-vue v3.22.0 - MIT
42
42
  *
43
43
  * This source code is licensed under the MIT license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */var _N=Sc("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
45
+ */var TN=Sc("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
46
46
  * @license @tabler/icons-vue v3.22.0 - MIT
47
47
  *
48
48
  * This source code is licensed under the MIT license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */var TN=Sc("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const P={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Ts={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},pi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],Pm=[...pi,P.EMAIL_SCOPE],Ot={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},st={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},zr={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},Es={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},lt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Mm={PLAIN:"plain",S256:"S256"},wa={QUERY:"query",FRAGMENT:"fragment"},EN={...wa,FORM_POST:"form_post"},iy={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},Ss={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},St={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},re={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Dd="appmetadata",SN="client_info",ia="1",oc={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Jt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},gt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Re={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},aa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Dm={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},xm={username:"username",password:"password"},As={httpSuccess:200,httpBadRequest:400},$o={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Ru={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Ur={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},AN={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},IN=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const xd="unexpected_error",bN="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const Lm={[xd]:"Unexpected error in authentication.",[bN]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class Fe extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,Fe.prototype),this.errorCode=e||P.EMPTY_STRING,this.errorMessage=t||P.EMPTY_STRING,this.subError=n||P.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ay(r,e){return new Fe(r,e?`${Lm[r]} ${e}`:Lm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ld="client_info_decoding_error",sy="client_info_empty_error",Ud="token_parsing_error",cy="null_or_empty_token",vr="endpoints_resolution_error",ly="network_error",uy="openid_config_error",dy="hash_not_deserialized",hi="invalid_state",hy="state_mismatch",ic="state_not_found",fy="nonce_mismatch",Bd="auth_time_not_found",gy="max_age_transpired",kN="multiple_matching_tokens",RN="multiple_matching_accounts",my="multiple_matching_appMetadata",py="request_cannot_be_made",vy="cannot_remove_empty_scope",yy="cannot_append_scopeset",od="empty_input_scopeset",ON="device_code_polling_cancelled",NN="device_code_expired",PN="device_code_unknown_error",Fd="no_account_in_silent_request",Cy="invalid_cache_record",Hd="invalid_cache_environment",id="no_account_found",ad="no_crypto_object",sd="unexpected_credential_type",MN="invalid_assertion",DN="invalid_client_credential",yr="token_refresh_required",xN="user_timeout_reached",wy="token_claims_cnf_required_for_signedjwt",_y="authorization_code_missing_from_server_response",Ty="binding_key_not_removed",Ey="end_session_endpoint_not_supported",Vd="key_id_missing",LN="no_network_connectivity",UN="user_canceled",BN="missing_tenant_id_error",ge="method_not_implemented",FN="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Um={[Ld]:"The client info could not be parsed/decoded correctly",[sy]:"The client info was empty",[Ud]:"Token cannot be parsed",[cy]:"The token is null or empty",[vr]:"Endpoints cannot be resolved",[ly]:"Network request failed",[uy]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[dy]:"The hash parameters could not be deserialized",[hi]:"State was not the expected format",[hy]:"State mismatch error",[ic]:"State not found",[fy]:"Nonce mismatch error",[Bd]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[gy]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[kN]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[RN]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[my]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[py]:"Token request cannot be made without authorization code or refresh token.",[vy]:"Cannot remove null or empty scope from ScopeSet",[yy]:"Cannot append ScopeSet",[od]:"Empty input ScopeSet cannot be processed",[ON]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[NN]:"Device code is expired.",[PN]:"Device code stopped polling for unknown reasons.",[Fd]:"Please pass an account object, silent flow is not supported without account information",[Cy]:"Cache record object was null or undefined.",[Hd]:"Invalid environment when attempting to create cache entry",[id]:"No account found in cache for given key.",[ad]:"No crypto object detected.",[sd]:"Unexpected credential type.",[MN]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[DN]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[yr]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[xN]:"User defined timeout for device code polling reached",[wy]:"Cannot generate a POP jwt if the token_claims are not populated",[_y]:"Server response does not contain an authorization code to proceed",[Ty]:"Could not remove the credential's binding key from storage.",[Ey]:"The provided authority does not support logout",[Vd]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[LN]:"No network connectivity. Check your internet connection.",[UN]:"User cancelled the flow.",[BN]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[FN]:"The nested app auth bridge is disabled"};class Ac extends Fe{constructor(e,t){super(e,t?`${Um[e]}: ${t}`:Um[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Ac.prototype)}}function U(r,e){return new Ac(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const ac={createNewGuid:()=>{throw U(ge)},base64Decode:()=>{throw U(ge)},base64Encode:()=>{throw U(ge)},base64UrlEncode:()=>{throw U(ge)},encodeKid:()=>{throw U(ge)},async getPublicKeyThumbprint(){throw U(ge)},async removeTokenBindingKey(){throw U(ge)},async clearKeystore(){throw U(ge)},async signJwt(){throw U(ge)},async hashString(){throw U(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var Me;(function(r){r[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Info=2]="Info",r[r.Verbose=3]="Verbose",r[r.Trace=4]="Trace"})(Me||(Me={}));class Wr{constructor(e,t,n){this.level=Me.Info;const i=()=>{},s=e||Wr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:Me.Info,this.correlationId=s.correlationId||P.EMPTY_STRING,this.packageName=t||P.EMPTY_STRING,this.packageVersion=n||P.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Me.Info}}clone(e,t,n){return new Wr({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const s=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Me[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,s,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:Me.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Me.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Me.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Me.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Me.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Me.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Me.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Me.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Me.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Me.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Sy="@azure/msal-common",$d="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Kd={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function Co(r,e){const t=HN(r);try{const n=e(t);return JSON.parse(n)}catch{throw U(Ud)}}function HN(r){if(!r)throw U(cy);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw U(Ud);return t[2]}function Ay(r,e){if(e===0||Date.now()-3e5>r+e)throw U(gy)}/*! @azure/msal-common v14.16.0 2024-11-05 */function or(){return Math.round(new Date().getTime()/1e3)}function cd(r,e){const t=Number(r)||0;return or()+e>t}function VN(r){return Number(r)>or()}/*! @azure/msal-common v14.16.0 2024-11-05 */function oi(r){return[$N(r),KN(r),zN(r),WN(r),qN(r)].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function Ic(r,e,t,n,i){return{credentialType:re.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function bc(r,e,t,n,i,s,c,d,f,g,p,w,C,S,T){var N,K;const b={homeAccountId:r,credentialType:re.ACCESS_TOKEN,secret:t,cachedAt:or().toString(),expiresOn:c.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:p||Re.BEARER};if(w&&(b.userAssertionHash=w),g&&(b.refreshOn=g.toString()),S&&(b.requestedClaims=S,b.requestedClaimsHash=T),((N=b.tokenType)==null?void 0:N.toLowerCase())!==Re.BEARER.toLowerCase())switch(b.credentialType=re.ACCESS_TOKEN_WITH_AUTH_SCHEME,b.tokenType){case Re.POP:const H=Co(t,f);if(!((K=H==null?void 0:H.cnf)!=null&&K.kid))throw U(wy);b.keyId=H.cnf.kid;break;case Re.SSH:b.keyId=C}return b}function Iy(r,e,t,n,i,s,c){const d={credentialType:re.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),c&&(d.expiresOn=c.toString()),d}function zd(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function Bm(r){return r?zd(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===re.ACCESS_TOKEN||r.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Fm(r){return r?zd(r)&&r.hasOwnProperty("realm")&&r.credentialType===re.ID_TOKEN:!1}function Hm(r){return r?zd(r)&&r.credentialType===re.REFRESH_TOKEN:!1}function $N(r){return[r.homeAccountId,r.environment].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function KN(r){const e=r.credentialType===re.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function zN(r){return(r.target||"").toLowerCase()}function WN(r){return(r.requestedClaimsHash||"").toLowerCase()}function qN(r){return r.tokenType&&r.tokenType.toLowerCase()!==Re.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function GN(r,e){const t=r.indexOf(gt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function jN(r,e){let t=!1;r&&(t=r.indexOf(aa.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function YN({environment:r,clientId:e}){return[Dd,r,e].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function JN(r,e){return e?r.indexOf(Dd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function QN(r,e){return e?r.indexOf(oc.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function Vm(){return or()+oc.REFRESH_TIME_SECONDS}function Is(r,e,t){r.authorization_endpoint=e.authorization_endpoint,r.token_endpoint=e.token_endpoint,r.end_session_endpoint=e.end_session_endpoint,r.issuer=e.issuer,r.endpointsFromNetwork=t,r.jwks_uri=e.jwks_uri}function Ou(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function $m(r){return r.expiresAt<=or()}/*! @azure/msal-common v14.16.0 2024-11-05 */const by="redirect_uri_empty",XN="claims_request_parsing_error",ky="authority_uri_insecure",Qi="url_parse_error",Ry="empty_url_error",Oy="empty_input_scopes_error",Ny="invalid_prompt_value",Wd="invalid_claims",Py="token_request_empty",My="logout_request_empty",Dy="invalid_code_challenge_method",qd="pkce_params_missing",Gd="invalid_cloud_discovery_metadata",xy="invalid_authority_metadata",Ly="untrusted_authority",kc="missing_ssh_jwk",Uy="missing_ssh_kid",ZN="missing_nonce_authentication_header",eP="invalid_authentication_header",By="cannot_set_OIDCOptions",Fy="cannot_allow_native_broker",Hy="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const tP={[by]:"A redirect URI is required for all calls, and none has been set.",[XN]:"Could not parse the given claims request object.",[ky]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Qi]:"URL could not be parsed into appropriate segments.",[Ry]:"URL was empty or null.",[Oy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Ny]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Wd]:"Given claims parameter must be a stringified JSON object.",[Py]:"Token request was empty and not found in cache.",[My]:"The logout request was null or undefined.",[Dy]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[qd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Gd]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[xy]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Ly]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[kc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Uy]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[ZN]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[eP]:"Invalid authentication header provided",[By]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Fy]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Hy]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class jd extends Fe{constructor(e){super(e,tP[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,jd.prototype)}}function Ne(r){return new jd(r)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Bn{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),i=s=>decodeURIComponent(s.replace(/\+/g," "));return n.forEach(s=>{if(s.trim()){const[c,d]=s.split(/=(.+)/g,2);c&&d&&(t[i(c)]=i(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ye{constructor(e){const t=e?Bn.trimArrayEntries([...e]):[],n=t?Bn.removeEmptyStringsFromArray(t):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(i=>this.scopes.add(i))}static fromString(e){const n=(e||P.EMPTY_STRING).split(" ");return new Ye(n)}static createSearchScopes(e){const t=new Ye(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Ne(Oy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Ye(t);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Pm.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw U(yy)}}removeScope(e){if(!e)throw U(vy);this.scopes.delete(e.trim())}removeOIDCScopes(){Pm.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw U(od);const t=new Set;return e.scopes.forEach(n=>t.add(n.toLowerCase())),this.scopes.forEach(n=>t.add(n.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw U(od);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount();return t.size<i+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):P.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function sc(r,e){if(!r)throw U(sy);try{const t=e(r);return JSON.parse(t)}catch{throw U(Ld)}}function ii(r){if(!r)throw U(Ld);const e=r.split(St.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?P.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function cc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function Yd(r,e,t,n){if(n){const{oid:i,sub:s,tid:c,name:d,tfp:f,acr:g}=n,p=c||f||g||"";return{tenantId:p,localAccountId:i||s||"",name:d,isHomeTenant:cc(p,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:cc(t,r)}}function Jd(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...c}=e;i={...r,...c}}if(t){const{isHomeTenant:s,...c}=Yd(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...c,idTokenClaims:t,idToken:n},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const xn={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function Vy(r){return r&&(r.tid||r.tfp||r.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Tr={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class it{generateAccountId(){return[this.homeAccountId,this.environment].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return it.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,p,w,C,S,T;const i=new it;t.authorityType===xn.Adfs?i.authorityType=Ss.ADFS_ACCOUNT_TYPE:t.protocolMode===Tr.AAD?i.authorityType=Ss.MSSTS_ACCOUNT_TYPE:i.authorityType=Ss.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=sc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const c=e.environment||t&&t.getPreferredCache();if(!c)throw U(Hd);i.environment=c,i.realm=(s==null?void 0:s.utid)||Vy(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((p=e.idTokenClaims)==null?void 0:p.sub)||"";const d=((w=e.idTokenClaims)==null?void 0:w.preferred_username)||((C=e.idTokenClaims)==null?void 0:C.upn),f=(S=e.idTokenClaims)!=null&&S.emails?e.idTokenClaims.emails[0]:null;if(i.username=d||f||"",i.name=((T=e.idTokenClaims)==null?void 0:T.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const b=Yd(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[b]}return i}static createFromAccountInfo(e,t,n){var s;const i=new it;return i.authorityType=e.authorityType||Ss.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=n,i.tenantProfiles=Array.from(((s=e.tenantProfiles)==null?void 0:s.values())||[]),i}static generateHomeAccountId(e,t,n,i,s){if(!(t===xn.Adfs||t===xn.Dsts)){if(e)try{const c=sc(e,i.base64Decode);if(c.uid&&c.utid)return`${c.uid}.${c.utid}`}catch{}n.warning("No client info in response")}return(s==null?void 0:s.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,n){if(!e||!t)return!1;let i=!0;if(n){const s=e.idTokenClaims||{},c=t.idTokenClaims||{};i=s.iat===c.iat&&s.nonce===c.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}/*! @azure/msal-common v14.16.0 2024-11-05 */function $y(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function lc(r){if(!r||r.indexOf("=")<0)return null;try{const e=$y(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw U(dy)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class ye{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Ne(Ry);e.includes("#")||(this._urlString=ye.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Bn.endsWith(t,"?")?t=t.slice(0,-1):Bn.endsWith(t,"?/")&&(t=t.slice(0,-2)),Bn.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Ne(Qi)}if(!e.HostNameAndPort||!e.PathSegments)throw Ne(Qi);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ne(ky)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ye.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return e&&n.length!==0&&(n[0]===zr.COMMON||n[0]===zr.ORGANIZATIONS)&&(n[0]=e),ye.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Ne(Qi);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=n.AbsolutePath.split("/");return i=i.filter(s=>s&&s.length>0),n.PathSegments=i,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw Ne(Qi);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===P.FORWARD_SLASH){const i=new ye(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ye(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!lc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ky={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},Km=Ky.endpointMetadata,Qd=Ky.instanceDiscoveryMetadata,zy=new Set;Qd.metadata.forEach(r=>{r.aliases.forEach(e=>{zy.add(e)})});function nP(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=zm(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Jt.CONFIG,e)||zm(s,Qd.metadata,Jt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function zm(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=uc(e,r);if(i)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),i.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function rP(r){return uc(Qd.metadata,r)}function uc(r,e){for(let t=0;t<r.length;t++){const n=r[t];if(n.aliases.includes(e))return n}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Wy="cache_quota_exceeded",Xd="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Nu={[Wy]:"Exceeded cache storage capacity.",[Xd]:"Unexpected error occurred when using cache storage."};class ci extends Error{constructor(e,t){const n=t||(Nu[e]?Nu[e]:Nu[Xd]);super(`${e}: ${n}`),Object.setPrototypeOf(this,ci.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}/*! @azure/msal-common v14.16.0 2024-11-05 */class fi{constructor(e,t,n,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(Sy,$d),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(i=>i.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(n=>this.getTenantProfilesFromAccountEntity(n,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,n,i){let s=null,c;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(c=Co(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(c,i))?null:(s=Jd(e,n,c,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const c=this.getTokenKeys();if(t){const f=s.get(t);if(f)s=new Map([[t,f]]);else return[]}const d=[];return s.forEach(f=>{const g=this.getTenantedAccountInfoByFilter(i,c,f,n);g&&d.push(g)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,n){var i,s,c,d;if(!e)throw U(Cy);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(f){throw(i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),f instanceof Error?((s=this.commonLogger)==null||s.errorPii(`CacheManager.saveCacheRecord: ${f.message}`,n),f.name==="QuotaExceededError"||f.name==="NS_ERROR_DOM_QUOTA_REACHED"||f.message.includes("exceeded the quota")?((c=this.commonLogger)==null||c.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new ci(Wy)):new ci(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new ci(Xd))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),i=Ye.fromString(e.target),s=[];n.accessToken.forEach(c=>{if(!this.accessTokenKeyMatchesFilter(c,t,!1))return;const d=this.getAccessTokenCredential(c);d&&this.credentialMatchesFilter(d,t)&&Ye.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(c))}),await Promise.all(s),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),n=[];return t.forEach(i=>{var f;if(!this.isAccountKey(i,e.homeAccountId))return;const s=this.getAccount(i,this.commonLogger);if(!s||e.homeAccountId&&!this.matchHomeAccountId(s,e.homeAccountId)||e.username&&!this.matchUsername(s.username,e.username)||e.environment&&!this.matchEnvironment(s,e.environment)||e.realm&&!this.matchRealm(s,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(s,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(s,e.authorityType))return;const c={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(f=s.tenantProfiles)==null?void 0:f.filter(g=>this.tenantProfileMatchesFilter(g,c));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(St.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(St.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(re.ID_TOKEN.toLowerCase())===-1&&t.indexOf(re.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(re.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(re.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(re.REFRESH_TOKEN.toLowerCase())>-1){const n=`${re.REFRESH_TOKEN}${St.CACHE_KEY_SEPARATOR}${this.clientId}${St.CACHE_KEY_SEPARATOR}`,i=`${re.REFRESH_TOKEN}${St.CACHE_KEY_SEPARATOR}${ia}${St.CACHE_KEY_SEPARATOR}`;if(t.indexOf(n.toLowerCase())===-1&&t.indexOf(i.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===Re.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),n={};return t.forEach(i=>{if(!this.isAppMetadata(i))return;const s=this.getAppMetadata(i);s&&(e.environment&&!this.matchEnvironment(s,e.environment)||e.clientId&&!this.matchClientId(s,e.clientId)||(n[i]=s))}),n}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let n=null;return t.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const s=this.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(n=s)}),n}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(n=>{t.push(this.removeAccount(n))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),n=e.generateAccountId(),i=[];t.idToken.forEach(s=>{s.indexOf(n)===0&&this.removeIdToken(s)}),t.accessToken.forEach(s=>{s.indexOf(n)===0&&i.push(this.removeAccessToken(s))}),t.refreshToken.forEach(s=>{s.indexOf(n)===0&&this.removeRefreshToken(s)}),await Promise.all(i)}updateOutdatedCachedAccount(e,t,n){var i;if(t&&t.isSingleTenant()){(i=this.commonLogger)==null||i.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const s=this.getAccountKeys().filter(p=>p.startsWith(t.homeAccountId)),c=[];s.forEach(p=>{const w=this.getCachedAccountEntity(p);w&&c.push(w)});const d=c.find(p=>cc(p.realm,p.homeAccountId))||c[0];d.tenantProfiles=c.map(p=>({tenantId:p.realm,localAccountId:p.localAccountId,name:p.name,isHomeTenant:cc(p.realm,p.homeAccountId)}));const f=fi.toObject(new it,{...d}),g=f.generateAccountKey();return s.forEach(p=>{p!==g&&this.removeOutdatedAccount(e)}),this.setAccount(f),n==null||n.verbose("Updated an outdated account entity in the cache"),f}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===re.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===Re.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw U(Ty)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=it.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(c,t),f=d.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(f>1){let g=d;if(!n){const p=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&p.set(S,C)});const w=p.size;if(w<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(w===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),p.values().next().value;g=p}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((p,w)=>{this.removeIdToken(w)}),i&&s&&i.addFields({multiMatchedID:d.size},s),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const n=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return n.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,{clientId:this.clientId,...e}))return;const c=this.getIdTokenCredential(s);c&&this.credentialMatchesFilter(c,e)&&i.set(s,c)}),i}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,n,i,s,c){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Ye.createSearchScopes(t.scopes),f=t.authenticationScheme||Re.BEARER,g=f&&f.toLowerCase()!==Re.BEARER.toLowerCase()?re.ACCESS_TOKEN_WITH_AUTH_SCHEME:re.ACCESS_TOKEN,p={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:g,clientId:this.clientId,realm:i||e.tenantId,target:d,tokenType:f,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},w=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];w.forEach(T=>{if(this.accessTokenKeyMatchesFilter(T,p,!0)){const b=this.getAccessTokenCredential(T);b&&this.credentialMatchesFilter(b,p)&&C.push(b)}});const S=C.length;return S<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):S>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),C.forEach(T=>{this.removeAccessToken(oi(T))}),s&&c&&s.addFields({multiMatchedAT:C.length},c),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),C[0])}accessTokenKeyMatchesFilter(e,t,n){const i=e.toLowerCase();if(t.clientId&&i.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&i.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&i.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&i.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const s=t.target.asArray();for(let c=0;c<s.length;c++){if(n&&!i.includes(s[c].toLowerCase()))return!1;if(!n&&i.includes(s[c].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),n=[];return t.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const s=this.getAccessTokenCredential(i);s&&this.credentialMatchesFilter(s,e)&&n.push(s)}),n}getRefreshToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getRefreshToken called");const c=t?ia:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.REFRESH_TOKEN,clientId:this.clientId,familyId:c},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(w=>{if(this.refreshTokenKeyMatchesFilter(w,d)){const C=this.getRefreshTokenCredential(w);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const p=g.length;return p<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(p>1&&i&&s&&i.addFields({multiMatchedRT:p},s),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),g[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.familyId&&n.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),i=Object.keys(n).map(c=>n[c]),s=i.length;if(s<1)return null;if(s>1)throw U(my);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===ia)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const n=e.oid||e.sub;return t===n}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return t.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=nP(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var n;return((n=e.realm)==null?void 0:n.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==re.ACCESS_TOKEN&&e.credentialType!==re.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Ye.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(Dd)!==-1}isAuthorityMetadata(e){return e.indexOf(oc.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${oc.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class oP extends fi{setAccount(){throw U(ge)}getAccount(){throw U(ge)}getCachedAccountEntity(){throw U(ge)}setIdTokenCredential(){throw U(ge)}getIdTokenCredential(){throw U(ge)}setAccessTokenCredential(){throw U(ge)}getAccessTokenCredential(){throw U(ge)}setRefreshTokenCredential(){throw U(ge)}getRefreshTokenCredential(){throw U(ge)}setAppMetadata(){throw U(ge)}getAppMetadata(){throw U(ge)}setServerTelemetry(){throw U(ge)}getServerTelemetry(){throw U(ge)}setAuthorityMetadata(){throw U(ge)}getAuthorityMetadata(){throw U(ge)}getAuthorityMetadataKeys(){throw U(ge)}setThrottlingCache(){throw U(ge)}getThrottlingCache(){throw U(ge)}removeItem(){throw U(ge)}getKeys(){throw U(ge)}getAccountKeys(){throw U(ge)}getTokenKeys(){throw U(ge)}updateCredentialCacheKey(){throw U(ge)}removeOutdatedAccount(){throw U(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const qy={tokenRenewalOffsetSeconds:IN,preventCorsPreflight:!1},iP={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Me.Info,correlationId:P.EMPTY_STRING},aP={claimsBasedCachingEnabled:!1},sP={async sendGetRequestAsync(){throw U(ge)},async sendPostRequestAsync(){throw U(ge)}},cP={sku:P.SKU,version:$d,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},lP={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},uP={azureCloudInstance:Kd.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},dP={application:{appName:"",appVersion:""}};function hP({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:c,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:p,persistencePlugin:w,serializableCache:C}){const S={...iP,...t};return{authOptions:fP(r),systemOptions:{...qy,...e},loggerOptions:S,cacheOptions:{...aP,...n},storageInterface:i||new oP(r.clientId,ac,new Wr(S)),networkInterface:s||sP,cryptoInterface:c||ac,clientCredentials:d||lP,libraryInfo:{...cP,...f},telemetry:{...dP,...g},serverTelemetryManager:p||null,persistencePlugin:w||null,serializableCache:C||null}}function fP(r){return{clientCapabilities:[],azureCloudOptions:uP,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function ld(r){return r.authOptions.authority.options.protocolMode===Tr.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const on={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const go="client_id",Gy="redirect_uri",Wm="response_type",gP="response_mode",mP="grant_type",pP="claims",vP="scope",yP="refresh_token",CP="state",wP="nonce",_P="prompt",TP="code",EP="code_challenge",SP="code_challenge_method",AP="code_verifier",IP="client-request-id",bP="x-client-SKU",kP="x-client-VER",RP="x-client-OS",OP="x-client-CPU",NP="x-client-current-telemetry",PP="x-client-last-telemetry",MP="x-ms-lib-capability",DP="x-app-name",xP="x-app-ver",LP="post_logout_redirect_uri",UP="id_token_hint",BP="device_code",FP="client_secret",HP="client_assertion",VP="client_assertion_type",qm="token_type",Gm="req_cnf",$P="assertion",KP="requested_token_use",jm="return_spa_code",zP="nativebroker",WP="logout_hint",qP="sid",GP="login_hint",jP="domain_hint",YP="x-client-xtra-sku",Zd="brk_client_id",ud="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Qo{static validateRedirectUri(e){if(!e)throw Ne(by)}static validatePrompt(e){const t=[];for(const n in lt)t.push(lt[n]);if(t.indexOf(e)<0)throw Ne(Ny)}static validateClaims(e){try{JSON.parse(e)}catch{throw Ne(Wd)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Ne(qd);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Mm.PLAIN,Mm.S256].indexOf(e)<0)throw Ne(Dy)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function JP(r,e,t){if(!e)return;const n=r.get(go);n&&r.has(Zd)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(Gy)},e))}class sa{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Wm,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Wm,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(gP,encodeURIComponent(e||EN.QUERY))}addNativeBroker(){this.parameters.set(zP,encodeURIComponent("1"))}addScopes(e,t=!0,n=pi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Ye(i);this.parameters.set(vP,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(go,encodeURIComponent(e))}addRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(Gy,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(LP,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(UP,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(jP,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(GP,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Ot.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Ot.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(qP,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Qo.validateClaims(n),this.parameters.set(pP,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set(IP,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(bP,e.sku),this.parameters.set(kP,e.version),e.os&&this.parameters.set(RP,e.os),e.cpu&&this.parameters.set(OP,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(DP,e.appName),e!=null&&e.appVersion&&this.parameters.set(xP,e.appVersion)}addPrompt(e){Qo.validatePrompt(e),this.parameters.set(`${_P}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(CP,encodeURIComponent(e))}addNonce(e){this.parameters.set(wP,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Qo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(EP,encodeURIComponent(e)),this.parameters.set(SP,encodeURIComponent(t));else throw Ne(qd)}addAuthorizationCode(e){this.parameters.set(TP,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(BP,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(yP,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(AP,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(FP,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(HP,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(VP,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set($P,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(KP,encodeURIComponent(e))}addGrantType(e){this.parameters.set(mP,encodeURIComponent(e))}addClientInfo(){this.parameters.set(SN,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,n])=>{!this.parameters.has(t)&&n&&this.parameters.set(t,n)})}addClientCapabilitiesToClaims(e,t){let n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Ne(Wd)}return t&&t.length>0&&(n.hasOwnProperty(Es.ACCESS_TOKEN)||(n[Es.ACCESS_TOKEN]={}),n[Es.ACCESS_TOKEN][Es.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(xm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(xm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(qm,Re.POP),this.parameters.set(Gm,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(qm,Re.SSH),this.parameters.set(Gm,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(NP,e.generateCurrentRequestHeaderValue()),this.parameters.set(PP,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(MP,aa.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(WP,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[Zd]=e.brokerClientId,t[ud]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),JP(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function QP(r){return r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function XP(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function ZP(r){return r.hasOwnProperty("error")&&r.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const k={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},e0={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const wo=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const c=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}try{const d=r(...s);return c==null||c.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d}},B=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const c=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}return n==null||n.setPreQueueTime(e,i),r(...s).then(d=>(t.trace(`Returning result from ${e}`),c==null||c.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class Rc{constructor(e,t,n,i){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=i}async detectRegion(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)t.region_source=$o.ENVIRONMENT_VARIABLE;else{const s=Rc.IMDS_OPTIONS;try{const c=await B(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(c.status===As.httpSuccess&&(n=c.body,t.region_source=$o.IMDS),c.status===As.httpBadRequest){const d=await B(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=$o.FAILED_AUTO_DETECTION,null;const f=await B(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===As.httpSuccess&&(n=f.body,t.region_source=$o.IMDS)}}catch{return t.region_source=$o.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=$o.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,t){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,P.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(k.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?format=json`,e);return n.status===As.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}Rc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Tt{constructor(e,t,n,i,s,c,d,f){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=d,this.correlationId=c,this.managedIdentity=f||!1,this.regionDiscovery=new Rc(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(P.CIAM_AUTH_URL))return xn.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case P.ADFS:return xn.Adfs;case P.DSTS:return xn.Dsts}return xn.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ye(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw U(vr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw U(vr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw U(vr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw U(Ey);return this.replacePath(this.metadata.end_session_endpoint)}else throw U(vr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw U(vr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw U(vr)}canReplaceTenant(e){return e.PathSegments.length===1&&!Tt.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===xn.Default&&this.protocolMode===Tr.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new ye(this.metadata.canonical_authority).getUrlComponents(),s=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,f)=>{let g=s[f];if(f===0&&this.canReplaceTenant(i)){const p=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==p&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${p}`),g=p)}d!==g&&(t=t.replace(`/${g}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===xn.Adfs||this.protocolMode!==Tr.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await B(this.updateCloudDiscoveryMetadata.bind(this),k.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const n=await B(this.updateEndpointMetadata.bind(this),k.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:n}),(s=this.performanceClient)==null||s.addFields({cloudDiscoverySource:t,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Vm(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Jt.CACHE&&(n==null?void 0:n.source)!==Jt.CACHE&&(e.expiresAt=Vm(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){var i,s,c;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Jt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await B(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Is(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await B(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(c=this.authorityOptions.azureRegionConfiguration)!=null&&c.azureRegion&&(n=await B(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),Is(e,n,!0),Jt.NETWORK;throw U(uy,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Is(e,t,!1),{source:Jt.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const i=this.getEndpointMetadataFromHardcodedValues();if(i)return Is(e,i,!1),{source:Jt.HARDCODED_VALUES,metadata:i};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=$m(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Jt.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ye(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ne(xy)}return null}async getEndpointMetadataFromNetwork(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e);return QP(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Km?Km[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var n,i,s;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(t){if(t!==P.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Ru.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Tt.replaceWithRegionalInformation(e,t);const c=await B(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),k.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((s=this.authorityOptions.azureRegionConfiguration)==null?void 0:s.environmentRegion,this.regionDiscoveryMetadata);if(c)return this.regionDiscoveryMetadata.region_outcome=Ru.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=c,Tt.replaceWithRegionalInformation(e,c);this.regionDiscoveryMetadata.region_outcome=Ru.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const n=await B(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return Ou(e,n,!0),Jt.NETWORK;throw Ne(Ly)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||P.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ou(e,t,!1),Jt.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const i=rP(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ou(e,i,!1),Jt.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const n=$m(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Jt.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===xn.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=uc(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ne(Gd)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${P.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let n=null;try{const s=await this.networkInterface.sendGetRequestAsync(e,t);let c,d;if(XP(s.body))c=s.body,d=c.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${c.tenant_discovery_endpoint}`);else if(ZP(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),c=s.body,c.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${c.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${c.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=uc(d,this.hostnameAndPort)}catch(s){if(s instanceof Fe)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
50
+ */var EN=Sc("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const P={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Ts={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},pi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],Pm=[...pi,P.EMAIL_SCOPE],Ot={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},st={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},zr={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},Es={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},lt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Mm={PLAIN:"plain",S256:"S256"},wa={QUERY:"query",FRAGMENT:"fragment"},SN={...wa,FORM_POST:"form_post"},iy={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},Ss={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},St={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},re={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Dd="appmetadata",AN="client_info",ia="1",oc={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Jt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},gt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Re={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},aa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Dm={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},xm={username:"username",password:"password"},As={httpSuccess:200,httpBadRequest:400},$o={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Ru={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Ur={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},IN={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},bN=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const xd="unexpected_error",kN="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const Lm={[xd]:"Unexpected error in authentication.",[kN]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class Fe extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,Fe.prototype),this.errorCode=e||P.EMPTY_STRING,this.errorMessage=t||P.EMPTY_STRING,this.subError=n||P.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ay(r,e){return new Fe(r,e?`${Lm[r]} ${e}`:Lm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ld="client_info_decoding_error",sy="client_info_empty_error",Ud="token_parsing_error",cy="null_or_empty_token",vr="endpoints_resolution_error",ly="network_error",uy="openid_config_error",dy="hash_not_deserialized",hi="invalid_state",hy="state_mismatch",ic="state_not_found",fy="nonce_mismatch",Bd="auth_time_not_found",gy="max_age_transpired",RN="multiple_matching_tokens",ON="multiple_matching_accounts",my="multiple_matching_appMetadata",py="request_cannot_be_made",vy="cannot_remove_empty_scope",yy="cannot_append_scopeset",od="empty_input_scopeset",NN="device_code_polling_cancelled",PN="device_code_expired",MN="device_code_unknown_error",Fd="no_account_in_silent_request",Cy="invalid_cache_record",Hd="invalid_cache_environment",id="no_account_found",ad="no_crypto_object",sd="unexpected_credential_type",DN="invalid_assertion",xN="invalid_client_credential",yr="token_refresh_required",LN="user_timeout_reached",wy="token_claims_cnf_required_for_signedjwt",_y="authorization_code_missing_from_server_response",Ty="binding_key_not_removed",Ey="end_session_endpoint_not_supported",Vd="key_id_missing",UN="no_network_connectivity",BN="user_canceled",FN="missing_tenant_id_error",ge="method_not_implemented",HN="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Um={[Ld]:"The client info could not be parsed/decoded correctly",[sy]:"The client info was empty",[Ud]:"Token cannot be parsed",[cy]:"The token is null or empty",[vr]:"Endpoints cannot be resolved",[ly]:"Network request failed",[uy]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[dy]:"The hash parameters could not be deserialized",[hi]:"State was not the expected format",[hy]:"State mismatch error",[ic]:"State not found",[fy]:"Nonce mismatch error",[Bd]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[gy]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[RN]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[ON]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[my]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[py]:"Token request cannot be made without authorization code or refresh token.",[vy]:"Cannot remove null or empty scope from ScopeSet",[yy]:"Cannot append ScopeSet",[od]:"Empty input ScopeSet cannot be processed",[NN]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[PN]:"Device code is expired.",[MN]:"Device code stopped polling for unknown reasons.",[Fd]:"Please pass an account object, silent flow is not supported without account information",[Cy]:"Cache record object was null or undefined.",[Hd]:"Invalid environment when attempting to create cache entry",[id]:"No account found in cache for given key.",[ad]:"No crypto object detected.",[sd]:"Unexpected credential type.",[DN]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[xN]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[yr]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[LN]:"User defined timeout for device code polling reached",[wy]:"Cannot generate a POP jwt if the token_claims are not populated",[_y]:"Server response does not contain an authorization code to proceed",[Ty]:"Could not remove the credential's binding key from storage.",[Ey]:"The provided authority does not support logout",[Vd]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[UN]:"No network connectivity. Check your internet connection.",[BN]:"User cancelled the flow.",[FN]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[HN]:"The nested app auth bridge is disabled"};class Ac extends Fe{constructor(e,t){super(e,t?`${Um[e]}: ${t}`:Um[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Ac.prototype)}}function U(r,e){return new Ac(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const ac={createNewGuid:()=>{throw U(ge)},base64Decode:()=>{throw U(ge)},base64Encode:()=>{throw U(ge)},base64UrlEncode:()=>{throw U(ge)},encodeKid:()=>{throw U(ge)},async getPublicKeyThumbprint(){throw U(ge)},async removeTokenBindingKey(){throw U(ge)},async clearKeystore(){throw U(ge)},async signJwt(){throw U(ge)},async hashString(){throw U(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var Me;(function(r){r[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Info=2]="Info",r[r.Verbose=3]="Verbose",r[r.Trace=4]="Trace"})(Me||(Me={}));class Wr{constructor(e,t,n){this.level=Me.Info;const i=()=>{},s=e||Wr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:Me.Info,this.correlationId=s.correlationId||P.EMPTY_STRING,this.packageName=t||P.EMPTY_STRING,this.packageVersion=n||P.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Me.Info}}clone(e,t,n){return new Wr({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const s=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Me[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,s,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:Me.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:Me.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:Me.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:Me.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:Me.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:Me.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:Me.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:Me.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:Me.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:Me.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Sy="@azure/msal-common",$d="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Kd={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function Co(r,e){const t=VN(r);try{const n=e(t);return JSON.parse(n)}catch{throw U(Ud)}}function VN(r){if(!r)throw U(cy);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw U(Ud);return t[2]}function Ay(r,e){if(e===0||Date.now()-3e5>r+e)throw U(gy)}/*! @azure/msal-common v14.16.0 2024-11-05 */function or(){return Math.round(new Date().getTime()/1e3)}function cd(r,e){const t=Number(r)||0;return or()+e>t}function $N(r){return Number(r)>or()}/*! @azure/msal-common v14.16.0 2024-11-05 */function oi(r){return[KN(r),zN(r),WN(r),qN(r),GN(r)].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function Ic(r,e,t,n,i){return{credentialType:re.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function bc(r,e,t,n,i,s,c,d,f,g,p,w,C,S,T){var N,K;const b={homeAccountId:r,credentialType:re.ACCESS_TOKEN,secret:t,cachedAt:or().toString(),expiresOn:c.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:p||Re.BEARER};if(w&&(b.userAssertionHash=w),g&&(b.refreshOn=g.toString()),S&&(b.requestedClaims=S,b.requestedClaimsHash=T),((N=b.tokenType)==null?void 0:N.toLowerCase())!==Re.BEARER.toLowerCase())switch(b.credentialType=re.ACCESS_TOKEN_WITH_AUTH_SCHEME,b.tokenType){case Re.POP:const H=Co(t,f);if(!((K=H==null?void 0:H.cnf)!=null&&K.kid))throw U(wy);b.keyId=H.cnf.kid;break;case Re.SSH:b.keyId=C}return b}function Iy(r,e,t,n,i,s,c){const d={credentialType:re.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),c&&(d.expiresOn=c.toString()),d}function zd(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function Bm(r){return r?zd(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===re.ACCESS_TOKEN||r.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Fm(r){return r?zd(r)&&r.hasOwnProperty("realm")&&r.credentialType===re.ID_TOKEN:!1}function Hm(r){return r?zd(r)&&r.credentialType===re.REFRESH_TOKEN:!1}function KN(r){return[r.homeAccountId,r.environment].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function zN(r){const e=r.credentialType===re.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function WN(r){return(r.target||"").toLowerCase()}function qN(r){return(r.requestedClaimsHash||"").toLowerCase()}function GN(r){return r.tokenType&&r.tokenType.toLowerCase()!==Re.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function jN(r,e){const t=r.indexOf(gt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function YN(r,e){let t=!1;r&&(t=r.indexOf(aa.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function JN({environment:r,clientId:e}){return[Dd,r,e].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}function QN(r,e){return e?r.indexOf(Dd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function XN(r,e){return e?r.indexOf(oc.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function Vm(){return or()+oc.REFRESH_TIME_SECONDS}function Is(r,e,t){r.authorization_endpoint=e.authorization_endpoint,r.token_endpoint=e.token_endpoint,r.end_session_endpoint=e.end_session_endpoint,r.issuer=e.issuer,r.endpointsFromNetwork=t,r.jwks_uri=e.jwks_uri}function Ou(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function $m(r){return r.expiresAt<=or()}/*! @azure/msal-common v14.16.0 2024-11-05 */const by="redirect_uri_empty",ZN="claims_request_parsing_error",ky="authority_uri_insecure",Qi="url_parse_error",Ry="empty_url_error",Oy="empty_input_scopes_error",Ny="invalid_prompt_value",Wd="invalid_claims",Py="token_request_empty",My="logout_request_empty",Dy="invalid_code_challenge_method",qd="pkce_params_missing",Gd="invalid_cloud_discovery_metadata",xy="invalid_authority_metadata",Ly="untrusted_authority",kc="missing_ssh_jwk",Uy="missing_ssh_kid",eP="missing_nonce_authentication_header",tP="invalid_authentication_header",By="cannot_set_OIDCOptions",Fy="cannot_allow_native_broker",Hy="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const nP={[by]:"A redirect URI is required for all calls, and none has been set.",[ZN]:"Could not parse the given claims request object.",[ky]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Qi]:"URL could not be parsed into appropriate segments.",[Ry]:"URL was empty or null.",[Oy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Ny]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Wd]:"Given claims parameter must be a stringified JSON object.",[Py]:"Token request was empty and not found in cache.",[My]:"The logout request was null or undefined.",[Dy]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[qd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Gd]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[xy]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Ly]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[kc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Uy]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[eP]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[tP]:"Invalid authentication header provided",[By]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Fy]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[Hy]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class jd extends Fe{constructor(e){super(e,nP[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,jd.prototype)}}function Ne(r){return new jd(r)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Bn{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),i=s=>decodeURIComponent(s.replace(/\+/g," "));return n.forEach(s=>{if(s.trim()){const[c,d]=s.split(/=(.+)/g,2);c&&d&&(t[i(c)]=i(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ye{constructor(e){const t=e?Bn.trimArrayEntries([...e]):[],n=t?Bn.removeEmptyStringsFromArray(t):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(i=>this.scopes.add(i))}static fromString(e){const n=(e||P.EMPTY_STRING).split(" ");return new Ye(n)}static createSearchScopes(e){const t=new Ye(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Ne(Oy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Ye(t);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Pm.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw U(yy)}}removeScope(e){if(!e)throw U(vy);this.scopes.delete(e.trim())}removeOIDCScopes(){Pm.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw U(od);const t=new Set;return e.scopes.forEach(n=>t.add(n.toLowerCase())),this.scopes.forEach(n=>t.add(n.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw U(od);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount();return t.size<i+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):P.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function sc(r,e){if(!r)throw U(sy);try{const t=e(r);return JSON.parse(t)}catch{throw U(Ld)}}function ii(r){if(!r)throw U(Ld);const e=r.split(St.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?P.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function cc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function Yd(r,e,t,n){if(n){const{oid:i,sub:s,tid:c,name:d,tfp:f,acr:g}=n,p=c||f||g||"";return{tenantId:p,localAccountId:i||s||"",name:d,isHomeTenant:cc(p,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:cc(t,r)}}function Jd(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...c}=e;i={...r,...c}}if(t){const{isHomeTenant:s,...c}=Yd(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...c,idTokenClaims:t,idToken:n},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const xn={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function Vy(r){return r&&(r.tid||r.tfp||r.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Tr={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class it{generateAccountId(){return[this.homeAccountId,this.environment].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return it.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(St.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,p,w,C,S,T;const i=new it;t.authorityType===xn.Adfs?i.authorityType=Ss.ADFS_ACCOUNT_TYPE:t.protocolMode===Tr.AAD?i.authorityType=Ss.MSSTS_ACCOUNT_TYPE:i.authorityType=Ss.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=sc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const c=e.environment||t&&t.getPreferredCache();if(!c)throw U(Hd);i.environment=c,i.realm=(s==null?void 0:s.utid)||Vy(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((p=e.idTokenClaims)==null?void 0:p.sub)||"";const d=((w=e.idTokenClaims)==null?void 0:w.preferred_username)||((C=e.idTokenClaims)==null?void 0:C.upn),f=(S=e.idTokenClaims)!=null&&S.emails?e.idTokenClaims.emails[0]:null;if(i.username=d||f||"",i.name=((T=e.idTokenClaims)==null?void 0:T.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const b=Yd(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[b]}return i}static createFromAccountInfo(e,t,n){var s;const i=new it;return i.authorityType=e.authorityType||Ss.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=n,i.tenantProfiles=Array.from(((s=e.tenantProfiles)==null?void 0:s.values())||[]),i}static generateHomeAccountId(e,t,n,i,s){if(!(t===xn.Adfs||t===xn.Dsts)){if(e)try{const c=sc(e,i.base64Decode);if(c.uid&&c.utid)return`${c.uid}.${c.utid}`}catch{}n.warning("No client info in response")}return(s==null?void 0:s.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,n){if(!e||!t)return!1;let i=!0;if(n){const s=e.idTokenClaims||{},c=t.idTokenClaims||{};i=s.iat===c.iat&&s.nonce===c.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}/*! @azure/msal-common v14.16.0 2024-11-05 */function $y(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function lc(r){if(!r||r.indexOf("=")<0)return null;try{const e=$y(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw U(dy)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class ye{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Ne(Ry);e.includes("#")||(this._urlString=ye.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Bn.endsWith(t,"?")?t=t.slice(0,-1):Bn.endsWith(t,"?/")&&(t=t.slice(0,-2)),Bn.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Ne(Qi)}if(!e.HostNameAndPort||!e.PathSegments)throw Ne(Qi);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Ne(ky)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ye.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return e&&n.length!==0&&(n[0]===zr.COMMON||n[0]===zr.ORGANIZATIONS)&&(n[0]=e),ye.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Ne(Qi);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=n.AbsolutePath.split("/");return i=i.filter(s=>s&&s.length>0),n.PathSegments=i,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw Ne(Qi);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===P.FORWARD_SLASH){const i=new ye(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ye(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!lc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ky={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},Km=Ky.endpointMetadata,Qd=Ky.instanceDiscoveryMetadata,zy=new Set;Qd.metadata.forEach(r=>{r.aliases.forEach(e=>{zy.add(e)})});function rP(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=zm(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Jt.CONFIG,e)||zm(s,Qd.metadata,Jt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function zm(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=uc(e,r);if(i)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),i.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function oP(r){return uc(Qd.metadata,r)}function uc(r,e){for(let t=0;t<r.length;t++){const n=r[t];if(n.aliases.includes(e))return n}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Wy="cache_quota_exceeded",Xd="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Nu={[Wy]:"Exceeded cache storage capacity.",[Xd]:"Unexpected error occurred when using cache storage."};class ci extends Error{constructor(e,t){const n=t||(Nu[e]?Nu[e]:Nu[Xd]);super(`${e}: ${n}`),Object.setPrototypeOf(this,ci.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}/*! @azure/msal-common v14.16.0 2024-11-05 */class fi{constructor(e,t,n,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(Sy,$d),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(i=>i.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(n=>this.getTenantProfilesFromAccountEntity(n,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,n,i){let s=null,c;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(c=Co(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(c,i))?null:(s=Jd(e,n,c,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const c=this.getTokenKeys();if(t){const f=s.get(t);if(f)s=new Map([[t,f]]);else return[]}const d=[];return s.forEach(f=>{const g=this.getTenantedAccountInfoByFilter(i,c,f,n);g&&d.push(g)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,n){var i,s,c,d;if(!e)throw U(Cy);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(f){throw(i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),f instanceof Error?((s=this.commonLogger)==null||s.errorPii(`CacheManager.saveCacheRecord: ${f.message}`,n),f.name==="QuotaExceededError"||f.name==="NS_ERROR_DOM_QUOTA_REACHED"||f.message.includes("exceeded the quota")?((c=this.commonLogger)==null||c.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new ci(Wy)):new ci(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new ci(Xd))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),i=Ye.fromString(e.target),s=[];n.accessToken.forEach(c=>{if(!this.accessTokenKeyMatchesFilter(c,t,!1))return;const d=this.getAccessTokenCredential(c);d&&this.credentialMatchesFilter(d,t)&&Ye.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(c))}),await Promise.all(s),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),n=[];return t.forEach(i=>{var f;if(!this.isAccountKey(i,e.homeAccountId))return;const s=this.getAccount(i,this.commonLogger);if(!s||e.homeAccountId&&!this.matchHomeAccountId(s,e.homeAccountId)||e.username&&!this.matchUsername(s.username,e.username)||e.environment&&!this.matchEnvironment(s,e.environment)||e.realm&&!this.matchRealm(s,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(s,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(s,e.authorityType))return;const c={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(f=s.tenantProfiles)==null?void 0:f.filter(g=>this.tenantProfileMatchesFilter(g,c));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(St.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(St.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(re.ID_TOKEN.toLowerCase())===-1&&t.indexOf(re.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(re.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(re.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(re.REFRESH_TOKEN.toLowerCase())>-1){const n=`${re.REFRESH_TOKEN}${St.CACHE_KEY_SEPARATOR}${this.clientId}${St.CACHE_KEY_SEPARATOR}`,i=`${re.REFRESH_TOKEN}${St.CACHE_KEY_SEPARATOR}${ia}${St.CACHE_KEY_SEPARATOR}`;if(t.indexOf(n.toLowerCase())===-1&&t.indexOf(i.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===Re.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),n={};return t.forEach(i=>{if(!this.isAppMetadata(i))return;const s=this.getAppMetadata(i);s&&(e.environment&&!this.matchEnvironment(s,e.environment)||e.clientId&&!this.matchClientId(s,e.clientId)||(n[i]=s))}),n}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let n=null;return t.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const s=this.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(n=s)}),n}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(n=>{t.push(this.removeAccount(n))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),n=e.generateAccountId(),i=[];t.idToken.forEach(s=>{s.indexOf(n)===0&&this.removeIdToken(s)}),t.accessToken.forEach(s=>{s.indexOf(n)===0&&i.push(this.removeAccessToken(s))}),t.refreshToken.forEach(s=>{s.indexOf(n)===0&&this.removeRefreshToken(s)}),await Promise.all(i)}updateOutdatedCachedAccount(e,t,n){var i;if(t&&t.isSingleTenant()){(i=this.commonLogger)==null||i.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const s=this.getAccountKeys().filter(p=>p.startsWith(t.homeAccountId)),c=[];s.forEach(p=>{const w=this.getCachedAccountEntity(p);w&&c.push(w)});const d=c.find(p=>cc(p.realm,p.homeAccountId))||c[0];d.tenantProfiles=c.map(p=>({tenantId:p.realm,localAccountId:p.localAccountId,name:p.name,isHomeTenant:cc(p.realm,p.homeAccountId)}));const f=fi.toObject(new it,{...d}),g=f.generateAccountKey();return s.forEach(p=>{p!==g&&this.removeOutdatedAccount(e)}),this.setAccount(f),n==null||n.verbose("Updated an outdated account entity in the cache"),f}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===re.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===Re.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw U(Ty)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=it.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(c,t),f=d.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(f>1){let g=d;if(!n){const p=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&p.set(S,C)});const w=p.size;if(w<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(w===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),p.values().next().value;g=p}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((p,w)=>{this.removeIdToken(w)}),i&&s&&i.addFields({multiMatchedID:d.size},s),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const n=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return n.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,{clientId:this.clientId,...e}))return;const c=this.getIdTokenCredential(s);c&&this.credentialMatchesFilter(c,e)&&i.set(s,c)}),i}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,n,i,s,c){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Ye.createSearchScopes(t.scopes),f=t.authenticationScheme||Re.BEARER,g=f&&f.toLowerCase()!==Re.BEARER.toLowerCase()?re.ACCESS_TOKEN_WITH_AUTH_SCHEME:re.ACCESS_TOKEN,p={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:g,clientId:this.clientId,realm:i||e.tenantId,target:d,tokenType:f,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},w=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];w.forEach(T=>{if(this.accessTokenKeyMatchesFilter(T,p,!0)){const b=this.getAccessTokenCredential(T);b&&this.credentialMatchesFilter(b,p)&&C.push(b)}});const S=C.length;return S<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):S>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),C.forEach(T=>{this.removeAccessToken(oi(T))}),s&&c&&s.addFields({multiMatchedAT:C.length},c),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),C[0])}accessTokenKeyMatchesFilter(e,t,n){const i=e.toLowerCase();if(t.clientId&&i.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&i.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&i.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&i.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const s=t.target.asArray();for(let c=0;c<s.length;c++){if(n&&!i.includes(s[c].toLowerCase()))return!1;if(!n&&i.includes(s[c].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),n=[];return t.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const s=this.getAccessTokenCredential(i);s&&this.credentialMatchesFilter(s,e)&&n.push(s)}),n}getRefreshToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getRefreshToken called");const c=t?ia:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.REFRESH_TOKEN,clientId:this.clientId,familyId:c},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(w=>{if(this.refreshTokenKeyMatchesFilter(w,d)){const C=this.getRefreshTokenCredential(w);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const p=g.length;return p<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(p>1&&i&&s&&i.addFields({multiMatchedRT:p},s),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),g[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.familyId&&n.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),i=Object.keys(n).map(c=>n[c]),s=i.length;if(s<1)return null;if(s>1)throw U(my);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===ia)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const n=e.oid||e.sub;return t===n}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return t.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=rP(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var n;return((n=e.realm)==null?void 0:n.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==re.ACCESS_TOKEN&&e.credentialType!==re.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Ye.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(Dd)!==-1}isAuthorityMetadata(e){return e.indexOf(oc.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${oc.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class iP extends fi{setAccount(){throw U(ge)}getAccount(){throw U(ge)}getCachedAccountEntity(){throw U(ge)}setIdTokenCredential(){throw U(ge)}getIdTokenCredential(){throw U(ge)}setAccessTokenCredential(){throw U(ge)}getAccessTokenCredential(){throw U(ge)}setRefreshTokenCredential(){throw U(ge)}getRefreshTokenCredential(){throw U(ge)}setAppMetadata(){throw U(ge)}getAppMetadata(){throw U(ge)}setServerTelemetry(){throw U(ge)}getServerTelemetry(){throw U(ge)}setAuthorityMetadata(){throw U(ge)}getAuthorityMetadata(){throw U(ge)}getAuthorityMetadataKeys(){throw U(ge)}setThrottlingCache(){throw U(ge)}getThrottlingCache(){throw U(ge)}removeItem(){throw U(ge)}getKeys(){throw U(ge)}getAccountKeys(){throw U(ge)}getTokenKeys(){throw U(ge)}updateCredentialCacheKey(){throw U(ge)}removeOutdatedAccount(){throw U(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const qy={tokenRenewalOffsetSeconds:bN,preventCorsPreflight:!1},aP={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Me.Info,correlationId:P.EMPTY_STRING},sP={claimsBasedCachingEnabled:!1},cP={async sendGetRequestAsync(){throw U(ge)},async sendPostRequestAsync(){throw U(ge)}},lP={sku:P.SKU,version:$d,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},uP={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},dP={azureCloudInstance:Kd.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},hP={application:{appName:"",appVersion:""}};function fP({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:c,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:p,persistencePlugin:w,serializableCache:C}){const S={...aP,...t};return{authOptions:gP(r),systemOptions:{...qy,...e},loggerOptions:S,cacheOptions:{...sP,...n},storageInterface:i||new iP(r.clientId,ac,new Wr(S)),networkInterface:s||cP,cryptoInterface:c||ac,clientCredentials:d||uP,libraryInfo:{...lP,...f},telemetry:{...hP,...g},serverTelemetryManager:p||null,persistencePlugin:w||null,serializableCache:C||null}}function gP(r){return{clientCapabilities:[],azureCloudOptions:dP,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function ld(r){return r.authOptions.authority.options.protocolMode===Tr.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const on={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const go="client_id",Gy="redirect_uri",Wm="response_type",mP="response_mode",pP="grant_type",vP="claims",yP="scope",CP="refresh_token",wP="state",_P="nonce",TP="prompt",EP="code",SP="code_challenge",AP="code_challenge_method",IP="code_verifier",bP="client-request-id",kP="x-client-SKU",RP="x-client-VER",OP="x-client-OS",NP="x-client-CPU",PP="x-client-current-telemetry",MP="x-client-last-telemetry",DP="x-ms-lib-capability",xP="x-app-name",LP="x-app-ver",UP="post_logout_redirect_uri",BP="id_token_hint",FP="device_code",HP="client_secret",VP="client_assertion",$P="client_assertion_type",qm="token_type",Gm="req_cnf",KP="assertion",zP="requested_token_use",jm="return_spa_code",WP="nativebroker",qP="logout_hint",GP="sid",jP="login_hint",YP="domain_hint",JP="x-client-xtra-sku",Zd="brk_client_id",ud="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Qo{static validateRedirectUri(e){if(!e)throw Ne(by)}static validatePrompt(e){const t=[];for(const n in lt)t.push(lt[n]);if(t.indexOf(e)<0)throw Ne(Ny)}static validateClaims(e){try{JSON.parse(e)}catch{throw Ne(Wd)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Ne(qd);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Mm.PLAIN,Mm.S256].indexOf(e)<0)throw Ne(Dy)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function QP(r,e,t){if(!e)return;const n=r.get(go);n&&r.has(Zd)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(Gy)},e))}class sa{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Wm,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Wm,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(mP,encodeURIComponent(e||SN.QUERY))}addNativeBroker(){this.parameters.set(WP,encodeURIComponent("1"))}addScopes(e,t=!0,n=pi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Ye(i);this.parameters.set(yP,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(go,encodeURIComponent(e))}addRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(Gy,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(UP,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(BP,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(YP,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(jP,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Ot.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Ot.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(GP,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Qo.validateClaims(n),this.parameters.set(vP,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set(bP,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(kP,e.sku),this.parameters.set(RP,e.version),e.os&&this.parameters.set(OP,e.os),e.cpu&&this.parameters.set(NP,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(xP,e.appName),e!=null&&e.appVersion&&this.parameters.set(LP,e.appVersion)}addPrompt(e){Qo.validatePrompt(e),this.parameters.set(`${TP}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(wP,encodeURIComponent(e))}addNonce(e){this.parameters.set(_P,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Qo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(SP,encodeURIComponent(e)),this.parameters.set(AP,encodeURIComponent(t));else throw Ne(qd)}addAuthorizationCode(e){this.parameters.set(EP,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(FP,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(CP,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(IP,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(HP,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(VP,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set($P,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(KP,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(zP,encodeURIComponent(e))}addGrantType(e){this.parameters.set(pP,encodeURIComponent(e))}addClientInfo(){this.parameters.set(AN,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,n])=>{!this.parameters.has(t)&&n&&this.parameters.set(t,n)})}addClientCapabilitiesToClaims(e,t){let n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Ne(Wd)}return t&&t.length>0&&(n.hasOwnProperty(Es.ACCESS_TOKEN)||(n[Es.ACCESS_TOKEN]={}),n[Es.ACCESS_TOKEN][Es.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(xm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(xm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(qm,Re.POP),this.parameters.set(Gm,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(qm,Re.SSH),this.parameters.set(Gm,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(PP,e.generateCurrentRequestHeaderValue()),this.parameters.set(MP,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(DP,aa.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(qP,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[Zd]=e.brokerClientId,t[ud]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),QP(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function XP(r){return r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function ZP(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function e0(r){return r.hasOwnProperty("error")&&r.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const k={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},t0={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const wo=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const c=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}try{const d=r(...s);return c==null||c.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d}},B=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const c=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}return n==null||n.setPreQueueTime(e,i),r(...s).then(d=>(t.trace(`Returning result from ${e}`),c==null||c.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class Rc{constructor(e,t,n,i){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=i}async detectRegion(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)t.region_source=$o.ENVIRONMENT_VARIABLE;else{const s=Rc.IMDS_OPTIONS;try{const c=await B(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(c.status===As.httpSuccess&&(n=c.body,t.region_source=$o.IMDS),c.status===As.httpBadRequest){const d=await B(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=$o.FAILED_AUTO_DETECTION,null;const f=await B(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===As.httpSuccess&&(n=f.body,t.region_source=$o.IMDS)}}catch{return t.region_source=$o.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=$o.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,t){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,P.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(k.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?format=json`,e);return n.status===As.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}Rc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Tt{constructor(e,t,n,i,s,c,d,f){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=d,this.correlationId=c,this.managedIdentity=f||!1,this.regionDiscovery=new Rc(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(P.CIAM_AUTH_URL))return xn.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case P.ADFS:return xn.Adfs;case P.DSTS:return xn.Dsts}return xn.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ye(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw U(vr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw U(vr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw U(vr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw U(Ey);return this.replacePath(this.metadata.end_session_endpoint)}else throw U(vr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw U(vr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw U(vr)}canReplaceTenant(e){return e.PathSegments.length===1&&!Tt.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===xn.Default&&this.protocolMode===Tr.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new ye(this.metadata.canonical_authority).getUrlComponents(),s=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,f)=>{let g=s[f];if(f===0&&this.canReplaceTenant(i)){const p=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==p&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${p}`),g=p)}d!==g&&(t=t.replace(`/${g}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===xn.Adfs||this.protocolMode!==Tr.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await B(this.updateCloudDiscoveryMetadata.bind(this),k.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const n=await B(this.updateEndpointMetadata.bind(this),k.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:n}),(s=this.performanceClient)==null||s.addFields({cloudDiscoverySource:t,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Vm(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Jt.CACHE&&(n==null?void 0:n.source)!==Jt.CACHE&&(e.expiresAt=Vm(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){var i,s,c;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Jt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await B(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Is(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await B(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(c=this.authorityOptions.azureRegionConfiguration)!=null&&c.azureRegion&&(n=await B(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),Is(e,n,!0),Jt.NETWORK;throw U(uy,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Is(e,t,!1),{source:Jt.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const i=this.getEndpointMetadataFromHardcodedValues();if(i)return Is(e,i,!1),{source:Jt.HARDCODED_VALUES,metadata:i};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=$m(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Jt.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ye(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Ne(xy)}return null}async getEndpointMetadataFromNetwork(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e);return XP(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in Km?Km[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var n,i,s;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(t){if(t!==P.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Ru.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Tt.replaceWithRegionalInformation(e,t);const c=await B(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),k.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((s=this.authorityOptions.azureRegionConfiguration)==null?void 0:s.environmentRegion,this.regionDiscoveryMetadata);if(c)return this.regionDiscoveryMetadata.region_outcome=Ru.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=c,Tt.replaceWithRegionalInformation(e,c);this.regionDiscoveryMetadata.region_outcome=Ru.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const n=await B(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return Ou(e,n,!0),Jt.NETWORK;throw Ne(Ly)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||P.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ou(e,t,!1),Jt.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const i=oP(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ou(e,i,!1),Jt.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const n=$m(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Jt.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===xn.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=uc(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Ne(Gd)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${P.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let n=null;try{const s=await this.networkInterface.sendGetRequestAsync(e,t);let c,d;if(ZP(s.body))c=s.body,d=c.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${c.tenant_discovery_endpoint}`);else if(e0(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),c=s.body,c.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${c.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${c.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=uc(d,this.hostnameAndPort)}catch(s){if(s instanceof Fe)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
51
51
  Error: ${s.errorCode}
52
52
  Error Description: ${s.errorMessage}`);else{const c=s;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
53
53
  Error: ${c.name}
54
- Error Description: ${c.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&ye.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==Kd.None){const i=t.tenant?t.tenant:P.DEFAULT_COMMON_TENANT;n=`${t.azureCloudInstance}/${i}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return P.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw U(vr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return zy.has(e)}static isPublicCloudAuthority(e){return P.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const i=new ye(e);i.validateAsUri();const s=i.getUrlComponents();let c=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(c=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:c}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=Tt.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=Tt.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=Tt.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const i=new ye(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(P.CIAM_AUTH_URL)){const s=i.HostNameAndPort.split(".")[0];t=`${t}${s}${P.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}Tt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function t0(r){var i;const n=(i=new ye(r).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(n){case zr.COMMON:case zr.ORGANIZATIONS:case zr.CONSUMERS:return;default:return n}}function jy(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function n0(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Ne(Gd)}return{canonicalAuthority:r.authority?jy(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Yy(r,e,t,n,i,s,c){c==null||c.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=Tt.transformCIAMAuthority(jy(r)),f=new Tt(d,e,t,n,i,s,c);try{return await B(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,c,s)(),f}catch{throw U(vr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class qr extends Fe{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,qr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Jn{static generateThrottlingStorageKey(e){return`${aa.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var s;const n=Jn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new qr(((s=i.errorCodes)==null?void 0:s.join(" "))||P.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,n){if(Jn.checkResponseStatus(n)||Jn.checkResponseForRetryAfter(n)){const i={throttleTime:Jn.calculateThrottleTime(parseInt(n.headers[Ot.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Jn.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Ot.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(t||aa.DEFAULT_THROTTLE_TIME_SECONDS),n+aa.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,n,i){const s={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},c=this.generateThrottlingStorageKey(s);e.removeItem(c)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Oc extends Fe{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Oc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function Ym(r,e,t){return new Oc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class eh{constructor(e,t){this.config=hP(e),this.logger=new Wr(this.config.loggerOptions,Sy,$d),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[Ot.CONTENT_TYPE]=P.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case on.HOME_ACCOUNT_ID:try{const n=ii(e.credential);t[Ot.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case on.UPN:t[Ot.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,c){var f;c&&((f=this.performanceClient)==null||f.addQueueMeasurement(c,s));const d=await this.sendPostRequest(i,e,{body:t,headers:n},s);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,n,i){var c,d,f;Jn.preProcess(this.cacheManager,e);let s;try{s=await B(this.networkClient.sendPostRequestAsync.bind(this.networkClient),k.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,i)(t,n);const g=s.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((c=s.body.refresh_token)==null?void 0:c.length)||0,httpVerToken:g[Ot.X_MS_HTTP_VERSION]||"",requestId:g[Ot.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof Oc){const p=g.responseHeaders;throw p&&((f=this.performanceClient)==null||f.addFields({httpVerToken:p[Ot.X_MS_HTTP_VERSION]||"",requestId:p[Ot.X_MS_REQUEST_ID]||"",contentTypeHeader:p[Ot.CONTENT_TYPE]||void 0,contentLengthHeader:p[Ot.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof Fe?g:U(ly)}return Jn.postProcess(this.cacheManager,e,s),s}async updateAuthority(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.UpdateTokenEndpointAuthority,t);const n=`https://${e}/${this.authority.tenant}/`,i=await Yy(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new sa(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const dc="no_tokens_found",Jy="native_account_unavailable",th="refresh_token_expired",r0="interaction_required",o0="consent_required",i0="login_required",Nc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const Jm=[r0,o0,i0,Nc],a0=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],s0={[dc]:"No refresh token found in the cache. Please sign-in.",[Jy]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[th]:"Refresh token has expired.",[Nc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Hn extends Fe{constructor(e,t,n,i,s,c,d,f){super(e,t,n),Object.setPrototypeOf(this,Hn.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=c||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function Qm(r,e,t){const n=!!r&&Jm.indexOf(r)>-1,i=!!t&&a0.indexOf(t)>-1,s=!!e&&Jm.some(c=>e.indexOf(c)>-1);return n||s||i}function dd(r){return new Hn(r,s0[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Fn{static setRequestState(e,t,n){const i=Fn.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw U(ad);const n={id:e.createNewGuid()};t&&(n.meta=t);const i=JSON.stringify(n);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw U(ad);if(!t)throw U(hi);try{const n=t.split(P.RESOURCE_DELIM),i=n[0],s=n.length>1?n.slice(1).join(P.RESOURCE_DELIM):P.EMPTY_STRING,c=e.base64Decode(i),d=JSON.parse(c);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw U(hi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const c0={SW:"sw",UHW:"uhw"};class gi{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.PopTokenGenerateCnf,e.correlationId);const n=await B(this.generateKid.bind(this),k.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:i}}async generateKid(e){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:c0.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:c,shrClaims:d,shrNonce:f,shrOptions:g}=n,p=c?new ye(c):void 0,w=p==null?void 0:p.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:or(),m:s==null?void 0:s.toUpperCase(),u:w==null?void 0:w.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:w==null?void 0:w.AbsolutePath,q:w!=null&&w.QueryString?[[],w.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class l0{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function u0(r){var n,i;const e="code=",t=(n=r.error_uri)==null?void 0:n.lastIndexOf(e);return t&&t>=0?(i=r.error_uri)==null?void 0:i.substring(t+e.length):void 0}class mo{constructor(e,t,n,i,s,c,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=c,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?U(ic,"Cached State"):U(ic,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw U(hi,e.state)}try{i=decodeURIComponent(t)}catch{throw U(hi,e.state)}if(n!==i)throw U(hy);if(e.error||e.error_description||e.suberror){const s=u0(e);throw Qm(e.error,e.error_description,e.suberror)?new Hn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new qr(e.error||"",e.error_description,e.suberror,s)}}validateTokenResponse(e,t){var n;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||P.NOT_AVAILABLE} - Timestamp: ${e.timestamp||P.NOT_AVAILABLE} - Description: ${e.error_description||P.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||P.NOT_AVAILABLE} - Trace ID: ${e.trace_id||P.NOT_AVAILABLE}`,s=(n=e.error_codes)!=null&&n.length?e.error_codes[0]:void 0,c=new qr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=Ts.SERVER_ERROR_RANGE_START&&e.status<=Ts.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
54
+ Error Description: ${c.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=Tt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&ye.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==Kd.None){const i=t.tenant?t.tenant:P.DEFAULT_COMMON_TENANT;n=`${t.azureCloudInstance}/${i}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return P.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw U(vr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return zy.has(e)}static isPublicCloudAuthority(e){return P.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const i=new ye(e);i.validateAsUri();const s=i.getUrlComponents();let c=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(c=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:c}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=Tt.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=Tt.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=Tt.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const i=new ye(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(P.CIAM_AUTH_URL)){const s=i.HostNameAndPort.split(".")[0];t=`${t}${s}${P.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}Tt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function n0(r){var i;const n=(i=new ye(r).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(n){case zr.COMMON:case zr.ORGANIZATIONS:case zr.CONSUMERS:return;default:return n}}function jy(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function r0(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Ne(Gd)}return{canonicalAuthority:r.authority?jy(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Yy(r,e,t,n,i,s,c){c==null||c.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=Tt.transformCIAMAuthority(jy(r)),f=new Tt(d,e,t,n,i,s,c);try{return await B(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,c,s)(),f}catch{throw U(vr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class qr extends Fe{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,qr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Jn{static generateThrottlingStorageKey(e){return`${aa.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var s;const n=Jn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new qr(((s=i.errorCodes)==null?void 0:s.join(" "))||P.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,n){if(Jn.checkResponseStatus(n)||Jn.checkResponseForRetryAfter(n)){const i={throttleTime:Jn.calculateThrottleTime(parseInt(n.headers[Ot.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Jn.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Ot.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(t||aa.DEFAULT_THROTTLE_TIME_SECONDS),n+aa.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,n,i){const s={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},c=this.generateThrottlingStorageKey(s);e.removeItem(c)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Oc extends Fe{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Oc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function Ym(r,e,t){return new Oc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class eh{constructor(e,t){this.config=fP(e),this.logger=new Wr(this.config.loggerOptions,Sy,$d),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[Ot.CONTENT_TYPE]=P.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case on.HOME_ACCOUNT_ID:try{const n=ii(e.credential);t[Ot.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case on.UPN:t[Ot.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,c){var f;c&&((f=this.performanceClient)==null||f.addQueueMeasurement(c,s));const d=await this.sendPostRequest(i,e,{body:t,headers:n},s);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,n,i){var c,d,f;Jn.preProcess(this.cacheManager,e);let s;try{s=await B(this.networkClient.sendPostRequestAsync.bind(this.networkClient),k.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,i)(t,n);const g=s.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((c=s.body.refresh_token)==null?void 0:c.length)||0,httpVerToken:g[Ot.X_MS_HTTP_VERSION]||"",requestId:g[Ot.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof Oc){const p=g.responseHeaders;throw p&&((f=this.performanceClient)==null||f.addFields({httpVerToken:p[Ot.X_MS_HTTP_VERSION]||"",requestId:p[Ot.X_MS_REQUEST_ID]||"",contentTypeHeader:p[Ot.CONTENT_TYPE]||void 0,contentLengthHeader:p[Ot.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof Fe?g:U(ly)}return Jn.postProcess(this.cacheManager,e,s),s}async updateAuthority(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.UpdateTokenEndpointAuthority,t);const n=`https://${e}/${this.authority.tenant}/`,i=await Yy(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new sa(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const dc="no_tokens_found",Jy="native_account_unavailable",th="refresh_token_expired",o0="interaction_required",i0="consent_required",a0="login_required",Nc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const Jm=[o0,i0,a0,Nc],s0=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],c0={[dc]:"No refresh token found in the cache. Please sign-in.",[Jy]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[th]:"Refresh token has expired.",[Nc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Hn extends Fe{constructor(e,t,n,i,s,c,d,f){super(e,t,n),Object.setPrototypeOf(this,Hn.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=c||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function Qm(r,e,t){const n=!!r&&Jm.indexOf(r)>-1,i=!!t&&s0.indexOf(t)>-1,s=!!e&&Jm.some(c=>e.indexOf(c)>-1);return n||s||i}function dd(r){return new Hn(r,c0[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Fn{static setRequestState(e,t,n){const i=Fn.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw U(ad);const n={id:e.createNewGuid()};t&&(n.meta=t);const i=JSON.stringify(n);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw U(ad);if(!t)throw U(hi);try{const n=t.split(P.RESOURCE_DELIM),i=n[0],s=n.length>1?n.slice(1).join(P.RESOURCE_DELIM):P.EMPTY_STRING,c=e.base64Decode(i),d=JSON.parse(c);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw U(hi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const l0={SW:"sw",UHW:"uhw"};class gi{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.PopTokenGenerateCnf,e.correlationId);const n=await B(this.generateKid.bind(this),k.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:i}}async generateKid(e){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:l0.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:c,shrClaims:d,shrNonce:f,shrOptions:g}=n,p=c?new ye(c):void 0,w=p==null?void 0:p.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:or(),m:s==null?void 0:s.toUpperCase(),u:w==null?void 0:w.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:w==null?void 0:w.AbsolutePath,q:w!=null&&w.QueryString?[[],w.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class u0{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function d0(r){var n,i;const e="code=",t=(n=r.error_uri)==null?void 0:n.lastIndexOf(e);return t&&t>=0?(i=r.error_uri)==null?void 0:i.substring(t+e.length):void 0}class mo{constructor(e,t,n,i,s,c,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=c,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?U(ic,"Cached State"):U(ic,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw U(hi,e.state)}try{i=decodeURIComponent(t)}catch{throw U(hi,e.state)}if(n!==i)throw U(hy);if(e.error||e.error_description||e.suberror){const s=d0(e);throw Qm(e.error,e.error_description,e.suberror)?new Hn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new qr(e.error||"",e.error_description,e.suberror,s)}}validateTokenResponse(e,t){var n;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||P.NOT_AVAILABLE} - Timestamp: ${e.timestamp||P.NOT_AVAILABLE} - Description: ${e.error_description||P.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||P.NOT_AVAILABLE} - Trace ID: ${e.trace_id||P.NOT_AVAILABLE}`,s=(n=e.error_codes)!=null&&n.length?e.error_codes[0]:void 0,c=new qr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=Ts.SERVER_ERROR_RANGE_START&&e.status<=Ts.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
55
55
  ${c}`);return}else if(t&&e.status&&e.status>=Ts.CLIENT_ERROR_RANGE_START&&e.status<=Ts.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
56
- ${c}`);return}throw Qm(e.error,e.error_description,e.suberror)?new Hn(e.error,e.error_description,e.suberror,e.timestamp||P.EMPTY_STRING,e.trace_id||P.EMPTY_STRING,e.correlation_id||P.EMPTY_STRING,e.claims||P.EMPTY_STRING,s):c}}async handleServerTokenResponse(e,t,n,i,s,c,d,f,g){var T;(T=this.performanceClient)==null||T.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let p;if(e.id_token){if(p=Co(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&p.nonce!==s.nonce)throw U(fy);if(i.maxAge||i.maxAge===0){const b=p.auth_time;if(!b)throw U(Bd);Ay(b,i.maxAge)}}this.homeAccountIdentifier=it.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,p);let w;s&&s.state&&(w=Fn.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,p,c,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new l0(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const b=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(b,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await mo.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,p,w,void 0,g)}await this.cacheStorage.saveCacheRecord(C,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&S&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(S))}return mo.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,p,w,e,g)}generateCacheRecord(e,t,n,i,s,c,d){const f=t.getPreferredCache();if(!f)throw U(Hd);const g=Vy(s);let p,w;e.id_token&&s&&(p=Ic(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),w=nh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,s,e.client_info,f,g,d,void 0,this.logger));let C=null;if(e.access_token){const b=e.scope?Ye.fromString(e.scope):new Ye(i.scopes||[]),N=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,K=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,H=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,V=n+N,z=V+K,Q=H&&H>0?n+H:void 0;C=bc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",b.printScopes(),V,z,this.cryptoObj.base64Decode,Q,e.token_type,c,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let b;if(e.refresh_token_expires_in){const N=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;b=n+N}S=Iy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,c,b)}let T=null;return e.foci&&(T={clientId:this.clientId,environment:f,familyId:e.foci}),{account:w,idToken:p,accessToken:C,refreshToken:S,appMetadata:T}}static async generateAuthenticationResult(e,t,n,i,s,c,d,f,g){var V,z,Q,we,W;let p=P.EMPTY_STRING,w=[],C=null,S,T,b=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Re.POP&&!s.popKid){const et=new gi(e),{secret:_e,keyId:Y}=n.accessToken;if(!Y)throw U(Vd);p=await et.signPopToken(_e,Y,s)}else p=n.accessToken.secret;w=Ye.fromString(n.accessToken.target).asArray(),C=new Date(Number(n.accessToken.expiresOn)*1e3),S=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(T=new Date(Number(n.accessToken.refreshOn)*1e3))}n.appMetadata&&(b=n.appMetadata.familyId===ia?ia:"");const N=(c==null?void 0:c.oid)||(c==null?void 0:c.sub)||"",K=(c==null?void 0:c.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const H=n.account?Jd(n.account.getAccountInfo(),void 0,c,(V=n.idToken)==null?void 0:V.secret):null;return{authority:t.canonicalAuthority,uniqueId:N,tenantId:K,scopes:w,account:H,idToken:((z=n==null?void 0:n.idToken)==null?void 0:z.secret)||"",idTokenClaims:c||{},accessToken:p,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:T,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:b,tokenType:((Q=n.accessToken)==null?void 0:Q.tokenType)||P.EMPTY_STRING,state:d?d.userRequestState:P.EMPTY_STRING,cloudGraphHostName:((we=n.account)==null?void 0:we.cloudGraphHostName)||P.EMPTY_STRING,msGraphHost:((W=n.account)==null?void 0:W.msGraphHost)||P.EMPTY_STRING,code:f==null?void 0:f.spa_code,fromNativeBroker:!1}}}function nh(r,e,t,n,i,s,c,d,f,g,p){p==null||p.verbose("setCachedAccount called");const C=r.getAccountKeys().find(K=>K.startsWith(t));let S=null;C&&(S=r.getAccount(C,p));const T=S||it.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:c,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),b=T.tenantProfiles||[],N=d||T.realm;if(N&&!b.find(K=>K.tenantId===N)){const K=Yd(t,T.localAccountId,N,i);b.push(K)}return T.tenantProfiles=b,T}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Qy(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class Xy extends eh{constructor(e,t){var n;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async getAuthCodeUrl(e){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.GetAuthCodeUrl,e.correlationId);const t=await B(this.createAuthCodeUrlQueryString.bind(this),k.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ye.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,f;if((d=this.performanceClient)==null||d.addQueueMeasurement(k.AuthClientAcquireToken,e.correlationId),!e.code)throw U(py);const n=or(),i=await B(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Ot.X_MS_REQUEST_ID],c=new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return c.validateTokenResponse(i.body),B(c.handleServerTokenResponse.bind(c),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,t,void 0,void 0,void 0,s)}handleFragmentResponse(e,t){if(new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw U(_y);return e}getLogoutUri(e){if(!e)throw Ne(My);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,p;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await B(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let c;if(t.clientInfo)try{const w=sc(t.clientInfo,this.cryptoUtils.base64Decode);c={credential:`${w.uid}${St.CLIENT_INFO_SEPARATOR}${w.utid}`,type:on.HOME_ACCOUNT_ID}}catch(w){this.logger.verbose("Could not parse client info for CCS Header: "+w)}const d=this.createTokenRequestHeaders(c||t.ccsCredential),f={clientId:((p=t.tokenBodyParameters)==null?void 0:p.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return B(this.executePostToTokenEndpoint.bind(this),k.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(i,s,d,f,t.correlationId,k.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthClientCreateTokenRequestBody,e.correlationId);const t=new sa(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[go])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Qo.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!ld(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const c=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Qy(c.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(c.assertionType)}if(t.addGrantType(iy.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Re.POP){const c=new gi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await B(c.generateCnf.bind(c),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Re.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Ne(kc);(!Bn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{const c=sc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${c.uid}${St.CLIENT_INFO_SEPARATOR}${c.utid}`,type:on.HOME_ACCOUNT_ID}}catch(c){this.logger.verbose("Could not parse client info for CCS Header: "+c)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case on.HOME_ACCOUNT_ID:try{const c=ii(n.credential);t.addCcsOid(c)}catch(c){this.logger.verbose("Could not parse home account ID for CCS Header: "+c)}break;case on.UPN:t.addCcsUpn(n.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[jm])&&t.addExtraQueryParameters({[jm]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,c;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new sa(t,this.performanceClient);n.addClientId(e.embeddedClientId||((c=e.extraQueryParameters)==null?void 0:c[go])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];if(n.addScopes(i,!0,this.oidcDefaultScopes),n.addRedirectUri(e.redirectUri),n.addCorrelationId(t),n.addResponseMode(e.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),ld(this.config)||n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&n.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&n.addPrompt(e.prompt),e.domainHint&&n.addDomainHint(e.domainHint),e.prompt!==lt.SELECT_ACCOUNT)if(e.sid&&e.prompt===lt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let f=this.extractLoginHint(e.account);if(f&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),f=null),f){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(f);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===lt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(d);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(e.account.username);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&n.addNonce(e.nonce),e.state&&n.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,n),e.nativeBroker&&(n.addNativeBroker(),e.authenticationScheme===Re.POP)){const d=new gi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await B(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}return n.createQueryString()}createLogoutUrlQueryString(e){const t=new sa(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const d0=300;class hd extends eh{constructor(e,t){super(e,t)}async acquireToken(e){var c,d;(c=this.performanceClient)==null||c.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=or(),n=await B(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Ot.X_MS_REQUEST_ID],s=new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),B(s.handleServerTokenResponse.bind(s),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){var n;if(!e)throw Ne(Py);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw U(Fd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Hn&&i.errorCode===dc,c=i instanceof qr&&i.errorCode===Dm.INVALID_GRANT_ERROR&&i.subError===Dm.CLIENT_MISMATCH_ERROR;if(s||c)return B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const n=wo(this.cacheManager.getRefreshToken.bind(this.cacheManager),k.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!n)throw dd(dc);if(n.expiresOn&&cd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||d0))throw dd(th);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Re.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}};try{return await B(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(c){if(c instanceof Hn&&c.subError===Nc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=oi(n);this.cacheManager.removeRefreshToken(d)}throw c}}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(k.RefreshTokenClientExecuteTokenRequest,e.correlationId);const n=this.createTokenQueryParameters(e),i=ye.appendQueryString(t.tokenEndpoint,n),s=await B(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),c=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((g=e.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return B(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,c,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,c;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new sa(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[go])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(c=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:c.defaultScopes),n.addGrantType(iy.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!ld(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;n.addClientAssertion(await Qy(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Re.POP){const d=new gi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await B(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Re.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Ne(kc);if((!Bn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case on.HOME_ACCOUNT_ID:try{const d=ii(e.ccsCredential.credential);n.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case on.UPN:n.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),n.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class h0 extends eh{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[n,i]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...pi]});return i===Ur.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new hd(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Ac&&n.errorCode===yr)return new hd(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw n}}async acquireCachedToken(e){var f;(f=this.performanceClient)==null||f.addQueueMeasurement(k.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Ur.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bn.isEmptyObj(e.claims))throw this.setCacheOutcome(Ur.FORCE_REFRESH_OR_CLAIMS,e.correlationId),U(yr);if(!e.account)throw U(Fd);const n=e.account.tenantId||t0(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if(VN(s.cachedAt)||cd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Ur.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),U(yr);s.refreshOn&&cd(s.refreshOn,0)&&(t=Ur.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Ur.NO_CACHED_ACCESS_TOKEN,e.correlationId),U(yr);const c=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await B(this.generateResultFromCacheRecord.bind(this),k.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var n,i;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},t),e!==Ur.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let n;if(e.idToken&&(n=Co(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw U(Bd);Ay(s,t.maxAge)}return mo.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const f0={sendGetRequestAsync:()=>Promise.reject(U(ge)),sendPostRequestAsync:()=>Promise.reject(U(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const Xm=",",Zy="|";function g0(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,c=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(Xm),d.length<4)return e}else d=Array.from({length:4},()=>Zy);return c.forEach((f,g)=>{var p,w;f.length===2&&((p=f[0])!=null&&p.length)&&((w=f[1])!=null&&w.length)&&m0({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(Xm)}function m0(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(Zy))}class da{constructor(e,t){this.cacheOutcome=Ur.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||P.EMPTY_STRING,this.wrapperVer=e.wrapperVer||P.EMPTY_STRING,this.telemetryCacheKey=gt.CACHE_KEY+St.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${gt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&t.push(`broker_error=${n}`);const i=t.join(gt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),c=[e,s].join(gt.VALUE_SEPARATOR);return[gt.SCHEMA_VERSION,c,i].join(gt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=da.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(gt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(gt.VALUE_SEPARATOR),s=e.errors.length,c=t<s?gt.OVERFLOW_TRUE:gt.OVERFLOW_FALSE,d=[s,c].join(gt.VALUE_SEPARATOR);return[gt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(gt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=gt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Fe?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(gt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=da.maxErrorsToSend(e),n=e.errors.length;if(t===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{const i={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}}static maxErrorsToSend(e){let t,n=0,i=0;const s=e.errors.length;for(t=0;t<s;t++){const c=e.failedRequests[2*t]||P.EMPTY_STRING,d=e.failedRequests[2*t+1]||P.EMPTY_STRING,f=e.errors[t]||P.EMPTY_STRING;if(i+=c.toString().length+d.toString().length+f.length+3,i<gt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||P.EMPTY_STRING),e.push(this.regionSource||P.EMPTY_STRING),e.push(this.regionOutcome||P.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return g0(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const eC="missing_kid_error",tC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const p0={[eC]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[tC]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class rh extends Fe{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,rh.prototype)}}function Zm(r){return new rh(r,p0[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class oh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Zm(eC);if(!e.alg)throw Zm(tC);const t=new oh({typ:e.typ||AN.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class ep{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class v0{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:e0.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new ep}}startPerformanceMeasurement(){return new ep}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ih="pkce_not_created",fd="crypto_nonexistent",Pc="empty_navigate_uri",nC="hash_empty_error",ah="no_state_in_hash",rC="hash_does_not_contain_known_properties",oC="unable_to_parse_state",iC="state_interaction_type_mismatch",aC="interaction_in_progress",sC="popup_window_error",cC="empty_window_error",po="user_cancelled",y0="monitor_popup_timeout",lC="monitor_window_timeout",uC="redirect_in_iframe",dC="block_iframe_reload",hC="block_nested_popups",C0="iframe_closed_prematurely",Mc="silent_logout_unsupported",fC="no_account_error",w0="silent_prompt_value_error",gC="no_token_request_cache_error",mC="unable_to_parse_token_request_cache_error",sh="no_cached_authority_error",_0="auth_request_not_set_error",T0="invalid_cache_type",Dc="non_browser_environment",Xo="database_not_open",hc="no_network_connectivity",pC="post_request_failed",vC="get_request_failed",gd="failed_to_parse_response",yC="unable_to_load_token",ch="crypto_key_not_found",CC="auth_code_required",wC="auth_code_or_nativeAccountId_required",_C="spa_code_and_nativeAccountId_present",lh="database_unavailable",TC="unable_to_acquire_token_from_native_platform",EC="native_handshake_timeout",SC="native_extension_not_installed",_a="native_connection_not_established",AC="uninitialized_public_client_application",IC="native_prompt_not_supported",bC="invalid_base64_string",kC="invalid_pop_token_request",RC="failed_to_build_headers",OC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const pr="For more visit: aka.ms/msaljs/browser-errors",E0={[ih]:"The PKCE code challenge and verifier could not be generated.",[fd]:"The crypto object or function is not available.",[Pc]:"Navigation URI is empty. Please check stack trace for more info.",[nC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${pr}`,[ah]:"Hash does not contain state. Please verify that the request originated from msal.",[rC]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${pr}`,[oC]:"Unable to parse state. Please verify that the request originated from msal.",[iC]:"Hash contains state but the interaction type does not match the caller.",[aC]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${pr}`,[sC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[cC]:"window.open returned null or undefined window object.",[po]:"User cancelled the flow.",[y0]:`Token acquisition in popup failed due to timeout. ${pr}`,[lC]:`Token acquisition in iframe failed due to timeout. ${pr}`,[uC]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[dC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${pr}`,[hC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[C0]:"The iframe being monitored was closed prematurely.",[Mc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[fC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[w0]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[gC]:"No token request found in cache.",[mC]:"The cached token request could not be parsed.",[sh]:"No cached authority found.",[_0]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[T0]:"Invalid cache type",[Dc]:"Login and token requests are not supported in non-browser environments.",[Xo]:"Database is not open!",[hc]:"No network connectivity. Check your internet connection.",[pC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[vC]:"Network request failed. Please check the network trace to determine root cause.",[gd]:"Failed to parse network response. Check network trace.",[yC]:"Error loading token to cache.",[ch]:"Cryptographic Key or Keypair not found in browser storage.",[CC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[wC]:"An authorization code or nativeAccountId must be provided to this flow.",[_C]:"Request cannot contain both spa code and native account id.",[lh]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[TC]:`Unable to acquire token from native platform. ${pr}`,[EC]:"Timed out while attempting to establish connection to browser extension",[SC]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[_a]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${pr}`,[AC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${pr}`,[IC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[bC]:"Invalid base64 encoded string.",[kC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[RC]:"Failed to build request headers object.",[OC]:"Failed to parse response headers"};class Ta extends Fe{constructor(e,t){super(e,E0[e],t),Object.setPrototypeOf(this,Ta.prototype),this.name="BrowserAuthError"}}function j(r,e){return new Ta(r,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const en={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},ai={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},uo={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ft={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},tp={GET:"GET",POST:"POST"},be={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},xr={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},bs={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},xe={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var X;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(X||(X={}));const np={scopes:pi},NC="jwk",md="msal.db",S0=1,A0=`${md}.keys`,Qt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},I0=[Qt.Default,Qt.Skip,Qt.RefreshTokenAndNetwork],b0="msal.browser.log.level",k0="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function ks(r){return encodeURIComponent(uh(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function xc(r){return PC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uh(r){return PC(new TextEncoder().encode(r))}function PC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const R0="RSASSA-PKCS1-v1_5",MC="SHA-256",O0=2048,N0=new Uint8Array([1,0,1]),rp="0123456789abcdef",op=new Uint32Array(1),P0="crypto_subtle_undefined",dh={name:R0,hash:MC,modulusLength:O0,publicExponent:N0};function M0(r){if(!window)throw j(Dc);if(!window.crypto)throw j(fd);if(!r&&!window.crypto.subtle)throw j(fd,P0)}async function DC(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(MC,i)}function D0(r){return window.crypto.getRandomValues(r)}function Pu(){return window.crypto.getRandomValues(op),op[0]}function Sr(){const r=Date.now(),e=Pu()*1024+(Pu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Pu();t[0]=r/2**40,t[1]=r/2**32,t[2]=r/2**24,t[3]=r/2**16,t[4]=r/2**8,t[5]=r,t[6]=112|n>>>8,t[7]=n,t[8]=128|i>>>24,t[9]=i>>>16,t[10]=i>>>8,t[11]=i,t[12]=s>>>24,t[13]=s>>>16,t[14]=s>>>8,t[15]=s;let c="";for(let d=0;d<t.length;d++)c+=rp.charAt(t[d]>>>4),c+=rp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(c+="-");return c}async function x0(r,e){return window.crypto.subtle.generateKey(dh,r,e)}async function Mu(r){return window.crypto.subtle.exportKey(NC,r)}async function L0(r,e,t){return window.crypto.subtle.importKey(NC,r,dh,e,t)}async function U0(r,e){return window.crypto.subtle.sign(dh,r,e)}async function xC(r){const e=await DC(r),t=new Uint8Array(e);return xc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ha="storage_not_supported",pd="stubbed_public_client_application_called",fc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const zs={[ha]:"Given storage configuration option was not supported.",[pd]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[fc]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};zs[ha],zs[pd],zs[fc];class hh extends Fe{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,hh.prototype)}}function fh(r){return new hh(r,zs[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function B0(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function F0(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function gh(){return window.parent!==window}function H0(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${en.POPUP_NAME_PREFIX}.`)===0}function Cr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function V0(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function $0(){if(ye.hashContainsKnownProperties(window.location.hash)&&gh())throw j(dC)}function K0(r){if(gh()&&!r)throw j(uC)}function z0(){if(H0())throw j(hC)}function LC(){if(typeof window>"u")throw j(Dc)}function UC(r){if(!r)throw j(AC)}function mh(r){LC(),$0(),z0(),UC(r)}function ip(r,e){if(mh(r),K0(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ft.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw fh(fc)}function BC(r){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(r).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function W0(){return Sr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class gc{navigateInternal(e,t){return gc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return gc.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(n=>{setTimeout(()=>{n(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class q0{async sendGetRequestAsync(e,t){let n,i={},s=0;const c=ap(t);try{n=await fetch(e,{method:tp.GET,headers:c})}catch{throw j(window.navigator.onLine?vC:hc)}i=sp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw Ym(j(gd),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=ap(t);let s,c=0,d={};try{s=await fetch(e,{method:tp.POST,headers:i,body:n})}catch{throw j(window.navigator.onLine?pC:hc)}d=sp(s.headers);try{return c=s.status,{headers:d,body:await s.json(),status:c}}catch{throw Ym(j(gd),c,d)}}}function ap(r){try{const e=new Headers;if(!(r&&r.headers))return e;const t=r.headers;return Object.entries(t).forEach(([n,i])=>{e.append(n,i)}),e}catch{throw j(RC)}}function sp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw j(OC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const G0=6e4,vd=1e4,j0=3e4,Y0=2e3;function J0({auth:r,cache:e,system:t,telemetry:n},i){const s={clientId:P.EMPTY_STRING,authority:`${P.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:P.EMPTY_STRING,authorityMetadata:P.EMPTY_STRING,redirectUri:typeof window<"u"?Cr():"",postLogoutRedirectUri:P.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Tr.AAD,OIDCOptions:{serverResponseType:wa.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Kd.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},c={cacheLocation:Ft.SessionStorage,temporaryCacheLocation:Ft.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ft.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:Me.Info,piiLoggingEnabled:!1},g={...{...qy,loggerOptions:d,networkClient:i?new q0:f0,navigationClient:new gc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||G0,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||vd,navigateFrameWait:0,redirectNavigationTimeout:j0,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||Y0,pollIntervalMilliseconds:en.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},p={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new v0};if((r==null?void 0:r.protocolMode)!==Tr.OIDC&&(r!=null&&r.OIDCOptions)&&new Wr(g.loggerOptions).warning(JSON.stringify(Ne(By))),r!=null&&r.protocolMode&&r.protocolMode!==Tr.AAD&&(g!=null&&g.allowNativeBroker))throw Ne(Fy);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...c,...e},system:g,telemetry:{...p,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Q0="@azure/msal-browser",Lc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class ph{static loggerCallback(e,t){switch(e){case Me.Error:console.error(t);return;case Me.Info:console.info(t);return;case Me.Verbose:console.debug(t);return;case Me.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=J0(e,this.browserEnvironment);let t;try{t=window[Ft.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(b0),i=(f=t==null?void 0:t.getItem(k0))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,c={...this.config.system.loggerOptions},d=n&&Object.keys(Me).includes(n)?Me[n]:void 0;d&&(c.loggerCallback=ph.loggerCallback,c.logLevel=d),s!==void 0&&(c.piiLoggingEnabled=s),this.logger=new Wr(c,Q0,Lc),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class vo extends ph{getModuleName(){return vo.MODULE_NAME}getId(){return vo.ID}async initialize(){return this.available=typeof window<"u",this.available}}vo.MODULE_NAME="";vo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function nr(r){return new TextDecoder().decode(X0(r))}function X0(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw j(bC)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Z0{constructor(){this.dbName=md,this.version=S0,this.tableName=A0,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",i=>{i.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",i=>{const s=i;this.db=s.target.result,this.dbOpen=!0,e()}),n.addEventListener("error",()=>t(j(lh)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);c.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((n,i)=>{if(!this.db)return i(j(Xo));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),n()}),d.addEventListener("error",f=>{this.closeConnection(),i(f)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);c.addEventListener("success",()=>{this.closeConnection(),t()}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(j(Xo));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();s.addEventListener("success",c=>{const d=c;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",c=>{this.closeConnection(),t(c)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);c.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const n=window.indexedDB.deleteDatabase(md),i=setTimeout(()=>t(!1),200);n.addEventListener("success",()=>(clearTimeout(i),e(!0))),n.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),n.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yd{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,n)=>{e.push(n)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class eM{constructor(e){this.inMemoryCache=new yd,this.indexedDBCache=new Z0,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Ta&&e.errorCode===lh)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(n){this.handleDatabaseAccessError(n)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(n){this.handleDatabaseAccessError(n)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mi{constructor(e,t,n){this.logger=e,M0(n??!1),this.cache=new eM(this.logger),this.performanceClient=t}createNewGuid(){return Sr()}base64Encode(e){return uh(e)}base64Decode(e){return nr(e)}base64UrlEncode(e){return ks(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var p;const t=(p=this.performanceClient)==null?void 0:p.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await x0(mi.EXTRACTABLE,mi.POP_KEY_USAGES),i=await Mu(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},c=cp(s),d=await this.hashString(c),f=await Mu(n.privateKey),g=await L0(f,!1,["sign"]);return await this.cache.setItem(d,{privateKey:g,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,n,i){var V;const s=(V=this.performanceClient)==null?void 0:V.startMeasurement(k.CryptoOptsSignJwt,i),c=await this.cache.getItem(t);if(!c)throw j(ch);const d=await Mu(c.publicKey),f=cp(d),g=ks(JSON.stringify({kid:t})),p=oh.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),w=ks(p);e.cnf={jwk:JSON.parse(f)};const C=ks(JSON.stringify(e)),S=`${w}.${C}`,b=new TextEncoder().encode(S),N=await U0(c.privateKey,b),K=xc(new Uint8Array(N)),H=`${S}.${K}`;return s&&s.end({success:!0}),H}async hashString(e){return xC(e)}}mi.POP_KEY_USAGES=["sign","verify"];mi.EXTRACTABLE=!0;function cp(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tM{constructor(){if(!window.localStorage)throw fh(ha)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class nM{constructor(){if(!window.sessionStorage)throw fh(ha)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function FC(r,e){if(!e)return null;try{return Fn.parseRequestState(r,e).libraryState.meta}catch{throw U(hi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const rM=24*60*60*1e3;class oM{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[c,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(c===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const c=iM(n);s+=`expires=${c};`}i&&(s+="Secure;"),document.cookie=s}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(n=>{const i=decodeURIComponent(n).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function iM(r){const e=new Date;return new Date(e.getTime()+r*rM).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Cd extends fi{constructor(e,t,n,i,s,c){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new yd,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new oM,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=c}setupBrowserStorage(e){try{switch(e){case Ft.LocalStorage:return new tM;case Ft.SessionStorage:return new nM;case Ft.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ft.MemoryStorage,new yd}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${st.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${st.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${st.ERROR}`,i=`${P.CACHE_PREFIX}.${st.ERROR_DESC}`,s=this.browserStorage.getItem(e),c=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,c,d,f];[st.ID_TOKEN,st.CLIENT_INFO,st.ERROR,st.ERROR_DESC].forEach((w,C)=>{const S=g[C];S&&this.setTemporaryCache(w,S,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(xr.ACCOUNT_KEYS),t=this.getItem(`${xr.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const c=this.validateAndParseJson(s);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case re.ID_TOKEN:if(Fm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case re.ACCESS_TOKEN:case re.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Bm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case re.REFRESH_TOKEN:if(Hm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const c=this.validateAndParseJson(s);c&&it.isAccountEntity(c)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,n,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const n=this.validateAndParseJson(t);return!n||!it.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):fi.toObject(new it,n)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(xr.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(xr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(xr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,re.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,re.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,re.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${xr.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(t){case re.ID_TOKEN:n.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case re.ACCESS_TOKEN:n.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case re.REFRESH_TOKEN:n.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),U(sd)}this.setItem(`${xr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(t){case re.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=n.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case re.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=n.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case re.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const c=n.refreshToken.indexOf(e);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),U(sd)}this.setItem(`${xr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ID_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Fm(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ACCESS_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Bm(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.REFRESH_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Hm(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!JN(e,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=YN(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!GN(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&QN(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(bs.WRAPPER_SKU,e),this.internalStorage.setItem(bs.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(bs.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(bs.WRAPPER_VER)||P.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(st.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(st.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const c=this.getAccountInfoFilteredBy({localAccountId:s});return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(c),c):null}const n=this.validateAndParseJson(t);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(st.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(st.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(i)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!jN(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const s=this.cookieStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),s}const i=this.temporaryCacheStorage.getItem(n);if(!i){if(this.cacheConfig.cacheLocation===Ft.LocalStorage){const s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),i}setTemporaryCache(e,t,n){const i=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(k.ClearTokensAndKeysWithClaims,t);const n=this.getTokenKeys(),i=[];n.accessToken.forEach(s=>{const c=this.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&i.push(this.removeAccessToken(s))}),await Promise.all(i),i.length>0&&this.logger.warning(`${i.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Bn.startsWith(e,P.CACHE_PREFIX)||Bn.startsWith(e,st.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;const i=this.generateAuthorityKey(n);return this.getTemporaryCache(i)}updateCacheEntries(e,t,n,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const c=this.generateStateKey(e);this.setTemporaryCache(c,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const f=this.generateAuthorityKey(e);if(this.setTemporaryCache(f,n,!1),s){const g={credential:s.homeAccountId,type:on.HOME_ACCOUNT_ID};this.setTemporaryCache(be.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:on.UPN};this.setTemporaryCache(be.CCS_CREDENTIAL,JSON.stringify(g),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(be.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(be.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(be.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(be.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(be.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(be.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n||P.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(be.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=FC(this.cryptoImpl,n);i&&i.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=uh(JSON.stringify(e));this.setTemporaryCache(be.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(be.REQUEST_PARAMS,!0);if(!t)throw j(gC);let n;try{n=JSON.parse(nr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),j(mC)}if(this.removeTemporaryItem(this.generateCacheKey(be.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw j(sh);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(be.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${P.CACHE_PREFIX}.${be.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${be.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw j(aC);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(st.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(st.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(st.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(st.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=Co(n,nr);if(i.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.preferred_username;if(i.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const n=oi(t);if(e!==n){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(n,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,f,g;const n=Ic((d=e.account)==null?void 0:d.homeAccountId,(f=e.account)==null?void 0:f.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const s=bc((g=e.account)==null?void 0:g.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,nr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),c={idToken:n,accessToken:s};return this.saveCacheRecord(c)}async saveCacheRecord(e,t,n){try{await super.saveCacheRecord(e,t,n)}catch(i){if(i instanceof ci&&this.performanceClient&&n)try{const s=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:s.refreshToken.length,cacheIdCount:s.idToken.length,cacheAtCount:s.accessToken.length},n)}catch{}throw i}}}const aM=(r,e)=>{const t={cacheLocation:Ft.MemoryStorage,temporaryCacheLocation:Ft.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Cd(r,t,ac,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function sM(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function cM(r,e,t){if(e.trace("getAccount called"),Object.keys(r).length===0)return e.warning("getAccount: No accountFilter provided"),null;const n=t.getAccountInfoFilteredBy(r);return n?(e.verbose("getAccount: Account matching provided filter found, returning"),n):(e.verbose("getAccount: No matching account found, returning null"),null)}function lM(r,e,t){if(e.trace("getAccountByUsername called"),!r)return e.warning("getAccountByUsername: No username provided"),null;const n=t.getAccountInfoFilteredBy({username:r});return n?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${r}`),n):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function uM(r,e,t){if(e.trace("getAccountByHomeId called"),!r)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=t.getAccountInfoFilteredBy({homeAccountId:r});return n?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${r}`),n):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function dM(r,e,t){if(e.trace("getAccountByLocalId called"),!r)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const n=t.getAccountInfoFilteredBy({localAccountId:r});return n?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${r}`),n):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function hM(r,e){e.setActiveAccount(r)}function fM(r){return r.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ne={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class gM{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Wr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||W0();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,n,i){if(typeof window<"u"){const s={eventType:e,interactionType:t||null,payload:n||null,error:i||null,timestamp:Date.now()};this.eventCallbacks.forEach(([c,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),c.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class HC{constructor(e,t,n,i,s,c,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=c,this.nativeMessageHandler=f,this.correlationId=g||Sr(),this.logger=i.clone(en.MSAL_SKU,Lc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){it.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(it.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ye.getAbsoluteUrl(t,Cr())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new da(n,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,n=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const i={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e.requestAuthority||this.config.auth.authority,c=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&c?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=Tt.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await B(Yy,k.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(f,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!g.isAlias(t.environment))throw Ne(Hy);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const mM=32;async function pM(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=wo(vM,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await B(yM,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function vM(r,e,t){try{const n=new Uint8Array(mM);return wo(D0,k.GetRandomValues,e,r,t)(n),xc(n)}catch{throw j(ih)}}async function yM(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await B(DC,k.Sha256Digest,t,e,n)(r,e,n);return xc(new Uint8Array(i))}catch{throw j(ih)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function vh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],c={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!c.authenticationScheme)c.authenticationScheme=Re.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(c.authenticationScheme===Re.SSH){if(!r.sshJwk)throw Ne(kc);if(!r.sshKid)throw Ne(Uy)}n.verbose(`Authentication Scheme set to "${c.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Bn.isEmptyObj(r.claims)&&(c.requestedClaimsHash=await xC(r.claims)),c}async function CM(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await B(vh,k.InitializeBaseRequest,i,n,r.correlationId)(r,t,n,i);return{...r,...s,account:e,forceRefresh:r.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class vi extends HC{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await B(pM,k.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...e,redirectUri:e.redirectUri,code:P.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=P.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||Sr(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(e.postLogoutRedirectUri,Cr())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Cr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(Cr(),Cr())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new Xy(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:c}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await B(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:c}),f=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:f.loggerCallback,piiLoggingEnabled:f.piiLoggingEnabled,logLevel:f.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:en.MSAL_SKU,version:Lc,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(e.redirectUri),i={interactionType:t},s=Fn.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await B(vh,k.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:n,state:s,nonce:e.nonce||Sr(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const f=e.account||this.browserStorage.getActiveAccount();if(f&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${f.homeAccountId}`,this.correlationId),d.account=f),!d.loginHint&&!f){const g=this.browserStorage.getLegacyLoginHint();g&&(d.loginHint=g)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const wM="ContentError",VC="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const _M="USER_INTERACTION_REQUIRED",TM="USER_CANCEL",EM="NO_NETWORK",SM="PERSISTENT_ERROR",AM="DISABLED",IM="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const bM=-2147186943,kM={[VC]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Qn extends Fe{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Qn.prototype),this.name="NativeAuthError",this.ext=n}}function Zo(r){if(r.ext&&r.ext.status&&(r.ext.status===SM||r.ext.status===AM)||r.ext&&r.ext.error&&r.ext.error===bM)return!0;switch(r.errorCode){case wM:return!0;default:return!1}}function wd(r,e,t){if(t&&t.status)switch(t.status){case IM:return dd(Jy);case _M:return new Hn(r,e);case TM:return j(po);case EM:return j(hc)}return new Qn(r,kM[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class $C extends vi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(xe.acquireTokenSilent_silentFlow),n=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new h0(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const c=(await B(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),c}catch(s){throw s instanceof Ta&&s.errorCode===ch&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),s}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class li extends HC{constructor(e,t,n,i,s,c,d,f,g,p,w,C){var T;super(e,t,n,i,s,c,f,g,C),this.apiId=d,this.accountId=p,this.nativeMessageHandler=g,this.nativeStorageManager=w,this.silentCacheClient=new $C(e,this.nativeStorageManager,n,i,s,c,f,g,C),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const S=this.nativeMessageHandler.getExtensionId()===ai.PREFERRED_EXTENSION_ID?"chrome":(T=this.nativeMessageHandler.getExtensionId())!=null&&T.length?"unknown":void 0;this.skus=da.makeExtraSkuString({libraryName:en.MSAL_SKU,libraryVersion:Lc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[YP]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),n=or();try{const i=await this.initializeNativeRequest(e);try{const g=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),g}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...s}=i,c={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(c),f=this.validateNativeResponse(d);return await this.handleNativeResponse(f,i,n).then(g=>(t.end({success:!0,isNativeBroker:!0,requestId:g.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),g)).catch(g=>{throw t.end({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})}catch(i){throw i instanceof Qn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Ye.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),U(id);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw U(id);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),c={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:c}}catch(i){throw i}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...n}=e;delete n.onRedirectNavigate;const i=await this.initializeNativeRequest(n),s={method:uo.GetToken,request:i};try{const f=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(f)}catch(f){if(f instanceof Qn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),Zo(f)))throw f}this.browserStorage.setTemporaryCache(be.NATIVE_REQUEST,JSON.stringify(i),!0);const c={apiId:xe.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,c)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:i,...s}=n;i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(be.NATIVE_REQUEST));const c={method:uo.GetToken,request:s},d=or();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(c);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const p=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),p}catch(f){throw this.browserStorage.setInteractionInProgress(!1),f}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var p;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=Co(e.id_token,nr),s=this.createHomeAccountIdentifier(e,i),c=(p=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:p.homeAccountId;if(s!==c&&e.account.id!==t.accountId)throw wd(VC);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=nh(this.browserStorage,d,s,nr,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),g=await this.generateAuthenticationResult(e,t,i,f,d.canonicalAuthority,n);return this.cacheAccount(f),this.cacheNativeTokens(e,t,s,i,e.access_token,g.tenantId,n),g}createHomeAccountIdentifier(e,t){return it.generateHomeAccountId(e.client_info||P.EMPTY_STRING,xn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Re.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const n=new gi(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw U(Vd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,c){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope),g=e.account.properties||{},p=g.UID||n.oid||n.sub||P.EMPTY_STRING,w=g.TenantId||n.tid||P.EMPTY_STRING,C=Jd(i.getAccountInfo(),void 0,n,e.id_token);C.nativeAccountId!==e.account.id&&(C.nativeAccountId=e.account.id);const S=await this.generatePopAccessToken(e,t),T=t.tokenType===Re.POP?Re.POP:Re.BEARER;return{authority:s,uniqueId:p,tenantId:w,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(c+e.expires_in)*1e3),tokenType:T,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,n,i,s,c,d){const f=Ic(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Re.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,p=d+g,w=this.generateScopes(e,t),C=bc(n,t.authority,s,t.clientId,i.tid||c,w.printScopes(),p,0,nr,void 0,t.tokenType,void 0,t.keyId),S={idToken:f,accessToken:C};this.nativeStorageManager.saveCacheRecord(S,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ay(xd,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const n=new ye(t);n.validateAsUri();const{scopes:i,...s}=e,c=new Ye(i||[]);c.appendScopes(pi);const d=()=>{switch(this.apiId){case xe.ssoSilent:case xe.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),lt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case lt.NONE:case lt.CONSENT:case lt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),j(IC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(f.signPopToken&&e.popKid)throw j(kC);if(this.handleExtraBrokerParams(f),f.extraParameters=f.extraParameters||{},f.extraParameters.telemetry=ai.MATS_TELEMETRY,e.authenticationScheme===Re.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},p=new gi(this.browserCrypto);let w;if(f.keyId)w=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await B(p.generateCnf.bind(p),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);w=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=w}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Zd)&&e.extraParameters.hasOwnProperty(ud)&&e.extraParameters.hasOwnProperty(go);if(!e.embeddedClientId&&!t)return;let n="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[ud],n=e.extraParameters[go]),e.extraParameters={child_client_id:n,child_redirect_uri:i},(s=this.performanceClient)==null||s.addFields({embeddedClientId:n,embeddedRedirectUri:i},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Xn{constructor(e,t,n,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(k.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:ai.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((n,i)=>{this.resolvers.set(t.responseId,{resolve:n,reject:i})})}static async createProvider(e,t,n){e.trace("NativeMessageHandler - createProvider called.");try{const i=new Xn(e,t,n,ai.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Xn(e,t,n);return await s.sendHandshakeRequest(),s}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ai.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:{method:uo.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,n)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:n}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(j(EC)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==ai.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===uo.HandshakeRequest){const n=this.handshakeResolvers.get(t.responseId);if(!n){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),n.reject(j(SC))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,n=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const s=t.body.method;if(s===uo.Response){if(!n)return;const c=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(c)}`),c.status!=="Success")n.reject(wd(c.code,c.description,c.ext));else if(c.result)c.result.code&&c.result.description?n.reject(wd(c.result.code,c.result.description,c.result.ext)):n.resolve(c.result);else throw ay(xd,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(s===uo.HandshakeResponse){if(!i){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${s}`),this.logger.errorPii(`Unable to parse ${e}`),n?n.reject(s):i&&i.reject(s)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,n,i){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case Re.BEARER:case Re.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yh{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(k.HandleCodeResponse,t.correlationId);let n;try{n=this.authModule.handleFragmentResponse(e,t.state)}catch(i){throw i instanceof qr&&i.subError===po?j(po):i}return B(this.handleCodeResponseFromServer.bind(this),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(n,t)}async handleCodeResponseFromServer(e,t,n=!0){if(this.performanceClient.addQueueMeasurement(k.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await B(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),n&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const s=this.createCcsCredentials(t);s&&(this.authCodeRequest.ccsCredential=s)}return await B(this.authModule.acquireToken.bind(this.authModule),k.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:on.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function KC(r,e,t){const n=lc(r);if(!n)throw $y(r)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${r}`),j(rC)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),j(nC));return n}function RM(r,e,t){if(!r.state)throw j(ah);const n=FC(e,r.state);if(!n)throw j(oC);if(n.interactionType!==t)throw j(iC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class OM extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,d,g,p),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||pi,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,n)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(e,n))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},i=e&&e.authority,s=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,i,s)):(this.logger.verbose("asyncPopup set to false, opening popup"),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(t,n,i,s))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var s;this.logger.verbose("acquireTokenPopupAsync called");const n=this.initializeServerTelemetryManager(xe.acquireTokenPopup),i=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Popup);BC(i.authority);try{const c=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),f=Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const p=await d.getAuthCodeUrl({...i,nativeBroker:f}),w=new yh(d,this.browserStorage,c,this.logger,this.performanceClient),C=this.initiateAuthRequest(p,t);this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),T=wo(KC,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(S,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,c),T.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw j(_a);const N=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,T.accountId,this.nativeStorage,i.correlationId),{userRequestState:K}=Fn.parseRequestState(this.browserCrypto,i.state);return await N.acquireToken({...i,state:K,prompt:void 0})}return await w.handleCodeResponse(T,i)}catch(c){throw(s=t.popup)==null||s.close(),c instanceof Fe&&(c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c)),c}}async logoutPopupAsync(e,t,n,i){var c,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ne.LOGOUT_START,X.Popup,e);const s=this.initializeServerTelemetryManager(xe.logoutPopup);try{await this.clearCacheOnLogout(e.account);const p=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{p.authority.endSessionEndpoint}catch{if((c=e.account)!=null&&c.homeAccountId&&e.postLogoutRedirectUri&&p.authority.protocolMode===Tr.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e),i){const S={apiId:xe.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,Cr());await this.navigationClient.navigateInternal(T,S)}(f=t.popup)==null||f.close();return}}const w=p.getLogoutUri(e);this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e);const C=this.openPopup(w,t);if(this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:xe.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,Cr());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${T}`),await this.navigationClient.navigateInternal(T,S)}else this.logger.verbose("No main window navigation requested")}catch(p){throw(g=t.popup)==null||g.close(),p instanceof Fe&&(p.setCorrelationId(this.correlationId),s.cacheFailedRequest(p)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Popup,null,p),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup),p}this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),j(Pc)}monitorPopupForHash(e,t){return new Promise((n,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const s=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(s),i(j(po));return}let c="";try{c=e.location.href}catch{}if(!c||c==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===wa.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),n(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),n.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),n=this.openSizedPopup(e,t)),!n)throw j(cC);return n.focus&&n.focus(),this.currentWindow=n,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),j(sC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,T,b,N;const s=i.screenLeft?i.screenLeft:i.screenX,c=i.screenTop?i.screenTop:i.screenY,d=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let g=(S=n.popupSize)==null?void 0:S.width,p=(T=n.popupSize)==null?void 0:T.height,w=(b=n.popupPosition)==null?void 0:b.top,C=(N=n.popupPosition)==null?void 0:N.left;return(!g||g<0||g>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=en.POPUP_WIDTH),(!p||p<0||p>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),p=en.POPUP_HEIGHT),(!w||w<0||w>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),w=Math.max(0,f/2-en.POPUP_HEIGHT/2+c)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-en.POPUP_WIDTH/2+s)),i.open(e,t,`width=${g}, height=${p}, top=${w}, left=${C}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(X.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${en.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${en.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class lp{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(be.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(be.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:xe.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,n);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),j(Pc)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(t),i=this.browserStorage.getTemporaryCache(n);if(!i)throw U(ic,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof qr&&g.subError===po?j(po):g}const c=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(c);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await B(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(s.cloud_instance_host_name,this.authCodeRequest.correlationId),s.nonce=d||void 0,s.state=i,s.client_info)this.authCodeRequest.clientInfo=s.client_info;else{const g=this.checkCcsCredentials();g&&(this.authCodeRequest.ccsCredential=g)}const f=await this.authModule.acquireToken(this.authCodeRequest,s);return this.browserStorage.cleanRequestByState(t),f}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(be.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function NM(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const r=window.performance.getEntriesByType("navigation"),e=r.length?r[0]:void 0;return e==null?void 0:e.type}class PM extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,d,g,p),this.nativeStorage=f}async acquireToken(e){const t=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const n=this.initializeServerTelemetryManager(xe.acquireTokenRedirect),i=s=>{s.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(ne.RESTORE_FROM_BFCACHE,X.Redirect))};try{const s=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),c=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new lp(c,this.browserStorage,s,this.logger,this.performanceClient),f=await c.getAuthCodeUrl({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),g=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${g}`),window.addEventListener("pageshow",i),await d.initiateAuthRequest(f,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:g,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(s){throw s instanceof Fe&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),window.removeEventListener("pageshow",i),this.browserStorage.cleanRequestByState(t.state),s}}async handleRedirectPromise(e="",t){const n=this.initializeServerTelemetryManager(xe.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[i,s]=this.getRedirectResponse(e||"");if(!i)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(X.Redirect),NM()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const c=this.browserStorage.getTemporaryCache(be.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(c),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),c.indexOf("#")>-1&&F0(c),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!gh()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(be.URL_HASH,s,!0);const g={apiId:xe.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let p=!0;if(!c||c==="null"){const w=V0();this.browserStorage.setTemporaryCache(be.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),p=await this.navigationClient.navigateInternal(w,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${c}`),p=await this.navigationClient.navigateInternal(c,g);if(!p)return await this.handleResponse(i,n)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,n);return null}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),this.browserStorage.cleanRequestByInteractionType(X.Redirect),i}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===wa.QUERY?t=window.location.search:t=window.location.hash);let n=lc(t);if(n){try{RM(n,this.browserCrypto,X.Redirect)}catch(s){return s instanceof Fe&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return B0(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(be.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(be.URL_HASH)),i&&(n=lc(i),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,i]):[null,""]}async handleResponse(e,t){const n=e.state;if(!n)throw j(ah);const i=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(_a);const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Fn.parseRequestState(this.browserCrypto,n);return f.acquireToken({...i,state:g,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(n)})}const s=this.browserStorage.getCachedAuthority(n);if(!s)throw j(sh);const c=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new lp(c,this.browserStorage,i,this.logger,this.performanceClient).handleCodeResponse(e,n)}async logout(e){var i,s;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(xe.logout);try{this.eventHandler.emitEvent(ne.LOGOUT_START,X.Redirect,e),await this.clearCacheOnLogout(t.account);const c={apiId:xe.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===Tr.OIDC)try{d.authority.endSessionEndpoint}catch{if((i=t.account)!=null&&i.homeAccountId){this.browserStorage.removeAccount((s=t.account)==null?void 0:s.homeAccountId),this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Redirect,t);return}}const f=d.getLogoutUri(t);if(this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(f)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,c);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,c);return}}catch(c){throw c instanceof Fe&&(c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c)),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Redirect,null,c),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect),c}this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ye.getAbsoluteUrl(t,Cr())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function MM(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),j(Pc);return i?B(xM,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):wo(LM,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function DM(r,e,t,n,i,s,c){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<vd&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${vd}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(p),f(j(lC))},e),p=window.setInterval(()=>{let w="";const C=r.contentWindow;try{w=C?C.location.href:""}catch{}if(!w||w==="about:blank")return;let S="";C&&(c===wa.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(p),d(S)},t)}).finally(()=>{wo(UM,k.RemoveHiddenIframe,i,n,s)(r)})}function xM(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const c=zC();window.setTimeout(()=>{if(!c){s("Unable to load iframe");return}c.src=r,i(c)},e)})}function LM(r){const e=zC();return e.src=r,e}function zC(){const r=document.createElement("iframe");return r.className="msalSilentIframe",r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(r),r}function UM(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class BM extends vi{constructor(e,t,n,i,s,c,d,f,g,p,w){super(e,t,n,i,s,c,f,p,w),this.apiId=d,this.nativeStorage=g}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==lt.NONE&&t.prompt!==lt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${lt.NONE}`),t.prompt=lt.NONE):t.prompt=lt.NONE;const n=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);BC(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),await B(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(c){if(c instanceof Fe&&(c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c)),!s||!(c instanceof Fe)||c.errorCode!==en.INVALID_GRANT_ERROR)throw c;this.performanceClient.addFields({retryError:c.errorCode},this.correlationId);const d=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);return await B(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(j(Mc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await B(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),c=new yh(e,this.browserStorage,i,this.logger,this.performanceClient),d=await B(MM,k.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(s,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),f=this.config.auth.OIDCOptions.serverResponseType,g=await B(DM,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),p=wo(KC,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(p.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(_a);const w=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,p.accountId,this.browserStorage,n),{userRequestState:C}=Fn.parseRequestState(this.browserCrypto,t.state);return B(w.acquireToken.bind(w),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||lt.NONE})}return B(c.handleCodeResponse.bind(c),k.HandleCodeResponse,this.logger,this.performanceClient,n)(p,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class FM extends vi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await B(vh,k.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),n={...e,...t};e.redirectUri&&(n.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(xe.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return B(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(c=>{throw c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),c})}logout(){return Promise.reject(j(Mc))}async createRefreshTokenClient(e){const t=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new hd(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class HM{constructor(e,t,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=n,this.cryptoObj=i}loadExternalTokens(e,t,n){if(!this.isBrowserEnvironment)throw j(Dc);const i=t.id_token?Co(t.id_token,nr):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=e.authority?new Tt(Tt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Sr()):void 0,d=this.loadAccount(e,n.clientInfo||t.client_info||"",i,c),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),p=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:p},i,c)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=it.createFromAccountInfo(e.account);return this.storage.setAccount(f),f}else if(!i||!t&&!n)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),j(yC);const s=it.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),c=n==null?void 0:n.tid,d=nh(this.storage,i,s,nr,n,t,i.hostnameAndPort,c,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,n,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=Ic(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,c){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?Ye.fromString(t.scope):new Ye(e.scopes),f=c.expiresOn||t.expires_in+new Date().getTime()/1e3,g=c.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,p=bc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,nr);return this.storage.setAccessTokenCredential(p),p}loadRefreshToken(e,t,n){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=Iy(t,n,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i),i}generateAuthenticationResult(e,t,n,i){var p,w,C;let s="",c=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,c=Ye.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),f=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const g=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:c,account:g.getAccountInfo(),idToken:((p=t.idToken)==null?void 0:p.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((w=t.refreshToken)==null?void 0:w.familyId)||"",tokenType:((C=t==null?void 0:t.accessToken)==null?void 0:C.tokenType)||"",state:e.state||"",cloudGraphHostName:g.cloudGraphHostName||"",msGraphHost:g.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class VM extends Xy{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class $M extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,f,g,p),this.apiId=d}async acquireToken(e){if(!e.code)throw j(CC);const t=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,X.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},s=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),c=new VM(s);this.logger.verbose("Auth code client created");const d=new yh(c,this.browserStorage,i,this.logger,this.performanceClient);return await B(d.handleCodeResponseFromServer.bind(d),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(j(Mc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Gn(r){const e=r==null?void 0:r.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Rs(r,e){try{mh(r)}catch(t){throw e.end({success:!1},t),t}}class Uc{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new mi(this.logger,this.performanceClient):ac,this.eventHandler=new gM(this.logger),this.browserStorage=this.isBrowserEnvironment?new Cd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,n0(this.config.auth),this.performanceClient):aM(this.config.auth.clientId,this.logger);const t={cacheLocation:Ft.MemoryStorage,temporaryCacheLocation:Ft.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Cd(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new HM(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const n=new Uc(e);return await n.initialize(t),n}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(ne.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),n=this.config.system.allowNativeBroker,i=this.performanceClient.startMeasurement(k.InitializeClientApplication,t);if(this.eventHandler.emitEvent(ne.INITIALIZE_START),n)try{this.nativeExtensionProvider=await Xn.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(s){this.logger.verbose(s)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await B(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),k.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(ne.INITIALIZE_END),i.end({allowNativeBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),UC(this.initialized),this.isBrowserEnvironment){const t=e||"";let n=this.redirectResponse.get(t);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),n=this.browserStorage.getCachedNativeRequest(),i=n&&Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(be.CORRELATION_ID,!0)||"",c=this.performanceClient.startMeasurement(k.AcquireTokenRedirect,s);this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_START,X.Redirect);let d;if(i&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=B(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(this.performanceClient,c.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=B(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(e,c)}return d.then(f=>(f?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),c.end({success:!0,accountType:Gn(f.account)})):c.event.errorCode?c.end({success:!1}):c.discard(),this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_END,X.Redirect),f)).catch(f=>{const g=f;throw t.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,g):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,g),this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_END,X.Redirect),c.end({success:!1},g),f})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenPreRedirect,t);n.add({accountType:Gn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=c=>{const d=typeof i=="function"?i(c):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const c=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof c=="function"?c(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{ip(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Redirect,e):this.eventHandler.emitEvent(ne.LOGIN_START,X.Redirect,e);let c;return this.nativeExtensionProvider&&this.canUseNative(e)?c=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Qn&&Zo(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Hn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),f}):c=this.createRedirectClient(t).acquireToken(e),await c}catch(c){throw n.end({success:!1},c),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,c):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,c),c}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:Gn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Rs(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(c){return Promise.reject(c)}const i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Popup,e):this.eventHandler.emitEvent(ne.LOGIN_START,X.Popup,e);let s;return this.canUseNative(e)?s=this.acquireTokenNative({...e,correlationId:t},xe.acquireTokenPopup).then(c=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:Gn(c.account)}),c)).catch(c=>{if(c instanceof Qn&&Zo(c))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(c instanceof Hn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),c}):s=this.createPopupClient(t).acquireToken(e),s.then(c=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Popup,c):this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Popup,c),n.end({success:!0,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Gn(c.account)}),c)).catch(c=>(i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Popup,null,c):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Popup,null,c),n.end({success:!1},c),Promise.reject(c)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var s,c;const t=this.getRequestCorrelationId(e),n={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(k.SsoSilent,t),(s=this.ssoSilentMeasurement)==null||s.add({scenarioId:e.scenarioId,accountType:Gn(e.account)}),Rs(this.initialized,this.ssoSilentMeasurement),(c=this.ssoSilentMeasurement)==null||c.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ne.SSO_SILENT_START,X.Silent,n);let i;return this.canUseNative(n)?i=this.acquireTokenNative(n,xe.ssoSilent).catch(d=>{if(d instanceof Qn&&Zo(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw d}):i=this.createSilentIframeClient(n.correlationId).acquireToken(n),i.then(d=>{var f;return this.eventHandler.emitEvent(ne.SSO_SILENT_SUCCESS,X.Silent,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Gn(d.account)}),d}).catch(d=>{var f;throw this.eventHandler.emitEvent(ne.SSO_SILENT_FAILURE,X.Silent,null,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenByCode,t);Rs(this.initialized,n),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_START,X.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw j(_C);if(e.code){const i=e.code;let s=this.hybridAuthCodeResponses.get(i);return s?(this.logger.verbose("Existing acquireTokenByCode request found",t),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),s=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(c=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_SUCCESS,X.Silent,c),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:c.fromNativeBroker,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Gn(c.account)}),c)).catch(c=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,c),n.end({success:!1},c),c}),this.hybridAuthCodeResponses.set(i,s)),await s}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const i=await this.acquireTokenNative({...e,correlationId:t},xe.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Qn&&Zo(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:Gn(i.account),success:!0}),i}else throw j(TC);else throw j(wC)}catch(i){throw this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,i),n.end({success:!1},i),i}}async acquireTokenByCodeAsync(e){var i;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(k.AcquireTokenByCodeAsync,e.correlationId),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(s=>{var c;return(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var c;throw(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!1},s),s}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenFromCache,e.correlationId),t){case Qt.Default:case Qt.AccessToken:case Qt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return B(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw U(yr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Qt.Default:case Qt.AccessTokenAndRefreshToken:case Qt.RefreshToken:case Qt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return B(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw U(yr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return B(t.acquireToken.bind(t),k.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return ip(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return mh(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return sM(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return cM(e,this.logger,this.browserStorage)}getAccountByUsername(e){return lM(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return uM(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return dM(e,this.logger,this.browserStorage)}setActiveAccount(e){hM(e,this.browserStorage)}getActiveAccount(){return fM(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=it.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(n),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw j(_a);return new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case lt.NONE:case lt.CONSENT:case lt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new OM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new PM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new BM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new $C(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new FM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new $M(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return LC(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(st.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(ne.ACTIVE_ACCOUNT_CHANGED);const n=e.newValue||e.oldValue;if(!n)return;const i=JSON.parse(n);if(typeof i!="object"||!it.isAccountEntity(i))return;const c=fi.toObject(new it,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_ADDED,void 0,c)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_REMOVED,void 0,c))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?Sr():P.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||np})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||np})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Rs(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw j(fC);n.add({accountType:Gn(i)});const s={clientId:this.config.auth.clientId,authority:e.authority||P.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:i.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},c=JSON.stringify(s),d=this.activeSilentTokenRequests.get(c);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=B(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(c),n.end({success:!0,fromCache:g.fromCache,isNativeBroker:g.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:g.accessToken.length,idTokenSize:g.idToken.length}),g)).catch(g=>{throw this.activeSilentTokenRequests.delete(c),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(c,f),{...await f,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const n=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(k.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",n);const i=await B(CM,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Qt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(KM(d,s))if(this.activeIframeRequest)if(s!==Qt.Skip){const[g,p]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${p}`,i.correlationId);const w=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);w.add({awaitIframeCorrelationId:p});const C=await g;if(w.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${p} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${p} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",i.correlationId),B(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(p=>{g=p}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),B(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(p=>(g(!0),p)).catch(p=>{throw g(!1),p}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",n)})}async acquireTokenSilentNoIframe(e,t){return Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,xe.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Qn&&Zo(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,U(yr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),B(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Qt.AccessToken)throw n;return this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_NETWORK_START,X.Silent,e),B(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function KM(r,e){const t=!(r instanceof Hn&&r.subError!==Nc),n=r.errorCode===en.INVALID_GRANT_ERROR||r.errorCode===yr,i=t&&n||r.errorCode===dc||r.errorCode===th,s=I0.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function zM(r,e){const t=new vo(r);return await t.initialize(),Uc.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ch{static async createPublicClientApplication(e){const t=await zM(e);return new Ch(e,t)}constructor(e,t){this.controller=t||new Uc(new vo(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Du=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",WM=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",qM=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",GM=process.env.JPLAN_WEBAPP__URL_BASE??"",WC={auth:{clientId:WM,authority:`https://${Du}.b2clogin.com/${Du}.onmicrosoft.com/${qM}`,knownAuthorities:[`${Du}.b2clogin.com`],redirectUri:`${GM}`},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===Me.Error&&console.error(e)},logLevel:Me.Warning}}};function jM(r){return{scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:"/_/dashboard",extraQueryParameters:r}}console.log(WC);const Mn=new Ch(WC),up=u.ref(null);function qC(){async function r(e){var t;if(e)try{const n=e.idTokenClaims;if(!(n!=null&&n.aud))throw new Error("User audience (aud) is missing in ID token claims");const i=localStorage.getItem(`msal.token.keys.${n.aud}`);if(!i)throw new Error(`Token keys para ${n.aud} não encontrados no localStorage`);const s=JSON.parse(i),c=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!c)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(c);if(!d)throw new Error(`Dados do token para ID ${c} não encontrados no localStorage`);const f=JSON.parse(d),g=f==null?void 0:f.secret;if(!g)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),up.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:up,setJToken:r}}const Ko=u.ref(null);function GC(){const{setJToken:r}=qC(),e=u.computed(()=>!!Ko.value),t=u.computed(()=>Ko.value),n=d=>{sessionStorage.setItem("redirectPath",d)},i=async d=>{try{await Mn.initialize();const f=await Mn.handleRedirectPromise();d&&!d.startsWith("/_/dashboard")&&n(d);const g=Mn.getActiveAccount();f&&(Mn.setActiveAccount(f.account),await r(g),Ko.value=g),Ko.value||await s()}catch(f){console.error("Erro no handleRedirect:",f)}};async function s(){const d=await Mn.handleRedirectPromise();if(!d||Mn.getAllAccounts().length===0){await Mn.initialize();const f=jM();await Mn.loginRedirect(f);return}Mn.setActiveAccount(d.account)}async function c(){try{const d=await Mn.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Mn.setActiveAccount(d.account),await r(Ko.value)}catch(d){console.error("Falha ao renovar token, forçando novo login.",d),await s()}}return u.watch(Ko,async(d,f)=>{var p,w,C;if(((p=d==null?void 0:d.idTokenClaims)==null?void 0:p.exp)===((w=f==null?void 0:f.idTokenClaims)==null?void 0:w.exp))return;const g=(C=d==null?void 0:d.idTokenClaims)==null?void 0:C.exp;if(g){const S=Math.floor(Date.now()/1e3),b=(g-S-120)*1e3;b>0&&setTimeout(async()=>{await c()},b)}}),{isAuthenticated:e,account:t,handleRedirect:i}}function jC(r,e){return function(){return r.apply(e,arguments)}}const{toString:YM}=Object.prototype,{getPrototypeOf:wh}=Object,Bc=(r=>e=>{const t=YM.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),$n=r=>(r=r.toLowerCase(),e=>Bc(e)===r),Fc=r=>e=>typeof e===r,{isArray:yi}=Array,fa=Fc("undefined");function JM(r){return r!==null&&!fa(r)&&r.constructor!==null&&!fa(r.constructor)&&an(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const YC=$n("ArrayBuffer");function QM(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&YC(r.buffer),e}const XM=Fc("string"),an=Fc("function"),JC=Fc("number"),Hc=r=>r!==null&&typeof r=="object",ZM=r=>r===!0||r===!1,Ws=r=>{if(Bc(r)!=="object")return!1;const e=wh(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},e1=$n("Date"),t1=$n("File"),n1=$n("Blob"),r1=$n("FileList"),o1=r=>Hc(r)&&an(r.pipe),i1=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||an(r.append)&&((e=Bc(r))==="formdata"||e==="object"&&an(r.toString)&&r.toString()==="[object FormData]"))},a1=$n("URLSearchParams"),[s1,c1,l1,u1]=["ReadableStream","Request","Response","Headers"].map($n),d1=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ea(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),yi(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),c=s.length;let d;for(n=0;n<c;n++)d=s[n],e.call(null,r[d],d,r)}}function QC(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,XC=r=>!fa(r)&&r!==ho;function _d(){const{caseless:r}=XC(this)&&this||{},e={},t=(n,i)=>{const s=r&&QC(e,i)||i;Ws(e[s])&&Ws(n)?e[s]=_d(e[s],n):Ws(n)?e[s]=_d({},n):yi(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Ea(arguments[n],t);return e}const h1=(r,e,t,{allOwnKeys:n}={})=>(Ea(e,(i,s)=>{t&&an(i)?r[s]=jC(i,t):r[s]=i},{allOwnKeys:n}),r),f1=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),g1=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},m1=(r,e,t,n)=>{let i,s,c;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)c=i[s],(!n||n(c,r,e))&&!d[c]&&(e[c]=r[c],d[c]=!0);r=t!==!1&&wh(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},p1=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},v1=r=>{if(!r)return null;if(yi(r))return r;let e=r.length;if(!JC(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},y1=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&wh(Uint8Array)),C1=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},w1=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},_1=$n("HTMLFormElement"),T1=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),dp=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),E1=$n("RegExp"),ZC=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};Ea(t,(i,s)=>{let c;(c=e(i,s,r))!==!1&&(n[s]=c||i)}),Object.defineProperties(r,n)},S1=r=>{ZC(r,(e,t)=>{if(an(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(an(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},A1=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return yi(r)?n(r):n(String(r).split(e)),t},I1=()=>{},b1=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,xu="abcdefghijklmnopqrstuvwxyz",hp="0123456789",ew={DIGIT:hp,ALPHA:xu,ALPHA_DIGIT:xu+xu.toUpperCase()+hp},k1=(r=16,e=ew.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function R1(r){return!!(r&&an(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const O1=r=>{const e=new Array(10),t=(n,i)=>{if(Hc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=yi(n)?[]:{};return Ea(n,(c,d)=>{const f=t(c,i+1);!fa(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},N1=$n("AsyncFunction"),P1=r=>r&&(Hc(r)||an(r))&&an(r.then)&&an(r.catch),tw=((r,e)=>r?setImmediate:e?((t,n)=>(ho.addEventListener("message",({source:i,data:s})=>{i===ho&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ho.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",an(ho.postMessage)),M1=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||tw,O={isArray:yi,isArrayBuffer:YC,isBuffer:JM,isFormData:i1,isArrayBufferView:QM,isString:XM,isNumber:JC,isBoolean:ZM,isObject:Hc,isPlainObject:Ws,isReadableStream:s1,isRequest:c1,isResponse:l1,isHeaders:u1,isUndefined:fa,isDate:e1,isFile:t1,isBlob:n1,isRegExp:E1,isFunction:an,isStream:o1,isURLSearchParams:a1,isTypedArray:y1,isFileList:r1,forEach:Ea,merge:_d,extend:h1,trim:d1,stripBOM:f1,inherits:g1,toFlatObject:m1,kindOf:Bc,kindOfTest:$n,endsWith:p1,toArray:v1,forEachEntry:C1,matchAll:w1,isHTMLForm:_1,hasOwnProperty:dp,hasOwnProp:dp,reduceDescriptors:ZC,freezeMethods:S1,toObjectSet:A1,toCamelCase:T1,noop:I1,toFiniteNumber:b1,findKey:QC,global:ho,isContextDefined:XC,ALPHABET:ew,generateString:k1,isSpecCompliantForm:R1,toJSONObject:O1,isAsyncFn:N1,isThenable:P1,setImmediate:tw,asap:M1};function ue(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}O.inherits(ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const nw=ue.prototype,rw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{rw[r]={value:r}});Object.defineProperties(ue,rw);Object.defineProperty(nw,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const c=Object.create(nw);return O.toFlatObject(r,c,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(c,r.message,e,t,n,i),c.cause=r,c.name=r.name,s&&Object.assign(c,s),c};const D1=null;function Td(r){return O.isPlainObject(r)||O.isArray(r)}function ow(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function fp(r,e,t){return r?r.concat(e).map(function(i,s){return i=ow(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function x1(r){return O.isArray(r)&&!r.some(Td)}const L1=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function Vc(r,e,t){if(!O.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,N){return!O.isUndefined(N[b])});const n=t.metaTokens,i=t.visitor||p,s=t.dots,c=t.indexes,f=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function g(T){if(T===null)return"";if(O.isDate(T))return T.toISOString();if(!f&&O.isBlob(T))throw new ue("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(T)||O.isTypedArray(T)?f&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function p(T,b,N){let K=T;if(T&&!N&&typeof T=="object"){if(O.endsWith(b,"{}"))b=n?b:b.slice(0,-2),T=JSON.stringify(T);else if(O.isArray(T)&&x1(T)||(O.isFileList(T)||O.endsWith(b,"[]"))&&(K=O.toArray(T)))return b=ow(b),K.forEach(function(V,z){!(O.isUndefined(V)||V===null)&&e.append(c===!0?fp([b],z,s):c===null?b:b+"[]",g(V))}),!1}return Td(T)?!0:(e.append(fp(N,b,s),g(T)),!1)}const w=[],C=Object.assign(L1,{defaultVisitor:p,convertValue:g,isVisitable:Td});function S(T,b){if(!O.isUndefined(T)){if(w.indexOf(T)!==-1)throw Error("Circular reference detected in "+b.join("."));w.push(T),O.forEach(T,function(K,H){(!(O.isUndefined(K)||K===null)&&i.call(e,K,O.isString(H)?H.trim():H,b,C))===!0&&S(K,b?b.concat(H):[H])}),w.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return S(r),e}function gp(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function _h(r,e){this._pairs=[],r&&Vc(r,this,e)}const iw=_h.prototype;iw.append=function(e,t){this._pairs.push([e,t])};iw.toString=function(e){const t=e?function(n){return e.call(this,n,gp)}:gp;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function U1(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aw(r,e,t){if(!e)return r;const n=t&&t.encode||U1;O.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=O.isURLSearchParams(e)?e.toString():new _h(e,t).toString(n),s){const c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class mp{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(n){n!==null&&e(n)})}}const sw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},B1=typeof URLSearchParams<"u"?URLSearchParams:_h,F1=typeof FormData<"u"?FormData:null,H1=typeof Blob<"u"?Blob:null,V1={isBrowser:!0,classes:{URLSearchParams:B1,FormData:F1,Blob:H1},protocols:["http","https","file","blob","url","data"]},Th=typeof window<"u"&&typeof document<"u",Ed=typeof navigator=="object"&&navigator||void 0,$1=Th&&(!Ed||["ReactNative","NativeScript","NS"].indexOf(Ed.product)<0),K1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z1=Th&&window.location.href||"http://localhost",W1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Th,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:K1,navigator:Ed,origin:z1},Symbol.toStringTag,{value:"Module"})),At={...W1,...V1};function q1(r,e){return Vc(r,new At.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return At.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function G1(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function j1(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function cw(r){function e(t,n,i,s){let c=t[s++];if(c==="__proto__")return!0;const d=Number.isFinite(+c),f=s>=t.length;return c=!c&&O.isArray(i)?i.length:c,f?(O.hasOwnProp(i,c)?i[c]=[i[c],n]:i[c]=n,!d):((!i[c]||!O.isObject(i[c]))&&(i[c]=[]),e(t,n,i[c],s)&&O.isArray(i[c])&&(i[c]=j1(i[c])),!d)}if(O.isFormData(r)&&O.isFunction(r.entries)){const t={};return O.forEachEntry(r,(n,i)=>{e(G1(n),i,t,0)}),t}return null}function Y1(r,e,t){if(O.isString(r))try{return(e||JSON.parse)(r),O.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Sa={transitional:sw,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=O.isObject(e);if(s&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return i?JSON.stringify(cw(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)||O.isReadableStream(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return q1(e,this.formSerializer).toString();if((d=O.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Vc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),Y1(e)):e}],transformResponse:[function(e){const t=this.transitional||Sa.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(O.isResponse(e)||O.isReadableStream(e))return e;if(e&&O.isString(e)&&(n&&!this.responseType||i)){const c=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(c)throw d.name==="SyntaxError"?ue.from(d,ue.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],r=>{Sa.headers[r]={}});const J1=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Q1=r=>{const e={};let t,n,i;return r&&r.split(`
56
+ ${c}`);return}throw Qm(e.error,e.error_description,e.suberror)?new Hn(e.error,e.error_description,e.suberror,e.timestamp||P.EMPTY_STRING,e.trace_id||P.EMPTY_STRING,e.correlation_id||P.EMPTY_STRING,e.claims||P.EMPTY_STRING,s):c}}async handleServerTokenResponse(e,t,n,i,s,c,d,f,g){var T;(T=this.performanceClient)==null||T.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let p;if(e.id_token){if(p=Co(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&p.nonce!==s.nonce)throw U(fy);if(i.maxAge||i.maxAge===0){const b=p.auth_time;if(!b)throw U(Bd);Ay(b,i.maxAge)}}this.homeAccountIdentifier=it.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,p);let w;s&&s.state&&(w=Fn.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,p,c,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new u0(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const b=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(b,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await mo.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,p,w,void 0,g)}await this.cacheStorage.saveCacheRecord(C,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&S&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(S))}return mo.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,p,w,e,g)}generateCacheRecord(e,t,n,i,s,c,d){const f=t.getPreferredCache();if(!f)throw U(Hd);const g=Vy(s);let p,w;e.id_token&&s&&(p=Ic(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),w=nh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,s,e.client_info,f,g,d,void 0,this.logger));let C=null;if(e.access_token){const b=e.scope?Ye.fromString(e.scope):new Ye(i.scopes||[]),N=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,K=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,H=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,V=n+N,z=V+K,Q=H&&H>0?n+H:void 0;C=bc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",b.printScopes(),V,z,this.cryptoObj.base64Decode,Q,e.token_type,c,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let b;if(e.refresh_token_expires_in){const N=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;b=n+N}S=Iy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,c,b)}let T=null;return e.foci&&(T={clientId:this.clientId,environment:f,familyId:e.foci}),{account:w,idToken:p,accessToken:C,refreshToken:S,appMetadata:T}}static async generateAuthenticationResult(e,t,n,i,s,c,d,f,g){var V,z,Q,we,W;let p=P.EMPTY_STRING,w=[],C=null,S,T,b=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Re.POP&&!s.popKid){const et=new gi(e),{secret:_e,keyId:Y}=n.accessToken;if(!Y)throw U(Vd);p=await et.signPopToken(_e,Y,s)}else p=n.accessToken.secret;w=Ye.fromString(n.accessToken.target).asArray(),C=new Date(Number(n.accessToken.expiresOn)*1e3),S=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(T=new Date(Number(n.accessToken.refreshOn)*1e3))}n.appMetadata&&(b=n.appMetadata.familyId===ia?ia:"");const N=(c==null?void 0:c.oid)||(c==null?void 0:c.sub)||"",K=(c==null?void 0:c.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const H=n.account?Jd(n.account.getAccountInfo(),void 0,c,(V=n.idToken)==null?void 0:V.secret):null;return{authority:t.canonicalAuthority,uniqueId:N,tenantId:K,scopes:w,account:H,idToken:((z=n==null?void 0:n.idToken)==null?void 0:z.secret)||"",idTokenClaims:c||{},accessToken:p,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:T,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:b,tokenType:((Q=n.accessToken)==null?void 0:Q.tokenType)||P.EMPTY_STRING,state:d?d.userRequestState:P.EMPTY_STRING,cloudGraphHostName:((we=n.account)==null?void 0:we.cloudGraphHostName)||P.EMPTY_STRING,msGraphHost:((W=n.account)==null?void 0:W.msGraphHost)||P.EMPTY_STRING,code:f==null?void 0:f.spa_code,fromNativeBroker:!1}}}function nh(r,e,t,n,i,s,c,d,f,g,p){p==null||p.verbose("setCachedAccount called");const C=r.getAccountKeys().find(K=>K.startsWith(t));let S=null;C&&(S=r.getAccount(C,p));const T=S||it.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:c,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),b=T.tenantProfiles||[],N=d||T.realm;if(N&&!b.find(K=>K.tenantId===N)){const K=Yd(t,T.localAccountId,N,i);b.push(K)}return T.tenantProfiles=b,T}/*! @azure/msal-common v14.16.0 2024-11-05 */async function Qy(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class Xy extends eh{constructor(e,t){var n;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async getAuthCodeUrl(e){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.GetAuthCodeUrl,e.correlationId);const t=await B(this.createAuthCodeUrlQueryString.bind(this),k.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ye.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,f;if((d=this.performanceClient)==null||d.addQueueMeasurement(k.AuthClientAcquireToken,e.correlationId),!e.code)throw U(py);const n=or(),i=await B(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Ot.X_MS_REQUEST_ID],c=new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return c.validateTokenResponse(i.body),B(c.handleServerTokenResponse.bind(c),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,t,void 0,void 0,void 0,s)}handleFragmentResponse(e,t){if(new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw U(_y);return e}getLogoutUri(e){if(!e)throw Ne(My);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,p;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await B(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let c;if(t.clientInfo)try{const w=sc(t.clientInfo,this.cryptoUtils.base64Decode);c={credential:`${w.uid}${St.CLIENT_INFO_SEPARATOR}${w.utid}`,type:on.HOME_ACCOUNT_ID}}catch(w){this.logger.verbose("Could not parse client info for CCS Header: "+w)}const d=this.createTokenRequestHeaders(c||t.ccsCredential),f={clientId:((p=t.tokenBodyParameters)==null?void 0:p.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return B(this.executePostToTokenEndpoint.bind(this),k.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(i,s,d,f,t.correlationId,k.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthClientCreateTokenRequestBody,e.correlationId);const t=new sa(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[go])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Qo.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!ld(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const c=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Qy(c.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(c.assertionType)}if(t.addGrantType(iy.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Re.POP){const c=new gi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await B(c.generateCnf.bind(c),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Re.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Ne(kc);(!Bn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{const c=sc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${c.uid}${St.CLIENT_INFO_SEPARATOR}${c.utid}`,type:on.HOME_ACCOUNT_ID}}catch(c){this.logger.verbose("Could not parse client info for CCS Header: "+c)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case on.HOME_ACCOUNT_ID:try{const c=ii(n.credential);t.addCcsOid(c)}catch(c){this.logger.verbose("Could not parse home account ID for CCS Header: "+c)}break;case on.UPN:t.addCcsUpn(n.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[jm])&&t.addExtraQueryParameters({[jm]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,c;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new sa(t,this.performanceClient);n.addClientId(e.embeddedClientId||((c=e.extraQueryParameters)==null?void 0:c[go])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];if(n.addScopes(i,!0,this.oidcDefaultScopes),n.addRedirectUri(e.redirectUri),n.addCorrelationId(t),n.addResponseMode(e.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),ld(this.config)||n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&n.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&n.addPrompt(e.prompt),e.domainHint&&n.addDomainHint(e.domainHint),e.prompt!==lt.SELECT_ACCOUNT)if(e.sid&&e.prompt===lt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let f=this.extractLoginHint(e.account);if(f&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),f=null),f){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(f);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===lt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(d);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(e.account.username);try{const g=ii(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&n.addNonce(e.nonce),e.state&&n.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,n),e.nativeBroker&&(n.addNativeBroker(),e.authenticationScheme===Re.POP)){const d=new gi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await B(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}return n.createQueryString()}createLogoutUrlQueryString(e){const t=new sa(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const h0=300;class hd extends eh{constructor(e,t){super(e,t)}async acquireToken(e){var c,d;(c=this.performanceClient)==null||c.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=or(),n=await B(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Ot.X_MS_REQUEST_ID],s=new mo(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),B(s.handleServerTokenResponse.bind(s),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){var n;if(!e)throw Ne(Py);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw U(Fd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Hn&&i.errorCode===dc,c=i instanceof qr&&i.errorCode===Dm.INVALID_GRANT_ERROR&&i.subError===Dm.CLIENT_MISMATCH_ERROR;if(s||c)return B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return B(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const n=wo(this.cacheManager.getRefreshToken.bind(this.cacheManager),k.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!n)throw dd(dc);if(n.expiresOn&&cd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||h0))throw dd(th);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Re.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}};try{return await B(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(c){if(c instanceof Hn&&c.subError===Nc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=oi(n);this.cacheManager.removeRefreshToken(d)}throw c}}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(k.RefreshTokenClientExecuteTokenRequest,e.correlationId);const n=this.createTokenQueryParameters(e),i=ye.appendQueryString(t.tokenEndpoint,n),s=await B(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),c=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((g=e.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return B(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,c,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,c;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new sa(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[go])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(c=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:c.defaultScopes),n.addGrantType(iy.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!ld(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;n.addClientAssertion(await Qy(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Re.POP){const d=new gi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await B(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Re.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Ne(kc);if((!Bn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case on.HOME_ACCOUNT_ID:try{const d=ii(e.ccsCredential.credential);n.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case on.UPN:n.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),n.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class f0 extends eh{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[n,i]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...pi]});return i===Ur.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new hd(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Ac&&n.errorCode===yr)return new hd(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw n}}async acquireCachedToken(e){var f;(f=this.performanceClient)==null||f.addQueueMeasurement(k.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Ur.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bn.isEmptyObj(e.claims))throw this.setCacheOutcome(Ur.FORCE_REFRESH_OR_CLAIMS,e.correlationId),U(yr);if(!e.account)throw U(Fd);const n=e.account.tenantId||n0(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if($N(s.cachedAt)||cd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Ur.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),U(yr);s.refreshOn&&cd(s.refreshOn,0)&&(t=Ur.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Ur.NO_CACHED_ACCESS_TOKEN,e.correlationId),U(yr);const c=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await B(this.generateResultFromCacheRecord.bind(this),k.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var n,i;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},t),e!==Ur.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let n;if(e.idToken&&(n=Co(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw U(Bd);Ay(s,t.maxAge)}return mo.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const g0={sendGetRequestAsync:()=>Promise.reject(U(ge)),sendPostRequestAsync:()=>Promise.reject(U(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const Xm=",",Zy="|";function m0(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,c=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(Xm),d.length<4)return e}else d=Array.from({length:4},()=>Zy);return c.forEach((f,g)=>{var p,w;f.length===2&&((p=f[0])!=null&&p.length)&&((w=f[1])!=null&&w.length)&&p0({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(Xm)}function p0(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(Zy))}class da{constructor(e,t){this.cacheOutcome=Ur.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||P.EMPTY_STRING,this.wrapperVer=e.wrapperVer||P.EMPTY_STRING,this.telemetryCacheKey=gt.CACHE_KEY+St.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${gt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&t.push(`broker_error=${n}`);const i=t.join(gt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),c=[e,s].join(gt.VALUE_SEPARATOR);return[gt.SCHEMA_VERSION,c,i].join(gt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=da.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(gt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(gt.VALUE_SEPARATOR),s=e.errors.length,c=t<s?gt.OVERFLOW_TRUE:gt.OVERFLOW_FALSE,d=[s,c].join(gt.VALUE_SEPARATOR);return[gt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(gt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=gt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Fe?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(gt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=da.maxErrorsToSend(e),n=e.errors.length;if(t===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{const i={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}}static maxErrorsToSend(e){let t,n=0,i=0;const s=e.errors.length;for(t=0;t<s;t++){const c=e.failedRequests[2*t]||P.EMPTY_STRING,d=e.failedRequests[2*t+1]||P.EMPTY_STRING,f=e.errors[t]||P.EMPTY_STRING;if(i+=c.toString().length+d.toString().length+f.length+3,i<gt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||P.EMPTY_STRING),e.push(this.regionSource||P.EMPTY_STRING),e.push(this.regionOutcome||P.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return m0(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const eC="missing_kid_error",tC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const v0={[eC]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[tC]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class rh extends Fe{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,rh.prototype)}}function Zm(r){return new rh(r,v0[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class oh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Zm(eC);if(!e.alg)throw Zm(tC);const t=new oh({typ:e.typ||IN.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class ep{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class y0{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:t0.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new ep}}startPerformanceMeasurement(){return new ep}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ih="pkce_not_created",fd="crypto_nonexistent",Pc="empty_navigate_uri",nC="hash_empty_error",ah="no_state_in_hash",rC="hash_does_not_contain_known_properties",oC="unable_to_parse_state",iC="state_interaction_type_mismatch",aC="interaction_in_progress",sC="popup_window_error",cC="empty_window_error",po="user_cancelled",C0="monitor_popup_timeout",lC="monitor_window_timeout",uC="redirect_in_iframe",dC="block_iframe_reload",hC="block_nested_popups",w0="iframe_closed_prematurely",Mc="silent_logout_unsupported",fC="no_account_error",_0="silent_prompt_value_error",gC="no_token_request_cache_error",mC="unable_to_parse_token_request_cache_error",sh="no_cached_authority_error",T0="auth_request_not_set_error",E0="invalid_cache_type",Dc="non_browser_environment",Xo="database_not_open",hc="no_network_connectivity",pC="post_request_failed",vC="get_request_failed",gd="failed_to_parse_response",yC="unable_to_load_token",ch="crypto_key_not_found",CC="auth_code_required",wC="auth_code_or_nativeAccountId_required",_C="spa_code_and_nativeAccountId_present",lh="database_unavailable",TC="unable_to_acquire_token_from_native_platform",EC="native_handshake_timeout",SC="native_extension_not_installed",_a="native_connection_not_established",AC="uninitialized_public_client_application",IC="native_prompt_not_supported",bC="invalid_base64_string",kC="invalid_pop_token_request",RC="failed_to_build_headers",OC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const pr="For more visit: aka.ms/msaljs/browser-errors",S0={[ih]:"The PKCE code challenge and verifier could not be generated.",[fd]:"The crypto object or function is not available.",[Pc]:"Navigation URI is empty. Please check stack trace for more info.",[nC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${pr}`,[ah]:"Hash does not contain state. Please verify that the request originated from msal.",[rC]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${pr}`,[oC]:"Unable to parse state. Please verify that the request originated from msal.",[iC]:"Hash contains state but the interaction type does not match the caller.",[aC]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${pr}`,[sC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[cC]:"window.open returned null or undefined window object.",[po]:"User cancelled the flow.",[C0]:`Token acquisition in popup failed due to timeout. ${pr}`,[lC]:`Token acquisition in iframe failed due to timeout. ${pr}`,[uC]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[dC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${pr}`,[hC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[w0]:"The iframe being monitored was closed prematurely.",[Mc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[fC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[_0]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[gC]:"No token request found in cache.",[mC]:"The cached token request could not be parsed.",[sh]:"No cached authority found.",[T0]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[E0]:"Invalid cache type",[Dc]:"Login and token requests are not supported in non-browser environments.",[Xo]:"Database is not open!",[hc]:"No network connectivity. Check your internet connection.",[pC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[vC]:"Network request failed. Please check the network trace to determine root cause.",[gd]:"Failed to parse network response. Check network trace.",[yC]:"Error loading token to cache.",[ch]:"Cryptographic Key or Keypair not found in browser storage.",[CC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[wC]:"An authorization code or nativeAccountId must be provided to this flow.",[_C]:"Request cannot contain both spa code and native account id.",[lh]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[TC]:`Unable to acquire token from native platform. ${pr}`,[EC]:"Timed out while attempting to establish connection to browser extension",[SC]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[_a]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${pr}`,[AC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${pr}`,[IC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[bC]:"Invalid base64 encoded string.",[kC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[RC]:"Failed to build request headers object.",[OC]:"Failed to parse response headers"};class Ta extends Fe{constructor(e,t){super(e,S0[e],t),Object.setPrototypeOf(this,Ta.prototype),this.name="BrowserAuthError"}}function j(r,e){return new Ta(r,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const en={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},ai={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},uo={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ft={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},tp={GET:"GET",POST:"POST"},be={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},xr={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},bs={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},xe={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var X;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(X||(X={}));const np={scopes:pi},NC="jwk",md="msal.db",A0=1,I0=`${md}.keys`,Qt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},b0=[Qt.Default,Qt.Skip,Qt.RefreshTokenAndNetwork],k0="msal.browser.log.level",R0="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function ks(r){return encodeURIComponent(uh(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function xc(r){return PC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uh(r){return PC(new TextEncoder().encode(r))}function PC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const O0="RSASSA-PKCS1-v1_5",MC="SHA-256",N0=2048,P0=new Uint8Array([1,0,1]),rp="0123456789abcdef",op=new Uint32Array(1),M0="crypto_subtle_undefined",dh={name:O0,hash:MC,modulusLength:N0,publicExponent:P0};function D0(r){if(!window)throw j(Dc);if(!window.crypto)throw j(fd);if(!r&&!window.crypto.subtle)throw j(fd,M0)}async function DC(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(MC,i)}function x0(r){return window.crypto.getRandomValues(r)}function Pu(){return window.crypto.getRandomValues(op),op[0]}function Sr(){const r=Date.now(),e=Pu()*1024+(Pu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Pu();t[0]=r/2**40,t[1]=r/2**32,t[2]=r/2**24,t[3]=r/2**16,t[4]=r/2**8,t[5]=r,t[6]=112|n>>>8,t[7]=n,t[8]=128|i>>>24,t[9]=i>>>16,t[10]=i>>>8,t[11]=i,t[12]=s>>>24,t[13]=s>>>16,t[14]=s>>>8,t[15]=s;let c="";for(let d=0;d<t.length;d++)c+=rp.charAt(t[d]>>>4),c+=rp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(c+="-");return c}async function L0(r,e){return window.crypto.subtle.generateKey(dh,r,e)}async function Mu(r){return window.crypto.subtle.exportKey(NC,r)}async function U0(r,e,t){return window.crypto.subtle.importKey(NC,r,dh,e,t)}async function B0(r,e){return window.crypto.subtle.sign(dh,r,e)}async function xC(r){const e=await DC(r),t=new Uint8Array(e);return xc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ha="storage_not_supported",pd="stubbed_public_client_application_called",fc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const zs={[ha]:"Given storage configuration option was not supported.",[pd]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[fc]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};zs[ha],zs[pd],zs[fc];class hh extends Fe{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,hh.prototype)}}function fh(r){return new hh(r,zs[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function F0(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function H0(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function gh(){return window.parent!==window}function V0(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${en.POPUP_NAME_PREFIX}.`)===0}function Cr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function $0(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function K0(){if(ye.hashContainsKnownProperties(window.location.hash)&&gh())throw j(dC)}function z0(r){if(gh()&&!r)throw j(uC)}function W0(){if(V0())throw j(hC)}function LC(){if(typeof window>"u")throw j(Dc)}function UC(r){if(!r)throw j(AC)}function mh(r){LC(),K0(),W0(),UC(r)}function ip(r,e){if(mh(r),z0(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ft.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw fh(fc)}function BC(r){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(r).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function q0(){return Sr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class gc{navigateInternal(e,t){return gc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return gc.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(n=>{setTimeout(()=>{n(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class G0{async sendGetRequestAsync(e,t){let n,i={},s=0;const c=ap(t);try{n=await fetch(e,{method:tp.GET,headers:c})}catch{throw j(window.navigator.onLine?vC:hc)}i=sp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw Ym(j(gd),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=ap(t);let s,c=0,d={};try{s=await fetch(e,{method:tp.POST,headers:i,body:n})}catch{throw j(window.navigator.onLine?pC:hc)}d=sp(s.headers);try{return c=s.status,{headers:d,body:await s.json(),status:c}}catch{throw Ym(j(gd),c,d)}}}function ap(r){try{const e=new Headers;if(!(r&&r.headers))return e;const t=r.headers;return Object.entries(t).forEach(([n,i])=>{e.append(n,i)}),e}catch{throw j(RC)}}function sp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw j(OC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const j0=6e4,vd=1e4,Y0=3e4,J0=2e3;function Q0({auth:r,cache:e,system:t,telemetry:n},i){const s={clientId:P.EMPTY_STRING,authority:`${P.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:P.EMPTY_STRING,authorityMetadata:P.EMPTY_STRING,redirectUri:typeof window<"u"?Cr():"",postLogoutRedirectUri:P.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Tr.AAD,OIDCOptions:{serverResponseType:wa.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Kd.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},c={cacheLocation:Ft.SessionStorage,temporaryCacheLocation:Ft.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ft.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:Me.Info,piiLoggingEnabled:!1},g={...{...qy,loggerOptions:d,networkClient:i?new G0:g0,navigationClient:new gc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||j0,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||vd,navigateFrameWait:0,redirectNavigationTimeout:Y0,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||J0,pollIntervalMilliseconds:en.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},p={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new y0};if((r==null?void 0:r.protocolMode)!==Tr.OIDC&&(r!=null&&r.OIDCOptions)&&new Wr(g.loggerOptions).warning(JSON.stringify(Ne(By))),r!=null&&r.protocolMode&&r.protocolMode!==Tr.AAD&&(g!=null&&g.allowNativeBroker))throw Ne(Fy);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...c,...e},system:g,telemetry:{...p,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const X0="@azure/msal-browser",Lc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class ph{static loggerCallback(e,t){switch(e){case Me.Error:console.error(t);return;case Me.Info:console.info(t);return;case Me.Verbose:console.debug(t);return;case Me.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=Q0(e,this.browserEnvironment);let t;try{t=window[Ft.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(k0),i=(f=t==null?void 0:t.getItem(R0))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,c={...this.config.system.loggerOptions},d=n&&Object.keys(Me).includes(n)?Me[n]:void 0;d&&(c.loggerCallback=ph.loggerCallback,c.logLevel=d),s!==void 0&&(c.piiLoggingEnabled=s),this.logger=new Wr(c,X0,Lc),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class vo extends ph{getModuleName(){return vo.MODULE_NAME}getId(){return vo.ID}async initialize(){return this.available=typeof window<"u",this.available}}vo.MODULE_NAME="";vo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function nr(r){return new TextDecoder().decode(Z0(r))}function Z0(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw j(bC)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class eM{constructor(){this.dbName=md,this.version=A0,this.tableName=I0,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",i=>{i.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",i=>{const s=i;this.db=s.target.result,this.dbOpen=!0,e()}),n.addEventListener("error",()=>t(j(lh)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);c.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((n,i)=>{if(!this.db)return i(j(Xo));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),n()}),d.addEventListener("error",f=>{this.closeConnection(),i(f)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);c.addEventListener("success",()=>{this.closeConnection(),t()}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(j(Xo));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();s.addEventListener("success",c=>{const d=c;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",c=>{this.closeConnection(),t(c)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);c.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),c.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const n=window.indexedDB.deleteDatabase(md),i=setTimeout(()=>t(!1),200);n.addEventListener("success",()=>(clearTimeout(i),e(!0))),n.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),n.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yd{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,n)=>{e.push(n)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tM{constructor(e){this.inMemoryCache=new yd,this.indexedDBCache=new eM,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Ta&&e.errorCode===lh)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(n){this.handleDatabaseAccessError(n)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(n){this.handleDatabaseAccessError(n)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mi{constructor(e,t,n){this.logger=e,D0(n??!1),this.cache=new tM(this.logger),this.performanceClient=t}createNewGuid(){return Sr()}base64Encode(e){return uh(e)}base64Decode(e){return nr(e)}base64UrlEncode(e){return ks(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var p;const t=(p=this.performanceClient)==null?void 0:p.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await L0(mi.EXTRACTABLE,mi.POP_KEY_USAGES),i=await Mu(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},c=cp(s),d=await this.hashString(c),f=await Mu(n.privateKey),g=await U0(f,!1,["sign"]);return await this.cache.setItem(d,{privateKey:g,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,n,i){var V;const s=(V=this.performanceClient)==null?void 0:V.startMeasurement(k.CryptoOptsSignJwt,i),c=await this.cache.getItem(t);if(!c)throw j(ch);const d=await Mu(c.publicKey),f=cp(d),g=ks(JSON.stringify({kid:t})),p=oh.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),w=ks(p);e.cnf={jwk:JSON.parse(f)};const C=ks(JSON.stringify(e)),S=`${w}.${C}`,b=new TextEncoder().encode(S),N=await B0(c.privateKey,b),K=xc(new Uint8Array(N)),H=`${S}.${K}`;return s&&s.end({success:!0}),H}async hashString(e){return xC(e)}}mi.POP_KEY_USAGES=["sign","verify"];mi.EXTRACTABLE=!0;function cp(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class nM{constructor(){if(!window.localStorage)throw fh(ha)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class rM{constructor(){if(!window.sessionStorage)throw fh(ha)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function FC(r,e){if(!e)return null;try{return Fn.parseRequestState(r,e).libraryState.meta}catch{throw U(hi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const oM=24*60*60*1e3;class iM{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[c,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(c===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const c=aM(n);s+=`expires=${c};`}i&&(s+="Secure;"),document.cookie=s}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(n=>{const i=decodeURIComponent(n).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function aM(r){const e=new Date;return new Date(e.getTime()+r*oM).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Cd extends fi{constructor(e,t,n,i,s,c){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new yd,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new iM,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=c}setupBrowserStorage(e){try{switch(e){case Ft.LocalStorage:return new nM;case Ft.SessionStorage:return new rM;case Ft.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ft.MemoryStorage,new yd}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${st.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${st.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${st.ERROR}`,i=`${P.CACHE_PREFIX}.${st.ERROR_DESC}`,s=this.browserStorage.getItem(e),c=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,c,d,f];[st.ID_TOKEN,st.CLIENT_INFO,st.ERROR,st.ERROR_DESC].forEach((w,C)=>{const S=g[C];S&&this.setTemporaryCache(w,S,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(xr.ACCOUNT_KEYS),t=this.getItem(`${xr.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const c=this.validateAndParseJson(s);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case re.ID_TOKEN:if(Fm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case re.ACCESS_TOKEN:case re.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Bm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case re.REFRESH_TOKEN:if(Hm(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const d=c,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,re.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const c=this.validateAndParseJson(s);c&&it.isAccountEntity(c)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,n,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const n=this.validateAndParseJson(t);return!n||!it.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):fi.toObject(new it,n)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(xr.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(xr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(xr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,re.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,re.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,re.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${xr.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(t){case re.ID_TOKEN:n.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case re.ACCESS_TOKEN:n.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case re.REFRESH_TOKEN:n.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),U(sd)}this.setItem(`${xr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(t){case re.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=n.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case re.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=n.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case re.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const c=n.refreshToken.indexOf(e);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),U(sd)}this.setItem(`${xr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ID_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Fm(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ACCESS_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Bm(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.REFRESH_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Hm(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,re.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=oi(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,re.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!QN(e,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=JN(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!jN(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&XN(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(bs.WRAPPER_SKU,e),this.internalStorage.setItem(bs.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(bs.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(bs.WRAPPER_VER)||P.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(st.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(st.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const c=this.getAccountInfoFilteredBy({localAccountId:s});return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(c),c):null}const n=this.validateAndParseJson(t);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(st.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(st.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(i)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!YN(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const s=this.cookieStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),s}const i=this.temporaryCacheStorage.getItem(n);if(!i){if(this.cacheConfig.cacheLocation===Ft.LocalStorage){const s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),i}setTemporaryCache(e,t,n){const i=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(k.ClearTokensAndKeysWithClaims,t);const n=this.getTokenKeys(),i=[];n.accessToken.forEach(s=>{const c=this.getAccessTokenCredential(s);c!=null&&c.requestedClaimsHash&&s.includes(c.requestedClaimsHash.toLowerCase())&&i.push(this.removeAccessToken(s))}),await Promise.all(i),i.length>0&&this.logger.warning(`${i.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Bn.startsWith(e,P.CACHE_PREFIX)||Bn.startsWith(e,st.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Fn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${be.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;const i=this.generateAuthorityKey(n);return this.getTemporaryCache(i)}updateCacheEntries(e,t,n,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const c=this.generateStateKey(e);this.setTemporaryCache(c,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const f=this.generateAuthorityKey(e);if(this.setTemporaryCache(f,n,!1),s){const g={credential:s.homeAccountId,type:on.HOME_ACCOUNT_ID};this.setTemporaryCache(be.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:on.UPN};this.setTemporaryCache(be.CCS_CREDENTIAL,JSON.stringify(g),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(be.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(be.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(be.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(be.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(be.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(be.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n||P.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(be.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=FC(this.cryptoImpl,n);i&&i.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=uh(JSON.stringify(e));this.setTemporaryCache(be.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(be.REQUEST_PARAMS,!0);if(!t)throw j(gC);let n;try{n=JSON.parse(nr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),j(mC)}if(this.removeTemporaryItem(this.generateCacheKey(be.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw j(sh);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(be.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${P.CACHE_PREFIX}.${be.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${be.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw j(aC);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(st.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(st.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(st.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(st.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=Co(n,nr);if(i.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.preferred_username;if(i.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const n=oi(t);if(e!==n){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(n,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,f,g;const n=Ic((d=e.account)==null?void 0:d.homeAccountId,(f=e.account)==null?void 0:f.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const s=bc((g=e.account)==null?void 0:g.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,nr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),c={idToken:n,accessToken:s};return this.saveCacheRecord(c)}async saveCacheRecord(e,t,n){try{await super.saveCacheRecord(e,t,n)}catch(i){if(i instanceof ci&&this.performanceClient&&n)try{const s=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:s.refreshToken.length,cacheIdCount:s.idToken.length,cacheAtCount:s.accessToken.length},n)}catch{}throw i}}}const sM=(r,e)=>{const t={cacheLocation:Ft.MemoryStorage,temporaryCacheLocation:Ft.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Cd(r,t,ac,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function cM(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function lM(r,e,t){if(e.trace("getAccount called"),Object.keys(r).length===0)return e.warning("getAccount: No accountFilter provided"),null;const n=t.getAccountInfoFilteredBy(r);return n?(e.verbose("getAccount: Account matching provided filter found, returning"),n):(e.verbose("getAccount: No matching account found, returning null"),null)}function uM(r,e,t){if(e.trace("getAccountByUsername called"),!r)return e.warning("getAccountByUsername: No username provided"),null;const n=t.getAccountInfoFilteredBy({username:r});return n?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${r}`),n):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function dM(r,e,t){if(e.trace("getAccountByHomeId called"),!r)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=t.getAccountInfoFilteredBy({homeAccountId:r});return n?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${r}`),n):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function hM(r,e,t){if(e.trace("getAccountByLocalId called"),!r)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const n=t.getAccountInfoFilteredBy({localAccountId:r});return n?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${r}`),n):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function fM(r,e){e.setActiveAccount(r)}function gM(r){return r.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ne={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class mM{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Wr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||q0();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,n,i){if(typeof window<"u"){const s={eventType:e,interactionType:t||null,payload:n||null,error:i||null,timestamp:Date.now()};this.eventCallbacks.forEach(([c,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),c.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class HC{constructor(e,t,n,i,s,c,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=c,this.nativeMessageHandler=f,this.correlationId=g||Sr(),this.logger=i.clone(en.MSAL_SKU,Lc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){it.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(it.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ye.getAbsoluteUrl(t,Cr())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new da(n,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,n=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const i={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e.requestAuthority||this.config.auth.authority,c=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&c?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=Tt.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await B(Yy,k.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(f,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!g.isAlias(t.environment))throw Ne(Hy);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const pM=32;async function vM(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=wo(yM,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await B(CM,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function yM(r,e,t){try{const n=new Uint8Array(pM);return wo(x0,k.GetRandomValues,e,r,t)(n),xc(n)}catch{throw j(ih)}}async function CM(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await B(DC,k.Sha256Digest,t,e,n)(r,e,n);return xc(new Uint8Array(i))}catch{throw j(ih)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function vh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],c={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!c.authenticationScheme)c.authenticationScheme=Re.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(c.authenticationScheme===Re.SSH){if(!r.sshJwk)throw Ne(kc);if(!r.sshKid)throw Ne(Uy)}n.verbose(`Authentication Scheme set to "${c.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Bn.isEmptyObj(r.claims)&&(c.requestedClaimsHash=await xC(r.claims)),c}async function wM(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await B(vh,k.InitializeBaseRequest,i,n,r.correlationId)(r,t,n,i);return{...r,...s,account:e,forceRefresh:r.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class vi extends HC{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await B(vM,k.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...e,redirectUri:e.redirectUri,code:P.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=P.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||Sr(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(e.postLogoutRedirectUri,Cr())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Cr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(Cr(),Cr())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new Xy(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:c}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await B(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:c}),f=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:f.loggerCallback,piiLoggingEnabled:f.piiLoggingEnabled,logLevel:f.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:en.MSAL_SKU,version:Lc,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(e.redirectUri),i={interactionType:t},s=Fn.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await B(vh,k.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:n,state:s,nonce:e.nonce||Sr(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const f=e.account||this.browserStorage.getActiveAccount();if(f&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${f.homeAccountId}`,this.correlationId),d.account=f),!d.loginHint&&!f){const g=this.browserStorage.getLegacyLoginHint();g&&(d.loginHint=g)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const _M="ContentError",VC="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const TM="USER_INTERACTION_REQUIRED",EM="USER_CANCEL",SM="NO_NETWORK",AM="PERSISTENT_ERROR",IM="DISABLED",bM="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const kM=-2147186943,RM={[VC]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Qn extends Fe{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Qn.prototype),this.name="NativeAuthError",this.ext=n}}function Zo(r){if(r.ext&&r.ext.status&&(r.ext.status===AM||r.ext.status===IM)||r.ext&&r.ext.error&&r.ext.error===kM)return!0;switch(r.errorCode){case _M:return!0;default:return!1}}function wd(r,e,t){if(t&&t.status)switch(t.status){case bM:return dd(Jy);case TM:return new Hn(r,e);case EM:return j(po);case SM:return j(hc)}return new Qn(r,RM[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class $C extends vi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(xe.acquireTokenSilent_silentFlow),n=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new f0(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const c=(await B(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),c}catch(s){throw s instanceof Ta&&s.errorCode===ch&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),s}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class li extends HC{constructor(e,t,n,i,s,c,d,f,g,p,w,C){var T;super(e,t,n,i,s,c,f,g,C),this.apiId=d,this.accountId=p,this.nativeMessageHandler=g,this.nativeStorageManager=w,this.silentCacheClient=new $C(e,this.nativeStorageManager,n,i,s,c,f,g,C),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const S=this.nativeMessageHandler.getExtensionId()===ai.PREFERRED_EXTENSION_ID?"chrome":(T=this.nativeMessageHandler.getExtensionId())!=null&&T.length?"unknown":void 0;this.skus=da.makeExtraSkuString({libraryName:en.MSAL_SKU,libraryVersion:Lc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[JP]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),n=or();try{const i=await this.initializeNativeRequest(e);try{const g=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),g}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...s}=i,c={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(c),f=this.validateNativeResponse(d);return await this.handleNativeResponse(f,i,n).then(g=>(t.end({success:!0,isNativeBroker:!0,requestId:g.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),g)).catch(g=>{throw t.end({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})}catch(i){throw i instanceof Qn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Ye.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),U(id);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw U(id);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),c={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:c}}catch(i){throw i}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...n}=e;delete n.onRedirectNavigate;const i=await this.initializeNativeRequest(n),s={method:uo.GetToken,request:i};try{const f=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(f)}catch(f){if(f instanceof Qn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),Zo(f)))throw f}this.browserStorage.setTemporaryCache(be.NATIVE_REQUEST,JSON.stringify(i),!0);const c={apiId:xe.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,c)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:i,...s}=n;i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(be.NATIVE_REQUEST));const c={method:uo.GetToken,request:s},d=or();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(c);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const p=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),p}catch(f){throw this.browserStorage.setInteractionInProgress(!1),f}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var p;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=Co(e.id_token,nr),s=this.createHomeAccountIdentifier(e,i),c=(p=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:p.homeAccountId;if(s!==c&&e.account.id!==t.accountId)throw wd(VC);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=nh(this.browserStorage,d,s,nr,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),g=await this.generateAuthenticationResult(e,t,i,f,d.canonicalAuthority,n);return this.cacheAccount(f),this.cacheNativeTokens(e,t,s,i,e.access_token,g.tenantId,n),g}createHomeAccountIdentifier(e,t){return it.generateHomeAccountId(e.client_info||P.EMPTY_STRING,xn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Re.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const n=new gi(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw U(Vd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,c){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Ye.fromString(e.scope):Ye.fromString(t.scope),g=e.account.properties||{},p=g.UID||n.oid||n.sub||P.EMPTY_STRING,w=g.TenantId||n.tid||P.EMPTY_STRING,C=Jd(i.getAccountInfo(),void 0,n,e.id_token);C.nativeAccountId!==e.account.id&&(C.nativeAccountId=e.account.id);const S=await this.generatePopAccessToken(e,t),T=t.tokenType===Re.POP?Re.POP:Re.BEARER;return{authority:s,uniqueId:p,tenantId:w,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(c+e.expires_in)*1e3),tokenType:T,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,n,i,s,c,d){const f=Ic(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Re.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,p=d+g,w=this.generateScopes(e,t),C=bc(n,t.authority,s,t.clientId,i.tid||c,w.printScopes(),p,0,nr,void 0,t.tokenType,void 0,t.keyId),S={idToken:f,accessToken:C};this.nativeStorageManager.saveCacheRecord(S,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw ay(xd,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const n=new ye(t);n.validateAsUri();const{scopes:i,...s}=e,c=new Ye(i||[]);c.appendScopes(pi);const d=()=>{switch(this.apiId){case xe.ssoSilent:case xe.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),lt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case lt.NONE:case lt.CONSENT:case lt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),j(IC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(f.signPopToken&&e.popKid)throw j(kC);if(this.handleExtraBrokerParams(f),f.extraParameters=f.extraParameters||{},f.extraParameters.telemetry=ai.MATS_TELEMETRY,e.authenticationScheme===Re.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},p=new gi(this.browserCrypto);let w;if(f.keyId)w=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await B(p.generateCnf.bind(p),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);w=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=w}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(Zd)&&e.extraParameters.hasOwnProperty(ud)&&e.extraParameters.hasOwnProperty(go);if(!e.embeddedClientId&&!t)return;let n="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[ud],n=e.extraParameters[go]),e.extraParameters={child_client_id:n,child_redirect_uri:i},(s=this.performanceClient)==null||s.addFields({embeddedClientId:n,embeddedRedirectUri:i},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Xn{constructor(e,t,n,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(k.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:ai.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((n,i)=>{this.resolvers.set(t.responseId,{resolve:n,reject:i})})}static async createProvider(e,t,n){e.trace("NativeMessageHandler - createProvider called.");try{const i=new Xn(e,t,n,ai.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Xn(e,t,n);return await s.sendHandshakeRequest(),s}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:ai.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:{method:uo.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,n)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:n}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(j(EC)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==ai.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===uo.HandshakeRequest){const n=this.handshakeResolvers.get(t.responseId);if(!n){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),n.reject(j(SC))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,n=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const s=t.body.method;if(s===uo.Response){if(!n)return;const c=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(c)}`),c.status!=="Success")n.reject(wd(c.code,c.description,c.ext));else if(c.result)c.result.code&&c.result.description?n.reject(wd(c.result.code,c.result.description,c.result.ext)):n.resolve(c.result);else throw ay(xd,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(s===uo.HandshakeResponse){if(!i){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${s}`),this.logger.errorPii(`Unable to parse ${e}`),n?n.reject(s):i&&i.reject(s)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,n,i){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case Re.BEARER:case Re.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yh{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(k.HandleCodeResponse,t.correlationId);let n;try{n=this.authModule.handleFragmentResponse(e,t.state)}catch(i){throw i instanceof qr&&i.subError===po?j(po):i}return B(this.handleCodeResponseFromServer.bind(this),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(n,t)}async handleCodeResponseFromServer(e,t,n=!0){if(this.performanceClient.addQueueMeasurement(k.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await B(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),n&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const s=this.createCcsCredentials(t);s&&(this.authCodeRequest.ccsCredential=s)}return await B(this.authModule.acquireToken.bind(this.authModule),k.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:on.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function KC(r,e,t){const n=lc(r);if(!n)throw $y(r)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${r}`),j(rC)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),j(nC));return n}function OM(r,e,t){if(!r.state)throw j(ah);const n=FC(e,r.state);if(!n)throw j(oC);if(n.interactionType!==t)throw j(iC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class NM extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,d,g,p),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||pi,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,n)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(e,n))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},i=e&&e.authority,s=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,i,s)):(this.logger.verbose("asyncPopup set to false, opening popup"),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(t,n,i,s))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var s;this.logger.verbose("acquireTokenPopupAsync called");const n=this.initializeServerTelemetryManager(xe.acquireTokenPopup),i=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Popup);BC(i.authority);try{const c=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),f=Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const p=await d.getAuthCodeUrl({...i,nativeBroker:f}),w=new yh(d,this.browserStorage,c,this.logger,this.performanceClient),C=this.initiateAuthRequest(p,t);this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),T=wo(KC,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(S,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,c),T.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw j(_a);const N=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,T.accountId,this.nativeStorage,i.correlationId),{userRequestState:K}=Fn.parseRequestState(this.browserCrypto,i.state);return await N.acquireToken({...i,state:K,prompt:void 0})}return await w.handleCodeResponse(T,i)}catch(c){throw(s=t.popup)==null||s.close(),c instanceof Fe&&(c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c)),c}}async logoutPopupAsync(e,t,n,i){var c,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ne.LOGOUT_START,X.Popup,e);const s=this.initializeServerTelemetryManager(xe.logoutPopup);try{await this.clearCacheOnLogout(e.account);const p=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{p.authority.endSessionEndpoint}catch{if((c=e.account)!=null&&c.homeAccountId&&e.postLogoutRedirectUri&&p.authority.protocolMode===Tr.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e),i){const S={apiId:xe.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,Cr());await this.navigationClient.navigateInternal(T,S)}(f=t.popup)==null||f.close();return}}const w=p.getLogoutUri(e);this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e);const C=this.openPopup(w,t);if(this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:xe.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,Cr());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${T}`),await this.navigationClient.navigateInternal(T,S)}else this.logger.verbose("No main window navigation requested")}catch(p){throw(g=t.popup)==null||g.close(),p instanceof Fe&&(p.setCorrelationId(this.correlationId),s.cacheFailedRequest(p)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Popup,null,p),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup),p}this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),j(Pc)}monitorPopupForHash(e,t){return new Promise((n,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const s=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(s),i(j(po));return}let c="";try{c=e.location.href}catch{}if(!c||c==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===wa.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),n(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),n.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),n=this.openSizedPopup(e,t)),!n)throw j(cC);return n.focus&&n.focus(),this.currentWindow=n,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),j(sC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,T,b,N;const s=i.screenLeft?i.screenLeft:i.screenX,c=i.screenTop?i.screenTop:i.screenY,d=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let g=(S=n.popupSize)==null?void 0:S.width,p=(T=n.popupSize)==null?void 0:T.height,w=(b=n.popupPosition)==null?void 0:b.top,C=(N=n.popupPosition)==null?void 0:N.left;return(!g||g<0||g>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=en.POPUP_WIDTH),(!p||p<0||p>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),p=en.POPUP_HEIGHT),(!w||w<0||w>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),w=Math.max(0,f/2-en.POPUP_HEIGHT/2+c)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-en.POPUP_WIDTH/2+s)),i.open(e,t,`width=${g}, height=${p}, top=${w}, left=${C}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(X.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${en.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${en.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class lp{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(be.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(be.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:xe.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,n);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),j(Pc)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(t),i=this.browserStorage.getTemporaryCache(n);if(!i)throw U(ic,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof qr&&g.subError===po?j(po):g}const c=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(c);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await B(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(s.cloud_instance_host_name,this.authCodeRequest.correlationId),s.nonce=d||void 0,s.state=i,s.client_info)this.authCodeRequest.clientInfo=s.client_info;else{const g=this.checkCcsCredentials();g&&(this.authCodeRequest.ccsCredential=g)}const f=await this.authModule.acquireToken(this.authCodeRequest,s);return this.browserStorage.cleanRequestByState(t),f}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(be.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function PM(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const r=window.performance.getEntriesByType("navigation"),e=r.length?r[0]:void 0;return e==null?void 0:e.type}class MM extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,d,g,p),this.nativeStorage=f}async acquireToken(e){const t=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const n=this.initializeServerTelemetryManager(xe.acquireTokenRedirect),i=s=>{s.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(ne.RESTORE_FROM_BFCACHE,X.Redirect))};try{const s=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),c=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new lp(c,this.browserStorage,s,this.logger,this.performanceClient),f=await c.getAuthCodeUrl({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),g=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${g}`),window.addEventListener("pageshow",i),await d.initiateAuthRequest(f,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:g,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(s){throw s instanceof Fe&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),window.removeEventListener("pageshow",i),this.browserStorage.cleanRequestByState(t.state),s}}async handleRedirectPromise(e="",t){const n=this.initializeServerTelemetryManager(xe.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[i,s]=this.getRedirectResponse(e||"");if(!i)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(X.Redirect),PM()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const c=this.browserStorage.getTemporaryCache(be.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(c),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),c.indexOf("#")>-1&&H0(c),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!gh()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(be.URL_HASH,s,!0);const g={apiId:xe.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let p=!0;if(!c||c==="null"){const w=$0();this.browserStorage.setTemporaryCache(be.ORIGIN_URI,w,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),p=await this.navigationClient.navigateInternal(w,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${c}`),p=await this.navigationClient.navigateInternal(c,g);if(!p)return await this.handleResponse(i,n)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,n);return null}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),this.browserStorage.cleanRequestByInteractionType(X.Redirect),i}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===wa.QUERY?t=window.location.search:t=window.location.hash);let n=lc(t);if(n){try{OM(n,this.browserCrypto,X.Redirect)}catch(s){return s instanceof Fe&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return F0(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(be.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(be.URL_HASH)),i&&(n=lc(i),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,i]):[null,""]}async handleResponse(e,t){const n=e.state;if(!n)throw j(ah);const i=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(_a);const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Fn.parseRequestState(this.browserCrypto,n);return f.acquireToken({...i,state:g,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(n)})}const s=this.browserStorage.getCachedAuthority(n);if(!s)throw j(sh);const c=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new lp(c,this.browserStorage,i,this.logger,this.performanceClient).handleCodeResponse(e,n)}async logout(e){var i,s;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(xe.logout);try{this.eventHandler.emitEvent(ne.LOGOUT_START,X.Redirect,e),await this.clearCacheOnLogout(t.account);const c={apiId:xe.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===Tr.OIDC)try{d.authority.endSessionEndpoint}catch{if((i=t.account)!=null&&i.homeAccountId){this.browserStorage.removeAccount((s=t.account)==null?void 0:s.homeAccountId),this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Redirect,t);return}}const f=d.getLogoutUri(t);if(this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(f)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,c);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,c);return}}catch(c){throw c instanceof Fe&&(c.setCorrelationId(this.correlationId),n.cacheFailedRequest(c)),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Redirect,null,c),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect),c}this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ye.getAbsoluteUrl(t,Cr())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function DM(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),j(Pc);return i?B(LM,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):wo(UM,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function xM(r,e,t,n,i,s,c){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<vd&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${vd}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(p),f(j(lC))},e),p=window.setInterval(()=>{let w="";const C=r.contentWindow;try{w=C?C.location.href:""}catch{}if(!w||w==="about:blank")return;let S="";C&&(c===wa.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(p),d(S)},t)}).finally(()=>{wo(BM,k.RemoveHiddenIframe,i,n,s)(r)})}function LM(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const c=zC();window.setTimeout(()=>{if(!c){s("Unable to load iframe");return}c.src=r,i(c)},e)})}function UM(r){const e=zC();return e.src=r,e}function zC(){const r=document.createElement("iframe");return r.className="msalSilentIframe",r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(r),r}function BM(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class FM extends vi{constructor(e,t,n,i,s,c,d,f,g,p,w){super(e,t,n,i,s,c,f,p,w),this.apiId=d,this.nativeStorage=g}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==lt.NONE&&t.prompt!==lt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${lt.NONE}`),t.prompt=lt.NONE):t.prompt=lt.NONE;const n=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);BC(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await B(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),await B(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(c){if(c instanceof Fe&&(c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c)),!s||!(c instanceof Fe)||c.errorCode!==en.INVALID_GRANT_ERROR)throw c;this.performanceClient.addFields({retryError:c.errorCode},this.correlationId);const d=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);return await B(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(j(Mc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await B(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await B(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),c=new yh(e,this.browserStorage,i,this.logger,this.performanceClient),d=await B(DM,k.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(s,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),f=this.config.auth.OIDCOptions.serverResponseType,g=await B(xM,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),p=wo(KC,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(p.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(_a);const w=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,p.accountId,this.browserStorage,n),{userRequestState:C}=Fn.parseRequestState(this.browserCrypto,t.state);return B(w.acquireToken.bind(w),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||lt.NONE})}return B(c.handleCodeResponse.bind(c),k.HandleCodeResponse,this.logger,this.performanceClient,n)(p,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class HM extends vi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await B(vh,k.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),n={...e,...t};e.redirectUri&&(n.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(xe.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return B(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(c=>{throw c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),c})}logout(){return Promise.reject(j(Mc))}async createRefreshTokenClient(e){const t=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new hd(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class VM{constructor(e,t,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=n,this.cryptoObj=i}loadExternalTokens(e,t,n){if(!this.isBrowserEnvironment)throw j(Dc);const i=t.id_token?Co(t.id_token,nr):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=e.authority?new Tt(Tt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Sr()):void 0,d=this.loadAccount(e,n.clientInfo||t.client_info||"",i,c),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),p=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:p},i,c)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=it.createFromAccountInfo(e.account);return this.storage.setAccount(f),f}else if(!i||!t&&!n)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),j(yC);const s=it.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),c=n==null?void 0:n.tid,d=nh(this.storage,i,s,nr,n,t,i.hostnameAndPort,c,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,n,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=Ic(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,c){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?Ye.fromString(t.scope):new Ye(e.scopes),f=c.expiresOn||t.expires_in+new Date().getTime()/1e3,g=c.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,p=bc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,nr);return this.storage.setAccessTokenCredential(p),p}loadRefreshToken(e,t,n){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=Iy(t,n,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i),i}generateAuthenticationResult(e,t,n,i){var p,w,C;let s="",c=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,c=Ye.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),f=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const g=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:c,account:g.getAccountInfo(),idToken:((p=t.idToken)==null?void 0:p.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((w=t.refreshToken)==null?void 0:w.familyId)||"",tokenType:((C=t==null?void 0:t.accessToken)==null?void 0:C.tokenType)||"",state:e.state||"",cloudGraphHostName:g.cloudGraphHostName||"",msGraphHost:g.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class $M extends Xy{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class KM extends vi{constructor(e,t,n,i,s,c,d,f,g,p){super(e,t,n,i,s,c,f,g,p),this.apiId=d}async acquireToken(e){if(!e.code)throw j(CC);const t=await B(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,X.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},s=await B(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),c=new $M(s);this.logger.verbose("Auth code client created");const d=new yh(c,this.browserStorage,i,this.logger,this.performanceClient);return await B(d.handleCodeResponseFromServer.bind(d),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(i){throw i instanceof Fe&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(j(Mc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Gn(r){const e=r==null?void 0:r.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Rs(r,e){try{mh(r)}catch(t){throw e.end({success:!1},t),t}}class Uc{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new mi(this.logger,this.performanceClient):ac,this.eventHandler=new mM(this.logger),this.browserStorage=this.isBrowserEnvironment?new Cd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,r0(this.config.auth),this.performanceClient):sM(this.config.auth.clientId,this.logger);const t={cacheLocation:Ft.MemoryStorage,temporaryCacheLocation:Ft.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Cd(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new VM(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const n=new Uc(e);return await n.initialize(t),n}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(ne.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),n=this.config.system.allowNativeBroker,i=this.performanceClient.startMeasurement(k.InitializeClientApplication,t);if(this.eventHandler.emitEvent(ne.INITIALIZE_START),n)try{this.nativeExtensionProvider=await Xn.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(s){this.logger.verbose(s)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await B(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),k.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(ne.INITIALIZE_END),i.end({allowNativeBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),UC(this.initialized),this.isBrowserEnvironment){const t=e||"";let n=this.redirectResponse.get(t);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),n=this.browserStorage.getCachedNativeRequest(),i=n&&Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(be.CORRELATION_ID,!0)||"",c=this.performanceClient.startMeasurement(k.AcquireTokenRedirect,s);this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_START,X.Redirect);let d;if(i&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=B(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(this.performanceClient,c.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=B(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(e,c)}return d.then(f=>(f?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),c.end({success:!0,accountType:Gn(f.account)})):c.event.errorCode?c.end({success:!1}):c.discard(),this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_END,X.Redirect),f)).catch(f=>{const g=f;throw t.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,g):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,g),this.eventHandler.emitEvent(ne.HANDLE_REDIRECT_END,X.Redirect),c.end({success:!1},g),f})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenPreRedirect,t);n.add({accountType:Gn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=c=>{const d=typeof i=="function"?i(c):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const c=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof c=="function"?c(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{ip(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Redirect,e):this.eventHandler.emitEvent(ne.LOGIN_START,X.Redirect,e);let c;return this.nativeExtensionProvider&&this.canUseNative(e)?c=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Qn&&Zo(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Hn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),f}):c=this.createRedirectClient(t).acquireToken(e),await c}catch(c){throw n.end({success:!1},c),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,c):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,c),c}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:Gn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Rs(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(c){return Promise.reject(c)}const i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Popup,e):this.eventHandler.emitEvent(ne.LOGIN_START,X.Popup,e);let s;return this.canUseNative(e)?s=this.acquireTokenNative({...e,correlationId:t},xe.acquireTokenPopup).then(c=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:Gn(c.account)}),c)).catch(c=>{if(c instanceof Qn&&Zo(c))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(c instanceof Hn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),c}):s=this.createPopupClient(t).acquireToken(e),s.then(c=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Popup,c):this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Popup,c),n.end({success:!0,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Gn(c.account)}),c)).catch(c=>(i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Popup,null,c):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Popup,null,c),n.end({success:!1},c),Promise.reject(c)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var s,c;const t=this.getRequestCorrelationId(e),n={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(k.SsoSilent,t),(s=this.ssoSilentMeasurement)==null||s.add({scenarioId:e.scenarioId,accountType:Gn(e.account)}),Rs(this.initialized,this.ssoSilentMeasurement),(c=this.ssoSilentMeasurement)==null||c.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(ne.SSO_SILENT_START,X.Silent,n);let i;return this.canUseNative(n)?i=this.acquireTokenNative(n,xe.ssoSilent).catch(d=>{if(d instanceof Qn&&Zo(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw d}):i=this.createSilentIframeClient(n.correlationId).acquireToken(n),i.then(d=>{var f;return this.eventHandler.emitEvent(ne.SSO_SILENT_SUCCESS,X.Silent,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Gn(d.account)}),d}).catch(d=>{var f;throw this.eventHandler.emitEvent(ne.SSO_SILENT_FAILURE,X.Silent,null,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenByCode,t);Rs(this.initialized,n),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_START,X.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw j(_C);if(e.code){const i=e.code;let s=this.hybridAuthCodeResponses.get(i);return s?(this.logger.verbose("Existing acquireTokenByCode request found",t),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),s=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(c=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_SUCCESS,X.Silent,c),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:c.fromNativeBroker,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Gn(c.account)}),c)).catch(c=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,c),n.end({success:!1},c),c}),this.hybridAuthCodeResponses.set(i,s)),await s}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const i=await this.acquireTokenNative({...e,correlationId:t},xe.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Qn&&Zo(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:Gn(i.account),success:!0}),i}else throw j(TC);else throw j(wC)}catch(i){throw this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,i),n.end({success:!1},i),i}}async acquireTokenByCodeAsync(e){var i;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(k.AcquireTokenByCodeAsync,e.correlationId),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(s=>{var c;return(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var c;throw(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!1},s),s}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenFromCache,e.correlationId),t){case Qt.Default:case Qt.AccessToken:case Qt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return B(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw U(yr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Qt.Default:case Qt.AccessTokenAndRefreshToken:case Qt.RefreshToken:case Qt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return B(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw U(yr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return B(t.acquireToken.bind(t),k.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return ip(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return mh(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return cM(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return lM(e,this.logger,this.browserStorage)}getAccountByUsername(e){return uM(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return dM(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return hM(e,this.logger,this.browserStorage)}setActiveAccount(e){fM(e,this.browserStorage)}getActiveAccount(){return gM(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=it.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(n),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw j(_a);return new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case lt.NONE:case lt.CONSENT:case lt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new NM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new MM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new FM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new $C(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new HM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new KM(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,xe.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return LC(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(st.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(ne.ACTIVE_ACCOUNT_CHANGED);const n=e.newValue||e.oldValue;if(!n)return;const i=JSON.parse(n);if(typeof i!="object"||!it.isAccountEntity(i))return;const c=fi.toObject(new it,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_ADDED,void 0,c)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_REMOVED,void 0,c))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?Sr():P.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||np})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||np})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Rs(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw j(fC);n.add({accountType:Gn(i)});const s={clientId:this.config.auth.clientId,authority:e.authority||P.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:i.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},c=JSON.stringify(s),d=this.activeSilentTokenRequests.get(c);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=B(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(c),n.end({success:!0,fromCache:g.fromCache,isNativeBroker:g.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:g.accessToken.length,idTokenSize:g.idToken.length}),g)).catch(g=>{throw this.activeSilentTokenRequests.delete(c),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(c,f),{...await f,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const n=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(k.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_START,X.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",n);const i=await B(wM,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Qt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(zM(d,s))if(this.activeIframeRequest)if(s!==Qt.Skip){const[g,p]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${p}`,i.correlationId);const w=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);w.add({awaitIframeCorrelationId:p});const C=await g;if(w.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${p} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${p} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",i.correlationId),B(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(p=>{g=p}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),B(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(p=>(g(!0),p)).catch(p=>{throw g(!1),p}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",n)})}async acquireTokenSilentNoIframe(e,t){return Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,xe.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Qn&&Zo(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,U(yr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),B(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Qt.AccessToken)throw n;return this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_NETWORK_START,X.Silent,e),B(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function zM(r,e){const t=!(r instanceof Hn&&r.subError!==Nc),n=r.errorCode===en.INVALID_GRANT_ERROR||r.errorCode===yr,i=t&&n||r.errorCode===dc||r.errorCode===th,s=b0.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function WM(r,e){const t=new vo(r);return await t.initialize(),Uc.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ch{static async createPublicClientApplication(e){const t=await WM(e);return new Ch(e,t)}constructor(e,t){this.controller=t||new Uc(new vo(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Du=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",qM=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",GM=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",WC="https://app-files.jplan.com.br/pub/Youtube%20App/index.html",qC={auth:{clientId:qM,authority:`https://${Du}.b2clogin.com/${Du}.onmicrosoft.com/${GM}`,knownAuthorities:[`${Du}.b2clogin.com`],redirectUri:`${WC}`},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===Me.Error&&console.error(e)},logLevel:Me.Warning}}};function jM(r){return{scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:`${WC}/_/dashboard`,extraQueryParameters:r}}console.log(qC);const Mn=new Ch(qC),up=u.ref(null);function GC(){async function r(e){var t;if(e)try{const n=e.idTokenClaims;if(!(n!=null&&n.aud))throw new Error("User audience (aud) is missing in ID token claims");const i=localStorage.getItem(`msal.token.keys.${n.aud}`);if(!i)throw new Error(`Token keys para ${n.aud} não encontrados no localStorage`);const s=JSON.parse(i),c=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!c)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(c);if(!d)throw new Error(`Dados do token para ID ${c} não encontrados no localStorage`);const f=JSON.parse(d),g=f==null?void 0:f.secret;if(!g)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),up.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:up,setJToken:r}}const Ko=u.ref(null);function jC(){const{setJToken:r}=GC(),e=u.computed(()=>!!Ko.value),t=u.computed(()=>Ko.value),n=d=>{sessionStorage.setItem("redirectPath",d)},i=async d=>{try{await Mn.initialize();const f=await Mn.handleRedirectPromise();d&&!d.startsWith("/_/dashboard")&&n(d);const g=Mn.getActiveAccount();f&&(Mn.setActiveAccount(f.account),await r(g),Ko.value=g),Ko.value||await s()}catch(f){console.error("Erro no handleRedirect:",f)}};async function s(){const d=await Mn.handleRedirectPromise();if(!d||Mn.getAllAccounts().length===0){await Mn.initialize();const f=jM();await Mn.loginRedirect(f);return}Mn.setActiveAccount(d.account)}async function c(){try{const d=await Mn.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Mn.setActiveAccount(d.account),await r(Ko.value)}catch(d){console.error("Falha ao renovar token, forçando novo login.",d),await s()}}return u.watch(Ko,async(d,f)=>{var p,w,C;if(((p=d==null?void 0:d.idTokenClaims)==null?void 0:p.exp)===((w=f==null?void 0:f.idTokenClaims)==null?void 0:w.exp))return;const g=(C=d==null?void 0:d.idTokenClaims)==null?void 0:C.exp;if(g){const S=Math.floor(Date.now()/1e3),b=(g-S-120)*1e3;b>0&&setTimeout(async()=>{await c()},b)}}),{isAuthenticated:e,account:t,handleRedirect:i}}function YC(r,e){return function(){return r.apply(e,arguments)}}const{toString:YM}=Object.prototype,{getPrototypeOf:wh}=Object,Bc=(r=>e=>{const t=YM.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),$n=r=>(r=r.toLowerCase(),e=>Bc(e)===r),Fc=r=>e=>typeof e===r,{isArray:yi}=Array,fa=Fc("undefined");function JM(r){return r!==null&&!fa(r)&&r.constructor!==null&&!fa(r.constructor)&&an(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const JC=$n("ArrayBuffer");function QM(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&JC(r.buffer),e}const XM=Fc("string"),an=Fc("function"),QC=Fc("number"),Hc=r=>r!==null&&typeof r=="object",ZM=r=>r===!0||r===!1,Ws=r=>{if(Bc(r)!=="object")return!1;const e=wh(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},e1=$n("Date"),t1=$n("File"),n1=$n("Blob"),r1=$n("FileList"),o1=r=>Hc(r)&&an(r.pipe),i1=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||an(r.append)&&((e=Bc(r))==="formdata"||e==="object"&&an(r.toString)&&r.toString()==="[object FormData]"))},a1=$n("URLSearchParams"),[s1,c1,l1,u1]=["ReadableStream","Request","Response","Headers"].map($n),d1=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ea(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),yi(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),c=s.length;let d;for(n=0;n<c;n++)d=s[n],e.call(null,r[d],d,r)}}function XC(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ZC=r=>!fa(r)&&r!==ho;function _d(){const{caseless:r}=ZC(this)&&this||{},e={},t=(n,i)=>{const s=r&&XC(e,i)||i;Ws(e[s])&&Ws(n)?e[s]=_d(e[s],n):Ws(n)?e[s]=_d({},n):yi(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Ea(arguments[n],t);return e}const h1=(r,e,t,{allOwnKeys:n}={})=>(Ea(e,(i,s)=>{t&&an(i)?r[s]=YC(i,t):r[s]=i},{allOwnKeys:n}),r),f1=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),g1=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},m1=(r,e,t,n)=>{let i,s,c;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)c=i[s],(!n||n(c,r,e))&&!d[c]&&(e[c]=r[c],d[c]=!0);r=t!==!1&&wh(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},p1=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},v1=r=>{if(!r)return null;if(yi(r))return r;let e=r.length;if(!QC(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},y1=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&wh(Uint8Array)),C1=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},w1=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},_1=$n("HTMLFormElement"),T1=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),dp=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),E1=$n("RegExp"),ew=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};Ea(t,(i,s)=>{let c;(c=e(i,s,r))!==!1&&(n[s]=c||i)}),Object.defineProperties(r,n)},S1=r=>{ew(r,(e,t)=>{if(an(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(an(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},A1=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return yi(r)?n(r):n(String(r).split(e)),t},I1=()=>{},b1=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,xu="abcdefghijklmnopqrstuvwxyz",hp="0123456789",tw={DIGIT:hp,ALPHA:xu,ALPHA_DIGIT:xu+xu.toUpperCase()+hp},k1=(r=16,e=tw.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function R1(r){return!!(r&&an(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const O1=r=>{const e=new Array(10),t=(n,i)=>{if(Hc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=yi(n)?[]:{};return Ea(n,(c,d)=>{const f=t(c,i+1);!fa(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},N1=$n("AsyncFunction"),P1=r=>r&&(Hc(r)||an(r))&&an(r.then)&&an(r.catch),nw=((r,e)=>r?setImmediate:e?((t,n)=>(ho.addEventListener("message",({source:i,data:s})=>{i===ho&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ho.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",an(ho.postMessage)),M1=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||nw,O={isArray:yi,isArrayBuffer:JC,isBuffer:JM,isFormData:i1,isArrayBufferView:QM,isString:XM,isNumber:QC,isBoolean:ZM,isObject:Hc,isPlainObject:Ws,isReadableStream:s1,isRequest:c1,isResponse:l1,isHeaders:u1,isUndefined:fa,isDate:e1,isFile:t1,isBlob:n1,isRegExp:E1,isFunction:an,isStream:o1,isURLSearchParams:a1,isTypedArray:y1,isFileList:r1,forEach:Ea,merge:_d,extend:h1,trim:d1,stripBOM:f1,inherits:g1,toFlatObject:m1,kindOf:Bc,kindOfTest:$n,endsWith:p1,toArray:v1,forEachEntry:C1,matchAll:w1,isHTMLForm:_1,hasOwnProperty:dp,hasOwnProp:dp,reduceDescriptors:ew,freezeMethods:S1,toObjectSet:A1,toCamelCase:T1,noop:I1,toFiniteNumber:b1,findKey:XC,global:ho,isContextDefined:ZC,ALPHABET:tw,generateString:k1,isSpecCompliantForm:R1,toJSONObject:O1,isAsyncFn:N1,isThenable:P1,setImmediate:nw,asap:M1};function ue(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}O.inherits(ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const rw=ue.prototype,ow={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{ow[r]={value:r}});Object.defineProperties(ue,ow);Object.defineProperty(rw,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const c=Object.create(rw);return O.toFlatObject(r,c,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(c,r.message,e,t,n,i),c.cause=r,c.name=r.name,s&&Object.assign(c,s),c};const D1=null;function Td(r){return O.isPlainObject(r)||O.isArray(r)}function iw(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function fp(r,e,t){return r?r.concat(e).map(function(i,s){return i=iw(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function x1(r){return O.isArray(r)&&!r.some(Td)}const L1=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function Vc(r,e,t){if(!O.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,N){return!O.isUndefined(N[b])});const n=t.metaTokens,i=t.visitor||p,s=t.dots,c=t.indexes,f=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function g(T){if(T===null)return"";if(O.isDate(T))return T.toISOString();if(!f&&O.isBlob(T))throw new ue("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(T)||O.isTypedArray(T)?f&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function p(T,b,N){let K=T;if(T&&!N&&typeof T=="object"){if(O.endsWith(b,"{}"))b=n?b:b.slice(0,-2),T=JSON.stringify(T);else if(O.isArray(T)&&x1(T)||(O.isFileList(T)||O.endsWith(b,"[]"))&&(K=O.toArray(T)))return b=iw(b),K.forEach(function(V,z){!(O.isUndefined(V)||V===null)&&e.append(c===!0?fp([b],z,s):c===null?b:b+"[]",g(V))}),!1}return Td(T)?!0:(e.append(fp(N,b,s),g(T)),!1)}const w=[],C=Object.assign(L1,{defaultVisitor:p,convertValue:g,isVisitable:Td});function S(T,b){if(!O.isUndefined(T)){if(w.indexOf(T)!==-1)throw Error("Circular reference detected in "+b.join("."));w.push(T),O.forEach(T,function(K,H){(!(O.isUndefined(K)||K===null)&&i.call(e,K,O.isString(H)?H.trim():H,b,C))===!0&&S(K,b?b.concat(H):[H])}),w.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return S(r),e}function gp(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function _h(r,e){this._pairs=[],r&&Vc(r,this,e)}const aw=_h.prototype;aw.append=function(e,t){this._pairs.push([e,t])};aw.toString=function(e){const t=e?function(n){return e.call(this,n,gp)}:gp;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function U1(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sw(r,e,t){if(!e)return r;const n=t&&t.encode||U1;O.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=O.isURLSearchParams(e)?e.toString():new _h(e,t).toString(n),s){const c=r.indexOf("#");c!==-1&&(r=r.slice(0,c)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class mp{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(n){n!==null&&e(n)})}}const cw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},B1=typeof URLSearchParams<"u"?URLSearchParams:_h,F1=typeof FormData<"u"?FormData:null,H1=typeof Blob<"u"?Blob:null,V1={isBrowser:!0,classes:{URLSearchParams:B1,FormData:F1,Blob:H1},protocols:["http","https","file","blob","url","data"]},Th=typeof window<"u"&&typeof document<"u",Ed=typeof navigator=="object"&&navigator||void 0,$1=Th&&(!Ed||["ReactNative","NativeScript","NS"].indexOf(Ed.product)<0),K1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z1=Th&&window.location.href||"http://localhost",W1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Th,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:K1,navigator:Ed,origin:z1},Symbol.toStringTag,{value:"Module"})),At={...W1,...V1};function q1(r,e){return Vc(r,new At.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return At.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function G1(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function j1(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function lw(r){function e(t,n,i,s){let c=t[s++];if(c==="__proto__")return!0;const d=Number.isFinite(+c),f=s>=t.length;return c=!c&&O.isArray(i)?i.length:c,f?(O.hasOwnProp(i,c)?i[c]=[i[c],n]:i[c]=n,!d):((!i[c]||!O.isObject(i[c]))&&(i[c]=[]),e(t,n,i[c],s)&&O.isArray(i[c])&&(i[c]=j1(i[c])),!d)}if(O.isFormData(r)&&O.isFunction(r.entries)){const t={};return O.forEachEntry(r,(n,i)=>{e(G1(n),i,t,0)}),t}return null}function Y1(r,e,t){if(O.isString(r))try{return(e||JSON.parse)(r),O.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Sa={transitional:cw,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=O.isObject(e);if(s&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return i?JSON.stringify(lw(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e)||O.isReadableStream(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return q1(e,this.formSerializer).toString();if((d=O.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Vc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),Y1(e)):e}],transformResponse:[function(e){const t=this.transitional||Sa.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(O.isResponse(e)||O.isReadableStream(e))return e;if(e&&O.isString(e)&&(n&&!this.responseType||i)){const c=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(c)throw d.name==="SyntaxError"?ue.from(d,ue.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],r=>{Sa.headers[r]={}});const J1=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Q1=r=>{const e={};let t,n,i;return r&&r.split(`
57
57
  `).forEach(function(c){i=c.indexOf(":"),t=c.substring(0,i).trim().toLowerCase(),n=c.substring(i+1).trim(),!(!t||e[t]&&J1[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},pp=Symbol("internals");function qi(r){return r&&String(r).trim().toLowerCase()}function qs(r){return r===!1||r==null?r:O.isArray(r)?r.map(qs):String(r)}function X1(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const Z1=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Lu(r,e,t,n,i){if(O.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!O.isString(e)){if(O.isString(n))return e.indexOf(n)!==-1;if(O.isRegExp(n))return n.test(e)}}function eD(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function tD(r,e){const t=O.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,c){return this[n].call(this,e,i,s,c)},configurable:!0})})}class Ht{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(d,f,g){const p=qi(f);if(!p)throw new Error("header name must be a non-empty string");const w=O.findKey(i,p);(!w||i[w]===void 0||g===!0||g===void 0&&i[w]!==!1)&&(i[w||f]=qs(d))}const c=(d,f)=>O.forEach(d,(g,p)=>s(g,p,f));if(O.isPlainObject(e)||e instanceof this.constructor)c(e,t);else if(O.isString(e)&&(e=e.trim())&&!Z1(e))c(Q1(e),t);else if(O.isHeaders(e))for(const[d,f]of e.entries())s(f,d,n);else e!=null&&s(t,e,n);return this}get(e,t){if(e=qi(e),e){const n=O.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return X1(i);if(O.isFunction(t))return t.call(this,i,n);if(O.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=qi(e),e){const n=O.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Lu(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(c){if(c=qi(c),c){const d=O.findKey(n,c);d&&(!t||Lu(n,n[d],d,t))&&(delete n[d],i=!0)}}return O.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];(!e||Lu(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return O.forEach(this,(i,s)=>{const c=O.findKey(n,s);if(c){t[c]=qs(i),delete t[s];return}const d=e?eD(s):String(s).trim();d!==s&&delete t[s],t[d]=qs(i),n[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return O.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&O.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
58
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[pp]=this[pp]={accessors:{}}).accessors,i=this.prototype;function s(c){const d=qi(c);n[d]||(tD(i,c),n[d]=!0)}return O.isArray(e)?e.forEach(s):s(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(Ht.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});O.freezeMethods(Ht);function Uu(r,e){const t=this||Sa,n=e||t,i=Ht.from(n.headers);let s=n.data;return O.forEach(r,function(d){s=d.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function lw(r){return!!(r&&r.__CANCEL__)}function Ci(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}O.inherits(Ci,ue,{__CANCEL__:!0});function uw(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function nD(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function rD(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,c;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),p=n[s];c||(c=g),t[i]=f,n[i]=g;let w=s,C=0;for(;w!==i;)C+=t[w++],w=w%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-c<e)return;const S=p&&g-p;return S?Math.round(C*1e3/S):void 0}}function oD(r,e){let t=0,n=1e3/e,i,s;const c=(g,p=Date.now())=>{t=p,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const p=Date.now(),w=p-t;w>=n?c(g,p):(i=g,s||(s=setTimeout(()=>{s=null,c(i)},n-w)))},()=>i&&c(i)]}const mc=(r,e,t=3)=>{let n=0;const i=rD(50,250);return oD(s=>{const c=s.loaded,d=s.lengthComputable?s.total:void 0,f=c-n,g=i(f),p=c<=d;n=c;const w={loaded:c,total:d,progress:d?c/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&p?(d-c)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(w)},t)},vp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},yp=r=>(...e)=>O.asap(()=>r(...e)),iD=At.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,At.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(At.origin),At.navigator&&/(msie|trident)/i.test(At.navigator.userAgent)):()=>!0,aD=At.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const c=[r+"="+encodeURIComponent(e)];O.isNumber(t)&&c.push("expires="+new Date(t).toGMTString()),O.isString(n)&&c.push("path="+n),O.isString(i)&&c.push("domain="+i),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sD(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function cD(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function dw(r,e){return r&&!sD(e)?cD(r,e):e}const Cp=r=>r instanceof Ht?{...r}:r;function yo(r,e){e=e||{};const t={};function n(g,p,w,C){return O.isPlainObject(g)&&O.isPlainObject(p)?O.merge.call({caseless:C},g,p):O.isPlainObject(p)?O.merge({},p):O.isArray(p)?p.slice():p}function i(g,p,w,C){if(O.isUndefined(p)){if(!O.isUndefined(g))return n(void 0,g,w,C)}else return n(g,p,w,C)}function s(g,p){if(!O.isUndefined(p))return n(void 0,p)}function c(g,p){if(O.isUndefined(p)){if(!O.isUndefined(g))return n(void 0,g)}else return n(void 0,p)}function d(g,p,w){if(w in e)return n(g,p);if(w in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(g,p,w)=>i(Cp(g),Cp(p),w,!0)};return O.forEach(Object.keys(Object.assign({},r,e)),function(p){const w=f[p]||i,C=w(r[p],e[p],p);O.isUndefined(C)&&w!==d||(t[p]=C)}),t}const hw=r=>{const e=yo({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:c,auth:d}=e;e.headers=c=Ht.from(c),e.url=aw(dw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(O.isFormData(t)){if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((f=c.getContentType())!==!1){const[g,...p]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];c.setContentType([g||"multipart/form-data",...p].join("; "))}}if(At.hasStandardBrowserEnv&&(n&&O.isFunction(n)&&(n=n(e)),n||n!==!1&&iD(e.url))){const g=i&&s&&aD.read(s);g&&c.set(i,g)}return e},lD=typeof XMLHttpRequest<"u",uD=lD&&function(r){return new Promise(function(t,n){const i=hw(r);let s=i.data;const c=Ht.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,p,w,C,S,T;function b(){S&&S(),T&&T(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let N=new XMLHttpRequest;N.open(i.method.toUpperCase(),i.url,!0),N.timeout=i.timeout;function K(){if(!N)return;const V=Ht.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),Q={data:!d||d==="text"||d==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:V,config:r,request:N};uw(function(W){t(W),b()},function(W){n(W),b()},Q),N=null}"onloadend"in N?N.onloadend=K:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(K)},N.onabort=function(){N&&(n(new ue("Request aborted",ue.ECONNABORTED,r,N)),N=null)},N.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,r,N)),N=null},N.ontimeout=function(){let z=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const Q=i.transitional||sw;i.timeoutErrorMessage&&(z=i.timeoutErrorMessage),n(new ue(z,Q.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,N)),N=null},s===void 0&&c.setContentType(null),"setRequestHeader"in N&&O.forEach(c.toJSON(),function(z,Q){N.setRequestHeader(Q,z)}),O.isUndefined(i.withCredentials)||(N.withCredentials=!!i.withCredentials),d&&d!=="json"&&(N.responseType=i.responseType),g&&([C,T]=mc(g,!0),N.addEventListener("progress",C)),f&&N.upload&&([w,S]=mc(f),N.upload.addEventListener("progress",w),N.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(p=V=>{N&&(n(!V||V.type?new Ci(null,r,N):V),N.abort(),N=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const H=nD(i.url);if(H&&At.protocols.indexOf(H)===-1){n(new ue("Unsupported protocol "+H+":",ue.ERR_BAD_REQUEST,r));return}N.send(s||null)})},dD=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(g){if(!i){i=!0,d();const p=g instanceof Error?g:this.reason;n.abort(p instanceof ue?p:new Ci(p instanceof Error?p.message:p))}};let c=e&&setTimeout(()=>{c=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(c&&clearTimeout(c),c=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(s):g.removeEventListener("abort",s)}),r=null)};r.forEach(g=>g.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>O.asap(d),f}},hD=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},fD=async function*(r,e){for await(const t of gD(r))yield*hD(t,e)},gD=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},wp=(r,e,t,n)=>{const i=fD(r,e);let s=0,c,d=f=>{c||(c=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:p}=await i.next();if(g){d(),f.close();return}let w=p.byteLength;if(t){let C=s+=w;t(C)}f.enqueue(new Uint8Array(p))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},$c=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fw=$c&&typeof ReadableStream=="function",mD=$c&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),gw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},pD=fw&&gw(()=>{let r=!1;const e=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),_p=64*1024,Sd=fw&&gw(()=>O.isReadableStream(new Response("").body)),pc={stream:Sd&&(r=>r.body)};$c&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!pc[e]&&(pc[e]=O.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,n)})})})(new Response);const vD=async r=>{if(r==null)return 0;if(O.isBlob(r))return r.size;if(O.isSpecCompliantForm(r))return(await new Request(At.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(O.isArrayBufferView(r)||O.isArrayBuffer(r))return r.byteLength;if(O.isURLSearchParams(r)&&(r=r+""),O.isString(r))return(await mD(r)).byteLength},yD=async(r,e)=>{const t=O.toFiniteNumber(r.getContentLength());return t??vD(e)},CD=$c&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:c,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:p,withCredentials:w="same-origin",fetchOptions:C}=hw(r);g=g?(g+"").toLowerCase():"text";let S=dD([i,s&&s.toAbortSignal()],c),T;const b=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let N;try{if(f&&pD&&t!=="get"&&t!=="head"&&(N=await yD(p,n))!==0){let Q=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(O.isFormData(n)&&(we=Q.headers.get("content-type"))&&p.setContentType(we),Q.body){const[W,et]=vp(N,mc(yp(f)));n=wp(Q.body,_p,W,et)}}O.isString(w)||(w=w?"include":"omit");const K="credentials"in Request.prototype;T=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:n,duplex:"half",credentials:K?w:void 0});let H=await fetch(T);const V=Sd&&(g==="stream"||g==="response");if(Sd&&(d||V&&b)){const Q={};["status","statusText","headers"].forEach(_e=>{Q[_e]=H[_e]});const we=O.toFiniteNumber(H.headers.get("content-length")),[W,et]=d&&vp(we,mc(yp(d),!0))||[];H=new Response(wp(H.body,_p,W,()=>{et&&et(),b&&b()}),Q)}g=g||"text";let z=await pc[O.findKey(pc,g)||"text"](H,r);return!V&&b&&b(),await new Promise((Q,we)=>{uw(Q,we,{data:z,headers:Ht.from(H.headers),status:H.status,statusText:H.statusText,config:r,request:T})})}catch(K){throw b&&b(),K&&K.name==="TypeError"&&/fetch/i.test(K.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,r,T),{cause:K.cause||K}):ue.from(K,K&&K.code,r,T)}}),Ad={http:D1,xhr:uD,fetch:CD};O.forEach(Ad,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Tp=r=>`- ${r}`,wD=r=>O.isFunction(r)||r===null||r===!1,mw={getAdapter:r=>{r=O.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let c;if(n=t,!wD(t)&&(n=Ad[(c=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${c}'`);if(n)break;i[c||"#"+s]=n}if(!n){const s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=e?s.length>1?`since :
58
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[pp]=this[pp]={accessors:{}}).accessors,i=this.prototype;function s(c){const d=qi(c);n[d]||(tD(i,c),n[d]=!0)}return O.isArray(e)?e.forEach(s):s(e),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(Ht.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});O.freezeMethods(Ht);function Uu(r,e){const t=this||Sa,n=e||t,i=Ht.from(n.headers);let s=n.data;return O.forEach(r,function(d){s=d.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function uw(r){return!!(r&&r.__CANCEL__)}function Ci(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}O.inherits(Ci,ue,{__CANCEL__:!0});function dw(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function nD(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function rD(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,c;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),p=n[s];c||(c=g),t[i]=f,n[i]=g;let w=s,C=0;for(;w!==i;)C+=t[w++],w=w%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-c<e)return;const S=p&&g-p;return S?Math.round(C*1e3/S):void 0}}function oD(r,e){let t=0,n=1e3/e,i,s;const c=(g,p=Date.now())=>{t=p,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const p=Date.now(),w=p-t;w>=n?c(g,p):(i=g,s||(s=setTimeout(()=>{s=null,c(i)},n-w)))},()=>i&&c(i)]}const mc=(r,e,t=3)=>{let n=0;const i=rD(50,250);return oD(s=>{const c=s.loaded,d=s.lengthComputable?s.total:void 0,f=c-n,g=i(f),p=c<=d;n=c;const w={loaded:c,total:d,progress:d?c/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&p?(d-c)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(w)},t)},vp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},yp=r=>(...e)=>O.asap(()=>r(...e)),iD=At.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,At.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(At.origin),At.navigator&&/(msie|trident)/i.test(At.navigator.userAgent)):()=>!0,aD=At.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const c=[r+"="+encodeURIComponent(e)];O.isNumber(t)&&c.push("expires="+new Date(t).toGMTString()),O.isString(n)&&c.push("path="+n),O.isString(i)&&c.push("domain="+i),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sD(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function cD(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function hw(r,e){return r&&!sD(e)?cD(r,e):e}const Cp=r=>r instanceof Ht?{...r}:r;function yo(r,e){e=e||{};const t={};function n(g,p,w,C){return O.isPlainObject(g)&&O.isPlainObject(p)?O.merge.call({caseless:C},g,p):O.isPlainObject(p)?O.merge({},p):O.isArray(p)?p.slice():p}function i(g,p,w,C){if(O.isUndefined(p)){if(!O.isUndefined(g))return n(void 0,g,w,C)}else return n(g,p,w,C)}function s(g,p){if(!O.isUndefined(p))return n(void 0,p)}function c(g,p){if(O.isUndefined(p)){if(!O.isUndefined(g))return n(void 0,g)}else return n(void 0,p)}function d(g,p,w){if(w in e)return n(g,p);if(w in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(g,p,w)=>i(Cp(g),Cp(p),w,!0)};return O.forEach(Object.keys(Object.assign({},r,e)),function(p){const w=f[p]||i,C=w(r[p],e[p],p);O.isUndefined(C)&&w!==d||(t[p]=C)}),t}const fw=r=>{const e=yo({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:c,auth:d}=e;e.headers=c=Ht.from(c),e.url=sw(hw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(O.isFormData(t)){if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((f=c.getContentType())!==!1){const[g,...p]=f?f.split(";").map(w=>w.trim()).filter(Boolean):[];c.setContentType([g||"multipart/form-data",...p].join("; "))}}if(At.hasStandardBrowserEnv&&(n&&O.isFunction(n)&&(n=n(e)),n||n!==!1&&iD(e.url))){const g=i&&s&&aD.read(s);g&&c.set(i,g)}return e},lD=typeof XMLHttpRequest<"u",uD=lD&&function(r){return new Promise(function(t,n){const i=fw(r);let s=i.data;const c=Ht.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,p,w,C,S,T;function b(){S&&S(),T&&T(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let N=new XMLHttpRequest;N.open(i.method.toUpperCase(),i.url,!0),N.timeout=i.timeout;function K(){if(!N)return;const V=Ht.from("getAllResponseHeaders"in N&&N.getAllResponseHeaders()),Q={data:!d||d==="text"||d==="json"?N.responseText:N.response,status:N.status,statusText:N.statusText,headers:V,config:r,request:N};dw(function(W){t(W),b()},function(W){n(W),b()},Q),N=null}"onloadend"in N?N.onloadend=K:N.onreadystatechange=function(){!N||N.readyState!==4||N.status===0&&!(N.responseURL&&N.responseURL.indexOf("file:")===0)||setTimeout(K)},N.onabort=function(){N&&(n(new ue("Request aborted",ue.ECONNABORTED,r,N)),N=null)},N.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,r,N)),N=null},N.ontimeout=function(){let z=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const Q=i.transitional||cw;i.timeoutErrorMessage&&(z=i.timeoutErrorMessage),n(new ue(z,Q.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,N)),N=null},s===void 0&&c.setContentType(null),"setRequestHeader"in N&&O.forEach(c.toJSON(),function(z,Q){N.setRequestHeader(Q,z)}),O.isUndefined(i.withCredentials)||(N.withCredentials=!!i.withCredentials),d&&d!=="json"&&(N.responseType=i.responseType),g&&([C,T]=mc(g,!0),N.addEventListener("progress",C)),f&&N.upload&&([w,S]=mc(f),N.upload.addEventListener("progress",w),N.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(p=V=>{N&&(n(!V||V.type?new Ci(null,r,N):V),N.abort(),N=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const H=nD(i.url);if(H&&At.protocols.indexOf(H)===-1){n(new ue("Unsupported protocol "+H+":",ue.ERR_BAD_REQUEST,r));return}N.send(s||null)})},dD=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(g){if(!i){i=!0,d();const p=g instanceof Error?g:this.reason;n.abort(p instanceof ue?p:new Ci(p instanceof Error?p.message:p))}};let c=e&&setTimeout(()=>{c=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(c&&clearTimeout(c),c=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(s):g.removeEventListener("abort",s)}),r=null)};r.forEach(g=>g.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>O.asap(d),f}},hD=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},fD=async function*(r,e){for await(const t of gD(r))yield*hD(t,e)},gD=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},wp=(r,e,t,n)=>{const i=fD(r,e);let s=0,c,d=f=>{c||(c=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:p}=await i.next();if(g){d(),f.close();return}let w=p.byteLength;if(t){let C=s+=w;t(C)}f.enqueue(new Uint8Array(p))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},$c=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gw=$c&&typeof ReadableStream=="function",mD=$c&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),mw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},pD=gw&&mw(()=>{let r=!1;const e=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),_p=64*1024,Sd=gw&&mw(()=>O.isReadableStream(new Response("").body)),pc={stream:Sd&&(r=>r.body)};$c&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!pc[e]&&(pc[e]=O.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,n)})})})(new Response);const vD=async r=>{if(r==null)return 0;if(O.isBlob(r))return r.size;if(O.isSpecCompliantForm(r))return(await new Request(At.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(O.isArrayBufferView(r)||O.isArrayBuffer(r))return r.byteLength;if(O.isURLSearchParams(r)&&(r=r+""),O.isString(r))return(await mD(r)).byteLength},yD=async(r,e)=>{const t=O.toFiniteNumber(r.getContentLength());return t??vD(e)},CD=$c&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:c,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:p,withCredentials:w="same-origin",fetchOptions:C}=fw(r);g=g?(g+"").toLowerCase():"text";let S=dD([i,s&&s.toAbortSignal()],c),T;const b=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let N;try{if(f&&pD&&t!=="get"&&t!=="head"&&(N=await yD(p,n))!==0){let Q=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(O.isFormData(n)&&(we=Q.headers.get("content-type"))&&p.setContentType(we),Q.body){const[W,et]=vp(N,mc(yp(f)));n=wp(Q.body,_p,W,et)}}O.isString(w)||(w=w?"include":"omit");const K="credentials"in Request.prototype;T=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:n,duplex:"half",credentials:K?w:void 0});let H=await fetch(T);const V=Sd&&(g==="stream"||g==="response");if(Sd&&(d||V&&b)){const Q={};["status","statusText","headers"].forEach(_e=>{Q[_e]=H[_e]});const we=O.toFiniteNumber(H.headers.get("content-length")),[W,et]=d&&vp(we,mc(yp(d),!0))||[];H=new Response(wp(H.body,_p,W,()=>{et&&et(),b&&b()}),Q)}g=g||"text";let z=await pc[O.findKey(pc,g)||"text"](H,r);return!V&&b&&b(),await new Promise((Q,we)=>{dw(Q,we,{data:z,headers:Ht.from(H.headers),status:H.status,statusText:H.statusText,config:r,request:T})})}catch(K){throw b&&b(),K&&K.name==="TypeError"&&/fetch/i.test(K.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,r,T),{cause:K.cause||K}):ue.from(K,K&&K.code,r,T)}}),Ad={http:D1,xhr:uD,fetch:CD};O.forEach(Ad,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Tp=r=>`- ${r}`,wD=r=>O.isFunction(r)||r===null||r===!1,pw={getAdapter:r=>{r=O.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let c;if(n=t,!wD(t)&&(n=Ad[(c=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${c}'`);if(n)break;i[c||"#"+s]=n}if(!n){const s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=e?s.length>1?`since :
59
59
  `+s.map(Tp).join(`
60
- `):" "+Tp(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n},adapters:Ad};function Bu(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ci(null,r)}function Ep(r){return Bu(r),r.headers=Ht.from(r.headers),r.data=Uu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),mw.getAdapter(r.adapter||Sa.adapter)(r).then(function(n){return Bu(r),n.data=Uu.call(r,r.transformResponse,n),n.headers=Ht.from(n.headers),n},function(n){return lw(n)||(Bu(r),n&&n.response&&(n.response.data=Uu.call(r,r.transformResponse,n.response),n.response.headers=Ht.from(n.response.headers))),Promise.reject(n)})}const pw="1.7.9",Kc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Kc[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const Sp={};Kc.transitional=function(e,t,n){function i(s,c){return"[Axios v"+pw+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return(s,c,d)=>{if(e===!1)throw new ue(i(c," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Sp[c]&&(Sp[c]=!0,console.warn(i(c," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,c,d):!0}};Kc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function _D(r,e,t){if(typeof r!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],c=e[s];if(c){const d=r[s],f=d===void 0||c(d,s,r);if(f!==!0)throw new ue("option "+s+" must be "+f,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+s,ue.ERR_BAD_OPTION)}}const Gs={assertOptions:_D,validators:Kc},jn=Gs.validators;class fo{constructor(e){this.defaults=e,this.interceptors={request:new mp,response:new mp}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
61
- `+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=yo(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Gs.assertOptions(n,{silentJSONParsing:jn.transitional(jn.boolean),forcedJSONParsing:jn.transitional(jn.boolean),clarifyTimeoutError:jn.transitional(jn.boolean)},!1),i!=null&&(O.isFunction(i)?t.paramsSerializer={serialize:i}:Gs.assertOptions(i,{encode:jn.function,serialize:jn.function},!0)),Gs.assertOptions(t,{baseUrl:jn.spelling("baseURL"),withXsrfToken:jn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let c=s&&O.merge(s.common,s[t.method]);s&&O.forEach(["delete","get","head","post","put","patch","common"],T=>{delete s[T]}),t.headers=Ht.concat(c,s);const d=[];let f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(t)===!1||(f=f&&b.synchronous,d.unshift(b.fulfilled,b.rejected))});const g=[];this.interceptors.response.forEach(function(b){g.push(b.fulfilled,b.rejected)});let p,w=0,C;if(!f){const T=[Ep.bind(this),void 0];for(T.unshift.apply(T,d),T.push.apply(T,g),C=T.length,p=Promise.resolve(t);w<C;)p=p.then(T[w++],T[w++]);return p}C=d.length;let S=t;for(w=0;w<C;){const T=d[w++],b=d[w++];try{S=T(S)}catch(N){b.call(this,N);break}}try{p=Ep.call(this,S)}catch(T){return Promise.reject(T)}for(w=0,C=g.length;w<C;)p=p.then(g[w++],g[w++]);return p}getUri(e){e=yo(this.defaults,e);const t=dw(e.baseURL,e.url);return aw(t,e.params,e.paramsSerializer)}}O.forEach(["delete","get","head","options"],function(e){fo.prototype[e]=function(t,n){return this.request(yo(n||{},{method:e,url:t,data:(n||{}).data}))}});O.forEach(["post","put","patch"],function(e){function t(n){return function(s,c,d){return this.request(yo(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}fo.prototype[e]=t(),fo.prototype[e+"Form"]=t(!0)});class Eh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const c=new Promise(d=>{n.subscribe(d),s=d}).then(i);return c.cancel=function(){n.unsubscribe(s)},c},e(function(s,c,d){n.reason||(n.reason=new Ci(s,c,d),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Eh(function(i){e=i}),cancel:e}}}function TD(r){return function(t){return r.apply(null,t)}}function ED(r){return O.isObject(r)&&r.isAxiosError===!0}const Id={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Id).forEach(([r,e])=>{Id[e]=r});function vw(r){const e=new fo(r),t=jC(fo.prototype.request,e);return O.extend(t,fo.prototype,e,{allOwnKeys:!0}),O.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return vw(yo(r,i))},t}const Ve=vw(Sa);Ve.Axios=fo;Ve.CanceledError=Ci;Ve.CancelToken=Eh;Ve.isCancel=lw;Ve.VERSION=pw;Ve.toFormData=Vc;Ve.AxiosError=ue;Ve.Cancel=Ve.CanceledError;Ve.all=function(e){return Promise.all(e)};Ve.spread=TD;Ve.isAxiosError=ED;Ve.mergeConfig=yo;Ve.AxiosHeaders=Ht;Ve.formToJSON=r=>cw(O.isHTMLForm(r)?new FormData(r):r);Ve.getAdapter=mw.getAdapter;Ve.HttpStatusCode=Id;Ve.default=Ve;const{jToken:Ap}=qC(),Sh=()=>{const r=Ve.create({headers:{"Content-Type":"application/json"}});u.watch(Ap,i=>{r.interceptors.request.use(s=>(i&&(s.headers.Authorization=`Bearer ${i}`),s))},{immediate:!0});let e=1;r.interceptors.response.use(async i=>i,async i=>{var s;if(i.config&&i.config.headers){const c=i.config;if(((s=i.response)==null?void 0:s.status)===401&&e>0){e--;try{return c.headers.Authorization=`Bearer ${Ap.value}`,await r(c)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:s,header:c={},body:d,baseURL:f}){try{return f&&(r.defaults.baseURL=f),(await r({url:i,method:s,headers:c,data:d})).data}catch(g){if(console.error(`Request error [${s} ${i}]:`,g),Ve.isAxiosError(g)){const{response:p,message:w}=g;throw new Error(`Axios error: ${w}, Status: ${p==null?void 0:p.status}, URL: ${i}`)}throw g}}async function n({url:i,method:s,header:c,body:d,baseURL:f}){try{f&&(r.defaults.baseURL=f);const g=await r({url:i,method:s,headers:c,data:d});return{status:g.status,header:g.headers,body:g.data}}catch(g){if(Ve.isAxiosError(g)){const{response:p,message:w}=g;console.error(`Raw Request Error: ${w}, Status: ${p==null?void 0:p.status}`)}return Promise.reject(g)}}return Object.assign(r,{_request:t,rawRequest:n})},{request:Ip}=Sh(),bp=u.ref(null),kp=u.ref("default"),Fu=u.ref(null),Hu=u.ref({scope_type:"org"});function Ah(){var p,w;const{handleRedirect:r,account:e}=GC(),t=(w=(p=e.value)==null?void 0:p.idTokenClaims)==null?void 0:w.domain,n=u.computed(()=>({domain:t,environment:kp.value,...Hu.value})),i=u.computed(()=>Hu.value);async function s(){var C;(!e.value||!((C=e.value.idTokenClaims)!=null&&C.email))&&await r();try{await c(),await d()}catch{}}async function c(){var C,S;try{const T=(S=(C=e.value)==null?void 0:C.idTokenClaims)==null?void 0:S.email;if(!T)throw new Error("Email is undefined");const b=await Ip({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});Fu.value=b.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var C;try{if(!((C=Fu.value)!=null&&C.email))throw new Error("User email is undefined");const S=await Ip({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});bp.value=S.data??[]}catch(S){console.error("Failed to fetch user domains:",S)}}function f(C){Hu.value=C}function g(C){kp.value=C,f(n.value)}return{__init__:s,user:Fu,domain:t,userDomains:bp,setEnv:g,setScope:f,session:n,scope:i}}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function SD(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Xi={exports:{}};/**
60
+ `):" "+Tp(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n},adapters:Ad};function Bu(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ci(null,r)}function Ep(r){return Bu(r),r.headers=Ht.from(r.headers),r.data=Uu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),pw.getAdapter(r.adapter||Sa.adapter)(r).then(function(n){return Bu(r),n.data=Uu.call(r,r.transformResponse,n),n.headers=Ht.from(n.headers),n},function(n){return uw(n)||(Bu(r),n&&n.response&&(n.response.data=Uu.call(r,r.transformResponse,n.response),n.response.headers=Ht.from(n.response.headers))),Promise.reject(n)})}const vw="1.7.9",Kc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Kc[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const Sp={};Kc.transitional=function(e,t,n){function i(s,c){return"[Axios v"+vw+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return(s,c,d)=>{if(e===!1)throw new ue(i(c," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Sp[c]&&(Sp[c]=!0,console.warn(i(c," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,c,d):!0}};Kc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function _D(r,e,t){if(typeof r!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],c=e[s];if(c){const d=r[s],f=d===void 0||c(d,s,r);if(f!==!0)throw new ue("option "+s+" must be "+f,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+s,ue.ERR_BAD_OPTION)}}const Gs={assertOptions:_D,validators:Kc},jn=Gs.validators;class fo{constructor(e){this.defaults=e,this.interceptors={request:new mp,response:new mp}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
61
+ `+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=yo(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Gs.assertOptions(n,{silentJSONParsing:jn.transitional(jn.boolean),forcedJSONParsing:jn.transitional(jn.boolean),clarifyTimeoutError:jn.transitional(jn.boolean)},!1),i!=null&&(O.isFunction(i)?t.paramsSerializer={serialize:i}:Gs.assertOptions(i,{encode:jn.function,serialize:jn.function},!0)),Gs.assertOptions(t,{baseUrl:jn.spelling("baseURL"),withXsrfToken:jn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let c=s&&O.merge(s.common,s[t.method]);s&&O.forEach(["delete","get","head","post","put","patch","common"],T=>{delete s[T]}),t.headers=Ht.concat(c,s);const d=[];let f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(t)===!1||(f=f&&b.synchronous,d.unshift(b.fulfilled,b.rejected))});const g=[];this.interceptors.response.forEach(function(b){g.push(b.fulfilled,b.rejected)});let p,w=0,C;if(!f){const T=[Ep.bind(this),void 0];for(T.unshift.apply(T,d),T.push.apply(T,g),C=T.length,p=Promise.resolve(t);w<C;)p=p.then(T[w++],T[w++]);return p}C=d.length;let S=t;for(w=0;w<C;){const T=d[w++],b=d[w++];try{S=T(S)}catch(N){b.call(this,N);break}}try{p=Ep.call(this,S)}catch(T){return Promise.reject(T)}for(w=0,C=g.length;w<C;)p=p.then(g[w++],g[w++]);return p}getUri(e){e=yo(this.defaults,e);const t=hw(e.baseURL,e.url);return sw(t,e.params,e.paramsSerializer)}}O.forEach(["delete","get","head","options"],function(e){fo.prototype[e]=function(t,n){return this.request(yo(n||{},{method:e,url:t,data:(n||{}).data}))}});O.forEach(["post","put","patch"],function(e){function t(n){return function(s,c,d){return this.request(yo(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}fo.prototype[e]=t(),fo.prototype[e+"Form"]=t(!0)});class Eh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const c=new Promise(d=>{n.subscribe(d),s=d}).then(i);return c.cancel=function(){n.unsubscribe(s)},c},e(function(s,c,d){n.reason||(n.reason=new Ci(s,c,d),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Eh(function(i){e=i}),cancel:e}}}function TD(r){return function(t){return r.apply(null,t)}}function ED(r){return O.isObject(r)&&r.isAxiosError===!0}const Id={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Id).forEach(([r,e])=>{Id[e]=r});function yw(r){const e=new fo(r),t=YC(fo.prototype.request,e);return O.extend(t,fo.prototype,e,{allOwnKeys:!0}),O.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return yw(yo(r,i))},t}const Ve=yw(Sa);Ve.Axios=fo;Ve.CanceledError=Ci;Ve.CancelToken=Eh;Ve.isCancel=uw;Ve.VERSION=vw;Ve.toFormData=Vc;Ve.AxiosError=ue;Ve.Cancel=Ve.CanceledError;Ve.all=function(e){return Promise.all(e)};Ve.spread=TD;Ve.isAxiosError=ED;Ve.mergeConfig=yo;Ve.AxiosHeaders=Ht;Ve.formToJSON=r=>lw(O.isHTMLForm(r)?new FormData(r):r);Ve.getAdapter=pw.getAdapter;Ve.HttpStatusCode=Id;Ve.default=Ve;const{jToken:Ap}=GC(),Sh=()=>{const r=Ve.create({headers:{"Content-Type":"application/json"}});u.watch(Ap,i=>{r.interceptors.request.use(s=>(i&&(s.headers.Authorization=`Bearer ${i}`),s))},{immediate:!0});let e=1;r.interceptors.response.use(async i=>i,async i=>{var s;if(i.config&&i.config.headers){const c=i.config;if(((s=i.response)==null?void 0:s.status)===401&&e>0){e--;try{return c.headers.Authorization=`Bearer ${Ap.value}`,await r(c)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:s,header:c={},body:d,baseURL:f}){try{return f&&(r.defaults.baseURL=f),(await r({url:i,method:s,headers:c,data:d})).data}catch(g){if(console.error(`Request error [${s} ${i}]:`,g),Ve.isAxiosError(g)){const{response:p,message:w}=g;throw new Error(`Axios error: ${w}, Status: ${p==null?void 0:p.status}, URL: ${i}`)}throw g}}async function n({url:i,method:s,header:c,body:d,baseURL:f}){try{f&&(r.defaults.baseURL=f);const g=await r({url:i,method:s,headers:c,data:d});return{status:g.status,header:g.headers,body:g.data}}catch(g){if(Ve.isAxiosError(g)){const{response:p,message:w}=g;console.error(`Raw Request Error: ${w}, Status: ${p==null?void 0:p.status}`)}return Promise.reject(g)}}return Object.assign(r,{_request:t,rawRequest:n})},{request:Ip}=Sh(),bp=u.ref(null),kp=u.ref("default"),Fu=u.ref(null),Hu=u.ref({scope_type:"org"});function Ah(){var p,w;const{handleRedirect:r,account:e}=jC(),t=(w=(p=e.value)==null?void 0:p.idTokenClaims)==null?void 0:w.domain,n=u.computed(()=>({domain:t,environment:kp.value,...Hu.value})),i=u.computed(()=>Hu.value);async function s(){var C;(!e.value||!((C=e.value.idTokenClaims)!=null&&C.email))&&await r();try{await c(),await d()}catch{}}async function c(){var C,S;try{const T=(S=(C=e.value)==null?void 0:C.idTokenClaims)==null?void 0:S.email;if(!T)throw new Error("Email is undefined");const b=await Ip({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});Fu.value=b.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var C;try{if(!((C=Fu.value)!=null&&C.email))throw new Error("User email is undefined");const S=await Ip({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});bp.value=S.data??[]}catch(S){console.error("Failed to fetch user domains:",S)}}function f(C){Hu.value=C}function g(C){kp.value=C,f(n.value)}return{__init__:s,user:Fu,domain:t,userDomains:bp,setEnv:g,setScope:f,session:n,scope:i}}var Os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function SD(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Xi={exports:{}};/**
62
62
  * @license
63
63
  * Lodash <https://lodash.com/>
64
64
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
65
65
  * Released under MIT license <https://lodash.com/license>
66
66
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
67
67
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
68
- */var AD=Xi.exports,Rp;function ID(){return Rp||(Rp=1,function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,p="__lodash_placeholder__",w=1,C=2,S=4,T=1,b=2,N=1,K=2,H=4,V=8,z=16,Q=32,we=64,W=128,et=256,_e=512,Y=30,G="...",Te=800,Le=16,vt=1,An=2,sn=3,Nt=1/0,Je=9007199254740991,yt=17976931348623157e292,Ei=NaN,Vt=4294967295,qc=Vt-1,Iw=Vt>>>1,bw=[["ary",W],["bind",N],["bindKey",K],["curry",V],["curryRight",z],["flip",_e],["partial",Q],["partialRight",we],["rearg",et]],_o="[object Arguments]",Aa="[object Array]",kw="[object AsyncFunction]",Si="[object Boolean]",Ai="[object Date]",Rw="[object DOMException]",Ia="[object Error]",ba="[object Function]",bh="[object GeneratorFunction]",In="[object Map]",Ii="[object Number]",Ow="[object Null]",ir="[object Object]",kh="[object Promise]",Nw="[object Proxy]",bi="[object RegExp]",bn="[object Set]",ki="[object String]",ka="[object Symbol]",Pw="[object Undefined]",Ri="[object WeakMap]",Mw="[object WeakSet]",Oi="[object ArrayBuffer]",To="[object DataView]",Gc="[object Float32Array]",jc="[object Float64Array]",Yc="[object Int8Array]",Jc="[object Int16Array]",Qc="[object Int32Array]",Xc="[object Uint8Array]",Zc="[object Uint8ClampedArray]",el="[object Uint16Array]",tl="[object Uint32Array]",Dw=/\b__p \+= '';/g,xw=/\b(__p \+=) '' \+/g,Lw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rh=/&(?:amp|lt|gt|quot|#39);/g,Oh=/[&<>"']/g,Uw=RegExp(Rh.source),Bw=RegExp(Oh.source),Fw=/<%-([\s\S]+?)%>/g,Hw=/<%([\s\S]+?)%>/g,Nh=/<%=([\s\S]+?)%>/g,Vw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$w=/^\w*$/,Kw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nl=/[\\^$.*+?()[\]{}|]/g,zw=RegExp(nl.source),rl=/^\s+/,Ww=/\s/,qw=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gw=/\{\n\/\* \[wrapped with (.+)\] \*/,jw=/,? & /,Yw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jw=/[()=,{}\[\]\/\s]/,Qw=/\\(\\)?/g,Xw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ph=/\w*$/,Zw=/^[-+]0x[0-9a-f]+$/i,e_=/^0b[01]+$/i,t_=/^\[object .+?Constructor\]$/,n_=/^0o[0-7]+$/i,r_=/^(?:0|[1-9]\d*)$/,o_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ra=/($^)/,i_=/['\n\r\u2028\u2029\\]/g,Oa="\\ud800-\\udfff",a_="\\u0300-\\u036f",s_="\\ufe20-\\ufe2f",c_="\\u20d0-\\u20ff",Mh=a_+s_+c_,Dh="\\u2700-\\u27bf",xh="a-z\\xdf-\\xf6\\xf8-\\xff",l_="\\xac\\xb1\\xd7\\xf7",u_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d_="\\u2000-\\u206f",h_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uh="\\ufe0e\\ufe0f",Bh=l_+u_+d_+h_,ol="['’]",f_="["+Oa+"]",Fh="["+Bh+"]",Na="["+Mh+"]",Hh="\\d+",g_="["+Dh+"]",Vh="["+xh+"]",$h="[^"+Oa+Bh+Hh+Dh+xh+Lh+"]",il="\\ud83c[\\udffb-\\udfff]",m_="(?:"+Na+"|"+il+")",Kh="[^"+Oa+"]",al="(?:\\ud83c[\\udde6-\\uddff]){2}",sl="[\\ud800-\\udbff][\\udc00-\\udfff]",Eo="["+Lh+"]",zh="\\u200d",Wh="(?:"+Vh+"|"+$h+")",p_="(?:"+Eo+"|"+$h+")",qh="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",Gh="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",jh=m_+"?",Yh="["+Uh+"]?",v_="(?:"+zh+"(?:"+[Kh,al,sl].join("|")+")"+Yh+jh+")*",y_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",C_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jh=Yh+jh+v_,w_="(?:"+[g_,al,sl].join("|")+")"+Jh,__="(?:"+[Kh+Na+"?",Na,al,sl,f_].join("|")+")",T_=RegExp(ol,"g"),E_=RegExp(Na,"g"),cl=RegExp(il+"(?="+il+")|"+__+Jh,"g"),S_=RegExp([Eo+"?"+Vh+"+"+qh+"(?="+[Fh,Eo,"$"].join("|")+")",p_+"+"+Gh+"(?="+[Fh,Eo+Wh,"$"].join("|")+")",Eo+"?"+Wh+"+"+qh,Eo+"+"+Gh,C_,y_,Hh,w_].join("|"),"g"),A_=RegExp("["+zh+Oa+Mh+Uh+"]"),I_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,b_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],k_=-1,De={};De[Gc]=De[jc]=De[Yc]=De[Jc]=De[Qc]=De[Xc]=De[Zc]=De[el]=De[tl]=!0,De[_o]=De[Aa]=De[Oi]=De[Si]=De[To]=De[Ai]=De[Ia]=De[ba]=De[In]=De[Ii]=De[ir]=De[bi]=De[bn]=De[ki]=De[Ri]=!1;var Pe={};Pe[_o]=Pe[Aa]=Pe[Oi]=Pe[To]=Pe[Si]=Pe[Ai]=Pe[Gc]=Pe[jc]=Pe[Yc]=Pe[Jc]=Pe[Qc]=Pe[In]=Pe[Ii]=Pe[ir]=Pe[bi]=Pe[bn]=Pe[ki]=Pe[ka]=Pe[Xc]=Pe[Zc]=Pe[el]=Pe[tl]=!0,Pe[Ia]=Pe[ba]=Pe[Ri]=!1;var R_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},O_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},N_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},P_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},M_=parseFloat,D_=parseInt,Qh=typeof Os=="object"&&Os&&Os.Object===Object&&Os,x_=typeof self=="object"&&self&&self.Object===Object&&self,ut=Qh||x_||Function("return this")(),ll=e&&!e.nodeType&&e,jr=ll&&!0&&r&&!r.nodeType&&r,Xh=jr&&jr.exports===ll,ul=Xh&&Qh.process,cn=function(){try{var A=jr&&jr.require&&jr.require("util").types;return A||ul&&ul.binding&&ul.binding("util")}catch{}}(),Zh=cn&&cn.isArrayBuffer,ef=cn&&cn.isDate,tf=cn&&cn.isMap,nf=cn&&cn.isRegExp,rf=cn&&cn.isSet,of=cn&&cn.isTypedArray;function $t(A,M,R){switch(R.length){case 0:return A.call(M);case 1:return A.call(M,R[0]);case 2:return A.call(M,R[0],R[1]);case 3:return A.call(M,R[0],R[1],R[2])}return A.apply(M,R)}function L_(A,M,R,q){for(var ae=-1,Ee=A==null?0:A.length;++ae<Ee;){var tt=A[ae];M(q,tt,R(tt),A)}return q}function ln(A,M){for(var R=-1,q=A==null?0:A.length;++R<q&&M(A[R],R,A)!==!1;);return A}function U_(A,M){for(var R=A==null?0:A.length;R--&&M(A[R],R,A)!==!1;);return A}function af(A,M){for(var R=-1,q=A==null?0:A.length;++R<q;)if(!M(A[R],R,A))return!1;return!0}function Ir(A,M){for(var R=-1,q=A==null?0:A.length,ae=0,Ee=[];++R<q;){var tt=A[R];M(tt,R,A)&&(Ee[ae++]=tt)}return Ee}function Pa(A,M){var R=A==null?0:A.length;return!!R&&So(A,M,0)>-1}function dl(A,M,R){for(var q=-1,ae=A==null?0:A.length;++q<ae;)if(R(M,A[q]))return!0;return!1}function Ue(A,M){for(var R=-1,q=A==null?0:A.length,ae=Array(q);++R<q;)ae[R]=M(A[R],R,A);return ae}function br(A,M){for(var R=-1,q=M.length,ae=A.length;++R<q;)A[ae+R]=M[R];return A}function hl(A,M,R,q){var ae=-1,Ee=A==null?0:A.length;for(q&&Ee&&(R=A[++ae]);++ae<Ee;)R=M(R,A[ae],ae,A);return R}function B_(A,M,R,q){var ae=A==null?0:A.length;for(q&&ae&&(R=A[--ae]);ae--;)R=M(R,A[ae],ae,A);return R}function fl(A,M){for(var R=-1,q=A==null?0:A.length;++R<q;)if(M(A[R],R,A))return!0;return!1}var F_=gl("length");function H_(A){return A.split("")}function V_(A){return A.match(Yw)||[]}function sf(A,M,R){var q;return R(A,function(ae,Ee,tt){if(M(ae,Ee,tt))return q=Ee,!1}),q}function Ma(A,M,R,q){for(var ae=A.length,Ee=R+(q?1:-1);q?Ee--:++Ee<ae;)if(M(A[Ee],Ee,A))return Ee;return-1}function So(A,M,R){return M===M?Z_(A,M,R):Ma(A,cf,R)}function $_(A,M,R,q){for(var ae=R-1,Ee=A.length;++ae<Ee;)if(q(A[ae],M))return ae;return-1}function cf(A){return A!==A}function lf(A,M){var R=A==null?0:A.length;return R?pl(A,M)/R:Ei}function gl(A){return function(M){return M==null?t:M[A]}}function ml(A){return function(M){return A==null?t:A[M]}}function uf(A,M,R,q,ae){return ae(A,function(Ee,tt,Oe){R=q?(q=!1,Ee):M(R,Ee,tt,Oe)}),R}function K_(A,M){var R=A.length;for(A.sort(M);R--;)A[R]=A[R].value;return A}function pl(A,M){for(var R,q=-1,ae=A.length;++q<ae;){var Ee=M(A[q]);Ee!==t&&(R=R===t?Ee:R+Ee)}return R}function vl(A,M){for(var R=-1,q=Array(A);++R<A;)q[R]=M(R);return q}function z_(A,M){return Ue(M,function(R){return[R,A[R]]})}function df(A){return A&&A.slice(0,mf(A)+1).replace(rl,"")}function Kt(A){return function(M){return A(M)}}function yl(A,M){return Ue(M,function(R){return A[R]})}function Ni(A,M){return A.has(M)}function hf(A,M){for(var R=-1,q=A.length;++R<q&&So(M,A[R],0)>-1;);return R}function ff(A,M){for(var R=A.length;R--&&So(M,A[R],0)>-1;);return R}function W_(A,M){for(var R=A.length,q=0;R--;)A[R]===M&&++q;return q}var q_=ml(R_),G_=ml(O_);function j_(A){return"\\"+P_[A]}function Y_(A,M){return A==null?t:A[M]}function Ao(A){return A_.test(A)}function J_(A){return I_.test(A)}function Q_(A){for(var M,R=[];!(M=A.next()).done;)R.push(M.value);return R}function Cl(A){var M=-1,R=Array(A.size);return A.forEach(function(q,ae){R[++M]=[ae,q]}),R}function gf(A,M){return function(R){return A(M(R))}}function kr(A,M){for(var R=-1,q=A.length,ae=0,Ee=[];++R<q;){var tt=A[R];(tt===M||tt===p)&&(A[R]=p,Ee[ae++]=R)}return Ee}function Da(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=q}),R}function X_(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=[q,q]}),R}function Z_(A,M,R){for(var q=R-1,ae=A.length;++q<ae;)if(A[q]===M)return q;return-1}function eT(A,M,R){for(var q=R+1;q--;)if(A[q]===M)return q;return q}function Io(A){return Ao(A)?nT(A):F_(A)}function kn(A){return Ao(A)?rT(A):H_(A)}function mf(A){for(var M=A.length;M--&&Ww.test(A.charAt(M)););return M}var tT=ml(N_);function nT(A){for(var M=cl.lastIndex=0;cl.test(A);)++M;return M}function rT(A){return A.match(cl)||[]}function oT(A){return A.match(S_)||[]}var iT=function A(M){M=M==null?ut:bo.defaults(ut.Object(),M,bo.pick(ut,b_));var R=M.Array,q=M.Date,ae=M.Error,Ee=M.Function,tt=M.Math,Oe=M.Object,wl=M.RegExp,aT=M.String,un=M.TypeError,xa=R.prototype,sT=Ee.prototype,ko=Oe.prototype,La=M["__core-js_shared__"],Ua=sT.toString,Ie=ko.hasOwnProperty,cT=0,pf=function(){var o=/[^.]+$/.exec(La&&La.keys&&La.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ba=ko.toString,lT=Ua.call(Oe),uT=ut._,dT=wl("^"+Ua.call(Ie).replace(nl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fa=Xh?M.Buffer:t,Rr=M.Symbol,Ha=M.Uint8Array,vf=Fa?Fa.allocUnsafe:t,Va=gf(Oe.getPrototypeOf,Oe),yf=Oe.create,Cf=ko.propertyIsEnumerable,$a=xa.splice,wf=Rr?Rr.isConcatSpreadable:t,Pi=Rr?Rr.iterator:t,Yr=Rr?Rr.toStringTag:t,Ka=function(){try{var o=eo(Oe,"defineProperty");return o({},"",{}),o}catch{}}(),hT=M.clearTimeout!==ut.clearTimeout&&M.clearTimeout,fT=q&&q.now!==ut.Date.now&&q.now,gT=M.setTimeout!==ut.setTimeout&&M.setTimeout,za=tt.ceil,Wa=tt.floor,_l=Oe.getOwnPropertySymbols,mT=Fa?Fa.isBuffer:t,_f=M.isFinite,pT=xa.join,vT=gf(Oe.keys,Oe),nt=tt.max,Ct=tt.min,yT=q.now,CT=M.parseInt,Tf=tt.random,wT=xa.reverse,Tl=eo(M,"DataView"),Mi=eo(M,"Map"),El=eo(M,"Promise"),Ro=eo(M,"Set"),Di=eo(M,"WeakMap"),xi=eo(Oe,"create"),qa=Di&&new Di,Oo={},_T=to(Tl),TT=to(Mi),ET=to(El),ST=to(Ro),AT=to(Di),Ga=Rr?Rr.prototype:t,Li=Ga?Ga.valueOf:t,Ef=Ga?Ga.toString:t;function v(o){if($e(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof dn)return o;if(Ie.call(o,"__wrapped__"))return Sg(o)}return new dn(o)}var No=function(){function o(){}return function(a){if(!He(a))return{};if(yf)return yf(a);o.prototype=a;var l=new o;return o.prototype=t,l}}();function ja(){}function dn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}v.templateSettings={escape:Fw,evaluate:Hw,interpolate:Nh,variable:"",imports:{_:v}},v.prototype=ja.prototype,v.prototype.constructor=v,dn.prototype=No(ja.prototype),dn.prototype.constructor=dn;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Vt,this.__views__=[]}function IT(){var o=new pe(this.__wrapped__);return o.__actions__=Pt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Pt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Pt(this.__views__),o}function bT(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function kT(){var o=this.__wrapped__.value(),a=this.__dir__,l=ce(o),h=a<0,m=l?o.length:0,y=HE(0,m,this.__views__),_=y.start,E=y.end,I=E-_,D=h?E:_-1,x=this.__iteratees__,L=x.length,$=0,J=Ct(I,this.__takeCount__);if(!l||!h&&m==I&&J==I)return Gf(o,this.__actions__);var ee=[];e:for(;I--&&$<J;){D+=a;for(var he=-1,te=o[D];++he<L;){var me=x[he],ve=me.iteratee,qt=me.type,kt=ve(te);if(qt==An)te=kt;else if(!kt){if(qt==vt)continue e;break e}}ee[$++]=te}return ee}pe.prototype=No(ja.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function RT(){this.__data__=xi?xi(null):{},this.size=0}function OT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function NT(o){var a=this.__data__;if(xi){var l=a[o];return l===f?t:l}return Ie.call(a,o)?a[o]:t}function PT(o){var a=this.__data__;return xi?a[o]!==t:Ie.call(a,o)}function MT(o,a){var l=this.__data__;return this.size+=this.has(o)?0:1,l[o]=xi&&a===t?f:a,this}Jr.prototype.clear=RT,Jr.prototype.delete=OT,Jr.prototype.get=NT,Jr.prototype.has=PT,Jr.prototype.set=MT;function ar(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function DT(){this.__data__=[],this.size=0}function xT(o){var a=this.__data__,l=Ya(a,o);if(l<0)return!1;var h=a.length-1;return l==h?a.pop():$a.call(a,l,1),--this.size,!0}function LT(o){var a=this.__data__,l=Ya(a,o);return l<0?t:a[l][1]}function UT(o){return Ya(this.__data__,o)>-1}function BT(o,a){var l=this.__data__,h=Ya(l,o);return h<0?(++this.size,l.push([o,a])):l[h][1]=a,this}ar.prototype.clear=DT,ar.prototype.delete=xT,ar.prototype.get=LT,ar.prototype.has=UT,ar.prototype.set=BT;function sr(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function FT(){this.size=0,this.__data__={hash:new Jr,map:new(Mi||ar),string:new Jr}}function HT(o){var a=ss(this,o).delete(o);return this.size-=a?1:0,a}function VT(o){return ss(this,o).get(o)}function $T(o){return ss(this,o).has(o)}function KT(o,a){var l=ss(this,o),h=l.size;return l.set(o,a),this.size+=l.size==h?0:1,this}sr.prototype.clear=FT,sr.prototype.delete=HT,sr.prototype.get=VT,sr.prototype.has=$T,sr.prototype.set=KT;function Qr(o){var a=-1,l=o==null?0:o.length;for(this.__data__=new sr;++a<l;)this.add(o[a])}function zT(o){return this.__data__.set(o,f),this}function WT(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=zT,Qr.prototype.has=WT;function Rn(o){var a=this.__data__=new ar(o);this.size=a.size}function qT(){this.__data__=new ar,this.size=0}function GT(o){var a=this.__data__,l=a.delete(o);return this.size=a.size,l}function jT(o){return this.__data__.get(o)}function YT(o){return this.__data__.has(o)}function JT(o,a){var l=this.__data__;if(l instanceof ar){var h=l.__data__;if(!Mi||h.length<i-1)return h.push([o,a]),this.size=++l.size,this;l=this.__data__=new sr(h)}return l.set(o,a),this.size=l.size,this}Rn.prototype.clear=qT,Rn.prototype.delete=GT,Rn.prototype.get=jT,Rn.prototype.has=YT,Rn.prototype.set=JT;function Sf(o,a){var l=ce(o),h=!l&&no(o),m=!l&&!h&&Dr(o),y=!l&&!h&&!m&&xo(o),_=l||h||m||y,E=_?vl(o.length,aT):[],I=E.length;for(var D in o)(a||Ie.call(o,D))&&!(_&&(D=="length"||m&&(D=="offset"||D=="parent")||y&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||dr(D,I)))&&E.push(D);return E}function Af(o){var a=o.length;return a?o[Dl(0,a-1)]:t}function QT(o,a){return cs(Pt(o),Xr(a,0,o.length))}function XT(o){return cs(Pt(o))}function Sl(o,a,l){(l!==t&&!On(o[a],l)||l===t&&!(a in o))&&cr(o,a,l)}function Ui(o,a,l){var h=o[a];(!(Ie.call(o,a)&&On(h,l))||l===t&&!(a in o))&&cr(o,a,l)}function Ya(o,a){for(var l=o.length;l--;)if(On(o[l][0],a))return l;return-1}function ZT(o,a,l,h){return Or(o,function(m,y,_){a(h,m,l(m),_)}),h}function If(o,a){return o&&Wn(a,at(a),o)}function eE(o,a){return o&&Wn(a,Dt(a),o)}function cr(o,a,l){a=="__proto__"&&Ka?Ka(o,a,{configurable:!0,enumerable:!0,value:l,writable:!0}):o[a]=l}function Al(o,a){for(var l=-1,h=a.length,m=R(h),y=o==null;++l<h;)m[l]=y?t:iu(o,a[l]);return m}function Xr(o,a,l){return o===o&&(l!==t&&(o=o<=l?o:l),a!==t&&(o=o>=a?o:a)),o}function hn(o,a,l,h,m,y){var _,E=a&w,I=a&C,D=a&S;if(l&&(_=m?l(o,h,m,y):l(o)),_!==t)return _;if(!He(o))return o;var x=ce(o);if(x){if(_=$E(o),!E)return Pt(o,_)}else{var L=wt(o),$=L==ba||L==bh;if(Dr(o))return Jf(o,E);if(L==ir||L==_o||$&&!m){if(_=I||$?{}:mg(o),!E)return I?NE(o,eE(_,o)):OE(o,If(_,o))}else{if(!Pe[L])return m?o:{};_=KE(o,L,E)}}y||(y=new Rn);var J=y.get(o);if(J)return J;y.set(o,_),zg(o)?o.forEach(function(te){_.add(hn(te,a,l,te,o,y))}):$g(o)&&o.forEach(function(te,me){_.set(me,hn(te,a,l,me,o,y))});var ee=D?I?Wl:zl:I?Dt:at,he=x?t:ee(o);return ln(he||o,function(te,me){he&&(me=te,te=o[me]),Ui(_,me,hn(te,a,l,me,o,y))}),_}function tE(o){var a=at(o);return function(l){return bf(l,o,a)}}function bf(o,a,l){var h=l.length;if(o==null)return!h;for(o=Oe(o);h--;){var m=l[h],y=a[m],_=o[m];if(_===t&&!(m in o)||!y(_))return!1}return!0}function kf(o,a,l){if(typeof o!="function")throw new un(c);return zi(function(){o.apply(t,l)},a)}function Bi(o,a,l,h){var m=-1,y=Pa,_=!0,E=o.length,I=[],D=a.length;if(!E)return I;l&&(a=Ue(a,Kt(l))),h?(y=dl,_=!1):a.length>=i&&(y=Ni,_=!1,a=new Qr(a));e:for(;++m<E;){var x=o[m],L=l==null?x:l(x);if(x=h||x!==0?x:0,_&&L===L){for(var $=D;$--;)if(a[$]===L)continue e;I.push(x)}else y(a,L,h)||I.push(x)}return I}var Or=tg(zn),Rf=tg(bl,!0);function nE(o,a){var l=!0;return Or(o,function(h,m,y){return l=!!a(h,m,y),l}),l}function Ja(o,a,l){for(var h=-1,m=o.length;++h<m;){var y=o[h],_=a(y);if(_!=null&&(E===t?_===_&&!Wt(_):l(_,E)))var E=_,I=y}return I}function rE(o,a,l,h){var m=o.length;for(l=de(l),l<0&&(l=-l>m?0:m+l),h=h===t||h>m?m:de(h),h<0&&(h+=m),h=l>h?0:qg(h);l<h;)o[l++]=a;return o}function Of(o,a){var l=[];return Or(o,function(h,m,y){a(h,m,y)&&l.push(h)}),l}function dt(o,a,l,h,m){var y=-1,_=o.length;for(l||(l=WE),m||(m=[]);++y<_;){var E=o[y];a>0&&l(E)?a>1?dt(E,a-1,l,h,m):br(m,E):h||(m[m.length]=E)}return m}var Il=ng(),Nf=ng(!0);function zn(o,a){return o&&Il(o,a,at)}function bl(o,a){return o&&Nf(o,a,at)}function Qa(o,a){return Ir(a,function(l){return hr(o[l])})}function Zr(o,a){a=Pr(a,o);for(var l=0,h=a.length;o!=null&&l<h;)o=o[qn(a[l++])];return l&&l==h?o:t}function Pf(o,a,l){var h=a(o);return ce(o)?h:br(h,l(o))}function It(o){return o==null?o===t?Pw:Ow:Yr&&Yr in Oe(o)?FE(o):XE(o)}function kl(o,a){return o>a}function oE(o,a){return o!=null&&Ie.call(o,a)}function iE(o,a){return o!=null&&a in Oe(o)}function aE(o,a,l){return o>=Ct(a,l)&&o<nt(a,l)}function Rl(o,a,l){for(var h=l?dl:Pa,m=o[0].length,y=o.length,_=y,E=R(y),I=1/0,D=[];_--;){var x=o[_];_&&a&&(x=Ue(x,Kt(a))),I=Ct(x.length,I),E[_]=!l&&(a||m>=120&&x.length>=120)?new Qr(_&&x):t}x=o[0];var L=-1,$=E[0];e:for(;++L<m&&D.length<I;){var J=x[L],ee=a?a(J):J;if(J=l||J!==0?J:0,!($?Ni($,ee):h(D,ee,l))){for(_=y;--_;){var he=E[_];if(!(he?Ni(he,ee):h(o[_],ee,l)))continue e}$&&$.push(ee),D.push(J)}}return D}function sE(o,a,l,h){return zn(o,function(m,y,_){a(h,l(m),y,_)}),h}function Fi(o,a,l){a=Pr(a,o),o=Cg(o,a);var h=o==null?o:o[qn(gn(a))];return h==null?t:$t(h,o,l)}function Mf(o){return $e(o)&&It(o)==_o}function cE(o){return $e(o)&&It(o)==Oi}function lE(o){return $e(o)&&It(o)==Ai}function Hi(o,a,l,h,m){return o===a?!0:o==null||a==null||!$e(o)&&!$e(a)?o!==o&&a!==a:uE(o,a,l,h,Hi,m)}function uE(o,a,l,h,m,y){var _=ce(o),E=ce(a),I=_?Aa:wt(o),D=E?Aa:wt(a);I=I==_o?ir:I,D=D==_o?ir:D;var x=I==ir,L=D==ir,$=I==D;if($&&Dr(o)){if(!Dr(a))return!1;_=!0,x=!1}if($&&!x)return y||(y=new Rn),_||xo(o)?hg(o,a,l,h,m,y):UE(o,a,I,l,h,m,y);if(!(l&T)){var J=x&&Ie.call(o,"__wrapped__"),ee=L&&Ie.call(a,"__wrapped__");if(J||ee){var he=J?o.value():o,te=ee?a.value():a;return y||(y=new Rn),m(he,te,l,h,y)}}return $?(y||(y=new Rn),BE(o,a,l,h,m,y)):!1}function dE(o){return $e(o)&&wt(o)==In}function Ol(o,a,l,h){var m=l.length,y=m,_=!h;if(o==null)return!y;for(o=Oe(o);m--;){var E=l[m];if(_&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++m<y;){E=l[m];var I=E[0],D=o[I],x=E[1];if(_&&E[2]){if(D===t&&!(I in o))return!1}else{var L=new Rn;if(h)var $=h(D,x,I,o,a,L);if(!($===t?Hi(x,D,T|b,h,L):$))return!1}}return!0}function Df(o){if(!He(o)||GE(o))return!1;var a=hr(o)?dT:t_;return a.test(to(o))}function hE(o){return $e(o)&&It(o)==bi}function fE(o){return $e(o)&&wt(o)==bn}function gE(o){return $e(o)&&gs(o.length)&&!!De[It(o)]}function xf(o){return typeof o=="function"?o:o==null?xt:typeof o=="object"?ce(o)?Bf(o[0],o[1]):Uf(o):rm(o)}function Nl(o){if(!Ki(o))return vT(o);var a=[];for(var l in Oe(o))Ie.call(o,l)&&l!="constructor"&&a.push(l);return a}function mE(o){if(!He(o))return QE(o);var a=Ki(o),l=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||l.push(h);return l}function Pl(o,a){return o<a}function Lf(o,a){var l=-1,h=Mt(o)?R(o.length):[];return Or(o,function(m,y,_){h[++l]=a(m,y,_)}),h}function Uf(o){var a=Gl(o);return a.length==1&&a[0][2]?vg(a[0][0],a[0][1]):function(l){return l===o||Ol(l,o,a)}}function Bf(o,a){return Yl(o)&&pg(a)?vg(qn(o),a):function(l){var h=iu(l,o);return h===t&&h===a?au(l,o):Hi(a,h,T|b)}}function Xa(o,a,l,h,m){o!==a&&Il(a,function(y,_){if(m||(m=new Rn),He(y))pE(o,a,_,l,Xa,h,m);else{var E=h?h(Ql(o,_),y,_+"",o,a,m):t;E===t&&(E=y),Sl(o,_,E)}},Dt)}function pE(o,a,l,h,m,y,_){var E=Ql(o,l),I=Ql(a,l),D=_.get(I);if(D){Sl(o,l,D);return}var x=y?y(E,I,l+"",o,a,_):t,L=x===t;if(L){var $=ce(I),J=!$&&Dr(I),ee=!$&&!J&&xo(I);x=I,$||J||ee?ce(E)?x=E:Ge(E)?x=Pt(E):J?(L=!1,x=Jf(I,!0)):ee?(L=!1,x=Qf(I,!0)):x=[]:Wi(I)||no(I)?(x=E,no(E)?x=Gg(E):(!He(E)||hr(E))&&(x=mg(I))):L=!1}L&&(_.set(I,x),m(x,I,h,y,_),_.delete(I)),Sl(o,l,x)}function Ff(o,a){var l=o.length;if(l)return a+=a<0?l:0,dr(a,l)?o[a]:t}function Hf(o,a,l){a.length?a=Ue(a,function(y){return ce(y)?function(_){return Zr(_,y.length===1?y[0]:y)}:y}):a=[xt];var h=-1;a=Ue(a,Kt(Z()));var m=Lf(o,function(y,_,E){var I=Ue(a,function(D){return D(y)});return{criteria:I,index:++h,value:y}});return K_(m,function(y,_){return RE(y,_,l)})}function vE(o,a){return Vf(o,a,function(l,h){return au(o,h)})}function Vf(o,a,l){for(var h=-1,m=a.length,y={};++h<m;){var _=a[h],E=Zr(o,_);l(E,_)&&Vi(y,Pr(_,o),E)}return y}function yE(o){return function(a){return Zr(a,o)}}function Ml(o,a,l,h){var m=h?$_:So,y=-1,_=a.length,E=o;for(o===a&&(a=Pt(a)),l&&(E=Ue(o,Kt(l)));++y<_;)for(var I=0,D=a[y],x=l?l(D):D;(I=m(E,x,I,h))>-1;)E!==o&&$a.call(E,I,1),$a.call(o,I,1);return o}function $f(o,a){for(var l=o?a.length:0,h=l-1;l--;){var m=a[l];if(l==h||m!==y){var y=m;dr(m)?$a.call(o,m,1):Ul(o,m)}}return o}function Dl(o,a){return o+Wa(Tf()*(a-o+1))}function CE(o,a,l,h){for(var m=-1,y=nt(za((a-o)/(l||1)),0),_=R(y);y--;)_[h?y:++m]=o,o+=l;return _}function xl(o,a){var l="";if(!o||a<1||a>Je)return l;do a%2&&(l+=o),a=Wa(a/2),a&&(o+=o);while(a);return l}function fe(o,a){return Xl(yg(o,a,xt),o+"")}function wE(o){return Af(Lo(o))}function _E(o,a){var l=Lo(o);return cs(l,Xr(a,0,l.length))}function Vi(o,a,l,h){if(!He(o))return o;a=Pr(a,o);for(var m=-1,y=a.length,_=y-1,E=o;E!=null&&++m<y;){var I=qn(a[m]),D=l;if(I==="__proto__"||I==="constructor"||I==="prototype")return o;if(m!=_){var x=E[I];D=h?h(x,I,E):t,D===t&&(D=He(x)?x:dr(a[m+1])?[]:{})}Ui(E,I,D),E=E[I]}return o}var Kf=qa?function(o,a){return qa.set(o,a),o}:xt,TE=Ka?function(o,a){return Ka(o,"toString",{configurable:!0,enumerable:!1,value:cu(a),writable:!0})}:xt;function EE(o){return cs(Lo(o))}function fn(o,a,l){var h=-1,m=o.length;a<0&&(a=-a>m?0:m+a),l=l>m?m:l,l<0&&(l+=m),m=a>l?0:l-a>>>0,a>>>=0;for(var y=R(m);++h<m;)y[h]=o[h+a];return y}function SE(o,a){var l;return Or(o,function(h,m,y){return l=a(h,m,y),!l}),!!l}function Za(o,a,l){var h=0,m=o==null?h:o.length;if(typeof a=="number"&&a===a&&m<=Iw){for(;h<m;){var y=h+m>>>1,_=o[y];_!==null&&!Wt(_)&&(l?_<=a:_<a)?h=y+1:m=y}return m}return Ll(o,a,xt,l)}function Ll(o,a,l,h){var m=0,y=o==null?0:o.length;if(y===0)return 0;a=l(a);for(var _=a!==a,E=a===null,I=Wt(a),D=a===t;m<y;){var x=Wa((m+y)/2),L=l(o[x]),$=L!==t,J=L===null,ee=L===L,he=Wt(L);if(_)var te=h||ee;else D?te=ee&&(h||$):E?te=ee&&$&&(h||!J):I?te=ee&&$&&!J&&(h||!he):J||he?te=!1:te=h?L<=a:L<a;te?m=x+1:y=x}return Ct(y,qc)}function zf(o,a){for(var l=-1,h=o.length,m=0,y=[];++l<h;){var _=o[l],E=a?a(_):_;if(!l||!On(E,I)){var I=E;y[m++]=_===0?0:_}}return y}function Wf(o){return typeof o=="number"?o:Wt(o)?Ei:+o}function zt(o){if(typeof o=="string")return o;if(ce(o))return Ue(o,zt)+"";if(Wt(o))return Ef?Ef.call(o):"";var a=o+"";return a=="0"&&1/o==-Nt?"-0":a}function Nr(o,a,l){var h=-1,m=Pa,y=o.length,_=!0,E=[],I=E;if(l)_=!1,m=dl;else if(y>=i){var D=a?null:xE(o);if(D)return Da(D);_=!1,m=Ni,I=new Qr}else I=a?[]:E;e:for(;++h<y;){var x=o[h],L=a?a(x):x;if(x=l||x!==0?x:0,_&&L===L){for(var $=I.length;$--;)if(I[$]===L)continue e;a&&I.push(L),E.push(x)}else m(I,L,l)||(I!==E&&I.push(L),E.push(x))}return E}function Ul(o,a){return a=Pr(a,o),o=Cg(o,a),o==null||delete o[qn(gn(a))]}function qf(o,a,l,h){return Vi(o,a,l(Zr(o,a)),h)}function es(o,a,l,h){for(var m=o.length,y=h?m:-1;(h?y--:++y<m)&&a(o[y],y,o););return l?fn(o,h?0:y,h?y+1:m):fn(o,h?y+1:0,h?m:y)}function Gf(o,a){var l=o;return l instanceof pe&&(l=l.value()),hl(a,function(h,m){return m.func.apply(m.thisArg,br([h],m.args))},l)}function Bl(o,a,l){var h=o.length;if(h<2)return h?Nr(o[0]):[];for(var m=-1,y=R(h);++m<h;)for(var _=o[m],E=-1;++E<h;)E!=m&&(y[m]=Bi(y[m]||_,o[E],a,l));return Nr(dt(y,1),a,l)}function jf(o,a,l){for(var h=-1,m=o.length,y=a.length,_={};++h<m;){var E=h<y?a[h]:t;l(_,o[h],E)}return _}function Fl(o){return Ge(o)?o:[]}function Hl(o){return typeof o=="function"?o:xt}function Pr(o,a){return ce(o)?o:Yl(o,a)?[o]:Eg(Ae(o))}var AE=fe;function Mr(o,a,l){var h=o.length;return l=l===t?h:l,!a&&l>=h?o:fn(o,a,l)}var Yf=hT||function(o){return ut.clearTimeout(o)};function Jf(o,a){if(a)return o.slice();var l=o.length,h=vf?vf(l):new o.constructor(l);return o.copy(h),h}function Vl(o){var a=new o.constructor(o.byteLength);return new Ha(a).set(new Ha(o)),a}function IE(o,a){var l=a?Vl(o.buffer):o.buffer;return new o.constructor(l,o.byteOffset,o.byteLength)}function bE(o){var a=new o.constructor(o.source,Ph.exec(o));return a.lastIndex=o.lastIndex,a}function kE(o){return Li?Oe(Li.call(o)):{}}function Qf(o,a){var l=a?Vl(o.buffer):o.buffer;return new o.constructor(l,o.byteOffset,o.length)}function Xf(o,a){if(o!==a){var l=o!==t,h=o===null,m=o===o,y=Wt(o),_=a!==t,E=a===null,I=a===a,D=Wt(a);if(!E&&!D&&!y&&o>a||y&&_&&I&&!E&&!D||h&&_&&I||!l&&I||!m)return 1;if(!h&&!y&&!D&&o<a||D&&l&&m&&!h&&!y||E&&l&&m||!_&&m||!I)return-1}return 0}function RE(o,a,l){for(var h=-1,m=o.criteria,y=a.criteria,_=m.length,E=l.length;++h<_;){var I=Xf(m[h],y[h]);if(I){if(h>=E)return I;var D=l[h];return I*(D=="desc"?-1:1)}}return o.index-a.index}function Zf(o,a,l,h){for(var m=-1,y=o.length,_=l.length,E=-1,I=a.length,D=nt(y-_,0),x=R(I+D),L=!h;++E<I;)x[E]=a[E];for(;++m<_;)(L||m<y)&&(x[l[m]]=o[m]);for(;D--;)x[E++]=o[m++];return x}function eg(o,a,l,h){for(var m=-1,y=o.length,_=-1,E=l.length,I=-1,D=a.length,x=nt(y-E,0),L=R(x+D),$=!h;++m<x;)L[m]=o[m];for(var J=m;++I<D;)L[J+I]=a[I];for(;++_<E;)($||m<y)&&(L[J+l[_]]=o[m++]);return L}function Pt(o,a){var l=-1,h=o.length;for(a||(a=R(h));++l<h;)a[l]=o[l];return a}function Wn(o,a,l,h){var m=!l;l||(l={});for(var y=-1,_=a.length;++y<_;){var E=a[y],I=h?h(l[E],o[E],E,l,o):t;I===t&&(I=o[E]),m?cr(l,E,I):Ui(l,E,I)}return l}function OE(o,a){return Wn(o,jl(o),a)}function NE(o,a){return Wn(o,fg(o),a)}function ts(o,a){return function(l,h){var m=ce(l)?L_:ZT,y=a?a():{};return m(l,o,Z(h,2),y)}}function Po(o){return fe(function(a,l){var h=-1,m=l.length,y=m>1?l[m-1]:t,_=m>2?l[2]:t;for(y=o.length>3&&typeof y=="function"?(m--,y):t,_&&bt(l[0],l[1],_)&&(y=m<3?t:y,m=1),a=Oe(a);++h<m;){var E=l[h];E&&o(a,E,h,y)}return a})}function tg(o,a){return function(l,h){if(l==null)return l;if(!Mt(l))return o(l,h);for(var m=l.length,y=a?m:-1,_=Oe(l);(a?y--:++y<m)&&h(_[y],y,_)!==!1;);return l}}function ng(o){return function(a,l,h){for(var m=-1,y=Oe(a),_=h(a),E=_.length;E--;){var I=_[o?E:++m];if(l(y[I],I,y)===!1)break}return a}}function PE(o,a,l){var h=a&N,m=$i(o);function y(){var _=this&&this!==ut&&this instanceof y?m:o;return _.apply(h?l:this,arguments)}return y}function rg(o){return function(a){a=Ae(a);var l=Ao(a)?kn(a):t,h=l?l[0]:a.charAt(0),m=l?Mr(l,1).join(""):a.slice(1);return h[o]()+m}}function Mo(o){return function(a){return hl(tm(em(a).replace(T_,"")),o,"")}}function $i(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var l=No(o.prototype),h=o.apply(l,a);return He(h)?h:l}}function ME(o,a,l){var h=$i(o);function m(){for(var y=arguments.length,_=R(y),E=y,I=Do(m);E--;)_[E]=arguments[E];var D=y<3&&_[0]!==I&&_[y-1]!==I?[]:kr(_,I);if(y-=D.length,y<l)return cg(o,a,ns,m.placeholder,t,_,D,t,t,l-y);var x=this&&this!==ut&&this instanceof m?h:o;return $t(x,this,_)}return m}function og(o){return function(a,l,h){var m=Oe(a);if(!Mt(a)){var y=Z(l,3);a=at(a),l=function(E){return y(m[E],E,m)}}var _=o(a,l,h);return _>-1?m[y?a[_]:_]:t}}function ig(o){return ur(function(a){var l=a.length,h=l,m=dn.prototype.thru;for(o&&a.reverse();h--;){var y=a[h];if(typeof y!="function")throw new un(c);if(m&&!_&&as(y)=="wrapper")var _=new dn([],!0)}for(h=_?h:l;++h<l;){y=a[h];var E=as(y),I=E=="wrapper"?ql(y):t;I&&Jl(I[0])&&I[1]==(W|V|Q|et)&&!I[4].length&&I[9]==1?_=_[as(I[0])].apply(_,I[3]):_=y.length==1&&Jl(y)?_[E]():_.thru(y)}return function(){var D=arguments,x=D[0];if(_&&D.length==1&&ce(x))return _.plant(x).value();for(var L=0,$=l?a[L].apply(this,D):x;++L<l;)$=a[L].call(this,$);return $}})}function ns(o,a,l,h,m,y,_,E,I,D){var x=a&W,L=a&N,$=a&K,J=a&(V|z),ee=a&_e,he=$?t:$i(o);function te(){for(var me=arguments.length,ve=R(me),qt=me;qt--;)ve[qt]=arguments[qt];if(J)var kt=Do(te),Gt=W_(ve,kt);if(h&&(ve=Zf(ve,h,m,J)),y&&(ve=eg(ve,y,_,J)),me-=Gt,J&&me<D){var je=kr(ve,kt);return cg(o,a,ns,te.placeholder,l,ve,je,E,I,D-me)}var Nn=L?l:this,gr=$?Nn[o]:o;return me=ve.length,E?ve=ZE(ve,E):ee&&me>1&&ve.reverse(),x&&I<me&&(ve.length=I),this&&this!==ut&&this instanceof te&&(gr=he||$i(gr)),gr.apply(Nn,ve)}return te}function ag(o,a){return function(l,h){return sE(l,o,a(h),{})}}function rs(o,a){return function(l,h){var m;if(l===t&&h===t)return a;if(l!==t&&(m=l),h!==t){if(m===t)return h;typeof l=="string"||typeof h=="string"?(l=zt(l),h=zt(h)):(l=Wf(l),h=Wf(h)),m=o(l,h)}return m}}function $l(o){return ur(function(a){return a=Ue(a,Kt(Z())),fe(function(l){var h=this;return o(a,function(m){return $t(m,h,l)})})})}function os(o,a){a=a===t?" ":zt(a);var l=a.length;if(l<2)return l?xl(a,o):a;var h=xl(a,za(o/Io(a)));return Ao(a)?Mr(kn(h),0,o).join(""):h.slice(0,o)}function DE(o,a,l,h){var m=a&N,y=$i(o);function _(){for(var E=-1,I=arguments.length,D=-1,x=h.length,L=R(x+I),$=this&&this!==ut&&this instanceof _?y:o;++D<x;)L[D]=h[D];for(;I--;)L[D++]=arguments[++E];return $t($,m?l:this,L)}return _}function sg(o){return function(a,l,h){return h&&typeof h!="number"&&bt(a,l,h)&&(l=h=t),a=fr(a),l===t?(l=a,a=0):l=fr(l),h=h===t?a<l?1:-1:fr(h),CE(a,l,h,o)}}function is(o){return function(a,l){return typeof a=="string"&&typeof l=="string"||(a=mn(a),l=mn(l)),o(a,l)}}function cg(o,a,l,h,m,y,_,E,I,D){var x=a&V,L=x?_:t,$=x?t:_,J=x?y:t,ee=x?t:y;a|=x?Q:we,a&=~(x?we:Q),a&H||(a&=~(N|K));var he=[o,a,m,J,L,ee,$,E,I,D],te=l.apply(t,he);return Jl(o)&&wg(te,he),te.placeholder=h,_g(te,o,a)}function Kl(o){var a=tt[o];return function(l,h){if(l=mn(l),h=h==null?0:Ct(de(h),292),h&&_f(l)){var m=(Ae(l)+"e").split("e"),y=a(m[0]+"e"+(+m[1]+h));return m=(Ae(y)+"e").split("e"),+(m[0]+"e"+(+m[1]-h))}return a(l)}}var xE=Ro&&1/Da(new Ro([,-0]))[1]==Nt?function(o){return new Ro(o)}:du;function lg(o){return function(a){var l=wt(a);return l==In?Cl(a):l==bn?X_(a):z_(a,o(a))}}function lr(o,a,l,h,m,y,_,E){var I=a&K;if(!I&&typeof o!="function")throw new un(c);var D=h?h.length:0;if(D||(a&=~(Q|we),h=m=t),_=_===t?_:nt(de(_),0),E=E===t?E:de(E),D-=m?m.length:0,a&we){var x=h,L=m;h=m=t}var $=I?t:ql(o),J=[o,a,l,h,m,x,L,y,_,E];if($&&JE(J,$),o=J[0],a=J[1],l=J[2],h=J[3],m=J[4],E=J[9]=J[9]===t?I?0:o.length:nt(J[9]-D,0),!E&&a&(V|z)&&(a&=~(V|z)),!a||a==N)var ee=PE(o,a,l);else a==V||a==z?ee=ME(o,a,E):(a==Q||a==(N|Q))&&!m.length?ee=DE(o,a,l,h):ee=ns.apply(t,J);var he=$?Kf:wg;return _g(he(ee,J),o,a)}function ug(o,a,l,h){return o===t||On(o,ko[l])&&!Ie.call(h,l)?a:o}function dg(o,a,l,h,m,y){return He(o)&&He(a)&&(y.set(a,o),Xa(o,a,t,dg,y),y.delete(a)),o}function LE(o){return Wi(o)?t:o}function hg(o,a,l,h,m,y){var _=l&T,E=o.length,I=a.length;if(E!=I&&!(_&&I>E))return!1;var D=y.get(o),x=y.get(a);if(D&&x)return D==a&&x==o;var L=-1,$=!0,J=l&b?new Qr:t;for(y.set(o,a),y.set(a,o);++L<E;){var ee=o[L],he=a[L];if(h)var te=_?h(he,ee,L,a,o,y):h(ee,he,L,o,a,y);if(te!==t){if(te)continue;$=!1;break}if(J){if(!fl(a,function(me,ve){if(!Ni(J,ve)&&(ee===me||m(ee,me,l,h,y)))return J.push(ve)})){$=!1;break}}else if(!(ee===he||m(ee,he,l,h,y))){$=!1;break}}return y.delete(o),y.delete(a),$}function UE(o,a,l,h,m,y,_){switch(l){case To:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Oi:return!(o.byteLength!=a.byteLength||!y(new Ha(o),new Ha(a)));case Si:case Ai:case Ii:return On(+o,+a);case Ia:return o.name==a.name&&o.message==a.message;case bi:case ki:return o==a+"";case In:var E=Cl;case bn:var I=h&T;if(E||(E=Da),o.size!=a.size&&!I)return!1;var D=_.get(o);if(D)return D==a;h|=b,_.set(o,a);var x=hg(E(o),E(a),h,m,y,_);return _.delete(o),x;case ka:if(Li)return Li.call(o)==Li.call(a)}return!1}function BE(o,a,l,h,m,y){var _=l&T,E=zl(o),I=E.length,D=zl(a),x=D.length;if(I!=x&&!_)return!1;for(var L=I;L--;){var $=E[L];if(!(_?$ in a:Ie.call(a,$)))return!1}var J=y.get(o),ee=y.get(a);if(J&&ee)return J==a&&ee==o;var he=!0;y.set(o,a),y.set(a,o);for(var te=_;++L<I;){$=E[L];var me=o[$],ve=a[$];if(h)var qt=_?h(ve,me,$,a,o,y):h(me,ve,$,o,a,y);if(!(qt===t?me===ve||m(me,ve,l,h,y):qt)){he=!1;break}te||(te=$=="constructor")}if(he&&!te){var kt=o.constructor,Gt=a.constructor;kt!=Gt&&"constructor"in o&&"constructor"in a&&!(typeof kt=="function"&&kt instanceof kt&&typeof Gt=="function"&&Gt instanceof Gt)&&(he=!1)}return y.delete(o),y.delete(a),he}function ur(o){return Xl(yg(o,t,bg),o+"")}function zl(o){return Pf(o,at,jl)}function Wl(o){return Pf(o,Dt,fg)}var ql=qa?function(o){return qa.get(o)}:du;function as(o){for(var a=o.name+"",l=Oo[a],h=Ie.call(Oo,a)?l.length:0;h--;){var m=l[h],y=m.func;if(y==null||y==o)return m.name}return a}function Do(o){var a=Ie.call(v,"placeholder")?v:o;return a.placeholder}function Z(){var o=v.iteratee||lu;return o=o===lu?xf:o,arguments.length?o(arguments[0],arguments[1]):o}function ss(o,a){var l=o.__data__;return qE(a)?l[typeof a=="string"?"string":"hash"]:l.map}function Gl(o){for(var a=at(o),l=a.length;l--;){var h=a[l],m=o[h];a[l]=[h,m,pg(m)]}return a}function eo(o,a){var l=Y_(o,a);return Df(l)?l:t}function FE(o){var a=Ie.call(o,Yr),l=o[Yr];try{o[Yr]=t;var h=!0}catch{}var m=Ba.call(o);return h&&(a?o[Yr]=l:delete o[Yr]),m}var jl=_l?function(o){return o==null?[]:(o=Oe(o),Ir(_l(o),function(a){return Cf.call(o,a)}))}:hu,fg=_l?function(o){for(var a=[];o;)br(a,jl(o)),o=Va(o);return a}:hu,wt=It;(Tl&&wt(new Tl(new ArrayBuffer(1)))!=To||Mi&&wt(new Mi)!=In||El&&wt(El.resolve())!=kh||Ro&&wt(new Ro)!=bn||Di&&wt(new Di)!=Ri)&&(wt=function(o){var a=It(o),l=a==ir?o.constructor:t,h=l?to(l):"";if(h)switch(h){case _T:return To;case TT:return In;case ET:return kh;case ST:return bn;case AT:return Ri}return a});function HE(o,a,l){for(var h=-1,m=l.length;++h<m;){var y=l[h],_=y.size;switch(y.type){case"drop":o+=_;break;case"dropRight":a-=_;break;case"take":a=Ct(a,o+_);break;case"takeRight":o=nt(o,a-_);break}}return{start:o,end:a}}function VE(o){var a=o.match(Gw);return a?a[1].split(jw):[]}function gg(o,a,l){a=Pr(a,o);for(var h=-1,m=a.length,y=!1;++h<m;){var _=qn(a[h]);if(!(y=o!=null&&l(o,_)))break;o=o[_]}return y||++h!=m?y:(m=o==null?0:o.length,!!m&&gs(m)&&dr(_,m)&&(ce(o)||no(o)))}function $E(o){var a=o.length,l=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(l.index=o.index,l.input=o.input),l}function mg(o){return typeof o.constructor=="function"&&!Ki(o)?No(Va(o)):{}}function KE(o,a,l){var h=o.constructor;switch(a){case Oi:return Vl(o);case Si:case Ai:return new h(+o);case To:return IE(o,l);case Gc:case jc:case Yc:case Jc:case Qc:case Xc:case Zc:case el:case tl:return Qf(o,l);case In:return new h;case Ii:case ki:return new h(o);case bi:return bE(o);case bn:return new h;case ka:return kE(o)}}function zE(o,a){var l=a.length;if(!l)return o;var h=l-1;return a[h]=(l>1?"& ":"")+a[h],a=a.join(l>2?", ":" "),o.replace(qw,`{
68
+ */var AD=Xi.exports,Rp;function ID(){return Rp||(Rp=1,function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,p="__lodash_placeholder__",w=1,C=2,S=4,T=1,b=2,N=1,K=2,H=4,V=8,z=16,Q=32,we=64,W=128,et=256,_e=512,Y=30,G="...",Te=800,Le=16,vt=1,An=2,sn=3,Nt=1/0,Je=9007199254740991,yt=17976931348623157e292,Ei=NaN,Vt=4294967295,qc=Vt-1,bw=Vt>>>1,kw=[["ary",W],["bind",N],["bindKey",K],["curry",V],["curryRight",z],["flip",_e],["partial",Q],["partialRight",we],["rearg",et]],_o="[object Arguments]",Aa="[object Array]",Rw="[object AsyncFunction]",Si="[object Boolean]",Ai="[object Date]",Ow="[object DOMException]",Ia="[object Error]",ba="[object Function]",bh="[object GeneratorFunction]",In="[object Map]",Ii="[object Number]",Nw="[object Null]",ir="[object Object]",kh="[object Promise]",Pw="[object Proxy]",bi="[object RegExp]",bn="[object Set]",ki="[object String]",ka="[object Symbol]",Mw="[object Undefined]",Ri="[object WeakMap]",Dw="[object WeakSet]",Oi="[object ArrayBuffer]",To="[object DataView]",Gc="[object Float32Array]",jc="[object Float64Array]",Yc="[object Int8Array]",Jc="[object Int16Array]",Qc="[object Int32Array]",Xc="[object Uint8Array]",Zc="[object Uint8ClampedArray]",el="[object Uint16Array]",tl="[object Uint32Array]",xw=/\b__p \+= '';/g,Lw=/\b(__p \+=) '' \+/g,Uw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rh=/&(?:amp|lt|gt|quot|#39);/g,Oh=/[&<>"']/g,Bw=RegExp(Rh.source),Fw=RegExp(Oh.source),Hw=/<%-([\s\S]+?)%>/g,Vw=/<%([\s\S]+?)%>/g,Nh=/<%=([\s\S]+?)%>/g,$w=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kw=/^\w*$/,zw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nl=/[\\^$.*+?()[\]{}|]/g,Ww=RegExp(nl.source),rl=/^\s+/,qw=/\s/,Gw=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jw=/\{\n\/\* \[wrapped with (.+)\] \*/,Yw=/,? & /,Jw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qw=/[()=,{}\[\]\/\s]/,Xw=/\\(\\)?/g,Zw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ph=/\w*$/,e_=/^[-+]0x[0-9a-f]+$/i,t_=/^0b[01]+$/i,n_=/^\[object .+?Constructor\]$/,r_=/^0o[0-7]+$/i,o_=/^(?:0|[1-9]\d*)$/,i_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ra=/($^)/,a_=/['\n\r\u2028\u2029\\]/g,Oa="\\ud800-\\udfff",s_="\\u0300-\\u036f",c_="\\ufe20-\\ufe2f",l_="\\u20d0-\\u20ff",Mh=s_+c_+l_,Dh="\\u2700-\\u27bf",xh="a-z\\xdf-\\xf6\\xf8-\\xff",u_="\\xac\\xb1\\xd7\\xf7",d_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",h_="\\u2000-\\u206f",f_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lh="A-Z\\xc0-\\xd6\\xd8-\\xde",Uh="\\ufe0e\\ufe0f",Bh=u_+d_+h_+f_,ol="['’]",g_="["+Oa+"]",Fh="["+Bh+"]",Na="["+Mh+"]",Hh="\\d+",m_="["+Dh+"]",Vh="["+xh+"]",$h="[^"+Oa+Bh+Hh+Dh+xh+Lh+"]",il="\\ud83c[\\udffb-\\udfff]",p_="(?:"+Na+"|"+il+")",Kh="[^"+Oa+"]",al="(?:\\ud83c[\\udde6-\\uddff]){2}",sl="[\\ud800-\\udbff][\\udc00-\\udfff]",Eo="["+Lh+"]",zh="\\u200d",Wh="(?:"+Vh+"|"+$h+")",v_="(?:"+Eo+"|"+$h+")",qh="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",Gh="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",jh=p_+"?",Yh="["+Uh+"]?",y_="(?:"+zh+"(?:"+[Kh,al,sl].join("|")+")"+Yh+jh+")*",C_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",w_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jh=Yh+jh+y_,__="(?:"+[m_,al,sl].join("|")+")"+Jh,T_="(?:"+[Kh+Na+"?",Na,al,sl,g_].join("|")+")",E_=RegExp(ol,"g"),S_=RegExp(Na,"g"),cl=RegExp(il+"(?="+il+")|"+T_+Jh,"g"),A_=RegExp([Eo+"?"+Vh+"+"+qh+"(?="+[Fh,Eo,"$"].join("|")+")",v_+"+"+Gh+"(?="+[Fh,Eo+Wh,"$"].join("|")+")",Eo+"?"+Wh+"+"+qh,Eo+"+"+Gh,w_,C_,Hh,__].join("|"),"g"),I_=RegExp("["+zh+Oa+Mh+Uh+"]"),b_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,k_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],R_=-1,De={};De[Gc]=De[jc]=De[Yc]=De[Jc]=De[Qc]=De[Xc]=De[Zc]=De[el]=De[tl]=!0,De[_o]=De[Aa]=De[Oi]=De[Si]=De[To]=De[Ai]=De[Ia]=De[ba]=De[In]=De[Ii]=De[ir]=De[bi]=De[bn]=De[ki]=De[Ri]=!1;var Pe={};Pe[_o]=Pe[Aa]=Pe[Oi]=Pe[To]=Pe[Si]=Pe[Ai]=Pe[Gc]=Pe[jc]=Pe[Yc]=Pe[Jc]=Pe[Qc]=Pe[In]=Pe[Ii]=Pe[ir]=Pe[bi]=Pe[bn]=Pe[ki]=Pe[ka]=Pe[Xc]=Pe[Zc]=Pe[el]=Pe[tl]=!0,Pe[Ia]=Pe[ba]=Pe[Ri]=!1;var O_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},N_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},M_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},D_=parseFloat,x_=parseInt,Qh=typeof Os=="object"&&Os&&Os.Object===Object&&Os,L_=typeof self=="object"&&self&&self.Object===Object&&self,ut=Qh||L_||Function("return this")(),ll=e&&!e.nodeType&&e,jr=ll&&!0&&r&&!r.nodeType&&r,Xh=jr&&jr.exports===ll,ul=Xh&&Qh.process,cn=function(){try{var A=jr&&jr.require&&jr.require("util").types;return A||ul&&ul.binding&&ul.binding("util")}catch{}}(),Zh=cn&&cn.isArrayBuffer,ef=cn&&cn.isDate,tf=cn&&cn.isMap,nf=cn&&cn.isRegExp,rf=cn&&cn.isSet,of=cn&&cn.isTypedArray;function $t(A,M,R){switch(R.length){case 0:return A.call(M);case 1:return A.call(M,R[0]);case 2:return A.call(M,R[0],R[1]);case 3:return A.call(M,R[0],R[1],R[2])}return A.apply(M,R)}function U_(A,M,R,q){for(var ae=-1,Ee=A==null?0:A.length;++ae<Ee;){var tt=A[ae];M(q,tt,R(tt),A)}return q}function ln(A,M){for(var R=-1,q=A==null?0:A.length;++R<q&&M(A[R],R,A)!==!1;);return A}function B_(A,M){for(var R=A==null?0:A.length;R--&&M(A[R],R,A)!==!1;);return A}function af(A,M){for(var R=-1,q=A==null?0:A.length;++R<q;)if(!M(A[R],R,A))return!1;return!0}function Ir(A,M){for(var R=-1,q=A==null?0:A.length,ae=0,Ee=[];++R<q;){var tt=A[R];M(tt,R,A)&&(Ee[ae++]=tt)}return Ee}function Pa(A,M){var R=A==null?0:A.length;return!!R&&So(A,M,0)>-1}function dl(A,M,R){for(var q=-1,ae=A==null?0:A.length;++q<ae;)if(R(M,A[q]))return!0;return!1}function Ue(A,M){for(var R=-1,q=A==null?0:A.length,ae=Array(q);++R<q;)ae[R]=M(A[R],R,A);return ae}function br(A,M){for(var R=-1,q=M.length,ae=A.length;++R<q;)A[ae+R]=M[R];return A}function hl(A,M,R,q){var ae=-1,Ee=A==null?0:A.length;for(q&&Ee&&(R=A[++ae]);++ae<Ee;)R=M(R,A[ae],ae,A);return R}function F_(A,M,R,q){var ae=A==null?0:A.length;for(q&&ae&&(R=A[--ae]);ae--;)R=M(R,A[ae],ae,A);return R}function fl(A,M){for(var R=-1,q=A==null?0:A.length;++R<q;)if(M(A[R],R,A))return!0;return!1}var H_=gl("length");function V_(A){return A.split("")}function $_(A){return A.match(Jw)||[]}function sf(A,M,R){var q;return R(A,function(ae,Ee,tt){if(M(ae,Ee,tt))return q=Ee,!1}),q}function Ma(A,M,R,q){for(var ae=A.length,Ee=R+(q?1:-1);q?Ee--:++Ee<ae;)if(M(A[Ee],Ee,A))return Ee;return-1}function So(A,M,R){return M===M?eT(A,M,R):Ma(A,cf,R)}function K_(A,M,R,q){for(var ae=R-1,Ee=A.length;++ae<Ee;)if(q(A[ae],M))return ae;return-1}function cf(A){return A!==A}function lf(A,M){var R=A==null?0:A.length;return R?pl(A,M)/R:Ei}function gl(A){return function(M){return M==null?t:M[A]}}function ml(A){return function(M){return A==null?t:A[M]}}function uf(A,M,R,q,ae){return ae(A,function(Ee,tt,Oe){R=q?(q=!1,Ee):M(R,Ee,tt,Oe)}),R}function z_(A,M){var R=A.length;for(A.sort(M);R--;)A[R]=A[R].value;return A}function pl(A,M){for(var R,q=-1,ae=A.length;++q<ae;){var Ee=M(A[q]);Ee!==t&&(R=R===t?Ee:R+Ee)}return R}function vl(A,M){for(var R=-1,q=Array(A);++R<A;)q[R]=M(R);return q}function W_(A,M){return Ue(M,function(R){return[R,A[R]]})}function df(A){return A&&A.slice(0,mf(A)+1).replace(rl,"")}function Kt(A){return function(M){return A(M)}}function yl(A,M){return Ue(M,function(R){return A[R]})}function Ni(A,M){return A.has(M)}function hf(A,M){for(var R=-1,q=A.length;++R<q&&So(M,A[R],0)>-1;);return R}function ff(A,M){for(var R=A.length;R--&&So(M,A[R],0)>-1;);return R}function q_(A,M){for(var R=A.length,q=0;R--;)A[R]===M&&++q;return q}var G_=ml(O_),j_=ml(N_);function Y_(A){return"\\"+M_[A]}function J_(A,M){return A==null?t:A[M]}function Ao(A){return I_.test(A)}function Q_(A){return b_.test(A)}function X_(A){for(var M,R=[];!(M=A.next()).done;)R.push(M.value);return R}function Cl(A){var M=-1,R=Array(A.size);return A.forEach(function(q,ae){R[++M]=[ae,q]}),R}function gf(A,M){return function(R){return A(M(R))}}function kr(A,M){for(var R=-1,q=A.length,ae=0,Ee=[];++R<q;){var tt=A[R];(tt===M||tt===p)&&(A[R]=p,Ee[ae++]=R)}return Ee}function Da(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=q}),R}function Z_(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=[q,q]}),R}function eT(A,M,R){for(var q=R-1,ae=A.length;++q<ae;)if(A[q]===M)return q;return-1}function tT(A,M,R){for(var q=R+1;q--;)if(A[q]===M)return q;return q}function Io(A){return Ao(A)?rT(A):H_(A)}function kn(A){return Ao(A)?oT(A):V_(A)}function mf(A){for(var M=A.length;M--&&qw.test(A.charAt(M)););return M}var nT=ml(P_);function rT(A){for(var M=cl.lastIndex=0;cl.test(A);)++M;return M}function oT(A){return A.match(cl)||[]}function iT(A){return A.match(A_)||[]}var aT=function A(M){M=M==null?ut:bo.defaults(ut.Object(),M,bo.pick(ut,k_));var R=M.Array,q=M.Date,ae=M.Error,Ee=M.Function,tt=M.Math,Oe=M.Object,wl=M.RegExp,sT=M.String,un=M.TypeError,xa=R.prototype,cT=Ee.prototype,ko=Oe.prototype,La=M["__core-js_shared__"],Ua=cT.toString,Ie=ko.hasOwnProperty,lT=0,pf=function(){var o=/[^.]+$/.exec(La&&La.keys&&La.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ba=ko.toString,uT=Ua.call(Oe),dT=ut._,hT=wl("^"+Ua.call(Ie).replace(nl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fa=Xh?M.Buffer:t,Rr=M.Symbol,Ha=M.Uint8Array,vf=Fa?Fa.allocUnsafe:t,Va=gf(Oe.getPrototypeOf,Oe),yf=Oe.create,Cf=ko.propertyIsEnumerable,$a=xa.splice,wf=Rr?Rr.isConcatSpreadable:t,Pi=Rr?Rr.iterator:t,Yr=Rr?Rr.toStringTag:t,Ka=function(){try{var o=eo(Oe,"defineProperty");return o({},"",{}),o}catch{}}(),fT=M.clearTimeout!==ut.clearTimeout&&M.clearTimeout,gT=q&&q.now!==ut.Date.now&&q.now,mT=M.setTimeout!==ut.setTimeout&&M.setTimeout,za=tt.ceil,Wa=tt.floor,_l=Oe.getOwnPropertySymbols,pT=Fa?Fa.isBuffer:t,_f=M.isFinite,vT=xa.join,yT=gf(Oe.keys,Oe),nt=tt.max,Ct=tt.min,CT=q.now,wT=M.parseInt,Tf=tt.random,_T=xa.reverse,Tl=eo(M,"DataView"),Mi=eo(M,"Map"),El=eo(M,"Promise"),Ro=eo(M,"Set"),Di=eo(M,"WeakMap"),xi=eo(Oe,"create"),qa=Di&&new Di,Oo={},TT=to(Tl),ET=to(Mi),ST=to(El),AT=to(Ro),IT=to(Di),Ga=Rr?Rr.prototype:t,Li=Ga?Ga.valueOf:t,Ef=Ga?Ga.toString:t;function v(o){if($e(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof dn)return o;if(Ie.call(o,"__wrapped__"))return Sg(o)}return new dn(o)}var No=function(){function o(){}return function(a){if(!He(a))return{};if(yf)return yf(a);o.prototype=a;var l=new o;return o.prototype=t,l}}();function ja(){}function dn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}v.templateSettings={escape:Hw,evaluate:Vw,interpolate:Nh,variable:"",imports:{_:v}},v.prototype=ja.prototype,v.prototype.constructor=v,dn.prototype=No(ja.prototype),dn.prototype.constructor=dn;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Vt,this.__views__=[]}function bT(){var o=new pe(this.__wrapped__);return o.__actions__=Pt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Pt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Pt(this.__views__),o}function kT(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function RT(){var o=this.__wrapped__.value(),a=this.__dir__,l=ce(o),h=a<0,m=l?o.length:0,y=VE(0,m,this.__views__),_=y.start,E=y.end,I=E-_,D=h?E:_-1,x=this.__iteratees__,L=x.length,$=0,J=Ct(I,this.__takeCount__);if(!l||!h&&m==I&&J==I)return Gf(o,this.__actions__);var ee=[];e:for(;I--&&$<J;){D+=a;for(var he=-1,te=o[D];++he<L;){var me=x[he],ve=me.iteratee,qt=me.type,kt=ve(te);if(qt==An)te=kt;else if(!kt){if(qt==vt)continue e;break e}}ee[$++]=te}return ee}pe.prototype=No(ja.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function OT(){this.__data__=xi?xi(null):{},this.size=0}function NT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function PT(o){var a=this.__data__;if(xi){var l=a[o];return l===f?t:l}return Ie.call(a,o)?a[o]:t}function MT(o){var a=this.__data__;return xi?a[o]!==t:Ie.call(a,o)}function DT(o,a){var l=this.__data__;return this.size+=this.has(o)?0:1,l[o]=xi&&a===t?f:a,this}Jr.prototype.clear=OT,Jr.prototype.delete=NT,Jr.prototype.get=PT,Jr.prototype.has=MT,Jr.prototype.set=DT;function ar(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function xT(){this.__data__=[],this.size=0}function LT(o){var a=this.__data__,l=Ya(a,o);if(l<0)return!1;var h=a.length-1;return l==h?a.pop():$a.call(a,l,1),--this.size,!0}function UT(o){var a=this.__data__,l=Ya(a,o);return l<0?t:a[l][1]}function BT(o){return Ya(this.__data__,o)>-1}function FT(o,a){var l=this.__data__,h=Ya(l,o);return h<0?(++this.size,l.push([o,a])):l[h][1]=a,this}ar.prototype.clear=xT,ar.prototype.delete=LT,ar.prototype.get=UT,ar.prototype.has=BT,ar.prototype.set=FT;function sr(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var h=o[a];this.set(h[0],h[1])}}function HT(){this.size=0,this.__data__={hash:new Jr,map:new(Mi||ar),string:new Jr}}function VT(o){var a=ss(this,o).delete(o);return this.size-=a?1:0,a}function $T(o){return ss(this,o).get(o)}function KT(o){return ss(this,o).has(o)}function zT(o,a){var l=ss(this,o),h=l.size;return l.set(o,a),this.size+=l.size==h?0:1,this}sr.prototype.clear=HT,sr.prototype.delete=VT,sr.prototype.get=$T,sr.prototype.has=KT,sr.prototype.set=zT;function Qr(o){var a=-1,l=o==null?0:o.length;for(this.__data__=new sr;++a<l;)this.add(o[a])}function WT(o){return this.__data__.set(o,f),this}function qT(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=WT,Qr.prototype.has=qT;function Rn(o){var a=this.__data__=new ar(o);this.size=a.size}function GT(){this.__data__=new ar,this.size=0}function jT(o){var a=this.__data__,l=a.delete(o);return this.size=a.size,l}function YT(o){return this.__data__.get(o)}function JT(o){return this.__data__.has(o)}function QT(o,a){var l=this.__data__;if(l instanceof ar){var h=l.__data__;if(!Mi||h.length<i-1)return h.push([o,a]),this.size=++l.size,this;l=this.__data__=new sr(h)}return l.set(o,a),this.size=l.size,this}Rn.prototype.clear=GT,Rn.prototype.delete=jT,Rn.prototype.get=YT,Rn.prototype.has=JT,Rn.prototype.set=QT;function Sf(o,a){var l=ce(o),h=!l&&no(o),m=!l&&!h&&Dr(o),y=!l&&!h&&!m&&xo(o),_=l||h||m||y,E=_?vl(o.length,sT):[],I=E.length;for(var D in o)(a||Ie.call(o,D))&&!(_&&(D=="length"||m&&(D=="offset"||D=="parent")||y&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||dr(D,I)))&&E.push(D);return E}function Af(o){var a=o.length;return a?o[Dl(0,a-1)]:t}function XT(o,a){return cs(Pt(o),Xr(a,0,o.length))}function ZT(o){return cs(Pt(o))}function Sl(o,a,l){(l!==t&&!On(o[a],l)||l===t&&!(a in o))&&cr(o,a,l)}function Ui(o,a,l){var h=o[a];(!(Ie.call(o,a)&&On(h,l))||l===t&&!(a in o))&&cr(o,a,l)}function Ya(o,a){for(var l=o.length;l--;)if(On(o[l][0],a))return l;return-1}function eE(o,a,l,h){return Or(o,function(m,y,_){a(h,m,l(m),_)}),h}function If(o,a){return o&&Wn(a,at(a),o)}function tE(o,a){return o&&Wn(a,Dt(a),o)}function cr(o,a,l){a=="__proto__"&&Ka?Ka(o,a,{configurable:!0,enumerable:!0,value:l,writable:!0}):o[a]=l}function Al(o,a){for(var l=-1,h=a.length,m=R(h),y=o==null;++l<h;)m[l]=y?t:iu(o,a[l]);return m}function Xr(o,a,l){return o===o&&(l!==t&&(o=o<=l?o:l),a!==t&&(o=o>=a?o:a)),o}function hn(o,a,l,h,m,y){var _,E=a&w,I=a&C,D=a&S;if(l&&(_=m?l(o,h,m,y):l(o)),_!==t)return _;if(!He(o))return o;var x=ce(o);if(x){if(_=KE(o),!E)return Pt(o,_)}else{var L=wt(o),$=L==ba||L==bh;if(Dr(o))return Jf(o,E);if(L==ir||L==_o||$&&!m){if(_=I||$?{}:mg(o),!E)return I?PE(o,tE(_,o)):NE(o,If(_,o))}else{if(!Pe[L])return m?o:{};_=zE(o,L,E)}}y||(y=new Rn);var J=y.get(o);if(J)return J;y.set(o,_),zg(o)?o.forEach(function(te){_.add(hn(te,a,l,te,o,y))}):$g(o)&&o.forEach(function(te,me){_.set(me,hn(te,a,l,me,o,y))});var ee=D?I?Wl:zl:I?Dt:at,he=x?t:ee(o);return ln(he||o,function(te,me){he&&(me=te,te=o[me]),Ui(_,me,hn(te,a,l,me,o,y))}),_}function nE(o){var a=at(o);return function(l){return bf(l,o,a)}}function bf(o,a,l){var h=l.length;if(o==null)return!h;for(o=Oe(o);h--;){var m=l[h],y=a[m],_=o[m];if(_===t&&!(m in o)||!y(_))return!1}return!0}function kf(o,a,l){if(typeof o!="function")throw new un(c);return zi(function(){o.apply(t,l)},a)}function Bi(o,a,l,h){var m=-1,y=Pa,_=!0,E=o.length,I=[],D=a.length;if(!E)return I;l&&(a=Ue(a,Kt(l))),h?(y=dl,_=!1):a.length>=i&&(y=Ni,_=!1,a=new Qr(a));e:for(;++m<E;){var x=o[m],L=l==null?x:l(x);if(x=h||x!==0?x:0,_&&L===L){for(var $=D;$--;)if(a[$]===L)continue e;I.push(x)}else y(a,L,h)||I.push(x)}return I}var Or=tg(zn),Rf=tg(bl,!0);function rE(o,a){var l=!0;return Or(o,function(h,m,y){return l=!!a(h,m,y),l}),l}function Ja(o,a,l){for(var h=-1,m=o.length;++h<m;){var y=o[h],_=a(y);if(_!=null&&(E===t?_===_&&!Wt(_):l(_,E)))var E=_,I=y}return I}function oE(o,a,l,h){var m=o.length;for(l=de(l),l<0&&(l=-l>m?0:m+l),h=h===t||h>m?m:de(h),h<0&&(h+=m),h=l>h?0:qg(h);l<h;)o[l++]=a;return o}function Of(o,a){var l=[];return Or(o,function(h,m,y){a(h,m,y)&&l.push(h)}),l}function dt(o,a,l,h,m){var y=-1,_=o.length;for(l||(l=qE),m||(m=[]);++y<_;){var E=o[y];a>0&&l(E)?a>1?dt(E,a-1,l,h,m):br(m,E):h||(m[m.length]=E)}return m}var Il=ng(),Nf=ng(!0);function zn(o,a){return o&&Il(o,a,at)}function bl(o,a){return o&&Nf(o,a,at)}function Qa(o,a){return Ir(a,function(l){return hr(o[l])})}function Zr(o,a){a=Pr(a,o);for(var l=0,h=a.length;o!=null&&l<h;)o=o[qn(a[l++])];return l&&l==h?o:t}function Pf(o,a,l){var h=a(o);return ce(o)?h:br(h,l(o))}function It(o){return o==null?o===t?Mw:Nw:Yr&&Yr in Oe(o)?HE(o):ZE(o)}function kl(o,a){return o>a}function iE(o,a){return o!=null&&Ie.call(o,a)}function aE(o,a){return o!=null&&a in Oe(o)}function sE(o,a,l){return o>=Ct(a,l)&&o<nt(a,l)}function Rl(o,a,l){for(var h=l?dl:Pa,m=o[0].length,y=o.length,_=y,E=R(y),I=1/0,D=[];_--;){var x=o[_];_&&a&&(x=Ue(x,Kt(a))),I=Ct(x.length,I),E[_]=!l&&(a||m>=120&&x.length>=120)?new Qr(_&&x):t}x=o[0];var L=-1,$=E[0];e:for(;++L<m&&D.length<I;){var J=x[L],ee=a?a(J):J;if(J=l||J!==0?J:0,!($?Ni($,ee):h(D,ee,l))){for(_=y;--_;){var he=E[_];if(!(he?Ni(he,ee):h(o[_],ee,l)))continue e}$&&$.push(ee),D.push(J)}}return D}function cE(o,a,l,h){return zn(o,function(m,y,_){a(h,l(m),y,_)}),h}function Fi(o,a,l){a=Pr(a,o),o=Cg(o,a);var h=o==null?o:o[qn(gn(a))];return h==null?t:$t(h,o,l)}function Mf(o){return $e(o)&&It(o)==_o}function lE(o){return $e(o)&&It(o)==Oi}function uE(o){return $e(o)&&It(o)==Ai}function Hi(o,a,l,h,m){return o===a?!0:o==null||a==null||!$e(o)&&!$e(a)?o!==o&&a!==a:dE(o,a,l,h,Hi,m)}function dE(o,a,l,h,m,y){var _=ce(o),E=ce(a),I=_?Aa:wt(o),D=E?Aa:wt(a);I=I==_o?ir:I,D=D==_o?ir:D;var x=I==ir,L=D==ir,$=I==D;if($&&Dr(o)){if(!Dr(a))return!1;_=!0,x=!1}if($&&!x)return y||(y=new Rn),_||xo(o)?hg(o,a,l,h,m,y):BE(o,a,I,l,h,m,y);if(!(l&T)){var J=x&&Ie.call(o,"__wrapped__"),ee=L&&Ie.call(a,"__wrapped__");if(J||ee){var he=J?o.value():o,te=ee?a.value():a;return y||(y=new Rn),m(he,te,l,h,y)}}return $?(y||(y=new Rn),FE(o,a,l,h,m,y)):!1}function hE(o){return $e(o)&&wt(o)==In}function Ol(o,a,l,h){var m=l.length,y=m,_=!h;if(o==null)return!y;for(o=Oe(o);m--;){var E=l[m];if(_&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++m<y;){E=l[m];var I=E[0],D=o[I],x=E[1];if(_&&E[2]){if(D===t&&!(I in o))return!1}else{var L=new Rn;if(h)var $=h(D,x,I,o,a,L);if(!($===t?Hi(x,D,T|b,h,L):$))return!1}}return!0}function Df(o){if(!He(o)||jE(o))return!1;var a=hr(o)?hT:n_;return a.test(to(o))}function fE(o){return $e(o)&&It(o)==bi}function gE(o){return $e(o)&&wt(o)==bn}function mE(o){return $e(o)&&gs(o.length)&&!!De[It(o)]}function xf(o){return typeof o=="function"?o:o==null?xt:typeof o=="object"?ce(o)?Bf(o[0],o[1]):Uf(o):rm(o)}function Nl(o){if(!Ki(o))return yT(o);var a=[];for(var l in Oe(o))Ie.call(o,l)&&l!="constructor"&&a.push(l);return a}function pE(o){if(!He(o))return XE(o);var a=Ki(o),l=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||l.push(h);return l}function Pl(o,a){return o<a}function Lf(o,a){var l=-1,h=Mt(o)?R(o.length):[];return Or(o,function(m,y,_){h[++l]=a(m,y,_)}),h}function Uf(o){var a=Gl(o);return a.length==1&&a[0][2]?vg(a[0][0],a[0][1]):function(l){return l===o||Ol(l,o,a)}}function Bf(o,a){return Yl(o)&&pg(a)?vg(qn(o),a):function(l){var h=iu(l,o);return h===t&&h===a?au(l,o):Hi(a,h,T|b)}}function Xa(o,a,l,h,m){o!==a&&Il(a,function(y,_){if(m||(m=new Rn),He(y))vE(o,a,_,l,Xa,h,m);else{var E=h?h(Ql(o,_),y,_+"",o,a,m):t;E===t&&(E=y),Sl(o,_,E)}},Dt)}function vE(o,a,l,h,m,y,_){var E=Ql(o,l),I=Ql(a,l),D=_.get(I);if(D){Sl(o,l,D);return}var x=y?y(E,I,l+"",o,a,_):t,L=x===t;if(L){var $=ce(I),J=!$&&Dr(I),ee=!$&&!J&&xo(I);x=I,$||J||ee?ce(E)?x=E:Ge(E)?x=Pt(E):J?(L=!1,x=Jf(I,!0)):ee?(L=!1,x=Qf(I,!0)):x=[]:Wi(I)||no(I)?(x=E,no(E)?x=Gg(E):(!He(E)||hr(E))&&(x=mg(I))):L=!1}L&&(_.set(I,x),m(x,I,h,y,_),_.delete(I)),Sl(o,l,x)}function Ff(o,a){var l=o.length;if(l)return a+=a<0?l:0,dr(a,l)?o[a]:t}function Hf(o,a,l){a.length?a=Ue(a,function(y){return ce(y)?function(_){return Zr(_,y.length===1?y[0]:y)}:y}):a=[xt];var h=-1;a=Ue(a,Kt(Z()));var m=Lf(o,function(y,_,E){var I=Ue(a,function(D){return D(y)});return{criteria:I,index:++h,value:y}});return z_(m,function(y,_){return OE(y,_,l)})}function yE(o,a){return Vf(o,a,function(l,h){return au(o,h)})}function Vf(o,a,l){for(var h=-1,m=a.length,y={};++h<m;){var _=a[h],E=Zr(o,_);l(E,_)&&Vi(y,Pr(_,o),E)}return y}function CE(o){return function(a){return Zr(a,o)}}function Ml(o,a,l,h){var m=h?K_:So,y=-1,_=a.length,E=o;for(o===a&&(a=Pt(a)),l&&(E=Ue(o,Kt(l)));++y<_;)for(var I=0,D=a[y],x=l?l(D):D;(I=m(E,x,I,h))>-1;)E!==o&&$a.call(E,I,1),$a.call(o,I,1);return o}function $f(o,a){for(var l=o?a.length:0,h=l-1;l--;){var m=a[l];if(l==h||m!==y){var y=m;dr(m)?$a.call(o,m,1):Ul(o,m)}}return o}function Dl(o,a){return o+Wa(Tf()*(a-o+1))}function wE(o,a,l,h){for(var m=-1,y=nt(za((a-o)/(l||1)),0),_=R(y);y--;)_[h?y:++m]=o,o+=l;return _}function xl(o,a){var l="";if(!o||a<1||a>Je)return l;do a%2&&(l+=o),a=Wa(a/2),a&&(o+=o);while(a);return l}function fe(o,a){return Xl(yg(o,a,xt),o+"")}function _E(o){return Af(Lo(o))}function TE(o,a){var l=Lo(o);return cs(l,Xr(a,0,l.length))}function Vi(o,a,l,h){if(!He(o))return o;a=Pr(a,o);for(var m=-1,y=a.length,_=y-1,E=o;E!=null&&++m<y;){var I=qn(a[m]),D=l;if(I==="__proto__"||I==="constructor"||I==="prototype")return o;if(m!=_){var x=E[I];D=h?h(x,I,E):t,D===t&&(D=He(x)?x:dr(a[m+1])?[]:{})}Ui(E,I,D),E=E[I]}return o}var Kf=qa?function(o,a){return qa.set(o,a),o}:xt,EE=Ka?function(o,a){return Ka(o,"toString",{configurable:!0,enumerable:!1,value:cu(a),writable:!0})}:xt;function SE(o){return cs(Lo(o))}function fn(o,a,l){var h=-1,m=o.length;a<0&&(a=-a>m?0:m+a),l=l>m?m:l,l<0&&(l+=m),m=a>l?0:l-a>>>0,a>>>=0;for(var y=R(m);++h<m;)y[h]=o[h+a];return y}function AE(o,a){var l;return Or(o,function(h,m,y){return l=a(h,m,y),!l}),!!l}function Za(o,a,l){var h=0,m=o==null?h:o.length;if(typeof a=="number"&&a===a&&m<=bw){for(;h<m;){var y=h+m>>>1,_=o[y];_!==null&&!Wt(_)&&(l?_<=a:_<a)?h=y+1:m=y}return m}return Ll(o,a,xt,l)}function Ll(o,a,l,h){var m=0,y=o==null?0:o.length;if(y===0)return 0;a=l(a);for(var _=a!==a,E=a===null,I=Wt(a),D=a===t;m<y;){var x=Wa((m+y)/2),L=l(o[x]),$=L!==t,J=L===null,ee=L===L,he=Wt(L);if(_)var te=h||ee;else D?te=ee&&(h||$):E?te=ee&&$&&(h||!J):I?te=ee&&$&&!J&&(h||!he):J||he?te=!1:te=h?L<=a:L<a;te?m=x+1:y=x}return Ct(y,qc)}function zf(o,a){for(var l=-1,h=o.length,m=0,y=[];++l<h;){var _=o[l],E=a?a(_):_;if(!l||!On(E,I)){var I=E;y[m++]=_===0?0:_}}return y}function Wf(o){return typeof o=="number"?o:Wt(o)?Ei:+o}function zt(o){if(typeof o=="string")return o;if(ce(o))return Ue(o,zt)+"";if(Wt(o))return Ef?Ef.call(o):"";var a=o+"";return a=="0"&&1/o==-Nt?"-0":a}function Nr(o,a,l){var h=-1,m=Pa,y=o.length,_=!0,E=[],I=E;if(l)_=!1,m=dl;else if(y>=i){var D=a?null:LE(o);if(D)return Da(D);_=!1,m=Ni,I=new Qr}else I=a?[]:E;e:for(;++h<y;){var x=o[h],L=a?a(x):x;if(x=l||x!==0?x:0,_&&L===L){for(var $=I.length;$--;)if(I[$]===L)continue e;a&&I.push(L),E.push(x)}else m(I,L,l)||(I!==E&&I.push(L),E.push(x))}return E}function Ul(o,a){return a=Pr(a,o),o=Cg(o,a),o==null||delete o[qn(gn(a))]}function qf(o,a,l,h){return Vi(o,a,l(Zr(o,a)),h)}function es(o,a,l,h){for(var m=o.length,y=h?m:-1;(h?y--:++y<m)&&a(o[y],y,o););return l?fn(o,h?0:y,h?y+1:m):fn(o,h?y+1:0,h?m:y)}function Gf(o,a){var l=o;return l instanceof pe&&(l=l.value()),hl(a,function(h,m){return m.func.apply(m.thisArg,br([h],m.args))},l)}function Bl(o,a,l){var h=o.length;if(h<2)return h?Nr(o[0]):[];for(var m=-1,y=R(h);++m<h;)for(var _=o[m],E=-1;++E<h;)E!=m&&(y[m]=Bi(y[m]||_,o[E],a,l));return Nr(dt(y,1),a,l)}function jf(o,a,l){for(var h=-1,m=o.length,y=a.length,_={};++h<m;){var E=h<y?a[h]:t;l(_,o[h],E)}return _}function Fl(o){return Ge(o)?o:[]}function Hl(o){return typeof o=="function"?o:xt}function Pr(o,a){return ce(o)?o:Yl(o,a)?[o]:Eg(Ae(o))}var IE=fe;function Mr(o,a,l){var h=o.length;return l=l===t?h:l,!a&&l>=h?o:fn(o,a,l)}var Yf=fT||function(o){return ut.clearTimeout(o)};function Jf(o,a){if(a)return o.slice();var l=o.length,h=vf?vf(l):new o.constructor(l);return o.copy(h),h}function Vl(o){var a=new o.constructor(o.byteLength);return new Ha(a).set(new Ha(o)),a}function bE(o,a){var l=a?Vl(o.buffer):o.buffer;return new o.constructor(l,o.byteOffset,o.byteLength)}function kE(o){var a=new o.constructor(o.source,Ph.exec(o));return a.lastIndex=o.lastIndex,a}function RE(o){return Li?Oe(Li.call(o)):{}}function Qf(o,a){var l=a?Vl(o.buffer):o.buffer;return new o.constructor(l,o.byteOffset,o.length)}function Xf(o,a){if(o!==a){var l=o!==t,h=o===null,m=o===o,y=Wt(o),_=a!==t,E=a===null,I=a===a,D=Wt(a);if(!E&&!D&&!y&&o>a||y&&_&&I&&!E&&!D||h&&_&&I||!l&&I||!m)return 1;if(!h&&!y&&!D&&o<a||D&&l&&m&&!h&&!y||E&&l&&m||!_&&m||!I)return-1}return 0}function OE(o,a,l){for(var h=-1,m=o.criteria,y=a.criteria,_=m.length,E=l.length;++h<_;){var I=Xf(m[h],y[h]);if(I){if(h>=E)return I;var D=l[h];return I*(D=="desc"?-1:1)}}return o.index-a.index}function Zf(o,a,l,h){for(var m=-1,y=o.length,_=l.length,E=-1,I=a.length,D=nt(y-_,0),x=R(I+D),L=!h;++E<I;)x[E]=a[E];for(;++m<_;)(L||m<y)&&(x[l[m]]=o[m]);for(;D--;)x[E++]=o[m++];return x}function eg(o,a,l,h){for(var m=-1,y=o.length,_=-1,E=l.length,I=-1,D=a.length,x=nt(y-E,0),L=R(x+D),$=!h;++m<x;)L[m]=o[m];for(var J=m;++I<D;)L[J+I]=a[I];for(;++_<E;)($||m<y)&&(L[J+l[_]]=o[m++]);return L}function Pt(o,a){var l=-1,h=o.length;for(a||(a=R(h));++l<h;)a[l]=o[l];return a}function Wn(o,a,l,h){var m=!l;l||(l={});for(var y=-1,_=a.length;++y<_;){var E=a[y],I=h?h(l[E],o[E],E,l,o):t;I===t&&(I=o[E]),m?cr(l,E,I):Ui(l,E,I)}return l}function NE(o,a){return Wn(o,jl(o),a)}function PE(o,a){return Wn(o,fg(o),a)}function ts(o,a){return function(l,h){var m=ce(l)?U_:eE,y=a?a():{};return m(l,o,Z(h,2),y)}}function Po(o){return fe(function(a,l){var h=-1,m=l.length,y=m>1?l[m-1]:t,_=m>2?l[2]:t;for(y=o.length>3&&typeof y=="function"?(m--,y):t,_&&bt(l[0],l[1],_)&&(y=m<3?t:y,m=1),a=Oe(a);++h<m;){var E=l[h];E&&o(a,E,h,y)}return a})}function tg(o,a){return function(l,h){if(l==null)return l;if(!Mt(l))return o(l,h);for(var m=l.length,y=a?m:-1,_=Oe(l);(a?y--:++y<m)&&h(_[y],y,_)!==!1;);return l}}function ng(o){return function(a,l,h){for(var m=-1,y=Oe(a),_=h(a),E=_.length;E--;){var I=_[o?E:++m];if(l(y[I],I,y)===!1)break}return a}}function ME(o,a,l){var h=a&N,m=$i(o);function y(){var _=this&&this!==ut&&this instanceof y?m:o;return _.apply(h?l:this,arguments)}return y}function rg(o){return function(a){a=Ae(a);var l=Ao(a)?kn(a):t,h=l?l[0]:a.charAt(0),m=l?Mr(l,1).join(""):a.slice(1);return h[o]()+m}}function Mo(o){return function(a){return hl(tm(em(a).replace(E_,"")),o,"")}}function $i(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var l=No(o.prototype),h=o.apply(l,a);return He(h)?h:l}}function DE(o,a,l){var h=$i(o);function m(){for(var y=arguments.length,_=R(y),E=y,I=Do(m);E--;)_[E]=arguments[E];var D=y<3&&_[0]!==I&&_[y-1]!==I?[]:kr(_,I);if(y-=D.length,y<l)return cg(o,a,ns,m.placeholder,t,_,D,t,t,l-y);var x=this&&this!==ut&&this instanceof m?h:o;return $t(x,this,_)}return m}function og(o){return function(a,l,h){var m=Oe(a);if(!Mt(a)){var y=Z(l,3);a=at(a),l=function(E){return y(m[E],E,m)}}var _=o(a,l,h);return _>-1?m[y?a[_]:_]:t}}function ig(o){return ur(function(a){var l=a.length,h=l,m=dn.prototype.thru;for(o&&a.reverse();h--;){var y=a[h];if(typeof y!="function")throw new un(c);if(m&&!_&&as(y)=="wrapper")var _=new dn([],!0)}for(h=_?h:l;++h<l;){y=a[h];var E=as(y),I=E=="wrapper"?ql(y):t;I&&Jl(I[0])&&I[1]==(W|V|Q|et)&&!I[4].length&&I[9]==1?_=_[as(I[0])].apply(_,I[3]):_=y.length==1&&Jl(y)?_[E]():_.thru(y)}return function(){var D=arguments,x=D[0];if(_&&D.length==1&&ce(x))return _.plant(x).value();for(var L=0,$=l?a[L].apply(this,D):x;++L<l;)$=a[L].call(this,$);return $}})}function ns(o,a,l,h,m,y,_,E,I,D){var x=a&W,L=a&N,$=a&K,J=a&(V|z),ee=a&_e,he=$?t:$i(o);function te(){for(var me=arguments.length,ve=R(me),qt=me;qt--;)ve[qt]=arguments[qt];if(J)var kt=Do(te),Gt=q_(ve,kt);if(h&&(ve=Zf(ve,h,m,J)),y&&(ve=eg(ve,y,_,J)),me-=Gt,J&&me<D){var je=kr(ve,kt);return cg(o,a,ns,te.placeholder,l,ve,je,E,I,D-me)}var Nn=L?l:this,gr=$?Nn[o]:o;return me=ve.length,E?ve=eS(ve,E):ee&&me>1&&ve.reverse(),x&&I<me&&(ve.length=I),this&&this!==ut&&this instanceof te&&(gr=he||$i(gr)),gr.apply(Nn,ve)}return te}function ag(o,a){return function(l,h){return cE(l,o,a(h),{})}}function rs(o,a){return function(l,h){var m;if(l===t&&h===t)return a;if(l!==t&&(m=l),h!==t){if(m===t)return h;typeof l=="string"||typeof h=="string"?(l=zt(l),h=zt(h)):(l=Wf(l),h=Wf(h)),m=o(l,h)}return m}}function $l(o){return ur(function(a){return a=Ue(a,Kt(Z())),fe(function(l){var h=this;return o(a,function(m){return $t(m,h,l)})})})}function os(o,a){a=a===t?" ":zt(a);var l=a.length;if(l<2)return l?xl(a,o):a;var h=xl(a,za(o/Io(a)));return Ao(a)?Mr(kn(h),0,o).join(""):h.slice(0,o)}function xE(o,a,l,h){var m=a&N,y=$i(o);function _(){for(var E=-1,I=arguments.length,D=-1,x=h.length,L=R(x+I),$=this&&this!==ut&&this instanceof _?y:o;++D<x;)L[D]=h[D];for(;I--;)L[D++]=arguments[++E];return $t($,m?l:this,L)}return _}function sg(o){return function(a,l,h){return h&&typeof h!="number"&&bt(a,l,h)&&(l=h=t),a=fr(a),l===t?(l=a,a=0):l=fr(l),h=h===t?a<l?1:-1:fr(h),wE(a,l,h,o)}}function is(o){return function(a,l){return typeof a=="string"&&typeof l=="string"||(a=mn(a),l=mn(l)),o(a,l)}}function cg(o,a,l,h,m,y,_,E,I,D){var x=a&V,L=x?_:t,$=x?t:_,J=x?y:t,ee=x?t:y;a|=x?Q:we,a&=~(x?we:Q),a&H||(a&=~(N|K));var he=[o,a,m,J,L,ee,$,E,I,D],te=l.apply(t,he);return Jl(o)&&wg(te,he),te.placeholder=h,_g(te,o,a)}function Kl(o){var a=tt[o];return function(l,h){if(l=mn(l),h=h==null?0:Ct(de(h),292),h&&_f(l)){var m=(Ae(l)+"e").split("e"),y=a(m[0]+"e"+(+m[1]+h));return m=(Ae(y)+"e").split("e"),+(m[0]+"e"+(+m[1]-h))}return a(l)}}var LE=Ro&&1/Da(new Ro([,-0]))[1]==Nt?function(o){return new Ro(o)}:du;function lg(o){return function(a){var l=wt(a);return l==In?Cl(a):l==bn?Z_(a):W_(a,o(a))}}function lr(o,a,l,h,m,y,_,E){var I=a&K;if(!I&&typeof o!="function")throw new un(c);var D=h?h.length:0;if(D||(a&=~(Q|we),h=m=t),_=_===t?_:nt(de(_),0),E=E===t?E:de(E),D-=m?m.length:0,a&we){var x=h,L=m;h=m=t}var $=I?t:ql(o),J=[o,a,l,h,m,x,L,y,_,E];if($&&QE(J,$),o=J[0],a=J[1],l=J[2],h=J[3],m=J[4],E=J[9]=J[9]===t?I?0:o.length:nt(J[9]-D,0),!E&&a&(V|z)&&(a&=~(V|z)),!a||a==N)var ee=ME(o,a,l);else a==V||a==z?ee=DE(o,a,E):(a==Q||a==(N|Q))&&!m.length?ee=xE(o,a,l,h):ee=ns.apply(t,J);var he=$?Kf:wg;return _g(he(ee,J),o,a)}function ug(o,a,l,h){return o===t||On(o,ko[l])&&!Ie.call(h,l)?a:o}function dg(o,a,l,h,m,y){return He(o)&&He(a)&&(y.set(a,o),Xa(o,a,t,dg,y),y.delete(a)),o}function UE(o){return Wi(o)?t:o}function hg(o,a,l,h,m,y){var _=l&T,E=o.length,I=a.length;if(E!=I&&!(_&&I>E))return!1;var D=y.get(o),x=y.get(a);if(D&&x)return D==a&&x==o;var L=-1,$=!0,J=l&b?new Qr:t;for(y.set(o,a),y.set(a,o);++L<E;){var ee=o[L],he=a[L];if(h)var te=_?h(he,ee,L,a,o,y):h(ee,he,L,o,a,y);if(te!==t){if(te)continue;$=!1;break}if(J){if(!fl(a,function(me,ve){if(!Ni(J,ve)&&(ee===me||m(ee,me,l,h,y)))return J.push(ve)})){$=!1;break}}else if(!(ee===he||m(ee,he,l,h,y))){$=!1;break}}return y.delete(o),y.delete(a),$}function BE(o,a,l,h,m,y,_){switch(l){case To:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Oi:return!(o.byteLength!=a.byteLength||!y(new Ha(o),new Ha(a)));case Si:case Ai:case Ii:return On(+o,+a);case Ia:return o.name==a.name&&o.message==a.message;case bi:case ki:return o==a+"";case In:var E=Cl;case bn:var I=h&T;if(E||(E=Da),o.size!=a.size&&!I)return!1;var D=_.get(o);if(D)return D==a;h|=b,_.set(o,a);var x=hg(E(o),E(a),h,m,y,_);return _.delete(o),x;case ka:if(Li)return Li.call(o)==Li.call(a)}return!1}function FE(o,a,l,h,m,y){var _=l&T,E=zl(o),I=E.length,D=zl(a),x=D.length;if(I!=x&&!_)return!1;for(var L=I;L--;){var $=E[L];if(!(_?$ in a:Ie.call(a,$)))return!1}var J=y.get(o),ee=y.get(a);if(J&&ee)return J==a&&ee==o;var he=!0;y.set(o,a),y.set(a,o);for(var te=_;++L<I;){$=E[L];var me=o[$],ve=a[$];if(h)var qt=_?h(ve,me,$,a,o,y):h(me,ve,$,o,a,y);if(!(qt===t?me===ve||m(me,ve,l,h,y):qt)){he=!1;break}te||(te=$=="constructor")}if(he&&!te){var kt=o.constructor,Gt=a.constructor;kt!=Gt&&"constructor"in o&&"constructor"in a&&!(typeof kt=="function"&&kt instanceof kt&&typeof Gt=="function"&&Gt instanceof Gt)&&(he=!1)}return y.delete(o),y.delete(a),he}function ur(o){return Xl(yg(o,t,bg),o+"")}function zl(o){return Pf(o,at,jl)}function Wl(o){return Pf(o,Dt,fg)}var ql=qa?function(o){return qa.get(o)}:du;function as(o){for(var a=o.name+"",l=Oo[a],h=Ie.call(Oo,a)?l.length:0;h--;){var m=l[h],y=m.func;if(y==null||y==o)return m.name}return a}function Do(o){var a=Ie.call(v,"placeholder")?v:o;return a.placeholder}function Z(){var o=v.iteratee||lu;return o=o===lu?xf:o,arguments.length?o(arguments[0],arguments[1]):o}function ss(o,a){var l=o.__data__;return GE(a)?l[typeof a=="string"?"string":"hash"]:l.map}function Gl(o){for(var a=at(o),l=a.length;l--;){var h=a[l],m=o[h];a[l]=[h,m,pg(m)]}return a}function eo(o,a){var l=J_(o,a);return Df(l)?l:t}function HE(o){var a=Ie.call(o,Yr),l=o[Yr];try{o[Yr]=t;var h=!0}catch{}var m=Ba.call(o);return h&&(a?o[Yr]=l:delete o[Yr]),m}var jl=_l?function(o){return o==null?[]:(o=Oe(o),Ir(_l(o),function(a){return Cf.call(o,a)}))}:hu,fg=_l?function(o){for(var a=[];o;)br(a,jl(o)),o=Va(o);return a}:hu,wt=It;(Tl&&wt(new Tl(new ArrayBuffer(1)))!=To||Mi&&wt(new Mi)!=In||El&&wt(El.resolve())!=kh||Ro&&wt(new Ro)!=bn||Di&&wt(new Di)!=Ri)&&(wt=function(o){var a=It(o),l=a==ir?o.constructor:t,h=l?to(l):"";if(h)switch(h){case TT:return To;case ET:return In;case ST:return kh;case AT:return bn;case IT:return Ri}return a});function VE(o,a,l){for(var h=-1,m=l.length;++h<m;){var y=l[h],_=y.size;switch(y.type){case"drop":o+=_;break;case"dropRight":a-=_;break;case"take":a=Ct(a,o+_);break;case"takeRight":o=nt(o,a-_);break}}return{start:o,end:a}}function $E(o){var a=o.match(jw);return a?a[1].split(Yw):[]}function gg(o,a,l){a=Pr(a,o);for(var h=-1,m=a.length,y=!1;++h<m;){var _=qn(a[h]);if(!(y=o!=null&&l(o,_)))break;o=o[_]}return y||++h!=m?y:(m=o==null?0:o.length,!!m&&gs(m)&&dr(_,m)&&(ce(o)||no(o)))}function KE(o){var a=o.length,l=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(l.index=o.index,l.input=o.input),l}function mg(o){return typeof o.constructor=="function"&&!Ki(o)?No(Va(o)):{}}function zE(o,a,l){var h=o.constructor;switch(a){case Oi:return Vl(o);case Si:case Ai:return new h(+o);case To:return bE(o,l);case Gc:case jc:case Yc:case Jc:case Qc:case Xc:case Zc:case el:case tl:return Qf(o,l);case In:return new h;case Ii:case ki:return new h(o);case bi:return kE(o);case bn:return new h;case ka:return RE(o)}}function WE(o,a){var l=a.length;if(!l)return o;var h=l-1;return a[h]=(l>1?"& ":"")+a[h],a=a.join(l>2?", ":" "),o.replace(Gw,`{
69
69
  /* [wrapped with `+a+`] */
70
- `)}function WE(o){return ce(o)||no(o)||!!(wf&&o&&o[wf])}function dr(o,a){var l=typeof o;return a=a??Je,!!a&&(l=="number"||l!="symbol"&&r_.test(o))&&o>-1&&o%1==0&&o<a}function bt(o,a,l){if(!He(l))return!1;var h=typeof a;return(h=="number"?Mt(l)&&dr(a,l.length):h=="string"&&a in l)?On(l[a],o):!1}function Yl(o,a){if(ce(o))return!1;var l=typeof o;return l=="number"||l=="symbol"||l=="boolean"||o==null||Wt(o)?!0:$w.test(o)||!Vw.test(o)||a!=null&&o in Oe(a)}function qE(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function Jl(o){var a=as(o),l=v[a];if(typeof l!="function"||!(a in pe.prototype))return!1;if(o===l)return!0;var h=ql(l);return!!h&&o===h[0]}function GE(o){return!!pf&&pf in o}var jE=La?hr:fu;function Ki(o){var a=o&&o.constructor,l=typeof a=="function"&&a.prototype||ko;return o===l}function pg(o){return o===o&&!He(o)}function vg(o,a){return function(l){return l==null?!1:l[o]===a&&(a!==t||o in Oe(l))}}function YE(o){var a=hs(o,function(h){return l.size===g&&l.clear(),h}),l=a.cache;return a}function JE(o,a){var l=o[1],h=a[1],m=l|h,y=m<(N|K|W),_=h==W&&l==V||h==W&&l==et&&o[7].length<=a[8]||h==(W|et)&&a[7].length<=a[8]&&l==V;if(!(y||_))return o;h&N&&(o[2]=a[2],m|=l&N?0:H);var E=a[3];if(E){var I=o[3];o[3]=I?Zf(I,E,a[4]):E,o[4]=I?kr(o[3],p):a[4]}return E=a[5],E&&(I=o[5],o[5]=I?eg(I,E,a[6]):E,o[6]=I?kr(o[5],p):a[6]),E=a[7],E&&(o[7]=E),h&W&&(o[8]=o[8]==null?a[8]:Ct(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=m,o}function QE(o){var a=[];if(o!=null)for(var l in Oe(o))a.push(l);return a}function XE(o){return Ba.call(o)}function yg(o,a,l){return a=nt(a===t?o.length-1:a,0),function(){for(var h=arguments,m=-1,y=nt(h.length-a,0),_=R(y);++m<y;)_[m]=h[a+m];m=-1;for(var E=R(a+1);++m<a;)E[m]=h[m];return E[a]=l(_),$t(o,this,E)}}function Cg(o,a){return a.length<2?o:Zr(o,fn(a,0,-1))}function ZE(o,a){for(var l=o.length,h=Ct(a.length,l),m=Pt(o);h--;){var y=a[h];o[h]=dr(y,l)?m[y]:t}return o}function Ql(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var wg=Tg(Kf),zi=gT||function(o,a){return ut.setTimeout(o,a)},Xl=Tg(TE);function _g(o,a,l){var h=a+"";return Xl(o,zE(h,eS(VE(h),l)))}function Tg(o){var a=0,l=0;return function(){var h=yT(),m=Le-(h-l);if(l=h,m>0){if(++a>=Te)return arguments[0]}else a=0;return o.apply(t,arguments)}}function cs(o,a){var l=-1,h=o.length,m=h-1;for(a=a===t?h:a;++l<a;){var y=Dl(l,m),_=o[y];o[y]=o[l],o[l]=_}return o.length=a,o}var Eg=YE(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(Kw,function(l,h,m,y){a.push(m?y.replace(Qw,"$1"):h||l)}),a});function qn(o){if(typeof o=="string"||Wt(o))return o;var a=o+"";return a=="0"&&1/o==-Nt?"-0":a}function to(o){if(o!=null){try{return Ua.call(o)}catch{}try{return o+""}catch{}}return""}function eS(o,a){return ln(bw,function(l){var h="_."+l[0];a&l[1]&&!Pa(o,h)&&o.push(h)}),o.sort()}function Sg(o){if(o instanceof pe)return o.clone();var a=new dn(o.__wrapped__,o.__chain__);return a.__actions__=Pt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function tS(o,a,l){(l?bt(o,a,l):a===t)?a=1:a=nt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var m=0,y=0,_=R(za(h/a));m<h;)_[y++]=fn(o,m,m+=a);return _}function nS(o){for(var a=-1,l=o==null?0:o.length,h=0,m=[];++a<l;){var y=o[a];y&&(m[h++]=y)}return m}function rS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),l=arguments[0],h=o;h--;)a[h-1]=arguments[h];return br(ce(l)?Pt(l):[l],dt(a,1))}var oS=fe(function(o,a){return Ge(o)?Bi(o,dt(a,1,Ge,!0)):[]}),iS=fe(function(o,a){var l=gn(a);return Ge(l)&&(l=t),Ge(o)?Bi(o,dt(a,1,Ge,!0),Z(l,2)):[]}),aS=fe(function(o,a){var l=gn(a);return Ge(l)&&(l=t),Ge(o)?Bi(o,dt(a,1,Ge,!0),t,l):[]});function sS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),fn(o,a<0?0:a,h)):[]}function cS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),a=h-a,fn(o,0,a<0?0:a)):[]}function lS(o,a){return o&&o.length?es(o,Z(a,3),!0,!0):[]}function uS(o,a){return o&&o.length?es(o,Z(a,3),!0):[]}function dS(o,a,l,h){var m=o==null?0:o.length;return m?(l&&typeof l!="number"&&bt(o,a,l)&&(l=0,h=m),rE(o,a,l,h)):[]}function Ag(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=l==null?0:de(l);return m<0&&(m=nt(h+m,0)),Ma(o,Z(a,3),m)}function Ig(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=h-1;return l!==t&&(m=de(l),m=l<0?nt(h+m,0):Ct(m,h-1)),Ma(o,Z(a,3),m,!0)}function bg(o){var a=o==null?0:o.length;return a?dt(o,1):[]}function hS(o){var a=o==null?0:o.length;return a?dt(o,Nt):[]}function fS(o,a){var l=o==null?0:o.length;return l?(a=a===t?1:de(a),dt(o,a)):[]}function gS(o){for(var a=-1,l=o==null?0:o.length,h={};++a<l;){var m=o[a];h[m[0]]=m[1]}return h}function kg(o){return o&&o.length?o[0]:t}function mS(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=l==null?0:de(l);return m<0&&(m=nt(h+m,0)),So(o,a,m)}function pS(o){var a=o==null?0:o.length;return a?fn(o,0,-1):[]}var vS=fe(function(o){var a=Ue(o,Fl);return a.length&&a[0]===o[0]?Rl(a):[]}),yS=fe(function(o){var a=gn(o),l=Ue(o,Fl);return a===gn(l)?a=t:l.pop(),l.length&&l[0]===o[0]?Rl(l,Z(a,2)):[]}),CS=fe(function(o){var a=gn(o),l=Ue(o,Fl);return a=typeof a=="function"?a:t,a&&l.pop(),l.length&&l[0]===o[0]?Rl(l,t,a):[]});function wS(o,a){return o==null?"":pT.call(o,a)}function gn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function _S(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=h;return l!==t&&(m=de(l),m=m<0?nt(h+m,0):Ct(m,h-1)),a===a?eT(o,a,m):Ma(o,cf,m,!0)}function TS(o,a){return o&&o.length?Ff(o,de(a)):t}var ES=fe(Rg);function Rg(o,a){return o&&o.length&&a&&a.length?Ml(o,a):o}function SS(o,a,l){return o&&o.length&&a&&a.length?Ml(o,a,Z(l,2)):o}function AS(o,a,l){return o&&o.length&&a&&a.length?Ml(o,a,t,l):o}var IS=ur(function(o,a){var l=o==null?0:o.length,h=Al(o,a);return $f(o,Ue(a,function(m){return dr(m,l)?+m:m}).sort(Xf)),h});function bS(o,a){var l=[];if(!(o&&o.length))return l;var h=-1,m=[],y=o.length;for(a=Z(a,3);++h<y;){var _=o[h];a(_,h,o)&&(l.push(_),m.push(h))}return $f(o,m),l}function Zl(o){return o==null?o:wT.call(o)}function kS(o,a,l){var h=o==null?0:o.length;return h?(l&&typeof l!="number"&&bt(o,a,l)?(a=0,l=h):(a=a==null?0:de(a),l=l===t?h:de(l)),fn(o,a,l)):[]}function RS(o,a){return Za(o,a)}function OS(o,a,l){return Ll(o,a,Z(l,2))}function NS(o,a){var l=o==null?0:o.length;if(l){var h=Za(o,a);if(h<l&&On(o[h],a))return h}return-1}function PS(o,a){return Za(o,a,!0)}function MS(o,a,l){return Ll(o,a,Z(l,2),!0)}function DS(o,a){var l=o==null?0:o.length;if(l){var h=Za(o,a,!0)-1;if(On(o[h],a))return h}return-1}function xS(o){return o&&o.length?zf(o):[]}function LS(o,a){return o&&o.length?zf(o,Z(a,2)):[]}function US(o){var a=o==null?0:o.length;return a?fn(o,1,a):[]}function BS(o,a,l){return o&&o.length?(a=l||a===t?1:de(a),fn(o,0,a<0?0:a)):[]}function FS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),a=h-a,fn(o,a<0?0:a,h)):[]}function HS(o,a){return o&&o.length?es(o,Z(a,3),!1,!0):[]}function VS(o,a){return o&&o.length?es(o,Z(a,3)):[]}var $S=fe(function(o){return Nr(dt(o,1,Ge,!0))}),KS=fe(function(o){var a=gn(o);return Ge(a)&&(a=t),Nr(dt(o,1,Ge,!0),Z(a,2))}),zS=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Nr(dt(o,1,Ge,!0),t,a)});function WS(o){return o&&o.length?Nr(o):[]}function qS(o,a){return o&&o.length?Nr(o,Z(a,2)):[]}function GS(o,a){return a=typeof a=="function"?a:t,o&&o.length?Nr(o,t,a):[]}function eu(o){if(!(o&&o.length))return[];var a=0;return o=Ir(o,function(l){if(Ge(l))return a=nt(l.length,a),!0}),vl(a,function(l){return Ue(o,gl(l))})}function Og(o,a){if(!(o&&o.length))return[];var l=eu(o);return a==null?l:Ue(l,function(h){return $t(a,t,h)})}var jS=fe(function(o,a){return Ge(o)?Bi(o,a):[]}),YS=fe(function(o){return Bl(Ir(o,Ge))}),JS=fe(function(o){var a=gn(o);return Ge(a)&&(a=t),Bl(Ir(o,Ge),Z(a,2))}),QS=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Bl(Ir(o,Ge),t,a)}),XS=fe(eu);function ZS(o,a){return jf(o||[],a||[],Ui)}function eA(o,a){return jf(o||[],a||[],Vi)}var tA=fe(function(o){var a=o.length,l=a>1?o[a-1]:t;return l=typeof l=="function"?(o.pop(),l):t,Og(o,l)});function Ng(o){var a=v(o);return a.__chain__=!0,a}function nA(o,a){return a(o),o}function ls(o,a){return a(o)}var rA=ur(function(o){var a=o.length,l=a?o[0]:0,h=this.__wrapped__,m=function(y){return Al(y,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!dr(l)?this.thru(m):(h=h.slice(l,+l+(a?1:0)),h.__actions__.push({func:ls,args:[m],thisArg:t}),new dn(h,this.__chain__).thru(function(y){return a&&!y.length&&y.push(t),y}))});function oA(){return Ng(this)}function iA(){return new dn(this.value(),this.__chain__)}function aA(){this.__values__===t&&(this.__values__=Wg(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function sA(){return this}function cA(o){for(var a,l=this;l instanceof ja;){var h=Sg(l);h.__index__=0,h.__values__=t,a?m.__wrapped__=h:a=h;var m=h;l=l.__wrapped__}return m.__wrapped__=o,a}function lA(){var o=this.__wrapped__;if(o instanceof pe){var a=o;return this.__actions__.length&&(a=new pe(this)),a=a.reverse(),a.__actions__.push({func:ls,args:[Zl],thisArg:t}),new dn(a,this.__chain__)}return this.thru(Zl)}function uA(){return Gf(this.__wrapped__,this.__actions__)}var dA=ts(function(o,a,l){Ie.call(o,l)?++o[l]:cr(o,l,1)});function hA(o,a,l){var h=ce(o)?af:nE;return l&&bt(o,a,l)&&(a=t),h(o,Z(a,3))}function fA(o,a){var l=ce(o)?Ir:Of;return l(o,Z(a,3))}var gA=og(Ag),mA=og(Ig);function pA(o,a){return dt(us(o,a),1)}function vA(o,a){return dt(us(o,a),Nt)}function yA(o,a,l){return l=l===t?1:de(l),dt(us(o,a),l)}function Pg(o,a){var l=ce(o)?ln:Or;return l(o,Z(a,3))}function Mg(o,a){var l=ce(o)?U_:Rf;return l(o,Z(a,3))}var CA=ts(function(o,a,l){Ie.call(o,l)?o[l].push(a):cr(o,l,[a])});function wA(o,a,l,h){o=Mt(o)?o:Lo(o),l=l&&!h?de(l):0;var m=o.length;return l<0&&(l=nt(m+l,0)),ms(o)?l<=m&&o.indexOf(a,l)>-1:!!m&&So(o,a,l)>-1}var _A=fe(function(o,a,l){var h=-1,m=typeof a=="function",y=Mt(o)?R(o.length):[];return Or(o,function(_){y[++h]=m?$t(a,_,l):Fi(_,a,l)}),y}),TA=ts(function(o,a,l){cr(o,l,a)});function us(o,a){var l=ce(o)?Ue:Lf;return l(o,Z(a,3))}function EA(o,a,l,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),l=h?t:l,ce(l)||(l=l==null?[]:[l]),Hf(o,a,l))}var SA=ts(function(o,a,l){o[l?0:1].push(a)},function(){return[[],[]]});function AA(o,a,l){var h=ce(o)?hl:uf,m=arguments.length<3;return h(o,Z(a,4),l,m,Or)}function IA(o,a,l){var h=ce(o)?B_:uf,m=arguments.length<3;return h(o,Z(a,4),l,m,Rf)}function bA(o,a){var l=ce(o)?Ir:Of;return l(o,fs(Z(a,3)))}function kA(o){var a=ce(o)?Af:wE;return a(o)}function RA(o,a,l){(l?bt(o,a,l):a===t)?a=1:a=de(a);var h=ce(o)?QT:_E;return h(o,a)}function OA(o){var a=ce(o)?XT:EE;return a(o)}function NA(o){if(o==null)return 0;if(Mt(o))return ms(o)?Io(o):o.length;var a=wt(o);return a==In||a==bn?o.size:Nl(o).length}function PA(o,a,l){var h=ce(o)?fl:SE;return l&&bt(o,a,l)&&(a=t),h(o,Z(a,3))}var MA=fe(function(o,a){if(o==null)return[];var l=a.length;return l>1&&bt(o,a[0],a[1])?a=[]:l>2&&bt(a[0],a[1],a[2])&&(a=[a[0]]),Hf(o,dt(a,1),[])}),ds=fT||function(){return ut.Date.now()};function DA(o,a){if(typeof a!="function")throw new un(c);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function Dg(o,a,l){return a=l?t:a,a=o&&a==null?o.length:a,lr(o,W,t,t,t,t,a)}function xg(o,a){var l;if(typeof a!="function")throw new un(c);return o=de(o),function(){return--o>0&&(l=a.apply(this,arguments)),o<=1&&(a=t),l}}var tu=fe(function(o,a,l){var h=N;if(l.length){var m=kr(l,Do(tu));h|=Q}return lr(o,h,a,l,m)}),Lg=fe(function(o,a,l){var h=N|K;if(l.length){var m=kr(l,Do(Lg));h|=Q}return lr(a,h,o,l,m)});function Ug(o,a,l){a=l?t:a;var h=lr(o,V,t,t,t,t,t,a);return h.placeholder=Ug.placeholder,h}function Bg(o,a,l){a=l?t:a;var h=lr(o,z,t,t,t,t,t,a);return h.placeholder=Bg.placeholder,h}function Fg(o,a,l){var h,m,y,_,E,I,D=0,x=!1,L=!1,$=!0;if(typeof o!="function")throw new un(c);a=mn(a)||0,He(l)&&(x=!!l.leading,L="maxWait"in l,y=L?nt(mn(l.maxWait)||0,a):y,$="trailing"in l?!!l.trailing:$);function J(je){var Nn=h,gr=m;return h=m=t,D=je,_=o.apply(gr,Nn),_}function ee(je){return D=je,E=zi(me,a),x?J(je):_}function he(je){var Nn=je-I,gr=je-D,om=a-Nn;return L?Ct(om,y-gr):om}function te(je){var Nn=je-I,gr=je-D;return I===t||Nn>=a||Nn<0||L&&gr>=y}function me(){var je=ds();if(te(je))return ve(je);E=zi(me,he(je))}function ve(je){return E=t,$&&h?J(je):(h=m=t,_)}function qt(){E!==t&&Yf(E),D=0,h=I=m=E=t}function kt(){return E===t?_:ve(ds())}function Gt(){var je=ds(),Nn=te(je);if(h=arguments,m=this,I=je,Nn){if(E===t)return ee(I);if(L)return Yf(E),E=zi(me,a),J(I)}return E===t&&(E=zi(me,a)),_}return Gt.cancel=qt,Gt.flush=kt,Gt}var xA=fe(function(o,a){return kf(o,1,a)}),LA=fe(function(o,a,l){return kf(o,mn(a)||0,l)});function UA(o){return lr(o,_e)}function hs(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new un(c);var l=function(){var h=arguments,m=a?a.apply(this,h):h[0],y=l.cache;if(y.has(m))return y.get(m);var _=o.apply(this,h);return l.cache=y.set(m,_)||y,_};return l.cache=new(hs.Cache||sr),l}hs.Cache=sr;function fs(o){if(typeof o!="function")throw new un(c);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function BA(o){return xg(2,o)}var FA=AE(function(o,a){a=a.length==1&&ce(a[0])?Ue(a[0],Kt(Z())):Ue(dt(a,1),Kt(Z()));var l=a.length;return fe(function(h){for(var m=-1,y=Ct(h.length,l);++m<y;)h[m]=a[m].call(this,h[m]);return $t(o,this,h)})}),nu=fe(function(o,a){var l=kr(a,Do(nu));return lr(o,Q,t,a,l)}),Hg=fe(function(o,a){var l=kr(a,Do(Hg));return lr(o,we,t,a,l)}),HA=ur(function(o,a){return lr(o,et,t,t,t,a)});function VA(o,a){if(typeof o!="function")throw new un(c);return a=a===t?a:de(a),fe(o,a)}function $A(o,a){if(typeof o!="function")throw new un(c);return a=a==null?0:nt(de(a),0),fe(function(l){var h=l[a],m=Mr(l,0,a);return h&&br(m,h),$t(o,this,m)})}function KA(o,a,l){var h=!0,m=!0;if(typeof o!="function")throw new un(c);return He(l)&&(h="leading"in l?!!l.leading:h,m="trailing"in l?!!l.trailing:m),Fg(o,a,{leading:h,maxWait:a,trailing:m})}function zA(o){return Dg(o,1)}function WA(o,a){return nu(Hl(a),o)}function qA(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function GA(o){return hn(o,S)}function jA(o,a){return a=typeof a=="function"?a:t,hn(o,S,a)}function YA(o){return hn(o,w|S)}function JA(o,a){return a=typeof a=="function"?a:t,hn(o,w|S,a)}function QA(o,a){return a==null||bf(o,a,at(a))}function On(o,a){return o===a||o!==o&&a!==a}var XA=is(kl),ZA=is(function(o,a){return o>=a}),no=Mf(function(){return arguments}())?Mf:function(o){return $e(o)&&Ie.call(o,"callee")&&!Cf.call(o,"callee")},ce=R.isArray,eI=Zh?Kt(Zh):cE;function Mt(o){return o!=null&&gs(o.length)&&!hr(o)}function Ge(o){return $e(o)&&Mt(o)}function tI(o){return o===!0||o===!1||$e(o)&&It(o)==Si}var Dr=mT||fu,nI=ef?Kt(ef):lE;function rI(o){return $e(o)&&o.nodeType===1&&!Wi(o)}function oI(o){if(o==null)return!0;if(Mt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||Dr(o)||xo(o)||no(o)))return!o.length;var a=wt(o);if(a==In||a==bn)return!o.size;if(Ki(o))return!Nl(o).length;for(var l in o)if(Ie.call(o,l))return!1;return!0}function iI(o,a){return Hi(o,a)}function aI(o,a,l){l=typeof l=="function"?l:t;var h=l?l(o,a):t;return h===t?Hi(o,a,t,l):!!h}function ru(o){if(!$e(o))return!1;var a=It(o);return a==Ia||a==Rw||typeof o.message=="string"&&typeof o.name=="string"&&!Wi(o)}function sI(o){return typeof o=="number"&&_f(o)}function hr(o){if(!He(o))return!1;var a=It(o);return a==ba||a==bh||a==kw||a==Nw}function Vg(o){return typeof o=="number"&&o==de(o)}function gs(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Je}function He(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function $e(o){return o!=null&&typeof o=="object"}var $g=tf?Kt(tf):dE;function cI(o,a){return o===a||Ol(o,a,Gl(a))}function lI(o,a,l){return l=typeof l=="function"?l:t,Ol(o,a,Gl(a),l)}function uI(o){return Kg(o)&&o!=+o}function dI(o){if(jE(o))throw new ae(s);return Df(o)}function hI(o){return o===null}function fI(o){return o==null}function Kg(o){return typeof o=="number"||$e(o)&&It(o)==Ii}function Wi(o){if(!$e(o)||It(o)!=ir)return!1;var a=Va(o);if(a===null)return!0;var l=Ie.call(a,"constructor")&&a.constructor;return typeof l=="function"&&l instanceof l&&Ua.call(l)==lT}var ou=nf?Kt(nf):hE;function gI(o){return Vg(o)&&o>=-Je&&o<=Je}var zg=rf?Kt(rf):fE;function ms(o){return typeof o=="string"||!ce(o)&&$e(o)&&It(o)==ki}function Wt(o){return typeof o=="symbol"||$e(o)&&It(o)==ka}var xo=of?Kt(of):gE;function mI(o){return o===t}function pI(o){return $e(o)&&wt(o)==Ri}function vI(o){return $e(o)&&It(o)==Mw}var yI=is(Pl),CI=is(function(o,a){return o<=a});function Wg(o){if(!o)return[];if(Mt(o))return ms(o)?kn(o):Pt(o);if(Pi&&o[Pi])return Q_(o[Pi]());var a=wt(o),l=a==In?Cl:a==bn?Da:Lo;return l(o)}function fr(o){if(!o)return o===0?o:0;if(o=mn(o),o===Nt||o===-Nt){var a=o<0?-1:1;return a*yt}return o===o?o:0}function de(o){var a=fr(o),l=a%1;return a===a?l?a-l:a:0}function qg(o){return o?Xr(de(o),0,Vt):0}function mn(o){if(typeof o=="number")return o;if(Wt(o))return Ei;if(He(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=He(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=df(o);var l=e_.test(o);return l||n_.test(o)?D_(o.slice(2),l?2:8):Zw.test(o)?Ei:+o}function Gg(o){return Wn(o,Dt(o))}function wI(o){return o?Xr(de(o),-Je,Je):o===0?o:0}function Ae(o){return o==null?"":zt(o)}var _I=Po(function(o,a){if(Ki(a)||Mt(a)){Wn(a,at(a),o);return}for(var l in a)Ie.call(a,l)&&Ui(o,l,a[l])}),jg=Po(function(o,a){Wn(a,Dt(a),o)}),ps=Po(function(o,a,l,h){Wn(a,Dt(a),o,h)}),TI=Po(function(o,a,l,h){Wn(a,at(a),o,h)}),EI=ur(Al);function SI(o,a){var l=No(o);return a==null?l:If(l,a)}var AI=fe(function(o,a){o=Oe(o);var l=-1,h=a.length,m=h>2?a[2]:t;for(m&&bt(a[0],a[1],m)&&(h=1);++l<h;)for(var y=a[l],_=Dt(y),E=-1,I=_.length;++E<I;){var D=_[E],x=o[D];(x===t||On(x,ko[D])&&!Ie.call(o,D))&&(o[D]=y[D])}return o}),II=fe(function(o){return o.push(t,dg),$t(Yg,t,o)});function bI(o,a){return sf(o,Z(a,3),zn)}function kI(o,a){return sf(o,Z(a,3),bl)}function RI(o,a){return o==null?o:Il(o,Z(a,3),Dt)}function OI(o,a){return o==null?o:Nf(o,Z(a,3),Dt)}function NI(o,a){return o&&zn(o,Z(a,3))}function PI(o,a){return o&&bl(o,Z(a,3))}function MI(o){return o==null?[]:Qa(o,at(o))}function DI(o){return o==null?[]:Qa(o,Dt(o))}function iu(o,a,l){var h=o==null?t:Zr(o,a);return h===t?l:h}function xI(o,a){return o!=null&&gg(o,a,oE)}function au(o,a){return o!=null&&gg(o,a,iE)}var LI=ag(function(o,a,l){a!=null&&typeof a.toString!="function"&&(a=Ba.call(a)),o[a]=l},cu(xt)),UI=ag(function(o,a,l){a!=null&&typeof a.toString!="function"&&(a=Ba.call(a)),Ie.call(o,a)?o[a].push(l):o[a]=[l]},Z),BI=fe(Fi);function at(o){return Mt(o)?Sf(o):Nl(o)}function Dt(o){return Mt(o)?Sf(o,!0):mE(o)}function FI(o,a){var l={};return a=Z(a,3),zn(o,function(h,m,y){cr(l,a(h,m,y),h)}),l}function HI(o,a){var l={};return a=Z(a,3),zn(o,function(h,m,y){cr(l,m,a(h,m,y))}),l}var VI=Po(function(o,a,l){Xa(o,a,l)}),Yg=Po(function(o,a,l,h){Xa(o,a,l,h)}),$I=ur(function(o,a){var l={};if(o==null)return l;var h=!1;a=Ue(a,function(y){return y=Pr(y,o),h||(h=y.length>1),y}),Wn(o,Wl(o),l),h&&(l=hn(l,w|C|S,LE));for(var m=a.length;m--;)Ul(l,a[m]);return l});function KI(o,a){return Jg(o,fs(Z(a)))}var zI=ur(function(o,a){return o==null?{}:vE(o,a)});function Jg(o,a){if(o==null)return{};var l=Ue(Wl(o),function(h){return[h]});return a=Z(a),Vf(o,l,function(h,m){return a(h,m[0])})}function WI(o,a,l){a=Pr(a,o);var h=-1,m=a.length;for(m||(m=1,o=t);++h<m;){var y=o==null?t:o[qn(a[h])];y===t&&(h=m,y=l),o=hr(y)?y.call(o):y}return o}function qI(o,a,l){return o==null?o:Vi(o,a,l)}function GI(o,a,l,h){return h=typeof h=="function"?h:t,o==null?o:Vi(o,a,l,h)}var Qg=lg(at),Xg=lg(Dt);function jI(o,a,l){var h=ce(o),m=h||Dr(o)||xo(o);if(a=Z(a,4),l==null){var y=o&&o.constructor;m?l=h?new y:[]:He(o)?l=hr(y)?No(Va(o)):{}:l={}}return(m?ln:zn)(o,function(_,E,I){return a(l,_,E,I)}),l}function YI(o,a){return o==null?!0:Ul(o,a)}function JI(o,a,l){return o==null?o:qf(o,a,Hl(l))}function QI(o,a,l,h){return h=typeof h=="function"?h:t,o==null?o:qf(o,a,Hl(l),h)}function Lo(o){return o==null?[]:yl(o,at(o))}function XI(o){return o==null?[]:yl(o,Dt(o))}function ZI(o,a,l){return l===t&&(l=a,a=t),l!==t&&(l=mn(l),l=l===l?l:0),a!==t&&(a=mn(a),a=a===a?a:0),Xr(mn(o),a,l)}function eb(o,a,l){return a=fr(a),l===t?(l=a,a=0):l=fr(l),o=mn(o),aE(o,a,l)}function tb(o,a,l){if(l&&typeof l!="boolean"&&bt(o,a,l)&&(a=l=t),l===t&&(typeof a=="boolean"?(l=a,a=t):typeof o=="boolean"&&(l=o,o=t)),o===t&&a===t?(o=0,a=1):(o=fr(o),a===t?(a=o,o=0):a=fr(a)),o>a){var h=o;o=a,a=h}if(l||o%1||a%1){var m=Tf();return Ct(o+m*(a-o+M_("1e-"+((m+"").length-1))),a)}return Dl(o,a)}var nb=Mo(function(o,a,l){return a=a.toLowerCase(),o+(l?Zg(a):a)});function Zg(o){return su(Ae(o).toLowerCase())}function em(o){return o=Ae(o),o&&o.replace(o_,q_).replace(E_,"")}function rb(o,a,l){o=Ae(o),a=zt(a);var h=o.length;l=l===t?h:Xr(de(l),0,h);var m=l;return l-=a.length,l>=0&&o.slice(l,m)==a}function ob(o){return o=Ae(o),o&&Bw.test(o)?o.replace(Oh,G_):o}function ib(o){return o=Ae(o),o&&zw.test(o)?o.replace(nl,"\\$&"):o}var ab=Mo(function(o,a,l){return o+(l?"-":"")+a.toLowerCase()}),sb=Mo(function(o,a,l){return o+(l?" ":"")+a.toLowerCase()}),cb=rg("toLowerCase");function lb(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var m=(a-h)/2;return os(Wa(m),l)+o+os(za(m),l)}function ub(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+os(a-h,l):o}function db(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;return a&&h<a?os(a-h,l)+o:o}function hb(o,a,l){return l||a==null?a=0:a&&(a=+a),CT(Ae(o).replace(rl,""),a||0)}function fb(o,a,l){return(l?bt(o,a,l):a===t)?a=1:a=de(a),xl(Ae(o),a)}function gb(){var o=arguments,a=Ae(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var mb=Mo(function(o,a,l){return o+(l?"_":"")+a.toLowerCase()});function pb(o,a,l){return l&&typeof l!="number"&&bt(o,a,l)&&(a=l=t),l=l===t?Vt:l>>>0,l?(o=Ae(o),o&&(typeof a=="string"||a!=null&&!ou(a))&&(a=zt(a),!a&&Ao(o))?Mr(kn(o),0,l):o.split(a,l)):[]}var vb=Mo(function(o,a,l){return o+(l?" ":"")+su(a)});function yb(o,a,l){return o=Ae(o),l=l==null?0:Xr(de(l),0,o.length),a=zt(a),o.slice(l,l+a.length)==a}function Cb(o,a,l){var h=v.templateSettings;l&&bt(o,a,l)&&(a=t),o=Ae(o),a=ps({},a,h,ug);var m=ps({},a.imports,h.imports,ug),y=at(m),_=yl(m,y),E,I,D=0,x=a.interpolate||Ra,L="__p += '",$=wl((a.escape||Ra).source+"|"+x.source+"|"+(x===Nh?Xw:Ra).source+"|"+(a.evaluate||Ra).source+"|$","g"),J="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++k_+"]")+`
71
- `;o.replace($,function(te,me,ve,qt,kt,Gt){return ve||(ve=qt),L+=o.slice(D,Gt).replace(i_,j_),me&&(E=!0,L+=`' +
70
+ `)}function qE(o){return ce(o)||no(o)||!!(wf&&o&&o[wf])}function dr(o,a){var l=typeof o;return a=a??Je,!!a&&(l=="number"||l!="symbol"&&o_.test(o))&&o>-1&&o%1==0&&o<a}function bt(o,a,l){if(!He(l))return!1;var h=typeof a;return(h=="number"?Mt(l)&&dr(a,l.length):h=="string"&&a in l)?On(l[a],o):!1}function Yl(o,a){if(ce(o))return!1;var l=typeof o;return l=="number"||l=="symbol"||l=="boolean"||o==null||Wt(o)?!0:Kw.test(o)||!$w.test(o)||a!=null&&o in Oe(a)}function GE(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function Jl(o){var a=as(o),l=v[a];if(typeof l!="function"||!(a in pe.prototype))return!1;if(o===l)return!0;var h=ql(l);return!!h&&o===h[0]}function jE(o){return!!pf&&pf in o}var YE=La?hr:fu;function Ki(o){var a=o&&o.constructor,l=typeof a=="function"&&a.prototype||ko;return o===l}function pg(o){return o===o&&!He(o)}function vg(o,a){return function(l){return l==null?!1:l[o]===a&&(a!==t||o in Oe(l))}}function JE(o){var a=hs(o,function(h){return l.size===g&&l.clear(),h}),l=a.cache;return a}function QE(o,a){var l=o[1],h=a[1],m=l|h,y=m<(N|K|W),_=h==W&&l==V||h==W&&l==et&&o[7].length<=a[8]||h==(W|et)&&a[7].length<=a[8]&&l==V;if(!(y||_))return o;h&N&&(o[2]=a[2],m|=l&N?0:H);var E=a[3];if(E){var I=o[3];o[3]=I?Zf(I,E,a[4]):E,o[4]=I?kr(o[3],p):a[4]}return E=a[5],E&&(I=o[5],o[5]=I?eg(I,E,a[6]):E,o[6]=I?kr(o[5],p):a[6]),E=a[7],E&&(o[7]=E),h&W&&(o[8]=o[8]==null?a[8]:Ct(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=m,o}function XE(o){var a=[];if(o!=null)for(var l in Oe(o))a.push(l);return a}function ZE(o){return Ba.call(o)}function yg(o,a,l){return a=nt(a===t?o.length-1:a,0),function(){for(var h=arguments,m=-1,y=nt(h.length-a,0),_=R(y);++m<y;)_[m]=h[a+m];m=-1;for(var E=R(a+1);++m<a;)E[m]=h[m];return E[a]=l(_),$t(o,this,E)}}function Cg(o,a){return a.length<2?o:Zr(o,fn(a,0,-1))}function eS(o,a){for(var l=o.length,h=Ct(a.length,l),m=Pt(o);h--;){var y=a[h];o[h]=dr(y,l)?m[y]:t}return o}function Ql(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var wg=Tg(Kf),zi=mT||function(o,a){return ut.setTimeout(o,a)},Xl=Tg(EE);function _g(o,a,l){var h=a+"";return Xl(o,WE(h,tS($E(h),l)))}function Tg(o){var a=0,l=0;return function(){var h=CT(),m=Le-(h-l);if(l=h,m>0){if(++a>=Te)return arguments[0]}else a=0;return o.apply(t,arguments)}}function cs(o,a){var l=-1,h=o.length,m=h-1;for(a=a===t?h:a;++l<a;){var y=Dl(l,m),_=o[y];o[y]=o[l],o[l]=_}return o.length=a,o}var Eg=JE(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(zw,function(l,h,m,y){a.push(m?y.replace(Xw,"$1"):h||l)}),a});function qn(o){if(typeof o=="string"||Wt(o))return o;var a=o+"";return a=="0"&&1/o==-Nt?"-0":a}function to(o){if(o!=null){try{return Ua.call(o)}catch{}try{return o+""}catch{}}return""}function tS(o,a){return ln(kw,function(l){var h="_."+l[0];a&l[1]&&!Pa(o,h)&&o.push(h)}),o.sort()}function Sg(o){if(o instanceof pe)return o.clone();var a=new dn(o.__wrapped__,o.__chain__);return a.__actions__=Pt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function nS(o,a,l){(l?bt(o,a,l):a===t)?a=1:a=nt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var m=0,y=0,_=R(za(h/a));m<h;)_[y++]=fn(o,m,m+=a);return _}function rS(o){for(var a=-1,l=o==null?0:o.length,h=0,m=[];++a<l;){var y=o[a];y&&(m[h++]=y)}return m}function oS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),l=arguments[0],h=o;h--;)a[h-1]=arguments[h];return br(ce(l)?Pt(l):[l],dt(a,1))}var iS=fe(function(o,a){return Ge(o)?Bi(o,dt(a,1,Ge,!0)):[]}),aS=fe(function(o,a){var l=gn(a);return Ge(l)&&(l=t),Ge(o)?Bi(o,dt(a,1,Ge,!0),Z(l,2)):[]}),sS=fe(function(o,a){var l=gn(a);return Ge(l)&&(l=t),Ge(o)?Bi(o,dt(a,1,Ge,!0),t,l):[]});function cS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),fn(o,a<0?0:a,h)):[]}function lS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),a=h-a,fn(o,0,a<0?0:a)):[]}function uS(o,a){return o&&o.length?es(o,Z(a,3),!0,!0):[]}function dS(o,a){return o&&o.length?es(o,Z(a,3),!0):[]}function hS(o,a,l,h){var m=o==null?0:o.length;return m?(l&&typeof l!="number"&&bt(o,a,l)&&(l=0,h=m),oE(o,a,l,h)):[]}function Ag(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=l==null?0:de(l);return m<0&&(m=nt(h+m,0)),Ma(o,Z(a,3),m)}function Ig(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=h-1;return l!==t&&(m=de(l),m=l<0?nt(h+m,0):Ct(m,h-1)),Ma(o,Z(a,3),m,!0)}function bg(o){var a=o==null?0:o.length;return a?dt(o,1):[]}function fS(o){var a=o==null?0:o.length;return a?dt(o,Nt):[]}function gS(o,a){var l=o==null?0:o.length;return l?(a=a===t?1:de(a),dt(o,a)):[]}function mS(o){for(var a=-1,l=o==null?0:o.length,h={};++a<l;){var m=o[a];h[m[0]]=m[1]}return h}function kg(o){return o&&o.length?o[0]:t}function pS(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=l==null?0:de(l);return m<0&&(m=nt(h+m,0)),So(o,a,m)}function vS(o){var a=o==null?0:o.length;return a?fn(o,0,-1):[]}var yS=fe(function(o){var a=Ue(o,Fl);return a.length&&a[0]===o[0]?Rl(a):[]}),CS=fe(function(o){var a=gn(o),l=Ue(o,Fl);return a===gn(l)?a=t:l.pop(),l.length&&l[0]===o[0]?Rl(l,Z(a,2)):[]}),wS=fe(function(o){var a=gn(o),l=Ue(o,Fl);return a=typeof a=="function"?a:t,a&&l.pop(),l.length&&l[0]===o[0]?Rl(l,t,a):[]});function _S(o,a){return o==null?"":vT.call(o,a)}function gn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function TS(o,a,l){var h=o==null?0:o.length;if(!h)return-1;var m=h;return l!==t&&(m=de(l),m=m<0?nt(h+m,0):Ct(m,h-1)),a===a?tT(o,a,m):Ma(o,cf,m,!0)}function ES(o,a){return o&&o.length?Ff(o,de(a)):t}var SS=fe(Rg);function Rg(o,a){return o&&o.length&&a&&a.length?Ml(o,a):o}function AS(o,a,l){return o&&o.length&&a&&a.length?Ml(o,a,Z(l,2)):o}function IS(o,a,l){return o&&o.length&&a&&a.length?Ml(o,a,t,l):o}var bS=ur(function(o,a){var l=o==null?0:o.length,h=Al(o,a);return $f(o,Ue(a,function(m){return dr(m,l)?+m:m}).sort(Xf)),h});function kS(o,a){var l=[];if(!(o&&o.length))return l;var h=-1,m=[],y=o.length;for(a=Z(a,3);++h<y;){var _=o[h];a(_,h,o)&&(l.push(_),m.push(h))}return $f(o,m),l}function Zl(o){return o==null?o:_T.call(o)}function RS(o,a,l){var h=o==null?0:o.length;return h?(l&&typeof l!="number"&&bt(o,a,l)?(a=0,l=h):(a=a==null?0:de(a),l=l===t?h:de(l)),fn(o,a,l)):[]}function OS(o,a){return Za(o,a)}function NS(o,a,l){return Ll(o,a,Z(l,2))}function PS(o,a){var l=o==null?0:o.length;if(l){var h=Za(o,a);if(h<l&&On(o[h],a))return h}return-1}function MS(o,a){return Za(o,a,!0)}function DS(o,a,l){return Ll(o,a,Z(l,2),!0)}function xS(o,a){var l=o==null?0:o.length;if(l){var h=Za(o,a,!0)-1;if(On(o[h],a))return h}return-1}function LS(o){return o&&o.length?zf(o):[]}function US(o,a){return o&&o.length?zf(o,Z(a,2)):[]}function BS(o){var a=o==null?0:o.length;return a?fn(o,1,a):[]}function FS(o,a,l){return o&&o.length?(a=l||a===t?1:de(a),fn(o,0,a<0?0:a)):[]}function HS(o,a,l){var h=o==null?0:o.length;return h?(a=l||a===t?1:de(a),a=h-a,fn(o,a<0?0:a,h)):[]}function VS(o,a){return o&&o.length?es(o,Z(a,3),!1,!0):[]}function $S(o,a){return o&&o.length?es(o,Z(a,3)):[]}var KS=fe(function(o){return Nr(dt(o,1,Ge,!0))}),zS=fe(function(o){var a=gn(o);return Ge(a)&&(a=t),Nr(dt(o,1,Ge,!0),Z(a,2))}),WS=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Nr(dt(o,1,Ge,!0),t,a)});function qS(o){return o&&o.length?Nr(o):[]}function GS(o,a){return o&&o.length?Nr(o,Z(a,2)):[]}function jS(o,a){return a=typeof a=="function"?a:t,o&&o.length?Nr(o,t,a):[]}function eu(o){if(!(o&&o.length))return[];var a=0;return o=Ir(o,function(l){if(Ge(l))return a=nt(l.length,a),!0}),vl(a,function(l){return Ue(o,gl(l))})}function Og(o,a){if(!(o&&o.length))return[];var l=eu(o);return a==null?l:Ue(l,function(h){return $t(a,t,h)})}var YS=fe(function(o,a){return Ge(o)?Bi(o,a):[]}),JS=fe(function(o){return Bl(Ir(o,Ge))}),QS=fe(function(o){var a=gn(o);return Ge(a)&&(a=t),Bl(Ir(o,Ge),Z(a,2))}),XS=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Bl(Ir(o,Ge),t,a)}),ZS=fe(eu);function eA(o,a){return jf(o||[],a||[],Ui)}function tA(o,a){return jf(o||[],a||[],Vi)}var nA=fe(function(o){var a=o.length,l=a>1?o[a-1]:t;return l=typeof l=="function"?(o.pop(),l):t,Og(o,l)});function Ng(o){var a=v(o);return a.__chain__=!0,a}function rA(o,a){return a(o),o}function ls(o,a){return a(o)}var oA=ur(function(o){var a=o.length,l=a?o[0]:0,h=this.__wrapped__,m=function(y){return Al(y,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!dr(l)?this.thru(m):(h=h.slice(l,+l+(a?1:0)),h.__actions__.push({func:ls,args:[m],thisArg:t}),new dn(h,this.__chain__).thru(function(y){return a&&!y.length&&y.push(t),y}))});function iA(){return Ng(this)}function aA(){return new dn(this.value(),this.__chain__)}function sA(){this.__values__===t&&(this.__values__=Wg(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function cA(){return this}function lA(o){for(var a,l=this;l instanceof ja;){var h=Sg(l);h.__index__=0,h.__values__=t,a?m.__wrapped__=h:a=h;var m=h;l=l.__wrapped__}return m.__wrapped__=o,a}function uA(){var o=this.__wrapped__;if(o instanceof pe){var a=o;return this.__actions__.length&&(a=new pe(this)),a=a.reverse(),a.__actions__.push({func:ls,args:[Zl],thisArg:t}),new dn(a,this.__chain__)}return this.thru(Zl)}function dA(){return Gf(this.__wrapped__,this.__actions__)}var hA=ts(function(o,a,l){Ie.call(o,l)?++o[l]:cr(o,l,1)});function fA(o,a,l){var h=ce(o)?af:rE;return l&&bt(o,a,l)&&(a=t),h(o,Z(a,3))}function gA(o,a){var l=ce(o)?Ir:Of;return l(o,Z(a,3))}var mA=og(Ag),pA=og(Ig);function vA(o,a){return dt(us(o,a),1)}function yA(o,a){return dt(us(o,a),Nt)}function CA(o,a,l){return l=l===t?1:de(l),dt(us(o,a),l)}function Pg(o,a){var l=ce(o)?ln:Or;return l(o,Z(a,3))}function Mg(o,a){var l=ce(o)?B_:Rf;return l(o,Z(a,3))}var wA=ts(function(o,a,l){Ie.call(o,l)?o[l].push(a):cr(o,l,[a])});function _A(o,a,l,h){o=Mt(o)?o:Lo(o),l=l&&!h?de(l):0;var m=o.length;return l<0&&(l=nt(m+l,0)),ms(o)?l<=m&&o.indexOf(a,l)>-1:!!m&&So(o,a,l)>-1}var TA=fe(function(o,a,l){var h=-1,m=typeof a=="function",y=Mt(o)?R(o.length):[];return Or(o,function(_){y[++h]=m?$t(a,_,l):Fi(_,a,l)}),y}),EA=ts(function(o,a,l){cr(o,l,a)});function us(o,a){var l=ce(o)?Ue:Lf;return l(o,Z(a,3))}function SA(o,a,l,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),l=h?t:l,ce(l)||(l=l==null?[]:[l]),Hf(o,a,l))}var AA=ts(function(o,a,l){o[l?0:1].push(a)},function(){return[[],[]]});function IA(o,a,l){var h=ce(o)?hl:uf,m=arguments.length<3;return h(o,Z(a,4),l,m,Or)}function bA(o,a,l){var h=ce(o)?F_:uf,m=arguments.length<3;return h(o,Z(a,4),l,m,Rf)}function kA(o,a){var l=ce(o)?Ir:Of;return l(o,fs(Z(a,3)))}function RA(o){var a=ce(o)?Af:_E;return a(o)}function OA(o,a,l){(l?bt(o,a,l):a===t)?a=1:a=de(a);var h=ce(o)?XT:TE;return h(o,a)}function NA(o){var a=ce(o)?ZT:SE;return a(o)}function PA(o){if(o==null)return 0;if(Mt(o))return ms(o)?Io(o):o.length;var a=wt(o);return a==In||a==bn?o.size:Nl(o).length}function MA(o,a,l){var h=ce(o)?fl:AE;return l&&bt(o,a,l)&&(a=t),h(o,Z(a,3))}var DA=fe(function(o,a){if(o==null)return[];var l=a.length;return l>1&&bt(o,a[0],a[1])?a=[]:l>2&&bt(a[0],a[1],a[2])&&(a=[a[0]]),Hf(o,dt(a,1),[])}),ds=gT||function(){return ut.Date.now()};function xA(o,a){if(typeof a!="function")throw new un(c);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function Dg(o,a,l){return a=l?t:a,a=o&&a==null?o.length:a,lr(o,W,t,t,t,t,a)}function xg(o,a){var l;if(typeof a!="function")throw new un(c);return o=de(o),function(){return--o>0&&(l=a.apply(this,arguments)),o<=1&&(a=t),l}}var tu=fe(function(o,a,l){var h=N;if(l.length){var m=kr(l,Do(tu));h|=Q}return lr(o,h,a,l,m)}),Lg=fe(function(o,a,l){var h=N|K;if(l.length){var m=kr(l,Do(Lg));h|=Q}return lr(a,h,o,l,m)});function Ug(o,a,l){a=l?t:a;var h=lr(o,V,t,t,t,t,t,a);return h.placeholder=Ug.placeholder,h}function Bg(o,a,l){a=l?t:a;var h=lr(o,z,t,t,t,t,t,a);return h.placeholder=Bg.placeholder,h}function Fg(o,a,l){var h,m,y,_,E,I,D=0,x=!1,L=!1,$=!0;if(typeof o!="function")throw new un(c);a=mn(a)||0,He(l)&&(x=!!l.leading,L="maxWait"in l,y=L?nt(mn(l.maxWait)||0,a):y,$="trailing"in l?!!l.trailing:$);function J(je){var Nn=h,gr=m;return h=m=t,D=je,_=o.apply(gr,Nn),_}function ee(je){return D=je,E=zi(me,a),x?J(je):_}function he(je){var Nn=je-I,gr=je-D,om=a-Nn;return L?Ct(om,y-gr):om}function te(je){var Nn=je-I,gr=je-D;return I===t||Nn>=a||Nn<0||L&&gr>=y}function me(){var je=ds();if(te(je))return ve(je);E=zi(me,he(je))}function ve(je){return E=t,$&&h?J(je):(h=m=t,_)}function qt(){E!==t&&Yf(E),D=0,h=I=m=E=t}function kt(){return E===t?_:ve(ds())}function Gt(){var je=ds(),Nn=te(je);if(h=arguments,m=this,I=je,Nn){if(E===t)return ee(I);if(L)return Yf(E),E=zi(me,a),J(I)}return E===t&&(E=zi(me,a)),_}return Gt.cancel=qt,Gt.flush=kt,Gt}var LA=fe(function(o,a){return kf(o,1,a)}),UA=fe(function(o,a,l){return kf(o,mn(a)||0,l)});function BA(o){return lr(o,_e)}function hs(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new un(c);var l=function(){var h=arguments,m=a?a.apply(this,h):h[0],y=l.cache;if(y.has(m))return y.get(m);var _=o.apply(this,h);return l.cache=y.set(m,_)||y,_};return l.cache=new(hs.Cache||sr),l}hs.Cache=sr;function fs(o){if(typeof o!="function")throw new un(c);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function FA(o){return xg(2,o)}var HA=IE(function(o,a){a=a.length==1&&ce(a[0])?Ue(a[0],Kt(Z())):Ue(dt(a,1),Kt(Z()));var l=a.length;return fe(function(h){for(var m=-1,y=Ct(h.length,l);++m<y;)h[m]=a[m].call(this,h[m]);return $t(o,this,h)})}),nu=fe(function(o,a){var l=kr(a,Do(nu));return lr(o,Q,t,a,l)}),Hg=fe(function(o,a){var l=kr(a,Do(Hg));return lr(o,we,t,a,l)}),VA=ur(function(o,a){return lr(o,et,t,t,t,a)});function $A(o,a){if(typeof o!="function")throw new un(c);return a=a===t?a:de(a),fe(o,a)}function KA(o,a){if(typeof o!="function")throw new un(c);return a=a==null?0:nt(de(a),0),fe(function(l){var h=l[a],m=Mr(l,0,a);return h&&br(m,h),$t(o,this,m)})}function zA(o,a,l){var h=!0,m=!0;if(typeof o!="function")throw new un(c);return He(l)&&(h="leading"in l?!!l.leading:h,m="trailing"in l?!!l.trailing:m),Fg(o,a,{leading:h,maxWait:a,trailing:m})}function WA(o){return Dg(o,1)}function qA(o,a){return nu(Hl(a),o)}function GA(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function jA(o){return hn(o,S)}function YA(o,a){return a=typeof a=="function"?a:t,hn(o,S,a)}function JA(o){return hn(o,w|S)}function QA(o,a){return a=typeof a=="function"?a:t,hn(o,w|S,a)}function XA(o,a){return a==null||bf(o,a,at(a))}function On(o,a){return o===a||o!==o&&a!==a}var ZA=is(kl),eI=is(function(o,a){return o>=a}),no=Mf(function(){return arguments}())?Mf:function(o){return $e(o)&&Ie.call(o,"callee")&&!Cf.call(o,"callee")},ce=R.isArray,tI=Zh?Kt(Zh):lE;function Mt(o){return o!=null&&gs(o.length)&&!hr(o)}function Ge(o){return $e(o)&&Mt(o)}function nI(o){return o===!0||o===!1||$e(o)&&It(o)==Si}var Dr=pT||fu,rI=ef?Kt(ef):uE;function oI(o){return $e(o)&&o.nodeType===1&&!Wi(o)}function iI(o){if(o==null)return!0;if(Mt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||Dr(o)||xo(o)||no(o)))return!o.length;var a=wt(o);if(a==In||a==bn)return!o.size;if(Ki(o))return!Nl(o).length;for(var l in o)if(Ie.call(o,l))return!1;return!0}function aI(o,a){return Hi(o,a)}function sI(o,a,l){l=typeof l=="function"?l:t;var h=l?l(o,a):t;return h===t?Hi(o,a,t,l):!!h}function ru(o){if(!$e(o))return!1;var a=It(o);return a==Ia||a==Ow||typeof o.message=="string"&&typeof o.name=="string"&&!Wi(o)}function cI(o){return typeof o=="number"&&_f(o)}function hr(o){if(!He(o))return!1;var a=It(o);return a==ba||a==bh||a==Rw||a==Pw}function Vg(o){return typeof o=="number"&&o==de(o)}function gs(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Je}function He(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function $e(o){return o!=null&&typeof o=="object"}var $g=tf?Kt(tf):hE;function lI(o,a){return o===a||Ol(o,a,Gl(a))}function uI(o,a,l){return l=typeof l=="function"?l:t,Ol(o,a,Gl(a),l)}function dI(o){return Kg(o)&&o!=+o}function hI(o){if(YE(o))throw new ae(s);return Df(o)}function fI(o){return o===null}function gI(o){return o==null}function Kg(o){return typeof o=="number"||$e(o)&&It(o)==Ii}function Wi(o){if(!$e(o)||It(o)!=ir)return!1;var a=Va(o);if(a===null)return!0;var l=Ie.call(a,"constructor")&&a.constructor;return typeof l=="function"&&l instanceof l&&Ua.call(l)==uT}var ou=nf?Kt(nf):fE;function mI(o){return Vg(o)&&o>=-Je&&o<=Je}var zg=rf?Kt(rf):gE;function ms(o){return typeof o=="string"||!ce(o)&&$e(o)&&It(o)==ki}function Wt(o){return typeof o=="symbol"||$e(o)&&It(o)==ka}var xo=of?Kt(of):mE;function pI(o){return o===t}function vI(o){return $e(o)&&wt(o)==Ri}function yI(o){return $e(o)&&It(o)==Dw}var CI=is(Pl),wI=is(function(o,a){return o<=a});function Wg(o){if(!o)return[];if(Mt(o))return ms(o)?kn(o):Pt(o);if(Pi&&o[Pi])return X_(o[Pi]());var a=wt(o),l=a==In?Cl:a==bn?Da:Lo;return l(o)}function fr(o){if(!o)return o===0?o:0;if(o=mn(o),o===Nt||o===-Nt){var a=o<0?-1:1;return a*yt}return o===o?o:0}function de(o){var a=fr(o),l=a%1;return a===a?l?a-l:a:0}function qg(o){return o?Xr(de(o),0,Vt):0}function mn(o){if(typeof o=="number")return o;if(Wt(o))return Ei;if(He(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=He(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=df(o);var l=t_.test(o);return l||r_.test(o)?x_(o.slice(2),l?2:8):e_.test(o)?Ei:+o}function Gg(o){return Wn(o,Dt(o))}function _I(o){return o?Xr(de(o),-Je,Je):o===0?o:0}function Ae(o){return o==null?"":zt(o)}var TI=Po(function(o,a){if(Ki(a)||Mt(a)){Wn(a,at(a),o);return}for(var l in a)Ie.call(a,l)&&Ui(o,l,a[l])}),jg=Po(function(o,a){Wn(a,Dt(a),o)}),ps=Po(function(o,a,l,h){Wn(a,Dt(a),o,h)}),EI=Po(function(o,a,l,h){Wn(a,at(a),o,h)}),SI=ur(Al);function AI(o,a){var l=No(o);return a==null?l:If(l,a)}var II=fe(function(o,a){o=Oe(o);var l=-1,h=a.length,m=h>2?a[2]:t;for(m&&bt(a[0],a[1],m)&&(h=1);++l<h;)for(var y=a[l],_=Dt(y),E=-1,I=_.length;++E<I;){var D=_[E],x=o[D];(x===t||On(x,ko[D])&&!Ie.call(o,D))&&(o[D]=y[D])}return o}),bI=fe(function(o){return o.push(t,dg),$t(Yg,t,o)});function kI(o,a){return sf(o,Z(a,3),zn)}function RI(o,a){return sf(o,Z(a,3),bl)}function OI(o,a){return o==null?o:Il(o,Z(a,3),Dt)}function NI(o,a){return o==null?o:Nf(o,Z(a,3),Dt)}function PI(o,a){return o&&zn(o,Z(a,3))}function MI(o,a){return o&&bl(o,Z(a,3))}function DI(o){return o==null?[]:Qa(o,at(o))}function xI(o){return o==null?[]:Qa(o,Dt(o))}function iu(o,a,l){var h=o==null?t:Zr(o,a);return h===t?l:h}function LI(o,a){return o!=null&&gg(o,a,iE)}function au(o,a){return o!=null&&gg(o,a,aE)}var UI=ag(function(o,a,l){a!=null&&typeof a.toString!="function"&&(a=Ba.call(a)),o[a]=l},cu(xt)),BI=ag(function(o,a,l){a!=null&&typeof a.toString!="function"&&(a=Ba.call(a)),Ie.call(o,a)?o[a].push(l):o[a]=[l]},Z),FI=fe(Fi);function at(o){return Mt(o)?Sf(o):Nl(o)}function Dt(o){return Mt(o)?Sf(o,!0):pE(o)}function HI(o,a){var l={};return a=Z(a,3),zn(o,function(h,m,y){cr(l,a(h,m,y),h)}),l}function VI(o,a){var l={};return a=Z(a,3),zn(o,function(h,m,y){cr(l,m,a(h,m,y))}),l}var $I=Po(function(o,a,l){Xa(o,a,l)}),Yg=Po(function(o,a,l,h){Xa(o,a,l,h)}),KI=ur(function(o,a){var l={};if(o==null)return l;var h=!1;a=Ue(a,function(y){return y=Pr(y,o),h||(h=y.length>1),y}),Wn(o,Wl(o),l),h&&(l=hn(l,w|C|S,UE));for(var m=a.length;m--;)Ul(l,a[m]);return l});function zI(o,a){return Jg(o,fs(Z(a)))}var WI=ur(function(o,a){return o==null?{}:yE(o,a)});function Jg(o,a){if(o==null)return{};var l=Ue(Wl(o),function(h){return[h]});return a=Z(a),Vf(o,l,function(h,m){return a(h,m[0])})}function qI(o,a,l){a=Pr(a,o);var h=-1,m=a.length;for(m||(m=1,o=t);++h<m;){var y=o==null?t:o[qn(a[h])];y===t&&(h=m,y=l),o=hr(y)?y.call(o):y}return o}function GI(o,a,l){return o==null?o:Vi(o,a,l)}function jI(o,a,l,h){return h=typeof h=="function"?h:t,o==null?o:Vi(o,a,l,h)}var Qg=lg(at),Xg=lg(Dt);function YI(o,a,l){var h=ce(o),m=h||Dr(o)||xo(o);if(a=Z(a,4),l==null){var y=o&&o.constructor;m?l=h?new y:[]:He(o)?l=hr(y)?No(Va(o)):{}:l={}}return(m?ln:zn)(o,function(_,E,I){return a(l,_,E,I)}),l}function JI(o,a){return o==null?!0:Ul(o,a)}function QI(o,a,l){return o==null?o:qf(o,a,Hl(l))}function XI(o,a,l,h){return h=typeof h=="function"?h:t,o==null?o:qf(o,a,Hl(l),h)}function Lo(o){return o==null?[]:yl(o,at(o))}function ZI(o){return o==null?[]:yl(o,Dt(o))}function eb(o,a,l){return l===t&&(l=a,a=t),l!==t&&(l=mn(l),l=l===l?l:0),a!==t&&(a=mn(a),a=a===a?a:0),Xr(mn(o),a,l)}function tb(o,a,l){return a=fr(a),l===t?(l=a,a=0):l=fr(l),o=mn(o),sE(o,a,l)}function nb(o,a,l){if(l&&typeof l!="boolean"&&bt(o,a,l)&&(a=l=t),l===t&&(typeof a=="boolean"?(l=a,a=t):typeof o=="boolean"&&(l=o,o=t)),o===t&&a===t?(o=0,a=1):(o=fr(o),a===t?(a=o,o=0):a=fr(a)),o>a){var h=o;o=a,a=h}if(l||o%1||a%1){var m=Tf();return Ct(o+m*(a-o+D_("1e-"+((m+"").length-1))),a)}return Dl(o,a)}var rb=Mo(function(o,a,l){return a=a.toLowerCase(),o+(l?Zg(a):a)});function Zg(o){return su(Ae(o).toLowerCase())}function em(o){return o=Ae(o),o&&o.replace(i_,G_).replace(S_,"")}function ob(o,a,l){o=Ae(o),a=zt(a);var h=o.length;l=l===t?h:Xr(de(l),0,h);var m=l;return l-=a.length,l>=0&&o.slice(l,m)==a}function ib(o){return o=Ae(o),o&&Fw.test(o)?o.replace(Oh,j_):o}function ab(o){return o=Ae(o),o&&Ww.test(o)?o.replace(nl,"\\$&"):o}var sb=Mo(function(o,a,l){return o+(l?"-":"")+a.toLowerCase()}),cb=Mo(function(o,a,l){return o+(l?" ":"")+a.toLowerCase()}),lb=rg("toLowerCase");function ub(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var m=(a-h)/2;return os(Wa(m),l)+o+os(za(m),l)}function db(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+os(a-h,l):o}function hb(o,a,l){o=Ae(o),a=de(a);var h=a?Io(o):0;return a&&h<a?os(a-h,l)+o:o}function fb(o,a,l){return l||a==null?a=0:a&&(a=+a),wT(Ae(o).replace(rl,""),a||0)}function gb(o,a,l){return(l?bt(o,a,l):a===t)?a=1:a=de(a),xl(Ae(o),a)}function mb(){var o=arguments,a=Ae(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var pb=Mo(function(o,a,l){return o+(l?"_":"")+a.toLowerCase()});function vb(o,a,l){return l&&typeof l!="number"&&bt(o,a,l)&&(a=l=t),l=l===t?Vt:l>>>0,l?(o=Ae(o),o&&(typeof a=="string"||a!=null&&!ou(a))&&(a=zt(a),!a&&Ao(o))?Mr(kn(o),0,l):o.split(a,l)):[]}var yb=Mo(function(o,a,l){return o+(l?" ":"")+su(a)});function Cb(o,a,l){return o=Ae(o),l=l==null?0:Xr(de(l),0,o.length),a=zt(a),o.slice(l,l+a.length)==a}function wb(o,a,l){var h=v.templateSettings;l&&bt(o,a,l)&&(a=t),o=Ae(o),a=ps({},a,h,ug);var m=ps({},a.imports,h.imports,ug),y=at(m),_=yl(m,y),E,I,D=0,x=a.interpolate||Ra,L="__p += '",$=wl((a.escape||Ra).source+"|"+x.source+"|"+(x===Nh?Zw:Ra).source+"|"+(a.evaluate||Ra).source+"|$","g"),J="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++R_+"]")+`
71
+ `;o.replace($,function(te,me,ve,qt,kt,Gt){return ve||(ve=qt),L+=o.slice(D,Gt).replace(a_,Y_),me&&(E=!0,L+=`' +
72
72
  __e(`+me+`) +
73
73
  '`),kt&&(I=!0,L+=`';
74
74
  `+kt+`;
@@ -78,10 +78,10 @@ __p += '`),ve&&(L+=`' +
78
78
  `;var ee=Ie.call(a,"variable")&&a.variable;if(!ee)L=`with (obj) {
79
79
  `+L+`
80
80
  }
81
- `;else if(Jw.test(ee))throw new ae(d);L=(I?L.replace(Dw,""):L).replace(xw,"$1").replace(Lw,"$1;"),L="function("+(ee||"obj")+`) {
81
+ `;else if(Qw.test(ee))throw new ae(d);L=(I?L.replace(xw,""):L).replace(Lw,"$1").replace(Uw,"$1;"),L="function("+(ee||"obj")+`) {
82
82
  `+(ee?"":`obj || (obj = {});
83
83
  `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
84
84
  function print() { __p += __j.call(arguments, '') }
85
85
  `:`;
86
86
  `)+L+`return __p
87
- }`;var he=nm(function(){return Ee(y,J+"return "+L).apply(t,_)});if(he.source=L,ru(he))throw he;return he}function wb(o){return Ae(o).toLowerCase()}function _b(o){return Ae(o).toUpperCase()}function Tb(o,a,l){if(o=Ae(o),o&&(l||a===t))return df(o);if(!o||!(a=zt(a)))return o;var h=kn(o),m=kn(a),y=hf(h,m),_=ff(h,m)+1;return Mr(h,y,_).join("")}function Eb(o,a,l){if(o=Ae(o),o&&(l||a===t))return o.slice(0,mf(o)+1);if(!o||!(a=zt(a)))return o;var h=kn(o),m=ff(h,kn(a))+1;return Mr(h,0,m).join("")}function Sb(o,a,l){if(o=Ae(o),o&&(l||a===t))return o.replace(rl,"");if(!o||!(a=zt(a)))return o;var h=kn(o),m=hf(h,kn(a));return Mr(h,m).join("")}function Ab(o,a){var l=Y,h=G;if(He(a)){var m="separator"in a?a.separator:m;l="length"in a?de(a.length):l,h="omission"in a?zt(a.omission):h}o=Ae(o);var y=o.length;if(Ao(o)){var _=kn(o);y=_.length}if(l>=y)return o;var E=l-Io(h);if(E<1)return h;var I=_?Mr(_,0,E).join(""):o.slice(0,E);if(m===t)return I+h;if(_&&(E+=I.length-E),ou(m)){if(o.slice(E).search(m)){var D,x=I;for(m.global||(m=wl(m.source,Ae(Ph.exec(m))+"g")),m.lastIndex=0;D=m.exec(x);)var L=D.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(zt(m),E)!=E){var $=I.lastIndexOf(m);$>-1&&(I=I.slice(0,$))}return I+h}function Ib(o){return o=Ae(o),o&&Uw.test(o)?o.replace(Rh,tT):o}var bb=Mo(function(o,a,l){return o+(l?" ":"")+a.toUpperCase()}),su=rg("toUpperCase");function tm(o,a,l){return o=Ae(o),a=l?t:a,a===t?J_(o)?oT(o):V_(o):o.match(a)||[]}var nm=fe(function(o,a){try{return $t(o,t,a)}catch(l){return ru(l)?l:new ae(l)}}),kb=ur(function(o,a){return ln(a,function(l){l=qn(l),cr(o,l,tu(o[l],o))}),o});function Rb(o){var a=o==null?0:o.length,l=Z();return o=a?Ue(o,function(h){if(typeof h[1]!="function")throw new un(c);return[l(h[0]),h[1]]}):[],fe(function(h){for(var m=-1;++m<a;){var y=o[m];if($t(y[0],this,h))return $t(y[1],this,h)}})}function Ob(o){return tE(hn(o,w))}function cu(o){return function(){return o}}function Nb(o,a){return o==null||o!==o?a:o}var Pb=ig(),Mb=ig(!0);function xt(o){return o}function lu(o){return xf(typeof o=="function"?o:hn(o,w))}function Db(o){return Uf(hn(o,w))}function xb(o,a){return Bf(o,hn(a,w))}var Lb=fe(function(o,a){return function(l){return Fi(l,o,a)}}),Ub=fe(function(o,a){return function(l){return Fi(o,l,a)}});function uu(o,a,l){var h=at(a),m=Qa(a,h);l==null&&!(He(a)&&(m.length||!h.length))&&(l=a,a=o,o=this,m=Qa(a,at(a)));var y=!(He(l)&&"chain"in l)||!!l.chain,_=hr(o);return ln(m,function(E){var I=a[E];o[E]=I,_&&(o.prototype[E]=function(){var D=this.__chain__;if(y||D){var x=o(this.__wrapped__),L=x.__actions__=Pt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),x.__chain__=D,x}return I.apply(o,br([this.value()],arguments))})}),o}function Bb(){return ut._===this&&(ut._=uT),this}function du(){}function Fb(o){return o=de(o),fe(function(a){return Ff(a,o)})}var Hb=$l(Ue),Vb=$l(af),$b=$l(fl);function rm(o){return Yl(o)?gl(qn(o)):yE(o)}function Kb(o){return function(a){return o==null?t:Zr(o,a)}}var zb=sg(),Wb=sg(!0);function hu(){return[]}function fu(){return!1}function qb(){return{}}function Gb(){return""}function jb(){return!0}function Yb(o,a){if(o=de(o),o<1||o>Je)return[];var l=Vt,h=Ct(o,Vt);a=Z(a),o-=Vt;for(var m=vl(h,a);++l<o;)a(l);return m}function Jb(o){return ce(o)?Ue(o,qn):Wt(o)?[o]:Pt(Eg(Ae(o)))}function Qb(o){var a=++cT;return Ae(o)+a}var Xb=rs(function(o,a){return o+a},0),Zb=Kl("ceil"),ek=rs(function(o,a){return o/a},1),tk=Kl("floor");function nk(o){return o&&o.length?Ja(o,xt,kl):t}function rk(o,a){return o&&o.length?Ja(o,Z(a,2),kl):t}function ok(o){return lf(o,xt)}function ik(o,a){return lf(o,Z(a,2))}function ak(o){return o&&o.length?Ja(o,xt,Pl):t}function sk(o,a){return o&&o.length?Ja(o,Z(a,2),Pl):t}var ck=rs(function(o,a){return o*a},1),lk=Kl("round"),uk=rs(function(o,a){return o-a},0);function dk(o){return o&&o.length?pl(o,xt):0}function hk(o,a){return o&&o.length?pl(o,Z(a,2)):0}return v.after=DA,v.ary=Dg,v.assign=_I,v.assignIn=jg,v.assignInWith=ps,v.assignWith=TI,v.at=EI,v.before=xg,v.bind=tu,v.bindAll=kb,v.bindKey=Lg,v.castArray=qA,v.chain=Ng,v.chunk=tS,v.compact=nS,v.concat=rS,v.cond=Rb,v.conforms=Ob,v.constant=cu,v.countBy=dA,v.create=SI,v.curry=Ug,v.curryRight=Bg,v.debounce=Fg,v.defaults=AI,v.defaultsDeep=II,v.defer=xA,v.delay=LA,v.difference=oS,v.differenceBy=iS,v.differenceWith=aS,v.drop=sS,v.dropRight=cS,v.dropRightWhile=lS,v.dropWhile=uS,v.fill=dS,v.filter=fA,v.flatMap=pA,v.flatMapDeep=vA,v.flatMapDepth=yA,v.flatten=bg,v.flattenDeep=hS,v.flattenDepth=fS,v.flip=UA,v.flow=Pb,v.flowRight=Mb,v.fromPairs=gS,v.functions=MI,v.functionsIn=DI,v.groupBy=CA,v.initial=pS,v.intersection=vS,v.intersectionBy=yS,v.intersectionWith=CS,v.invert=LI,v.invertBy=UI,v.invokeMap=_A,v.iteratee=lu,v.keyBy=TA,v.keys=at,v.keysIn=Dt,v.map=us,v.mapKeys=FI,v.mapValues=HI,v.matches=Db,v.matchesProperty=xb,v.memoize=hs,v.merge=VI,v.mergeWith=Yg,v.method=Lb,v.methodOf=Ub,v.mixin=uu,v.negate=fs,v.nthArg=Fb,v.omit=$I,v.omitBy=KI,v.once=BA,v.orderBy=EA,v.over=Hb,v.overArgs=FA,v.overEvery=Vb,v.overSome=$b,v.partial=nu,v.partialRight=Hg,v.partition=SA,v.pick=zI,v.pickBy=Jg,v.property=rm,v.propertyOf=Kb,v.pull=ES,v.pullAll=Rg,v.pullAllBy=SS,v.pullAllWith=AS,v.pullAt=IS,v.range=zb,v.rangeRight=Wb,v.rearg=HA,v.reject=bA,v.remove=bS,v.rest=VA,v.reverse=Zl,v.sampleSize=RA,v.set=qI,v.setWith=GI,v.shuffle=OA,v.slice=kS,v.sortBy=MA,v.sortedUniq=xS,v.sortedUniqBy=LS,v.split=pb,v.spread=$A,v.tail=US,v.take=BS,v.takeRight=FS,v.takeRightWhile=HS,v.takeWhile=VS,v.tap=nA,v.throttle=KA,v.thru=ls,v.toArray=Wg,v.toPairs=Qg,v.toPairsIn=Xg,v.toPath=Jb,v.toPlainObject=Gg,v.transform=jI,v.unary=zA,v.union=$S,v.unionBy=KS,v.unionWith=zS,v.uniq=WS,v.uniqBy=qS,v.uniqWith=GS,v.unset=YI,v.unzip=eu,v.unzipWith=Og,v.update=JI,v.updateWith=QI,v.values=Lo,v.valuesIn=XI,v.without=jS,v.words=tm,v.wrap=WA,v.xor=YS,v.xorBy=JS,v.xorWith=QS,v.zip=XS,v.zipObject=ZS,v.zipObjectDeep=eA,v.zipWith=tA,v.entries=Qg,v.entriesIn=Xg,v.extend=jg,v.extendWith=ps,uu(v,v),v.add=Xb,v.attempt=nm,v.camelCase=nb,v.capitalize=Zg,v.ceil=Zb,v.clamp=ZI,v.clone=GA,v.cloneDeep=YA,v.cloneDeepWith=JA,v.cloneWith=jA,v.conformsTo=QA,v.deburr=em,v.defaultTo=Nb,v.divide=ek,v.endsWith=rb,v.eq=On,v.escape=ob,v.escapeRegExp=ib,v.every=hA,v.find=gA,v.findIndex=Ag,v.findKey=bI,v.findLast=mA,v.findLastIndex=Ig,v.findLastKey=kI,v.floor=tk,v.forEach=Pg,v.forEachRight=Mg,v.forIn=RI,v.forInRight=OI,v.forOwn=NI,v.forOwnRight=PI,v.get=iu,v.gt=XA,v.gte=ZA,v.has=xI,v.hasIn=au,v.head=kg,v.identity=xt,v.includes=wA,v.indexOf=mS,v.inRange=eb,v.invoke=BI,v.isArguments=no,v.isArray=ce,v.isArrayBuffer=eI,v.isArrayLike=Mt,v.isArrayLikeObject=Ge,v.isBoolean=tI,v.isBuffer=Dr,v.isDate=nI,v.isElement=rI,v.isEmpty=oI,v.isEqual=iI,v.isEqualWith=aI,v.isError=ru,v.isFinite=sI,v.isFunction=hr,v.isInteger=Vg,v.isLength=gs,v.isMap=$g,v.isMatch=cI,v.isMatchWith=lI,v.isNaN=uI,v.isNative=dI,v.isNil=fI,v.isNull=hI,v.isNumber=Kg,v.isObject=He,v.isObjectLike=$e,v.isPlainObject=Wi,v.isRegExp=ou,v.isSafeInteger=gI,v.isSet=zg,v.isString=ms,v.isSymbol=Wt,v.isTypedArray=xo,v.isUndefined=mI,v.isWeakMap=pI,v.isWeakSet=vI,v.join=wS,v.kebabCase=ab,v.last=gn,v.lastIndexOf=_S,v.lowerCase=sb,v.lowerFirst=cb,v.lt=yI,v.lte=CI,v.max=nk,v.maxBy=rk,v.mean=ok,v.meanBy=ik,v.min=ak,v.minBy=sk,v.stubArray=hu,v.stubFalse=fu,v.stubObject=qb,v.stubString=Gb,v.stubTrue=jb,v.multiply=ck,v.nth=TS,v.noConflict=Bb,v.noop=du,v.now=ds,v.pad=lb,v.padEnd=ub,v.padStart=db,v.parseInt=hb,v.random=tb,v.reduce=AA,v.reduceRight=IA,v.repeat=fb,v.replace=gb,v.result=WI,v.round=lk,v.runInContext=A,v.sample=kA,v.size=NA,v.snakeCase=mb,v.some=PA,v.sortedIndex=RS,v.sortedIndexBy=OS,v.sortedIndexOf=NS,v.sortedLastIndex=PS,v.sortedLastIndexBy=MS,v.sortedLastIndexOf=DS,v.startCase=vb,v.startsWith=yb,v.subtract=uk,v.sum=dk,v.sumBy=hk,v.template=Cb,v.times=Yb,v.toFinite=fr,v.toInteger=de,v.toLength=qg,v.toLower=wb,v.toNumber=mn,v.toSafeInteger=wI,v.toString=Ae,v.toUpper=_b,v.trim=Tb,v.trimEnd=Eb,v.trimStart=Sb,v.truncate=Ab,v.unescape=Ib,v.uniqueId=Qb,v.upperCase=bb,v.upperFirst=su,v.each=Pg,v.eachRight=Mg,v.first=kg,uu(v,function(){var o={};return zn(v,function(a,l){Ie.call(v.prototype,l)||(o[l]=a)}),o}(),{chain:!1}),v.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){v[o].placeholder=v}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(l){l=l===t?1:nt(de(l),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=Ct(l,h.__takeCount__):h.__views__.push({size:Ct(l,Vt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(l){return this.reverse()[o](l).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var l=a+1,h=l==vt||l==sn;pe.prototype[o]=function(m){var y=this.clone();return y.__iteratees__.push({iteratee:Z(m,3),type:l}),y.__filtered__=y.__filtered__||h,y}}),ln(["head","last"],function(o,a){var l="take"+(a?"Right":"");pe.prototype[o]=function(){return this[l](1).value()[0]}}),ln(["initial","tail"],function(o,a){var l="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[l](1)}}),pe.prototype.compact=function(){return this.filter(xt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(l){return Fi(l,o,a)})}),pe.prototype.reject=function(o){return this.filter(fs(Z(o)))},pe.prototype.slice=function(o,a){o=de(o);var l=this;return l.__filtered__&&(o>0||a<0)?new pe(l):(o<0?l=l.takeRight(-o):o&&(l=l.drop(o)),a!==t&&(a=de(a),l=a<0?l.dropRight(-a):l.take(a-o)),l)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Vt)},zn(pe.prototype,function(o,a){var l=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),m=v[h?"take"+(a=="last"?"Right":""):a],y=h||/^find/.test(a);m&&(v.prototype[a]=function(){var _=this.__wrapped__,E=h?[1]:arguments,I=_ instanceof pe,D=E[0],x=I||ce(_),L=function(me){var ve=m.apply(v,br([me],E));return h&&$?ve[0]:ve};x&&l&&typeof D=="function"&&D.length!=1&&(I=x=!1);var $=this.__chain__,J=!!this.__actions__.length,ee=y&&!$,he=I&&!J;if(!y&&x){_=he?_:new pe(this);var te=o.apply(_,E);return te.__actions__.push({func:ls,args:[L],thisArg:t}),new dn(te,$)}return ee&&he?o.apply(this,E):(te=this.thru(L),ee?h?te.value()[0]:te.value():te)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=xa[o],l=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);v.prototype[o]=function(){var m=arguments;if(h&&!this.__chain__){var y=this.value();return a.apply(ce(y)?y:[],m)}return this[l](function(_){return a.apply(ce(_)?_:[],m)})}}),zn(pe.prototype,function(o,a){var l=v[a];if(l){var h=l.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:l})}}),Oo[ns(t,K).name]=[{name:"wrapper",func:t}],pe.prototype.clone=IT,pe.prototype.reverse=bT,pe.prototype.value=kT,v.prototype.at=rA,v.prototype.chain=oA,v.prototype.commit=iA,v.prototype.next=aA,v.prototype.plant=cA,v.prototype.reverse=lA,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=uA,v.prototype.first=v.prototype.head,Pi&&(v.prototype[Pi]=sA),v},bo=iT();jr?((jr.exports=bo)._=bo,ll._=bo):ut._=bo}).call(AD)}(Xi,Xi.exports)),Xi.exports}var wi=ID();const js=SD(wi);function _i(r){const e=Sh();e.defaults.baseURL=r;const t=u.ref({scope_type:"org"});async function n(i){t.value=i}return u.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function bD(){const r=_i("https://api.jplan.com.br/management/organization"),{error:e}=Vn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Hr=bD();function kD(){const r=_i("https://api.jplan.com.br/management/branch/"),{error:e}=Vn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Vr=kD();function RD(){const r=_i("https://api.jplan.com.br/management/team"),{error:e}=Vn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",c=await r.get(`/item/${t}/user/item/${n}/${s}`);if(c.data.error)throw e("Failed to fetch User"),new Error(c.data.error);return c.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const Xt=RD();async function OD({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ve({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(c){throw console.error(`Request failed for ${e} ${r}:`,c),c}}function Ti(r,e,t=[]){const n=PD(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>ND(s,i,t))}function ND(r,e,t){return t.some(n=>{const i=js.get(r,n);if(js.isNil(i))return!1;const s=js.toString(i).toLowerCase();return e.every(c=>s.includes(c))})}function PD(r){return js.trim(r).toLowerCase().replace(/\s+/g," ")}const yw=6048e5,MD=864e5,Op=Symbol.for("constructDateFrom");function Gr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Op in r?r[Op](e):r instanceof Date?new r.constructor(e):new Date(e)}function Kn(r,e){return Gr(e||r,r)}let DD={};function zc(){return DD}function ga(r,e){var d,f,g,p;const t=zc(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((p=(g=t.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??0,i=Kn(r,e==null?void 0:e.in),s=i.getDay(),c=(s<n?7:0)+s-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function vc(r,e){return ga(r,{...e,weekStartsOn:1})}function Cw(r,e){const t=Kn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Gr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=vc(i),c=Gr(t,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=vc(c);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Np(r){const e=Kn(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function xD(r,...e){const t=Gr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Pp(r,e){const t=Kn(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function LD(r,e,t){const[n,i]=xD(t==null?void 0:t.in,r,e),s=Pp(n),c=Pp(i),d=+s-Np(s),f=+c-Np(c);return Math.round((d-f)/MD)}function UD(r,e){const t=Cw(r,e),n=Gr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vc(n)}function BD(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function FD(r){return!(!BD(r)&&typeof r!="number"||isNaN(+Kn(r)))}function HD(r,e){const t=Kn(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const VD={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"}},$D=(r,e,t)=>{let n;const i=VD[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Sn(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const KD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qD={date:Sn({formats:KD,defaultWidth:"full"}),time:Sn({formats:zD,defaultWidth:"full"}),dateTime:Sn({formats:WD,defaultWidth:"full"})},GD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jD=(r,e,t,n)=>GD[r];function Xe(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const c=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):c;i=r.formattingValues[d]||r.formattingValues[c]}else{const c=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[c]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const YD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},JD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QD={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"]},XD={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"]},ZD={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"}},ex={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"}},tx=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},nx={ordinalNumber:tx,era:Xe({values:YD,defaultWidth:"wide"}),quarter:Xe({values:JD,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:QD,defaultWidth:"wide"}),day:Xe({values:XD,defaultWidth:"wide"}),dayPeriod:Xe({values:ZD,defaultWidth:"wide",formattingValues:ex,defaultFormattingWidth:"wide"})};function Ze(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const c=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?ox(d,w=>w.test(c)):rx(d,w=>w.test(c));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const p=e.slice(c.length);return{value:g,rest:p}}}function rx(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function ox(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function Wc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let c=r.valueCallback?r.valueCallback(s[0]):s[0];c=t.valueCallback?t.valueCallback(c):c;const d=e.slice(i.length);return{value:c,rest:d}}}const ix=/^(\d+)(th|st|nd|rd)?/i,ax=/\d+/i,sx={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},cx={any:[/^b/i,/^(a|c)/i]},lx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ux={any:[/1/i,/2/i,/3/i,/4/i]},dx={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},hx={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]},fx={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},gx={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]},mx={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},px={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}},vx={ordinalNumber:Wc({matchPattern:ix,parsePattern:ax,valueCallback:r=>parseInt(r,10)}),era:Ze({matchPatterns:sx,defaultMatchWidth:"wide",parsePatterns:cx,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:lx,defaultMatchWidth:"wide",parsePatterns:ux,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:dx,defaultMatchWidth:"wide",parsePatterns:hx,defaultParseWidth:"any"}),day:Ze({matchPatterns:fx,defaultMatchWidth:"wide",parsePatterns:gx,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:mx,defaultMatchWidth:"any",parsePatterns:px,defaultParseWidth:"any"})},Ih={code:"en-US",formatDistance:$D,formatLong:qD,formatRelative:jD,localize:nx,match:vx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yx(r,e){const t=Kn(r,e==null?void 0:e.in);return LD(t,HD(t))+1}function Cx(r,e){const t=Kn(r,e==null?void 0:e.in),n=+vc(t)-+UD(t);return Math.round(n/yw)+1}function ww(r,e){var p,w,C,S;const t=Kn(r,e==null?void 0:e.in),n=t.getFullYear(),i=zc(),s=(e==null?void 0:e.firstWeekContainsDate)??((w=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,c=Gr((e==null?void 0:e.in)||r,0);c.setFullYear(n+1,0,s),c.setHours(0,0,0,0);const d=ga(c,e),f=Gr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=ga(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function wx(r,e){var d,f,g,p;const t=zc(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(g=t.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,i=ww(r,e),s=Gr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),ga(s,e)}function _x(r,e){const t=Kn(r,e==null?void 0:e.in),n=+ga(t,e)-+wx(t,e);return Math.round(n/yw)+1}function ke(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Lr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return ke(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):ke(t+1,2)},d(r,e){return ke(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return ke(r.getHours()%12||12,e.length)},H(r,e){return ke(r.getHours(),e.length)},m(r,e){return ke(r.getMinutes(),e.length)},s(r,e){return ke(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return ke(i,e.length)}},zo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mp={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Lr.y(r,e)},Y:function(r,e,t,n){const i=ww(r,n),s=i>0?i:1-i;if(e==="YY"){const c=s%100;return ke(c,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):ke(s,e.length)},R:function(r,e){const t=Cw(r);return ke(t,e.length)},u:function(r,e){const t=r.getFullYear();return ke(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return ke(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return ke(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Lr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return ke(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=_x(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):ke(i,e.length)},I:function(r,e,t){const n=Cx(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):ke(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Lr.d(r,e)},D:function(r,e,t){const n=yx(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):ke(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ke(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ke(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return ke(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=zo.noon:n===0?i=zo.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=zo.evening:n>=12?i=zo.afternoon:n>=4?i=zo.morning:i=zo.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Lr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Lr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):ke(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):ke(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Lr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Lr.s(r,e)},S:function(r,e){return Lr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return xp(n);case"XXXX":case"XX":return so(n);case"XXXXX":case"XXX":default:return so(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return xp(n);case"xxxx":case"xx":return so(n);case"xxxxx":case"xxx":default:return so(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Dp(n,":");case"OOOO":default:return"GMT"+so(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Dp(n,":");case"zzzz":default:return"GMT"+so(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return ke(n,e.length)},T:function(r,e,t){return ke(+r,e.length)}};function Dp(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+ke(s,2)}function xp(r,e){return r%60===0?(r>0?"-":"+")+ke(Math.abs(r)/60,2):so(r,e)}function so(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=ke(Math.trunc(n/60),2),s=ke(n%60,2);return t+i+e+s}const Lp=(r,e)=>{switch(r){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"})}},_w=(r,e)=>{switch(r){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"})}},Tx=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Lp(r,e);let s;switch(n){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}}",Lp(n,e)).replace("{{time}}",_w(i,e))},Ex={p:_w,P:Tx},Sx=/^D+$/,Ax=/^Y+$/,Ix=["D","DD","YY","YYYY"];function bx(r){return Sx.test(r)}function kx(r){return Ax.test(r)}function Rx(r,e,t){const n=Ox(r,e,t);if(console.warn(n),Ix.includes(r))throw new RangeError(n)}function Ox(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Nx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Px=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mx=/^'([^]*?)'?$/,Dx=/''/g,xx=/[a-zA-Z]/;function Lx(r,e,t){var p,w,C,S,T,b,N,K;const n=zc(),i=(t==null?void 0:t.locale)??n.locale??Ih,s=(t==null?void 0:t.firstWeekContainsDate)??((w=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,c=(t==null?void 0:t.weekStartsOn)??((b=(T=t==null?void 0:t.locale)==null?void 0:T.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((K=(N=n.locale)==null?void 0:N.options)==null?void 0:K.weekStartsOn)??0,d=Kn(r,t==null?void 0:t.in);if(!FD(d))throw new RangeError("Invalid time value");let f=e.match(Px).map(H=>{const V=H[0];if(V==="p"||V==="P"){const z=Ex[V];return z(H,i.formatLong)}return H}).join("").match(Nx).map(H=>{if(H==="''")return{isToken:!1,value:"'"};const V=H[0];if(V==="'")return{isToken:!1,value:Ux(H)};if(Mp[V])return{isToken:!0,value:H};if(V.match(xx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return{isToken:!1,value:H}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:c,locale:i};return f.map(H=>{if(!H.isToken)return H.value;const V=H.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&kx(V)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&bx(V))&&Rx(V,e,String(r));const z=Mp[V[0]];return z(d,V,i.localize,g)}).join("")}function Ux(r){const e=r.match(Mx);return e?e[1].replace(Dx,"'"):r}const Up={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},Bx=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Up[r].withPreposition:Up[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},Fx={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Hx={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Vx={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},$x={date:Sn({formats:Fx,defaultWidth:"full"}),time:Sn({formats:Hx,defaultWidth:"full"}),dateTime:Sn({formats:Vx,defaultWidth:"full"})},Kx={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},zx=(r,e,t,n)=>Kx[r],Wx={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},qx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},bd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},Gx={narrow:bd.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:bd.wide},jx={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Yx={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Jx={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Qx=r=>Number(r)+".",Xx={ordinalNumber:Qx,era:Xe({values:Wx,defaultWidth:"wide"}),quarter:Xe({values:qx,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:bd,formattingValues:Gx,defaultWidth:"wide"}),day:Xe({values:jx,defaultWidth:"wide"}),dayPeriod:Xe({values:Yx,defaultWidth:"wide",formattingValues:Jx,defaultFormattingWidth:"wide"})},Zx=/^(\d+)(\.)?/i,eL=/\d+/i,tL={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},nL={any:[/^v/i,/^n/i]},rL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},oL={any:[/1/i,/2/i,/3/i,/4/i]},iL={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},aL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sL={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},cL={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},lL={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},uL={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},dL={ordinalNumber:Wc({matchPattern:Zx,parsePattern:eL,valueCallback:r=>parseInt(r)}),era:Ze({matchPatterns:tL,defaultMatchWidth:"wide",parsePatterns:nL,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:rL,defaultMatchWidth:"wide",parsePatterns:oL,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:iL,defaultMatchWidth:"wide",parsePatterns:aL,defaultParseWidth:"any"}),day:Ze({matchPatterns:sL,defaultMatchWidth:"wide",parsePatterns:cL,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:lL,defaultMatchWidth:"wide",parsePatterns:uL,defaultParseWidth:"any"})},hL={code:"de",formatDistance:Bx,formatLong:$x,formatRelative:zx,localize:Xx,match:dL,options:{weekStartsOn:1,firstWeekContainsDate:4}},fL={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},gL=(r,e,t)=>{let n;const i=fL[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},mL={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},pL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},vL={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yL={date:Sn({formats:mL,defaultWidth:"full"}),time:Sn({formats:pL,defaultWidth:"full"}),dateTime:Sn({formats:vL,defaultWidth:"full"})},CL={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},wL=(r,e,t,n)=>CL[r],_L={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},TL={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},EL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},SL={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},AL={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},IL=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},bL=["MMM","MMMM"],kL={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&bL.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:IL,era:Xe({values:_L,defaultWidth:"wide"}),quarter:Xe({values:TL,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:EL,defaultWidth:"wide"}),day:Xe({values:SL,defaultWidth:"wide"}),dayPeriod:Xe({values:AL,defaultWidth:"wide"})},RL=/^(\d+)(ième|ère|ème|er|e)?/i,OL=/\d+/i,NL={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},PL={any:[/^av/i,/^ap/i]},ML={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},DL={any:[/1/i,/2/i,/3/i,/4/i]},xL={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},LL={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,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},UL={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},BL={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},FL={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},HL={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},VL={ordinalNumber:Wc({matchPattern:RL,parsePattern:OL,valueCallback:r=>parseInt(r)}),era:Ze({matchPatterns:NL,defaultMatchWidth:"wide",parsePatterns:PL,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:ML,defaultMatchWidth:"wide",parsePatterns:DL,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:xL,defaultMatchWidth:"wide",parsePatterns:LL,defaultParseWidth:"any"}),day:Ze({matchPatterns:UL,defaultMatchWidth:"wide",parsePatterns:BL,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:FL,defaultMatchWidth:"any",parsePatterns:HL,defaultParseWidth:"any"})},$L={code:"fr",formatDistance:gL,formatLong:yL,formatRelative:wL,localize:kL,match:VL,options:{weekStartsOn:1,firstWeekContainsDate:4}},KL={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},zL=(r,e,t)=>{let n;const i=KL[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},WL={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},qL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},GL={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jL={date:Sn({formats:WL,defaultWidth:"full"}),time:Sn({formats:qL,defaultWidth:"full"}),dateTime:Sn({formats:GL,defaultWidth:"full"})},YL={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},JL=(r,e,t,n)=>{const i=YL[r];return typeof i=="function"?i(e):i},QL={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},XL={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ZL={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},eU={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},tU={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},nU={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},rU=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},oU={ordinalNumber:rU,era:Xe({values:QL,defaultWidth:"wide"}),quarter:Xe({values:XL,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:ZL,defaultWidth:"wide"}),day:Xe({values:eU,defaultWidth:"wide"}),dayPeriod:Xe({values:tU,defaultWidth:"wide",formattingValues:nU,defaultFormattingWidth:"wide"})},iU=/^(\d+)[ºªo]?/i,aU=/\d+/i,sU={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},cU={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},lU={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},uU={any:[/1/i,/2/i,/3/i,/4/i]},dU={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},hU={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,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},fU={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},gU={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},mU={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},pU={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},vU={ordinalNumber:Wc({matchPattern:iU,parsePattern:aU,valueCallback:r=>parseInt(r,10)}),era:Ze({matchPatterns:sU,defaultMatchWidth:"wide",parsePatterns:cU,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:lU,defaultMatchWidth:"wide",parsePatterns:uU,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:dU,defaultMatchWidth:"wide",parsePatterns:hU,defaultParseWidth:"any"}),day:Ze({matchPatterns:fU,defaultMatchWidth:"wide",parsePatterns:gU,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:mU,defaultMatchWidth:"any",parsePatterns:pU,defaultParseWidth:"any"})},yU={code:"pt-BR",formatDistance:zL,formatLong:jL,formatRelative:JL,localize:oU,match:vU,options:{weekStartsOn:0,firstWeekContainsDate:1}},CU={"en-US":Ih,"pt-BR":yU,"fr-FR":$L,"de-DE":hL};function wU(r){if(!r)return"";const e=navigator.language,t=CU[e]||Ih;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":Lx(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}let Ns=!1;const Vu=u.ref(!1),pn=u.ref([]),Bp=u.ref([]),Ke=u.ref(null),Wo=u.ref([]),qo=u.ref([]),Tw=()=>{const r=Vn(),e=async T=>{Vu.value=!0;const b=T?`_active eq true and ${T}`:"_active eq true",N=await Hr.getOrgList(b);N&&(pn.value=N,Ns=!0),Vu.value=!1},t=async T=>{var b;return(b=pn.value)!=null&&b.length||await e(T),pn.value};function n(T){if(!pn.value)throw new Error("Data not stored yet");const b=Ti(pn.value,T,["name","description"]);return T!==""?b:pn.value}const i=T=>{Bp.value=T},s=T=>{Ke.value=wi.cloneDeep(T)},c=async T=>await Hr.getOrg(T),d=async()=>{if(Ke.value!=null){const T=await Hr.createOrg(Ke.value);return T!=null&&T.data.created_at&&(r.success("Organization created."),Ns&&pn.value.push(T.data)),T==null?void 0:T.data}},f=async()=>{if(se.value=!0,Ke.value&&Ke.value.__id){const T=await Hr.updateOrg(Ke.value);if(Ns&&(T!=null&&T.data.__id)){const b=pn.value.findIndex(N=>N.__id===T.data.__id);return b!==-1?(pn.value[b]=T.data,r.success("Organization updated.")):r.error("Unable to update item"),se.value=!1,T.data}}else se.value=!1,r.error("Unable to update item")},g=async()=>{if(se.value=!0,Ke.value&&Ke.value.created_at){if(await Hr.deactivateOrg(Ke.value.__id),Ns){const T=pn.value.findIndex(b=>{var N;return b.__id===((N=Ke.value)==null?void 0:N.__id)});if(T!==-1)return pn.value.splice(T,1),Ke.value;r.error("Unable to deactivate organization")}se.value=!1}};async function p(T){se.value=!0;try{if(Ke.value&&Ke.value.__id){const b={...T,organization:Ke.value.__id};if(!await Vr.updateBranch(b)){se.value=!1;return}if(Wo.value.findIndex(H=>H.__id===T.__id)===-1)return r.success("Branch added successfully."),Wo.value.push(b),b;r.info("Branch already added.")}}catch(b){console.error(b)}finally{se.value=!1}}async function w(T){if(se.value=!0,Ke.value&&Ke.value.__id){const b={...T,organization:null};if(!await Vr.updateBranch(b)){se.value=!1;return}const K=Wo.value.findIndex(H=>H.__id===T.__id);if(K!==-1)return Wo.value.splice(K,1),se.value=!1,Wo.value;throw new Error("Item not found to remove")}se.value=!1}async function C(T){se.value=!0;try{if(Ke.value&&Ke.value.__id){const b={...T,organization:Ke.value.__id};if(!await Xt.updateTeam(b)){se.value=!1;return}if(qo.value.findIndex(H=>H.__id===T.__id)===-1)return r.success("Team added successfully."),qo.value.push(b),b;r.info("Team already added.")}}catch(b){console.error(b)}finally{se.value=!1}}async function S(T){if(se.value=!0,Ke.value&&Ke.value.__id){const b={...T,organization:null};if(!await Xt.updateTeam(b)){se.value=!1;return}const K=qo.value.findIndex(H=>H.__id===T.__id);if(K!==-1)return qo.value.splice(K,1),se.value=!1,qo.value;throw new Error("Item not found to remove")}se.value=!1}return{data:pn,loading:Vu,columns:Bp,item:Ke,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,orgBranches:Wo,orgTeams:qo,linkBranch:p,unlinkBranch:w,linkTeam:C,unlinkTeam:S}};let Ps=!1;const vn=u.ref([]),Fp=u.ref([]),rt=u.ref(null),$u=u.ref(!1),Go=u.ref([]),Ew=()=>{const r=Vn(),e=async C=>{$u.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Xt.getTeamList(S);T&&(vn.value=T,Ps=!0),$u.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Ti(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{Fp.value=C},s=C=>{rt.value=wi.cloneDeep(C)},c=async C=>await Xt.getTeam(C),d=async()=>{if(rt.value!=null){const C=await Xt.createTeam(rt.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Ps&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(se.value=!0,rt.value&&rt.value.__id){const C=await Xt.updateTeam(rt.value);if(Ps&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(rt.value&&rt.value.created_at&&(await Xt.deactivateTeam(rt.value.__id),Ps)){const C=vn.value.findIndex(S=>{var T;return S.__id===((T=rt.value)==null?void 0:T.__id)});if(C!==-1)return vn.value.splice(C,1),rt.value;r.error("Unable to deactivate organization")}};async function p(C){var S;if(se.value=!0,(S=rt.value)!=null&&S.__id)if(Go.value.findIndex(b=>b.__id===C.__id)===-1)try{const b=await Xt.linkManageUser(rt.value.__id,{team:rt.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),N=await Xt.getTeamUserList(rt.value.__id);return N&&(Go.value=N),r.success("User added successfully."),b}catch(b){console.error(b),r.error("Unable to add User.")}finally{se.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");se.value=!1}async function w(C){if(se.value=!0,rt.value&&rt.value.__id){const S=Go.value.findIndex(T=>T.__id===C);if(S!==-1)return await Xt.unlinkManageUser(rt.value.__id,C),Go.value.splice(S,1),se.value=!1,Go.value;throw new Error("Item not found to remove")}se.value=!1}return{data:vn,loading:$u,columns:Fp,item:rt,usersTeam:Go,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,linkUser:p,unlinkUser:w}},Sw=u.defineComponent({__name:"GlobalScopeFilter",setup(r){var N,K,H;const{openDialog:e}=Cc("global-scope__J-"),{user:t,domain:n,scope:i,session:s,setScope:c}=Ah(),{getData:d,data:f}=Tw(),{getData:g,data:p}=Ew(),w=u.ref(!1);u.onBeforeMount(async()=>{w.value=!0,await d(),await g(),w.value=!1});const C=u.ref({scope_type:(N=i.value)==null?void 0:N.scope_type,organization:((K=i.value)==null?void 0:K.organization)??"org",team:(H=i.value)==null?void 0:H.team});function S(){var V,z,Q;C.value={...i.value,scope_type:(V=i.value)==null?void 0:V.scope_type,organization:((z=i.value)==null?void 0:z.organization)??"",team:(Q=i.value)==null?void 0:Q.team},e()}const T=u.computed(()=>{var V;switch((V=i.value)==null?void 0:V.scope_type){case"user":return _N;case"org":return CN;case"team":return TN;default:return wN}});async function b(){var V;((V=i.value)==null?void 0:V.scope_type)!==""&&c(C.value)}return(V,z)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(qe.VBtn,{onClick:S,icon:"",class:"text-secondary ms-3",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(T.value),{size:"20"}))]),_:1}),u.createVNode(u.unref(ma),{loading:w.value,title:"Scope","dialog-id":"global-scope__J-","on-save":b},{default:u.withCtx(()=>[u.createElementVNode("div",null,[u.createVNode(pt.VRow,null,{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[3]||(z[3]=[u.createTextVNode(" User")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>{var Q;return[u.createTextVNode(u.toDisplayString(((Q=u.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),u.createVNode(pt.VCol,{cols:"4"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[4]||(z[4]=[u.createTextVNode(" Domain")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(u.unref(n)),1)]),_:1})]),_:1})]),_:1}),u.createVNode(pt.VCol,{cols:"4"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[5]||(z[5]=[u.createTextVNode(" Environment")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(u.unref(s).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),u.createVNode(vk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:C.value.scope_type,"onUpdate:modelValue":z[0]||(z[0]=Q=>C.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:u.withCtx(()=>z[6]||(z[6]=[u.createTextVNode("Organizational")])),_:1}),u.createVNode(qe.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:u.withCtx(()=>z[7]||(z[7]=[u.createTextVNode("Team")])),_:1}),u.createVNode(qe.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:u.withCtx(()=>z[8]||(z[8]=[u.createTextVNode("User")])),_:1}),u.createVNode(qe.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:u.withCtx(()=>z[9]||(z[9]=[u.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),u.createElementVNode("div",null,[u.createVNode(ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>z[10]||(z[10]=[u.createTextVNode("Organization")])),_:1}),u.createVNode(im.VSelect,{items:u.unref(f),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:C.value.organization,"onUpdate:modelValue":z[1]||(z[1]=Q=>C.value.organization=Q)},null,8,["items","modelValue"]),u.createVNode(ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>z[11]||(z[11]=[u.createTextVNode("Team")])),_:1}),u.createVNode(im.VSelect,{items:u.unref(p),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:C.value.team,"onUpdate:modelValue":z[2]||(z[2]=Q=>C.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),_U={},TU={class:"double-ring-spinner-container"};function EU(r,e){return u.openBlock(),u.createElementBlock("div",TU,e[0]||(e[0]=[u.createElementVNode("div",{class:"spinner-loading"},[u.createElementVNode("div"),u.createElementVNode("div"),u.createElementVNode("div",null,[u.createElementVNode("div")]),u.createElementVNode("div",null,[u.createElementVNode("div")])],-1)]))}const Aw=Ca(_U,[["render",EU],["__scopeId","data-v-003f238f"]]),SU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:jv,ColumnSettingsDialog:Wv,ConfirmDialog:qv,ContextMenu:Yv,CopyButton:yc,DeleteButton:kv,DotsMenu:Ov,EditButton:Rv,FormHeadless:oy,FormMetadata:rc,GlobalScopeFilter:Sw,JAvatar:Gv,JBtn:jp,JDialog:ma,JForm:ny,JIconBtn:Gp,JSelect:Qv,JTextArea:Xv,JTextField:rc,ParentCard:Ec,SpinnerLoader:Aw,TabFormHeader:ry,UiTable:Nv},Symbol.toStringTag,{value:"Module"})),AU=Yk(),IU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0},bU={key:0,class:"overlay"},kU={__name:"GlobalSpinner",setup(r){return(e,t)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[u.unref(se)?(u.openBlock(),u.createElementBlock("div",bU,t[0]||(t[0]=[u.createElementVNode("div",{class:"double-ring-spinner-container"},[u.createElementVNode("div",{class:"spinner-loading"},[u.createElementVNode("div"),u.createElementVNode("div"),u.createElementVNode("div",null,[u.createElementVNode("div")]),u.createElementVNode("div",null,[u.createElementVNode("div")])])],-1)]))):u.createCommentVNode("",!0)]))}},RU=Ca(kU,[["__scopeId","data-v-b114d14e"]]),{isAuthenticated:Hp,handleRedirect:OU}=GC(),NU=Ah();function PU(r){r.beforeEach(async(e,t,n)=>{function i(c){return c.matched.some(d=>d.meta.requiresAuth)}if(!i(e))return n();try{Hp.value||(await OU(e.fullPath),await NU.__init__())}catch(c){console.error("Error in navigation guard:",c),n("/")}Hp.value&&n()})}let Ku=!1;const zu=u.ref(!1),yn=u.ref([]),Vp=u.ref([]),ht=u.ref(null),jo=u.ref([]),MU=()=>{const r=Vn(),e=async C=>{zu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Vr.getBranchList(S);T&&(yn.value=T,Ku=!0),zu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Ti(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Vp.value=C},s=C=>{ht.value=wi.cloneDeep(C)},c=async C=>await Vr.getBranch(C),d=async()=>{if(ht.value!=null){const C=await Vr.createBranch(ht.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),Ku&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ht.value&&ht.value.__id){const C=await Vr.updateBranch(ht.value);if(Ku&&C){const S=yn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(ht.value&&ht.value.created_at){await Vr.deactivateBranch(ht.value.__id);const C=yn.value.findIndex(S=>{var T;return S.__id===((T=ht.value)==null?void 0:T.__id)});if(C!==-1)return yn.value.splice(C,1),ht.value;r.error("Unable to deactivate Domain")}};async function p(C){se.value=!0;try{if(ht.value&&ht.value.__id){const S={...C,branch:ht.value.__id};if(!await Xt.updateTeam(S)){r.error("Unable to link team");return}if(jo.value.findIndex(N=>N.__id===C.__id)===-1)return r.success("Team added successfully."),jo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{se.value=!1}}async function w(C){if(se.value=!0,ht.value&&ht.value.__id){const S={...C,branch:null};if(!await Xt.updateTeam(S))return;const b=jo.value.findIndex(N=>N.__id===C.__id);if(b!==-1)return jo.value.splice(b,1),se.value=!1,jo.value;throw new Error("Item not found to remove")}se.value=!1}return{data:yn,columns:Vp,item:ht,loading:zu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,branchTeams:jo,linkTeam:p,unlinkTeam:w}};function DU(){const r=_i("https://api.jplan.com.br/management/division"),{error:e}=Vn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ei=DU();let Wu=!1;const qu=u.ref(!1),Cn=u.ref([]),$p=u.ref([]),ft=u.ref(null),Yo=u.ref([]),xU=()=>{const r=Vn(),e=async C=>{qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await ei.getDivisionList(S);T&&(Cn.value=T,Wu=!0),qu.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Ti(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{$p.value=C},s=C=>{ft.value=wi.cloneDeep(C)},c=async C=>await ei.getDivision(C),d=async()=>{if(ft.value!=null){const C=await ei.createDivision(ft.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Wu&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(se.value=!0,ft.value&&ft.value.__id){const C=await ei.updateDivision(ft.value);if(Wu&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),se.value=!1,C}}else se.value=!1,r.error("Unable to update item")},g=async()=>{if(se.value=!0,ft.value&&ft.value.created_at){await ei.deactivateDivision(ft.value.__id);const C=Cn.value.findIndex(S=>{var T;return S.__id===((T=ft.value)==null?void 0:T.__id)});if(C!==-1)return Cn.value.splice(C,1),ft.value;r.error("Unable to deactivate Division")}se.value=!1};async function p(C){se.value=!0;try{if(ft.value&&ft.value.__id){const S={...C,division:ft.value.__id};return await Hr.updateOrg(S)?(Yo.value.findIndex(N=>N.__id===C.__id)===-1?(r.success("Organization added successfully."),Yo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{se.value=!1}}async function w(C){if(se.value=!0,ft.value&&ft.value.__id){const S={...C,division:null};if(!await Hr.updateOrg(S))return;const b=Yo.value.findIndex(N=>N.__id===C.__id);if(b!==-1)Yo.value.splice(b,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return se.value=!1,Yo.value}return{data:Cn,columns:$p,item:ft,loading:qu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,orgs:Yo,linkDivision:p,unlinkDivision:w}};function LU(){const r=_i("https://api.jplan.com.br/management/user"),{error:e}=Vn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ti=LU();let Gu=!1,ju=u.ref(!1);const wn=u.ref([]),Kp=u.ref([]),_n=u.ref(null),UU=u.ref(null),BU=u.ref([]),FU=()=>{const r=Vn(),e=async p=>{ju.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await ti.getManageUserList(w);C&&(wn.value=C,Gu=!0),ju.value=!1},t=async p=>(wn.value.length||await e(p),wn.value);function n(p){if(!wn.value)throw new Error("Data not stored yet");const w=Ti(wn.value,p,["name","description"]);return p!==""?w:wn.value}return{data:wn,loading:ju,columns:Kp,item:_n,filterData:n,__init__:e,getData:t,setColumns:p=>{Kp.value=p},setItem:p=>{_n.value=wi.cloneDeep(p)},getItem:async p=>await ti.getManageUser(p),createItem:async()=>{if(_n.value!=null){const p=crypto.randomUUID(),w=await ti.createManageUser({..._n.value,__id:p});return w!=null&&w.data.created_at&&(r.success("User created."),Gu&&wn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(se.value=!0,_n.value&&_n.value.created_at){const p=await ti.updateManageUser(_n.value);if(Gu&&(p!=null&&p.data)){const w=wn.value.findIndex(C=>C.__id===(p==null?void 0:p.data.__id));if(w!==-1)wn.value[w]=p==null?void 0:p.data,r.success("User created.");else throw new Error("Unable to find item after update")}return se.value=!1,p==null?void 0:p.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ti.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const p=wn.value.findIndex(w=>{var C;return w.__id===((C=_n.value)==null?void 0:C.__id)});if(p!==-1)return wn.value.splice(p,1),_n.value}},userOrg:UU,userTeams:BU}},HU=r=>{r.use(AU),r.use(QR,IU),r.component("GlobalSpinner",RU),Object.entries(SU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Ck).forEach(([e,t])=>{r.provide(e,t)})},VU={install:HU};exports.AvatarPicture=jv;exports.ColumnSettingsDialog=Wv;exports.ConfirmDialog=qv;exports.ContextMenu=Yv;exports.CopyButton=yc;exports.DeleteButton=kv;exports.DotsMenu=Ov;exports.EditButton=Rv;exports.FormHeadless=oy;exports.FormMetadata=rc;exports.GlobalScopeFilter=Sw;exports.HttpCore=OD;exports.JAvatar=Gv;exports.JBtn=jp;exports.JDialog=ma;exports.JForm=ny;exports.JIconBtn=Gp;exports.JSelect=Qv;exports.JTextArea=Xv;exports.JTextField=rc;exports.ParentCard=Ec;exports.SpinnerLoader=Aw;exports.TabFormHeader=ry;exports.UiTable=Nv;exports.branchInstance=Vr;exports.coreClient=Sh;exports.dateFormat=wU;exports.default=VU;exports.divisionInstance=ei;exports.filterQuery=Ti;exports.manageUserInstance=ti;exports.orgInstance=Hr;exports.scopedClient=_i;exports.setupAuthGuard=PU;exports.spinner=se;exports.teamInstance=Xt;exports.useBranchStore=MU;exports.useCustomizer=eR;exports.useDialog=Cc;exports.useDivisionStore=xU;exports.useGlobalScope=tR;exports.useManageUserStore=FU;exports.useOrganizationStore=Tw;exports.useSession=Ah;exports.useTeamStore=Ew;exports.useToast=Vn;
87
+ }`;var he=nm(function(){return Ee(y,J+"return "+L).apply(t,_)});if(he.source=L,ru(he))throw he;return he}function _b(o){return Ae(o).toLowerCase()}function Tb(o){return Ae(o).toUpperCase()}function Eb(o,a,l){if(o=Ae(o),o&&(l||a===t))return df(o);if(!o||!(a=zt(a)))return o;var h=kn(o),m=kn(a),y=hf(h,m),_=ff(h,m)+1;return Mr(h,y,_).join("")}function Sb(o,a,l){if(o=Ae(o),o&&(l||a===t))return o.slice(0,mf(o)+1);if(!o||!(a=zt(a)))return o;var h=kn(o),m=ff(h,kn(a))+1;return Mr(h,0,m).join("")}function Ab(o,a,l){if(o=Ae(o),o&&(l||a===t))return o.replace(rl,"");if(!o||!(a=zt(a)))return o;var h=kn(o),m=hf(h,kn(a));return Mr(h,m).join("")}function Ib(o,a){var l=Y,h=G;if(He(a)){var m="separator"in a?a.separator:m;l="length"in a?de(a.length):l,h="omission"in a?zt(a.omission):h}o=Ae(o);var y=o.length;if(Ao(o)){var _=kn(o);y=_.length}if(l>=y)return o;var E=l-Io(h);if(E<1)return h;var I=_?Mr(_,0,E).join(""):o.slice(0,E);if(m===t)return I+h;if(_&&(E+=I.length-E),ou(m)){if(o.slice(E).search(m)){var D,x=I;for(m.global||(m=wl(m.source,Ae(Ph.exec(m))+"g")),m.lastIndex=0;D=m.exec(x);)var L=D.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(zt(m),E)!=E){var $=I.lastIndexOf(m);$>-1&&(I=I.slice(0,$))}return I+h}function bb(o){return o=Ae(o),o&&Bw.test(o)?o.replace(Rh,nT):o}var kb=Mo(function(o,a,l){return o+(l?" ":"")+a.toUpperCase()}),su=rg("toUpperCase");function tm(o,a,l){return o=Ae(o),a=l?t:a,a===t?Q_(o)?iT(o):$_(o):o.match(a)||[]}var nm=fe(function(o,a){try{return $t(o,t,a)}catch(l){return ru(l)?l:new ae(l)}}),Rb=ur(function(o,a){return ln(a,function(l){l=qn(l),cr(o,l,tu(o[l],o))}),o});function Ob(o){var a=o==null?0:o.length,l=Z();return o=a?Ue(o,function(h){if(typeof h[1]!="function")throw new un(c);return[l(h[0]),h[1]]}):[],fe(function(h){for(var m=-1;++m<a;){var y=o[m];if($t(y[0],this,h))return $t(y[1],this,h)}})}function Nb(o){return nE(hn(o,w))}function cu(o){return function(){return o}}function Pb(o,a){return o==null||o!==o?a:o}var Mb=ig(),Db=ig(!0);function xt(o){return o}function lu(o){return xf(typeof o=="function"?o:hn(o,w))}function xb(o){return Uf(hn(o,w))}function Lb(o,a){return Bf(o,hn(a,w))}var Ub=fe(function(o,a){return function(l){return Fi(l,o,a)}}),Bb=fe(function(o,a){return function(l){return Fi(o,l,a)}});function uu(o,a,l){var h=at(a),m=Qa(a,h);l==null&&!(He(a)&&(m.length||!h.length))&&(l=a,a=o,o=this,m=Qa(a,at(a)));var y=!(He(l)&&"chain"in l)||!!l.chain,_=hr(o);return ln(m,function(E){var I=a[E];o[E]=I,_&&(o.prototype[E]=function(){var D=this.__chain__;if(y||D){var x=o(this.__wrapped__),L=x.__actions__=Pt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),x.__chain__=D,x}return I.apply(o,br([this.value()],arguments))})}),o}function Fb(){return ut._===this&&(ut._=dT),this}function du(){}function Hb(o){return o=de(o),fe(function(a){return Ff(a,o)})}var Vb=$l(Ue),$b=$l(af),Kb=$l(fl);function rm(o){return Yl(o)?gl(qn(o)):CE(o)}function zb(o){return function(a){return o==null?t:Zr(o,a)}}var Wb=sg(),qb=sg(!0);function hu(){return[]}function fu(){return!1}function Gb(){return{}}function jb(){return""}function Yb(){return!0}function Jb(o,a){if(o=de(o),o<1||o>Je)return[];var l=Vt,h=Ct(o,Vt);a=Z(a),o-=Vt;for(var m=vl(h,a);++l<o;)a(l);return m}function Qb(o){return ce(o)?Ue(o,qn):Wt(o)?[o]:Pt(Eg(Ae(o)))}function Xb(o){var a=++lT;return Ae(o)+a}var Zb=rs(function(o,a){return o+a},0),ek=Kl("ceil"),tk=rs(function(o,a){return o/a},1),nk=Kl("floor");function rk(o){return o&&o.length?Ja(o,xt,kl):t}function ok(o,a){return o&&o.length?Ja(o,Z(a,2),kl):t}function ik(o){return lf(o,xt)}function ak(o,a){return lf(o,Z(a,2))}function sk(o){return o&&o.length?Ja(o,xt,Pl):t}function ck(o,a){return o&&o.length?Ja(o,Z(a,2),Pl):t}var lk=rs(function(o,a){return o*a},1),uk=Kl("round"),dk=rs(function(o,a){return o-a},0);function hk(o){return o&&o.length?pl(o,xt):0}function fk(o,a){return o&&o.length?pl(o,Z(a,2)):0}return v.after=xA,v.ary=Dg,v.assign=TI,v.assignIn=jg,v.assignInWith=ps,v.assignWith=EI,v.at=SI,v.before=xg,v.bind=tu,v.bindAll=Rb,v.bindKey=Lg,v.castArray=GA,v.chain=Ng,v.chunk=nS,v.compact=rS,v.concat=oS,v.cond=Ob,v.conforms=Nb,v.constant=cu,v.countBy=hA,v.create=AI,v.curry=Ug,v.curryRight=Bg,v.debounce=Fg,v.defaults=II,v.defaultsDeep=bI,v.defer=LA,v.delay=UA,v.difference=iS,v.differenceBy=aS,v.differenceWith=sS,v.drop=cS,v.dropRight=lS,v.dropRightWhile=uS,v.dropWhile=dS,v.fill=hS,v.filter=gA,v.flatMap=vA,v.flatMapDeep=yA,v.flatMapDepth=CA,v.flatten=bg,v.flattenDeep=fS,v.flattenDepth=gS,v.flip=BA,v.flow=Mb,v.flowRight=Db,v.fromPairs=mS,v.functions=DI,v.functionsIn=xI,v.groupBy=wA,v.initial=vS,v.intersection=yS,v.intersectionBy=CS,v.intersectionWith=wS,v.invert=UI,v.invertBy=BI,v.invokeMap=TA,v.iteratee=lu,v.keyBy=EA,v.keys=at,v.keysIn=Dt,v.map=us,v.mapKeys=HI,v.mapValues=VI,v.matches=xb,v.matchesProperty=Lb,v.memoize=hs,v.merge=$I,v.mergeWith=Yg,v.method=Ub,v.methodOf=Bb,v.mixin=uu,v.negate=fs,v.nthArg=Hb,v.omit=KI,v.omitBy=zI,v.once=FA,v.orderBy=SA,v.over=Vb,v.overArgs=HA,v.overEvery=$b,v.overSome=Kb,v.partial=nu,v.partialRight=Hg,v.partition=AA,v.pick=WI,v.pickBy=Jg,v.property=rm,v.propertyOf=zb,v.pull=SS,v.pullAll=Rg,v.pullAllBy=AS,v.pullAllWith=IS,v.pullAt=bS,v.range=Wb,v.rangeRight=qb,v.rearg=VA,v.reject=kA,v.remove=kS,v.rest=$A,v.reverse=Zl,v.sampleSize=OA,v.set=GI,v.setWith=jI,v.shuffle=NA,v.slice=RS,v.sortBy=DA,v.sortedUniq=LS,v.sortedUniqBy=US,v.split=vb,v.spread=KA,v.tail=BS,v.take=FS,v.takeRight=HS,v.takeRightWhile=VS,v.takeWhile=$S,v.tap=rA,v.throttle=zA,v.thru=ls,v.toArray=Wg,v.toPairs=Qg,v.toPairsIn=Xg,v.toPath=Qb,v.toPlainObject=Gg,v.transform=YI,v.unary=WA,v.union=KS,v.unionBy=zS,v.unionWith=WS,v.uniq=qS,v.uniqBy=GS,v.uniqWith=jS,v.unset=JI,v.unzip=eu,v.unzipWith=Og,v.update=QI,v.updateWith=XI,v.values=Lo,v.valuesIn=ZI,v.without=YS,v.words=tm,v.wrap=qA,v.xor=JS,v.xorBy=QS,v.xorWith=XS,v.zip=ZS,v.zipObject=eA,v.zipObjectDeep=tA,v.zipWith=nA,v.entries=Qg,v.entriesIn=Xg,v.extend=jg,v.extendWith=ps,uu(v,v),v.add=Zb,v.attempt=nm,v.camelCase=rb,v.capitalize=Zg,v.ceil=ek,v.clamp=eb,v.clone=jA,v.cloneDeep=JA,v.cloneDeepWith=QA,v.cloneWith=YA,v.conformsTo=XA,v.deburr=em,v.defaultTo=Pb,v.divide=tk,v.endsWith=ob,v.eq=On,v.escape=ib,v.escapeRegExp=ab,v.every=fA,v.find=mA,v.findIndex=Ag,v.findKey=kI,v.findLast=pA,v.findLastIndex=Ig,v.findLastKey=RI,v.floor=nk,v.forEach=Pg,v.forEachRight=Mg,v.forIn=OI,v.forInRight=NI,v.forOwn=PI,v.forOwnRight=MI,v.get=iu,v.gt=ZA,v.gte=eI,v.has=LI,v.hasIn=au,v.head=kg,v.identity=xt,v.includes=_A,v.indexOf=pS,v.inRange=tb,v.invoke=FI,v.isArguments=no,v.isArray=ce,v.isArrayBuffer=tI,v.isArrayLike=Mt,v.isArrayLikeObject=Ge,v.isBoolean=nI,v.isBuffer=Dr,v.isDate=rI,v.isElement=oI,v.isEmpty=iI,v.isEqual=aI,v.isEqualWith=sI,v.isError=ru,v.isFinite=cI,v.isFunction=hr,v.isInteger=Vg,v.isLength=gs,v.isMap=$g,v.isMatch=lI,v.isMatchWith=uI,v.isNaN=dI,v.isNative=hI,v.isNil=gI,v.isNull=fI,v.isNumber=Kg,v.isObject=He,v.isObjectLike=$e,v.isPlainObject=Wi,v.isRegExp=ou,v.isSafeInteger=mI,v.isSet=zg,v.isString=ms,v.isSymbol=Wt,v.isTypedArray=xo,v.isUndefined=pI,v.isWeakMap=vI,v.isWeakSet=yI,v.join=_S,v.kebabCase=sb,v.last=gn,v.lastIndexOf=TS,v.lowerCase=cb,v.lowerFirst=lb,v.lt=CI,v.lte=wI,v.max=rk,v.maxBy=ok,v.mean=ik,v.meanBy=ak,v.min=sk,v.minBy=ck,v.stubArray=hu,v.stubFalse=fu,v.stubObject=Gb,v.stubString=jb,v.stubTrue=Yb,v.multiply=lk,v.nth=ES,v.noConflict=Fb,v.noop=du,v.now=ds,v.pad=ub,v.padEnd=db,v.padStart=hb,v.parseInt=fb,v.random=nb,v.reduce=IA,v.reduceRight=bA,v.repeat=gb,v.replace=mb,v.result=qI,v.round=uk,v.runInContext=A,v.sample=RA,v.size=PA,v.snakeCase=pb,v.some=MA,v.sortedIndex=OS,v.sortedIndexBy=NS,v.sortedIndexOf=PS,v.sortedLastIndex=MS,v.sortedLastIndexBy=DS,v.sortedLastIndexOf=xS,v.startCase=yb,v.startsWith=Cb,v.subtract=dk,v.sum=hk,v.sumBy=fk,v.template=wb,v.times=Jb,v.toFinite=fr,v.toInteger=de,v.toLength=qg,v.toLower=_b,v.toNumber=mn,v.toSafeInteger=_I,v.toString=Ae,v.toUpper=Tb,v.trim=Eb,v.trimEnd=Sb,v.trimStart=Ab,v.truncate=Ib,v.unescape=bb,v.uniqueId=Xb,v.upperCase=kb,v.upperFirst=su,v.each=Pg,v.eachRight=Mg,v.first=kg,uu(v,function(){var o={};return zn(v,function(a,l){Ie.call(v.prototype,l)||(o[l]=a)}),o}(),{chain:!1}),v.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){v[o].placeholder=v}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(l){l=l===t?1:nt(de(l),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=Ct(l,h.__takeCount__):h.__views__.push({size:Ct(l,Vt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(l){return this.reverse()[o](l).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var l=a+1,h=l==vt||l==sn;pe.prototype[o]=function(m){var y=this.clone();return y.__iteratees__.push({iteratee:Z(m,3),type:l}),y.__filtered__=y.__filtered__||h,y}}),ln(["head","last"],function(o,a){var l="take"+(a?"Right":"");pe.prototype[o]=function(){return this[l](1).value()[0]}}),ln(["initial","tail"],function(o,a){var l="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[l](1)}}),pe.prototype.compact=function(){return this.filter(xt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(l){return Fi(l,o,a)})}),pe.prototype.reject=function(o){return this.filter(fs(Z(o)))},pe.prototype.slice=function(o,a){o=de(o);var l=this;return l.__filtered__&&(o>0||a<0)?new pe(l):(o<0?l=l.takeRight(-o):o&&(l=l.drop(o)),a!==t&&(a=de(a),l=a<0?l.dropRight(-a):l.take(a-o)),l)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Vt)},zn(pe.prototype,function(o,a){var l=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),m=v[h?"take"+(a=="last"?"Right":""):a],y=h||/^find/.test(a);m&&(v.prototype[a]=function(){var _=this.__wrapped__,E=h?[1]:arguments,I=_ instanceof pe,D=E[0],x=I||ce(_),L=function(me){var ve=m.apply(v,br([me],E));return h&&$?ve[0]:ve};x&&l&&typeof D=="function"&&D.length!=1&&(I=x=!1);var $=this.__chain__,J=!!this.__actions__.length,ee=y&&!$,he=I&&!J;if(!y&&x){_=he?_:new pe(this);var te=o.apply(_,E);return te.__actions__.push({func:ls,args:[L],thisArg:t}),new dn(te,$)}return ee&&he?o.apply(this,E):(te=this.thru(L),ee?h?te.value()[0]:te.value():te)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=xa[o],l=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);v.prototype[o]=function(){var m=arguments;if(h&&!this.__chain__){var y=this.value();return a.apply(ce(y)?y:[],m)}return this[l](function(_){return a.apply(ce(_)?_:[],m)})}}),zn(pe.prototype,function(o,a){var l=v[a];if(l){var h=l.name+"";Ie.call(Oo,h)||(Oo[h]=[]),Oo[h].push({name:a,func:l})}}),Oo[ns(t,K).name]=[{name:"wrapper",func:t}],pe.prototype.clone=bT,pe.prototype.reverse=kT,pe.prototype.value=RT,v.prototype.at=oA,v.prototype.chain=iA,v.prototype.commit=aA,v.prototype.next=sA,v.prototype.plant=lA,v.prototype.reverse=uA,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=dA,v.prototype.first=v.prototype.head,Pi&&(v.prototype[Pi]=cA),v},bo=aT();jr?((jr.exports=bo)._=bo,ll._=bo):ut._=bo}).call(AD)}(Xi,Xi.exports)),Xi.exports}var wi=ID();const js=SD(wi);function _i(r){const e=Sh();e.defaults.baseURL=r;const t=u.ref({scope_type:"org"});async function n(i){t.value=i}return u.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function bD(){const r=_i("https://api.jplan.com.br/management/organization"),{error:e}=Vn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Hr=bD();function kD(){const r=_i("https://api.jplan.com.br/management/branch/"),{error:e}=Vn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Vr=kD();function RD(){const r=_i("https://api.jplan.com.br/management/team"),{error:e}=Vn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",c=await r.get(`/item/${t}/user/item/${n}/${s}`);if(c.data.error)throw e("Failed to fetch User"),new Error(c.data.error);return c.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const Xt=RD();async function OD({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ve({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(c){throw console.error(`Request failed for ${e} ${r}:`,c),c}}function Ti(r,e,t=[]){const n=PD(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>ND(s,i,t))}function ND(r,e,t){return t.some(n=>{const i=js.get(r,n);if(js.isNil(i))return!1;const s=js.toString(i).toLowerCase();return e.every(c=>s.includes(c))})}function PD(r){return js.trim(r).toLowerCase().replace(/\s+/g," ")}const Cw=6048e5,MD=864e5,Op=Symbol.for("constructDateFrom");function Gr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Op in r?r[Op](e):r instanceof Date?new r.constructor(e):new Date(e)}function Kn(r,e){return Gr(e||r,r)}let DD={};function zc(){return DD}function ga(r,e){var d,f,g,p;const t=zc(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((p=(g=t.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??0,i=Kn(r,e==null?void 0:e.in),s=i.getDay(),c=(s<n?7:0)+s-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function vc(r,e){return ga(r,{...e,weekStartsOn:1})}function ww(r,e){const t=Kn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Gr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=vc(i),c=Gr(t,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const d=vc(c);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Np(r){const e=Kn(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function xD(r,...e){const t=Gr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Pp(r,e){const t=Kn(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function LD(r,e,t){const[n,i]=xD(t==null?void 0:t.in,r,e),s=Pp(n),c=Pp(i),d=+s-Np(s),f=+c-Np(c);return Math.round((d-f)/MD)}function UD(r,e){const t=ww(r,e),n=Gr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vc(n)}function BD(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function FD(r){return!(!BD(r)&&typeof r!="number"||isNaN(+Kn(r)))}function HD(r,e){const t=Kn(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const VD={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"}},$D=(r,e,t)=>{let n;const i=VD[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Sn(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const KD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qD={date:Sn({formats:KD,defaultWidth:"full"}),time:Sn({formats:zD,defaultWidth:"full"}),dateTime:Sn({formats:WD,defaultWidth:"full"})},GD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jD=(r,e,t,n)=>GD[r];function Xe(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const c=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):c;i=r.formattingValues[d]||r.formattingValues[c]}else{const c=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[c]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const YD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},JD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QD={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"]},XD={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"]},ZD={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"}},ex={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"}},tx=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},nx={ordinalNumber:tx,era:Xe({values:YD,defaultWidth:"wide"}),quarter:Xe({values:JD,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:QD,defaultWidth:"wide"}),day:Xe({values:XD,defaultWidth:"wide"}),dayPeriod:Xe({values:ZD,defaultWidth:"wide",formattingValues:ex,defaultFormattingWidth:"wide"})};function Ze(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const c=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?ox(d,w=>w.test(c)):rx(d,w=>w.test(c));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const p=e.slice(c.length);return{value:g,rest:p}}}function rx(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function ox(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function Wc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let c=r.valueCallback?r.valueCallback(s[0]):s[0];c=t.valueCallback?t.valueCallback(c):c;const d=e.slice(i.length);return{value:c,rest:d}}}const ix=/^(\d+)(th|st|nd|rd)?/i,ax=/\d+/i,sx={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},cx={any:[/^b/i,/^(a|c)/i]},lx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ux={any:[/1/i,/2/i,/3/i,/4/i]},dx={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},hx={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]},fx={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},gx={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]},mx={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},px={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}},vx={ordinalNumber:Wc({matchPattern:ix,parsePattern:ax,valueCallback:r=>parseInt(r,10)}),era:Ze({matchPatterns:sx,defaultMatchWidth:"wide",parsePatterns:cx,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:lx,defaultMatchWidth:"wide",parsePatterns:ux,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:dx,defaultMatchWidth:"wide",parsePatterns:hx,defaultParseWidth:"any"}),day:Ze({matchPatterns:fx,defaultMatchWidth:"wide",parsePatterns:gx,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:mx,defaultMatchWidth:"any",parsePatterns:px,defaultParseWidth:"any"})},Ih={code:"en-US",formatDistance:$D,formatLong:qD,formatRelative:jD,localize:nx,match:vx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yx(r,e){const t=Kn(r,e==null?void 0:e.in);return LD(t,HD(t))+1}function Cx(r,e){const t=Kn(r,e==null?void 0:e.in),n=+vc(t)-+UD(t);return Math.round(n/Cw)+1}function _w(r,e){var p,w,C,S;const t=Kn(r,e==null?void 0:e.in),n=t.getFullYear(),i=zc(),s=(e==null?void 0:e.firstWeekContainsDate)??((w=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,c=Gr((e==null?void 0:e.in)||r,0);c.setFullYear(n+1,0,s),c.setHours(0,0,0,0);const d=ga(c,e),f=Gr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=ga(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function wx(r,e){var d,f,g,p;const t=zc(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(g=t.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,i=_w(r,e),s=Gr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),ga(s,e)}function _x(r,e){const t=Kn(r,e==null?void 0:e.in),n=+ga(t,e)-+wx(t,e);return Math.round(n/Cw)+1}function ke(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Lr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return ke(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):ke(t+1,2)},d(r,e){return ke(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return ke(r.getHours()%12||12,e.length)},H(r,e){return ke(r.getHours(),e.length)},m(r,e){return ke(r.getMinutes(),e.length)},s(r,e){return ke(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return ke(i,e.length)}},zo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mp={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Lr.y(r,e)},Y:function(r,e,t,n){const i=_w(r,n),s=i>0?i:1-i;if(e==="YY"){const c=s%100;return ke(c,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):ke(s,e.length)},R:function(r,e){const t=ww(r);return ke(t,e.length)},u:function(r,e){const t=r.getFullYear();return ke(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return ke(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return ke(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Lr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return ke(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=_x(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):ke(i,e.length)},I:function(r,e,t){const n=Cx(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):ke(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Lr.d(r,e)},D:function(r,e,t){const n=yx(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):ke(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return ke(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return ke(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return ke(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=zo.noon:n===0?i=zo.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=zo.evening:n>=12?i=zo.afternoon:n>=4?i=zo.morning:i=zo.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Lr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Lr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):ke(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):ke(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Lr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Lr.s(r,e)},S:function(r,e){return Lr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return xp(n);case"XXXX":case"XX":return so(n);case"XXXXX":case"XXX":default:return so(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return xp(n);case"xxxx":case"xx":return so(n);case"xxxxx":case"xxx":default:return so(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Dp(n,":");case"OOOO":default:return"GMT"+so(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Dp(n,":");case"zzzz":default:return"GMT"+so(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return ke(n,e.length)},T:function(r,e,t){return ke(+r,e.length)}};function Dp(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+ke(s,2)}function xp(r,e){return r%60===0?(r>0?"-":"+")+ke(Math.abs(r)/60,2):so(r,e)}function so(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=ke(Math.trunc(n/60),2),s=ke(n%60,2);return t+i+e+s}const Lp=(r,e)=>{switch(r){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"})}},Tw=(r,e)=>{switch(r){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"})}},Tx=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Lp(r,e);let s;switch(n){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}}",Lp(n,e)).replace("{{time}}",Tw(i,e))},Ex={p:Tw,P:Tx},Sx=/^D+$/,Ax=/^Y+$/,Ix=["D","DD","YY","YYYY"];function bx(r){return Sx.test(r)}function kx(r){return Ax.test(r)}function Rx(r,e,t){const n=Ox(r,e,t);if(console.warn(n),Ix.includes(r))throw new RangeError(n)}function Ox(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Nx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Px=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mx=/^'([^]*?)'?$/,Dx=/''/g,xx=/[a-zA-Z]/;function Lx(r,e,t){var p,w,C,S,T,b,N,K;const n=zc(),i=(t==null?void 0:t.locale)??n.locale??Ih,s=(t==null?void 0:t.firstWeekContainsDate)??((w=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,c=(t==null?void 0:t.weekStartsOn)??((b=(T=t==null?void 0:t.locale)==null?void 0:T.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??((K=(N=n.locale)==null?void 0:N.options)==null?void 0:K.weekStartsOn)??0,d=Kn(r,t==null?void 0:t.in);if(!FD(d))throw new RangeError("Invalid time value");let f=e.match(Px).map(H=>{const V=H[0];if(V==="p"||V==="P"){const z=Ex[V];return z(H,i.formatLong)}return H}).join("").match(Nx).map(H=>{if(H==="''")return{isToken:!1,value:"'"};const V=H[0];if(V==="'")return{isToken:!1,value:Ux(H)};if(Mp[V])return{isToken:!0,value:H};if(V.match(xx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");return{isToken:!1,value:H}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:c,locale:i};return f.map(H=>{if(!H.isToken)return H.value;const V=H.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&kx(V)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&bx(V))&&Rx(V,e,String(r));const z=Mp[V[0]];return z(d,V,i.localize,g)}).join("")}function Ux(r){const e=r.match(Mx);return e?e[1].replace(Dx,"'"):r}const Up={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},Bx=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Up[r].withPreposition:Up[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},Fx={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},Hx={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Vx={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},$x={date:Sn({formats:Fx,defaultWidth:"full"}),time:Sn({formats:Hx,defaultWidth:"full"}),dateTime:Sn({formats:Vx,defaultWidth:"full"})},Kx={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},zx=(r,e,t,n)=>Kx[r],Wx={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},qx={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},bd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},Gx={narrow:bd.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:bd.wide},jx={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Yx={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Jx={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Qx=r=>Number(r)+".",Xx={ordinalNumber:Qx,era:Xe({values:Wx,defaultWidth:"wide"}),quarter:Xe({values:qx,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:bd,formattingValues:Gx,defaultWidth:"wide"}),day:Xe({values:jx,defaultWidth:"wide"}),dayPeriod:Xe({values:Yx,defaultWidth:"wide",formattingValues:Jx,defaultFormattingWidth:"wide"})},Zx=/^(\d+)(\.)?/i,eL=/\d+/i,tL={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},nL={any:[/^v/i,/^n/i]},rL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},oL={any:[/1/i,/2/i,/3/i,/4/i]},iL={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},aL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sL={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},cL={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},lL={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},uL={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},dL={ordinalNumber:Wc({matchPattern:Zx,parsePattern:eL,valueCallback:r=>parseInt(r)}),era:Ze({matchPatterns:tL,defaultMatchWidth:"wide",parsePatterns:nL,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:rL,defaultMatchWidth:"wide",parsePatterns:oL,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:iL,defaultMatchWidth:"wide",parsePatterns:aL,defaultParseWidth:"any"}),day:Ze({matchPatterns:sL,defaultMatchWidth:"wide",parsePatterns:cL,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:lL,defaultMatchWidth:"wide",parsePatterns:uL,defaultParseWidth:"any"})},hL={code:"de",formatDistance:Bx,formatLong:$x,formatRelative:zx,localize:Xx,match:dL,options:{weekStartsOn:1,firstWeekContainsDate:4}},fL={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},gL=(r,e,t)=>{let n;const i=fL[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},mL={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},pL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},vL={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yL={date:Sn({formats:mL,defaultWidth:"full"}),time:Sn({formats:pL,defaultWidth:"full"}),dateTime:Sn({formats:vL,defaultWidth:"full"})},CL={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},wL=(r,e,t,n)=>CL[r],_L={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},TL={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},EL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},SL={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},AL={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},IL=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},bL=["MMM","MMMM"],kL={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&bL.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:IL,era:Xe({values:_L,defaultWidth:"wide"}),quarter:Xe({values:TL,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:EL,defaultWidth:"wide"}),day:Xe({values:SL,defaultWidth:"wide"}),dayPeriod:Xe({values:AL,defaultWidth:"wide"})},RL=/^(\d+)(ième|ère|ème|er|e)?/i,OL=/\d+/i,NL={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},PL={any:[/^av/i,/^ap/i]},ML={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},DL={any:[/1/i,/2/i,/3/i,/4/i]},xL={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},LL={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,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},UL={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},BL={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},FL={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},HL={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},VL={ordinalNumber:Wc({matchPattern:RL,parsePattern:OL,valueCallback:r=>parseInt(r)}),era:Ze({matchPatterns:NL,defaultMatchWidth:"wide",parsePatterns:PL,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:ML,defaultMatchWidth:"wide",parsePatterns:DL,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:xL,defaultMatchWidth:"wide",parsePatterns:LL,defaultParseWidth:"any"}),day:Ze({matchPatterns:UL,defaultMatchWidth:"wide",parsePatterns:BL,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:FL,defaultMatchWidth:"any",parsePatterns:HL,defaultParseWidth:"any"})},$L={code:"fr",formatDistance:gL,formatLong:yL,formatRelative:wL,localize:kL,match:VL,options:{weekStartsOn:1,firstWeekContainsDate:4}},KL={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},zL=(r,e,t)=>{let n;const i=KL[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},WL={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},qL={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},GL={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jL={date:Sn({formats:WL,defaultWidth:"full"}),time:Sn({formats:qL,defaultWidth:"full"}),dateTime:Sn({formats:GL,defaultWidth:"full"})},YL={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},JL=(r,e,t,n)=>{const i=YL[r];return typeof i=="function"?i(e):i},QL={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},XL={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ZL={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},eU={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},tU={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},nU={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},rU=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},oU={ordinalNumber:rU,era:Xe({values:QL,defaultWidth:"wide"}),quarter:Xe({values:XL,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Xe({values:ZL,defaultWidth:"wide"}),day:Xe({values:eU,defaultWidth:"wide"}),dayPeriod:Xe({values:tU,defaultWidth:"wide",formattingValues:nU,defaultFormattingWidth:"wide"})},iU=/^(\d+)[ºªo]?/i,aU=/\d+/i,sU={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},cU={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},lU={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},uU={any:[/1/i,/2/i,/3/i,/4/i]},dU={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},hU={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,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},fU={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},gU={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},mU={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},pU={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},vU={ordinalNumber:Wc({matchPattern:iU,parsePattern:aU,valueCallback:r=>parseInt(r,10)}),era:Ze({matchPatterns:sU,defaultMatchWidth:"wide",parsePatterns:cU,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:lU,defaultMatchWidth:"wide",parsePatterns:uU,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Ze({matchPatterns:dU,defaultMatchWidth:"wide",parsePatterns:hU,defaultParseWidth:"any"}),day:Ze({matchPatterns:fU,defaultMatchWidth:"wide",parsePatterns:gU,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:mU,defaultMatchWidth:"any",parsePatterns:pU,defaultParseWidth:"any"})},yU={code:"pt-BR",formatDistance:zL,formatLong:jL,formatRelative:JL,localize:oU,match:vU,options:{weekStartsOn:0,firstWeekContainsDate:1}},CU={"en-US":Ih,"pt-BR":yU,"fr-FR":$L,"de-DE":hL};function wU(r){if(!r)return"";const e=navigator.language,t=CU[e]||Ih;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":Lx(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}let Ns=!1;const Vu=u.ref(!1),pn=u.ref([]),Bp=u.ref([]),Ke=u.ref(null),Wo=u.ref([]),qo=u.ref([]),Ew=()=>{const r=Vn(),e=async T=>{Vu.value=!0;const b=T?`_active eq true and ${T}`:"_active eq true",N=await Hr.getOrgList(b);N&&(pn.value=N,Ns=!0),Vu.value=!1},t=async T=>{var b;return(b=pn.value)!=null&&b.length||await e(T),pn.value};function n(T){if(!pn.value)throw new Error("Data not stored yet");const b=Ti(pn.value,T,["name","description"]);return T!==""?b:pn.value}const i=T=>{Bp.value=T},s=T=>{Ke.value=wi.cloneDeep(T)},c=async T=>await Hr.getOrg(T),d=async()=>{if(Ke.value!=null){const T=await Hr.createOrg(Ke.value);return T!=null&&T.data.created_at&&(r.success("Organization created."),Ns&&pn.value.push(T.data)),T==null?void 0:T.data}},f=async()=>{if(se.value=!0,Ke.value&&Ke.value.__id){const T=await Hr.updateOrg(Ke.value);if(Ns&&(T!=null&&T.data.__id)){const b=pn.value.findIndex(N=>N.__id===T.data.__id);return b!==-1?(pn.value[b]=T.data,r.success("Organization updated.")):r.error("Unable to update item"),se.value=!1,T.data}}else se.value=!1,r.error("Unable to update item")},g=async()=>{if(se.value=!0,Ke.value&&Ke.value.created_at){if(await Hr.deactivateOrg(Ke.value.__id),Ns){const T=pn.value.findIndex(b=>{var N;return b.__id===((N=Ke.value)==null?void 0:N.__id)});if(T!==-1)return pn.value.splice(T,1),Ke.value;r.error("Unable to deactivate organization")}se.value=!1}};async function p(T){se.value=!0;try{if(Ke.value&&Ke.value.__id){const b={...T,organization:Ke.value.__id};if(!await Vr.updateBranch(b)){se.value=!1;return}if(Wo.value.findIndex(H=>H.__id===T.__id)===-1)return r.success("Branch added successfully."),Wo.value.push(b),b;r.info("Branch already added.")}}catch(b){console.error(b)}finally{se.value=!1}}async function w(T){if(se.value=!0,Ke.value&&Ke.value.__id){const b={...T,organization:null};if(!await Vr.updateBranch(b)){se.value=!1;return}const K=Wo.value.findIndex(H=>H.__id===T.__id);if(K!==-1)return Wo.value.splice(K,1),se.value=!1,Wo.value;throw new Error("Item not found to remove")}se.value=!1}async function C(T){se.value=!0;try{if(Ke.value&&Ke.value.__id){const b={...T,organization:Ke.value.__id};if(!await Xt.updateTeam(b)){se.value=!1;return}if(qo.value.findIndex(H=>H.__id===T.__id)===-1)return r.success("Team added successfully."),qo.value.push(b),b;r.info("Team already added.")}}catch(b){console.error(b)}finally{se.value=!1}}async function S(T){if(se.value=!0,Ke.value&&Ke.value.__id){const b={...T,organization:null};if(!await Xt.updateTeam(b)){se.value=!1;return}const K=qo.value.findIndex(H=>H.__id===T.__id);if(K!==-1)return qo.value.splice(K,1),se.value=!1,qo.value;throw new Error("Item not found to remove")}se.value=!1}return{data:pn,loading:Vu,columns:Bp,item:Ke,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,orgBranches:Wo,orgTeams:qo,linkBranch:p,unlinkBranch:w,linkTeam:C,unlinkTeam:S}};let Ps=!1;const vn=u.ref([]),Fp=u.ref([]),rt=u.ref(null),$u=u.ref(!1),Go=u.ref([]),Sw=()=>{const r=Vn(),e=async C=>{$u.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Xt.getTeamList(S);T&&(vn.value=T,Ps=!0),$u.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Ti(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{Fp.value=C},s=C=>{rt.value=wi.cloneDeep(C)},c=async C=>await Xt.getTeam(C),d=async()=>{if(rt.value!=null){const C=await Xt.createTeam(rt.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Ps&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(se.value=!0,rt.value&&rt.value.__id){const C=await Xt.updateTeam(rt.value);if(Ps&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(rt.value&&rt.value.created_at&&(await Xt.deactivateTeam(rt.value.__id),Ps)){const C=vn.value.findIndex(S=>{var T;return S.__id===((T=rt.value)==null?void 0:T.__id)});if(C!==-1)return vn.value.splice(C,1),rt.value;r.error("Unable to deactivate organization")}};async function p(C){var S;if(se.value=!0,(S=rt.value)!=null&&S.__id)if(Go.value.findIndex(b=>b.__id===C.__id)===-1)try{const b=await Xt.linkManageUser(rt.value.__id,{team:rt.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),N=await Xt.getTeamUserList(rt.value.__id);return N&&(Go.value=N),r.success("User added successfully."),b}catch(b){console.error(b),r.error("Unable to add User.")}finally{se.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");se.value=!1}async function w(C){if(se.value=!0,rt.value&&rt.value.__id){const S=Go.value.findIndex(T=>T.__id===C);if(S!==-1)return await Xt.unlinkManageUser(rt.value.__id,C),Go.value.splice(S,1),se.value=!1,Go.value;throw new Error("Item not found to remove")}se.value=!1}return{data:vn,loading:$u,columns:Fp,item:rt,usersTeam:Go,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,linkUser:p,unlinkUser:w}},Aw=u.defineComponent({__name:"GlobalScopeFilter",setup(r){var N,K,H;const{openDialog:e}=Cc("global-scope__J-"),{user:t,domain:n,scope:i,session:s,setScope:c}=Ah(),{getData:d,data:f}=Ew(),{getData:g,data:p}=Sw(),w=u.ref(!1);u.onBeforeMount(async()=>{w.value=!0,await d(),await g(),w.value=!1});const C=u.ref({scope_type:(N=i.value)==null?void 0:N.scope_type,organization:((K=i.value)==null?void 0:K.organization)??"org",team:(H=i.value)==null?void 0:H.team});function S(){var V,z,Q;C.value={...i.value,scope_type:(V=i.value)==null?void 0:V.scope_type,organization:((z=i.value)==null?void 0:z.organization)??"",team:(Q=i.value)==null?void 0:Q.team},e()}const T=u.computed(()=>{var V;switch((V=i.value)==null?void 0:V.scope_type){case"user":return TN;case"org":return wN;case"team":return EN;default:return _N}});async function b(){var V;((V=i.value)==null?void 0:V.scope_type)!==""&&c(C.value)}return(V,z)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createVNode(qe.VBtn,{onClick:S,icon:"",class:"text-secondary ms-3",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:u.withCtx(()=>[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(T.value),{size:"20"}))]),_:1}),u.createVNode(u.unref(ma),{loading:w.value,title:"Scope","dialog-id":"global-scope__J-","on-save":b},{default:u.withCtx(()=>[u.createElementVNode("div",null,[u.createVNode(pt.VRow,null,{default:u.withCtx(()=>[u.createVNode(pt.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[3]||(z[3]=[u.createTextVNode(" User")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>{var Q;return[u.createTextVNode(u.toDisplayString(((Q=u.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),u.createVNode(pt.VCol,{cols:"4"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[4]||(z[4]=[u.createTextVNode(" Domain")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(u.unref(n)),1)]),_:1})]),_:1})]),_:1}),u.createVNode(pt.VCol,{cols:"4"},{default:u.withCtx(()=>[u.createVNode(Ut.VListItem,null,{default:u.withCtx(()=>[u.createVNode(Ut.VListItemTitle,null,{default:u.withCtx(()=>z[5]||(z[5]=[u.createTextVNode(" Environment")])),_:1}),u.createVNode(Ut.VListItemSubtitle,null,{default:u.withCtx(()=>[u.createTextVNode(u.toDisplayString(u.unref(s).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),u.createVNode(yk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:C.value.scope_type,"onUpdate:modelValue":z[0]||(z[0]=Q=>C.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:u.withCtx(()=>[u.createVNode(qe.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:u.withCtx(()=>z[6]||(z[6]=[u.createTextVNode("Organizational")])),_:1}),u.createVNode(qe.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:u.withCtx(()=>z[7]||(z[7]=[u.createTextVNode("Team")])),_:1}),u.createVNode(qe.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:u.withCtx(()=>z[8]||(z[8]=[u.createTextVNode("User")])),_:1}),u.createVNode(qe.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:u.withCtx(()=>z[9]||(z[9]=[u.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),u.createElementVNode("div",null,[u.createVNode(ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>z[10]||(z[10]=[u.createTextVNode("Organization")])),_:1}),u.createVNode(im.VSelect,{items:u.unref(f),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:C.value.organization,"onUpdate:modelValue":z[1]||(z[1]=Q=>C.value.organization=Q)},null,8,["items","modelValue"]),u.createVNode(ca.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:u.withCtx(()=>z[11]||(z[11]=[u.createTextVNode("Team")])),_:1}),u.createVNode(im.VSelect,{items:u.unref(p),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:C.value.team,"onUpdate:modelValue":z[2]||(z[2]=Q=>C.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),_U={},TU={class:"double-ring-spinner-container"};function EU(r,e){return u.openBlock(),u.createElementBlock("div",TU,e[0]||(e[0]=[u.createElementVNode("div",{class:"spinner-loading"},[u.createElementVNode("div"),u.createElementVNode("div"),u.createElementVNode("div",null,[u.createElementVNode("div")]),u.createElementVNode("div",null,[u.createElementVNode("div")])],-1)]))}const Iw=Ca(_U,[["render",EU],["__scopeId","data-v-003f238f"]]),SU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:jv,ColumnSettingsDialog:Wv,ConfirmDialog:qv,ContextMenu:Yv,CopyButton:yc,DeleteButton:kv,DotsMenu:Ov,EditButton:Rv,FormHeadless:oy,FormMetadata:rc,GlobalScopeFilter:Aw,JAvatar:Gv,JBtn:jp,JDialog:ma,JForm:ny,JIconBtn:Gp,JSelect:Qv,JTextArea:Xv,JTextField:rc,ParentCard:Ec,SpinnerLoader:Iw,TabFormHeader:ry,UiTable:Nv},Symbol.toStringTag,{value:"Module"})),AU=Jk(),IU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0},bU={key:0,class:"overlay"},kU={__name:"GlobalSpinner",setup(r){return(e,t)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[u.unref(se)?(u.openBlock(),u.createElementBlock("div",bU,t[0]||(t[0]=[u.createElementVNode("div",{class:"double-ring-spinner-container"},[u.createElementVNode("div",{class:"spinner-loading"},[u.createElementVNode("div"),u.createElementVNode("div"),u.createElementVNode("div",null,[u.createElementVNode("div")]),u.createElementVNode("div",null,[u.createElementVNode("div")])])],-1)]))):u.createCommentVNode("",!0)]))}},RU=Ca(kU,[["__scopeId","data-v-b114d14e"]]),{isAuthenticated:Hp,handleRedirect:OU}=jC(),NU=Ah();function PU(r){r.beforeEach(async(e,t,n)=>{function i(c){return c.matched.some(d=>d.meta.requiresAuth)}if(!i(e))return n();try{Hp.value||(await OU(e.fullPath),await NU.__init__())}catch(c){console.error("Error in navigation guard:",c),n("/")}Hp.value&&n()})}let Ku=!1;const zu=u.ref(!1),yn=u.ref([]),Vp=u.ref([]),ht=u.ref(null),jo=u.ref([]),MU=()=>{const r=Vn(),e=async C=>{zu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Vr.getBranchList(S);T&&(yn.value=T,Ku=!0),zu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Ti(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Vp.value=C},s=C=>{ht.value=wi.cloneDeep(C)},c=async C=>await Vr.getBranch(C),d=async()=>{if(ht.value!=null){const C=await Vr.createBranch(ht.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),Ku&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ht.value&&ht.value.__id){const C=await Vr.updateBranch(ht.value);if(Ku&&C){const S=yn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(ht.value&&ht.value.created_at){await Vr.deactivateBranch(ht.value.__id);const C=yn.value.findIndex(S=>{var T;return S.__id===((T=ht.value)==null?void 0:T.__id)});if(C!==-1)return yn.value.splice(C,1),ht.value;r.error("Unable to deactivate Domain")}};async function p(C){se.value=!0;try{if(ht.value&&ht.value.__id){const S={...C,branch:ht.value.__id};if(!await Xt.updateTeam(S)){r.error("Unable to link team");return}if(jo.value.findIndex(N=>N.__id===C.__id)===-1)return r.success("Team added successfully."),jo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{se.value=!1}}async function w(C){if(se.value=!0,ht.value&&ht.value.__id){const S={...C,branch:null};if(!await Xt.updateTeam(S))return;const b=jo.value.findIndex(N=>N.__id===C.__id);if(b!==-1)return jo.value.splice(b,1),se.value=!1,jo.value;throw new Error("Item not found to remove")}se.value=!1}return{data:yn,columns:Vp,item:ht,loading:zu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,branchTeams:jo,linkTeam:p,unlinkTeam:w}};function DU(){const r=_i("https://api.jplan.com.br/management/division"),{error:e}=Vn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ei=DU();let Wu=!1;const qu=u.ref(!1),Cn=u.ref([]),$p=u.ref([]),ft=u.ref(null),Yo=u.ref([]),xU=()=>{const r=Vn(),e=async C=>{qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await ei.getDivisionList(S);T&&(Cn.value=T,Wu=!0),qu.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Ti(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{$p.value=C},s=C=>{ft.value=wi.cloneDeep(C)},c=async C=>await ei.getDivision(C),d=async()=>{if(ft.value!=null){const C=await ei.createDivision(ft.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Wu&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(se.value=!0,ft.value&&ft.value.__id){const C=await ei.updateDivision(ft.value);if(Wu&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),se.value=!1,C}}else se.value=!1,r.error("Unable to update item")},g=async()=>{if(se.value=!0,ft.value&&ft.value.created_at){await ei.deactivateDivision(ft.value.__id);const C=Cn.value.findIndex(S=>{var T;return S.__id===((T=ft.value)==null?void 0:T.__id)});if(C!==-1)return Cn.value.splice(C,1),ft.value;r.error("Unable to deactivate Division")}se.value=!1};async function p(C){se.value=!0;try{if(ft.value&&ft.value.__id){const S={...C,division:ft.value.__id};return await Hr.updateOrg(S)?(Yo.value.findIndex(N=>N.__id===C.__id)===-1?(r.success("Organization added successfully."),Yo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{se.value=!1}}async function w(C){if(se.value=!0,ft.value&&ft.value.__id){const S={...C,division:null};if(!await Hr.updateOrg(S))return;const b=Yo.value.findIndex(N=>N.__id===C.__id);if(b!==-1)Yo.value.splice(b,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return se.value=!1,Yo.value}return{data:Cn,columns:$p,item:ft,loading:qu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:c,createItem:d,updateItem:f,removeItem:g,orgs:Yo,linkDivision:p,unlinkDivision:w}};function LU(){const r=_i("https://api.jplan.com.br/management/user"),{error:e}=Vn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ti=LU();let Gu=!1,ju=u.ref(!1);const wn=u.ref([]),Kp=u.ref([]),_n=u.ref(null),UU=u.ref(null),BU=u.ref([]),FU=()=>{const r=Vn(),e=async p=>{ju.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await ti.getManageUserList(w);C&&(wn.value=C,Gu=!0),ju.value=!1},t=async p=>(wn.value.length||await e(p),wn.value);function n(p){if(!wn.value)throw new Error("Data not stored yet");const w=Ti(wn.value,p,["name","description"]);return p!==""?w:wn.value}return{data:wn,loading:ju,columns:Kp,item:_n,filterData:n,__init__:e,getData:t,setColumns:p=>{Kp.value=p},setItem:p=>{_n.value=wi.cloneDeep(p)},getItem:async p=>await ti.getManageUser(p),createItem:async()=>{if(_n.value!=null){const p=crypto.randomUUID(),w=await ti.createManageUser({..._n.value,__id:p});return w!=null&&w.data.created_at&&(r.success("User created."),Gu&&wn.value.push(w.data)),w==null?void 0:w.data}},updateItem:async()=>{if(se.value=!0,_n.value&&_n.value.created_at){const p=await ti.updateManageUser(_n.value);if(Gu&&(p!=null&&p.data)){const w=wn.value.findIndex(C=>C.__id===(p==null?void 0:p.data.__id));if(w!==-1)wn.value[w]=p==null?void 0:p.data,r.success("User created.");else throw new Error("Unable to find item after update")}return se.value=!1,p==null?void 0:p.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ti.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const p=wn.value.findIndex(w=>{var C;return w.__id===((C=_n.value)==null?void 0:C.__id)});if(p!==-1)return wn.value.splice(p,1),_n.value}},userOrg:UU,userTeams:BU}},HU=r=>{r.use(AU),r.use(XR,IU),r.component("GlobalSpinner",RU),Object.entries(SU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(wk).forEach(([e,t])=>{r.provide(e,t)})},VU={install:HU};exports.AvatarPicture=jv;exports.ColumnSettingsDialog=Wv;exports.ConfirmDialog=qv;exports.ContextMenu=Yv;exports.CopyButton=yc;exports.DeleteButton=kv;exports.DotsMenu=Ov;exports.EditButton=Rv;exports.FormHeadless=oy;exports.FormMetadata=rc;exports.GlobalScopeFilter=Aw;exports.HttpCore=OD;exports.JAvatar=Gv;exports.JBtn=jp;exports.JDialog=ma;exports.JForm=ny;exports.JIconBtn=Gp;exports.JSelect=Qv;exports.JTextArea=Xv;exports.JTextField=rc;exports.ParentCard=Ec;exports.SpinnerLoader=Iw;exports.TabFormHeader=ry;exports.UiTable=Nv;exports.branchInstance=Vr;exports.coreClient=Sh;exports.dateFormat=wU;exports.default=VU;exports.divisionInstance=ei;exports.filterQuery=Ti;exports.manageUserInstance=ti;exports.orgInstance=Hr;exports.scopedClient=_i;exports.setupAuthGuard=PU;exports.spinner=se;exports.teamInstance=Xt;exports.useBranchStore=MU;exports.useCustomizer=tR;exports.useDialog=Cc;exports.useDivisionStore=xU;exports.useGlobalScope=nR;exports.useManageUserStore=FU;exports.useOrganizationStore=Ew;exports.useSession=Ah;exports.useTeamStore=Sw;exports.useToast=Vn;