jplan-pack 0.5.99 → 0.6.0
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.
- package/dist/{AuthFailRoute-CzVzm1Iu.js → AuthFailRoute-BsbXKpRe.js} +1 -1
- package/dist/{AuthFailRoute-CarIdWNs.mjs → AuthFailRoute-bZLnSpVo.mjs} +1 -1
- package/dist/{AuthRoute-wDfmEsmW.mjs → AuthRoute-Bmlywsef.mjs} +1 -1
- package/dist/{AuthRoute-CvusQP1y.js → AuthRoute-CXJQSHqp.js} +1 -1
- package/dist/{index-C5t6e-s2.mjs → index-BKymSZt2.mjs} +1854 -1811
- package/dist/{index-CMNL3KiA.js → index-CP2T90rC.js} +18 -18
- package/dist/jplan-pack.cjs.js +1 -1
- package/dist/jplan-pack.es.js +1 -1
- package/dist/types/_auth/composables/useAuth.d.ts +2 -6
- package/dist/types/_auth/navigation-guard/authGuard.d.ts +2 -1
- package/dist/types/_auth/navigation-guard/type.d.ts +9 -0
- package/package.json +1 -1
@@ -1,14 +1,14 @@
|
|
1
|
-
"use strict";const c=require("vue"),Yp=require("@vueuse/core"),Be=require("vuetify/lib/components/VBtn/index.mjs"),
|
1
|
+
"use strict";const c=require("vue"),Yp=require("@vueuse/core"),Be=require("vuetify/lib/components/VBtn/index.mjs"),Ft=require("vuetify/components"),Qs=require("vuetify/lib/components/VIcon/index.mjs"),lt=require("vuetify/lib/components/VCard/index.mjs"),Ds=require("vuetify/lib/components/VDialog/index.mjs"),fo=require("vuetify/lib/components/VDivider/index.mjs"),_e=require("vuetify/lib/components/VGrid/index.mjs"),Jp=require("vuetify/lib/components/VAvatar/index.mjs"),Qp=require("vuetify/lib/components/VImg/index.mjs"),Vt=require("vuetify/lib/components/VList/index.mjs"),Xp=require("vuetify/lib/components/VMenu/index.mjs"),Zp=require("vuetify/lib/components/VDataTable/index.mjs"),Sk=require("vuetify/lib/components/VTextField/index.mjs"),ea=require("vuetify/lib/components/VSelect/index.mjs"),Ak=require("vuetify/lib/components/VCheckbox/index.mjs"),bk=require("vuetify/lib/components/VChip/index.mjs"),la=require("vuetify/lib/components/VLabel/index.mjs"),Ik=require("vuetify/lib/components/VTextarea/index.mjs"),kk=require("vuetify/lib/components/VBtnToggle/index.mjs");function Rk(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 Ok=Rk(Yp),Nk={key:0},Pk={key:1},yc=c.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(r){const e=r,{copy:t,copied:n,isSupported:i}=Yp.useClipboard();return(s,l)=>{const d=c.resolveComponent("CopyIcon");return c.unref(i)?(c.openBlock(),c.createElementBlock("span",Nk,[c.createVNode(Be.VBtn,{icon:"",variant:"text",onClick:l[0]||(l[0]=f=>c.unref(t)(e.contentToCopy)),size:s.size,color:s.color},{default:c.withCtx(()=>[c.createVNode(d,{size:s.size},null,8,["size"])]),_:1},8,["size","color"]),c.unref(n)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("p",Pk,"Your browser does not support Clipboard API"))}}}),um=c.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):c.createCommentVNode("",!0),typeof e.item=="string"?(c.openBlock(),c.createBlock(Qs.VIcon,{key:1,color:e.color,size:e.size},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.item),1)]),_:1},8,["color","size"])):c.createCommentVNode("",!0)],64))}}),ev=c.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(r){const e=r,t=c.useSlots();return(n,i)=>n.tooltip?(c.openBlock(),c.createBlock(c.unref(Ft.VTooltip),{key:0,text:n.tooltip,"open-delay":"1000"},{activator:c.withCtx(({props:s})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps(s,{variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[0]||(i[0]=l=>n.$emit("click"))}),{default:c.withCtx(()=>[!c.unref(t).default&&s.icon?(c.openBlock(),c.createBlock(um,{key:0,item:s.icon,size:s.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{key:1,variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[1]||(i[1]=s=>n.$emit("click"))},{default:c.withCtx(()=>[!c.unref(t).default&&e.icon?(c.openBlock(),c.createBlock(um,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:3},8,["variant","color","size"]))}}),tv=c.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=n=>e.$emit("click"))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.text)+" ",1),c.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}});var nv=!1;function Cs(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 vu(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Mk(){return rv().__VUE_DEVTOOLS_GLOBAL_HOOK__}function rv(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const xk=typeof Proxy=="function",Dk="devtools-plugin:setup",Lk="plugin:settings:set";let Uo,Zu;function Bk(){var r;return Uo!==void 0||(typeof window<"u"&&window.performance?(Uo=!0,Zu=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Uo=!0,Zu=globalThis.perf_hooks.performance):Uo=!1),Uo}function Uk(){return Bk()?Zu.now():Date.now()}class Vk{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const l in e.settings){const d=e.settings[l];n[l]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},n);try{const l=localStorage.getItem(i),d=JSON.parse(l);Object.assign(s,d)}catch{}this.fallbacks={getSettings(){return s},setSettings(l){try{localStorage.setItem(i,JSON.stringify(l))}catch{}s=l},now(){return Uk()}},t&&t.on(Lk,(l,d)=>{l===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(l,d)=>this.target?this.target.on[d]:(...f)=>{this.onQueue.push({method:d,args:f})}}),this.proxiedTarget=new Proxy({},{get:(l,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 ov(r,e){const t=r,n=rv(),i=Mk(),s=xk&&t.enableEarlyProxy;if(i&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(Dk,r,e);else{const l=s?new Vk(t,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:l}),l&&e(l.proxiedTarget)}}/*!
|
2
2
|
* pinia v2.2.6
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
4
4
|
* @license MIT
|
5
|
-
*/let ji;const ua=r=>ji=r,iv=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
|
5
|
+
*/let ji;const ua=r=>ji=r,iv=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 Xn;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Xn||(Xn={}));const co=typeof window<"u",dm=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 Fk(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 Nd(r,e,t){const n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){cv(n.response,e,t)},n.onerror=function(){console.error("could not download file")},n.send()}function av(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Ls(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 Bs=typeof navigator=="object"?navigator:{userAgent:""},sv=/Macintosh/.test(Bs.userAgent)&&/AppleWebKit/.test(Bs.userAgent)&&!/Safari/.test(Bs.userAgent),cv=co?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!sv?Hk:"msSaveOrOpenBlob"in Bs?$k:Kk:()=>{};function Hk(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?av(n.href)?Nd(r,e,t):(n.target="_blank",Ls(n)):Ls(n)):(n.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){Ls(n)},0))}function $k(r,e="download",t){if(typeof r=="string")if(av(r))Nd(r,e,t);else{const n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Ls(n)})}else navigator.msSaveOrOpenBlob(Fk(r,t),e)}function Kk(r,e,t,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return Nd(r,e,t);const i=r.type==="application/octet-stream",s=/constructor/i.test(String(dm.HTMLElement))||"safari"in dm,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&s||sv)&&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=l?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 ut(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 Pd(r){return"_a"in r&&"install"in r}function lv(){if(!("clipboard"in navigator))return ut("Your browser doesn't support the Clipboard API","error"),!0}function uv(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(ut('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function zk(r){if(!lv())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),ut("Global state copied to clipboard.")}catch(e){if(uv(e))return;ut("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Wk(r){if(!lv())try{dv(r,JSON.parse(await navigator.clipboard.readText())),ut("Global state pasted from clipboard.")}catch(e){if(uv(e))return;ut("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function qk(r){try{cv(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){ut("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let gr;function Gk(){gr||(gr=document.createElement("input"),gr.type="file",gr.accept=".json");function r(){return new Promise((e,t)=>{gr.onchange=async()=>{const n=gr.files;if(!n)return e(null);const i=n.item(0);return e(i?{text:await i.text(),file:i}:null)},gr.oncancel=()=>e(null),gr.onerror=t,gr.click()})}return r}async function jk(r){try{const t=await Gk()();if(!t)return;const{text:n,file:i}=t;dv(r,JSON.parse(n)),ut(`Global state imported from "${i.name}".`)}catch(e){ut("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function dv(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 Mn(r){return{_custom:{display:r}}}const hv="🍍 Pinia (root)",Us="_root";function Yk(r){return Pd(r)?{id:Us,label:hv}:{id:r.$id,label:r.$id}}function Jk(r){if(Pd(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 l=n.get(s);return{editable:!1,key:s,value:l._getters.reduce((d,f)=>(d[f]=l[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 Qk(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:Mn(r.type),key:Mn(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function Xk(r){switch(r){case Xn.direct:return"mutation";case Xn.patchFunction:return"$patch";case Xn.patchObject:return"$patch";default:return"unknown"}}let ni=!0;const Vs=[],io="pinia:mutations",St="pinia",{assign:Zk}=Object,Xs=r=>"🍍 "+r;function eR(r,e){ov({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Vs,app:r},t=>{typeof t.now!="function"&&ut("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:St,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{zk(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Wk(e),t.sendInspectorTree(St),t.sendInspectorState(St)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{qk(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await jk(e),t.sendInspectorTree(St),t.sendInspectorState(St)},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"?ut(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),ut(`Store "${n}" reset.`)):ut(`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 l=n.componentInstance.proxy._pStores;Object.values(l).forEach(d=>{n.instanceData.state.push({type:Xs(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:c.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:Xs(d.$id),key:"getters",editable:!1,value:d._getters.reduce((f,g)=>{try{f[g]=d[g]}catch(m){f[g]=m}return f},{})})})}}),t.on.getInspectorTree(n=>{if(n.app===r&&n.inspectorId===St){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()):hv.toLowerCase().includes(n.filter.toLowerCase())):i).map(Yk)}}),globalThis.$pinia=e,t.on.getInspectorState(n=>{if(n.app===r&&n.inspectorId===St){const i=n.nodeId===Us?e:e._s.get(n.nodeId);if(!i)return;i&&(n.nodeId!==Us&&(globalThis.$store=c.toRaw(i)),n.state=Jk(i))}}),t.on.editInspectorState((n,i)=>{if(n.app===r&&n.inspectorId===St){const s=n.nodeId===Us?e:e._s.get(n.nodeId);if(!s)return ut(`store "${n.nodeId}" not found`,"error");const{path:l}=n;Pd(s)?l.unshift("state"):(l.length!==1||!s._customProperties.has(l[0])||l[0]in s.$state)&&l.unshift("$state"),ni=!1,n.set(s,l,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 ut(`store "${i}" not found`,"error");const{path:l}=n;if(l[0]!=="state")return ut(`Invalid path for store "${i}":
|
6
6
|
${l}
|
7
|
-
Only state can be modified.`);l[0]="$state",ni=!1,n.set(s,l,n.state.value),ni=!0}})})}function tR(r,e){Vs.includes(Xs(e.$id))||Vs.push(Xs(e.$id)),ov({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Vs,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:l,onError:d,name:f,args:g})=>{const m=fv++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:
|
7
|
+
Only state can be modified.`);l[0]="$state",ni=!1,n.set(s,l,n.state.value),ni=!0}})})}function tR(r,e){Vs.includes(Xs(e.$id))||Vs.push(Xs(e.$id)),ov({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Vs,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:l,onError:d,name:f,args:g})=>{const m=fv++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:Mn(e.$id),action:Mn(f),args:g},groupId:m}}),l(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛬 "+f,subtitle:"end",data:{store:Mn(e.$id),action:Mn(f),args:g,result:v},groupId:m}})}),d(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),logType:"error",title:"💥 "+f,subtitle:"end",data:{store:Mn(e.$id),action:Mn(f),args:g,error:v},groupId:m}})})},!0),e._customProperties.forEach(l=>{c.watch(()=>c.unref(e[l]),(d,f)=>{t.notifyComponentUpdate(),t.sendInspectorState(St),ni&&t.addTimelineEvent({layerId:io,event:{time:n(),title:"Change",subtitle:l,data:{newValue:d,oldValue:f},groupId:$r}})},{deep:!0})}),e.$subscribe(({events:l,type:d},f)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(St),!ni)return;const g={time:n(),title:Xk(d),data:Zk({store:Mn(e.$id)},Qk(l)),groupId:$r};d===Xn.patchFunction?g.subtitle="⤵️":d===Xn.patchObject?g.subtitle="🧩":l&&!Array.isArray(l)&&(g.subtitle=l.type),l&&(g.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:l}}),t.addTimelineEvent({layerId:io,event:g})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=c.markRaw(l=>{i(l),t.addTimelineEvent({layerId:io,event:{time:n(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:Mn(e.$id),info:Mn("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(St),t.sendInspectorState(St)});const{$dispose:s}=e;e.$dispose=()=>{s(),t.notifyComponentUpdate(),t.sendInspectorTree(St),t.sendInspectorState(St),t.getSettings().logStoreChanges&&ut(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(St),t.sendInspectorState(St),t.getSettings().logStoreChanges&&ut(`"${e.$id}" store installed 🆕`)})}let fv=0,$r;function hm(r,e,t){const n=e.reduce((i,s)=>(i[s]=c.toRaw(r)[s],i),{});for(const i in n)r[i]=function(){const s=fv,l=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(l,arguments);return $r=void 0,d}}function nR({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){hm(e,Object.keys(t.actions),e._isOptionsAPI);const n=e._hotUpdate;c.toRaw(e)._hotUpdate=function(i){n.apply(this,arguments),hm(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}tR(r,e)}}function rR(){const r=c.effectScope(!0),e=r.run(()=>c.ref({}));let t=[],n=[];const i=c.markRaw({install(s){ua(i),i._a=s,s.provide(iv,i),s.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co&&eR(s,i),n.forEach(l=>t.push(l)),n=[]},use(s){return!this._a&&!nv?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(nR),i}function gv(r,e){for(const t in e){const n=e[t];if(!(t in r))continue;const i=r[t];ui(i)&&ui(n)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=gv(i,n):r[t]=n}return r}const oR=()=>{};function fm(r,e,t,n=oR){r.push(e);const i=()=>{const s=r.indexOf(e);s>-1&&(r.splice(s,1),n())};return!t&&c.getCurrentScope()&&c.onScopeDispose(i),i}function Vo(r,...e){r.slice().forEach(t=>{t(...e)})}const iR=r=>r(),gm=Symbol(),yu=Symbol();function mv(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)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=mv(i,n):r[t]=n}return r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Tn}=Object;function mm(r){return!!(c.isRef(r)&&r.effect)}function pm(r,e,t,n){const{state:i,actions:s,getters:l}=e,d=t.state.value[r];let f;function g(){!d&&(process.env.NODE_ENV==="production"||!n)&&(t.state.value[r]=i?i():{});const m=process.env.NODE_ENV!=="production"&&n?c.toRefs(c.ref(i?i():{}).value):c.toRefs(t.state.value[r]);return Tn(m,s,Object.keys(l||{}).reduce((v,C)=>(process.env.NODE_ENV!=="production"&&C in m&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${C}" in store "${r}".`),v[C]=c.markRaw(c.computed(()=>{ua(t);const S=t._s.get(r);return l[C].call(S,S)})),v),{}))}return f=aR(r,g,e,t,n,!0),f}function aR(r,e,t={},n,i,s){let l;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"&&!nv&&(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,m,v=[],C=[],S;const T=n.state.value[r],I=c.ref({});let O;function $(Y){let G;g=m=!1,process.env.NODE_ENV!=="production"&&(S=[]),typeof Y=="function"?(Y(n.state.value[r]),G={type:Xn.patchFunction,storeId:r,events:S}):(mv(n.state.value[r],Y),G={type:Xn.patchObject,payload:Y,storeId:r,events:S});const Ee=O=Symbol();c.nextTick().then(()=>{O===Ee&&(g=!0)}),m=!0,Vo(v,G,n.state.value[r])}const F=function(){const{state:G}=t,Ee=G?G():{};this.$patch(Ue=>{Tn(Ue,Ee)})};function H(){l.stop(),v=[],C=[],n._s.delete(r)}const z=(Y,G="")=>{if(gm in Y)return Y[yu]=G,Y;const Ee=function(){ua(n);const Ue=Array.from(arguments),yt=[],An=[];function sn(Ct){yt.push(Ct)}function Mt(Ct){An.push(Ct)}Vo(C,{args:Ue,name:Ee[yu],store:W,after:sn,onError:Mt});let Qe;try{Qe=Y.apply(this&&this.$id===r?this:W,Ue)}catch(Ct){throw Vo(An,Ct),Ct}return Qe instanceof Promise?Qe.then(Ct=>(Vo(yt,Ct),Ct)).catch(Ct=>(Vo(An,Ct),Promise.reject(Ct))):(Vo(yt,Qe),Qe)};return Ee[gm]=!0,Ee[yu]=G,Ee},Q=c.markRaw({actions:{},getters:{},state:[],hotState:I}),we={_p:n,$id:r,$onAction:fm.bind(null,C),$patch:$,$reset:F,$subscribe(Y,G={}){const Ee=fm(v,Y,G.detached,()=>Ue()),Ue=l.run(()=>c.watch(()=>n.state.value[r],yt=>{(G.flush==="sync"?m:g)&&Y({storeId:r,type:Xn.direct,events:S},yt)},Tn({},f,G)));return Ee},$dispose:H},W=c.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co?Tn({_hmrPayload:Q,_customProperties:c.markRaw(new Set)},we):we);n._s.set(r,W);const Te=(n._a&&n._a.runWithContext||iR)(()=>n._e.run(()=>(l=c.effectScope()).run(()=>e({action:z}))));for(const Y in Te){const G=Te[Y];if(c.isRef(G)&&!mm(G)||c.isReactive(G))process.env.NODE_ENV!=="production"&&i&&Cs(I.value,Y,c.toRef(Te,Y)),process.env.NODE_ENV!=="production"&&Q.state.push(Y);else if(typeof G=="function"){const Ee=process.env.NODE_ENV!=="production"&&i?G:z(G,Y);Te[Y]=Ee,process.env.NODE_ENV!=="production"&&(Q.actions[Y]=G),d.actions[Y]=G}else process.env.NODE_ENV!=="production"&&mm(G)&&(Q.getters[Y]=t.getters[Y],co&&(Te._getters||(Te._getters=c.markRaw([]))).push(Y))}if(Tn(W,Te),Tn(c.toRaw(W),Te),Object.defineProperty(W,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?I.value:n.state.value[r],set:Y=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");$(G=>{Tn(G,Y)})}}),process.env.NODE_ENV!=="production"&&(W._hotUpdate=c.markRaw(Y=>{W._hotUpdating=!0,Y._hmrPayload.state.forEach(G=>{if(G in W.$state){const Ee=Y.$state[G],Ue=W.$state[G];typeof Ee=="object"&&ui(Ee)&&ui(Ue)?gv(Ee,Ue):Y.$state[G]=Ue}Cs(W,G,c.toRef(Y.$state,G))}),Object.keys(W.$state).forEach(G=>{G in Y.$state||vu(W,G)}),g=!1,m=!1,n.state.value[r]=c.toRef(Y._hmrPayload,"hotState"),m=!0,c.nextTick().then(()=>{g=!0});for(const G in Y._hmrPayload.actions){const Ee=Y[G];Cs(W,G,z(Ee,G))}for(const G in Y._hmrPayload.getters){const Ee=Y._hmrPayload.getters[G],Ue=c.computed(()=>(ua(n),Ee.call(W,W)));Cs(W,G,Ue)}Object.keys(W._hmrPayload.getters).forEach(G=>{G in Y._hmrPayload.getters||vu(W,G)}),Object.keys(W._hmrPayload.actions).forEach(G=>{G in Y._hmrPayload.actions||vu(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=l.run(()=>Y({store:W,app:n._a,pinia:n,options:d}));Object.keys(G||{}).forEach(Ee=>W._customProperties.add(Ee)),Tn(W,G)}else Tn(W,l.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
9
|
Found in store "${W.$id}".`),T&&s&&t.hydrate&&t.hydrate(W.$state,T),g=!0,m=!0,W}/*! #__NO_SIDE_EFFECTS__ */function sR(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(l,d){const f=c.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&ji&&ji._testing?null:l)||(f?c.inject(iv,null):null),l&&ua(l),process.env.NODE_ENV!=="production"&&!ji)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.`);l=ji,l._s.has(n)||(pm(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,y=pm(m,_n({},i),l,!0);d._hotUpdate(y),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const y=m.proxy,C="_pStores"in y?y._pStores:y._pStores={};C[n]=g}}return g}return s.$id=n,s}const cR=sR({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}}}),Fo=c.ref({}),va=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ae=c.ref(!1);var lR=Object.defineProperty,vm=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,ym=(r,e,t)=>e in r?lR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pv=(r,e)=>{for(var t in e||(e={}))uR.call(e,t)&&ym(r,t,e[t]);if(vm)for(var t of vm(e))dR.call(e,t)&&ym(r,t,e[t]);return r},Cc=r=>typeof r=="function",wc=r=>typeof r=="string",vv=r=>wc(r)&&r.trim().length>0,hR=r=>typeof r=="number",lo=r=>typeof r>"u",da=r=>typeof r=="object"&&r!==null,fR=r=>Xn(r,"tag")&&vv(r.tag),yv=r=>window.TouchEvent&&r instanceof TouchEvent,Cv=r=>Xn(r,"component")&&wv(r.component),gR=r=>Cc(r)||da(r),wv=r=>!lo(r)&&(wc(r)||gR(r)||Cv(r)),Cm=r=>da(r)&&["height","width","right","left","top","bottom"].every(e=>hR(r[e])),Xn=(r,e)=>(da(r)||Cc(r))&&e in r,mR=(r=>()=>r++)(0);function Cu(r){return yv(r)?r.targetTouches[0].clientX:r.clientX}function wm(r){return yv(r)?r.targetTouches[0].clientY:r.clientY}var pR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},ya=r=>Cv(r)?ya(r.component):fR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),vR=r=>{if(typeof r=="string")return r;const e=Xn(r,"props")&&da(r.props)?r.props:{},t=Xn(r,"listeners")&&da(r.listeners)?r.listeners:{};return{component:ya(r),props:e,listeners:t}},yR=()=>typeof window<"u",_c=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))}},CR=r=>["on","off","emit"].every(e=>Xn(r,e)&&Cc(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(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"})(exports.POSITION||(exports.POSITION={}));var tn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(tn||(tn={}));var Dn="Vue-Toastification",xn={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},_v={type:xn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Fs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:xn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},ed={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Tv={transition:{type:[Object,String],default:`${Dn}__bounce`}},wR={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:xn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:xn.trueBoolean,pauseOnHover:xn.trueBoolean,closeOnClick:xn.trueBoolean,timeout:ed.timeout,hideProgressBar:ed.hideProgressBar,toastClassName:xn.classNames,bodyClassName:xn.classNames,icon:_v.customIcon,closeButton:Fs.component,closeButtonClassName:Fs.classNames,showCloseButtonOnHover:Fs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new _c}},_R={id:{type:[String,Number],required:!0,default:0},type:xn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},TR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:xn.trueBoolean,maxToasts:{type:Number,default:20},transition:Tv.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:xn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},yr={CORE_TOAST:wR,TOAST:_R,CONTAINER:TR,PROGRESS_BAR:ed,ICON:_v,TRANSITION:Tv,CLOSE_BUTTON:Fs},Ev=c.defineComponent({name:"VtProgressBar",props:yr.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?`${Dn}__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 ER(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}Ev.render=ER;var SR=Ev,Sv=c.defineComponent({name:"VtCloseButton",props:yr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?ya(this.component):"button"},classes(){const r=[`${Dn}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),AR=c.createTextVNode(" × ");function bR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[AR]),_:1},16,["aria-label","class"])}Sv.render=bR;var IR=Sv,Av={},kR={"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"},RR=c.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),OR=[RR];function NR(r,e){return c.openBlock(),c.createElementBlock("svg",kR,OR)}Av.render=NR;var PR=Av,bv={},MR={"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"},xR=c.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),DR=[xR];function LR(r,e){return c.openBlock(),c.createElementBlock("svg",MR,DR)}bv.render=LR;var _m=bv,Iv={},BR={"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"},UR=c.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),VR=[UR];function FR(r,e){return c.openBlock(),c.createElementBlock("svg",BR,VR)}Iv.render=FR;var HR=Iv,kv={},$R={"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"},KR=c.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),zR=[KR];function WR(r,e){return c.openBlock(),c.createElementBlock("svg",$R,zR)}kv.render=WR;var qR=kv,Rv=c.defineComponent({name:"VtIcon",props:yr.ICON,computed:{customIconChildren(){return Xn(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return wc(this.customIcon)?this.trimValue(this.customIcon):Xn(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Xn(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:wv(this.customIcon)?ya(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:_m,[exports.TYPE.INFO]:_m,[exports.TYPE.SUCCESS]:PR,[exports.TYPE.ERROR]:qR,[exports.TYPE.WARNING]:HR}[this.type]},iconClasses(){const r=[`${Dn}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return vv(r)?r.trim():e}}});function GR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Rv.render=GR;var jR=Rv,Ov=c.defineComponent({name:"VtToast",components:{ProgressBar:SR,CloseButton:IR,Icon:jR},inheritAttrs:!1,props:Object.assign({},yr.CORE_TOAST,yr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Dn}__toast`,`${Dn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Dn}__toast--rtl`),r},bodyClasses(){return[`${Dn}__toast-${wc(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 Cm(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:Xn,getVueComponentFromObj:ya,closeToast(){this.eventBus.emit(tn.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:Cu(r),y:wm(r)},this.dragStart=Cu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Cu(r),y:wm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Cm(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}))}}}),YR=["role"];function JR(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.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?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,YR),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.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"])):c.createCommentVNode("v-if",!0)],38)}Ov.render=JR;var QR=Ov,Nv=c.defineComponent({name:"VtTransition",props:yr.TRANSITION,emits:["leave"],methods:{hasProp:Xn,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 XR(r,e){return c.openBlock(),c.createBlock(c.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:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Nv.render=XR;var ZR=Nv,Pv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:QR,VtTransition:ZR},props:Object.assign({},yr.CORE_TOAST,yr.CONTAINER,yr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(tn.ADD,this.addToast),r.on(tn.CLEAR,this.clearToasts),r.on(tn.DISMISS,this.dismissToast),r.on(tn.UPDATE,this.updateToast),r.on(tn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){Cc(r)&&(r=await r()),pR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=vR(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[`${Dn}__container`,r].concat(this.defaults.containerClassName)}}});function eO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Pv.render=eO;var tO=Pv,Tm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new _c;e&&c.nextTick(()=>{const s=c.createApp(tO,pv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Dn}] 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,l)=>{const d=Object.assign({},{id:mR(),type:exports.TYPE.DEFAULT},l,{content:s});return t.emit(tn.ADD,d),d.id};n.clear=()=>t.emit(tn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(tn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(tn.DISMISS,s)};function i(s,{content:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(tn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},nO=()=>{const r=()=>console.warn(`[${Dn}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function ha(r){return yR()?CR(r)?Tm({eventBus:r},!1):Tm(r,!0):nO()}var Tc=Symbol("VueToastification"),Md=new _c,rO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=ha(pv({eventBus:Md},e));r.provide(Tc,t)},oO=r=>{const e=ha(r);c.getCurrentInstance()&&c.provide(Tc,e)},Vn=r=>{if(r)return ha(r);const e=c.getCurrentInstance()?c.inject(Tc,void 0):void 0;return e||ha(Md)},iO=rO;const aO={class:"d-flex align-center"},sO={key:1},cO={class:"ms-auto"},Ca=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=va(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const y=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",aO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",sO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",cO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(y,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),xd=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=va("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ca,{"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"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete ")])),_:1},8,["onClick"])],64))}}),Mv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var lO={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.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),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},xv={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Dv={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},uO={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},Em={name:"FilterIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},dO={name:"HierarchyIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},hO={name:"LayoutSidebarRightCollapseIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},fO={name:"RefreshIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},gO={name:"TableIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const Lv=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Vt.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Vt.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(xv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Dv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),mO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Bv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Vt.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Vt.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(xv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Dv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Vt.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",mO,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Vt.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Vt.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Vt.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Ec=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),Uv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Ds.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:y})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:y})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(uO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),wu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Vv=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||wu);function i(){t.value=wu}return(s,l)=>(c.openBlock(),c.createBlock(Jp.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(Qp.VImg,{src:n.value,"lazy-src":wu,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),_u="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Fv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||_u);function i(){t.value=_u}return(s,l)=>(c.openBlock(),c.createBlock(Jp.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(Qp.VImg,{src:n.value,"lazy-src":_u,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),pO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.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 c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(Xp.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Ut.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),pi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Hv=pi(pO,[["__scopeId","data-v-a53b15af"]]),vO={class:"d-inline-flex"},$v=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(Zp.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",vO,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),Kv=6048e5,yO=864e5,Sm=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Sm in r?r[Sm](e):r instanceof Date?new r.constructor(e):new Date(e)}function Fn(r,e){return Wr(e||r,r)}let CO={};function Sc(){return CO}function fa(r,e){var d,f,g,m;const t=Sc(),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??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=Fn(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Zs(r,e){return fa(r,{...e,weekStartsOn:1})}function zv(r,e){const t=Fn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=Zs(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=Zs(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Am(r){const e=Fn(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 wO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function bm(r,e){const t=Fn(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function _O(r,e,t){const[n,i]=wO(t==null?void 0:t.in,r,e),s=bm(n),l=bm(i),d=+s-Am(s),f=+l-Am(l);return Math.round((d-f)/yO)}function TO(r,e){const t=zv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zs(n)}function EO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function SO(r){return!(!EO(r)&&typeof r!="number"||isNaN(+Fn(r)))}function AO(r,e){const t=Fn(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const bO={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"}},IO=(r,e,t)=>{let n;const i=bO[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 En(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const kO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},RO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NO={date:En({formats:kO,defaultWidth:"full"}),time:En({formats:RO,defaultWidth:"full"}),dateTime:En({formats:OO,defaultWidth:"full"})},PO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},MO=(r,e,t,n)=>PO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const xO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},LO={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"]},BO={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"]},UO={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"}},VO={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"}},FO=(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"},HO={ordinalNumber:FO,era:Ze({values:xO,defaultWidth:"wide"}),quarter:Ze({values:DO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:LO,defaultWidth:"wide"}),day:Ze({values:BO,defaultWidth:"wide"}),dayPeriod:Ze({values:UO,defaultWidth:"wide",formattingValues:VO,defaultFormattingWidth:"wide"})};function et(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 l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?KO(d,y=>y.test(l)):$O(d,y=>y.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function $O(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function KO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function Ac(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 l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const zO=/^(\d+)(th|st|nd|rd)?/i,WO=/\d+/i,qO={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},GO={any:[/^b/i,/^(a|c)/i]},jO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YO={any:[/1/i,/2/i,/3/i,/4/i]},JO={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},QO={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]},XO={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},ZO={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]},eN={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},tN={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}},nN={ordinalNumber:Ac({matchPattern:zO,parsePattern:WO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:qO,defaultMatchWidth:"wide",parsePatterns:GO,defaultParseWidth:"any"}),quarter:et({matchPatterns:jO,defaultMatchWidth:"wide",parsePatterns:YO,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:JO,defaultMatchWidth:"wide",parsePatterns:QO,defaultParseWidth:"any"}),day:et({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:ZO,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:eN,defaultMatchWidth:"any",parsePatterns:tN,defaultParseWidth:"any"})},Dd={code:"en-US",formatDistance:IO,formatLong:NO,formatRelative:MO,localize:HO,match:nN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rN(r,e){const t=Fn(r,e==null?void 0:e.in);return _O(t,AO(t))+1}function oN(r,e){const t=Fn(r,e==null?void 0:e.in),n=+Zs(t)-+TO(t);return Math.round(n/Kv)+1}function Wv(r,e){var m,y,C,S;const t=Fn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Sc(),s=(e==null?void 0:e.firstWeekContainsDate)??((y=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=fa(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=fa(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function iN(r,e){var d,f,g,m;const t=Sc(),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??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=Wv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),fa(s,e)}function aN(r,e){const t=Fn(r,e==null?void 0:e.in),n=+fa(t,e)-+iN(t,e);return Math.round(n/Kv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Mr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(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 Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Im={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 Mr.y(r,e)},Y:function(r,e,t,n){const i=Wv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=zv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(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 Re(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 Re(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 Mr.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 Re(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=aN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=oN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Mr.d(r,e)},D:function(r,e,t){const n=rN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(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 Re(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 Re(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 Re(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=Ho.noon:n===0?i=Ho.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=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.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 Mr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Mr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Mr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Mr.s(r,e)},S:function(r,e){return Mr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Rm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return Rm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+km(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+km(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function km(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+Re(s,2)}function Rm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Om=(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"})}},qv=(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"})}},sN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Om(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}}",Om(n,e)).replace("{{time}}",qv(i,e))},cN={p:qv,P:sN},lN=/^D+$/,uN=/^Y+$/,dN=["D","DD","YY","YYYY"];function hN(r){return lN.test(r)}function fN(r){return uN.test(r)}function gN(r,e,t){const n=mN(r,e,t);if(console.warn(n),dN.includes(r))throw new RangeError(n)}function mN(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 pN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yN=/^'([^]*?)'?$/,CN=/''/g,wN=/[a-zA-Z]/;function _N(r,e,t){var m,y,C,S,T,I,N,K;const n=Sc(),i=(t==null?void 0:t.locale)??n.locale??Dd,s=(t==null?void 0:t.firstWeekContainsDate)??((y=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((I=(T=t==null?void 0:t.locale)==null?void 0:T.options)==null?void 0:I.weekStartsOn)??n.weekStartsOn??((K=(N=n.locale)==null?void 0:N.options)==null?void 0:K.weekStartsOn)??0,d=Fn(r,t==null?void 0:t.in);if(!SO(d))throw new RangeError("Invalid time value");let f=e.match(vN).map(F=>{const H=F[0];if(H==="p"||H==="P"){const z=cN[H];return z(F,i.formatLong)}return F}).join("").match(pN).map(F=>{if(F==="''")return{isToken:!1,value:"'"};const H=F[0];if(H==="'")return{isToken:!1,value:TN(F)};if(Im[H])return{isToken:!0,value:F};if(H.match(wN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");return{isToken:!1,value:F}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(F=>{if(!F.isToken)return F.value;const H=F.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&fN(H)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&hN(H))&&gN(H,e,String(r));const z=Im[H[0]];return z(d,H,i.localize,g)}).join("")}function TN(r){const e=r.match(yN);return e?e[1].replace(CN,"'"):r}const Nm={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"}}},EN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Nm[r].withPreposition:Nm[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},SN={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},AN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},bN={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},IN={date:En({formats:SN,defaultWidth:"full"}),time:En({formats:AN,defaultWidth:"full"}),dateTime:En({formats:bN,defaultWidth:"full"})},kN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},RN=(r,e,t,n)=>kN[r],ON={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},NN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},td={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"]},PN={narrow:td.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:td.wide},MN={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"]},xN={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"}},DN={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"}},LN=r=>Number(r)+".",BN={ordinalNumber:LN,era:Ze({values:ON,defaultWidth:"wide"}),quarter:Ze({values:NN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:td,formattingValues:PN,defaultWidth:"wide"}),day:Ze({values:MN,defaultWidth:"wide"}),dayPeriod:Ze({values:xN,defaultWidth:"wide",formattingValues:DN,defaultFormattingWidth:"wide"})},UN=/^(\d+)(\.)?/i,VN=/\d+/i,FN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},HN={any:[/^v/i,/^n/i]},$N={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},KN={any:[/1/i,/2/i,/3/i,/4/i]},zN={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},WN={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]},qN={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},GN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},jN={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},YN={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}},JN={ordinalNumber:Ac({matchPattern:UN,parsePattern:VN,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:FN,defaultMatchWidth:"wide",parsePatterns:HN,defaultParseWidth:"any"}),quarter:et({matchPatterns:$N,defaultMatchWidth:"wide",parsePatterns:KN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:zN,defaultMatchWidth:"wide",parsePatterns:WN,defaultParseWidth:"any"}),day:et({matchPatterns:qN,defaultMatchWidth:"wide",parsePatterns:GN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:jN,defaultMatchWidth:"wide",parsePatterns:YN,defaultParseWidth:"any"})},QN={code:"de",formatDistance:EN,formatLong:IN,formatRelative:RN,localize:BN,match:JN,options:{weekStartsOn:1,firstWeekContainsDate:4}},XN={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"}},ZN=(r,e,t)=>{let n;const i=XN[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},e0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},t0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},n0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},r0={date:En({formats:e0,defaultWidth:"full"}),time:En({formats:t0,defaultWidth:"full"}),dateTime:En({formats:n0,defaultWidth:"full"})},o0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},i0=(r,e,t,n)=>o0[r],a0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},s0={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"]},c0={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"]},l0={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"]},u0={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"}},d0=(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},h0=["MMM","MMMM"],f0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&h0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:d0,era:Ze({values:a0,defaultWidth:"wide"}),quarter:Ze({values:s0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:c0,defaultWidth:"wide"}),day:Ze({values:l0,defaultWidth:"wide"}),dayPeriod:Ze({values:u0,defaultWidth:"wide"})},g0=/^(\d+)(ième|ère|ème|er|e)?/i,m0=/\d+/i,p0={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},v0={any:[/^av/i,/^ap/i]},y0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},C0={any:[/1/i,/2/i,/3/i,/4/i]},w0={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},_0={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]},T0={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},E0={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]},S0={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},A0={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}},b0={ordinalNumber:Ac({matchPattern:g0,parsePattern:m0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:p0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any"}),quarter:et({matchPatterns:y0,defaultMatchWidth:"wide",parsePatterns:C0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:_0,defaultParseWidth:"any"}),day:et({matchPatterns:T0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:S0,defaultMatchWidth:"any",parsePatterns:A0,defaultParseWidth:"any"})},I0={code:"fr",formatDistance:ZN,formatLong:r0,formatRelative:i0,localize:f0,match:b0,options:{weekStartsOn:1,firstWeekContainsDate:4}},k0={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"}},R0=(r,e,t)=>{let n;const i=k0[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},O0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},N0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},P0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M0={date:En({formats:O0,defaultWidth:"full"}),time:En({formats:N0,defaultWidth:"full"}),dateTime:En({formats:P0,defaultWidth:"full"})},x0={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"},D0=(r,e,t,n)=>{const i=x0[r];return typeof i=="function"?i(e):i},L0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},B0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},U0={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"]},V0={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"]},F0={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"}},H0={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"}},$0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},K0={ordinalNumber:$0,era:Ze({values:L0,defaultWidth:"wide"}),quarter:Ze({values:B0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:U0,defaultWidth:"wide"}),day:Ze({values:V0,defaultWidth:"wide"}),dayPeriod:Ze({values:F0,defaultWidth:"wide",formattingValues:H0,defaultFormattingWidth:"wide"})},z0=/^(\d+)[ºªo]?/i,W0=/\d+/i,q0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},G0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},j0={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Y0={any:[/1/i,/2/i,/3/i,/4/i]},J0={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},Q0={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]},X0={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},Z0={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]},eP={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},tP={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}},nP={ordinalNumber:Ac({matchPattern:z0,parsePattern:W0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:q0,defaultMatchWidth:"wide",parsePatterns:G0,defaultParseWidth:"any"}),quarter:et({matchPatterns:j0,defaultMatchWidth:"wide",parsePatterns:Y0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:Q0,defaultParseWidth:"any"}),day:et({matchPatterns:X0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:eP,defaultMatchWidth:"any",parsePatterns:tP,defaultParseWidth:"any"})},rP={code:"pt-BR",formatDistance:R0,formatLong:M0,formatRelative:D0,localize:K0,match:nP,options:{weekStartsOn:0,firstWeekContainsDate:1}},oP={"en-US":Dd,"pt-BR":rP,"fr-FR":I0,"de-DE":QN};function Gv(r){if(!r)return"";const e=navigator.language,t=oP[e]||Dd;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":_N(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const iP={class:"d-inline-flex"},aP={class:"d-inline-flex"},sP={class:"d-inline-flex"},jv=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const y=n.value.findIndex(S=>S===m);y!==-1?n.value.splice(y,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Xp.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=y=>i.value=y),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(Zp.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=y=>n.value=y),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:y})=>[c.renderSlot(g.$slots,"avatar",{item:y})]),"item.active":c.withCtx(({item:y})=>[c.renderSlot(g.$slots,"active",{item:y})]),"item.image":c.withCtx(({item:y})=>[c.renderSlot(g.$slots,"image",{item:y})]),"item.picture":c.withCtx(({item:y})=>[c.renderSlot(g.$slots,"picture",{item:y})]),"item.icon":c.withCtx(({item:y})=>[c.renderSlot(g.$slots,"icon",{item:y})]),"item.actions":c.withCtx(({item:y})=>[c.createElementVNode("div",iP,[c.renderSlot(g.$slots,"actions",{item:y})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,y=>({name:`item.${y}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",aP,c.toDisplayString(c.unref(Gv)(C[y])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:y})=>[c.createElementVNode("div",sP,[c.renderSlot(g.$slots,customField,{item:y})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),Yv=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(Sk.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),cP={class:"d-flex align-center"},lP={class:"d-flex align-center justify-end"},uP={class:"d-flex align-center"},dP={class:"d-flex align-center ms-1"},hP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=va("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(y,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=T=>s.value=T)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",cP,[c.createVNode(c.unref(Em),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(Yv,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=T=>i.value=T)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",lP,[c.renderSlot(y.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",uP,[c.createVNode(ea.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(Em),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(fO),{onClick:C[2]||(C[2]=T=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(y.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(xd),{key:0,onRemoveAll:C[3]||(C[3]=T=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(y.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(y.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(gO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ea.VSelect,{items:y.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=T=>n.value=T),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(dO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ea.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",dP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(hO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),Jv=pi(hP,[["__scopeId","data-v-8188268e"]]);/*!
|
11
|
+
This will fail in production.`);l=ji,l._s.has(n)||(pm(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,v=pm(m,Tn({},i),l,!0);d._hotUpdate(v),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const v=m.proxy,C="_pStores"in v?v._pStores:v._pStores={};C[n]=g}}return g}return s.$id=n,s}const cR=sR({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}}}),Fo=c.ref({}),va=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ae=c.ref(!1);var lR=Object.defineProperty,vm=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,ym=(r,e,t)=>e in r?lR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,pv=(r,e)=>{for(var t in e||(e={}))uR.call(e,t)&&ym(r,t,e[t]);if(vm)for(var t of vm(e))dR.call(e,t)&&ym(r,t,e[t]);return r},Cc=r=>typeof r=="function",wc=r=>typeof r=="string",vv=r=>wc(r)&&r.trim().length>0,hR=r=>typeof r=="number",lo=r=>typeof r>"u",da=r=>typeof r=="object"&&r!==null,fR=r=>Zn(r,"tag")&&vv(r.tag),yv=r=>window.TouchEvent&&r instanceof TouchEvent,Cv=r=>Zn(r,"component")&&wv(r.component),gR=r=>Cc(r)||da(r),wv=r=>!lo(r)&&(wc(r)||gR(r)||Cv(r)),Cm=r=>da(r)&&["height","width","right","left","top","bottom"].every(e=>hR(r[e])),Zn=(r,e)=>(da(r)||Cc(r))&&e in r,mR=(r=>()=>r++)(0);function Cu(r){return yv(r)?r.targetTouches[0].clientX:r.clientX}function wm(r){return yv(r)?r.targetTouches[0].clientY:r.clientY}var pR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},ya=r=>Cv(r)?ya(r.component):fR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),vR=r=>{if(typeof r=="string")return r;const e=Zn(r,"props")&&da(r.props)?r.props:{},t=Zn(r,"listeners")&&da(r.listeners)?r.listeners:{};return{component:ya(r),props:e,listeners:t}},yR=()=>typeof window<"u",_c=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))}},CR=r=>["on","off","emit"].every(e=>Zn(r,e)&&Cc(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(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"})(exports.POSITION||(exports.POSITION={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Ln="Vue-Toastification",Dn={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},_v={type:Dn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Fs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Dn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},ed={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Tv={transition:{type:[Object,String],default:`${Ln}__bounce`}},wR={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:Dn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Dn.trueBoolean,pauseOnHover:Dn.trueBoolean,closeOnClick:Dn.trueBoolean,timeout:ed.timeout,hideProgressBar:ed.hideProgressBar,toastClassName:Dn.classNames,bodyClassName:Dn.classNames,icon:_v.customIcon,closeButton:Fs.component,closeButtonClassName:Fs.classNames,showCloseButtonOnHover:Fs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new _c}},_R={id:{type:[String,Number],required:!0,default:0},type:Dn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},TR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Dn.trueBoolean,maxToasts:{type:Number,default:20},transition:Tv.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Dn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:wR,TOAST:_R,CONTAINER:TR,PROGRESS_BAR:ed,ICON:_v,TRANSITION:Tv,CLOSE_BUTTON:Fs},Ev=c.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?`${Ln}__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 ER(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}Ev.render=ER;var SR=Ev,Sv=c.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?ya(this.component):"button"},classes(){const r=[`${Ln}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),AR=c.createTextVNode(" × ");function bR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[AR]),_:1},16,["aria-label","class"])}Sv.render=bR;var IR=Sv,Av={},kR={"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"},RR=c.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),OR=[RR];function NR(r,e){return c.openBlock(),c.createElementBlock("svg",kR,OR)}Av.render=NR;var PR=Av,bv={},MR={"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"},xR=c.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),DR=[xR];function LR(r,e){return c.openBlock(),c.createElementBlock("svg",MR,DR)}bv.render=LR;var _m=bv,Iv={},BR={"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"},UR=c.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),VR=[UR];function FR(r,e){return c.openBlock(),c.createElementBlock("svg",BR,VR)}Iv.render=FR;var HR=Iv,kv={},$R={"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"},KR=c.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),zR=[KR];function WR(r,e){return c.openBlock(),c.createElementBlock("svg",$R,zR)}kv.render=WR;var qR=kv,Rv=c.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return Zn(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return wc(this.customIcon)?this.trimValue(this.customIcon):Zn(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Zn(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:wv(this.customIcon)?ya(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:_m,[exports.TYPE.INFO]:_m,[exports.TYPE.SUCCESS]:PR,[exports.TYPE.ERROR]:qR,[exports.TYPE.WARNING]:HR}[this.type]},iconClasses(){const r=[`${Ln}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return vv(r)?r.trim():e}}});function GR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Rv.render=GR;var jR=Rv,Ov=c.defineComponent({name:"VtToast",components:{ProgressBar:SR,CloseButton:IR,Icon:jR},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=[`${Ln}__toast`,`${Ln}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Ln}__toast--rtl`),r},bodyClasses(){return[`${Ln}__toast-${wc(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 Cm(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:Zn,getVueComponentFromObj:ya,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:Cu(r),y:wm(r)},this.dragStart=Cu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Cu(r),y:wm(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Cm(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}))}}}),YR=["role"];function JR(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.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?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,YR),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.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"])):c.createCommentVNode("v-if",!0)],38)}Ov.render=JR;var QR=Ov,Nv=c.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:Zn,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 XR(r,e){return c.openBlock(),c.createBlock(c.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:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Nv.render=XR;var ZR=Nv,Pv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:QR,VtTransition:ZR},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),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){Cc(r)&&(r=await r()),pR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=vR(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[`${Ln}__container`,r].concat(this.defaults.containerClassName)}}});function eO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Pv.render=eO;var tO=Pv,Tm=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new _c;e&&c.nextTick(()=>{const s=c.createApp(tO,pv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Ln}] 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,l)=>{const d=Object.assign({},{id:mR(),type:exports.TYPE.DEFAULT},l,{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:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},nO=()=>{const r=()=>console.warn(`[${Ln}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function ha(r){return yR()?CR(r)?Tm({eventBus:r},!1):Tm(r,!0):nO()}var Tc=Symbol("VueToastification"),Md=new _c,rO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=ha(pv({eventBus:Md},e));r.provide(Tc,t)},oO=r=>{const e=ha(r);c.getCurrentInstance()&&c.provide(Tc,e)},Fn=r=>{if(r)return ha(r);const e=c.getCurrentInstance()?c.inject(Tc,void 0):void 0;return e||ha(Md)},iO=rO;const aO={class:"d-flex align-center"},sO={key:1},cO={class:"ms-auto"},Ca=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=va(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const v=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",aO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",sO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",cO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Ds.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),xd=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=va("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ca,{"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"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete ")])),_:1},8,["onClick"])],64))}}),Mv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var lO={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.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),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},xv={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Dv={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},uO={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 c.createVNode("svg",c.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),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},Em={name:"FilterIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},dO={name:"HierarchyIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},hO={name:"LayoutSidebarRightCollapseIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},fO={name:"RefreshIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},gO={name:"TableIcon",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 c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const Lv=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(xv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Dv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),mO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Bv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(xv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Dv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",mO,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Ft.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Ft.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Ec=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),Uv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Ds.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:v})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:v})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(uO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),wu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Vv=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||wu);function i(){t.value=wu}return(s,l)=>(c.openBlock(),c.createBlock(Jp.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(Qp.VImg,{src:n.value,"lazy-src":wu,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),_u="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Fv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||_u);function i(){t.value=_u}return(s,l)=>(c.openBlock(),c.createBlock(Jp.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(Qp.VImg,{src:n.value,"lazy-src":_u,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),pO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.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 c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(Xp.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),pi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Hv=pi(pO,[["__scopeId","data-v-a53b15af"]]),vO={class:"d-inline-flex"},$v=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(Zp.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",vO,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),Kv=6048e5,yO=864e5,Sm=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Sm in r?r[Sm](e):r instanceof Date?new r.constructor(e):new Date(e)}function Hn(r,e){return Wr(e||r,r)}let CO={};function Sc(){return CO}function fa(r,e){var d,f,g,m;const t=Sc(),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??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=Hn(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Zs(r,e){return fa(r,{...e,weekStartsOn:1})}function zv(r,e){const t=Hn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=Zs(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=Zs(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Am(r){const e=Hn(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 wO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function bm(r,e){const t=Hn(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function _O(r,e,t){const[n,i]=wO(t==null?void 0:t.in,r,e),s=bm(n),l=bm(i),d=+s-Am(s),f=+l-Am(l);return Math.round((d-f)/yO)}function TO(r,e){const t=zv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Zs(n)}function EO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function SO(r){return!(!EO(r)&&typeof r!="number"||isNaN(+Hn(r)))}function AO(r,e){const t=Hn(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const bO={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"}},IO=(r,e,t)=>{let n;const i=bO[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 kO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},RO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},NO={date:Sn({formats:kO,defaultWidth:"full"}),time:Sn({formats:RO,defaultWidth:"full"}),dateTime:Sn({formats:OO,defaultWidth:"full"})},PO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},MO=(r,e,t,n)=>PO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const xO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},DO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},LO={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"]},BO={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"]},UO={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"}},VO={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"}},FO=(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"},HO={ordinalNumber:FO,era:Ze({values:xO,defaultWidth:"wide"}),quarter:Ze({values:DO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:LO,defaultWidth:"wide"}),day:Ze({values:BO,defaultWidth:"wide"}),dayPeriod:Ze({values:UO,defaultWidth:"wide",formattingValues:VO,defaultFormattingWidth:"wide"})};function et(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 l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?KO(d,v=>v.test(l)):$O(d,v=>v.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function $O(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function KO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function Ac(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 l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const zO=/^(\d+)(th|st|nd|rd)?/i,WO=/\d+/i,qO={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},GO={any:[/^b/i,/^(a|c)/i]},jO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YO={any:[/1/i,/2/i,/3/i,/4/i]},JO={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},QO={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]},XO={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},ZO={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]},eN={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},tN={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}},nN={ordinalNumber:Ac({matchPattern:zO,parsePattern:WO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:qO,defaultMatchWidth:"wide",parsePatterns:GO,defaultParseWidth:"any"}),quarter:et({matchPatterns:jO,defaultMatchWidth:"wide",parsePatterns:YO,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:JO,defaultMatchWidth:"wide",parsePatterns:QO,defaultParseWidth:"any"}),day:et({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:ZO,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:eN,defaultMatchWidth:"any",parsePatterns:tN,defaultParseWidth:"any"})},Dd={code:"en-US",formatDistance:IO,formatLong:NO,formatRelative:MO,localize:HO,match:nN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function rN(r,e){const t=Hn(r,e==null?void 0:e.in);return _O(t,AO(t))+1}function oN(r,e){const t=Hn(r,e==null?void 0:e.in),n=+Zs(t)-+TO(t);return Math.round(n/Kv)+1}function Wv(r,e){var m,v,C,S;const t=Hn(r,e==null?void 0:e.in),n=t.getFullYear(),i=Sc(),s=(e==null?void 0:e.firstWeekContainsDate)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=fa(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=fa(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function iN(r,e){var d,f,g,m;const t=Sc(),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??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=Wv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),fa(s,e)}function aN(r,e){const t=Hn(r,e==null?void 0:e.in),n=+fa(t,e)-+iN(t,e);return Math.round(n/Kv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Dr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(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 Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Im={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 Dr.y(r,e)},Y:function(r,e,t,n){const i=Wv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=zv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(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 Re(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 Re(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 Dr.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 Re(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=aN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=oN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Dr.d(r,e)},D:function(r,e,t){const n=rN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(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 Re(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 Re(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 Re(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=Ho.noon:n===0?i=Ho.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=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.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 Dr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Dr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Dr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Dr.s(r,e)},S:function(r,e){return Dr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Rm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return Rm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+km(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+km(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function km(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+Re(s,2)}function Rm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Om=(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"})}},qv=(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"})}},sN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Om(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}}",Om(n,e)).replace("{{time}}",qv(i,e))},cN={p:qv,P:sN},lN=/^D+$/,uN=/^Y+$/,dN=["D","DD","YY","YYYY"];function hN(r){return lN.test(r)}function fN(r){return uN.test(r)}function gN(r,e,t){const n=mN(r,e,t);if(console.warn(n),dN.includes(r))throw new RangeError(n)}function mN(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 pN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yN=/^'([^]*?)'?$/,CN=/''/g,wN=/[a-zA-Z]/;function _N(r,e,t){var m,v,C,S,T,I,O,$;const n=Sc(),i=(t==null?void 0:t.locale)??n.locale??Dd,s=(t==null?void 0:t.firstWeekContainsDate)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((I=(T=t==null?void 0:t.locale)==null?void 0:T.options)==null?void 0:I.weekStartsOn)??n.weekStartsOn??(($=(O=n.locale)==null?void 0:O.options)==null?void 0:$.weekStartsOn)??0,d=Hn(r,t==null?void 0:t.in);if(!SO(d))throw new RangeError("Invalid time value");let f=e.match(vN).map(F=>{const H=F[0];if(H==="p"||H==="P"){const z=cN[H];return z(F,i.formatLong)}return F}).join("").match(pN).map(F=>{if(F==="''")return{isToken:!1,value:"'"};const H=F[0];if(H==="'")return{isToken:!1,value:TN(F)};if(Im[H])return{isToken:!0,value:F};if(H.match(wN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");return{isToken:!1,value:F}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(F=>{if(!F.isToken)return F.value;const H=F.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&fN(H)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&hN(H))&&gN(H,e,String(r));const z=Im[H[0]];return z(d,H,i.localize,g)}).join("")}function TN(r){const e=r.match(yN);return e?e[1].replace(CN,"'"):r}const Nm={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"}}},EN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Nm[r].withPreposition:Nm[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},SN={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},AN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},bN={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},IN={date:Sn({formats:SN,defaultWidth:"full"}),time:Sn({formats:AN,defaultWidth:"full"}),dateTime:Sn({formats:bN,defaultWidth:"full"})},kN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},RN=(r,e,t,n)=>kN[r],ON={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},NN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},td={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"]},PN={narrow:td.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:td.wide},MN={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"]},xN={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"}},DN={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"}},LN=r=>Number(r)+".",BN={ordinalNumber:LN,era:Ze({values:ON,defaultWidth:"wide"}),quarter:Ze({values:NN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:td,formattingValues:PN,defaultWidth:"wide"}),day:Ze({values:MN,defaultWidth:"wide"}),dayPeriod:Ze({values:xN,defaultWidth:"wide",formattingValues:DN,defaultFormattingWidth:"wide"})},UN=/^(\d+)(\.)?/i,VN=/\d+/i,FN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},HN={any:[/^v/i,/^n/i]},$N={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},KN={any:[/1/i,/2/i,/3/i,/4/i]},zN={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},WN={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]},qN={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},GN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},jN={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},YN={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}},JN={ordinalNumber:Ac({matchPattern:UN,parsePattern:VN,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:FN,defaultMatchWidth:"wide",parsePatterns:HN,defaultParseWidth:"any"}),quarter:et({matchPatterns:$N,defaultMatchWidth:"wide",parsePatterns:KN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:zN,defaultMatchWidth:"wide",parsePatterns:WN,defaultParseWidth:"any"}),day:et({matchPatterns:qN,defaultMatchWidth:"wide",parsePatterns:GN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:jN,defaultMatchWidth:"wide",parsePatterns:YN,defaultParseWidth:"any"})},QN={code:"de",formatDistance:EN,formatLong:IN,formatRelative:RN,localize:BN,match:JN,options:{weekStartsOn:1,firstWeekContainsDate:4}},XN={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"}},ZN=(r,e,t)=>{let n;const i=XN[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},e0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},t0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},n0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},r0={date:Sn({formats:e0,defaultWidth:"full"}),time:Sn({formats:t0,defaultWidth:"full"}),dateTime:Sn({formats:n0,defaultWidth:"full"})},o0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},i0=(r,e,t,n)=>o0[r],a0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},s0={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"]},c0={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"]},l0={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"]},u0={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"}},d0=(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},h0=["MMM","MMMM"],f0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&h0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:d0,era:Ze({values:a0,defaultWidth:"wide"}),quarter:Ze({values:s0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:c0,defaultWidth:"wide"}),day:Ze({values:l0,defaultWidth:"wide"}),dayPeriod:Ze({values:u0,defaultWidth:"wide"})},g0=/^(\d+)(ième|ère|ème|er|e)?/i,m0=/\d+/i,p0={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},v0={any:[/^av/i,/^ap/i]},y0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},C0={any:[/1/i,/2/i,/3/i,/4/i]},w0={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},_0={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]},T0={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},E0={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]},S0={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},A0={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}},b0={ordinalNumber:Ac({matchPattern:g0,parsePattern:m0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:p0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any"}),quarter:et({matchPatterns:y0,defaultMatchWidth:"wide",parsePatterns:C0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:_0,defaultParseWidth:"any"}),day:et({matchPatterns:T0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:S0,defaultMatchWidth:"any",parsePatterns:A0,defaultParseWidth:"any"})},I0={code:"fr",formatDistance:ZN,formatLong:r0,formatRelative:i0,localize:f0,match:b0,options:{weekStartsOn:1,firstWeekContainsDate:4}},k0={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"}},R0=(r,e,t)=>{let n;const i=k0[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},O0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},N0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},P0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M0={date:Sn({formats:O0,defaultWidth:"full"}),time:Sn({formats:N0,defaultWidth:"full"}),dateTime:Sn({formats:P0,defaultWidth:"full"})},x0={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"},D0=(r,e,t,n)=>{const i=x0[r];return typeof i=="function"?i(e):i},L0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},B0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},U0={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"]},V0={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"]},F0={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"}},H0={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"}},$0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},K0={ordinalNumber:$0,era:Ze({values:L0,defaultWidth:"wide"}),quarter:Ze({values:B0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:U0,defaultWidth:"wide"}),day:Ze({values:V0,defaultWidth:"wide"}),dayPeriod:Ze({values:F0,defaultWidth:"wide",formattingValues:H0,defaultFormattingWidth:"wide"})},z0=/^(\d+)[ºªo]?/i,W0=/\d+/i,q0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},G0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},j0={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Y0={any:[/1/i,/2/i,/3/i,/4/i]},J0={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},Q0={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]},X0={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},Z0={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]},eP={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},tP={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}},nP={ordinalNumber:Ac({matchPattern:z0,parsePattern:W0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:q0,defaultMatchWidth:"wide",parsePatterns:G0,defaultParseWidth:"any"}),quarter:et({matchPatterns:j0,defaultMatchWidth:"wide",parsePatterns:Y0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:Q0,defaultParseWidth:"any"}),day:et({matchPatterns:X0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:eP,defaultMatchWidth:"any",parsePatterns:tP,defaultParseWidth:"any"})},rP={code:"pt-BR",formatDistance:R0,formatLong:M0,formatRelative:D0,localize:K0,match:nP,options:{weekStartsOn:0,firstWeekContainsDate:1}},oP={"en-US":Dd,"pt-BR":rP,"fr-FR":I0,"de-DE":QN};function Gv(r){if(!r)return"";const e=navigator.language,t=oP[e]||Dd;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":_N(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const iP={class:"d-inline-flex"},aP={class:"d-inline-flex"},sP={class:"d-inline-flex"},jv=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const v=n.value.findIndex(S=>S===m);v!==-1?n.value.splice(v,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Xp.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=v=>i.value=v),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(Zp.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"avatar",{item:v})]),"item.active":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"active",{item:v})]),"item.image":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"image",{item:v})]),"item.picture":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"picture",{item:v})]),"item.icon":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"icon",{item:v})]),"item.actions":c.withCtx(({item:v})=>[c.createElementVNode("div",iP,[c.renderSlot(g.$slots,"actions",{item:v})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,v=>({name:`item.${v}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",aP,c.toDisplayString(c.unref(Gv)(C[v])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:v})=>[c.createElementVNode("div",sP,[c.renderSlot(g.$slots,customField,{item:v})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),Yv=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(Sk.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),cP={class:"d-flex align-center"},lP={class:"d-flex align-center justify-end"},uP={class:"d-flex align-center"},dP={class:"d-flex align-center ms-1"},hP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=va("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(v,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Vd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=T=>s.value=T)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",cP,[c.createVNode(c.unref(Em),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(Yv,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=T=>i.value=T)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",lP,[c.renderSlot(v.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",uP,[c.createVNode(ea.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(Em),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(fO),{onClick:C[2]||(C[2]=T=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(xd),{key:0,onRemoveAll:C[3]||(C[3]=T=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(v.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(gO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ea.VSelect,{items:v.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=T=>n.value=T),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(dO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ea.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",dP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(hO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),Jv=pi(hP,[["__scopeId","data-v-8188268e"]]);/*!
|
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.`);l=ji,l._s.has(n)||(pm(n,i,l),process.env.NODE_EN
|
|
17
17
|
* @author RubaXa <trash@rubaxa.org>
|
18
18
|
* @author owenm <owen23355@gmail.com>
|
19
19
|
* @license MIT
|
20
|
-
*/function Pm(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 tr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Pm(Object(t),!0).forEach(function(n){fP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Hs(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hs=function(e){return typeof e}:Hs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hs(r)}function fP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _r(){return _r=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},_r.apply(this,arguments)}function gP(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 mP(r,e){if(r==null)return{};var t=gP(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 pP="1.14.0";function Cr(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Er=Cr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),wa=Cr(/Edge/i),Mm=Cr(/firefox/i),ta=Cr(/safari/i)&&!Cr(/chrome/i)&&!Cr(/android/i),Qv=Cr(/iP(ad|od|hone)/i),vP=Cr(/chrome/i)&&Cr(/android/i),Xv={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Er&&Xv)}function Ce(r,e,t){r.removeEventListener(e,t,!Er&&Xv)}function ec(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 yP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Gn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&ec(r,e):ec(r,e))||n&&r===t)return r;if(r===t)break}while(r=yP(r))}return null}var xm=/\s+/g;function Yt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(xm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(xm," ")}}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 Zv(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 Zn(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,y;if(r!==window&&r.parentNode&&r!==Zn()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,y=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,y=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Er))do if(i&&i.getBoundingClientRect&&(oe(i,"transform")!=="none"||t&&oe(i,"position")!=="static")){var C=i.getBoundingClientRect();l-=C.top+parseInt(oe(i,"border-top-width")),d-=C.left+parseInt(oe(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=si(i||r),T=S&&S.a,I=S&&S.d;S&&(l/=I,d/=T,y/=T,m/=I,f=l+m,g=d+y)}return{top:l,left:d,bottom:f,right:g,width:y,height:m}}}function Dm(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===Zn())break;n=Kr(n,!1)}return!1}function di(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==ie.ghost&&(n||l[s]!==ie.dragged)&&Gn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Ld(r,e){for(var t=r.lastElementChild;t&&(t===ie.ghost||oe(t,"display")==="none"||e&&!ec(t,e));)t=t.previousElementSibling;return t||null}function Tn(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==ie.clone&&(!e||ec(r,e))&&t++;return t}function Lm(r){var e=0,t=0,n=Zn();if(r)do{var i=si(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function CP(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 Zn();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 Zn();if(n||e)return t;n=!0}}while(t=t.parentNode);return Zn()}function wP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Tu(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 na;function ey(r,e){return function(){if(!na){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),na=setTimeout(function(){na=void 0},e)}}}function _P(){clearTimeout(na),na=void 0}function ty(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function ny(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 nn="Sortable"+new Date().getTime();function TP(){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:it(i)});var s=tr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=si(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(CP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,y=it(g),C=g.prevFromRect,S=g.prevToRect,T=d.rect,I=si(g,!0);I&&(y.top-=I.f,y.left-=I.e),g.toRect=y,g.thisAnimationDuration&&Tu(C,y)&&!Tu(m,y)&&(T.top-y.top)/(T.left-y.left)===(m.top-y.top)/(m.left-y.left)&&(f=SP(T,C,S,i.options)),Tu(y,m)||(g.prevFromRect=m,g.prevToRect=y,f||(f=i.options.animation),i.animate(g,T,y,f)),f&&(s=!0,l=Math.max(l,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()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){oe(n,"transition",""),oe(n,"transform","");var d=si(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),y=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!y,oe(n,"transform","translate3d("+m+"px,"+y+"px,0)"),this.forRepaintDummy=EP(n),oe(n,"transition","transform "+l+"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},l)}}}}function EP(r){return r.offsetWidth}function SP(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 $o=[],Eu={initializeByDefault:!0},_a={mount:function(e){for(var t in Eu)Eu.hasOwnProperty(t)&&!(t in e)&&(e[t]=Eu[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](tr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](tr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.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,_r(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&_r(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function AP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,y=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,T=r.extraEventProperties;if(e=e||t&&t[nn],!!e){var I,N=e.options,K="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Er&&!wa?I=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(I=document.createEvent("Event"),I.initEvent(n,!0,!0)),I.to=l||t,I.from=d||t,I.item=i||t,I.clone=s,I.oldIndex=f,I.newIndex=g,I.oldDraggableIndex=m,I.newDraggableIndex=y,I.originalEvent=C,I.pullMode=S?S.lastPutMode:void 0;var F=tr(tr({},T),_a.getEventProperties(n,e));for(var H in F)I[H]=F[H];t&&t.dispatchEvent(I),N[K]&&N[K].call(e,I)}}var bP=["evt"],Bt=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=mP(n,bP);_a.pluginEvent.bind(ie)(e,t,tr({dragEl:V,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:$s,cloneEl:Ge,cloneHidden:Vr,dragStarted:Yi,putSortable:vt,activeSortable:ie.active,originalEvent:i,oldIndex:ri,oldDraggableIndex:ra,newIndex:Jt,newDraggableIndex:Ur,hideGhostForTarget:ay,unhideGhostForTarget:sy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Ot({sortable:t,name:d,originalEvent:i})}},s))};function Ot(r){AP(tr({putSortable:vt,cloneEl:Ge,targetEl:V,rootEl:Fe,oldIndex:ri,oldDraggableIndex:ra,newIndex:Jt,newDraggableIndex:Ur},r))}var V,qe,le,Fe,so,$s,Ge,Vr,ri,Jt,ra,Ur,ws,vt,Jo=!1,tc=!1,nc=[],ro,Nn,Su,Au,Bm,Um,Yi,Ko,oa,ia=!1,_s=!1,Ks,Tt,bu=[],nd=!1,rc=[],bc=typeof document<"u",Ts=Qv,Vm=wa||Er?"cssFloat":"float",IP=bc&&!vP&&!Qv&&"draggable"in document.createElement("div"),ry=function(){if(bc){if(Er)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),oy=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),l=di(e,1,t),d=s&&oe(s),f=l&&oe(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).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 y=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===y)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[Vm]==="none"||l&&n[Vm]==="none"&&g+m>i)?"vertical":"horizontal"},kP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=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+l/2===d+g/2},RP=function(e,t){var n;return nc.some(function(i){var s=i[nn].options.emptyInsertThreshold;if(!(!s||Ld(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},iy=function(e){function t(s,l){return function(d,f,g,m){var y=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||y))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?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||Hs(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},ay=function(){!ry&&le&&oe(le,"display","none")},sy=function(){!ry&&le&&oe(le,"display","")};bc&&document.addEventListener("click",function(r){if(tc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),tc=!1,!1},!0);var oo=function(e){if(V){e=e.touches?e.touches[0]:e;var t=RP(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[nn]._onDragOver(n)}}},OP=function(e){V&&V.parentNode[nn]._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=_r({},e),r[nn]=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 oy(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(l,d){l.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&&!ta,emptyInsertThreshold:5};_a.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);iy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:IP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),nc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_r(this,TP())}ie.prototype={constructor:ie,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=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,m=i.filter;if(UP(n),!V&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ta&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Gn(f,i.draggable,n,!1),!(f&&f.animated)&&$s!==f)){if(ri=Tn(f),ra=Tn(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Ot({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Bt("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(y){if(y=Gn(g,y.trim(),n,!1),y)return Ot({sortable:t,rootEl:y,name:"filter",targetEl:f,fromEl:n,toEl:n}),Bt("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Gn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!V&&n.parentNode===s){var g=it(n);if(Fe=s,V=n,qe=V.parentNode,so=V.nextSibling,$s=n,ws=l.group,ie.dragged=V,ro={target:V,clientX:(t||e).clientX,clientY:(t||e).clientY},Bm=ro.clientX-g.left,Um=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,V.style["will-change"]="all",f=function(){if(Bt("delayEnded",i,{evt:e}),ie.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Mm&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(e,t),Ot({sortable:i,name:"choose",originalEvent:e}),Yt(V,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){Zv(V,m.trim(),Iu)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Mm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Bt("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(wa||Er))){if(ie.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.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(){V&&Iu(V),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?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(V,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?zs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jo=!1,Fe&&V){Bt("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",OP);var n=this.options;!e&&Yt(V,n.dragClass,!1),Yt(V,n.ghostClass,!0),ie.active=this,e&&this._appendGhost(),Ot({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Nn){this._lastX=Nn.clientX,this._lastY=Nn.clientY,ay();for(var e=document.elementFromPoint(Nn.clientX,Nn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Nn.clientX,Nn.clientY),e!==t);)t=e;if(V.parentNode[nn]._isOutsideThisEl(e),t)do{if(t[nn]){var n=void 0;if(n=t[nn]._onDragOver({clientX:Nn.clientX,clientY:Nn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);sy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&si(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Ts&&Tt&&Lm(Tt),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-bu[0]:0)/(d||1),y=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-bu[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){l?(l.e+=m-(Su||0),l.f+=y-(Au||0)):l={a:1,b:0,c:0,d:1,e:m,f:y};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");oe(le,"webkitTransform",C),oe(le,"mozTransform",C),oe(le,"msTransform",C),oe(le,"transform",C),Su=m,Au=y,Nn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(V,!0,Ts,!0,e),n=this.options;if(Ts){for(Tt=e;oe(Tt,"position")==="static"&&oe(Tt,"transform")==="none"&&Tt!==document;)Tt=Tt.parentNode;Tt!==document.body&&Tt!==document.documentElement?(Tt===document&&(Tt=Zn()),t.top+=Tt.scrollTop,t.left+=Tt.scrollLeft):Tt=Zn(),bu=Lm(Tt)}le=V.cloneNode(!0),Yt(le,n.ghostClass,!1),Yt(le,n.fallbackClass,!0),Yt(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",Ts?"absolute":"fixed"),oe(le,"zIndex","100000"),oe(le,"pointerEvents","none"),ie.ghost=le,e.appendChild(le),oe(le,"transform-origin",Bm/parseInt(le.style.width)*100+"% "+Um/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Bt("dragStart",this,{evt:e}),ie.eventCanceled){this._onDrop();return}Bt("setupClone",this),ie.eventCanceled||(Ge=ny(V),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Yt(Ge,this.options.chosenClass,!1),ie.clone=Ge),n.cloneId=zs(function(){Bt("clone",n),!ie.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,V),n._hideClone(),Ot({sortable:n,name:"clone"}))}),!t&&Yt(V,s.dragClass,!0),t?(tc=!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,V)),Ae(document,"drop",n),oe(V,"transform","translateZ(0)")),Jo=!0,n._dragStartId=zs(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Yi=!0,ta&&oe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=ie.active,m=ws===f,y=d.sort,C=vt||g,S,T=this,I=!1;if(nd)return;function N(Qe,Ct){Bt(Qe,T,tr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:y,fromSortable:C,target:n,completed:F,onMove:function($t,Yc){return Es(Fe,t,V,i,$t,it($t),e,Yc)},changed:H},Ct))}function K(){N("dragOverAnimationCapture"),T.captureAnimationState(),T!==C&&C.captureAnimationState()}function F(Qe){return N("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(T),T!==C&&(Yt(V,vt?vt.options.ghostClass:g.options.ghostClass,!1),Yt(V,d.ghostClass,!0)),vt!==T&&T!==ie.active?vt=T:T===ie.active&&vt&&(vt=null),C===T&&(T._ignoreWhileAnimating=n),T.animateAll(function(){N("dragOverAnimationComplete"),T._ignoreWhileAnimating=null}),T!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===V&&!V.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(V.parentNode[nn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),I=!0}function H(){Jt=Tn(V),Ur=Tn(V,d.draggable),Ot({sortable:T,name:"change",toEl:t,newIndex:Jt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Gn(n,d.draggable,t,!0),N("dragOver"),ie.eventCanceled)return I;if(V.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||T._ignoreWhileAnimating===n)return F(!1);if(tc=!1,g&&!d.disabled&&(m?y||(l=qe!==Fe):vt===this||(this.lastPutMode=ws.checkPull(this,g,V,e))&&f.checkPut(this,g,V,e))){if(S=this._getDirection(e,n)==="vertical",i=it(V),N("dragOverValid"),ie.eventCanceled)return I;if(l)return qe=Fe,K(),this._hideClone(),N("revert"),ie.eventCanceled||(so?Fe.insertBefore(V,so):Fe.appendChild(V)),F(!0);var z=Ld(t,d.draggable);if(!z||xP(e,S,this)&&!z.animated){if(z===V)return F(!1);if(z&&t===e.target&&(n=z),n&&(s=it(n)),Es(Fe,t,V,i,n,s,e,!!n)!==!1)return K(),t.appendChild(V),qe=t,H(),F(!0)}else if(z&&MP(e,S,this)){var Q=di(t,0,d,!0);if(Q===V)return F(!1);if(n=Q,s=it(n),Es(Fe,t,V,i,n,s,e,!1)!==!1)return K(),t.insertBefore(V,Q),qe=t,H(),F(!0)}else if(n.parentNode===t){s=it(n);var we=0,W,tt=V.parentNode!==t,Te=!kP(V.animated&&V.toRect||i,n.animated&&n.toRect||s,S),Y=S?"top":"left",G=Dm(n,"top","top")||Dm(V,"top","top"),Ee=G?G.scrollTop:void 0;Ko!==n&&(W=s[Y],ia=!1,_s=!Te&&d.invertSwap||tt),we=DP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,_s,Ko===n);var Ue;if(we!==0){var yt=Tn(V);do yt-=we,Ue=qe.children[yt];while(Ue&&(oe(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return F(!1);Ko=n,oa=we;var Sn=n.nextElementSibling,an=!1;an=we===1;var Pt=Es(Fe,t,V,i,n,s,e,an);if(Pt!==!1)return(Pt===1||Pt===-1)&&(an=Pt===1),nd=!0,setTimeout(PP,30),K(),an&&!Sn?t.appendChild(V):n.parentNode.insertBefore(V,an?Sn:n),G&&ty(G,0,Ee-G.scrollTop),qe=V.parentNode,W!==void 0&&!_s&&(Ks=Math.abs(W-it(n)[Y])),H(),F(!0)}if(t.contains(V))return F(!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(Jt=Tn(V),Ur=Tn(V,n.draggable),Bt("drop",this,{evt:e}),qe=V&&V.parentNode,Jt=Tn(V),Ur=Tn(V,n.draggable),ie.eventCanceled){this._nulling();return}Jo=!1,_s=!1,ia=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),rd(this.cloneId),rd(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ta&&oe(document.body,"user-select",""),oe(V,"transform",""),e&&(Yi&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),V&&(this.nativeDraggable&&Ce(V,"dragend",this),Iu(V),V.style["will-change"]="",Yi&&!Jo&&Yt(V,vt?vt.options.ghostClass:this.options.ghostClass,!1),Yt(V,this.options.chosenClass,!1),Ot({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Jt>=0&&(Ot({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Ot({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Ot({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Jt!==ri&&Jt>=0&&(Ot({sortable:this,name:"update",toEl:qe,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:qe,originalEvent:e})),ie.active&&((Jt==null||Jt===-1)&&(Jt=ri,Ur=ra),Ot({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Bt("nulling",this),Fe=V=qe=le=so=Ge=$s=Vr=ro=Nn=Yi=Jt=Ur=ri=ra=Ko=oa=vt=ws=ie.dragged=ie.ghost=ie.clone=ie.active=null,rc.forEach(function(e){e.checked=!0}),rc.length=Su=Au=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":V&&(this._onDragOver(e),NP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],Gn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||BP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];Gn(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 Gn(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=_a.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&iy(n)},destroy:function(){Bt("destroy",this);var e=this.el;e[nn]=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(),nc.splice(nc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Bt("hideClone",this),ie.eventCanceled)return;oe(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Bt("showClone",this),ie.eventCanceled)return;V.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,V):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(V,Ge),oe(Ge,"display",""),Vr=!1}}};function NP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Es(r,e,t,n,i,s,l,d){var f,g=r[nn],m=g.options.onMove,y;return window.CustomEvent&&!Er&&!wa?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||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(y=m.call(g,f,l)),y}function Iu(r){r.draggable=!1}function PP(){nd=!1}function MP(r,e,t){var n=it(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 xP(r,e,t){var n=it(Ld(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 DP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,y=n?t.bottom:t.right,C=!1;if(!l){if(d&&Ks<g*i){if(!ia&&(oa===1?f>m+g*s/2:f<y-g*s/2)&&(ia=!0),ia)C=!0;else if(oa===1?f<m+Ks:f>y-Ks)return-oa}else if(f>m+g*(1-i)/2&&f<y-g*(1-i)/2)return LP(e)}return C=C||l,C&&(f<m+g*s/2||f>y-g*s/2)?f>m+g/2?1:-1:0}function LP(r){return Tn(V)<Tn(r)?1:-1}function BP(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 UP(r){rc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&rc.push(n)}}function zs(r){return setTimeout(r,0)}function rd(r){return clearTimeout(r)}bc&&Ae(document,"touchmove",function(r){(ie.active||Jo)&&r.cancelable&&r.preventDefault()});ie.utils={on:Ae,off:Ce,css:oe,find:Zv,is:function(e,t){return!!Gn(e,t,e,!1)},extend:wP,throttle:ey,closest:Gn,toggleClass:Yt,clone:ny,index:Tn,nextTick:zs,cancelNextTick:rd,detectDirection:oy,getChild:di};ie.get=function(r){return r[nn]};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=tr(tr({},ie.utils),n.utils)),_a.mount(n)})};ie.create=function(r,e){return new ie(r,e)};ie.version=pP;var Xe=[],Ji,od,id=!1,ku,Ru,oc,Qi;function VP(){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?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(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)),Fm(),Ws(),_P()},nulling:function(){oc=od=Ji=id=Qi=ku=Ru=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(oc=t,n||this.options.forceAutoScrollFallback||wa||Er||ta){Ou(t,this.options,d,n);var f=Kr(d,!0);id&&(!Qi||s!==ku||l!==Ru)&&(Qi&&Fm(),Qi=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,Ws()),Ou(t,i.options,g,n)},10),ku=s,Ru=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===Zn()){Ws();return}Ou(t,this.options,Kr(d,!1),!1)}}},_r(r,{pluginName:"scroll",initializeByDefault:!0})}function Ws(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Fm(){clearInterval(Qi)}var Ou=ey(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,l=e.scrollSensitivity,d=e.scrollSpeed,f=Zn(),g=!1,m;od!==t&&(od=t,Ws(),Ji=e.scroll,m=e.scrollFn,Ji===!0&&(Ji=Kr(t,!0)));var y=0,C=Ji;do{var S=C,T=it(S),I=T.top,N=T.bottom,K=T.left,F=T.right,H=T.width,z=T.height,Q=void 0,we=void 0,W=S.scrollWidth,tt=S.scrollHeight,Te=oe(S),Y=S.scrollLeft,G=S.scrollTop;S===f?(Q=H<W&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=z<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(Q=H<W&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=z<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=Q&&(Math.abs(F-i)<=l&&Y+H<W)-(Math.abs(K-i)<=l&&!!Y),Ue=we&&(Math.abs(N-s)<=l&&G+z<tt)-(Math.abs(I-s)<=l&&!!G);if(!Xe[y])for(var yt=0;yt<=y;yt++)Xe[yt]||(Xe[yt]={});(Xe[y].vx!=Ee||Xe[y].vy!=Ue||Xe[y].el!==S)&&(Xe[y].el=S,Xe[y].vx=Ee,Xe[y].vy=Ue,clearInterval(Xe[y].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[y].pid=setInterval((function(){n&&this.layer===0&&ie.active._onTouchMove(oc);var Sn=Xe[this.layer].vy?Xe[this.layer].vy*d:0,an=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(ie.dragged.parentNode[nn],an,Sn,r,oc,Xe[this.layer].el)!=="continue"||ty(Xe[this.layer].el,an,Sn)}).bind({layer:y}),24))),y++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));id=g}},30),cy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,y=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(y)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Bd(){}Bd.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:cy};_r(Bd,{pluginName:"revertOnSpill"});function Ud(){}Ud.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:cy};_r(Ud,{pluginName:"removeOnSpill"});ie.mount(new VP);ie.mount(Ud,Bd);function FP(){return typeof window<"u"?window.console:global.console}const HP=FP();function $P(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const KP=/-(\w)/g,Hm=$P(r=>r.replace(KP,(e,t)=>t?t.toUpperCase():""));function Nu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function $m(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function zP(r,e){return Object.values(r).indexOf(e)}function WP(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 ly(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function qP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),ly.call(this,r,e)}}function GP(r){return["transition-group","TransitionGroup"].includes(r)}function jP(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?GP(e.name):!1}function YP(r,e){return e?{...e.props,...e.attrs}:r}const ad=["Start","Add","Remove","Update","End"],sd=["Choose","Unchoose","Sort","Filter","Clone"],JP=["Move",...ad,...sd].map(r=>"on"+r);let Pu=null;const QP={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}},XP=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...ad.map(r=>r.toLowerCase()),...sd.map(r=>r.toLowerCase())],props:QP,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=YP(this.$attrs,this.componentData);return r?(this.transitionMode=jP(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&HP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};ad.forEach(i=>{r["on"+i]=qP.call(this,i)}),sd.forEach(i=>{r["on"+i]=ly.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Hm(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?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Hm(e);JP.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=WP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=zP(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),Pu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Nu(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($m(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Nu(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){Nu(r.item),$m(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 l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Pu=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(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Pu)!==-1||!e.willInsertAfter?i:i+1}}}),ZP={class:"d-flex flex-row align-center"},Vd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(Ca,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(Yv,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Ut.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(XP),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Ut.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",ZP,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Ut.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Ak.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Ut.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+" ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Qs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),e1=["src","height","width"],t1={key:0,class:"text-center text-h6"},n1={key:1,class:"text-center text-h5"},r1={key:0,class:"text-center"},o1={class:"d-flex justify-center align-center mt-4 ga-3"},Fd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,e1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",t1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",n1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",r1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",o1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(bk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),i1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},view:{},itemKey:{}},setup(r){return(e,t)=>e.view==="card"?(c.openBlock(),c.createBlock(_e.VRow,{key:0,class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Fd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3})):c.createCommentVNode("",!0)}}),uy=pi(i1,[["__scopeId","data-v-22d1c8f9"]]),a1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},dy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",a1,c.toDisplayString(e.value),1))}}),s1={key:0,class:"mb-2 ms-1"},hy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",s1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Vt.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":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),c1={class:"text-faded mt-7"},l1={class:"d-flex align-baseline mb-1"},u1={class:"me-1"},d1={class:"max-w-_form-metadataJ"},h1={key:0,class:"mb-1"},f1={key:1,class:"mb-1"},g1={class:"mb-1"},Ic=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",c1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",l1,[c.createElementVNode("b",u1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",d1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(yc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",h1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",f1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",g1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),m1={key:0,class:"mb-2 ms-1"},fy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.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""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",m1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Vt.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],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))}}),p1={key:0,class:"mb-2 ms-1"},v1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},gy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",p1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ik.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",v1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),my=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),py=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),y1={class:"mt-4"},vy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ec,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",y1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Ic,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(my,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(py,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),C1={class:"d-flex align-items-center"},w1={key:0,class:"d-flex align-center"},_1={class:"ms-1"},T1={class:"d-flex"},E1={class:"d-flex mb-1 align-center"},S1={class:"min-w-100 relative"},yy=c.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=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,y)=>(c.openBlock(),c.createElementBlock("div",C1,[m.id?(c.openBlock(),c.createElementBlock("div",w1,[y[0]||(y[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",_1,c.toDisplayString(m.id),1),c.createVNode(yc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",T1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(lO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Qs.VIcon,{class:"me-2"},{default:c.withCtx(()=>y[1]||(y[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",E1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",S1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>y[2]||(y[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Qs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>y[3]||(y[3]=[c.createTextVNode("mdi-close")])),_:1}),y[4]||(y[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),A1={class:"d-flex flex-column"},b1={class:"height d-flex flex-column"},I1={class:"d-flex justify-between align-end"},k1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Ec,null,{default:c.withCtx(()=>[c.createElementVNode("div",A1,[c.createElementVNode("div",b1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",I1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Ic,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(my,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(py,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Cy=pi(k1,[["__scopeId","data-v-489d31c3"]]);/**
|
20
|
+
*/function Pm(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 nr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Pm(Object(t),!0).forEach(function(n){fP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Pm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Hs(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hs=function(e){return typeof e}:Hs=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hs(r)}function fP(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 gP(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 mP(r,e){if(r==null)return{};var t=gP(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 pP="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),wa=_r(/Edge/i),Mm=_r(/firefox/i),ta=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),Qv=_r(/iP(ad|od|hone)/i),vP=_r(/chrome/i)&&_r(/android/i),Xv={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Ar&&Xv)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&Xv)}function ec(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 yP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function jn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&ec(r,e):ec(r,e))||n&&r===t)return r;if(r===t)break}while(r=yP(r))}return null}var xm=/\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(xm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(xm," ")}}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 Zv(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 er(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,v;if(r!==window&&r.parentNode&&r!==er()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,v=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=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();l-=C.top+parseInt(oe(i,"border-top-width")),d-=C.left+parseInt(oe(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=si(i||r),T=S&&S.a,I=S&&S.d;S&&(l/=I,d/=T,v/=T,m/=I,f=l+m,g=d+v)}return{top:l,left:d,bottom:f,right:g,width:v,height:m}}}function Dm(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===er())break;n=Kr(n,!1)}return!1}function di(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==ie.ghost&&(n||l[s]!==ie.dragged)&&jn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Ld(r,e){for(var t=r.lastElementChild;t&&(t===ie.ghost||oe(t,"display")==="none"||e&&!ec(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||ec(r,e))&&t++;return t}function Lm(r){var e=0,t=0,n=er();if(r)do{var i=si(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function CP(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 er();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 er();if(n||e)return t;n=!0}}while(t=t.parentNode);return er()}function wP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Tu(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 na;function ey(r,e){return function(){if(!na){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),na=setTimeout(function(){na=void 0},e)}}}function _P(){clearTimeout(na),na=void 0}function ty(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function ny(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 TP(){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:it(i)});var s=nr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=si(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(CP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,v=it(g),C=g.prevFromRect,S=g.prevToRect,T=d.rect,I=si(g,!0);I&&(v.top-=I.f,v.left-=I.e),g.toRect=v,g.thisAnimationDuration&&Tu(C,v)&&!Tu(m,v)&&(T.top-v.top)/(T.left-v.left)===(m.top-v.top)/(m.left-v.left)&&(f=SP(T,C,S,i.options)),Tu(v,m)||(g.prevFromRect=m,g.prevToRect=v,f||(f=i.options.animation),i.animate(g,T,v,f)),f&&(s=!0,l=Math.max(l,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()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){oe(n,"transition",""),oe(n,"transform","");var d=si(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),v=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!v,oe(n,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=EP(n),oe(n,"transition","transform "+l+"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},l)}}}}function EP(r){return r.offsetWidth}function SP(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 $o=[],Eu={initializeByDefault:!0},_a={mount:function(e){for(var t in Eu)Eu.hasOwnProperty(t)&&!(t in e)&&(e[t]=Eu[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](nr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](nr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.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 l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.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 $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function AP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,v=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,T=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var I,O=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!wa?I=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(I=document.createEvent("Event"),I.initEvent(n,!0,!0)),I.to=l||t,I.from=d||t,I.item=i||t,I.clone=s,I.oldIndex=f,I.newIndex=g,I.oldDraggableIndex=m,I.newDraggableIndex=v,I.originalEvent=C,I.pullMode=S?S.lastPutMode:void 0;var F=nr(nr({},T),_a.getEventProperties(n,e));for(var H in F)I[H]=F[H];t&&t.dispatchEvent(I),O[$]&&O[$].call(e,I)}}var bP=["evt"],Ut=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=mP(n,bP);_a.pluginEvent.bind(ie)(e,t,nr({dragEl:V,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:$s,cloneEl:Ge,cloneHidden:Vr,dragStarted:Yi,putSortable:vt,activeSortable:ie.active,originalEvent:i,oldIndex:ri,oldDraggableIndex:ra,newIndex:Qt,newDraggableIndex:Ur,hideGhostForTarget:ay,unhideGhostForTarget:sy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Ot({sortable:t,name:d,originalEvent:i})}},s))};function Ot(r){AP(nr({putSortable:vt,cloneEl:Ge,targetEl:V,rootEl:Fe,oldIndex:ri,oldDraggableIndex:ra,newIndex:Qt,newDraggableIndex:Ur},r))}var V,qe,le,Fe,so,$s,Ge,Vr,ri,Qt,ra,Ur,ws,vt,Jo=!1,tc=!1,nc=[],ro,Pn,Su,Au,Bm,Um,Yi,Ko,oa,ia=!1,_s=!1,Ks,Tt,bu=[],nd=!1,rc=[],bc=typeof document<"u",Ts=Qv,Vm=wa||Ar?"cssFloat":"float",IP=bc&&!vP&&!Qv&&"draggable"in document.createElement("div"),ry=function(){if(bc){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),oy=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),l=di(e,1,t),d=s&&oe(s),f=l&&oe(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).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 v=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===v)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[Vm]==="none"||l&&n[Vm]==="none"&&g+m>i)?"vertical":"horizontal"},kP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=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+l/2===d+g/2},RP=function(e,t){var n;return nc.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Ld(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},iy=function(e){function t(s,l){return function(d,f,g,m){var v=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||v))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?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||Hs(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},ay=function(){!ry&&le&&oe(le,"display","none")},sy=function(){!ry&&le&&oe(le,"display","")};bc&&document.addEventListener("click",function(r){if(tc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),tc=!1,!1},!0);var oo=function(e){if(V){e=e.touches?e.touches[0]:e;var t=RP(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)}}},OP=function(e){V&&V.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 oy(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(l,d){l.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&&!ta,emptyInsertThreshold:5};_a.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);iy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:IP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),nc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,TP())}ie.prototype={constructor:ie,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,V):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=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,m=i.filter;if(UP(n),!V&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&ta&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=jn(f,i.draggable,n,!1),!(f&&f.animated)&&$s!==f)){if(ri=En(f),ra=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Ot({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Ut("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=jn(g,v.trim(),n,!1),v)return Ot({sortable:t,rootEl:v,name:"filter",targetEl:f,fromEl:n,toEl:n}),Ut("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!jn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!V&&n.parentNode===s){var g=it(n);if(Fe=s,V=n,qe=V.parentNode,so=V.nextSibling,$s=n,ws=l.group,ie.dragged=V,ro={target:V,clientX:(t||e).clientX,clientY:(t||e).clientY},Bm=ro.clientX-g.left,Um=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,V.style["will-change"]="all",f=function(){if(Ut("delayEnded",i,{evt:e}),ie.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Mm&&i.nativeDraggable&&(V.draggable=!0),i._triggerDragStart(e,t),Ot({sortable:i,name:"choose",originalEvent:e}),Jt(V,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){Zv(V,m.trim(),Iu)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Mm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,V.draggable=!0),Ut("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(wa||Ar))){if(ie.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.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(){V&&Iu(V),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?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(V,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?zs(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jo=!1,Fe&&V){Ut("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",OP);var n=this.options;!e&&Jt(V,n.dragClass,!1),Jt(V,n.ghostClass,!0),ie.active=this,e&&this._appendGhost(),Ot({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,ay();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(V.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);sy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&si(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Ts&&Tt&&Lm(Tt),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-bu[0]:0)/(d||1),v=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-bu[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){l?(l.e+=m-(Su||0),l.f+=v-(Au||0)):l={a:1,b:0,c:0,d:1,e:m,f:v};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");oe(le,"webkitTransform",C),oe(le,"mozTransform",C),oe(le,"msTransform",C),oe(le,"transform",C),Su=m,Au=v,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(V,!0,Ts,!0,e),n=this.options;if(Ts){for(Tt=e;oe(Tt,"position")==="static"&&oe(Tt,"transform")==="none"&&Tt!==document;)Tt=Tt.parentNode;Tt!==document.body&&Tt!==document.documentElement?(Tt===document&&(Tt=er()),t.top+=Tt.scrollTop,t.left+=Tt.scrollLeft):Tt=er(),bu=Lm(Tt)}le=V.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",Ts?"absolute":"fixed"),oe(le,"zIndex","100000"),oe(le,"pointerEvents","none"),ie.ghost=le,e.appendChild(le),oe(le,"transform-origin",Bm/parseInt(le.style.width)*100+"% "+Um/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Ut("dragStart",this,{evt:e}),ie.eventCanceled){this._onDrop();return}Ut("setupClone",this),ie.eventCanceled||(Ge=ny(V),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Jt(Ge,this.options.chosenClass,!1),ie.clone=Ge),n.cloneId=zs(function(){Ut("clone",n),!ie.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,V),n._hideClone(),Ot({sortable:n,name:"clone"}))}),!t&&Jt(V,s.dragClass,!0),t?(tc=!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,V)),Ae(document,"drop",n),oe(V,"transform","translateZ(0)")),Jo=!0,n._dragStartId=zs(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Yi=!0,ta&&oe(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=ie.active,m=ws===f,v=d.sort,C=vt||g,S,T=this,I=!1;if(nd)return;function O(Qe,Ct){Ut(Qe,T,nr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:v,fromSortable:C,target:n,completed:F,onMove:function(Kt,Yc){return Es(Fe,t,V,i,Kt,it(Kt),e,Yc)},changed:H},Ct))}function $(){O("dragOverAnimationCapture"),T.captureAnimationState(),T!==C&&C.captureAnimationState()}function F(Qe){return O("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(T),T!==C&&(Jt(V,vt?vt.options.ghostClass:g.options.ghostClass,!1),Jt(V,d.ghostClass,!0)),vt!==T&&T!==ie.active?vt=T:T===ie.active&&vt&&(vt=null),C===T&&(T._ignoreWhileAnimating=n),T.animateAll(function(){O("dragOverAnimationComplete"),T._ignoreWhileAnimating=null}),T!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===V&&!V.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(V.parentNode[rn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),I=!0}function H(){Qt=En(V),Ur=En(V,d.draggable),Ot({sortable:T,name:"change",toEl:t,newIndex:Qt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=jn(n,d.draggable,t,!0),O("dragOver"),ie.eventCanceled)return I;if(V.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||T._ignoreWhileAnimating===n)return F(!1);if(tc=!1,g&&!d.disabled&&(m?v||(l=qe!==Fe):vt===this||(this.lastPutMode=ws.checkPull(this,g,V,e))&&f.checkPut(this,g,V,e))){if(S=this._getDirection(e,n)==="vertical",i=it(V),O("dragOverValid"),ie.eventCanceled)return I;if(l)return qe=Fe,$(),this._hideClone(),O("revert"),ie.eventCanceled||(so?Fe.insertBefore(V,so):Fe.appendChild(V)),F(!0);var z=Ld(t,d.draggable);if(!z||xP(e,S,this)&&!z.animated){if(z===V)return F(!1);if(z&&t===e.target&&(n=z),n&&(s=it(n)),Es(Fe,t,V,i,n,s,e,!!n)!==!1)return $(),t.appendChild(V),qe=t,H(),F(!0)}else if(z&&MP(e,S,this)){var Q=di(t,0,d,!0);if(Q===V)return F(!1);if(n=Q,s=it(n),Es(Fe,t,V,i,n,s,e,!1)!==!1)return $(),t.insertBefore(V,Q),qe=t,H(),F(!0)}else if(n.parentNode===t){s=it(n);var we=0,W,tt=V.parentNode!==t,Te=!kP(V.animated&&V.toRect||i,n.animated&&n.toRect||s,S),Y=S?"top":"left",G=Dm(n,"top","top")||Dm(V,"top","top"),Ee=G?G.scrollTop:void 0;Ko!==n&&(W=s[Y],ia=!1,_s=!Te&&d.invertSwap||tt),we=DP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,_s,Ko===n);var Ue;if(we!==0){var yt=En(V);do yt-=we,Ue=qe.children[yt];while(Ue&&(oe(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return F(!1);Ko=n,oa=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Mt=Es(Fe,t,V,i,n,s,e,sn);if(Mt!==!1)return(Mt===1||Mt===-1)&&(sn=Mt===1),nd=!0,setTimeout(PP,30),$(),sn&&!An?t.appendChild(V):n.parentNode.insertBefore(V,sn?An:n),G&&ty(G,0,Ee-G.scrollTop),qe=V.parentNode,W!==void 0&&!_s&&(Ks=Math.abs(W-it(n)[Y])),H(),F(!0)}if(t.contains(V))return F(!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(Qt=En(V),Ur=En(V,n.draggable),Ut("drop",this,{evt:e}),qe=V&&V.parentNode,Qt=En(V),Ur=En(V,n.draggable),ie.eventCanceled){this._nulling();return}Jo=!1,_s=!1,ia=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),rd(this.cloneId),rd(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ta&&oe(document.body,"user-select",""),oe(V,"transform",""),e&&(Yi&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),V&&(this.nativeDraggable&&Ce(V,"dragend",this),Iu(V),V.style["will-change"]="",Yi&&!Jo&&Jt(V,vt?vt.options.ghostClass:this.options.ghostClass,!1),Jt(V,this.options.chosenClass,!1),Ot({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Qt>=0&&(Ot({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Ot({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Ot({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Qt!==ri&&Qt>=0&&(Ot({sortable:this,name:"update",toEl:qe,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:qe,originalEvent:e})),ie.active&&((Qt==null||Qt===-1)&&(Qt=ri,Ur=ra),Ot({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ut("nulling",this),Fe=V=qe=le=so=Ge=$s=Vr=ro=Pn=Yi=Qt=Ur=ri=ra=Ko=oa=vt=ws=ie.dragged=ie.ghost=ie.clone=ie.active=null,rc.forEach(function(e){e.checked=!0}),rc.length=Su=Au=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":V&&(this._onDragOver(e),NP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],jn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||BP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];jn(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 jn(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=_a.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&iy(n)},destroy:function(){Ut("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(),nc.splice(nc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Ut("hideClone",this),ie.eventCanceled)return;oe(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Ut("showClone",this),ie.eventCanceled)return;V.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,V):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(V,Ge),oe(Ge,"display",""),Vr=!1}}};function NP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Es(r,e,t,n,i,s,l,d){var f,g=r[rn],m=g.options.onMove,v;return window.CustomEvent&&!Ar&&!wa?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||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(v=m.call(g,f,l)),v}function Iu(r){r.draggable=!1}function PP(){nd=!1}function MP(r,e,t){var n=it(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 xP(r,e,t){var n=it(Ld(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 DP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,v=n?t.bottom:t.right,C=!1;if(!l){if(d&&Ks<g*i){if(!ia&&(oa===1?f>m+g*s/2:f<v-g*s/2)&&(ia=!0),ia)C=!0;else if(oa===1?f<m+Ks:f>v-Ks)return-oa}else if(f>m+g*(1-i)/2&&f<v-g*(1-i)/2)return LP(e)}return C=C||l,C&&(f<m+g*s/2||f>v-g*s/2)?f>m+g/2?1:-1:0}function LP(r){return En(V)<En(r)?1:-1}function BP(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 UP(r){rc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&rc.push(n)}}function zs(r){return setTimeout(r,0)}function rd(r){return clearTimeout(r)}bc&&Ae(document,"touchmove",function(r){(ie.active||Jo)&&r.cancelable&&r.preventDefault()});ie.utils={on:Ae,off:Ce,css:oe,find:Zv,is:function(e,t){return!!jn(e,t,e,!1)},extend:wP,throttle:ey,closest:jn,toggleClass:Jt,clone:ny,index:En,nextTick:zs,cancelNextTick:rd,detectDirection:oy,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=nr(nr({},ie.utils),n.utils)),_a.mount(n)})};ie.create=function(r,e){return new ie(r,e)};ie.version=pP;var Xe=[],Ji,od,id=!1,ku,Ru,oc,Qi;function VP(){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?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(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)),Fm(),Ws(),_P()},nulling:function(){oc=od=Ji=id=Qi=ku=Ru=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(oc=t,n||this.options.forceAutoScrollFallback||wa||Ar||ta){Ou(t,this.options,d,n);var f=Kr(d,!0);id&&(!Qi||s!==ku||l!==Ru)&&(Qi&&Fm(),Qi=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,Ws()),Ou(t,i.options,g,n)},10),ku=s,Ru=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===er()){Ws();return}Ou(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function Ws(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Fm(){clearInterval(Qi)}var Ou=ey(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,l=e.scrollSensitivity,d=e.scrollSpeed,f=er(),g=!1,m;od!==t&&(od=t,Ws(),Ji=e.scroll,m=e.scrollFn,Ji===!0&&(Ji=Kr(t,!0)));var v=0,C=Ji;do{var S=C,T=it(S),I=T.top,O=T.bottom,$=T.left,F=T.right,H=T.width,z=T.height,Q=void 0,we=void 0,W=S.scrollWidth,tt=S.scrollHeight,Te=oe(S),Y=S.scrollLeft,G=S.scrollTop;S===f?(Q=H<W&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=z<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(Q=H<W&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=z<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=Q&&(Math.abs(F-i)<=l&&Y+H<W)-(Math.abs($-i)<=l&&!!Y),Ue=we&&(Math.abs(O-s)<=l&&G+z<tt)-(Math.abs(I-s)<=l&&!!G);if(!Xe[v])for(var yt=0;yt<=v;yt++)Xe[yt]||(Xe[yt]={});(Xe[v].vx!=Ee||Xe[v].vy!=Ue||Xe[v].el!==S)&&(Xe[v].el=S,Xe[v].vx=Ee,Xe[v].vy=Ue,clearInterval(Xe[v].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[v].pid=setInterval((function(){n&&this.layer===0&&ie.active._onTouchMove(oc);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,sn=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(ie.dragged.parentNode[rn],sn,An,r,oc,Xe[this.layer].el)!=="continue"||ty(Xe[this.layer].el,sn,An)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));id=g}},30),cy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(v)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Bd(){}Bd.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:cy};Er(Bd,{pluginName:"revertOnSpill"});function Ud(){}Ud.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:cy};Er(Ud,{pluginName:"removeOnSpill"});ie.mount(new VP);ie.mount(Ud,Bd);function FP(){return typeof window<"u"?window.console:global.console}const HP=FP();function $P(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const KP=/-(\w)/g,Hm=$P(r=>r.replace(KP,(e,t)=>t?t.toUpperCase():""));function Nu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function $m(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function zP(r,e){return Object.values(r).indexOf(e)}function WP(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 ly(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function qP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),ly.call(this,r,e)}}function GP(r){return["transition-group","TransitionGroup"].includes(r)}function jP(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?GP(e.name):!1}function YP(r,e){return e?{...e.props,...e.attrs}:r}const ad=["Start","Add","Remove","Update","End"],sd=["Choose","Unchoose","Sort","Filter","Clone"],JP=["Move",...ad,...sd].map(r=>"on"+r);let Pu=null;const QP={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}},XP=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...ad.map(r=>r.toLowerCase()),...sd.map(r=>r.toLowerCase())],props:QP,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=YP(this.$attrs,this.componentData);return r?(this.transitionMode=jP(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&HP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};ad.forEach(i=>{r["on"+i]=qP.call(this,i)}),sd.forEach(i=>{r["on"+i]=ly.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[Hm(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?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=Hm(e);JP.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=WP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=zP(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),Pu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Nu(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($m(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Nu(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){Nu(r.item),$m(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 l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Pu=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(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Pu)!==-1||!e.willInsertAfter?i:i+1}}}),ZP={class:"d-flex flex-row align-center"},Vd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(Ca,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(Yv,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(XP),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Vt.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",ZP,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Vt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Ak.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+" ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Qs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),e1=["src","height","width"],t1={key:0,class:"text-center text-h6"},n1={key:1,class:"text-center text-h5"},r1={key:0,class:"text-center"},o1={class:"d-flex justify-center align-center mt-4 ga-3"},Fd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,e1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",t1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",n1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",r1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",o1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(bk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),i1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},view:{},itemKey:{}},setup(r){return(e,t)=>e.view==="card"?(c.openBlock(),c.createBlock(_e.VRow,{key:0,class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Fd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3})):c.createCommentVNode("",!0)}}),uy=pi(i1,[["__scopeId","data-v-22d1c8f9"]]),a1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},dy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",a1,c.toDisplayString(e.value),1))}}),s1={key:0,class:"mb-2 ms-1"},hy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",s1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Ft.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":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),c1={class:"text-faded mt-7"},l1={class:"d-flex align-baseline mb-1"},u1={class:"me-1"},d1={class:"max-w-_form-metadataJ"},h1={key:0,class:"mb-1"},f1={key:1,class:"mb-1"},g1={class:"mb-1"},Ic=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",c1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",l1,[c.createElementVNode("b",u1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",d1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(yc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",h1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",f1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",g1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),m1={key:0,class:"mb-2 ms-1"},fy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.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""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",m1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(dy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Ft.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],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))}}),p1={key:0,class:"mb-2 ms-1"},v1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},gy=c.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=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",p1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(la.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ik.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",v1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),my=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),py=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),y1={class:"mt-4"},vy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ec,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",y1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Ic,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(my,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(py,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),C1={class:"d-flex align-items-center"},w1={key:0,class:"d-flex align-center"},_1={class:"ms-1"},T1={class:"d-flex"},E1={class:"d-flex mb-1 align-center"},S1={class:"min-w-100 relative"},yy=c.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=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,v)=>(c.openBlock(),c.createElementBlock("div",C1,[m.id?(c.openBlock(),c.createElementBlock("div",w1,[v[0]||(v[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",_1,c.toDisplayString(m.id),1),c.createVNode(yc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",T1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(lO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Qs.VIcon,{class:"me-2"},{default:c.withCtx(()=>v[1]||(v[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",E1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",S1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>v[2]||(v[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Qs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>v[3]||(v[3]=[c.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),A1={class:"d-flex flex-column"},b1={class:"height d-flex flex-column"},I1={class:"d-flex justify-between align-end"},k1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Ec,null,{default:c.withCtx(()=>[c.createElementVNode("div",A1,[c.createElementVNode("div",b1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",I1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Ic,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(my,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(py,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Cy=pi(k1,[["__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.
|
@@ -27,7 +27,7 @@ This will fail in production.`);l=ji,l._s.has(n)||(pm(n,i,l),process.env.NODE_EN
|
|
27
27
|
*
|
28
28
|
* This source code is licensed under the MIT license.
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
30
|
-
*/const kc=(r,e,t,n)=>({color:i="currentColor",size:s=24,stroke:l=2,title:d,class:f,...g},{attrs:m,slots:
|
30
|
+
*/const kc=(r,e,t,n)=>({color:i="currentColor",size:s=24,stroke:l=2,title:d,class:f,...g},{attrs:m,slots:v})=>{let C=[...n.map(S=>c.h(...S)),...v.default?[v.default()]:[]];return d&&(C=[c.h("title",d),...C]),c.h("svg",{...Km[r],width:s,height:s,...m,class:["tabler-icon",`tabler-icon-${e}`],...r==="filled"?{fill:i}:{"stroke-width":l??Km[r]["stroke-width"],stroke:i},...g},C)};/**
|
31
31
|
* @license @tabler/icons-vue v3.22.0 - MIT
|
32
32
|
*
|
33
33
|
* This source code is licensed under the MIT license.
|
@@ -47,34 +47,34 @@ This will fail in production.`);l=ji,l._s.has(n)||(pm(n,i,l),process.env.NODE_EN
|
|
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 P1=kc("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"},Ss={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},vi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],zm=[...vi,P.EMAIL_SCOPE],Nt={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"},ct={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"},As={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},dt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Wm={PLAIN:"plain",S256:"S256"},Ta={QUERY:"query",FRAGMENT:"fragment"},M1={...Ta,FORM_POST:"form_post"},wy={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"},bs={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},At={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},re={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Hd="appmetadata",x1="client_info",aa="1",ic={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Qt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},pt={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"},Oe={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},sa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},qm={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Gm={username:"username",password:"password"},Is={httpSuccess:200,httpBadRequest:400},zo={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Mu={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Lr={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},D1={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},L1=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const $d="unexpected_error",B1="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const jm={[$d]:"Unexpected error in authentication.",[B1]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class He extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,He.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 _y(r,e){return new He(r,e?`${jm[r]} ${e}`:jm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Kd="client_info_decoding_error",Ty="client_info_empty_error",zd="token_parsing_error",Ey="null_or_empty_token",mr="endpoints_resolution_error",Sy="network_error",Ay="openid_config_error",by="hash_not_deserialized",hi="invalid_state",Iy="state_mismatch",ac="state_not_found",ky="nonce_mismatch",Wd="auth_time_not_found",Ry="max_age_transpired",U1="multiple_matching_tokens",V1="multiple_matching_accounts",Oy="multiple_matching_appMetadata",Ny="request_cannot_be_made",Py="cannot_remove_empty_scope",My="cannot_append_scopeset",cd="empty_input_scopeset",F1="device_code_polling_cancelled",H1="device_code_expired",$1="device_code_unknown_error",qd="no_account_in_silent_request",xy="invalid_cache_record",Gd="invalid_cache_environment",ld="no_account_found",ud="no_crypto_object",dd="unexpected_credential_type",K1="invalid_assertion",z1="invalid_client_credential",pr="token_refresh_required",W1="user_timeout_reached",Dy="token_claims_cnf_required_for_signedjwt",Ly="authorization_code_missing_from_server_response",By="binding_key_not_removed",Uy="end_session_endpoint_not_supported",jd="key_id_missing",q1="no_network_connectivity",G1="user_canceled",j1="missing_tenant_id_error",ge="method_not_implemented",Y1="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Ym={[Kd]:"The client info could not be parsed/decoded correctly",[Ty]:"The client info was empty",[zd]:"Token cannot be parsed",[Ey]:"The token is null or empty",[mr]:"Endpoints cannot be resolved",[Sy]:"Network request failed",[Ay]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[by]:"The hash parameters could not be deserialized",[hi]:"State was not the expected format",[Iy]:"State mismatch error",[ac]:"State not found",[ky]:"Nonce mismatch error",[Wd]:"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.",[Ry]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[U1]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[V1]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Oy]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Ny]:"Token request cannot be made without authorization code or refresh token.",[Py]:"Cannot remove null or empty scope from ScopeSet",[My]:"Cannot append ScopeSet",[cd]:"Empty input ScopeSet cannot be processed",[F1]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[H1]:"Device code is expired.",[$1]:"Device code stopped polling for unknown reasons.",[qd]:"Please pass an account object, silent flow is not supported without account information",[xy]:"Cache record object was null or undefined.",[Gd]:"Invalid environment when attempting to create cache entry",[ld]:"No account found in cache for given key.",[ud]:"No crypto object detected.",[dd]:"Unexpected credential type.",[K1]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[z1]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[pr]:"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.",[W1]:"User defined timeout for device code polling reached",[Dy]:"Cannot generate a POP jwt if the token_claims are not populated",[Ly]:"Server response does not contain an authorization code to proceed",[By]:"Could not remove the credential's binding key from storage.",[Uy]:"The provided authority does not support logout",[jd]:"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.",[q1]:"No network connectivity. Check your internet connection.",[G1]:"User cancelled the flow.",[j1]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[Y1]:"The nested app auth bridge is disabled"};class Rc extends He{constructor(e,t){super(e,t?`${Ym[e]}: ${t}`:Ym[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Rc.prototype)}}function B(r,e){return new Rc(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const sc={createNewGuid:()=>{throw B(ge)},base64Decode:()=>{throw B(ge)},base64Encode:()=>{throw B(ge)},base64UrlEncode:()=>{throw B(ge)},encodeKid:()=>{throw B(ge)},async getPublicKeyThumbprint(){throw B(ge)},async removeTokenBindingKey(){throw B(ge)},async clearKeystore(){throw B(ge)},async signJwt(){throw B(ge)},async hashString(){throw B(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var xe;(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"})(xe||(xe={}));class qr{constructor(e,t,n){this.level=xe.Info;const i=()=>{},s=e||qr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:xe.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:xe.Info}}clone(e,t,n){return new qr({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} : ${xe[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:xe.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Vy="@azure/msal-common",Yd="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Jd={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 wo(r,e){const t=J1(r);try{const n=e(t);return JSON.parse(n)}catch{throw B(zd)}}function J1(r){if(!r)throw B(Ey);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw B(zd);return t[2]}function Fy(r,e){if(e===0||Date.now()-3e5>r+e)throw B(Ry)}/*! @azure/msal-common v14.16.0 2024-11-05 */function nr(){return Math.round(new Date().getTime()/1e3)}function hd(r,e){const t=Number(r)||0;return nr()+e>t}function Q1(r){return Number(r)>nr()}/*! @azure/msal-common v14.16.0 2024-11-05 */function oi(r){return[X1(r),Z1(r),eM(r),tM(r),nM(r)].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function Oc(r,e,t,n,i){return{credentialType:re.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function Nc(r,e,t,n,i,s,l,d,f,g,m,y,C,S,T){var N,K;const I={homeAccountId:r,credentialType:re.ACCESS_TOKEN,secret:t,cachedAt:nr().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:m||Oe.BEARER};if(y&&(I.userAssertionHash=y),g&&(I.refreshOn=g.toString()),S&&(I.requestedClaims=S,I.requestedClaimsHash=T),((N=I.tokenType)==null?void 0:N.toLowerCase())!==Oe.BEARER.toLowerCase())switch(I.credentialType=re.ACCESS_TOKEN_WITH_AUTH_SCHEME,I.tokenType){case Oe.POP:const F=wo(t,f);if(!((K=F==null?void 0:F.cnf)!=null&&K.kid))throw B(Dy);I.keyId=F.cnf.kid;break;case Oe.SSH:I.keyId=C}return I}function Hy(r,e,t,n,i,s,l){const d={credentialType:re.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),l&&(d.expiresOn=l.toString()),d}function Qd(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function Jm(r){return r?Qd(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===re.ACCESS_TOKEN||r.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Qm(r){return r?Qd(r)&&r.hasOwnProperty("realm")&&r.credentialType===re.ID_TOKEN:!1}function Xm(r){return r?Qd(r)&&r.credentialType===re.REFRESH_TOKEN:!1}function X1(r){return[r.homeAccountId,r.environment].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function Z1(r){const e=r.credentialType===re.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function eM(r){return(r.target||"").toLowerCase()}function tM(r){return(r.requestedClaimsHash||"").toLowerCase()}function nM(r){return r.tokenType&&r.tokenType.toLowerCase()!==Oe.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function rM(r,e){const t=r.indexOf(pt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function oM(r,e){let t=!1;r&&(t=r.indexOf(sa.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function iM({environment:r,clientId:e}){return[Hd,r,e].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function aM(r,e){return e?r.indexOf(Hd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function sM(r,e){return e?r.indexOf(ic.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 Zm(){return nr()+ic.REFRESH_TIME_SECONDS}function ks(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 xu(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function ep(r){return r.expiresAt<=nr()}/*! @azure/msal-common v14.16.0 2024-11-05 */const $y="redirect_uri_empty",cM="claims_request_parsing_error",Ky="authority_uri_insecure",Xi="url_parse_error",zy="empty_url_error",Wy="empty_input_scopes_error",qy="invalid_prompt_value",Xd="invalid_claims",Gy="token_request_empty",jy="logout_request_empty",Yy="invalid_code_challenge_method",Zd="pkce_params_missing",eh="invalid_cloud_discovery_metadata",Jy="invalid_authority_metadata",Qy="untrusted_authority",Pc="missing_ssh_jwk",Xy="missing_ssh_kid",lM="missing_nonce_authentication_header",uM="invalid_authentication_header",Zy="cannot_set_OIDCOptions",eC="cannot_allow_native_broker",tC="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const dM={[$y]:"A redirect URI is required for all calls, and none has been set.",[cM]:"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",[Xi]:"URL could not be parsed into appropriate segments.",[zy]:"URL was empty or null.",[Wy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[qy]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Xd]:"Given claims parameter must be a stringified JSON object.",[Gy]:"Token request was empty and not found in cache.",[jy]:"The logout request was null or undefined.",[Yy]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Zd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[eh]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Jy]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Qy]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Pc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Xy]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[lM]:"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.",[uM]:"Invalid authentication header provided",[Zy]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[eC]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[tC]:"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 th extends He{constructor(e){super(e,dM[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,th.prototype)}}function Pe(r){return new th(r)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ln{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[l,d]=s.split(/=(.+)/g,2);l&&d&&(t[i(l)]=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 Je{constructor(e){const t=e?Ln.trimArrayEntries([...e]):[],n=t?Ln.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 Je(n)}static createSearchScopes(e){const t=new Je(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Pe(Wy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Je(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 zm.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 B(My)}}removeScope(e){if(!e)throw B(Py);this.scopes.delete(e.trim())}removeOIDCScopes(){zm.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw B(cd);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 B(cd);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 cc(r,e){if(!r)throw B(Ty);try{const t=e(r);return JSON.parse(t)}catch{throw B(Kd)}}function ii(r){if(!r)throw B(Kd);const e=r.split(At.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 lc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function nh(r,e,t,n){if(n){const{oid:i,sub:s,tid:l,name:d,tfp:f,acr:g}=n,m=l||f||g||"";return{tenantId:m,localAccountId:i||s||"",name:d,isHomeTenant:lc(m,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:lc(t,r)}}function rh(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...l}=e;i={...r,...l}}if(t){const{isHomeTenant:s,...l}=nh(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...l,idTokenClaims:t,idToken:n},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const Mn={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function nC(r){return r&&(r.tid||r.tfp||r.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const wr={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class at{generateAccountId(){return[this.homeAccountId,this.environment].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return at.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(At.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,m,y,C,S,T;const i=new at;t.authorityType===Mn.Adfs?i.authorityType=bs.ADFS_ACCOUNT_TYPE:t.protocolMode===wr.AAD?i.authorityType=bs.MSSTS_ACCOUNT_TYPE:i.authorityType=bs.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=cc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw B(Gd);i.environment=l,i.realm=(s==null?void 0:s.utid)||nC(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((m=e.idTokenClaims)==null?void 0:m.sub)||"";const d=((y=e.idTokenClaims)==null?void 0:y.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 I=nh(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[I]}return i}static createFromAccountInfo(e,t,n){var s;const i=new at;return i.authorityType=e.authorityType||bs.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===Mn.Adfs||t===Mn.Dsts)){if(e)try{const l=cc(e,i.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.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||{},l=t.idTokenClaims||{};i=s.iat===l.iat&&s.nonce===l.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 rC(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function uc(r){if(!r||r.indexOf("=")<0)return null;try{const e=rC(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw B(by)}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 Pe(zy);e.includes("#")||(this._urlString=ye.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Ln.endsWith(t,"?")?t=t.slice(0,-1):Ln.endsWith(t,"?/")&&(t=t.slice(0,-2)),Ln.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Pe(Xi)}if(!e.HostNameAndPort||!e.PathSegments)throw Pe(Xi);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Pe(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 Pe(Xi);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 Pe(Xi);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!!uc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const oC={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"]}]}},tp=oC.endpointMetadata,oh=oC.instanceDiscoveryMetadata,iC=new Set;oh.metadata.forEach(r=>{r.aliases.forEach(e=>{iC.add(e)})});function hM(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=np(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Qt.CONFIG,e)||np(s,oh.metadata,Qt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function np(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=dc(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 fM(r){return dc(oh.metadata,r)}function dc(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 aC="cache_quota_exceeded",ih="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Du={[aC]:"Exceeded cache storage capacity.",[ih]:"Unexpected error occurred when using cache storage."};class ci extends Error{constructor(e,t){const n=t||(Du[e]?Du[e]:Du[ih]);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(Vy,Yd),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,l;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(l=wo(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,i))?null:(s=rh(e,n,l,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const l=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,l,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,l,d;if(!e)throw B(xy);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")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new ci(aC)):new ci(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new ci(ih))}}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=Je.fromString(e.target),s=[];n.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&Je.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(l))}),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 l={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,l));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(At.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(At.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}${At.CACHE_KEY_SEPARATOR}${this.clientId}${At.CACHE_KEY_SEPARATOR}`,i=`${re.REFRESH_TOKEN}${At.CACHE_KEY_SEPARATOR}${aa}${At.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===Oe.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(m=>m.startsWith(t.homeAccountId)),l=[];s.forEach(m=>{const y=this.getCachedAccountEntity(m);y&&l.push(y)});const d=l.find(m=>lc(m.realm,m.homeAccountId))||l[0];d.tenantProfiles=l.map(m=>({tenantId:m.realm,localAccountId:m.localAccountId,name:m.name,isHomeTenant:lc(m.realm,m.homeAccountId)}));const f=fi.toObject(new at,{...d}),g=f.generateAccountKey();return s.forEach(m=>{m!==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===Oe.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw B(By)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=at.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(l,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 m=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&m.set(S,C)});const y=m.size;if(y<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(y===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),m.values().next().value;g=m}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((m,y)=>{this.removeIdToken(y)}),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 l=this.getIdTokenCredential(s);l&&this.credentialMatchesFilter(l,e)&&i.set(s,l)}),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,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Je.createSearchScopes(t.scopes),f=t.authenticationScheme||Oe.BEARER,g=f&&f.toLowerCase()!==Oe.BEARER.toLowerCase()?re.ACCESS_TOKEN_WITH_AUTH_SCHEME:re.ACCESS_TOKEN,m={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},y=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];y.forEach(T=>{if(this.accessTokenKeyMatchesFilter(T,m,!0)){const I=this.getAccessTokenCredential(T);I&&this.credentialMatchesFilter(I,m)&&C.push(I)}});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&&l&&s.addFields({multiMatchedAT:C.length},l),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 l=0;l<s.length;l++){if(n&&!i.includes(s[l].toLowerCase()))return!1;if(!n&&i.includes(s[l].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 l=t?aa:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.REFRESH_TOKEN,clientId:this.clientId,familyId:l},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(y=>{if(this.refreshTokenKeyMatchesFilter(y,d)){const C=this.getRefreshTokenCredential(y);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const m=g.length;return m<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(m>1&&i&&s&&i.addFields({multiMatchedRT:m},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(l=>n[l]),s=i.length;if(s<1)return null;if(s>1)throw B(Oy);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===aa)}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=hM(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:Je.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(Hd)!==-1}isAuthorityMetadata(e){return e.indexOf(ic.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${ic.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class gM extends fi{setAccount(){throw B(ge)}getAccount(){throw B(ge)}getCachedAccountEntity(){throw B(ge)}setIdTokenCredential(){throw B(ge)}getIdTokenCredential(){throw B(ge)}setAccessTokenCredential(){throw B(ge)}getAccessTokenCredential(){throw B(ge)}setRefreshTokenCredential(){throw B(ge)}getRefreshTokenCredential(){throw B(ge)}setAppMetadata(){throw B(ge)}getAppMetadata(){throw B(ge)}setServerTelemetry(){throw B(ge)}getServerTelemetry(){throw B(ge)}setAuthorityMetadata(){throw B(ge)}getAuthorityMetadata(){throw B(ge)}getAuthorityMetadataKeys(){throw B(ge)}setThrottlingCache(){throw B(ge)}getThrottlingCache(){throw B(ge)}removeItem(){throw B(ge)}getKeys(){throw B(ge)}getAccountKeys(){throw B(ge)}getTokenKeys(){throw B(ge)}updateCredentialCacheKey(){throw B(ge)}removeOutdatedAccount(){throw B(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const sC={tokenRenewalOffsetSeconds:L1,preventCorsPreflight:!1},mM={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:P.EMPTY_STRING},pM={claimsBasedCachingEnabled:!1},vM={async sendGetRequestAsync(){throw B(ge)},async sendPostRequestAsync(){throw B(ge)}},yM={sku:P.SKU,version:Yd,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},CM={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},wM={azureCloudInstance:Jd.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},_M={application:{appName:"",appVersion:""}};function TM({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:l,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:m,persistencePlugin:y,serializableCache:C}){const S={...mM,...t};return{authOptions:EM(r),systemOptions:{...sC,...e},loggerOptions:S,cacheOptions:{...pM,...n},storageInterface:i||new gM(r.clientId,sc,new qr(S)),networkInterface:s||vM,cryptoInterface:l||sc,clientCredentials:d||CM,libraryInfo:{...yM,...f},telemetry:{..._M,...g},serverTelemetryManager:m||null,persistencePlugin:y||null,serializableCache:C||null}}function EM(r){return{clientCapabilities:[],azureCloudOptions:wM,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function fd(r){return r.authOptions.authority.options.protocolMode===wr.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const rn={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const mo="client_id",cC="redirect_uri",rp="response_type",SM="response_mode",AM="grant_type",bM="claims",IM="scope",kM="refresh_token",RM="state",OM="nonce",NM="prompt",PM="code",MM="code_challenge",xM="code_challenge_method",DM="code_verifier",LM="client-request-id",BM="x-client-SKU",UM="x-client-VER",VM="x-client-OS",FM="x-client-CPU",HM="x-client-current-telemetry",$M="x-client-last-telemetry",KM="x-ms-lib-capability",zM="x-app-name",WM="x-app-ver",qM="post_logout_redirect_uri",GM="id_token_hint",jM="device_code",YM="client_secret",JM="client_assertion",QM="client_assertion_type",op="token_type",ip="req_cnf",XM="assertion",ZM="requested_token_use",ap="return_spa_code",ex="nativebroker",tx="logout_hint",nx="sid",rx="login_hint",ox="domain_hint",ix="x-client-xtra-sku",ah="brk_client_id",gd="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Qo{static validateRedirectUri(e){if(!e)throw Pe($y)}static validatePrompt(e){const t=[];for(const n in dt)t.push(dt[n]);if(t.indexOf(e)<0)throw Pe(qy)}static validateClaims(e){try{JSON.parse(e)}catch{throw Pe(Xd)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Pe(Zd);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Wm.PLAIN,Wm.S256].indexOf(e)<0)throw Pe(Yy)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function ax(r,e,t){if(!e)return;const n=r.get(mo);n&&r.has(ah)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(cC)},e))}class ca{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(rp,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(rp,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(SM,encodeURIComponent(e||M1.QUERY))}addNativeBroker(){this.parameters.set(ex,encodeURIComponent("1"))}addScopes(e,t=!0,n=vi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Je(i);this.parameters.set(IM,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(mo,encodeURIComponent(e))}addRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(cC,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(qM,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(GM,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(ox,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(rx,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Nt.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Nt.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(nx,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Qo.validateClaims(n),this.parameters.set(bM,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set(LM,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(BM,e.sku),this.parameters.set(UM,e.version),e.os&&this.parameters.set(VM,e.os),e.cpu&&this.parameters.set(FM,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(zM,e.appName),e!=null&&e.appVersion&&this.parameters.set(WM,e.appVersion)}addPrompt(e){Qo.validatePrompt(e),this.parameters.set(`${NM}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(RM,encodeURIComponent(e))}addNonce(e){this.parameters.set(OM,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Qo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(MM,encodeURIComponent(e)),this.parameters.set(xM,encodeURIComponent(t));else throw Pe(Zd)}addAuthorizationCode(e){this.parameters.set(PM,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(jM,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(kM,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(DM,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(YM,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(JM,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(QM,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(XM,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(ZM,encodeURIComponent(e))}addGrantType(e){this.parameters.set(AM,encodeURIComponent(e))}addClientInfo(){this.parameters.set(x1,"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 Pe(Xd)}return t&&t.length>0&&(n.hasOwnProperty(As.ACCESS_TOKEN)||(n[As.ACCESS_TOKEN]={}),n[As.ACCESS_TOKEN][As.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(Gm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Gm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(op,Oe.POP),this.parameters.set(ip,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(op,Oe.SSH),this.parameters.set(ip,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(HM,e.generateCurrentRequestHeaderValue()),this.parameters.set($M,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(KM,sa.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(tx,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[ah]=e.brokerClientId,t[gd]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),ax(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function sx(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 cx(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function lx(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"},ux={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const _o=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=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 l==null||l.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 l==null||l.end({success:!1},d),d}},U=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=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}`),l==null||l.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 l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class Mc{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=zo.ENVIRONMENT_VARIABLE;else{const s=Mc.IMDS_OPTIONS;try{const l=await U(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(l.status===Is.httpSuccess&&(n=l.body,t.region_source=zo.IMDS),l.status===Is.httpBadRequest){const d=await U(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=zo.FAILED_AUTO_DETECTION,null;const f=await U(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===Is.httpSuccess&&(n=f.body,t.region_source=zo.IMDS)}}catch{return t.region_source=zo.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=zo.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===Is.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}Mc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Et{constructor(e,t,n,i,s,l,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=l,this.managedIdentity=f||!1,this.regionDiscovery=new Mc(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(P.CIAM_AUTH_URL))return Mn.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case P.ADFS:return Mn.Adfs;case P.DSTS:return Mn.Dsts}return Mn.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 B(mr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw B(mr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw B(mr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw B(Uy);return this.replacePath(this.metadata.end_session_endpoint)}else throw B(mr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw B(mr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw B(mr)}canReplaceTenant(e){return e.PathSegments.length===1&&!Et.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Mn.Default&&this.protocolMode===wr.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 m=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==m&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${m}`),g=m)}d!==g&&(t=t.replace(`/${g}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Mn.Adfs||this.protocolMode!==wr.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 U(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 U(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:Zm(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Qt.CACHE&&(n==null?void 0:n.source)!==Qt.CACHE&&(e.expiresAt=Zm(),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,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Qt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await U(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);ks(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await U(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(n=await U(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),ks(e,n,!0),Qt.NETWORK;throw B(Ay,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"),ks(e,t,!1),{source:Qt.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 ks(e,i,!1),{source:Qt.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=ep(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Qt.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 Pe(Jy)}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 sx(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 tp?tp[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=Mu.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Et.replaceWithRegionalInformation(e,t);const l=await U(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(l)return this.regionDiscoveryMetadata.region_outcome=Mu.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,Et.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=Mu.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 U(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return xu(e,n,!0),Qt.NETWORK;throw Pe(Qy)}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"),xu(e,t,!1),Qt.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=fM(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),xu(e,i,!1),Qt.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=ep(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Qt.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Mn.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Et.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=dc(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."),Pe(eh)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Et.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 l,d;if(cx(s.body))l=s.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(lx(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),l=s.body,l.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.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=dc(d,this.hostnameAndPort)}catch(s){if(s instanceof He)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
50
|
+
*/var P1=kc("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"},Ss={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},vi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],zm=[...vi,P.EMAIL_SCOPE],Pt={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"},ct={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"},As={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},dt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Wm={PLAIN:"plain",S256:"S256"},Ta={QUERY:"query",FRAGMENT:"fragment"},M1={...Ta,FORM_POST:"form_post"},wy={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"},bs={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},At={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},re={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Hd="appmetadata",x1="client_info",aa="1",ic={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Xt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},pt={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"},Oe={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},sa={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},qm={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Gm={username:"username",password:"password"},Is={httpSuccess:200,httpBadRequest:400},zo={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Mu={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Br={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},D1={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},L1=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const $d="unexpected_error",B1="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const jm={[$d]:"Unexpected error in authentication.",[B1]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class He extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,He.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 _y(r,e){return new He(r,e?`${jm[r]} ${e}`:jm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Kd="client_info_decoding_error",Ty="client_info_empty_error",zd="token_parsing_error",Ey="null_or_empty_token",vr="endpoints_resolution_error",Sy="network_error",Ay="openid_config_error",by="hash_not_deserialized",hi="invalid_state",Iy="state_mismatch",ac="state_not_found",ky="nonce_mismatch",Wd="auth_time_not_found",Ry="max_age_transpired",U1="multiple_matching_tokens",V1="multiple_matching_accounts",Oy="multiple_matching_appMetadata",Ny="request_cannot_be_made",Py="cannot_remove_empty_scope",My="cannot_append_scopeset",cd="empty_input_scopeset",F1="device_code_polling_cancelled",H1="device_code_expired",$1="device_code_unknown_error",qd="no_account_in_silent_request",xy="invalid_cache_record",Gd="invalid_cache_environment",ld="no_account_found",ud="no_crypto_object",dd="unexpected_credential_type",K1="invalid_assertion",z1="invalid_client_credential",yr="token_refresh_required",W1="user_timeout_reached",Dy="token_claims_cnf_required_for_signedjwt",Ly="authorization_code_missing_from_server_response",By="binding_key_not_removed",Uy="end_session_endpoint_not_supported",jd="key_id_missing",q1="no_network_connectivity",G1="user_canceled",j1="missing_tenant_id_error",ge="method_not_implemented",Y1="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Ym={[Kd]:"The client info could not be parsed/decoded correctly",[Ty]:"The client info was empty",[zd]:"Token cannot be parsed",[Ey]:"The token is null or empty",[vr]:"Endpoints cannot be resolved",[Sy]:"Network request failed",[Ay]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[by]:"The hash parameters could not be deserialized",[hi]:"State was not the expected format",[Iy]:"State mismatch error",[ac]:"State not found",[ky]:"Nonce mismatch error",[Wd]:"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.",[Ry]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[U1]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[V1]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Oy]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Ny]:"Token request cannot be made without authorization code or refresh token.",[Py]:"Cannot remove null or empty scope from ScopeSet",[My]:"Cannot append ScopeSet",[cd]:"Empty input ScopeSet cannot be processed",[F1]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[H1]:"Device code is expired.",[$1]:"Device code stopped polling for unknown reasons.",[qd]:"Please pass an account object, silent flow is not supported without account information",[xy]:"Cache record object was null or undefined.",[Gd]:"Invalid environment when attempting to create cache entry",[ld]:"No account found in cache for given key.",[ud]:"No crypto object detected.",[dd]:"Unexpected credential type.",[K1]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[z1]:"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.",[W1]:"User defined timeout for device code polling reached",[Dy]:"Cannot generate a POP jwt if the token_claims are not populated",[Ly]:"Server response does not contain an authorization code to proceed",[By]:"Could not remove the credential's binding key from storage.",[Uy]:"The provided authority does not support logout",[jd]:"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.",[q1]:"No network connectivity. Check your internet connection.",[G1]:"User cancelled the flow.",[j1]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[Y1]:"The nested app auth bridge is disabled"};class Rc extends He{constructor(e,t){super(e,t?`${Ym[e]}: ${t}`:Ym[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Rc.prototype)}}function B(r,e){return new Rc(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const sc={createNewGuid:()=>{throw B(ge)},base64Decode:()=>{throw B(ge)},base64Encode:()=>{throw B(ge)},base64UrlEncode:()=>{throw B(ge)},encodeKid:()=>{throw B(ge)},async getPublicKeyThumbprint(){throw B(ge)},async removeTokenBindingKey(){throw B(ge)},async clearKeystore(){throw B(ge)},async signJwt(){throw B(ge)},async hashString(){throw B(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var xe;(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"})(xe||(xe={}));class qr{constructor(e,t,n){this.level=xe.Info;const i=()=>{},s=e||qr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:xe.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:xe.Info}}clone(e,t,n){return new qr({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} : ${xe[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:xe.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Vy="@azure/msal-common",Yd="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Jd={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 wo(r,e){const t=J1(r);try{const n=e(t);return JSON.parse(n)}catch{throw B(zd)}}function J1(r){if(!r)throw B(Ey);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw B(zd);return t[2]}function Fy(r,e){if(e===0||Date.now()-3e5>r+e)throw B(Ry)}/*! @azure/msal-common v14.16.0 2024-11-05 */function rr(){return Math.round(new Date().getTime()/1e3)}function hd(r,e){const t=Number(r)||0;return rr()+e>t}function Q1(r){return Number(r)>rr()}/*! @azure/msal-common v14.16.0 2024-11-05 */function oi(r){return[X1(r),Z1(r),eM(r),tM(r),nM(r)].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function Oc(r,e,t,n,i){return{credentialType:re.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function Nc(r,e,t,n,i,s,l,d,f,g,m,v,C,S,T){var O,$;const I={homeAccountId:r,credentialType:re.ACCESS_TOKEN,secret:t,cachedAt:rr().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:m||Oe.BEARER};if(v&&(I.userAssertionHash=v),g&&(I.refreshOn=g.toString()),S&&(I.requestedClaims=S,I.requestedClaimsHash=T),((O=I.tokenType)==null?void 0:O.toLowerCase())!==Oe.BEARER.toLowerCase())switch(I.credentialType=re.ACCESS_TOKEN_WITH_AUTH_SCHEME,I.tokenType){case Oe.POP:const F=wo(t,f);if(!(($=F==null?void 0:F.cnf)!=null&&$.kid))throw B(Dy);I.keyId=F.cnf.kid;break;case Oe.SSH:I.keyId=C}return I}function Hy(r,e,t,n,i,s,l){const d={credentialType:re.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),l&&(d.expiresOn=l.toString()),d}function Qd(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function Jm(r){return r?Qd(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===re.ACCESS_TOKEN||r.credentialType===re.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Qm(r){return r?Qd(r)&&r.hasOwnProperty("realm")&&r.credentialType===re.ID_TOKEN:!1}function Xm(r){return r?Qd(r)&&r.credentialType===re.REFRESH_TOKEN:!1}function X1(r){return[r.homeAccountId,r.environment].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function Z1(r){const e=r.credentialType===re.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function eM(r){return(r.target||"").toLowerCase()}function tM(r){return(r.requestedClaimsHash||"").toLowerCase()}function nM(r){return r.tokenType&&r.tokenType.toLowerCase()!==Oe.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function rM(r,e){const t=r.indexOf(pt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function oM(r,e){let t=!1;r&&(t=r.indexOf(sa.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function iM({environment:r,clientId:e}){return[Hd,r,e].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}function aM(r,e){return e?r.indexOf(Hd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function sM(r,e){return e?r.indexOf(ic.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 Zm(){return rr()+ic.REFRESH_TIME_SECONDS}function ks(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 xu(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function ep(r){return r.expiresAt<=rr()}/*! @azure/msal-common v14.16.0 2024-11-05 */const $y="redirect_uri_empty",cM="claims_request_parsing_error",Ky="authority_uri_insecure",Xi="url_parse_error",zy="empty_url_error",Wy="empty_input_scopes_error",qy="invalid_prompt_value",Xd="invalid_claims",Gy="token_request_empty",jy="logout_request_empty",Yy="invalid_code_challenge_method",Zd="pkce_params_missing",eh="invalid_cloud_discovery_metadata",Jy="invalid_authority_metadata",Qy="untrusted_authority",Pc="missing_ssh_jwk",Xy="missing_ssh_kid",lM="missing_nonce_authentication_header",uM="invalid_authentication_header",Zy="cannot_set_OIDCOptions",eC="cannot_allow_native_broker",tC="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const dM={[$y]:"A redirect URI is required for all calls, and none has been set.",[cM]:"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",[Xi]:"URL could not be parsed into appropriate segments.",[zy]:"URL was empty or null.",[Wy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[qy]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Xd]:"Given claims parameter must be a stringified JSON object.",[Gy]:"Token request was empty and not found in cache.",[jy]:"The logout request was null or undefined.",[Yy]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Zd]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[eh]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Jy]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Qy]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Pc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Xy]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[lM]:"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.",[uM]:"Invalid authentication header provided",[Zy]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[eC]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[tC]:"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 th extends He{constructor(e){super(e,dM[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,th.prototype)}}function Pe(r){return new th(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[l,d]=s.split(/=(.+)/g,2);l&&d&&(t[i(l)]=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 Je{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 Je(n)}static createSearchScopes(e){const t=new Je(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Pe(Wy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Je(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 zm.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 B(My)}}removeScope(e){if(!e)throw B(Py);this.scopes.delete(e.trim())}removeOIDCScopes(){zm.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw B(cd);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 B(cd);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 cc(r,e){if(!r)throw B(Ty);try{const t=e(r);return JSON.parse(t)}catch{throw B(Kd)}}function ii(r){if(!r)throw B(Kd);const e=r.split(At.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 lc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function nh(r,e,t,n){if(n){const{oid:i,sub:s,tid:l,name:d,tfp:f,acr:g}=n,m=l||f||g||"";return{tenantId:m,localAccountId:i||s||"",name:d,isHomeTenant:lc(m,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:lc(t,r)}}function rh(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...l}=e;i={...r,...l}}if(t){const{isHomeTenant:s,...l}=nh(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...l,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 nC(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 at{generateAccountId(){return[this.homeAccountId,this.environment].join(At.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return at.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(At.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,m,v,C,S,T;const i=new at;t.authorityType===xn.Adfs?i.authorityType=bs.ADFS_ACCOUNT_TYPE:t.protocolMode===Tr.AAD?i.authorityType=bs.MSSTS_ACCOUNT_TYPE:i.authorityType=bs.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=cc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw B(Gd);i.environment=l,i.realm=(s==null?void 0:s.utid)||nC(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((m=e.idTokenClaims)==null?void 0:m.sub)||"";const d=((v=e.idTokenClaims)==null?void 0:v.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 I=nh(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[I]}return i}static createFromAccountInfo(e,t,n){var s;const i=new at;return i.authorityType=e.authorityType||bs.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 l=cc(e,i.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.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||{},l=t.idTokenClaims||{};i=s.iat===l.iat&&s.nonce===l.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 rC(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function uc(r){if(!r||r.indexOf("=")<0)return null;try{const e=rC(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw B(by)}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 Pe(zy);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 Pe(Xi)}if(!e.HostNameAndPort||!e.PathSegments)throw Pe(Xi);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Pe(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 Pe(Xi);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 Pe(Xi);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!!uc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const oC={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"]}]}},tp=oC.endpointMetadata,oh=oC.instanceDiscoveryMetadata,iC=new Set;oh.metadata.forEach(r=>{r.aliases.forEach(e=>{iC.add(e)})});function hM(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=np(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Xt.CONFIG,e)||np(s,oh.metadata,Xt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function np(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=dc(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 fM(r){return dc(oh.metadata,r)}function dc(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 aC="cache_quota_exceeded",ih="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Du={[aC]:"Exceeded cache storage capacity.",[ih]:"Unexpected error occurred when using cache storage."};class ci extends Error{constructor(e,t){const n=t||(Du[e]?Du[e]:Du[ih]);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(Vy,Yd),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,l;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(l=wo(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,i))?null:(s=rh(e,n,l,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const l=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,l,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,l,d;if(!e)throw B(xy);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")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new ci(aC)):new ci(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new ci(ih))}}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=Je.fromString(e.target),s=[];n.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&Je.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(l))}),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 l={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,l));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(At.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(At.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}${At.CACHE_KEY_SEPARATOR}${this.clientId}${At.CACHE_KEY_SEPARATOR}`,i=`${re.REFRESH_TOKEN}${At.CACHE_KEY_SEPARATOR}${aa}${At.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===Oe.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(m=>m.startsWith(t.homeAccountId)),l=[];s.forEach(m=>{const v=this.getCachedAccountEntity(m);v&&l.push(v)});const d=l.find(m=>lc(m.realm,m.homeAccountId))||l[0];d.tenantProfiles=l.map(m=>({tenantId:m.realm,localAccountId:m.localAccountId,name:m.name,isHomeTenant:lc(m.realm,m.homeAccountId)}));const f=fi.toObject(new at,{...d}),g=f.generateAccountKey();return s.forEach(m=>{m!==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===Oe.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw B(By)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=at.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(l,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 m=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&m.set(S,C)});const v=m.size;if(v<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(v===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),m.values().next().value;g=m}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((m,v)=>{this.removeIdToken(v)}),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 l=this.getIdTokenCredential(s);l&&this.credentialMatchesFilter(l,e)&&i.set(s,l)}),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,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Je.createSearchScopes(t.scopes),f=t.authenticationScheme||Oe.BEARER,g=f&&f.toLowerCase()!==Oe.BEARER.toLowerCase()?re.ACCESS_TOKEN_WITH_AUTH_SCHEME:re.ACCESS_TOKEN,m={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},v=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];v.forEach(T=>{if(this.accessTokenKeyMatchesFilter(T,m,!0)){const I=this.getAccessTokenCredential(T);I&&this.credentialMatchesFilter(I,m)&&C.push(I)}});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&&l&&s.addFields({multiMatchedAT:C.length},l),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 l=0;l<s.length;l++){if(n&&!i.includes(s[l].toLowerCase()))return!1;if(!n&&i.includes(s[l].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 l=t?aa:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:re.REFRESH_TOKEN,clientId:this.clientId,familyId:l},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(v=>{if(this.refreshTokenKeyMatchesFilter(v,d)){const C=this.getRefreshTokenCredential(v);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const m=g.length;return m<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(m>1&&i&&s&&i.addFields({multiMatchedRT:m},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(l=>n[l]),s=i.length;if(s<1)return null;if(s>1)throw B(Oy);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===aa)}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=hM(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:Je.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(Hd)!==-1}isAuthorityMetadata(e){return e.indexOf(ic.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${ic.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class gM extends fi{setAccount(){throw B(ge)}getAccount(){throw B(ge)}getCachedAccountEntity(){throw B(ge)}setIdTokenCredential(){throw B(ge)}getIdTokenCredential(){throw B(ge)}setAccessTokenCredential(){throw B(ge)}getAccessTokenCredential(){throw B(ge)}setRefreshTokenCredential(){throw B(ge)}getRefreshTokenCredential(){throw B(ge)}setAppMetadata(){throw B(ge)}getAppMetadata(){throw B(ge)}setServerTelemetry(){throw B(ge)}getServerTelemetry(){throw B(ge)}setAuthorityMetadata(){throw B(ge)}getAuthorityMetadata(){throw B(ge)}getAuthorityMetadataKeys(){throw B(ge)}setThrottlingCache(){throw B(ge)}getThrottlingCache(){throw B(ge)}removeItem(){throw B(ge)}getKeys(){throw B(ge)}getAccountKeys(){throw B(ge)}getTokenKeys(){throw B(ge)}updateCredentialCacheKey(){throw B(ge)}removeOutdatedAccount(){throw B(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const sC={tokenRenewalOffsetSeconds:L1,preventCorsPreflight:!1},mM={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:P.EMPTY_STRING},pM={claimsBasedCachingEnabled:!1},vM={async sendGetRequestAsync(){throw B(ge)},async sendPostRequestAsync(){throw B(ge)}},yM={sku:P.SKU,version:Yd,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},CM={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},wM={azureCloudInstance:Jd.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},_M={application:{appName:"",appVersion:""}};function TM({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:l,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:m,persistencePlugin:v,serializableCache:C}){const S={...mM,...t};return{authOptions:EM(r),systemOptions:{...sC,...e},loggerOptions:S,cacheOptions:{...pM,...n},storageInterface:i||new gM(r.clientId,sc,new qr(S)),networkInterface:s||vM,cryptoInterface:l||sc,clientCredentials:d||CM,libraryInfo:{...yM,...f},telemetry:{..._M,...g},serverTelemetryManager:m||null,persistencePlugin:v||null,serializableCache:C||null}}function EM(r){return{clientCapabilities:[],azureCloudOptions:wM,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function fd(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 mo="client_id",cC="redirect_uri",rp="response_type",SM="response_mode",AM="grant_type",bM="claims",IM="scope",kM="refresh_token",RM="state",OM="nonce",NM="prompt",PM="code",MM="code_challenge",xM="code_challenge_method",DM="code_verifier",LM="client-request-id",BM="x-client-SKU",UM="x-client-VER",VM="x-client-OS",FM="x-client-CPU",HM="x-client-current-telemetry",$M="x-client-last-telemetry",KM="x-ms-lib-capability",zM="x-app-name",WM="x-app-ver",qM="post_logout_redirect_uri",GM="id_token_hint",jM="device_code",YM="client_secret",JM="client_assertion",QM="client_assertion_type",op="token_type",ip="req_cnf",XM="assertion",ZM="requested_token_use",ap="return_spa_code",ex="nativebroker",tx="logout_hint",nx="sid",rx="login_hint",ox="domain_hint",ix="x-client-xtra-sku",ah="brk_client_id",gd="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Qo{static validateRedirectUri(e){if(!e)throw Pe($y)}static validatePrompt(e){const t=[];for(const n in dt)t.push(dt[n]);if(t.indexOf(e)<0)throw Pe(qy)}static validateClaims(e){try{JSON.parse(e)}catch{throw Pe(Xd)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Pe(Zd);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Wm.PLAIN,Wm.S256].indexOf(e)<0)throw Pe(Yy)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function ax(r,e,t){if(!e)return;const n=r.get(mo);n&&r.has(ah)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(cC)},e))}class ca{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(rp,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(rp,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(SM,encodeURIComponent(e||M1.QUERY))}addNativeBroker(){this.parameters.set(ex,encodeURIComponent("1"))}addScopes(e,t=!0,n=vi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Je(i);this.parameters.set(IM,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(mo,encodeURIComponent(e))}addRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(cC,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Qo.validateRedirectUri(e),this.parameters.set(qM,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(GM,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(ox,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(rx,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(nx,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Qo.validateClaims(n),this.parameters.set(bM,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set(LM,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(BM,e.sku),this.parameters.set(UM,e.version),e.os&&this.parameters.set(VM,e.os),e.cpu&&this.parameters.set(FM,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(zM,e.appName),e!=null&&e.appVersion&&this.parameters.set(WM,e.appVersion)}addPrompt(e){Qo.validatePrompt(e),this.parameters.set(`${NM}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(RM,encodeURIComponent(e))}addNonce(e){this.parameters.set(OM,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Qo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(MM,encodeURIComponent(e)),this.parameters.set(xM,encodeURIComponent(t));else throw Pe(Zd)}addAuthorizationCode(e){this.parameters.set(PM,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(jM,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(kM,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(DM,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(YM,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(JM,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(QM,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(XM,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(ZM,encodeURIComponent(e))}addGrantType(e){this.parameters.set(AM,encodeURIComponent(e))}addClientInfo(){this.parameters.set(x1,"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 Pe(Xd)}return t&&t.length>0&&(n.hasOwnProperty(As.ACCESS_TOKEN)||(n[As.ACCESS_TOKEN]={}),n[As.ACCESS_TOKEN][As.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(Gm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Gm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(op,Oe.POP),this.parameters.set(ip,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(op,Oe.SSH),this.parameters.set(ip,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(HM,e.generateCurrentRequestHeaderValue()),this.parameters.set($M,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(KM,sa.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(tx,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[ah]=e.brokerClientId,t[gd]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),ax(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function sx(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 cx(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function lx(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"},ux={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const _o=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=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 l==null||l.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 l==null||l.end({success:!1},d),d}},U=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=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}`),l==null||l.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 l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class Mc{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=zo.ENVIRONMENT_VARIABLE;else{const s=Mc.IMDS_OPTIONS;try{const l=await U(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(l.status===Is.httpSuccess&&(n=l.body,t.region_source=zo.IMDS),l.status===Is.httpBadRequest){const d=await U(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=zo.FAILED_AUTO_DETECTION,null;const f=await U(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===Is.httpSuccess&&(n=f.body,t.region_source=zo.IMDS)}}catch{return t.region_source=zo.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=zo.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===Is.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}Mc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Et{constructor(e,t,n,i,s,l,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=l,this.managedIdentity=f||!1,this.regionDiscovery=new Mc(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 B(vr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw B(vr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw B(vr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw B(Uy);return this.replacePath(this.metadata.end_session_endpoint)}else throw B(vr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw B(vr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw B(vr)}canReplaceTenant(e){return e.PathSegments.length===1&&!Et.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 m=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==m&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${m}`),g=m)}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 U(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 U(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:Zm(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Xt.CACHE&&(n==null?void 0:n.source)!==Xt.CACHE&&(e.expiresAt=Zm(),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,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Xt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await U(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);ks(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await U(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(n=await U(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),ks(e,n,!0),Xt.NETWORK;throw B(Ay,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"),ks(e,t,!1),{source:Xt.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 ks(e,i,!1),{source:Xt.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=ep(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Xt.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 Pe(Jy)}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 sx(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 tp?tp[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=Mu.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Et.replaceWithRegionalInformation(e,t);const l=await U(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(l)return this.regionDiscoveryMetadata.region_outcome=Mu.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,Et.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=Mu.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 U(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return xu(e,n,!0),Xt.NETWORK;throw Pe(Qy)}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"),xu(e,t,!1),Xt.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=fM(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),xu(e,i,!1),Xt.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=ep(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Xt.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."),Et.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=dc(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."),Pe(eh)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Et.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 l,d;if(cx(s.body))l=s.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(lx(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),l=s.body,l.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.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=dc(d,this.hostnameAndPort)}catch(s){if(s instanceof He)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 l=s;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
53
53
|
Error: ${l.name}
|
54
|
-
Error Description: ${l.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=Et.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!==Jd.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 B(mr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return iC.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 l=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(l=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:l}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=Et.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=Et.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=Et.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}}Et.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function dx(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 lC(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function hx(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Pe(eh)}return{canonicalAuthority:r.authority?lC(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function uC(r,e,t,n,i,s,l){l==null||l.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=Et.transformCIAMAuthority(lC(r)),f=new Et(d,e,t,n,i,s,l);try{return await U(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,l,s)(),f}catch{throw B(mr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Gr extends He{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,Gr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class jn{static generateThrottlingStorageKey(e){return`${sa.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 Gr(((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[Nt.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(Nt.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||sa.DEFAULT_THROTTLE_TIME_SECONDS),n+sa.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},l=this.generateThrottlingStorageKey(s);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class xc extends He{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,xc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function sp(r,e,t){return new xc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class sh{constructor(e,t){this.config=TM(e),this.logger=new qr(this.config.loggerOptions,Vy,Yd),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[Nt.CONTENT_TYPE]=P.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case rn.HOME_ACCOUNT_ID:try{const n=ii(e.credential);t[Nt.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case rn.UPN:t[Nt.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,l){var f;l&&((f=this.performanceClient)==null||f.addQueueMeasurement(l,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 l,d,f;jn.preProcess(this.cacheManager,e);let s;try{s=await U(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:((l=s.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:g[Nt.X_MS_HTTP_VERSION]||"",requestId:g[Nt.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof xc){const m=g.responseHeaders;throw m&&((f=this.performanceClient)==null||f.addFields({httpVerToken:m[Nt.X_MS_HTTP_VERSION]||"",requestId:m[Nt.X_MS_REQUEST_ID]||"",contentTypeHeader:m[Nt.CONTENT_TYPE]||void 0,contentLengthHeader:m[Nt.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof He?g:B(Sy)}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 uC(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new ca(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 hc="no_tokens_found",dC="native_account_unavailable",ch="refresh_token_expired",fx="interaction_required",gx="consent_required",mx="login_required",Dc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const cp=[fx,gx,mx,Dc],px=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],vx={[hc]:"No refresh token found in the cache. Please sign-in.",[dC]:"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.",[ch]:"Refresh token has expired.",[Dc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Un extends He{constructor(e,t,n,i,s,l,d,f){super(e,t,n),Object.setPrototypeOf(this,Un.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=l||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function lp(r,e,t){const n=!!r&&cp.indexOf(r)>-1,i=!!t&&px.indexOf(t)>-1,s=!!e&&cp.some(l=>e.indexOf(l)>-1);return n||s||i}function md(r){return new Un(r,vx[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Bn{static setRequestState(e,t,n){const i=Bn.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw B(ud);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 B(ud);if(!t)throw B(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,l=e.base64Decode(i),d=JSON.parse(l);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw B(hi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const yx={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 U(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:yx.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:l,shrClaims:d,shrNonce:f,shrOptions:g}=n,m=l?new ye(l):void 0,y=m==null?void 0:m.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:nr(),m:s==null?void 0:s.toUpperCase(),u:y==null?void 0:y.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:y==null?void 0:y.AbsolutePath,q:y!=null&&y.QueryString?[[],y.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Cx{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 wx(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 po{constructor(e,t,n,i,s,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?B(ac,"Cached State"):B(ac,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw B(hi,e.state)}try{i=decodeURIComponent(t)}catch{throw B(hi,e.state)}if(n!==i)throw B(Iy);if(e.error||e.error_description||e.suberror){const s=wx(e);throw lp(e.error,e.error_description,e.suberror)?new Un(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new Gr(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,l=new Gr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=Ss.SERVER_ERROR_RANGE_START&&e.status<=Ss.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: ${l.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=Et.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!==Jd.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 B(vr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return iC.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 l=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(l=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:l}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=Et.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=Et.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=Et.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}}Et.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function dx(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 lC(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function hx(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Pe(eh)}return{canonicalAuthority:r.authority?lC(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function uC(r,e,t,n,i,s,l){l==null||l.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=Et.transformCIAMAuthority(lC(r)),f=new Et(d,e,t,n,i,s,l);try{return await U(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,l,s)(),f}catch{throw B(vr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Gr extends He{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,Gr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Yn{static generateThrottlingStorageKey(e){return`${sa.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var s;const n=Yn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new Gr(((s=i.errorCodes)==null?void 0:s.join(" "))||P.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,n){if(Yn.checkResponseStatus(n)||Yn.checkResponseForRetryAfter(n)){const i={throttleTime:Yn.calculateThrottleTime(parseInt(n.headers[Pt.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Yn.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(Pt.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||sa.DEFAULT_THROTTLE_TIME_SECONDS),n+sa.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},l=this.generateThrottlingStorageKey(s);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class xc extends He{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,xc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function sp(r,e,t){return new xc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class sh{constructor(e,t){this.config=TM(e),this.logger=new qr(this.config.loggerOptions,Vy,Yd),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[Pt.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[Pt.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[Pt.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,l){var f;l&&((f=this.performanceClient)==null||f.addQueueMeasurement(l,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 l,d,f;Yn.preProcess(this.cacheManager,e);let s;try{s=await U(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:((l=s.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:g[Pt.X_MS_HTTP_VERSION]||"",requestId:g[Pt.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof xc){const m=g.responseHeaders;throw m&&((f=this.performanceClient)==null||f.addFields({httpVerToken:m[Pt.X_MS_HTTP_VERSION]||"",requestId:m[Pt.X_MS_REQUEST_ID]||"",contentTypeHeader:m[Pt.CONTENT_TYPE]||void 0,contentLengthHeader:m[Pt.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof He?g:B(Sy)}return Yn.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 uC(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new ca(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 hc="no_tokens_found",dC="native_account_unavailable",ch="refresh_token_expired",fx="interaction_required",gx="consent_required",mx="login_required",Dc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const cp=[fx,gx,mx,Dc],px=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],vx={[hc]:"No refresh token found in the cache. Please sign-in.",[dC]:"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.",[ch]:"Refresh token has expired.",[Dc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Vn extends He{constructor(e,t,n,i,s,l,d,f){super(e,t,n),Object.setPrototypeOf(this,Vn.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=l||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function lp(r,e,t){const n=!!r&&cp.indexOf(r)>-1,i=!!t&&px.indexOf(t)>-1,s=!!e&&cp.some(l=>e.indexOf(l)>-1);return n||s||i}function md(r){return new Vn(r,vx[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Un{static setRequestState(e,t,n){const i=Un.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw B(ud);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 B(ud);if(!t)throw B(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,l=e.base64Decode(i),d=JSON.parse(l);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw B(hi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const yx={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 U(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:yx.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:l,shrClaims:d,shrNonce:f,shrOptions:g}=n,m=l?new ye(l):void 0,v=m==null?void 0:m.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:rr(),m:s==null?void 0:s.toUpperCase(),u:v==null?void 0:v.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:v==null?void 0:v.AbsolutePath,q:v!=null&&v.QueryString?[[],v.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Cx{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 wx(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 po{constructor(e,t,n,i,s,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?B(ac,"Cached State"):B(ac,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw B(hi,e.state)}try{i=decodeURIComponent(t)}catch{throw B(hi,e.state)}if(n!==i)throw B(Iy);if(e.error||e.error_description||e.suberror){const s=wx(e);throw lp(e.error,e.error_description,e.suberror)?new Vn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new Gr(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,l=new Gr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=Ss.SERVER_ERROR_RANGE_START&&e.status<=Ss.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
|
55
55
|
${l}`);return}else if(t&&e.status&&e.status>=Ss.CLIENT_ERROR_RANGE_START&&e.status<=Ss.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
|
56
|
-
${l}`);return}throw lp(e.error,e.error_description,e.suberror)?new Un(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):l}}async handleServerTokenResponse(e,t,n,i,s,l,d,f,g){var T;(T=this.performanceClient)==null||T.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let m;if(e.id_token){if(m=wo(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&m.nonce!==s.nonce)throw B(ky);if(i.maxAge||i.maxAge===0){const I=m.auth_time;if(!I)throw B(Wd);Fy(I,i.maxAge)}}this.homeAccountIdentifier=at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,m);let y;s&&s.state&&(y=Bn.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,m,l,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new Cx(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const I=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(I,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,y,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 po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,y,e,g)}generateCacheRecord(e,t,n,i,s,l,d){const f=t.getPreferredCache();if(!f)throw B(Gd);const g=nC(s);let m,y;e.id_token&&s&&(m=Oc(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),y=lh(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 I=e.scope?Je.fromString(e.scope):new Je(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,F=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,H=n+N,z=H+K,Q=F&&F>0?n+F:void 0;C=Nc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",I.printScopes(),H,z,this.cryptoObj.base64Decode,Q,e.token_type,l,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let I;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;I=n+N}S=Hy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,l,I)}let T=null;return e.foci&&(T={clientId:this.clientId,environment:f,familyId:e.foci}),{account:y,idToken:m,accessToken:C,refreshToken:S,appMetadata:T}}static async generateAuthenticationResult(e,t,n,i,s,l,d,f,g){var H,z,Q,we,W;let m=P.EMPTY_STRING,y=[],C=null,S,T,I=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Oe.POP&&!s.popKid){const tt=new gi(e),{secret:Te,keyId:Y}=n.accessToken;if(!Y)throw B(jd);m=await tt.signPopToken(Te,Y,s)}else m=n.accessToken.secret;y=Je.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&&(I=n.appMetadata.familyId===aa?aa:"");const N=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",K=(l==null?void 0:l.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const F=n.account?rh(n.account.getAccountInfo(),void 0,l,(H=n.idToken)==null?void 0:H.secret):null;return{authority:t.canonicalAuthority,uniqueId:N,tenantId:K,scopes:y,account:F,idToken:((z=n==null?void 0:n.idToken)==null?void 0:z.secret)||"",idTokenClaims:l||{},accessToken:m,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:T,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:I,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 lh(r,e,t,n,i,s,l,d,f,g,m){m==null||m.verbose("setCachedAccount called");const C=r.getAccountKeys().find(K=>K.startsWith(t));let S=null;C&&(S=r.getAccount(C,m));const T=S||at.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:l,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),I=T.tenantProfiles||[],N=d||T.realm;if(N&&!I.find(K=>K.tenantId===N)){const K=nh(t,T.localAccountId,N,i);I.push(K)}return T.tenantProfiles=I,T}/*! @azure/msal-common v14.16.0 2024-11-05 */async function hC(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class fC extends sh{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 U(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 B(Ny);const n=nr(),i=await U(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Nt.X_MS_REQUEST_ID],l=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(i.body),U(l.handleServerTokenResponse.bind(l),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 po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw B(Ly);return e}getLogoutUri(e){if(!e)throw Pe(jy);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,m;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await U(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const y=cc(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${y.uid}${At.CLIENT_INFO_SEPARATOR}${y.utid}`,type:rn.HOME_ACCOUNT_ID}}catch(y){this.logger.verbose("Could not parse client info for CCS Header: "+y)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),f={clientId:((m=t.tokenBodyParameters)==null?void 0:m.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 U(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 ca(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||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&&!fd(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 l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await hC(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(wy.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Oe.POP){const l=new gi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await U(l.generateCnf.bind(l),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Pe(Pc);(!Ln.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 l=cc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${l.uid}${At.CLIENT_INFO_SEPARATOR}${l.utid}`,type:rn.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case rn.HOME_ACCOUNT_ID:try{const l=ii(n.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}break;case rn.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[ap])&&t.addExtraQueryParameters({[ap]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new ca(t,this.performanceClient);n.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[mo])||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),fd(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!==dt.SELECT_ACCOUNT)if(e.sid&&e.prompt===dt.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===dt.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===Oe.POP)){const d=new gi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await U(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 ca(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 _x=300;class pd extends sh{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=nr(),n=await U(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Nt.X_MS_REQUEST_ID],s=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),U(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 Pe(Gy);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw B(qd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await U(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Un&&i.errorCode===hc,l=i instanceof Gr&&i.errorCode===qm.INVALID_GRANT_ERROR&&i.subError===qm.CLIENT_MISMATCH_ERROR;if(s||l)return U(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return U(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=_o(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 md(hc);if(n.expiresOn&&hd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||_x))throw md(ch);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Oe.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:rn.HOME_ACCOUNT_ID}};try{return await U(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(l){if(l instanceof Un&&l.subError===Dc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=oi(n);this.cacheManager.removeRefreshToken(d)}throw l}}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 U(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=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 U(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,l,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new ca(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),n.addGrantType(wy.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!fd(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 hC(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Oe.POP){const d=new gi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await U(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Pe(Pc);if((!Ln.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 rn.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 rn.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 Tx extends sh{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:[...vi]});return i===Lr.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 pd(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Rc&&n.errorCode===pr)return new pd(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=Lr.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Ln.isEmptyObj(e.claims))throw this.setCacheOutcome(Lr.FORCE_REFRESH_OR_CLAIMS,e.correlationId),B(pr);if(!e.account)throw B(qd);const n=e.account.tenantId||dx(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if(Q1(s.cachedAt)||hd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Lr.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),B(pr);s.refreshOn&&hd(s.refreshOn,0)&&(t=Lr.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Lr.NO_CACHED_ACCESS_TOKEN,e.correlationId),B(pr);const l=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(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await U(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!==Lr.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=wo(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw B(Wd);Fy(s,t.maxAge)}return po.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ex={sendGetRequestAsync:()=>Promise.reject(B(ge)),sendPostRequestAsync:()=>Promise.reject(B(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const up=",",gC="|";function Sx(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,l=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(up),d.length<4)return e}else d=Array.from({length:4},()=>gC);return l.forEach((f,g)=>{var m,y;f.length===2&&((m=f[0])!=null&&m.length)&&((y=f[1])!=null&&y.length)&&Ax({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(up)}function Ax(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(gC))}class ga{constructor(e,t){this.cacheOutcome=Lr.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=pt.CACHE_KEY+At.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${pt.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(pt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),l=[e,s].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,l,i].join(pt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=ga.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(pt.VALUE_SEPARATOR),s=e.errors.length,l=t<s?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,d=[s,l].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(pt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=pt.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 He?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(pt.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=ga.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 l=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+=l.toString().length+d.toString().length+f.length+3,i<pt.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 Sx(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const mC="missing_kid_error",pC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const bx={[mC]:"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.",[pC]:"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 uh extends He{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,uh.prototype)}}function dp(r){return new uh(r,bx[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class dh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw dp(mC);if(!e.alg)throw dp(pC);const t=new dh({typ:e.typ||D1.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class hp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Ix{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:ux.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new hp}}startPerformanceMeasurement(){return new hp}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 hh="pkce_not_created",vd="crypto_nonexistent",Lc="empty_navigate_uri",vC="hash_empty_error",fh="no_state_in_hash",yC="hash_does_not_contain_known_properties",CC="unable_to_parse_state",wC="state_interaction_type_mismatch",_C="interaction_in_progress",TC="popup_window_error",EC="empty_window_error",vo="user_cancelled",kx="monitor_popup_timeout",SC="monitor_window_timeout",AC="redirect_in_iframe",bC="block_iframe_reload",IC="block_nested_popups",Rx="iframe_closed_prematurely",Bc="silent_logout_unsupported",kC="no_account_error",Ox="silent_prompt_value_error",RC="no_token_request_cache_error",OC="unable_to_parse_token_request_cache_error",gh="no_cached_authority_error",Nx="auth_request_not_set_error",Px="invalid_cache_type",Uc="non_browser_environment",Xo="database_not_open",fc="no_network_connectivity",NC="post_request_failed",PC="get_request_failed",yd="failed_to_parse_response",MC="unable_to_load_token",mh="crypto_key_not_found",xC="auth_code_required",DC="auth_code_or_nativeAccountId_required",LC="spa_code_and_nativeAccountId_present",ph="database_unavailable",BC="unable_to_acquire_token_from_native_platform",UC="native_handshake_timeout",VC="native_extension_not_installed",Ea="native_connection_not_established",FC="uninitialized_public_client_application",HC="native_prompt_not_supported",$C="invalid_base64_string",KC="invalid_pop_token_request",zC="failed_to_build_headers",WC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const gr="For more visit: aka.ms/msaljs/browser-errors",Mx={[hh]:"The PKCE code challenge and verifier could not be generated.",[vd]:"The crypto object or function is not available.",[Lc]:"Navigation URI is empty. Please check stack trace for more info.",[vC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${gr}`,[fh]:"Hash does not contain state. Please verify that the request originated from msal.",[yC]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${gr}`,[CC]:"Unable to parse state. Please verify that the request originated from msal.",[wC]:"Hash contains state but the interaction type does not match the caller.",[_C]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${gr}`,[TC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[EC]:"window.open returned null or undefined window object.",[vo]:"User cancelled the flow.",[kx]:`Token acquisition in popup failed due to timeout. ${gr}`,[SC]:`Token acquisition in iframe failed due to timeout. ${gr}`,[AC]:"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.",[bC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${gr}`,[IC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Rx]:"The iframe being monitored was closed prematurely.",[Bc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[kC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Ox]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[RC]:"No token request found in cache.",[OC]:"The cached token request could not be parsed.",[gh]:"No cached authority found.",[Nx]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Px]:"Invalid cache type",[Uc]:"Login and token requests are not supported in non-browser environments.",[Xo]:"Database is not open!",[fc]:"No network connectivity. Check your internet connection.",[NC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[PC]:"Network request failed. Please check the network trace to determine root cause.",[yd]:"Failed to parse network response. Check network trace.",[MC]:"Error loading token to cache.",[mh]:"Cryptographic Key or Keypair not found in browser storage.",[xC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[DC]:"An authorization code or nativeAccountId must be provided to this flow.",[LC]:"Request cannot contain both spa code and native account id.",[ph]:"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.",[BC]:`Unable to acquire token from native platform. ${gr}`,[UC]:"Timed out while attempting to establish connection to browser extension",[VC]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Ea]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${gr}`,[FC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${gr}`,[HC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[$C]:"Invalid base64 encoded string.",[KC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[zC]:"Failed to build request headers object.",[WC]:"Failed to parse response headers"};class Sa extends He{constructor(e,t){super(e,Mx[e],t),Object.setPrototypeOf(this,Sa.prototype),this.name="BrowserAuthError"}}function j(r,e){return new Sa(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"},fp={GET:"GET",POST:"POST"},ke={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"},Rs={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},Le={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 gp={scopes:vi},qC="jwk",Cd="msal.db",xx=1,Dx=`${Cd}.keys`,Xt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},Lx=[Xt.Default,Xt.Skip,Xt.RefreshTokenAndNetwork],Bx="msal.browser.log.level",Ux="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Os(r){return encodeURIComponent(vh(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Vc(r){return GC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function vh(r){return GC(new TextEncoder().encode(r))}function GC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Vx="RSASSA-PKCS1-v1_5",jC="SHA-256",Fx=2048,Hx=new Uint8Array([1,0,1]),mp="0123456789abcdef",pp=new Uint32Array(1),$x="crypto_subtle_undefined",yh={name:Vx,hash:jC,modulusLength:Fx,publicExponent:Hx};function Kx(r){if(!window)throw j(Uc);if(!window.crypto)throw j(vd);if(!r&&!window.crypto.subtle)throw j(vd,$x)}async function YC(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(jC,i)}function zx(r){return window.crypto.getRandomValues(r)}function Lu(){return window.crypto.getRandomValues(pp),pp[0]}function Tr(){const r=Date.now(),e=Lu()*1024+(Lu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Lu();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 l="";for(let d=0;d<t.length;d++)l+=mp.charAt(t[d]>>>4),l+=mp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function Wx(r,e){return window.crypto.subtle.generateKey(yh,r,e)}async function Bu(r){return window.crypto.subtle.exportKey(qC,r)}async function qx(r,e,t){return window.crypto.subtle.importKey(qC,r,yh,e,t)}async function Gx(r,e){return window.crypto.subtle.sign(yh,r,e)}async function JC(r){const e=await YC(r),t=new Uint8Array(e);return Vc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ma="storage_not_supported",wd="stubbed_public_client_application_called",gc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const qs={[ma]:"Given storage configuration option was not supported.",[wd]:"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",[gc]:"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."};qs[ma],qs[wd],qs[gc];class Ch extends He{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Ch.prototype)}}function wh(r){return new Ch(r,qs[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function jx(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function Yx(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function _h(){return window.parent!==window}function Jx(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${en.POPUP_NAME_PREFIX}.`)===0}function vr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Qx(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function Xx(){if(ye.hashContainsKnownProperties(window.location.hash)&&_h())throw j(bC)}function Zx(r){if(_h()&&!r)throw j(AC)}function eD(){if(Jx())throw j(IC)}function QC(){if(typeof window>"u")throw j(Uc)}function XC(r){if(!r)throw j(FC)}function Th(r){QC(),Xx(),eD(),XC(r)}function vp(r,e){if(Th(r),Zx(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ft.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw wh(gc)}function ZC(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 tD(){return Tr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mc{navigateInternal(e,t){return mc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return mc.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 nD{async sendGetRequestAsync(e,t){let n,i={},s=0;const l=yp(t);try{n=await fetch(e,{method:fp.GET,headers:l})}catch{throw j(window.navigator.onLine?PC:fc)}i=Cp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw sp(j(yd),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=yp(t);let s,l=0,d={};try{s=await fetch(e,{method:fp.POST,headers:i,body:n})}catch{throw j(window.navigator.onLine?NC:fc)}d=Cp(s.headers);try{return l=s.status,{headers:d,body:await s.json(),status:l}}catch{throw sp(j(yd),l,d)}}}function yp(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(zC)}}function Cp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw j(WC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const rD=6e4,_d=1e4,oD=3e4,iD=2e3;function aD({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"?vr():"",postLogoutRedirectUri:P.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:wr.AAD,OIDCOptions:{serverResponseType:Ta.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Jd.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:Ft.SessionStorage,temporaryCacheLocation:Ft.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ft.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:xe.Info,piiLoggingEnabled:!1},g={...{...sC,loggerOptions:d,networkClient:i?new nD:Ex,navigationClient:new mc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||rD,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||_d,navigateFrameWait:0,redirectNavigationTimeout:oD,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||iD,pollIntervalMilliseconds:en.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},m={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new Ix};if((r==null?void 0:r.protocolMode)!==wr.OIDC&&(r!=null&&r.OIDCOptions)&&new qr(g.loggerOptions).warning(JSON.stringify(Pe(Zy))),r!=null&&r.protocolMode&&r.protocolMode!==wr.AAD&&(g!=null&&g.allowNativeBroker))throw Pe(eC);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...l,...e},system:g,telemetry:{...m,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const sD="@azure/msal-browser",Fc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class Eh{static loggerCallback(e,t){switch(e){case xe.Error:console.error(t);return;case xe.Info:console.info(t);return;case xe.Verbose:console.debug(t);return;case xe.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=aD(e,this.browserEnvironment);let t;try{t=window[Ft.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(Bx),i=(f=t==null?void 0:t.getItem(Ux))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=n&&Object.keys(xe).includes(n)?xe[n]:void 0;d&&(l.loggerCallback=Eh.loggerCallback,l.logLevel=d),s!==void 0&&(l.piiLoggingEnabled=s),this.logger=new qr(l,sD,Fc),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 yo extends Eh{getModuleName(){return yo.MODULE_NAME}getId(){return yo.ID}async initialize(){return this.available=typeof window<"u",this.available}}yo.MODULE_NAME="";yo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function er(r){return new TextDecoder().decode(cD(r))}function cD(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($C)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class lD{constructor(){this.dbName=Cd,this.version=xx,this.tableName=Dx,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(ph)))})}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 l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),l.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 l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.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",l=>{const d=l;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),l.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(Cd),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 Td{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 uD{constructor(e){this.inMemoryCache=new Td,this.indexedDBCache=new lD,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Sa&&e.errorCode===ph)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,Kx(n??!1),this.cache=new uD(this.logger),this.performanceClient=t}createNewGuid(){return Tr()}base64Encode(e){return vh(e)}base64Decode(e){return er(e)}base64UrlEncode(e){return Os(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var m;const t=(m=this.performanceClient)==null?void 0:m.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await Wx(mi.EXTRACTABLE,mi.POP_KEY_USAGES),i=await Bu(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},l=wp(s),d=await this.hashString(l),f=await Bu(n.privateKey),g=await qx(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 H;const s=(H=this.performanceClient)==null?void 0:H.startMeasurement(k.CryptoOptsSignJwt,i),l=await this.cache.getItem(t);if(!l)throw j(mh);const d=await Bu(l.publicKey),f=wp(d),g=Os(JSON.stringify({kid:t})),m=dh.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),y=Os(m);e.cnf={jwk:JSON.parse(f)};const C=Os(JSON.stringify(e)),S=`${y}.${C}`,I=new TextEncoder().encode(S),N=await Gx(l.privateKey,I),K=Vc(new Uint8Array(N)),F=`${S}.${K}`;return s&&s.end({success:!0}),F}async hashString(e){return JC(e)}}mi.POP_KEY_USAGES=["sign","verify"];mi.EXTRACTABLE=!0;function wp(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class dD{constructor(){if(!window.localStorage)throw wh(ma)}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 hD{constructor(){if(!window.sessionStorage)throw wh(ma)}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 ew(r,e){if(!e)return null;try{return Bn.parseRequestState(r,e).libraryState.meta}catch{throw B(hi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const fD=24*60*60*1e3;class gD{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[l,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(l===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const l=mD(n);s+=`expires=${l};`}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 mD(r){const e=new Date;return new Date(e.getTime()+r*fD).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ed extends fi{constructor(e,t,n,i,s,l){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new Td,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new gD,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case Ft.LocalStorage:return new dD;case Ft.SessionStorage:return new hD;case Ft.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ft.MemoryStorage,new Td}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${ct.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${ct.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${ct.ERROR}`,i=`${P.CACHE_PREFIX}.${ct.ERROR_DESC}`,s=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,l,d,f];[ct.ID_TOKEN,ct.CLIENT_INFO,ct.ERROR,ct.ERROR_DESC].forEach((y,C)=>{const S=g[C];S&&this.setTemporaryCache(y,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 l=this.validateAndParseJson(s);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case re.ID_TOKEN:if(Qm(l)){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=l,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(Jm(l)){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=l,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(Xm(l)){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=l,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 l=this.validateAndParseJson(s);l&&at.isAccountEntity(l)&&(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||!at.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):fi.toObject(new at,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}`),B(dd)}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 l=n.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(l,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}`),B(dd)}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||!Qm(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||!Jm(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||!Xm(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||!aM(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=iM(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||!rM(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&&sM(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(Rs.WRAPPER_SKU,e),this.internalStorage.setItem(Rs.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Rs.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(Rs.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(ct.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(ct.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:s});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):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(ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(ct.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||!oM(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 l=this.getAccessTokenCredential(s);l!=null&&l.requestedClaimsHash&&s.includes(l.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):Ln.startsWith(e,P.CACHE_PREFIX)||Ln.startsWith(e,ct.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Bn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Bn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Bn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.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 l=this.generateStateKey(e);this.setTemporaryCache(l,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:rn.HOME_ACCOUNT_ID};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:rn.UPN};this.setTemporaryCache(ke.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(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.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(ke.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=ew(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=vh(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw j(RC);let n;try{n=JSON.parse(er(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),j(OC)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw j(gh);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.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}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw j(_C);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(ct.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(ct.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=wo(n,er);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=Oc((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=Nc((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,er,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),l={idToken:n,accessToken:s};return this.saveCacheRecord(l)}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 pD=(r,e)=>{const t={cacheLocation:Ft.MemoryStorage,temporaryCacheLocation:Ft.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Ed(r,t,sc,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function vD(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function yD(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 CD(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 wD(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 _D(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 TD(r,e){e.setActiveAccount(r)}function ED(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 SD{constructor(e){this.eventCallbacks=new Map,this.logger=e||new qr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||tD();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(([l,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),l.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tw{constructor(e,t,n,i,s,l,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=l,this.nativeMessageHandler=f,this.correlationId=g||Tr(),this.logger=i.clone(en.MSAL_SKU,Fc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){at.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(at.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,vr())}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 ga(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,l=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=Et.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await U(uC,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 Pe(tC);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const AD=32;async function bD(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=_o(ID,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await U(kD,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function ID(r,e,t){try{const n=new Uint8Array(AD);return _o(zx,k.GetRandomValues,e,r,t)(n),Vc(n)}catch{throw j(hh)}}async function kD(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await U(YC,k.Sha256Digest,t,e,n)(r,e,n);return Vc(new Uint8Array(i))}catch{throw j(hh)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function Sh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],l={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!l.authenticationScheme)l.authenticationScheme=Oe.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===Oe.SSH){if(!r.sshJwk)throw Pe(Pc);if(!r.sshKid)throw Pe(Xy)}n.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Ln.isEmptyObj(r.claims)&&(l.requestedClaimsHash=await JC(r.claims)),l}async function RD(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await U(Sh,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 yi extends tw{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await U(bD,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||Tr(),...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,vr())):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,vr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(vr(),vr())):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 U(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new fC(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await U(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}),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:Fc,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=Bn.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await U(Sh,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||Tr(),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 OD="ContentError",nw="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const ND="USER_INTERACTION_REQUIRED",PD="USER_CANCEL",MD="NO_NETWORK",xD="PERSISTENT_ERROR",DD="DISABLED",LD="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const BD=-2147186943,UD={[nw]:"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 Yn extends He{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Yn.prototype),this.name="NativeAuthError",this.ext=n}}function Zo(r){if(r.ext&&r.ext.status&&(r.ext.status===xD||r.ext.status===DD)||r.ext&&r.ext.error&&r.ext.error===BD)return!0;switch(r.errorCode){case OD:return!0;default:return!1}}function Sd(r,e,t){if(t&&t.status)switch(t.status){case LD:return md(dC);case ND:return new Un(r,e);case PD:return j(vo);case MD:return j(fc)}return new Yn(r,UD[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class rw extends yi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),n=await U(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 Tx(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await U(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(s){throw s instanceof Sa&&s.errorCode===mh&&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 tw{constructor(e,t,n,i,s,l,d,f,g,m,y,C){var T;super(e,t,n,i,s,l,f,g,C),this.apiId=d,this.accountId=m,this.nativeMessageHandler=g,this.nativeStorageManager=y,this.silentCacheClient=new rw(e,this.nativeStorageManager,n,i,s,l,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=ga.makeExtraSkuString({libraryName:en.MSAL_SKU,libraryVersion:Fc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[ix]: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=nr();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,l={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(l),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 Yn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Je.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),B(ld);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw B(ld);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),l={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:l}}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 Yn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),Zo(f)))throw f}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(i),!0);const l={apiId:Le.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,l)}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(ke.NATIVE_REQUEST));const l={method:uo.GetToken,request:s},d=nr();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const m=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),m}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 m;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=wo(e.id_token,er),s=this.createHomeAccountIdentifier(e,i),l=(m=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:m.homeAccountId;if(s!==l&&e.account.id!==t.accountId)throw Sd(nw);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=lh(this.browserStorage,d,s,er,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 at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,Mn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Je.fromString(e.scope):Je.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Oe.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 B(jd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,l){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Je.fromString(e.scope):Je.fromString(t.scope),g=e.account.properties||{},m=g.UID||n.oid||n.sub||P.EMPTY_STRING,y=g.TenantId||n.tid||P.EMPTY_STRING,C=rh(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===Oe.POP?Oe.POP:Oe.BEARER;return{authority:s,uniqueId:m,tenantId:y,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+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,l,d){const f=Oc(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Oe.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=d+g,y=this.generateScopes(e,t),C=Nc(n,t.authority,s,t.clientId,i.tid||l,y.printScopes(),m,0,er,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 _y($d,"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,l=new Je(i||[]);l.appendScopes(vi);const d=()=>{switch(this.apiId){case Le.ssoSilent:case Le.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),dt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.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(HC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:l.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===Oe.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},m=new gi(this.browserCrypto);let y;if(f.keyId)y=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await U(m.generateCnf.bind(m),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);y=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=y}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(ah)&&e.extraParameters.hasOwnProperty(gd)&&e.extraParameters.hasOwnProperty(mo);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[gd],n=e.extraParameters[mo]),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 Jn{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:Tr(),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 Jn(e,t,n,ai.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Jn(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:Tr(),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(UC)),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(VC))}}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 l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")n.reject(Sd(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?n.reject(Sd(l.result.code,l.result.description,l.result.ext)):n.resolve(l.result);else throw _y($d,"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 Oe.BEARER:case Oe.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 Ah{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 Gr&&i.subError===vo?j(vo):i}return U(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 U(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 U(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:rn.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:rn.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function ow(r,e,t){const n=uc(r);if(!n)throw rC(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(yC)):(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(vC));return n}function VD(r,e,t){if(!r.state)throw j(fh);const n=ew(e,r.state);if(!n)throw j(CC);if(n.interactionType!==t)throw j(wC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class FD extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||vi,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(Le.acquireTokenPopup),i=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Popup);ZC(i.authority);try{const l=await U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await U(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=Jn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const m=await d.getAuthCodeUrl({...i,nativeBroker:f}),y=new Ah(d,this.browserStorage,l,this.logger,this.performanceClient),C=this.initiateAuthRequest(m,t);this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),T=_o(ow,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,l),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(Ea);const N=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,T.accountId,this.nativeStorage,i.correlationId),{userRequestState:K}=Bn.parseRequestState(this.browserCrypto,i.state);return await N.acquireToken({...i,state:K,prompt:void 0})}return await y.handleCodeResponse(T,i)}catch(l){throw(s=t.popup)==null||s.close(),l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,n,i){var l,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ne.LOGOUT_START,X.Popup,e);const s=this.initializeServerTelemetryManager(Le.logoutPopup);try{await this.clearCacheOnLogout(e.account);const m=await U(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{m.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&m.authority.protocolMode===wr.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:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,vr());await this.navigationClient.navigateInternal(T,S)}(f=t.popup)==null||f.close();return}}const y=m.getLogoutUri(e);this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e);const C=this.openPopup(y,t);if(this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},T=ye.getAbsoluteUrl(i,vr());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(m){throw(g=t.popup)==null||g.close(),m instanceof He&&(m.setCorrelationId(this.correlationId),s.cacheFailedRequest(m)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Popup,null,m),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup),m}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(Lc)}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(vo));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===Ta.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(EC);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(TC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,T,I,N;const s=i.screenLeft?i.screenLeft:i.screenX,l=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,m=(T=n.popupSize)==null?void 0:T.height,y=(I=n.popupPosition)==null?void 0:I.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),(!m||m<0||m>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=en.POPUP_HEIGHT),(!y||y<0||y>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),y=Math.max(0,f/2-en.POPUP_HEIGHT/2+l)),(!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=${m}, top=${y}, 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 _p{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(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:Le.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(Lc)}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 B(ac,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof Gr&&g.subError===vo?j(vo):g}const l=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await U(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(ke.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 HD(){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 $D extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.nativeStorage=f}async acquireToken(e){const t=await U(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(Le.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 U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await U(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 _p(l,this.browserStorage,s,this.logger,this.performanceClient),f=await l.getAuthCodeUrl({...t,nativeBroker:Jn.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 He&&(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(Le.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),HD()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(l),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&Yx(l),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!_h()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,s,!0);const g={apiId:Le.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let m=!0;if(!l||l==="null"){const y=Qx();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,y,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),m=await this.navigationClient.navigateInternal(y,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),m=await this.navigationClient.navigateInternal(l,g);if(!m)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 He&&(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===Ta.QUERY?t=window.location.search:t=window.location.hash);let n=uc(t);if(n){try{VD(n,this.browserCrypto,X.Redirect)}catch(s){return s instanceof He&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return jx(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),i&&(n=uc(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(fh);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(Ea);const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Bn.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(gh);const l=await U(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 _p(l,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(Le.logout);try{this.eventHandler.emitEvent(ne.LOGOUT_START,X.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:Le.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await U(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===wr.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,l);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,l);return}}catch(l){throw l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Redirect,null,l),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect),l}this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ye.getAbsoluteUrl(t,vr())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function KD(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),j(Lc);return i?U(WD,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):_o(qD,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function zD(r,e,t,n,i,s,l){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<_d&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${_d}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(m),f(j(SC))},e),m=window.setInterval(()=>{let y="";const C=r.contentWindow;try{y=C?C.location.href:""}catch{}if(!y||y==="about:blank")return;let S="";C&&(l===Ta.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(m),d(S)},t)}).finally(()=>{_o(GD,k.RemoveHiddenIframe,i,n,s)(r)})}function WD(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const l=iw();window.setTimeout(()=>{if(!l){s("Unable to load iframe");return}l.src=r,i(l)},e)})}function qD(r){const e=iw();return e.src=r,e}function iw(){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 GD(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class jD extends yi{constructor(e,t,n,i,s,l,d,f,g,m,y){super(e,t,n,i,s,l,f,m,y),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!==dt.NONE&&t.prompt!==dt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${dt.NONE}`),t.prompt=dt.NONE):t.prompt=dt.NONE;const n=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);ZC(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await U(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 U(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(l){if(l instanceof He&&(l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l)),!s||!(l instanceof He)||l.errorCode!==en.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);return await U(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(j(Bc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await U(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Jn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Ah(e,this.browserStorage,i,this.logger,this.performanceClient),d=await U(KD,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 U(zD,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),m=_o(ow,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(Ea);const y=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,m.accountId,this.browserStorage,n),{userRequestState:C}=Bn.parseRequestState(this.browserCrypto,t.state);return U(y.acquireToken.bind(y),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||dt.NONE})}return U(l.handleCodeResponse.bind(l),k.HandleCodeResponse,this.logger,this.performanceClient,n)(m,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class YD extends yi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await U(Sh,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(Le.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return U(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(l=>{throw l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),l})}logout(){return Promise.reject(j(Bc))}async createRefreshTokenClient(e){const t=await U(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 pd(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class JD{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(Uc);const i=t.id_token?wo(t.id_token,er):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},l=e.authority?new Et(Et.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Tr()):void 0,d=this.loadAccount(e,n.clientInfo||t.client_info||"",i,l),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),m=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:m},i,l)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=at.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(MC);const s=at.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),l=n==null?void 0:n.tid,d=lh(this.storage,i,s,er,n,t,i.hostnameAndPort,l,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=Oc(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,l){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?Je.fromString(t.scope):new Je(e.scopes),f=l.expiresOn||t.expires_in+new Date().getTime()/1e3,g=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,m=Nc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,er);return this.storage.setAccessTokenCredential(m),m}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=Hy(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 m,y,C;let s="",l=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,l=Je.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:l,account:g.getAccountInfo(),idToken:((m=t.idToken)==null?void 0:m.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((y=t.refreshToken)==null?void 0:y.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 QD extends fC{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class XD extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,f,g,m),this.apiId=d}async acquireToken(e){if(!e.code)throw j(xC);const t=await U(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 U(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}),l=new QD(s);this.logger.verbose("Auth code client created");const d=new Ah(l,this.browserStorage,i,this.logger,this.performanceClient);return await U(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 He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(j(Bc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Wn(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 Ns(r,e){try{Th(r)}catch(t){throw e.end({success:!1},t),t}}class Hc{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):sc,this.eventHandler=new SD(this.logger),this.browserStorage=this.isBrowserEnvironment?new Ed(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,hx(this.config.auth),this.performanceClient):pD(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 Ed(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new JD(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 Hc(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 Jn.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 U(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"),XC(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&&Jn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",l=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,Le.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=U(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=U(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}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")),l.end({success:!0,accountType:Wn(f.account)})):l.event.errorCode?l.end({success:!1}):l.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),l.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:Wn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=l=>{const d=typeof i=="function"?i(l):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof l=="function"?l(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{vp(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 l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Yn&&Zo(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Un)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}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw n.end({success:!1},l),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,l):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:Wn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Ns(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}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},Le.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:Wn(l.account)}),l)).catch(l=>{if(l instanceof Yn&&Zo(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Un)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),l}):s=this.createPopupClient(t).acquireToken(e),s.then(l=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Popup,l):this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Popup,l),n.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Wn(l.account)}),l)).catch(l=>(i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Popup,null,l):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Popup,null,l),n.end({success:!1},l),Promise.reject(l)))}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,l;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:Wn(e.account)}),Ns(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.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,Le.ssoSilent).catch(d=>{if(d instanceof Yn&&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:Wn(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);Ns(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(LC);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(l=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_SUCCESS,X.Silent,l),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Wn(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,l),n.end({success:!1},l),l}),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},Le.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Yn&&Zo(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:Wn(i.account),success:!0}),i}else throw j(BC);else throw j(DC)}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 l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.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 Xt.Default:case Xt.AccessToken:case Xt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return U(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(pr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Xt.Default:case Xt.AccessTokenAndRefreshToken:case Xt.RefreshToken:case Xt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return U(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(pr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return U(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 vp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Th(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 vD(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return yD(e,this.logger,this.browserStorage)}getAccountByUsername(e){return CD(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return wD(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return _D(e,this.logger,this.browserStorage)}setActiveAccount(e){TD(e,this.browserStorage)}getActiveAccount(){return ED(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=at.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(Ea);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"),!Jn.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 dt.NONE:case dt.CONSENT:case dt.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 FD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new $D(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new jD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new rw(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new YD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new XD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return QC(),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(ct.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"||!at.isAccountEntity(i))return;const l=fi.toObject(new at,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,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_REMOVED,void 0,l))}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?Tr():P.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||gp})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||gp})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Ns(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw j(kC);n.add({accountType:Wn(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},l=JSON.stringify(s),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=U(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(l),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(l),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(l,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 U(RD,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Xt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(ZD(d,s))if(this.activeIframeRequest)if(s!==Xt.Skip){const[g,m]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${m}`,i.correlationId);const y=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);y.add({awaitIframeCorrelationId:m});const C=await g;if(y.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${m} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${m} 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),U(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(m=>{g=m}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),U(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(m=>(g(!0),m)).catch(m=>{throw g(!1),m}).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 Jn.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,Le.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Yn&&Zo(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,B(pr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),U(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Xt.AccessToken)throw n;return this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_NETWORK_START,X.Silent,e),U(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function ZD(r,e){const t=!(r instanceof Un&&r.subError!==Dc),n=r.errorCode===en.INVALID_GRANT_ERROR||r.errorCode===pr,i=t&&n||r.errorCode===hc||r.errorCode===ch,s=Lx.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function eL(r,e){const t=new yo(r);return await t.initialize(),Hc.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class bh{static async createPublicClientApplication(e){const t=await eL(e);return new bh(e,t)}constructor(e,t){this.controller=t||new Hc(new yo(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 Uu=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",tL=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",nL=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",rL=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",oL={auth:{clientId:tL,authority:`https://${Uu}.b2clogin.com/${Uu}.onmicrosoft.com/${nL}`,knownAuthorities:[`${Uu}.b2clogin.com`],redirectUri:rL},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===xe.Error&&console.error(e)},logLevel:xe.Warning}}},Br=new bh(oL),Tp=c.ref(null);function aw(){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),l=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} 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"),Tp.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:Tp,setJToken:r}}const iL=()=>process.env.JPLAN_WEBAPP__URL_AUTH||"http://localhost:5173/_/dashboard",Dr=c.ref(null);function sw(){const{setJToken:r}=aw(),e=c.computed(()=>!!Dr.value),t=c.computed(()=>Dr.value);async function n(){e.value||await i()}const i=async()=>new Promise((d,f)=>{try{localStorage.clear();const g=window.open(iL());if(!g){console.error("Failed to open authentication window"),f("Failed to open authentication window");return}const m=Date.now(),y=6e4,C=setInterval(()=>{if(Date.now()-m>y||g.closed){clearInterval(C),console.error("Authentication canceled or timeout reached."),f("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(T=>T.startsWith("msal.account.keys"))&&(clearInterval(C),s(),g.close(),d())},500)}catch(g){console.error("Error in handleRedirect:",g),f(g)}}),s=async()=>{try{await Br.initialize();const d=Br.getActiveAccount();if(d)Dr.value=d;else{const f=await Br.handleRedirectPromise();f?(Br.setActiveAccount(f.account),Dr.value=Br.getActiveAccount()):console.error("Falha na autenticação")}}catch(d){console.error("Erro no processo de autenticação:",d)}Dr.value&&await r(Dr.value)};async function l(){try{const d=await Br.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Br.setActiveAccount(d.account),await r(Dr.value)}catch(d){console.error("Falha ao renovar token, forçando novo login.",d),await n()}}return c.watch(Dr,async(d,f)=>{var m,y,C;if(((m=d==null?void 0:d.idTokenClaims)==null?void 0:m.exp)===((y=f==null?void 0:f.idTokenClaims)==null?void 0:y.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),I=(g-S-120)*1e3;I>0&&setTimeout(async()=>{await l()},I)}},{immediate:!0}),{isAuthenticated:e,account:t,handleRedirect:n}}function cw(r,e){return function(){return r.apply(e,arguments)}}const{toString:aL}=Object.prototype,{getPrototypeOf:Ih}=Object,$c=(r=>e=>{const t=aL.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Hn=r=>(r=r.toLowerCase(),e=>$c(e)===r),Kc=r=>e=>typeof e===r,{isArray:Ci}=Array,pa=Kc("undefined");function sL(r){return r!==null&&!pa(r)&&r.constructor!==null&&!pa(r.constructor)&&on(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const lw=Hn("ArrayBuffer");function cL(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&lw(r.buffer),e}const lL=Kc("string"),on=Kc("function"),uw=Kc("number"),zc=r=>r!==null&&typeof r=="object",uL=r=>r===!0||r===!1,Gs=r=>{if($c(r)!=="object")return!1;const e=Ih(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},dL=Hn("Date"),hL=Hn("File"),fL=Hn("Blob"),gL=Hn("FileList"),mL=r=>zc(r)&&on(r.pipe),pL=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||on(r.append)&&((e=$c(r))==="formdata"||e==="object"&&on(r.toString)&&r.toString()==="[object FormData]"))},vL=Hn("URLSearchParams"),[yL,CL,wL,_L]=["ReadableStream","Request","Response","Headers"].map(Hn),TL=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Aa(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),Ci(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),l=s.length;let d;for(n=0;n<l;n++)d=s[n],e.call(null,r[d],d,r)}}function dw(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,hw=r=>!pa(r)&&r!==ho;function Ad(){const{caseless:r}=hw(this)&&this||{},e={},t=(n,i)=>{const s=r&&dw(e,i)||i;Gs(e[s])&&Gs(n)?e[s]=Ad(e[s],n):Gs(n)?e[s]=Ad({},n):Ci(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Aa(arguments[n],t);return e}const EL=(r,e,t,{allOwnKeys:n}={})=>(Aa(e,(i,s)=>{t&&on(i)?r[s]=cw(i,t):r[s]=i},{allOwnKeys:n}),r),SL=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),AL=(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)},bL=(r,e,t,n)=>{let i,s,l;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)l=i[s],(!n||n(l,r,e))&&!d[l]&&(e[l]=r[l],d[l]=!0);r=t!==!1&&Ih(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},IL=(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},kL=r=>{if(!r)return null;if(Ci(r))return r;let e=r.length;if(!uw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},RL=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Ih(Uint8Array)),OL=(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])}},NL=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},PL=Hn("HTMLFormElement"),ML=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),Ep=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),xL=Hn("RegExp"),fw=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};Aa(t,(i,s)=>{let l;(l=e(i,s,r))!==!1&&(n[s]=l||i)}),Object.defineProperties(r,n)},DL=r=>{fw(r,(e,t)=>{if(on(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(on(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+"'")})}})},LL=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return Ci(r)?n(r):n(String(r).split(e)),t},BL=()=>{},UL=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,Vu="abcdefghijklmnopqrstuvwxyz",Sp="0123456789",gw={DIGIT:Sp,ALPHA:Vu,ALPHA_DIGIT:Vu+Vu.toUpperCase()+Sp},VL=(r=16,e=gw.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function FL(r){return!!(r&&on(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const HL=r=>{const e=new Array(10),t=(n,i)=>{if(zc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=Ci(n)?[]:{};return Aa(n,(l,d)=>{const f=t(l,i+1);!pa(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},$L=Hn("AsyncFunction"),KL=r=>r&&(zc(r)||on(r))&&on(r.then)&&on(r.catch),mw=((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",on(ho.postMessage)),zL=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||mw,O={isArray:Ci,isArrayBuffer:lw,isBuffer:sL,isFormData:pL,isArrayBufferView:cL,isString:lL,isNumber:uw,isBoolean:uL,isObject:zc,isPlainObject:Gs,isReadableStream:yL,isRequest:CL,isResponse:wL,isHeaders:_L,isUndefined:pa,isDate:dL,isFile:hL,isBlob:fL,isRegExp:xL,isFunction:on,isStream:mL,isURLSearchParams:vL,isTypedArray:RL,isFileList:gL,forEach:Aa,merge:Ad,extend:EL,trim:TL,stripBOM:SL,inherits:AL,toFlatObject:bL,kindOf:$c,kindOfTest:Hn,endsWith:IL,toArray:kL,forEachEntry:OL,matchAll:NL,isHTMLForm:PL,hasOwnProperty:Ep,hasOwnProp:Ep,reduceDescriptors:fw,freezeMethods:DL,toObjectSet:LL,toCamelCase:ML,noop:BL,toFiniteNumber:UL,findKey:dw,global:ho,isContextDefined:hw,ALPHABET:gw,generateString:VL,isSpecCompliantForm:FL,toJSONObject:HL,isAsyncFn:$L,isThenable:KL,setImmediate:mw,asap:zL};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 pw=ue.prototype,vw={};["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=>{vw[r]={value:r}});Object.defineProperties(ue,vw);Object.defineProperty(pw,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const l=Object.create(pw);return O.toFlatObject(r,l,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(l,r.message,e,t,n,i),l.cause=r,l.name=r.name,s&&Object.assign(l,s),l};const WL=null;function bd(r){return O.isPlainObject(r)||O.isArray(r)}function yw(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function Ap(r,e,t){return r?r.concat(e).map(function(i,s){return i=yw(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function qL(r){return O.isArray(r)&&!r.some(bd)}const GL=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function Wc(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(I,N){return!O.isUndefined(N[I])});const n=t.metaTokens,i=t.visitor||m,s=t.dots,l=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 m(T,I,N){let K=T;if(T&&!N&&typeof T=="object"){if(O.endsWith(I,"{}"))I=n?I:I.slice(0,-2),T=JSON.stringify(T);else if(O.isArray(T)&&qL(T)||(O.isFileList(T)||O.endsWith(I,"[]"))&&(K=O.toArray(T)))return I=yw(I),K.forEach(function(H,z){!(O.isUndefined(H)||H===null)&&e.append(l===!0?Ap([I],z,s):l===null?I:I+"[]",g(H))}),!1}return bd(T)?!0:(e.append(Ap(N,I,s),g(T)),!1)}const y=[],C=Object.assign(GL,{defaultVisitor:m,convertValue:g,isVisitable:bd});function S(T,I){if(!O.isUndefined(T)){if(y.indexOf(T)!==-1)throw Error("Circular reference detected in "+I.join("."));y.push(T),O.forEach(T,function(K,F){(!(O.isUndefined(K)||K===null)&&i.call(e,K,O.isString(F)?F.trim():F,I,C))===!0&&S(K,I?I.concat(F):[F])}),y.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return S(r),e}function bp(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function kh(r,e){this._pairs=[],r&&Wc(r,this,e)}const Cw=kh.prototype;Cw.append=function(e,t){this._pairs.push([e,t])};Cw.toString=function(e){const t=e?function(n){return e.call(this,n,bp)}:bp;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function jL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ww(r,e,t){if(!e)return r;const n=t&&t.encode||jL;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 kh(e,t).toString(n),s){const l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class Ip{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 _w={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YL=typeof URLSearchParams<"u"?URLSearchParams:kh,JL=typeof FormData<"u"?FormData:null,QL=typeof Blob<"u"?Blob:null,XL={isBrowser:!0,classes:{URLSearchParams:YL,FormData:JL,Blob:QL},protocols:["http","https","file","blob","url","data"]},Rh=typeof window<"u"&&typeof document<"u",Id=typeof navigator=="object"&&navigator||void 0,ZL=Rh&&(!Id||["ReactNative","NativeScript","NS"].indexOf(Id.product)<0),eB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tB=Rh&&window.location.href||"http://localhost",nB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rh,hasStandardBrowserEnv:ZL,hasStandardBrowserWebWorkerEnv:eB,navigator:Id,origin:tB},Symbol.toStringTag,{value:"Module"})),bt={...nB,...XL};function rB(r,e){return Wc(r,new bt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return bt.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function oB(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iB(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 Tw(r){function e(t,n,i,s){let l=t[s++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),f=s>=t.length;return l=!l&&O.isArray(i)?i.length:l,f?(O.hasOwnProp(i,l)?i[l]=[i[l],n]:i[l]=n,!d):((!i[l]||!O.isObject(i[l]))&&(i[l]=[]),e(t,n,i[l],s)&&O.isArray(i[l])&&(i[l]=iB(i[l])),!d)}if(O.isFormData(r)&&O.isFunction(r.entries)){const t={};return O.forEachEntry(r,(n,i)=>{e(oB(n),i,t,0)}),t}return null}function aB(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 ba={transitional:_w,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(Tw(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 rB(e,this.formSerializer).toString();if((d=O.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Wc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),aB(e)):e}],transformResponse:[function(e){const t=this.transitional||ba.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 l=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(l)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:bt.classes.FormData,Blob:bt.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=>{ba.headers[r]={}});const sB=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"]),cB=r=>{const e={};let t,n,i;return r&&r.split(`
|
57
|
-
`).forEach(function(l){i=l.indexOf(":"),t=l.substring(0,i).trim().toLowerCase(),n=l.substring(i+1).trim(),!(!t||e[t]&&
|
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[kp]=this[kp]={accessors:{}}).accessors,i=this.prototype;function s(l){const d=Gi(l);n[d]||(hB(i,l),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 Hu(r,e){const t=this||ba,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 Ew(r){return!!(r&&r.__CANCEL__)}function wi(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}O.inherits(wi,ue,{__CANCEL__:!0});function Sw(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 fB(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function gB(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,l;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=n[s];l||(l=g),t[i]=f,n[i]=g;let y=s,C=0;for(;y!==i;)C+=t[y++],y=y%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-l<e)return;const S=m&&g-m;return S?Math.round(C*1e3/S):void 0}}function mB(r,e){let t=0,n=1e3/e,i,s;const l=(g,m=Date.now())=>{t=m,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const m=Date.now(),y=m-t;y>=n?l(g,m):(i=g,s||(s=setTimeout(()=>{s=null,l(i)},n-y)))},()=>i&&l(i)]}const pc=(r,e,t=3)=>{let n=0;const i=gB(50,250);return mB(s=>{const l=s.loaded,d=s.lengthComputable?s.total:void 0,f=l-n,g=i(f),m=l<=d;n=l;const y={loaded:l,total:d,progress:d?l/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-l)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(y)},t)},Rp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},Op=r=>(...e)=>O.asap(()=>r(...e)),pB=bt.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,bt.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(bt.origin),bt.navigator&&/(msie|trident)/i.test(bt.navigator.userAgent)):()=>!0,vB=bt.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const l=[r+"="+encodeURIComponent(e)];O.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),O.isString(n)&&l.push("path="+n),O.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.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 yB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function CB(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function Aw(r,e){return r&&!yB(e)?CB(r,e):e}const Np=r=>r instanceof Ht?{...r}:r;function Co(r,e){e=e||{};const t={};function n(g,m,y,C){return O.isPlainObject(g)&&O.isPlainObject(m)?O.merge.call({caseless:C},g,m):O.isPlainObject(m)?O.merge({},m):O.isArray(m)?m.slice():m}function i(g,m,y,C){if(O.isUndefined(m)){if(!O.isUndefined(g))return n(void 0,g,y,C)}else return n(g,m,y,C)}function s(g,m){if(!O.isUndefined(m))return n(void 0,m)}function l(g,m){if(O.isUndefined(m)){if(!O.isUndefined(g))return n(void 0,g)}else return n(void 0,m)}function d(g,m,y){if(y in e)return n(g,m);if(y in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(g,m,y)=>i(Np(g),Np(m),y,!0)};return O.forEach(Object.keys(Object.assign({},r,e)),function(m){const y=f[m]||i,C=y(r[m],e[m],m);O.isUndefined(C)&&y!==d||(t[m]=C)}),t}const bw=r=>{const e=Co({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:l,auth:d}=e;e.headers=l=Ht.from(l),e.url=ww(Aw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(O.isFormData(t)){if(bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((f=l.getContentType())!==!1){const[g,...m]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];l.setContentType([g||"multipart/form-data",...m].join("; "))}}if(bt.hasStandardBrowserEnv&&(n&&O.isFunction(n)&&(n=n(e)),n||n!==!1&&pB(e.url))){const g=i&&s&&vB.read(s);g&&l.set(i,g)}return e},wB=typeof XMLHttpRequest<"u",_B=wB&&function(r){return new Promise(function(t,n){const i=bw(r);let s=i.data;const l=Ht.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,m,y,C,S,T;function I(){S&&S(),T&&T(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let N=new XMLHttpRequest;N.open(i.method.toUpperCase(),i.url,!0),N.timeout=i.timeout;function K(){if(!N)return;const H=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:H,config:r,request:N};Sw(function(W){t(W),I()},function(W){n(W),I()},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||_w;i.timeoutErrorMessage&&(z=i.timeoutErrorMessage),n(new ue(z,Q.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,N)),N=null},s===void 0&&l.setContentType(null),"setRequestHeader"in N&&O.forEach(l.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]=pc(g,!0),N.addEventListener("progress",C)),f&&N.upload&&([y,S]=pc(f),N.upload.addEventListener("progress",y),N.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(m=H=>{N&&(n(!H||H.type?new wi(null,r,N):H),N.abort(),N=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const F=fB(i.url);if(F&&bt.protocols.indexOf(F)===-1){n(new ue("Unsupported protocol "+F+":",ue.ERR_BAD_REQUEST,r));return}N.send(s||null)})},TB=(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 m=g instanceof Error?g:this.reason;n.abort(m instanceof ue?m:new wi(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(l&&clearTimeout(l),l=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}},EB=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},SB=async function*(r,e){for await(const t of AB(r))yield*EB(t,e)},AB=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()}},Pp=(r,e,t,n)=>{const i=SB(r,e);let s=0,l,d=f=>{l||(l=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:m}=await i.next();if(g){d(),f.close();return}let y=m.byteLength;if(t){let C=s+=y;t(C)}f.enqueue(new Uint8Array(m))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},qc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Iw=qc&&typeof ReadableStream=="function",bB=qc&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),kw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},IB=Iw&&kw(()=>{let r=!1;const e=new Request(bt.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Mp=64*1024,kd=Iw&&kw(()=>O.isReadableStream(new Response("").body)),vc={stream:kd&&(r=>r.body)};qc&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!vc[e]&&(vc[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 kB=async r=>{if(r==null)return 0;if(O.isBlob(r))return r.size;if(O.isSpecCompliantForm(r))return(await new Request(bt.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 bB(r)).byteLength},RB=async(r,e)=>{const t=O.toFiniteNumber(r.getContentLength());return t??kB(e)},OB=qc&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:l,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:m,withCredentials:y="same-origin",fetchOptions:C}=bw(r);g=g?(g+"").toLowerCase():"text";let S=TB([i,s&&s.toAbortSignal()],l),T;const I=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let N;try{if(f&&IB&&t!=="get"&&t!=="head"&&(N=await RB(m,n))!==0){let Q=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(O.isFormData(n)&&(we=Q.headers.get("content-type"))&&m.setContentType(we),Q.body){const[W,tt]=Rp(N,pc(Op(f)));n=Pp(Q.body,Mp,W,tt)}}O.isString(y)||(y=y?"include":"omit");const K="credentials"in Request.prototype;T=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:K?y:void 0});let F=await fetch(T);const H=kd&&(g==="stream"||g==="response");if(kd&&(d||H&&I)){const Q={};["status","statusText","headers"].forEach(Te=>{Q[Te]=F[Te]});const we=O.toFiniteNumber(F.headers.get("content-length")),[W,tt]=d&&Rp(we,pc(Op(d),!0))||[];F=new Response(Pp(F.body,Mp,W,()=>{tt&&tt(),I&&I()}),Q)}g=g||"text";let z=await vc[O.findKey(vc,g)||"text"](F,r);return!H&&I&&I(),await new Promise((Q,we)=>{Sw(Q,we,{data:z,headers:Ht.from(F.headers),status:F.status,statusText:F.statusText,config:r,request:T})})}catch(K){throw I&&I(),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)}}),Rd={http:WL,xhr:_B,fetch:OB};O.forEach(Rd,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const xp=r=>`- ${r}`,NB=r=>O.isFunction(r)||r===null||r===!1,Rw={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 l;if(n=t,!NB(t)&&(n=Rd[(l=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${l}'`);if(n)break;i[l||"#"+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 l=e?s.length>1?`since :
|
56
|
+
${l}`);return}throw lp(e.error,e.error_description,e.suberror)?new Vn(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):l}}async handleServerTokenResponse(e,t,n,i,s,l,d,f,g){var T;(T=this.performanceClient)==null||T.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let m;if(e.id_token){if(m=wo(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&m.nonce!==s.nonce)throw B(ky);if(i.maxAge||i.maxAge===0){const I=m.auth_time;if(!I)throw B(Wd);Fy(I,i.maxAge)}}this.homeAccountIdentifier=at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,m);let v;s&&s.state&&(v=Un.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,m,l,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new Cx(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const I=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(I,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,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 po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,e,g)}generateCacheRecord(e,t,n,i,s,l,d){const f=t.getPreferredCache();if(!f)throw B(Gd);const g=nC(s);let m,v;e.id_token&&s&&(m=Oc(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),v=lh(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 I=e.scope?Je.fromString(e.scope):new Je(i.scopes||[]),O=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,$=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,F=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,H=n+O,z=H+$,Q=F&&F>0?n+F:void 0;C=Nc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",I.printScopes(),H,z,this.cryptoObj.base64Decode,Q,e.token_type,l,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let I;if(e.refresh_token_expires_in){const O=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;I=n+O}S=Hy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,l,I)}let T=null;return e.foci&&(T={clientId:this.clientId,environment:f,familyId:e.foci}),{account:v,idToken:m,accessToken:C,refreshToken:S,appMetadata:T}}static async generateAuthenticationResult(e,t,n,i,s,l,d,f,g){var H,z,Q,we,W;let m=P.EMPTY_STRING,v=[],C=null,S,T,I=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Oe.POP&&!s.popKid){const tt=new gi(e),{secret:Te,keyId:Y}=n.accessToken;if(!Y)throw B(jd);m=await tt.signPopToken(Te,Y,s)}else m=n.accessToken.secret;v=Je.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&&(I=n.appMetadata.familyId===aa?aa:"");const O=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",$=(l==null?void 0:l.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const F=n.account?rh(n.account.getAccountInfo(),void 0,l,(H=n.idToken)==null?void 0:H.secret):null;return{authority:t.canonicalAuthority,uniqueId:O,tenantId:$,scopes:v,account:F,idToken:((z=n==null?void 0:n.idToken)==null?void 0:z.secret)||"",idTokenClaims:l||{},accessToken:m,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:T,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:I,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 lh(r,e,t,n,i,s,l,d,f,g,m){m==null||m.verbose("setCachedAccount called");const C=r.getAccountKeys().find($=>$.startsWith(t));let S=null;C&&(S=r.getAccount(C,m));const T=S||at.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:l,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),I=T.tenantProfiles||[],O=d||T.realm;if(O&&!I.find($=>$.tenantId===O)){const $=nh(t,T.localAccountId,O,i);I.push($)}return T.tenantProfiles=I,T}/*! @azure/msal-common v14.16.0 2024-11-05 */async function hC(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class fC extends sh{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 U(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 B(Ny);const n=rr(),i=await U(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Pt.X_MS_REQUEST_ID],l=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(i.body),U(l.handleServerTokenResponse.bind(l),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 po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw B(Ly);return e}getLogoutUri(e){if(!e)throw Pe(jy);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,m;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await U(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const v=cc(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${v.uid}${At.CLIENT_INFO_SEPARATOR}${v.utid}`,type:on.HOME_ACCOUNT_ID}}catch(v){this.logger.verbose("Could not parse client info for CCS Header: "+v)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),f={clientId:((m=t.tokenBodyParameters)==null?void 0:m.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 U(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 ca(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||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&&!fd(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 l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await hC(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(wy.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Oe.POP){const l=new gi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await U(l.generateCnf.bind(l),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Pe(Pc);(!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 l=cc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${l.uid}${At.CLIENT_INFO_SEPARATOR}${l.utid}`,type:on.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case on.HOME_ACCOUNT_ID:try{const l=ii(n.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}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[ap])&&t.addExtraQueryParameters({[ap]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new ca(t,this.performanceClient);n.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[mo])||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),fd(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!==dt.SELECT_ACCOUNT)if(e.sid&&e.prompt===dt.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===dt.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===Oe.POP)){const d=new gi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await U(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 ca(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 _x=300;class pd extends sh{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=rr(),n=await U(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Pt.X_MS_REQUEST_ID],s=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),U(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 Pe(Gy);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw B(qd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await U(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Vn&&i.errorCode===hc,l=i instanceof Gr&&i.errorCode===qm.INVALID_GRANT_ERROR&&i.subError===qm.CLIENT_MISMATCH_ERROR;if(s||l)return U(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return U(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=_o(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 md(hc);if(n.expiresOn&&hd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||_x))throw md(ch);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Oe.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}};try{return await U(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(l){if(l instanceof Vn&&l.subError===Dc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=oi(n);this.cacheManager.removeRefreshToken(d)}throw l}}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 U(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=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 U(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,l,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new ca(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),n.addGrantType(wy.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!fd(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 hC(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Oe.POP){const d=new gi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await U(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Pe(Pc);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 Tx extends sh{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:[...vi]});return i===Br.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 pd(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Rc&&n.errorCode===yr)return new pd(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=Br.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Bn.isEmptyObj(e.claims))throw this.setCacheOutcome(Br.FORCE_REFRESH_OR_CLAIMS,e.correlationId),B(yr);if(!e.account)throw B(qd);const n=e.account.tenantId||dx(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if(Q1(s.cachedAt)||hd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Br.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),B(yr);s.refreshOn&&hd(s.refreshOn,0)&&(t=Br.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Br.NO_CACHED_ACCESS_TOKEN,e.correlationId),B(yr);const l=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(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await U(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!==Br.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=wo(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw B(Wd);Fy(s,t.maxAge)}return po.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ex={sendGetRequestAsync:()=>Promise.reject(B(ge)),sendPostRequestAsync:()=>Promise.reject(B(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const up=",",gC="|";function Sx(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,l=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(up),d.length<4)return e}else d=Array.from({length:4},()=>gC);return l.forEach((f,g)=>{var m,v;f.length===2&&((m=f[0])!=null&&m.length)&&((v=f[1])!=null&&v.length)&&Ax({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(up)}function Ax(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(gC))}class ga{constructor(e,t){this.cacheOutcome=Br.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=pt.CACHE_KEY+At.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${pt.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(pt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),l=[e,s].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,l,i].join(pt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=ga.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(pt.VALUE_SEPARATOR),s=e.errors.length,l=t<s?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,d=[s,l].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(pt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=pt.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 He?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(pt.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=ga.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 l=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+=l.toString().length+d.toString().length+f.length+3,i<pt.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 Sx(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const mC="missing_kid_error",pC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const bx={[mC]:"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.",[pC]:"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 uh extends He{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,uh.prototype)}}function dp(r){return new uh(r,bx[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class dh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw dp(mC);if(!e.alg)throw dp(pC);const t=new dh({typ:e.typ||D1.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class hp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Ix{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:ux.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new hp}}startPerformanceMeasurement(){return new hp}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 hh="pkce_not_created",vd="crypto_nonexistent",Lc="empty_navigate_uri",vC="hash_empty_error",fh="no_state_in_hash",yC="hash_does_not_contain_known_properties",CC="unable_to_parse_state",wC="state_interaction_type_mismatch",_C="interaction_in_progress",TC="popup_window_error",EC="empty_window_error",vo="user_cancelled",kx="monitor_popup_timeout",SC="monitor_window_timeout",AC="redirect_in_iframe",bC="block_iframe_reload",IC="block_nested_popups",Rx="iframe_closed_prematurely",Bc="silent_logout_unsupported",kC="no_account_error",Ox="silent_prompt_value_error",RC="no_token_request_cache_error",OC="unable_to_parse_token_request_cache_error",gh="no_cached_authority_error",Nx="auth_request_not_set_error",Px="invalid_cache_type",Uc="non_browser_environment",Xo="database_not_open",fc="no_network_connectivity",NC="post_request_failed",PC="get_request_failed",yd="failed_to_parse_response",MC="unable_to_load_token",mh="crypto_key_not_found",xC="auth_code_required",DC="auth_code_or_nativeAccountId_required",LC="spa_code_and_nativeAccountId_present",ph="database_unavailable",BC="unable_to_acquire_token_from_native_platform",UC="native_handshake_timeout",VC="native_extension_not_installed",Ea="native_connection_not_established",FC="uninitialized_public_client_application",HC="native_prompt_not_supported",$C="invalid_base64_string",KC="invalid_pop_token_request",zC="failed_to_build_headers",WC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const mr="For more visit: aka.ms/msaljs/browser-errors",Mx={[hh]:"The PKCE code challenge and verifier could not be generated.",[vd]:"The crypto object or function is not available.",[Lc]:"Navigation URI is empty. Please check stack trace for more info.",[vC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${mr}`,[fh]:"Hash does not contain state. Please verify that the request originated from msal.",[yC]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${mr}`,[CC]:"Unable to parse state. Please verify that the request originated from msal.",[wC]:"Hash contains state but the interaction type does not match the caller.",[_C]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${mr}`,[TC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[EC]:"window.open returned null or undefined window object.",[vo]:"User cancelled the flow.",[kx]:`Token acquisition in popup failed due to timeout. ${mr}`,[SC]:`Token acquisition in iframe failed due to timeout. ${mr}`,[AC]:"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.",[bC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${mr}`,[IC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Rx]:"The iframe being monitored was closed prematurely.",[Bc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[kC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Ox]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[RC]:"No token request found in cache.",[OC]:"The cached token request could not be parsed.",[gh]:"No cached authority found.",[Nx]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Px]:"Invalid cache type",[Uc]:"Login and token requests are not supported in non-browser environments.",[Xo]:"Database is not open!",[fc]:"No network connectivity. Check your internet connection.",[NC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[PC]:"Network request failed. Please check the network trace to determine root cause.",[yd]:"Failed to parse network response. Check network trace.",[MC]:"Error loading token to cache.",[mh]:"Cryptographic Key or Keypair not found in browser storage.",[xC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[DC]:"An authorization code or nativeAccountId must be provided to this flow.",[LC]:"Request cannot contain both spa code and native account id.",[ph]:"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.",[BC]:`Unable to acquire token from native platform. ${mr}`,[UC]:"Timed out while attempting to establish connection to browser extension",[VC]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Ea]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${mr}`,[FC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${mr}`,[HC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[$C]:"Invalid base64 encoded string.",[KC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[zC]:"Failed to build request headers object.",[WC]:"Failed to parse response headers"};class Sa extends He{constructor(e,t){super(e,Mx[e],t),Object.setPrototypeOf(this,Sa.prototype),this.name="BrowserAuthError"}}function j(r,e){return new Sa(r,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const tn={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"},Ht={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},fp={GET:"GET",POST:"POST"},ke={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"},Lr={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Rs={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},Le={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 gp={scopes:vi},qC="jwk",Cd="msal.db",xx=1,Dx=`${Cd}.keys`,Zt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},Lx=[Zt.Default,Zt.Skip,Zt.RefreshTokenAndNetwork],Bx="msal.browser.log.level",Ux="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Os(r){return encodeURIComponent(vh(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Vc(r){return GC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function vh(r){return GC(new TextEncoder().encode(r))}function GC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Vx="RSASSA-PKCS1-v1_5",jC="SHA-256",Fx=2048,Hx=new Uint8Array([1,0,1]),mp="0123456789abcdef",pp=new Uint32Array(1),$x="crypto_subtle_undefined",yh={name:Vx,hash:jC,modulusLength:Fx,publicExponent:Hx};function Kx(r){if(!window)throw j(Uc);if(!window.crypto)throw j(vd);if(!r&&!window.crypto.subtle)throw j(vd,$x)}async function YC(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(jC,i)}function zx(r){return window.crypto.getRandomValues(r)}function Lu(){return window.crypto.getRandomValues(pp),pp[0]}function Sr(){const r=Date.now(),e=Lu()*1024+(Lu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Lu();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 l="";for(let d=0;d<t.length;d++)l+=mp.charAt(t[d]>>>4),l+=mp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function Wx(r,e){return window.crypto.subtle.generateKey(yh,r,e)}async function Bu(r){return window.crypto.subtle.exportKey(qC,r)}async function qx(r,e,t){return window.crypto.subtle.importKey(qC,r,yh,e,t)}async function Gx(r,e){return window.crypto.subtle.sign(yh,r,e)}async function JC(r){const e=await YC(r),t=new Uint8Array(e);return Vc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ma="storage_not_supported",wd="stubbed_public_client_application_called",gc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const qs={[ma]:"Given storage configuration option was not supported.",[wd]:"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",[gc]:"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."};qs[ma],qs[wd],qs[gc];class Ch extends He{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Ch.prototype)}}function wh(r){return new Ch(r,qs[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function jx(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function Yx(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function _h(){return window.parent!==window}function Jx(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${tn.POPUP_NAME_PREFIX}.`)===0}function Cr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function Qx(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function Xx(){if(ye.hashContainsKnownProperties(window.location.hash)&&_h())throw j(bC)}function Zx(r){if(_h()&&!r)throw j(AC)}function eD(){if(Jx())throw j(IC)}function QC(){if(typeof window>"u")throw j(Uc)}function XC(r){if(!r)throw j(FC)}function Th(r){QC(),Xx(),eD(),XC(r)}function vp(r,e){if(Th(r),Zx(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ht.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw wh(gc)}function ZC(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 tD(){return Sr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mc{navigateInternal(e,t){return mc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return mc.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 nD{async sendGetRequestAsync(e,t){let n,i={},s=0;const l=yp(t);try{n=await fetch(e,{method:fp.GET,headers:l})}catch{throw j(window.navigator.onLine?PC:fc)}i=Cp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw sp(j(yd),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=yp(t);let s,l=0,d={};try{s=await fetch(e,{method:fp.POST,headers:i,body:n})}catch{throw j(window.navigator.onLine?NC:fc)}d=Cp(s.headers);try{return l=s.status,{headers:d,body:await s.json(),status:l}}catch{throw sp(j(yd),l,d)}}}function yp(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(zC)}}function Cp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw j(WC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const rD=6e4,_d=1e4,oD=3e4,iD=2e3;function aD({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:Ta.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Jd.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:Ht.SessionStorage,temporaryCacheLocation:Ht.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ht.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:xe.Info,piiLoggingEnabled:!1},g={...{...sC,loggerOptions:d,networkClient:i?new nD:Ex,navigationClient:new mc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||rD,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||_d,navigateFrameWait:0,redirectNavigationTimeout:oD,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||iD,pollIntervalMilliseconds:tn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},m={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new Ix};if((r==null?void 0:r.protocolMode)!==Tr.OIDC&&(r!=null&&r.OIDCOptions)&&new qr(g.loggerOptions).warning(JSON.stringify(Pe(Zy))),r!=null&&r.protocolMode&&r.protocolMode!==Tr.AAD&&(g!=null&&g.allowNativeBroker))throw Pe(eC);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...l,...e},system:g,telemetry:{...m,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const sD="@azure/msal-browser",Fc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class Eh{static loggerCallback(e,t){switch(e){case xe.Error:console.error(t);return;case xe.Info:console.info(t);return;case xe.Verbose:console.debug(t);return;case xe.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=aD(e,this.browserEnvironment);let t;try{t=window[Ht.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(Bx),i=(f=t==null?void 0:t.getItem(Ux))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=n&&Object.keys(xe).includes(n)?xe[n]:void 0;d&&(l.loggerCallback=Eh.loggerCallback,l.logLevel=d),s!==void 0&&(l.piiLoggingEnabled=s),this.logger=new qr(l,sD,Fc),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 yo extends Eh{getModuleName(){return yo.MODULE_NAME}getId(){return yo.ID}async initialize(){return this.available=typeof window<"u",this.available}}yo.MODULE_NAME="";yo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function tr(r){return new TextDecoder().decode(cD(r))}function cD(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($C)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class lD{constructor(){this.dbName=Cd,this.version=xx,this.tableName=Dx,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(ph)))})}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 l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),l.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 l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.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",l=>{const d=l;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(j(Xo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),l.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(Cd),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 Td{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 uD{constructor(e){this.inMemoryCache=new Td,this.indexedDBCache=new lD,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Sa&&e.errorCode===ph)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,Kx(n??!1),this.cache=new uD(this.logger),this.performanceClient=t}createNewGuid(){return Sr()}base64Encode(e){return vh(e)}base64Decode(e){return tr(e)}base64UrlEncode(e){return Os(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var m;const t=(m=this.performanceClient)==null?void 0:m.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await Wx(mi.EXTRACTABLE,mi.POP_KEY_USAGES),i=await Bu(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},l=wp(s),d=await this.hashString(l),f=await Bu(n.privateKey),g=await qx(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 H;const s=(H=this.performanceClient)==null?void 0:H.startMeasurement(k.CryptoOptsSignJwt,i),l=await this.cache.getItem(t);if(!l)throw j(mh);const d=await Bu(l.publicKey),f=wp(d),g=Os(JSON.stringify({kid:t})),m=dh.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),v=Os(m);e.cnf={jwk:JSON.parse(f)};const C=Os(JSON.stringify(e)),S=`${v}.${C}`,I=new TextEncoder().encode(S),O=await Gx(l.privateKey,I),$=Vc(new Uint8Array(O)),F=`${S}.${$}`;return s&&s.end({success:!0}),F}async hashString(e){return JC(e)}}mi.POP_KEY_USAGES=["sign","verify"];mi.EXTRACTABLE=!0;function wp(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class dD{constructor(){if(!window.localStorage)throw wh(ma)}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 hD{constructor(){if(!window.sessionStorage)throw wh(ma)}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 ew(r,e){if(!e)return null;try{return Un.parseRequestState(r,e).libraryState.meta}catch{throw B(hi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const fD=24*60*60*1e3;class gD{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[l,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(l===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const l=mD(n);s+=`expires=${l};`}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 mD(r){const e=new Date;return new Date(e.getTime()+r*fD).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ed extends fi{constructor(e,t,n,i,s,l){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new Td,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new gD,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case Ht.LocalStorage:return new dD;case Ht.SessionStorage:return new hD;case Ht.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ht.MemoryStorage,new Td}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${ct.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${ct.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${ct.ERROR}`,i=`${P.CACHE_PREFIX}.${ct.ERROR_DESC}`,s=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,l,d,f];[ct.ID_TOKEN,ct.CLIENT_INFO,ct.ERROR,ct.ERROR_DESC].forEach((v,C)=>{const S=g[C];S&&this.setTemporaryCache(v,S,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Lr.ACCOUNT_KEYS),t=this.getItem(`${Lr.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 l=this.validateAndParseJson(s);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case re.ID_TOKEN:if(Qm(l)){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=l,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(Jm(l)){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=l,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(Xm(l)){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=l,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 l=this.validateAndParseJson(s);l&&at.isAccountEntity(l)&&(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||!at.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):fi.toObject(new at,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(Lr.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(Lr.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(Lr.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(`${Lr.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}`),B(dd)}this.setItem(`${Lr.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 l=n.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(l,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}`),B(dd)}this.setItem(`${Lr.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||!Qm(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||!Jm(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||!Xm(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||!aM(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=iM(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||!rM(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&&sM(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(Rs.WRAPPER_SKU,e),this.internalStorage.setItem(Rs.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Rs.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(Rs.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(ct.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(ct.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:s});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):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(ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(ct.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||!oM(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===Ht.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 l=this.getAccessTokenCredential(s);l!=null&&l.requestedClaimsHash&&s.includes(l.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,ct.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Un.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Un.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Un.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.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 l=this.generateStateKey(e);this.setTemporaryCache(l,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(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:on.UPN};this.setTemporaryCache(ke.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(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.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(ke.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=ew(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=vh(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw j(RC);let n;try{n=JSON.parse(tr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),j(OC)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw j(gh);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.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}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw j(_C);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(ct.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(ct.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=wo(n,tr);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=Oc((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=Nc((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,tr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),l={idToken:n,accessToken:s};return this.saveCacheRecord(l)}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 pD=(r,e)=>{const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Ed(r,t,sc,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function vD(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function yD(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 CD(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 wD(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 _D(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 TD(r,e){e.setActiveAccount(r)}function ED(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 SD{constructor(e){this.eventCallbacks=new Map,this.logger=e||new qr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||tD();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(([l,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),l.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tw{constructor(e,t,n,i,s,l,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=l,this.nativeMessageHandler=f,this.correlationId=g||Sr(),this.logger=i.clone(tn.MSAL_SKU,Fc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){at.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(at.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 ga(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,l=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=Et.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await U(uC,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 Pe(tC);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const AD=32;async function bD(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=_o(ID,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await U(kD,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function ID(r,e,t){try{const n=new Uint8Array(AD);return _o(zx,k.GetRandomValues,e,r,t)(n),Vc(n)}catch{throw j(hh)}}async function kD(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await U(YC,k.Sha256Digest,t,e,n)(r,e,n);return Vc(new Uint8Array(i))}catch{throw j(hh)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function Sh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],l={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!l.authenticationScheme)l.authenticationScheme=Oe.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===Oe.SSH){if(!r.sshJwk)throw Pe(Pc);if(!r.sshKid)throw Pe(Xy)}n.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Bn.isEmptyObj(r.claims)&&(l.requestedClaimsHash=await JC(r.claims)),l}async function RD(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await U(Sh,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 yi extends tw{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await U(bD,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 U(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new fC(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await U(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}),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:tn.MSAL_SKU,version:Fc,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=Un.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await U(Sh,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 OD="ContentError",nw="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const ND="USER_INTERACTION_REQUIRED",PD="USER_CANCEL",MD="NO_NETWORK",xD="PERSISTENT_ERROR",DD="DISABLED",LD="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const BD=-2147186943,UD={[nw]:"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 Jn extends He{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Jn.prototype),this.name="NativeAuthError",this.ext=n}}function Zo(r){if(r.ext&&r.ext.status&&(r.ext.status===xD||r.ext.status===DD)||r.ext&&r.ext.error&&r.ext.error===BD)return!0;switch(r.errorCode){case OD:return!0;default:return!1}}function Sd(r,e,t){if(t&&t.status)switch(t.status){case LD:return md(dC);case ND:return new Vn(r,e);case PD:return j(vo);case MD:return j(fc)}return new Jn(r,UD[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class rw extends yi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),n=await U(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 Tx(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await U(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(s){throw s instanceof Sa&&s.errorCode===mh&&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 tw{constructor(e,t,n,i,s,l,d,f,g,m,v,C){var T;super(e,t,n,i,s,l,f,g,C),this.apiId=d,this.accountId=m,this.nativeMessageHandler=g,this.nativeStorageManager=v,this.silentCacheClient=new rw(e,this.nativeStorageManager,n,i,s,l,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=ga.makeExtraSkuString({libraryName:tn.MSAL_SKU,libraryVersion:Fc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[ix]: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=rr();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,l={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(l),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 Jn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Je.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),B(ld);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw B(ld);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),l={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:l}}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 Jn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),Zo(f)))throw f}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(i),!0);const l={apiId:Le.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,l)}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(ke.NATIVE_REQUEST));const l={method:uo.GetToken,request:s},d=rr();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const m=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),m}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 m;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=wo(e.id_token,tr),s=this.createHomeAccountIdentifier(e,i),l=(m=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:m.homeAccountId;if(s!==l&&e.account.id!==t.accountId)throw Sd(nw);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=lh(this.browserStorage,d,s,tr,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 at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,xn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Je.fromString(e.scope):Je.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Oe.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 B(jd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,l){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Je.fromString(e.scope):Je.fromString(t.scope),g=e.account.properties||{},m=g.UID||n.oid||n.sub||P.EMPTY_STRING,v=g.TenantId||n.tid||P.EMPTY_STRING,C=rh(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===Oe.POP?Oe.POP:Oe.BEARER;return{authority:s,uniqueId:m,tenantId:v,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+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,l,d){const f=Oc(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Oe.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=d+g,v=this.generateScopes(e,t),C=Nc(n,t.authority,s,t.clientId,i.tid||l,v.printScopes(),m,0,tr,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 _y($d,"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,l=new Je(i||[]);l.appendScopes(vi);const d=()=>{switch(this.apiId){case Le.ssoSilent:case Le.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),dt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.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(HC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:l.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===Oe.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},m=new gi(this.browserCrypto);let v;if(f.keyId)v=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await U(m.generateCnf.bind(m),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);v=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=v}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(ah)&&e.extraParameters.hasOwnProperty(gd)&&e.extraParameters.hasOwnProperty(mo);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[gd],n=e.extraParameters[mo]),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 Qn{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 Qn(e,t,n,ai.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Qn(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(UC)),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(VC))}}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 l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")n.reject(Sd(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?n.reject(Sd(l.result.code,l.result.description,l.result.ext)):n.resolve(l.result);else throw _y($d,"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 Oe.BEARER:case Oe.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 Ah{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 Gr&&i.subError===vo?j(vo):i}return U(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 U(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 U(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 ow(r,e,t){const n=uc(r);if(!n)throw rC(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(yC)):(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(vC));return n}function VD(r,e,t){if(!r.state)throw j(fh);const n=ew(e,r.state);if(!n)throw j(CC);if(n.interactionType!==t)throw j(wC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class FD extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||vi,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(Le.acquireTokenPopup),i=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,X.Popup);ZC(i.authority);try{const l=await U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await U(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=Qn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const m=await d.getAuthCodeUrl({...i,nativeBroker:f}),v=new Ah(d,this.browserStorage,l,this.logger,this.performanceClient),C=this.initiateAuthRequest(m,t);this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),T=_o(ow,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(S,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Yn.removeThrottle(this.browserStorage,this.config.auth.clientId,l),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(Ea);const O=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,T.accountId,this.nativeStorage,i.correlationId),{userRequestState:$}=Un.parseRequestState(this.browserCrypto,i.state);return await O.acquireToken({...i,state:$,prompt:void 0})}return await v.handleCodeResponse(T,i)}catch(l){throw(s=t.popup)==null||s.close(),l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,n,i){var l,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(ne.LOGOUT_START,X.Popup,e);const s=this.initializeServerTelemetryManager(Le.logoutPopup);try{await this.clearCacheOnLogout(e.account);const m=await U(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{m.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&m.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:Le.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 v=m.getLogoutUri(e);this.eventHandler.emitEvent(ne.LOGOUT_SUCCESS,X.Popup,e);const C=this.openPopup(v,t);if(this.eventHandler.emitEvent(ne.POPUP_OPENED,X.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:Le.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(m){throw(g=t.popup)==null||g.close(),m instanceof He&&(m.setCorrelationId(this.correlationId),s.cacheFailedRequest(m)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Popup,null,m),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Popup),m}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(Lc)}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(vo));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===Ta.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(EC);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(TC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,T,I,O;const s=i.screenLeft?i.screenLeft:i.screenX,l=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,m=(T=n.popupSize)==null?void 0:T.height,v=(I=n.popupPosition)==null?void 0:I.top,C=(O=n.popupPosition)==null?void 0:O.left;return(!g||g<0||g>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=tn.POPUP_WIDTH),(!m||m<0||m>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=tn.POPUP_HEIGHT),(!v||v<0||v>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,f/2-tn.POPUP_HEIGHT/2+l)),(!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-tn.POPUP_WIDTH/2+s)),i.open(e,t,`width=${g}, height=${m}, top=${v}, 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`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class _p{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(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:Le.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(Lc)}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 B(ac,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof Gr&&g.subError===vo?j(vo):g}const l=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await U(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(ke.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 HD(){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 $D extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.nativeStorage=f}async acquireToken(e){const t=await U(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(Le.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 U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await U(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 _p(l,this.browserStorage,s,this.logger,this.performanceClient),f=await l.getAuthCodeUrl({...t,nativeBroker:Qn.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 He&&(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(Le.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),HD()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(l),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&Yx(l),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!_h()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,s,!0);const g={apiId:Le.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let m=!0;if(!l||l==="null"){const v=Qx();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),m=await this.navigationClient.navigateInternal(v,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),m=await this.navigationClient.navigateInternal(l,g);if(!m)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 He&&(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===Ta.QUERY?t=window.location.search:t=window.location.hash);let n=uc(t);if(n){try{VD(n,this.browserCrypto,X.Redirect)}catch(s){return s instanceof He&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return jx(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),i&&(n=uc(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(fh);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(Ea);const f=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Un.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(gh);const l=await U(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return Yn.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new _p(l,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(Le.logout);try{this.eventHandler.emitEvent(ne.LOGOUT_START,X.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:Le.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await U(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,l);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,l);return}}catch(l){throw l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),this.eventHandler.emitEvent(ne.LOGOUT_FAILURE,X.Redirect,null,l),this.eventHandler.emitEvent(ne.LOGOUT_END,X.Redirect),l}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 KD(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),j(Lc);return i?U(WD,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):_o(qD,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function zD(r,e,t,n,i,s,l){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<_d&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${_d}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(m),f(j(SC))},e),m=window.setInterval(()=>{let v="";const C=r.contentWindow;try{v=C?C.location.href:""}catch{}if(!v||v==="about:blank")return;let S="";C&&(l===Ta.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(m),d(S)},t)}).finally(()=>{_o(GD,k.RemoveHiddenIframe,i,n,s)(r)})}function WD(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const l=iw();window.setTimeout(()=>{if(!l){s("Unable to load iframe");return}l.src=r,i(l)},e)})}function qD(r){const e=iw();return e.src=r,e}function iw(){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 GD(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class jD extends yi{constructor(e,t,n,i,s,l,d,f,g,m,v){super(e,t,n,i,s,l,f,m,v),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!==dt.NONE&&t.prompt!==dt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${dt.NONE}`),t.prompt=dt.NONE):t.prompt=dt.NONE;const n=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);ZC(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await U(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 U(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(l){if(l instanceof He&&(l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l)),!s||!(l instanceof He)||l.errorCode!==tn.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await U(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,X.Silent);return await U(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(j(Bc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await U(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await U(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Qn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Ah(e,this.browserStorage,i,this.logger,this.performanceClient),d=await U(KD,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 U(zD,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),m=_o(ow,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw j(Ea);const v=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,m.accountId,this.browserStorage,n),{userRequestState:C}=Un.parseRequestState(this.browserCrypto,t.state);return U(v.acquireToken.bind(v),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||dt.NONE})}return U(l.handleCodeResponse.bind(l),k.HandleCodeResponse,this.logger,this.performanceClient,n)(m,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class YD extends yi{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await U(Sh,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(Le.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return U(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(l=>{throw l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),l})}logout(){return Promise.reject(j(Bc))}async createRefreshTokenClient(e){const t=await U(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 pd(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class JD{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(Uc);const i=t.id_token?wo(t.id_token,tr):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},l=e.authority?new Et(Et.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,l),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),m=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:m},i,l)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=at.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(MC);const s=at.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),l=n==null?void 0:n.tid,d=lh(this.storage,i,s,tr,n,t,i.hostnameAndPort,l,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=Oc(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,l){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?Je.fromString(t.scope):new Je(e.scopes),f=l.expiresOn||t.expires_in+new Date().getTime()/1e3,g=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,m=Nc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,tr);return this.storage.setAccessTokenCredential(m),m}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=Hy(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 m,v,C;let s="",l=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,l=Je.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:l,account:g.getAccountInfo(),idToken:((m=t.idToken)==null?void 0:m.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((v=t.refreshToken)==null?void 0:v.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 QD extends fC{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class XD extends yi{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,f,g,m),this.apiId=d}async acquireToken(e){if(!e.code)throw j(xC);const t=await U(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 U(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}),l=new QD(s);this.logger.verbose("Auth code client created");const d=new Ah(l,this.browserStorage,i,this.logger,this.performanceClient);return await U(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 He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(j(Bc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function qn(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 Ns(r,e){try{Th(r)}catch(t){throw e.end({success:!1},t),t}}class Hc{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):sc,this.eventHandler=new SD(this.logger),this.browserStorage=this.isBrowserEnvironment?new Ed(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,hx(this.config.auth),this.performanceClient):pD(this.config.auth.clientId,this.logger);const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Ed(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new JD(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 Hc(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 Qn.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 U(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"),XC(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&&Qn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",l=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,Le.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=U(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=U(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}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")),l.end({success:!0,accountType:qn(f.account)})):l.event.errorCode?l.end({success:!1}):l.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),l.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:qn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=l=>{const d=typeof i=="function"?i(l):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof l=="function"?l(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{vp(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 l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new li(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Jn&&Zo(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Vn)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}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw n.end({success:!1},l),s?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Redirect,null,l):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:qn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Ns(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}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},Le.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:qn(l.account)}),l)).catch(l=>{if(l instanceof Jn&&Zo(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Vn)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),l}):s=this.createPopupClient(t).acquireToken(e),s.then(l=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(ne.LOGIN_SUCCESS,X.Popup,l):this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_SUCCESS,X.Popup,l),n.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:qn(l.account)}),l)).catch(l=>(i.length>0?this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_FAILURE,X.Popup,null,l):this.eventHandler.emitEvent(ne.LOGIN_FAILURE,X.Popup,null,l),n.end({success:!1},l),Promise.reject(l)))}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,l;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:qn(e.account)}),Ns(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.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,Le.ssoSilent).catch(d=>{if(d instanceof Jn&&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:qn(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);Ns(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(LC);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(l=>(this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_SUCCESS,X.Silent,l),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:qn(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_BY_CODE_FAILURE,X.Silent,null,l),n.end({success:!1},l),l}),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},Le.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Jn&&Zo(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:qn(i.account),success:!0}),i}else throw j(BC);else throw j(DC)}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 l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.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 Zt.Default:case Zt.AccessToken:case Zt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return U(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Zt.Default:case Zt.AccessTokenAndRefreshToken:case Zt.RefreshToken:case Zt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return U(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return U(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 vp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Th(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 vD(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return yD(e,this.logger,this.browserStorage)}getAccountByUsername(e){return CD(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return wD(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return _D(e,this.logger,this.browserStorage)}setActiveAccount(e){TD(e,this.browserStorage)}getActiveAccount(){return ED(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=at.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(Ea);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"),!Qn.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 dt.NONE:case dt.CONSENT:case dt.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 FD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new $D(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new jD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new rw(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new YD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new XD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return QC(),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(ct.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"||!at.isAccountEntity(i))return;const l=fi.toObject(new at,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,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(ne.ACCOUNT_REMOVED,void 0,l))}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||gp})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||gp})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Ns(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw j(kC);n.add({accountType:qn(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},l=JSON.stringify(s),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=U(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(l),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(l),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(l,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 U(RD,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Zt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(ZD(d,s))if(this.activeIframeRequest)if(s!==Zt.Skip){const[g,m]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${m}`,i.correlationId);const v=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);v.add({awaitIframeCorrelationId:m});const C=await g;if(v.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${m} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${m} 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),U(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(m=>{g=m}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),U(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(m=>(g(!0),m)).catch(m=>{throw g(!1),m}).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 Qn.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,Le.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Jn&&Zo(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,B(yr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),U(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Zt.AccessToken)throw n;return this.eventHandler.emitEvent(ne.ACQUIRE_TOKEN_NETWORK_START,X.Silent,e),U(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function ZD(r,e){const t=!(r instanceof Vn&&r.subError!==Dc),n=r.errorCode===tn.INVALID_GRANT_ERROR||r.errorCode===yr,i=t&&n||r.errorCode===hc||r.errorCode===ch,s=Lx.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function eL(r,e){const t=new yo(r);return await t.initialize(),Hc.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class bh{static async createPublicClientApplication(e){const t=await eL(e);return new bh(e,t)}constructor(e,t){this.controller=t||new Hc(new yo(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 Uu=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",tL=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",nL=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",rL=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",oL={auth:{clientId:tL,authority:`https://${Uu}.b2clogin.com/${Uu}.onmicrosoft.com/${nL}`,knownAuthorities:[`${Uu}.b2clogin.com`],redirectUri:rL},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===xe.Error&&console.error(e)},logLevel:xe.Warning}}},Nt=new bh(oL),Tp=c.ref(null);function aw(){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),l=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} 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"),Tp.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:Tp,setJToken:r}}const iL=()=>process.env.JPLAN_WEBAPP__URL_AUTH||"http://localhost:5173/_/dashboard",pr=c.ref(null);function sw(){const{setJToken:r}=aw(),e=c.computed(()=>!!pr.value),t=c.computed(()=>pr.value);async function n(g){if(!e.value)switch(g){case"redirect":await s();break;case"tab":await i();break;default:await s();break}}const i=async()=>new Promise((g,m)=>{try{localStorage.clear();const v=window.open(iL());if(!v){console.error("Failed to open authentication window"),m("Failed to open authentication window");return}const C=Date.now(),S=6e4,T=setInterval(()=>{if(Date.now()-C>S||v.closed){clearInterval(T),console.error("Authentication canceled or timeout reached."),m("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(O=>O.startsWith("msal.account.keys"))&&(clearInterval(T),l(),v.close(),g())},500)}catch(v){console.error("Error in handleRedirect:",v),m(v)}}),s=async()=>{try{debugger;const g=Nt.getActiveAccount();if(console.log("activeAccount",g),g){pr.value=g;return}if(!await Nt.handleRedirectPromise()||Nt.getAllAccounts().length===0){await Nt.initialize();const v=aL();await Nt.loginRedirect(v);return}}catch(g){console.error("handleRedirect failed",g)}},l=async()=>{try{await Nt.initialize();const g=Nt.getActiveAccount();if(g)pr.value=g;else{const m=await Nt.handleRedirectPromise();m?(Nt.setActiveAccount(m.account),pr.value=Nt.getActiveAccount()):console.error("Falha na autenticação")}}catch(g){console.error("Erro no processo de autenticação:",g)}pr.value&&await r(pr.value)};async function d(){try{const g=await Nt.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});Nt.setActiveAccount(g.account),await r(pr.value)}catch(g){console.error("Falha ao renovar token, forçando novo login.",g),await n()}}const f=async()=>{try{await Nt.initialize(),localStorage.clear(),await Nt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(g){console.error("Logout error",g)}};return c.watch(pr,async(g,m)=>{var C,S,T;if(((C=g==null?void 0:g.idTokenClaims)==null?void 0:C.exp)===((S=m==null?void 0:m.idTokenClaims)==null?void 0:S.exp))return;const v=(T=g==null?void 0:g.idTokenClaims)==null?void 0:T.exp;if(v){const I=Math.floor(Date.now()/1e3),$=(v-I-120)*1e3;$>0&&setTimeout(async()=>{await d()},$)}},{immediate:!0}),{isAuthenticated:e,account:t,handleRedirect:n,logout:f}}const aL=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:window.location.href,extraQueryParameters:r});function cw(r,e){return function(){return r.apply(e,arguments)}}const{toString:sL}=Object.prototype,{getPrototypeOf:Ih}=Object,$c=(r=>e=>{const t=sL.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),$n=r=>(r=r.toLowerCase(),e=>$c(e)===r),Kc=r=>e=>typeof e===r,{isArray:Ci}=Array,pa=Kc("undefined");function cL(r){return r!==null&&!pa(r)&&r.constructor!==null&&!pa(r.constructor)&&an(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const lw=$n("ArrayBuffer");function lL(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&lw(r.buffer),e}const uL=Kc("string"),an=Kc("function"),uw=Kc("number"),zc=r=>r!==null&&typeof r=="object",dL=r=>r===!0||r===!1,Gs=r=>{if($c(r)!=="object")return!1;const e=Ih(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},hL=$n("Date"),fL=$n("File"),gL=$n("Blob"),mL=$n("FileList"),pL=r=>zc(r)&&an(r.pipe),vL=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||an(r.append)&&((e=$c(r))==="formdata"||e==="object"&&an(r.toString)&&r.toString()==="[object FormData]"))},yL=$n("URLSearchParams"),[CL,wL,_L,TL]=["ReadableStream","Request","Response","Headers"].map($n),EL=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Aa(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),Ci(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),l=s.length;let d;for(n=0;n<l;n++)d=s[n],e.call(null,r[d],d,r)}}function dw(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,hw=r=>!pa(r)&&r!==ho;function Ad(){const{caseless:r}=hw(this)&&this||{},e={},t=(n,i)=>{const s=r&&dw(e,i)||i;Gs(e[s])&&Gs(n)?e[s]=Ad(e[s],n):Gs(n)?e[s]=Ad({},n):Ci(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Aa(arguments[n],t);return e}const SL=(r,e,t,{allOwnKeys:n}={})=>(Aa(e,(i,s)=>{t&&an(i)?r[s]=cw(i,t):r[s]=i},{allOwnKeys:n}),r),AL=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),bL=(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)},IL=(r,e,t,n)=>{let i,s,l;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)l=i[s],(!n||n(l,r,e))&&!d[l]&&(e[l]=r[l],d[l]=!0);r=t!==!1&&Ih(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},kL=(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},RL=r=>{if(!r)return null;if(Ci(r))return r;let e=r.length;if(!uw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},OL=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Ih(Uint8Array)),NL=(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])}},PL=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},ML=$n("HTMLFormElement"),xL=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),Ep=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),DL=$n("RegExp"),fw=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};Aa(t,(i,s)=>{let l;(l=e(i,s,r))!==!1&&(n[s]=l||i)}),Object.defineProperties(r,n)},LL=r=>{fw(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+"'")})}})},BL=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return Ci(r)?n(r):n(String(r).split(e)),t},UL=()=>{},VL=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,Vu="abcdefghijklmnopqrstuvwxyz",Sp="0123456789",gw={DIGIT:Sp,ALPHA:Vu,ALPHA_DIGIT:Vu+Vu.toUpperCase()+Sp},FL=(r=16,e=gw.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function HL(r){return!!(r&&an(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const $L=r=>{const e=new Array(10),t=(n,i)=>{if(zc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=Ci(n)?[]:{};return Aa(n,(l,d)=>{const f=t(l,i+1);!pa(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},KL=$n("AsyncFunction"),zL=r=>r&&(zc(r)||an(r))&&an(r.then)&&an(r.catch),mw=((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)),WL=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||mw,N={isArray:Ci,isArrayBuffer:lw,isBuffer:cL,isFormData:vL,isArrayBufferView:lL,isString:uL,isNumber:uw,isBoolean:dL,isObject:zc,isPlainObject:Gs,isReadableStream:CL,isRequest:wL,isResponse:_L,isHeaders:TL,isUndefined:pa,isDate:hL,isFile:fL,isBlob:gL,isRegExp:DL,isFunction:an,isStream:pL,isURLSearchParams:yL,isTypedArray:OL,isFileList:mL,forEach:Aa,merge:Ad,extend:SL,trim:EL,stripBOM:AL,inherits:bL,toFlatObject:IL,kindOf:$c,kindOfTest:$n,endsWith:kL,toArray:RL,forEachEntry:NL,matchAll:PL,isHTMLForm:ML,hasOwnProperty:Ep,hasOwnProp:Ep,reduceDescriptors:fw,freezeMethods:LL,toObjectSet:BL,toCamelCase:xL,noop:UL,toFiniteNumber:VL,findKey:dw,global:ho,isContextDefined:hw,ALPHABET:gw,generateString:FL,isSpecCompliantForm:HL,toJSONObject:$L,isAsyncFn:KL,isThenable:zL,setImmediate:mw,asap:WL};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)}N.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:N.toJSONObject(this.config),code:this.code,status:this.status}}});const pw=ue.prototype,vw={};["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=>{vw[r]={value:r}});Object.defineProperties(ue,vw);Object.defineProperty(pw,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const l=Object.create(pw);return N.toFlatObject(r,l,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(l,r.message,e,t,n,i),l.cause=r,l.name=r.name,s&&Object.assign(l,s),l};const qL=null;function bd(r){return N.isPlainObject(r)||N.isArray(r)}function yw(r){return N.endsWith(r,"[]")?r.slice(0,-2):r}function Ap(r,e,t){return r?r.concat(e).map(function(i,s){return i=yw(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function GL(r){return N.isArray(r)&&!r.some(bd)}const jL=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function Wc(r,e,t){if(!N.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=N.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,O){return!N.isUndefined(O[I])});const n=t.metaTokens,i=t.visitor||m,s=t.dots,l=t.indexes,f=(t.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function g(T){if(T===null)return"";if(N.isDate(T))return T.toISOString();if(!f&&N.isBlob(T))throw new ue("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(T)||N.isTypedArray(T)?f&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function m(T,I,O){let $=T;if(T&&!O&&typeof T=="object"){if(N.endsWith(I,"{}"))I=n?I:I.slice(0,-2),T=JSON.stringify(T);else if(N.isArray(T)&&GL(T)||(N.isFileList(T)||N.endsWith(I,"[]"))&&($=N.toArray(T)))return I=yw(I),$.forEach(function(H,z){!(N.isUndefined(H)||H===null)&&e.append(l===!0?Ap([I],z,s):l===null?I:I+"[]",g(H))}),!1}return bd(T)?!0:(e.append(Ap(O,I,s),g(T)),!1)}const v=[],C=Object.assign(jL,{defaultVisitor:m,convertValue:g,isVisitable:bd});function S(T,I){if(!N.isUndefined(T)){if(v.indexOf(T)!==-1)throw Error("Circular reference detected in "+I.join("."));v.push(T),N.forEach(T,function($,F){(!(N.isUndefined($)||$===null)&&i.call(e,$,N.isString(F)?F.trim():F,I,C))===!0&&S($,I?I.concat(F):[F])}),v.pop()}}if(!N.isObject(r))throw new TypeError("data must be an object");return S(r),e}function bp(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function kh(r,e){this._pairs=[],r&&Wc(r,this,e)}const Cw=kh.prototype;Cw.append=function(e,t){this._pairs.push([e,t])};Cw.toString=function(e){const t=e?function(n){return e.call(this,n,bp)}:bp;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function YL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ww(r,e,t){if(!e)return r;const n=t&&t.encode||YL;N.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=N.isURLSearchParams(e)?e.toString():new kh(e,t).toString(n),s){const l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class Ip{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){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _w={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JL=typeof URLSearchParams<"u"?URLSearchParams:kh,QL=typeof FormData<"u"?FormData:null,XL=typeof Blob<"u"?Blob:null,ZL={isBrowser:!0,classes:{URLSearchParams:JL,FormData:QL,Blob:XL},protocols:["http","https","file","blob","url","data"]},Rh=typeof window<"u"&&typeof document<"u",Id=typeof navigator=="object"&&navigator||void 0,eB=Rh&&(!Id||["ReactNative","NativeScript","NS"].indexOf(Id.product)<0),tB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nB=Rh&&window.location.href||"http://localhost",rB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rh,hasStandardBrowserEnv:eB,hasStandardBrowserWebWorkerEnv:tB,navigator:Id,origin:nB},Symbol.toStringTag,{value:"Module"})),bt={...rB,...ZL};function oB(r,e){return Wc(r,new bt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return bt.isNode&&N.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function iB(r){return N.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function aB(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 Tw(r){function e(t,n,i,s){let l=t[s++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),f=s>=t.length;return l=!l&&N.isArray(i)?i.length:l,f?(N.hasOwnProp(i,l)?i[l]=[i[l],n]:i[l]=n,!d):((!i[l]||!N.isObject(i[l]))&&(i[l]=[]),e(t,n,i[l],s)&&N.isArray(i[l])&&(i[l]=aB(i[l])),!d)}if(N.isFormData(r)&&N.isFunction(r.entries)){const t={};return N.forEachEntry(r,(n,i)=>{e(iB(n),i,t,0)}),t}return null}function sB(r,e,t){if(N.isString(r))try{return(e||JSON.parse)(r),N.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const ba={transitional:_w,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(e);if(s&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i?JSON.stringify(Tw(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.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 oB(e,this.formSerializer).toString();if((d=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Wc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),sB(e)):e}],transformResponse:[function(e){const t=this.transitional||ba.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!this.responseType||i)){const l=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(l)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:bt.classes.FormData,Blob:bt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],r=>{ba.headers[r]={}});const cB=N.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"]),lB=r=>{const e={};let t,n,i;return r&&r.split(`
|
57
|
+
`).forEach(function(l){i=l.indexOf(":"),t=l.substring(0,i).trim().toLowerCase(),n=l.substring(i+1).trim(),!(!t||e[t]&&cB[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},kp=Symbol("internals");function Gi(r){return r&&String(r).trim().toLowerCase()}function js(r){return r===!1||r==null?r:N.isArray(r)?r.map(js):String(r)}function uB(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 dB=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Fu(r,e,t,n,i){if(N.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function hB(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function fB(r,e){const t=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,l){return this[n].call(this,e,i,s,l)},configurable:!0})})}class $t{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(d,f,g){const m=Gi(f);if(!m)throw new Error("header name must be a non-empty string");const v=N.findKey(i,m);(!v||i[v]===void 0||g===!0||g===void 0&&i[v]!==!1)&&(i[v||f]=js(d))}const l=(d,f)=>N.forEach(d,(g,m)=>s(g,m,f));if(N.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(N.isString(e)&&(e=e.trim())&&!dB(e))l(lB(e),t);else if(N.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=Gi(e),e){const n=N.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return uB(i);if(N.isFunction(t))return t.call(this,i,n);if(N.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Gi(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Fu(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(l){if(l=Gi(l),l){const d=N.findKey(n,l);d&&(!t||Fu(n,n[d],d,t))&&(delete n[d],i=!0)}}return N.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||Fu(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return N.forEach(this,(i,s)=>{const l=N.findKey(n,s);if(l){t[l]=js(i),delete t[s];return}const d=e?hB(s):String(s).trim();d!==s&&delete t[s],t[d]=js(i),n[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&N.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[kp]=this[kp]={accessors:{}}).accessors,i=this.prototype;function s(l){const d=Gi(l);n[d]||(fB(i,l),n[d]=!0)}return N.isArray(e)?e.forEach(s):s(e),this}}$t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors($t.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});N.freezeMethods($t);function Hu(r,e){const t=this||ba,n=e||t,i=$t.from(n.headers);let s=n.data;return N.forEach(r,function(d){s=d.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Ew(r){return!!(r&&r.__CANCEL__)}function wi(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}N.inherits(wi,ue,{__CANCEL__:!0});function Sw(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 gB(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function mB(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,l;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=n[s];l||(l=g),t[i]=f,n[i]=g;let v=s,C=0;for(;v!==i;)C+=t[v++],v=v%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-l<e)return;const S=m&&g-m;return S?Math.round(C*1e3/S):void 0}}function pB(r,e){let t=0,n=1e3/e,i,s;const l=(g,m=Date.now())=>{t=m,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const m=Date.now(),v=m-t;v>=n?l(g,m):(i=g,s||(s=setTimeout(()=>{s=null,l(i)},n-v)))},()=>i&&l(i)]}const pc=(r,e,t=3)=>{let n=0;const i=mB(50,250);return pB(s=>{const l=s.loaded,d=s.lengthComputable?s.total:void 0,f=l-n,g=i(f),m=l<=d;n=l;const v={loaded:l,total:d,progress:d?l/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-l)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(v)},t)},Rp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},Op=r=>(...e)=>N.asap(()=>r(...e)),vB=bt.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,bt.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(bt.origin),bt.navigator&&/(msie|trident)/i.test(bt.navigator.userAgent)):()=>!0,yB=bt.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const l=[r+"="+encodeURIComponent(e)];N.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),N.isString(n)&&l.push("path="+n),N.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.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 CB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function wB(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function Aw(r,e){return r&&!CB(e)?wB(r,e):e}const Np=r=>r instanceof $t?{...r}:r;function Co(r,e){e=e||{};const t={};function n(g,m,v,C){return N.isPlainObject(g)&&N.isPlainObject(m)?N.merge.call({caseless:C},g,m):N.isPlainObject(m)?N.merge({},m):N.isArray(m)?m.slice():m}function i(g,m,v,C){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g,v,C)}else return n(g,m,v,C)}function s(g,m){if(!N.isUndefined(m))return n(void 0,m)}function l(g,m){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g)}else return n(void 0,m)}function d(g,m,v){if(v in e)return n(g,m);if(v in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(g,m,v)=>i(Np(g),Np(m),v,!0)};return N.forEach(Object.keys(Object.assign({},r,e)),function(m){const v=f[m]||i,C=v(r[m],e[m],m);N.isUndefined(C)&&v!==d||(t[m]=C)}),t}const bw=r=>{const e=Co({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:l,auth:d}=e;e.headers=l=$t.from(l),e.url=ww(Aw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(N.isFormData(t)){if(bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((f=l.getContentType())!==!1){const[g,...m]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];l.setContentType([g||"multipart/form-data",...m].join("; "))}}if(bt.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(e)),n||n!==!1&&vB(e.url))){const g=i&&s&&yB.read(s);g&&l.set(i,g)}return e},_B=typeof XMLHttpRequest<"u",TB=_B&&function(r){return new Promise(function(t,n){const i=bw(r);let s=i.data;const l=$t.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,m,v,C,S,T;function I(){S&&S(),T&&T(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let O=new XMLHttpRequest;O.open(i.method.toUpperCase(),i.url,!0),O.timeout=i.timeout;function $(){if(!O)return;const H=$t.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),Q={data:!d||d==="text"||d==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:H,config:r,request:O};Sw(function(W){t(W),I()},function(W){n(W),I()},Q),O=null}"onloadend"in O?O.onloadend=$:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout($)},O.onabort=function(){O&&(n(new ue("Request aborted",ue.ECONNABORTED,r,O)),O=null)},O.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,r,O)),O=null},O.ontimeout=function(){let z=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const Q=i.transitional||_w;i.timeoutErrorMessage&&(z=i.timeoutErrorMessage),n(new ue(z,Q.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,O)),O=null},s===void 0&&l.setContentType(null),"setRequestHeader"in O&&N.forEach(l.toJSON(),function(z,Q){O.setRequestHeader(Q,z)}),N.isUndefined(i.withCredentials)||(O.withCredentials=!!i.withCredentials),d&&d!=="json"&&(O.responseType=i.responseType),g&&([C,T]=pc(g,!0),O.addEventListener("progress",C)),f&&O.upload&&([v,S]=pc(f),O.upload.addEventListener("progress",v),O.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(m=H=>{O&&(n(!H||H.type?new wi(null,r,O):H),O.abort(),O=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const F=gB(i.url);if(F&&bt.protocols.indexOf(F)===-1){n(new ue("Unsupported protocol "+F+":",ue.ERR_BAD_REQUEST,r));return}O.send(s||null)})},EB=(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 m=g instanceof Error?g:this.reason;n.abort(m instanceof ue?m:new wi(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(l&&clearTimeout(l),l=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=()=>N.asap(d),f}},SB=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},AB=async function*(r,e){for await(const t of bB(r))yield*SB(t,e)},bB=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()}},Pp=(r,e,t,n)=>{const i=AB(r,e);let s=0,l,d=f=>{l||(l=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:m}=await i.next();if(g){d(),f.close();return}let v=m.byteLength;if(t){let C=s+=v;t(C)}f.enqueue(new Uint8Array(m))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},qc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Iw=qc&&typeof ReadableStream=="function",IB=qc&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),kw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},kB=Iw&&kw(()=>{let r=!1;const e=new Request(bt.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Mp=64*1024,kd=Iw&&kw(()=>N.isReadableStream(new Response("").body)),vc={stream:kd&&(r=>r.body)};qc&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!vc[e]&&(vc[e]=N.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 RB=async r=>{if(r==null)return 0;if(N.isBlob(r))return r.size;if(N.isSpecCompliantForm(r))return(await new Request(bt.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(N.isArrayBufferView(r)||N.isArrayBuffer(r))return r.byteLength;if(N.isURLSearchParams(r)&&(r=r+""),N.isString(r))return(await IB(r)).byteLength},OB=async(r,e)=>{const t=N.toFiniteNumber(r.getContentLength());return t??RB(e)},NB=qc&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:l,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:m,withCredentials:v="same-origin",fetchOptions:C}=bw(r);g=g?(g+"").toLowerCase():"text";let S=EB([i,s&&s.toAbortSignal()],l),T;const I=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let O;try{if(f&&kB&&t!=="get"&&t!=="head"&&(O=await OB(m,n))!==0){let Q=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(N.isFormData(n)&&(we=Q.headers.get("content-type"))&&m.setContentType(we),Q.body){const[W,tt]=Rp(O,pc(Op(f)));n=Pp(Q.body,Mp,W,tt)}}N.isString(v)||(v=v?"include":"omit");const $="credentials"in Request.prototype;T=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:$?v:void 0});let F=await fetch(T);const H=kd&&(g==="stream"||g==="response");if(kd&&(d||H&&I)){const Q={};["status","statusText","headers"].forEach(Te=>{Q[Te]=F[Te]});const we=N.toFiniteNumber(F.headers.get("content-length")),[W,tt]=d&&Rp(we,pc(Op(d),!0))||[];F=new Response(Pp(F.body,Mp,W,()=>{tt&&tt(),I&&I()}),Q)}g=g||"text";let z=await vc[N.findKey(vc,g)||"text"](F,r);return!H&&I&&I(),await new Promise((Q,we)=>{Sw(Q,we,{data:z,headers:$t.from(F.headers),status:F.status,statusText:F.statusText,config:r,request:T})})}catch($){throw I&&I(),$&&$.name==="TypeError"&&/fetch/i.test($.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,r,T),{cause:$.cause||$}):ue.from($,$&&$.code,r,T)}}),Rd={http:qL,xhr:TB,fetch:NB};N.forEach(Rd,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const xp=r=>`- ${r}`,PB=r=>N.isFunction(r)||r===null||r===!1,Rw={getAdapter:r=>{r=N.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let l;if(n=t,!PB(t)&&(n=Rd[(l=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${l}'`);if(n)break;i[l||"#"+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 l=e?s.length>1?`since :
|
59
59
|
`+s.map(xp).join(`
|
60
|
-
`):" "+xp(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n},adapters:Rd};function $u(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new wi(null,r)}function Dp(r){return $u(r),r.headers
|
61
|
-
`+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Co(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Ys.assertOptions(n,{silentJSONParsing:
|
60
|
+
`):" "+xp(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n},adapters:Rd};function $u(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new wi(null,r)}function Dp(r){return $u(r),r.headers=$t.from(r.headers),r.data=Hu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Rw.getAdapter(r.adapter||ba.adapter)(r).then(function(n){return $u(r),n.data=Hu.call(r,r.transformResponse,n),n.headers=$t.from(n.headers),n},function(n){return Ew(n)||($u(r),n&&n.response&&(n.response.data=Hu.call(r,r.transformResponse,n.response),n.response.headers=$t.from(n.response.headers))),Promise.reject(n)})}const Ow="1.7.9",Gc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Gc[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const Lp={};Gc.transitional=function(e,t,n){function i(s,l){return"[Axios v"+Ow+"] Transitional option '"+s+"'"+l+(n?". "+n:"")}return(s,l,d)=>{if(e===!1)throw new ue(i(l," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Lp[l]&&(Lp[l]=!0,console.warn(i(l," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,l,d):!0}};Gc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function MB(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],l=e[s];if(l){const d=r[s],f=d===void 0||l(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 Ys={assertOptions:MB,validators:Gc},Gn=Ys.validators;class go{constructor(e){this.defaults=e,this.interceptors={request:new Ip,response:new Ip}}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=Co(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Ys.assertOptions(n,{silentJSONParsing:Gn.transitional(Gn.boolean),forcedJSONParsing:Gn.transitional(Gn.boolean),clarifyTimeoutError:Gn.transitional(Gn.boolean)},!1),i!=null&&(N.isFunction(i)?t.paramsSerializer={serialize:i}:Ys.assertOptions(i,{encode:Gn.function,serialize:Gn.function},!0)),Ys.assertOptions(t,{baseUrl:Gn.spelling("baseURL"),withXsrfToken:Gn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=s&&N.merge(s.common,s[t.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],T=>{delete s[T]}),t.headers=$t.concat(l,s);const d=[];let f=!0;this.interceptors.request.forEach(function(I){typeof I.runWhen=="function"&&I.runWhen(t)===!1||(f=f&&I.synchronous,d.unshift(I.fulfilled,I.rejected))});const g=[];this.interceptors.response.forEach(function(I){g.push(I.fulfilled,I.rejected)});let m,v=0,C;if(!f){const T=[Dp.bind(this),void 0];for(T.unshift.apply(T,d),T.push.apply(T,g),C=T.length,m=Promise.resolve(t);v<C;)m=m.then(T[v++],T[v++]);return m}C=d.length;let S=t;for(v=0;v<C;){const T=d[v++],I=d[v++];try{S=T(S)}catch(O){I.call(this,O);break}}try{m=Dp.call(this,S)}catch(T){return Promise.reject(T)}for(v=0,C=g.length;v<C;)m=m.then(g[v++],g[v++]);return m}getUri(e){e=Co(this.defaults,e);const t=Aw(e.baseURL,e.url);return ww(t,e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(e){go.prototype[e]=function(t,n){return this.request(Co(n||{},{method:e,url:t,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(e){function t(n){return function(s,l,d){return this.request(Co(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}go.prototype[e]=t(),go.prototype[e+"Form"]=t(!0)});class Oh{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 l=new Promise(d=>{n.subscribe(d),s=d}).then(i);return l.cancel=function(){n.unsubscribe(s)},l},e(function(s,l,d){n.reason||(n.reason=new wi(s,l,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 Oh(function(i){e=i}),cancel:e}}}function xB(r){return function(t){return r.apply(null,t)}}function DB(r){return N.isObject(r)&&r.isAxiosError===!0}const Od={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(Od).forEach(([r,e])=>{Od[e]=r});function Nw(r){const e=new go(r),t=cw(go.prototype.request,e);return N.extend(t,go.prototype,e,{allOwnKeys:!0}),N.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Nw(Co(r,i))},t}const Ke=Nw(ba);Ke.Axios=go;Ke.CanceledError=wi;Ke.CancelToken=Oh;Ke.isCancel=Ew;Ke.VERSION=Ow;Ke.toFormData=Wc;Ke.AxiosError=ue;Ke.Cancel=Ke.CanceledError;Ke.all=function(e){return Promise.all(e)};Ke.spread=xB;Ke.isAxiosError=DB;Ke.mergeConfig=Co;Ke.AxiosHeaders=$t;Ke.formToJSON=r=>Tw(N.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Rw.getAdapter;Ke.HttpStatusCode=Od;Ke.default=Ke;const{jToken:Bp}=aw(),Nh=()=>{const r=Ke.create({headers:{"Content-Type":"application/json"}});c.watch(Bp,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 l=i.config;if(((s=i.response)==null?void 0:s.status)===401&&e>0){e--;try{return l.headers.Authorization=`Bearer ${Bp.value}`,await r(l)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:s,header:l={},body:d,baseURL:f}){try{return f&&(r.defaults.baseURL=f),(await r({url:i,method:s,headers:l,data:d})).data}catch(g){if(console.error(`Request error [${s} ${i}]:`,g),Ke.isAxiosError(g)){const{response:m,message:v}=g;throw new Error(`Axios error: ${v}, Status: ${m==null?void 0:m.status}, URL: ${i}`)}throw g}}async function n({url:i,method:s,header:l,body:d,baseURL:f}){try{f&&(r.defaults.baseURL=f);const g=await r({url:i,method:s,headers:l,data:d});return{status:g.status,header:g.headers,body:g.data}}catch(g){if(Ke.isAxiosError(g)){const{response:m,message:v}=g;console.error(`Raw Request Error: ${v}, Status: ${m==null?void 0:m.status}`)}return Promise.reject(g)}}return Object.assign(r,{_request:t,rawRequest:n})},{request:Up}=Nh(),Vp=c.ref(null),Fp=c.ref("default"),Ku=c.ref(null),zu=c.ref({scope_type:"org"});function jc(){var m,v;const{handleRedirect:r,account:e}=sw(),t=(v=(m=e.value)==null?void 0:m.idTokenClaims)==null?void 0:v.domain,n=c.computed(()=>({domain:t,environment:Fp.value,...zu.value})),i=c.computed(()=>zu.value);async function s(){var C;(!e.value||!((C=e.value.idTokenClaims)!=null&&C.email))&&await r();try{await l(),await d()}catch{}}async function l(){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 I=await Up({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});Ku.value=I.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var C;try{if(!((C=Ku.value)!=null&&C.email))throw new Error("User email is undefined");const S=await Up({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});Vp.value=S.data??[]}catch(S){console.error("Failed to fetch user domains:",S)}}function f(C){zu.value=C}function g(C){Fp.value=C,f(n.value)}return{__init__:s,user:Ku,domain:t,userDomains:Vp,setEnv:g,setScope:f,session:n,scope:i}}var Ps=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function LB(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Zi={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 LB=Zi.exports,Hp;function BB(){return Hp||(Hp=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.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,m="__lodash_placeholder__",y=1,C=2,S=4,T=1,I=2,N=1,K=2,F=4,H=8,z=16,Q=32,we=64,W=128,tt=256,Te=512,Y=30,G="...",Ee=800,Ue=16,yt=1,Sn=2,an=3,Pt=1/0,Qe=9007199254740991,Ct=17976931348623157e292,Si=NaN,$t=4294967295,Yc=$t-1,Bw=$t>>>1,Uw=[["ary",W],["bind",N],["bindKey",K],["curry",H],["curryRight",z],["flip",Te],["partial",Q],["partialRight",we],["rearg",tt]],To="[object Arguments]",Ia="[object Array]",Vw="[object AsyncFunction]",Ai="[object Boolean]",bi="[object Date]",Fw="[object DOMException]",ka="[object Error]",Ra="[object Function]",Ph="[object GeneratorFunction]",An="[object Map]",Ii="[object Number]",Hw="[object Null]",rr="[object Object]",Mh="[object Promise]",$w="[object Proxy]",ki="[object RegExp]",bn="[object Set]",Ri="[object String]",Oa="[object Symbol]",Kw="[object Undefined]",Oi="[object WeakMap]",zw="[object WeakSet]",Ni="[object ArrayBuffer]",Eo="[object DataView]",Jc="[object Float32Array]",Qc="[object Float64Array]",Xc="[object Int8Array]",Zc="[object Int16Array]",el="[object Int32Array]",tl="[object Uint8Array]",nl="[object Uint8ClampedArray]",rl="[object Uint16Array]",ol="[object Uint32Array]",Ww=/\b__p \+= '';/g,qw=/\b(__p \+=) '' \+/g,Gw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xh=/&(?:amp|lt|gt|quot|#39);/g,Dh=/[&<>"']/g,jw=RegExp(xh.source),Yw=RegExp(Dh.source),Jw=/<%-([\s\S]+?)%>/g,Qw=/<%([\s\S]+?)%>/g,Lh=/<%=([\s\S]+?)%>/g,Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zw=/^\w*$/,e_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,il=/[\\^$.*+?()[\]{}|]/g,t_=RegExp(il.source),al=/^\s+/,n_=/\s/,r_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,o_=/\{\n\/\* \[wrapped with (.+)\] \*/,i_=/,? & /,a_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,s_=/[()=,{}\[\]\/\s]/,c_=/\\(\\)?/g,l_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bh=/\w*$/,u_=/^[-+]0x[0-9a-f]+$/i,d_=/^0b[01]+$/i,h_=/^\[object .+?Constructor\]$/,f_=/^0o[0-7]+$/i,g_=/^(?:0|[1-9]\d*)$/,m_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Na=/($^)/,p_=/['\n\r\u2028\u2029\\]/g,Pa="\\ud800-\\udfff",v_="\\u0300-\\u036f",y_="\\ufe20-\\ufe2f",C_="\\u20d0-\\u20ff",Uh=v_+y_+C_,Vh="\\u2700-\\u27bf",Fh="a-z\\xdf-\\xf6\\xf8-\\xff",w_="\\xac\\xb1\\xd7\\xf7",__="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",T_="\\u2000-\\u206f",E_=" \\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",Hh="A-Z\\xc0-\\xd6\\xd8-\\xde",$h="\\ufe0e\\ufe0f",Kh=w_+__+T_+E_,sl="['’]",S_="["+Pa+"]",zh="["+Kh+"]",Ma="["+Uh+"]",Wh="\\d+",A_="["+Vh+"]",qh="["+Fh+"]",Gh="[^"+Pa+Kh+Wh+Vh+Fh+Hh+"]",cl="\\ud83c[\\udffb-\\udfff]",b_="(?:"+Ma+"|"+cl+")",jh="[^"+Pa+"]",ll="(?:\\ud83c[\\udde6-\\uddff]){2}",ul="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+Hh+"]",Yh="\\u200d",Jh="(?:"+qh+"|"+Gh+")",I_="(?:"+So+"|"+Gh+")",Qh="(?:"+sl+"(?:d|ll|m|re|s|t|ve))?",Xh="(?:"+sl+"(?:D|LL|M|RE|S|T|VE))?",Zh=b_+"?",ef="["+$h+"]?",k_="(?:"+Yh+"(?:"+[jh,ll,ul].join("|")+")"+ef+Zh+")*",R_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",O_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tf=ef+Zh+k_,N_="(?:"+[A_,ll,ul].join("|")+")"+tf,P_="(?:"+[jh+Ma+"?",Ma,ll,ul,S_].join("|")+")",M_=RegExp(sl,"g"),x_=RegExp(Ma,"g"),dl=RegExp(cl+"(?="+cl+")|"+P_+tf,"g"),D_=RegExp([So+"?"+qh+"+"+Qh+"(?="+[zh,So,"$"].join("|")+")",I_+"+"+Xh+"(?="+[zh,So+Jh,"$"].join("|")+")",So+"?"+Jh+"+"+Qh,So+"+"+Xh,O_,R_,Wh,N_].join("|"),"g"),L_=RegExp("["+Yh+Pa+Uh+$h+"]"),B_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U_=["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"],V_=-1,De={};De[Jc]=De[Qc]=De[Xc]=De[Zc]=De[el]=De[tl]=De[nl]=De[rl]=De[ol]=!0,De[To]=De[Ia]=De[Ni]=De[Ai]=De[Eo]=De[bi]=De[ka]=De[Ra]=De[An]=De[Ii]=De[rr]=De[ki]=De[bn]=De[Ri]=De[Oi]=!1;var Me={};Me[To]=Me[Ia]=Me[Ni]=Me[Eo]=Me[Ai]=Me[bi]=Me[Jc]=Me[Qc]=Me[Xc]=Me[Zc]=Me[el]=Me[An]=Me[Ii]=Me[rr]=Me[ki]=Me[bn]=Me[Ri]=Me[Oa]=Me[tl]=Me[nl]=Me[rl]=Me[ol]=!0,Me[ka]=Me[Ra]=Me[Oi]=!1;var F_={À:"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"},H_={"&":"&","<":"<",">":">",'"':""","'":"'"},$_={"&":"&","<":"<",">":">",""":'"',"'":"'"},K_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},z_=parseFloat,W_=parseInt,nf=typeof Ps=="object"&&Ps&&Ps.Object===Object&&Ps,q_=typeof self=="object"&&self&&self.Object===Object&&self,ht=nf||q_||Function("return this")(),hl=e&&!e.nodeType&&e,jr=hl&&!0&&r&&!r.nodeType&&r,rf=jr&&jr.exports===hl,fl=rf&&nf.process,sn=function(){try{var A=jr&&jr.require&&jr.require("util").types;return A||fl&&fl.binding&&fl.binding("util")}catch{}}(),of=sn&&sn.isArrayBuffer,af=sn&&sn.isDate,sf=sn&&sn.isMap,cf=sn&&sn.isRegExp,lf=sn&&sn.isSet,uf=sn&&sn.isTypedArray;function Kt(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 G_(A,M,R,q){for(var se=-1,Se=A==null?0:A.length;++se<Se;){var nt=A[se];M(q,nt,R(nt),A)}return q}function cn(A,M){for(var R=-1,q=A==null?0:A.length;++R<q&&M(A[R],R,A)!==!1;);return A}function j_(A,M){for(var R=A==null?0:A.length;R--&&M(A[R],R,A)!==!1;);return A}function df(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 Sr(A,M){for(var R=-1,q=A==null?0:A.length,se=0,Se=[];++R<q;){var nt=A[R];M(nt,R,A)&&(Se[se++]=nt)}return Se}function xa(A,M){var R=A==null?0:A.length;return!!R&&Ao(A,M,0)>-1}function gl(A,M,R){for(var q=-1,se=A==null?0:A.length;++q<se;)if(R(M,A[q]))return!0;return!1}function Ve(A,M){for(var R=-1,q=A==null?0:A.length,se=Array(q);++R<q;)se[R]=M(A[R],R,A);return se}function Ar(A,M){for(var R=-1,q=M.length,se=A.length;++R<q;)A[se+R]=M[R];return A}function ml(A,M,R,q){var se=-1,Se=A==null?0:A.length;for(q&&Se&&(R=A[++se]);++se<Se;)R=M(R,A[se],se,A);return R}function Y_(A,M,R,q){var se=A==null?0:A.length;for(q&&se&&(R=A[--se]);se--;)R=M(R,A[se],se,A);return R}function pl(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 J_=vl("length");function Q_(A){return A.split("")}function X_(A){return A.match(a_)||[]}function hf(A,M,R){var q;return R(A,function(se,Se,nt){if(M(se,Se,nt))return q=Se,!1}),q}function Da(A,M,R,q){for(var se=A.length,Se=R+(q?1:-1);q?Se--:++Se<se;)if(M(A[Se],Se,A))return Se;return-1}function Ao(A,M,R){return M===M?uT(A,M,R):Da(A,ff,R)}function Z_(A,M,R,q){for(var se=R-1,Se=A.length;++se<Se;)if(q(A[se],M))return se;return-1}function ff(A){return A!==A}function gf(A,M){var R=A==null?0:A.length;return R?Cl(A,M)/R:Si}function vl(A){return function(M){return M==null?t:M[A]}}function yl(A){return function(M){return A==null?t:A[M]}}function mf(A,M,R,q,se){return se(A,function(Se,nt,Ne){R=q?(q=!1,Se):M(R,Se,nt,Ne)}),R}function eT(A,M){var R=A.length;for(A.sort(M);R--;)A[R]=A[R].value;return A}function Cl(A,M){for(var R,q=-1,se=A.length;++q<se;){var Se=M(A[q]);Se!==t&&(R=R===t?Se:R+Se)}return R}function wl(A,M){for(var R=-1,q=Array(A);++R<A;)q[R]=M(R);return q}function tT(A,M){return Ve(M,function(R){return[R,A[R]]})}function pf(A){return A&&A.slice(0,wf(A)+1).replace(al,"")}function zt(A){return function(M){return A(M)}}function _l(A,M){return Ve(M,function(R){return A[R]})}function Pi(A,M){return A.has(M)}function vf(A,M){for(var R=-1,q=A.length;++R<q&&Ao(M,A[R],0)>-1;);return R}function yf(A,M){for(var R=A.length;R--&&Ao(M,A[R],0)>-1;);return R}function nT(A,M){for(var R=A.length,q=0;R--;)A[R]===M&&++q;return q}var rT=yl(F_),oT=yl(H_);function iT(A){return"\\"+K_[A]}function aT(A,M){return A==null?t:A[M]}function bo(A){return L_.test(A)}function sT(A){return B_.test(A)}function cT(A){for(var M,R=[];!(M=A.next()).done;)R.push(M.value);return R}function Tl(A){var M=-1,R=Array(A.size);return A.forEach(function(q,se){R[++M]=[se,q]}),R}function Cf(A,M){return function(R){return A(M(R))}}function br(A,M){for(var R=-1,q=A.length,se=0,Se=[];++R<q;){var nt=A[R];(nt===M||nt===m)&&(A[R]=m,Se[se++]=R)}return Se}function La(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=q}),R}function lT(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=[q,q]}),R}function uT(A,M,R){for(var q=R-1,se=A.length;++q<se;)if(A[q]===M)return q;return-1}function dT(A,M,R){for(var q=R+1;q--;)if(A[q]===M)return q;return q}function Io(A){return bo(A)?fT(A):J_(A)}function In(A){return bo(A)?gT(A):Q_(A)}function wf(A){for(var M=A.length;M--&&n_.test(A.charAt(M)););return M}var hT=yl($_);function fT(A){for(var M=dl.lastIndex=0;dl.test(A);)++M;return M}function gT(A){return A.match(dl)||[]}function mT(A){return A.match(D_)||[]}var pT=function A(M){M=M==null?ht:ko.defaults(ht.Object(),M,ko.pick(ht,U_));var R=M.Array,q=M.Date,se=M.Error,Se=M.Function,nt=M.Math,Ne=M.Object,El=M.RegExp,vT=M.String,ln=M.TypeError,Ba=R.prototype,yT=Se.prototype,Ro=Ne.prototype,Ua=M["__core-js_shared__"],Va=yT.toString,Ie=Ro.hasOwnProperty,CT=0,_f=function(){var o=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Fa=Ro.toString,wT=Va.call(Ne),_T=ht._,TT=El("^"+Va.call(Ie).replace(il,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ha=rf?M.Buffer:t,Ir=M.Symbol,$a=M.Uint8Array,Tf=Ha?Ha.allocUnsafe:t,Ka=Cf(Ne.getPrototypeOf,Ne),Ef=Ne.create,Sf=Ro.propertyIsEnumerable,za=Ba.splice,Af=Ir?Ir.isConcatSpreadable:t,Mi=Ir?Ir.iterator:t,Yr=Ir?Ir.toStringTag:t,Wa=function(){try{var o=eo(Ne,"defineProperty");return o({},"",{}),o}catch{}}(),ET=M.clearTimeout!==ht.clearTimeout&&M.clearTimeout,ST=q&&q.now!==ht.Date.now&&q.now,AT=M.setTimeout!==ht.setTimeout&&M.setTimeout,qa=nt.ceil,Ga=nt.floor,Sl=Ne.getOwnPropertySymbols,bT=Ha?Ha.isBuffer:t,bf=M.isFinite,IT=Ba.join,kT=Cf(Ne.keys,Ne),rt=nt.max,wt=nt.min,RT=q.now,OT=M.parseInt,If=nt.random,NT=Ba.reverse,Al=eo(M,"DataView"),xi=eo(M,"Map"),bl=eo(M,"Promise"),Oo=eo(M,"Set"),Di=eo(M,"WeakMap"),Li=eo(Ne,"create"),ja=Di&&new Di,No={},PT=to(Al),MT=to(xi),xT=to(bl),DT=to(Oo),LT=to(Di),Ya=Ir?Ir.prototype:t,Bi=Ya?Ya.valueOf:t,kf=Ya?Ya.toString:t;function v(o){if(ze(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof un)return o;if(Ie.call(o,"__wrapped__"))return Rg(o)}return new un(o)}var Po=function(){function o(){}return function(a){if(!$e(a))return{};if(Ef)return Ef(a);o.prototype=a;var u=new o;return o.prototype=t,u}}();function Ja(){}function un(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}v.templateSettings={escape:Jw,evaluate:Qw,interpolate:Lh,variable:"",imports:{_:v}},v.prototype=Ja.prototype,v.prototype.constructor=v,un.prototype=Po(Ja.prototype),un.prototype.constructor=un;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=$t,this.__views__=[]}function BT(){var o=new pe(this.__wrapped__);return o.__actions__=Mt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Mt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Mt(this.__views__),o}function UT(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function VT(){var o=this.__wrapped__.value(),a=this.__dir__,u=ce(o),h=a<0,p=u?o.length:0,w=QE(0,p,this.__views__),_=w.start,E=w.end,b=E-_,x=h?E:_-1,D=this.__iteratees__,L=D.length,$=0,J=wt(b,this.__takeCount__);if(!u||!h&&p==b&&J==b)return Xf(o,this.__actions__);var ee=[];e:for(;b--&&$<J;){x+=a;for(var he=-1,te=o[x];++he<L;){var me=D[he],ve=me.iteratee,Gt=me.type,Rt=ve(te);if(Gt==Sn)te=Rt;else if(!Rt){if(Gt==yt)continue e;break e}}ee[$++]=te}return ee}pe.prototype=Po(Ja.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function FT(){this.__data__=Li?Li(null):{},this.size=0}function HT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function $T(o){var a=this.__data__;if(Li){var u=a[o];return u===f?t:u}return Ie.call(a,o)?a[o]:t}function KT(o){var a=this.__data__;return Li?a[o]!==t:Ie.call(a,o)}function zT(o,a){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=Li&&a===t?f:a,this}Jr.prototype.clear=FT,Jr.prototype.delete=HT,Jr.prototype.get=$T,Jr.prototype.has=KT,Jr.prototype.set=zT;function or(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function WT(){this.__data__=[],this.size=0}function qT(o){var a=this.__data__,u=Qa(a,o);if(u<0)return!1;var h=a.length-1;return u==h?a.pop():za.call(a,u,1),--this.size,!0}function GT(o){var a=this.__data__,u=Qa(a,o);return u<0?t:a[u][1]}function jT(o){return Qa(this.__data__,o)>-1}function YT(o,a){var u=this.__data__,h=Qa(u,o);return h<0?(++this.size,u.push([o,a])):u[h][1]=a,this}or.prototype.clear=WT,or.prototype.delete=qT,or.prototype.get=GT,or.prototype.has=jT,or.prototype.set=YT;function ir(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function JT(){this.size=0,this.__data__={hash:new Jr,map:new(xi||or),string:new Jr}}function QT(o){var a=ls(this,o).delete(o);return this.size-=a?1:0,a}function XT(o){return ls(this,o).get(o)}function ZT(o){return ls(this,o).has(o)}function eE(o,a){var u=ls(this,o),h=u.size;return u.set(o,a),this.size+=u.size==h?0:1,this}ir.prototype.clear=JT,ir.prototype.delete=QT,ir.prototype.get=XT,ir.prototype.has=ZT,ir.prototype.set=eE;function Qr(o){var a=-1,u=o==null?0:o.length;for(this.__data__=new ir;++a<u;)this.add(o[a])}function tE(o){return this.__data__.set(o,f),this}function nE(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=tE,Qr.prototype.has=nE;function kn(o){var a=this.__data__=new or(o);this.size=a.size}function rE(){this.__data__=new or,this.size=0}function oE(o){var a=this.__data__,u=a.delete(o);return this.size=a.size,u}function iE(o){return this.__data__.get(o)}function aE(o){return this.__data__.has(o)}function sE(o,a){var u=this.__data__;if(u instanceof or){var h=u.__data__;if(!xi||h.length<i-1)return h.push([o,a]),this.size=++u.size,this;u=this.__data__=new ir(h)}return u.set(o,a),this.size=u.size,this}kn.prototype.clear=rE,kn.prototype.delete=oE,kn.prototype.get=iE,kn.prototype.has=aE,kn.prototype.set=sE;function Rf(o,a){var u=ce(o),h=!u&&no(o),p=!u&&!h&&Pr(o),w=!u&&!h&&!p&&Lo(o),_=u||h||p||w,E=_?wl(o.length,vT):[],b=E.length;for(var x in o)(a||Ie.call(o,x))&&!(_&&(x=="length"||p&&(x=="offset"||x=="parent")||w&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||lr(x,b)))&&E.push(x);return E}function Of(o){var a=o.length;return a?o[Bl(0,a-1)]:t}function cE(o,a){return us(Mt(o),Xr(a,0,o.length))}function lE(o){return us(Mt(o))}function Il(o,a,u){(u!==t&&!Rn(o[a],u)||u===t&&!(a in o))&&ar(o,a,u)}function Ui(o,a,u){var h=o[a];(!(Ie.call(o,a)&&Rn(h,u))||u===t&&!(a in o))&&ar(o,a,u)}function Qa(o,a){for(var u=o.length;u--;)if(Rn(o[u][0],a))return u;return-1}function uE(o,a,u,h){return kr(o,function(p,w,_){a(h,p,u(p),_)}),h}function Nf(o,a){return o&&Kn(a,st(a),o)}function dE(o,a){return o&&Kn(a,Dt(a),o)}function ar(o,a,u){a=="__proto__"&&Wa?Wa(o,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):o[a]=u}function kl(o,a){for(var u=-1,h=a.length,p=R(h),w=o==null;++u<h;)p[u]=w?t:cu(o,a[u]);return p}function Xr(o,a,u){return o===o&&(u!==t&&(o=o<=u?o:u),a!==t&&(o=o>=a?o:a)),o}function dn(o,a,u,h,p,w){var _,E=a&y,b=a&C,x=a&S;if(u&&(_=p?u(o,h,p,w):u(o)),_!==t)return _;if(!$e(o))return o;var D=ce(o);if(D){if(_=ZE(o),!E)return Mt(o,_)}else{var L=_t(o),$=L==Ra||L==Ph;if(Pr(o))return tg(o,E);if(L==rr||L==To||$&&!p){if(_=b||$?{}:wg(o),!E)return b?$E(o,dE(_,o)):HE(o,Nf(_,o))}else{if(!Me[L])return p?o:{};_=eS(o,L,E)}}w||(w=new kn);var J=w.get(o);if(J)return J;w.set(o,_),Yg(o)?o.forEach(function(te){_.add(dn(te,a,u,te,o,w))}):Gg(o)&&o.forEach(function(te,me){_.set(me,dn(te,a,u,me,o,w))});var ee=x?b?jl:Gl:b?Dt:st,he=D?t:ee(o);return cn(he||o,function(te,me){he&&(me=te,te=o[me]),Ui(_,me,dn(te,a,u,me,o,w))}),_}function hE(o){var a=st(o);return function(u){return Pf(u,o,a)}}function Pf(o,a,u){var h=u.length;if(o==null)return!h;for(o=Ne(o);h--;){var p=u[h],w=a[p],_=o[p];if(_===t&&!(p in o)||!w(_))return!1}return!0}function Mf(o,a,u){if(typeof o!="function")throw new ln(l);return Wi(function(){o.apply(t,u)},a)}function Vi(o,a,u,h){var p=-1,w=xa,_=!0,E=o.length,b=[],x=a.length;if(!E)return b;u&&(a=Ve(a,zt(u))),h?(w=gl,_=!1):a.length>=i&&(w=Pi,_=!1,a=new Qr(a));e:for(;++p<E;){var D=o[p],L=u==null?D:u(D);if(D=h||D!==0?D:0,_&&L===L){for(var $=x;$--;)if(a[$]===L)continue e;b.push(D)}else w(a,L,h)||b.push(D)}return b}var kr=ag($n),xf=ag(Ol,!0);function fE(o,a){var u=!0;return kr(o,function(h,p,w){return u=!!a(h,p,w),u}),u}function Xa(o,a,u){for(var h=-1,p=o.length;++h<p;){var w=o[h],_=a(w);if(_!=null&&(E===t?_===_&&!qt(_):u(_,E)))var E=_,b=w}return b}function gE(o,a,u,h){var p=o.length;for(u=de(u),u<0&&(u=-u>p?0:p+u),h=h===t||h>p?p:de(h),h<0&&(h+=p),h=u>h?0:Qg(h);u<h;)o[u++]=a;return o}function Df(o,a){var u=[];return kr(o,function(h,p,w){a(h,p,w)&&u.push(h)}),u}function ft(o,a,u,h,p){var w=-1,_=o.length;for(u||(u=nS),p||(p=[]);++w<_;){var E=o[w];a>0&&u(E)?a>1?ft(E,a-1,u,h,p):Ar(p,E):h||(p[p.length]=E)}return p}var Rl=sg(),Lf=sg(!0);function $n(o,a){return o&&Rl(o,a,st)}function Ol(o,a){return o&&Lf(o,a,st)}function Za(o,a){return Sr(a,function(u){return ur(o[u])})}function Zr(o,a){a=Or(a,o);for(var u=0,h=a.length;o!=null&&u<h;)o=o[zn(a[u++])];return u&&u==h?o:t}function Bf(o,a,u){var h=a(o);return ce(o)?h:Ar(h,u(o))}function It(o){return o==null?o===t?Kw:Hw:Yr&&Yr in Ne(o)?JE(o):lS(o)}function Nl(o,a){return o>a}function mE(o,a){return o!=null&&Ie.call(o,a)}function pE(o,a){return o!=null&&a in Ne(o)}function vE(o,a,u){return o>=wt(a,u)&&o<rt(a,u)}function Pl(o,a,u){for(var h=u?gl:xa,p=o[0].length,w=o.length,_=w,E=R(w),b=1/0,x=[];_--;){var D=o[_];_&&a&&(D=Ve(D,zt(a))),b=wt(D.length,b),E[_]=!u&&(a||p>=120&&D.length>=120)?new Qr(_&&D):t}D=o[0];var L=-1,$=E[0];e:for(;++L<p&&x.length<b;){var J=D[L],ee=a?a(J):J;if(J=u||J!==0?J:0,!($?Pi($,ee):h(x,ee,u))){for(_=w;--_;){var he=E[_];if(!(he?Pi(he,ee):h(o[_],ee,u)))continue e}$&&$.push(ee),x.push(J)}}return x}function yE(o,a,u,h){return $n(o,function(p,w,_){a(h,u(p),w,_)}),h}function Fi(o,a,u){a=Or(a,o),o=Sg(o,a);var h=o==null?o:o[zn(fn(a))];return h==null?t:Kt(h,o,u)}function Uf(o){return ze(o)&&It(o)==To}function CE(o){return ze(o)&&It(o)==Ni}function wE(o){return ze(o)&&It(o)==bi}function Hi(o,a,u,h,p){return o===a?!0:o==null||a==null||!ze(o)&&!ze(a)?o!==o&&a!==a:_E(o,a,u,h,Hi,p)}function _E(o,a,u,h,p,w){var _=ce(o),E=ce(a),b=_?Ia:_t(o),x=E?Ia:_t(a);b=b==To?rr:b,x=x==To?rr:x;var D=b==rr,L=x==rr,$=b==x;if($&&Pr(o)){if(!Pr(a))return!1;_=!0,D=!1}if($&&!D)return w||(w=new kn),_||Lo(o)?vg(o,a,u,h,p,w):jE(o,a,b,u,h,p,w);if(!(u&T)){var J=D&&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 w||(w=new kn),p(he,te,u,h,w)}}return $?(w||(w=new kn),YE(o,a,u,h,p,w)):!1}function TE(o){return ze(o)&&_t(o)==An}function Ml(o,a,u,h){var p=u.length,w=p,_=!h;if(o==null)return!w;for(o=Ne(o);p--;){var E=u[p];if(_&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++p<w;){E=u[p];var b=E[0],x=o[b],D=E[1];if(_&&E[2]){if(x===t&&!(b in o))return!1}else{var L=new kn;if(h)var $=h(x,D,b,o,a,L);if(!($===t?Hi(D,x,T|I,h,L):$))return!1}}return!0}function Vf(o){if(!$e(o)||oS(o))return!1;var a=ur(o)?TT:h_;return a.test(to(o))}function EE(o){return ze(o)&&It(o)==ki}function SE(o){return ze(o)&&_t(o)==bn}function AE(o){return ze(o)&&ps(o.length)&&!!De[It(o)]}function Ff(o){return typeof o=="function"?o:o==null?Lt:typeof o=="object"?ce(o)?Kf(o[0],o[1]):$f(o):cm(o)}function xl(o){if(!zi(o))return kT(o);var a=[];for(var u in Ne(o))Ie.call(o,u)&&u!="constructor"&&a.push(u);return a}function bE(o){if(!$e(o))return cS(o);var a=zi(o),u=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||u.push(h);return u}function Dl(o,a){return o<a}function Hf(o,a){var u=-1,h=xt(o)?R(o.length):[];return kr(o,function(p,w,_){h[++u]=a(p,w,_)}),h}function $f(o){var a=Jl(o);return a.length==1&&a[0][2]?Tg(a[0][0],a[0][1]):function(u){return u===o||Ml(u,o,a)}}function Kf(o,a){return Xl(o)&&_g(a)?Tg(zn(o),a):function(u){var h=cu(u,o);return h===t&&h===a?lu(u,o):Hi(a,h,T|I)}}function es(o,a,u,h,p){o!==a&&Rl(a,function(w,_){if(p||(p=new kn),$e(w))IE(o,a,_,u,es,h,p);else{var E=h?h(eu(o,_),w,_+"",o,a,p):t;E===t&&(E=w),Il(o,_,E)}},Dt)}function IE(o,a,u,h,p,w,_){var E=eu(o,u),b=eu(a,u),x=_.get(b);if(x){Il(o,u,x);return}var D=w?w(E,b,u+"",o,a,_):t,L=D===t;if(L){var $=ce(b),J=!$&&Pr(b),ee=!$&&!J&&Lo(b);D=b,$||J||ee?ce(E)?D=E:je(E)?D=Mt(E):J?(L=!1,D=tg(b,!0)):ee?(L=!1,D=ng(b,!0)):D=[]:qi(b)||no(b)?(D=E,no(E)?D=Xg(E):(!$e(E)||ur(E))&&(D=wg(b))):L=!1}L&&(_.set(b,D),p(D,b,h,w,_),_.delete(b)),Il(o,u,D)}function zf(o,a){var u=o.length;if(u)return a+=a<0?u:0,lr(a,u)?o[a]:t}function Wf(o,a,u){a.length?a=Ve(a,function(w){return ce(w)?function(_){return Zr(_,w.length===1?w[0]:w)}:w}):a=[Lt];var h=-1;a=Ve(a,zt(Z()));var p=Hf(o,function(w,_,E){var b=Ve(a,function(x){return x(w)});return{criteria:b,index:++h,value:w}});return eT(p,function(w,_){return FE(w,_,u)})}function kE(o,a){return qf(o,a,function(u,h){return lu(o,h)})}function qf(o,a,u){for(var h=-1,p=a.length,w={};++h<p;){var _=a[h],E=Zr(o,_);u(E,_)&&$i(w,Or(_,o),E)}return w}function RE(o){return function(a){return Zr(a,o)}}function Ll(o,a,u,h){var p=h?Z_:Ao,w=-1,_=a.length,E=o;for(o===a&&(a=Mt(a)),u&&(E=Ve(o,zt(u)));++w<_;)for(var b=0,x=a[w],D=u?u(x):x;(b=p(E,D,b,h))>-1;)E!==o&&za.call(E,b,1),za.call(o,b,1);return o}function Gf(o,a){for(var u=o?a.length:0,h=u-1;u--;){var p=a[u];if(u==h||p!==w){var w=p;lr(p)?za.call(o,p,1):Fl(o,p)}}return o}function Bl(o,a){return o+Ga(If()*(a-o+1))}function OE(o,a,u,h){for(var p=-1,w=rt(qa((a-o)/(u||1)),0),_=R(w);w--;)_[h?w:++p]=o,o+=u;return _}function Ul(o,a){var u="";if(!o||a<1||a>Qe)return u;do a%2&&(u+=o),a=Ga(a/2),a&&(o+=o);while(a);return u}function fe(o,a){return tu(Eg(o,a,Lt),o+"")}function NE(o){return Of(Bo(o))}function PE(o,a){var u=Bo(o);return us(u,Xr(a,0,u.length))}function $i(o,a,u,h){if(!$e(o))return o;a=Or(a,o);for(var p=-1,w=a.length,_=w-1,E=o;E!=null&&++p<w;){var b=zn(a[p]),x=u;if(b==="__proto__"||b==="constructor"||b==="prototype")return o;if(p!=_){var D=E[b];x=h?h(D,b,E):t,x===t&&(x=$e(D)?D:lr(a[p+1])?[]:{})}Ui(E,b,x),E=E[b]}return o}var jf=ja?function(o,a){return ja.set(o,a),o}:Lt,ME=Wa?function(o,a){return Wa(o,"toString",{configurable:!0,enumerable:!1,value:du(a),writable:!0})}:Lt;function xE(o){return us(Bo(o))}function hn(o,a,u){var h=-1,p=o.length;a<0&&(a=-a>p?0:p+a),u=u>p?p:u,u<0&&(u+=p),p=a>u?0:u-a>>>0,a>>>=0;for(var w=R(p);++h<p;)w[h]=o[h+a];return w}function DE(o,a){var u;return kr(o,function(h,p,w){return u=a(h,p,w),!u}),!!u}function ts(o,a,u){var h=0,p=o==null?h:o.length;if(typeof a=="number"&&a===a&&p<=Bw){for(;h<p;){var w=h+p>>>1,_=o[w];_!==null&&!qt(_)&&(u?_<=a:_<a)?h=w+1:p=w}return p}return Vl(o,a,Lt,u)}function Vl(o,a,u,h){var p=0,w=o==null?0:o.length;if(w===0)return 0;a=u(a);for(var _=a!==a,E=a===null,b=qt(a),x=a===t;p<w;){var D=Ga((p+w)/2),L=u(o[D]),$=L!==t,J=L===null,ee=L===L,he=qt(L);if(_)var te=h||ee;else x?te=ee&&(h||$):E?te=ee&&$&&(h||!J):b?te=ee&&$&&!J&&(h||!he):J||he?te=!1:te=h?L<=a:L<a;te?p=D+1:w=D}return wt(w,Yc)}function Yf(o,a){for(var u=-1,h=o.length,p=0,w=[];++u<h;){var _=o[u],E=a?a(_):_;if(!u||!Rn(E,b)){var b=E;w[p++]=_===0?0:_}}return w}function Jf(o){return typeof o=="number"?o:qt(o)?Si:+o}function Wt(o){if(typeof o=="string")return o;if(ce(o))return Ve(o,Wt)+"";if(qt(o))return kf?kf.call(o):"";var a=o+"";return a=="0"&&1/o==-Pt?"-0":a}function Rr(o,a,u){var h=-1,p=xa,w=o.length,_=!0,E=[],b=E;if(u)_=!1,p=gl;else if(w>=i){var x=a?null:qE(o);if(x)return La(x);_=!1,p=Pi,b=new Qr}else b=a?[]:E;e:for(;++h<w;){var D=o[h],L=a?a(D):D;if(D=u||D!==0?D:0,_&&L===L){for(var $=b.length;$--;)if(b[$]===L)continue e;a&&b.push(L),E.push(D)}else p(b,L,u)||(b!==E&&b.push(L),E.push(D))}return E}function Fl(o,a){return a=Or(a,o),o=Sg(o,a),o==null||delete o[zn(fn(a))]}function Qf(o,a,u,h){return $i(o,a,u(Zr(o,a)),h)}function ns(o,a,u,h){for(var p=o.length,w=h?p:-1;(h?w--:++w<p)&&a(o[w],w,o););return u?hn(o,h?0:w,h?w+1:p):hn(o,h?w+1:0,h?p:w)}function Xf(o,a){var u=o;return u instanceof pe&&(u=u.value()),ml(a,function(h,p){return p.func.apply(p.thisArg,Ar([h],p.args))},u)}function Hl(o,a,u){var h=o.length;if(h<2)return h?Rr(o[0]):[];for(var p=-1,w=R(h);++p<h;)for(var _=o[p],E=-1;++E<h;)E!=p&&(w[p]=Vi(w[p]||_,o[E],a,u));return Rr(ft(w,1),a,u)}function Zf(o,a,u){for(var h=-1,p=o.length,w=a.length,_={};++h<p;){var E=h<w?a[h]:t;u(_,o[h],E)}return _}function $l(o){return je(o)?o:[]}function Kl(o){return typeof o=="function"?o:Lt}function Or(o,a){return ce(o)?o:Xl(o,a)?[o]:kg(be(o))}var LE=fe;function Nr(o,a,u){var h=o.length;return u=u===t?h:u,!a&&u>=h?o:hn(o,a,u)}var eg=ET||function(o){return ht.clearTimeout(o)};function tg(o,a){if(a)return o.slice();var u=o.length,h=Tf?Tf(u):new o.constructor(u);return o.copy(h),h}function zl(o){var a=new o.constructor(o.byteLength);return new $a(a).set(new $a(o)),a}function BE(o,a){var u=a?zl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.byteLength)}function UE(o){var a=new o.constructor(o.source,Bh.exec(o));return a.lastIndex=o.lastIndex,a}function VE(o){return Bi?Ne(Bi.call(o)):{}}function ng(o,a){var u=a?zl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.length)}function rg(o,a){if(o!==a){var u=o!==t,h=o===null,p=o===o,w=qt(o),_=a!==t,E=a===null,b=a===a,x=qt(a);if(!E&&!x&&!w&&o>a||w&&_&&b&&!E&&!x||h&&_&&b||!u&&b||!p)return 1;if(!h&&!w&&!x&&o<a||x&&u&&p&&!h&&!w||E&&u&&p||!_&&p||!b)return-1}return 0}function FE(o,a,u){for(var h=-1,p=o.criteria,w=a.criteria,_=p.length,E=u.length;++h<_;){var b=rg(p[h],w[h]);if(b){if(h>=E)return b;var x=u[h];return b*(x=="desc"?-1:1)}}return o.index-a.index}function og(o,a,u,h){for(var p=-1,w=o.length,_=u.length,E=-1,b=a.length,x=rt(w-_,0),D=R(b+x),L=!h;++E<b;)D[E]=a[E];for(;++p<_;)(L||p<w)&&(D[u[p]]=o[p]);for(;x--;)D[E++]=o[p++];return D}function ig(o,a,u,h){for(var p=-1,w=o.length,_=-1,E=u.length,b=-1,x=a.length,D=rt(w-E,0),L=R(D+x),$=!h;++p<D;)L[p]=o[p];for(var J=p;++b<x;)L[J+b]=a[b];for(;++_<E;)($||p<w)&&(L[J+u[_]]=o[p++]);return L}function Mt(o,a){var u=-1,h=o.length;for(a||(a=R(h));++u<h;)a[u]=o[u];return a}function Kn(o,a,u,h){var p=!u;u||(u={});for(var w=-1,_=a.length;++w<_;){var E=a[w],b=h?h(u[E],o[E],E,u,o):t;b===t&&(b=o[E]),p?ar(u,E,b):Ui(u,E,b)}return u}function HE(o,a){return Kn(o,Ql(o),a)}function $E(o,a){return Kn(o,yg(o),a)}function rs(o,a){return function(u,h){var p=ce(u)?G_:uE,w=a?a():{};return p(u,o,Z(h,2),w)}}function Mo(o){return fe(function(a,u){var h=-1,p=u.length,w=p>1?u[p-1]:t,_=p>2?u[2]:t;for(w=o.length>3&&typeof w=="function"?(p--,w):t,_&&kt(u[0],u[1],_)&&(w=p<3?t:w,p=1),a=Ne(a);++h<p;){var E=u[h];E&&o(a,E,h,w)}return a})}function ag(o,a){return function(u,h){if(u==null)return u;if(!xt(u))return o(u,h);for(var p=u.length,w=a?p:-1,_=Ne(u);(a?w--:++w<p)&&h(_[w],w,_)!==!1;);return u}}function sg(o){return function(a,u,h){for(var p=-1,w=Ne(a),_=h(a),E=_.length;E--;){var b=_[o?E:++p];if(u(w[b],b,w)===!1)break}return a}}function KE(o,a,u){var h=a&N,p=Ki(o);function w(){var _=this&&this!==ht&&this instanceof w?p:o;return _.apply(h?u:this,arguments)}return w}function cg(o){return function(a){a=be(a);var u=bo(a)?In(a):t,h=u?u[0]:a.charAt(0),p=u?Nr(u,1).join(""):a.slice(1);return h[o]()+p}}function xo(o){return function(a){return ml(am(im(a).replace(M_,"")),o,"")}}function Ki(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 u=Po(o.prototype),h=o.apply(u,a);return $e(h)?h:u}}function zE(o,a,u){var h=Ki(o);function p(){for(var w=arguments.length,_=R(w),E=w,b=Do(p);E--;)_[E]=arguments[E];var x=w<3&&_[0]!==b&&_[w-1]!==b?[]:br(_,b);if(w-=x.length,w<u)return fg(o,a,os,p.placeholder,t,_,x,t,t,u-w);var D=this&&this!==ht&&this instanceof p?h:o;return Kt(D,this,_)}return p}function lg(o){return function(a,u,h){var p=Ne(a);if(!xt(a)){var w=Z(u,3);a=st(a),u=function(E){return w(p[E],E,p)}}var _=o(a,u,h);return _>-1?p[w?a[_]:_]:t}}function ug(o){return cr(function(a){var u=a.length,h=u,p=un.prototype.thru;for(o&&a.reverse();h--;){var w=a[h];if(typeof w!="function")throw new ln(l);if(p&&!_&&cs(w)=="wrapper")var _=new un([],!0)}for(h=_?h:u;++h<u;){w=a[h];var E=cs(w),b=E=="wrapper"?Yl(w):t;b&&Zl(b[0])&&b[1]==(W|H|Q|tt)&&!b[4].length&&b[9]==1?_=_[cs(b[0])].apply(_,b[3]):_=w.length==1&&Zl(w)?_[E]():_.thru(w)}return function(){var x=arguments,D=x[0];if(_&&x.length==1&&ce(D))return _.plant(D).value();for(var L=0,$=u?a[L].apply(this,x):D;++L<u;)$=a[L].call(this,$);return $}})}function os(o,a,u,h,p,w,_,E,b,x){var D=a&W,L=a&N,$=a&K,J=a&(H|z),ee=a&Te,he=$?t:Ki(o);function te(){for(var me=arguments.length,ve=R(me),Gt=me;Gt--;)ve[Gt]=arguments[Gt];if(J)var Rt=Do(te),jt=nT(ve,Rt);if(h&&(ve=og(ve,h,p,J)),w&&(ve=ig(ve,w,_,J)),me-=jt,J&&me<x){var Ye=br(ve,Rt);return fg(o,a,os,te.placeholder,u,ve,Ye,E,b,x-me)}var On=L?u:this,hr=$?On[o]:o;return me=ve.length,E?ve=uS(ve,E):ee&&me>1&&ve.reverse(),D&&b<me&&(ve.length=b),this&&this!==ht&&this instanceof te&&(hr=he||Ki(hr)),hr.apply(On,ve)}return te}function dg(o,a){return function(u,h){return yE(u,o,a(h),{})}}function is(o,a){return function(u,h){var p;if(u===t&&h===t)return a;if(u!==t&&(p=u),h!==t){if(p===t)return h;typeof u=="string"||typeof h=="string"?(u=Wt(u),h=Wt(h)):(u=Jf(u),h=Jf(h)),p=o(u,h)}return p}}function Wl(o){return cr(function(a){return a=Ve(a,zt(Z())),fe(function(u){var h=this;return o(a,function(p){return Kt(p,h,u)})})})}function as(o,a){a=a===t?" ":Wt(a);var u=a.length;if(u<2)return u?Ul(a,o):a;var h=Ul(a,qa(o/Io(a)));return bo(a)?Nr(In(h),0,o).join(""):h.slice(0,o)}function WE(o,a,u,h){var p=a&N,w=Ki(o);function _(){for(var E=-1,b=arguments.length,x=-1,D=h.length,L=R(D+b),$=this&&this!==ht&&this instanceof _?w:o;++x<D;)L[x]=h[x];for(;b--;)L[x++]=arguments[++E];return Kt($,p?u:this,L)}return _}function hg(o){return function(a,u,h){return h&&typeof h!="number"&&kt(a,u,h)&&(u=h=t),a=dr(a),u===t?(u=a,a=0):u=dr(u),h=h===t?a<u?1:-1:dr(h),OE(a,u,h,o)}}function ss(o){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=gn(a),u=gn(u)),o(a,u)}}function fg(o,a,u,h,p,w,_,E,b,x){var D=a&H,L=D?_:t,$=D?t:_,J=D?w:t,ee=D?t:w;a|=D?Q:we,a&=~(D?we:Q),a&F||(a&=~(N|K));var he=[o,a,p,J,L,ee,$,E,b,x],te=u.apply(t,he);return Zl(o)&&Ag(te,he),te.placeholder=h,bg(te,o,a)}function ql(o){var a=nt[o];return function(u,h){if(u=gn(u),h=h==null?0:wt(de(h),292),h&&bf(u)){var p=(be(u)+"e").split("e"),w=a(p[0]+"e"+(+p[1]+h));return p=(be(w)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return a(u)}}var qE=Oo&&1/La(new Oo([,-0]))[1]==Pt?function(o){return new Oo(o)}:gu;function gg(o){return function(a){var u=_t(a);return u==An?Tl(a):u==bn?lT(a):tT(a,o(a))}}function sr(o,a,u,h,p,w,_,E){var b=a&K;if(!b&&typeof o!="function")throw new ln(l);var x=h?h.length:0;if(x||(a&=~(Q|we),h=p=t),_=_===t?_:rt(de(_),0),E=E===t?E:de(E),x-=p?p.length:0,a&we){var D=h,L=p;h=p=t}var $=b?t:Yl(o),J=[o,a,u,h,p,D,L,w,_,E];if($&&sS(J,$),o=J[0],a=J[1],u=J[2],h=J[3],p=J[4],E=J[9]=J[9]===t?b?0:o.length:rt(J[9]-x,0),!E&&a&(H|z)&&(a&=~(H|z)),!a||a==N)var ee=KE(o,a,u);else a==H||a==z?ee=zE(o,a,E):(a==Q||a==(N|Q))&&!p.length?ee=WE(o,a,u,h):ee=os.apply(t,J);var he=$?jf:Ag;return bg(he(ee,J),o,a)}function mg(o,a,u,h){return o===t||Rn(o,Ro[u])&&!Ie.call(h,u)?a:o}function pg(o,a,u,h,p,w){return $e(o)&&$e(a)&&(w.set(a,o),es(o,a,t,pg,w),w.delete(a)),o}function GE(o){return qi(o)?t:o}function vg(o,a,u,h,p,w){var _=u&T,E=o.length,b=a.length;if(E!=b&&!(_&&b>E))return!1;var x=w.get(o),D=w.get(a);if(x&&D)return x==a&&D==o;var L=-1,$=!0,J=u&I?new Qr:t;for(w.set(o,a),w.set(a,o);++L<E;){var ee=o[L],he=a[L];if(h)var te=_?h(he,ee,L,a,o,w):h(ee,he,L,o,a,w);if(te!==t){if(te)continue;$=!1;break}if(J){if(!pl(a,function(me,ve){if(!Pi(J,ve)&&(ee===me||p(ee,me,u,h,w)))return J.push(ve)})){$=!1;break}}else if(!(ee===he||p(ee,he,u,h,w))){$=!1;break}}return w.delete(o),w.delete(a),$}function jE(o,a,u,h,p,w,_){switch(u){case Eo:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Ni:return!(o.byteLength!=a.byteLength||!w(new $a(o),new $a(a)));case Ai:case bi:case Ii:return Rn(+o,+a);case ka:return o.name==a.name&&o.message==a.message;case ki:case Ri:return o==a+"";case An:var E=Tl;case bn:var b=h&T;if(E||(E=La),o.size!=a.size&&!b)return!1;var x=_.get(o);if(x)return x==a;h|=I,_.set(o,a);var D=vg(E(o),E(a),h,p,w,_);return _.delete(o),D;case Oa:if(Bi)return Bi.call(o)==Bi.call(a)}return!1}function YE(o,a,u,h,p,w){var _=u&T,E=Gl(o),b=E.length,x=Gl(a),D=x.length;if(b!=D&&!_)return!1;for(var L=b;L--;){var $=E[L];if(!(_?$ in a:Ie.call(a,$)))return!1}var J=w.get(o),ee=w.get(a);if(J&&ee)return J==a&&ee==o;var he=!0;w.set(o,a),w.set(a,o);for(var te=_;++L<b;){$=E[L];var me=o[$],ve=a[$];if(h)var Gt=_?h(ve,me,$,a,o,w):h(me,ve,$,o,a,w);if(!(Gt===t?me===ve||p(me,ve,u,h,w):Gt)){he=!1;break}te||(te=$=="constructor")}if(he&&!te){var Rt=o.constructor,jt=a.constructor;Rt!=jt&&"constructor"in o&&"constructor"in a&&!(typeof Rt=="function"&&Rt instanceof Rt&&typeof jt=="function"&&jt instanceof jt)&&(he=!1)}return w.delete(o),w.delete(a),he}function cr(o){return tu(Eg(o,t,Pg),o+"")}function Gl(o){return Bf(o,st,Ql)}function jl(o){return Bf(o,Dt,yg)}var Yl=ja?function(o){return ja.get(o)}:gu;function cs(o){for(var a=o.name+"",u=No[a],h=Ie.call(No,a)?u.length:0;h--;){var p=u[h],w=p.func;if(w==null||w==o)return p.name}return a}function Do(o){var a=Ie.call(v,"placeholder")?v:o;return a.placeholder}function Z(){var o=v.iteratee||hu;return o=o===hu?Ff:o,arguments.length?o(arguments[0],arguments[1]):o}function ls(o,a){var u=o.__data__;return rS(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Jl(o){for(var a=st(o),u=a.length;u--;){var h=a[u],p=o[h];a[u]=[h,p,_g(p)]}return a}function eo(o,a){var u=aT(o,a);return Vf(u)?u:t}function JE(o){var a=Ie.call(o,Yr),u=o[Yr];try{o[Yr]=t;var h=!0}catch{}var p=Fa.call(o);return h&&(a?o[Yr]=u:delete o[Yr]),p}var Ql=Sl?function(o){return o==null?[]:(o=Ne(o),Sr(Sl(o),function(a){return Sf.call(o,a)}))}:mu,yg=Sl?function(o){for(var a=[];o;)Ar(a,Ql(o)),o=Ka(o);return a}:mu,_t=It;(Al&&_t(new Al(new ArrayBuffer(1)))!=Eo||xi&&_t(new xi)!=An||bl&&_t(bl.resolve())!=Mh||Oo&&_t(new Oo)!=bn||Di&&_t(new Di)!=Oi)&&(_t=function(o){var a=It(o),u=a==rr?o.constructor:t,h=u?to(u):"";if(h)switch(h){case PT:return Eo;case MT:return An;case xT:return Mh;case DT:return bn;case LT:return Oi}return a});function QE(o,a,u){for(var h=-1,p=u.length;++h<p;){var w=u[h],_=w.size;switch(w.type){case"drop":o+=_;break;case"dropRight":a-=_;break;case"take":a=wt(a,o+_);break;case"takeRight":o=rt(o,a-_);break}}return{start:o,end:a}}function XE(o){var a=o.match(o_);return a?a[1].split(i_):[]}function Cg(o,a,u){a=Or(a,o);for(var h=-1,p=a.length,w=!1;++h<p;){var _=zn(a[h]);if(!(w=o!=null&&u(o,_)))break;o=o[_]}return w||++h!=p?w:(p=o==null?0:o.length,!!p&&ps(p)&&lr(_,p)&&(ce(o)||no(o)))}function ZE(o){var a=o.length,u=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(u.index=o.index,u.input=o.input),u}function wg(o){return typeof o.constructor=="function"&&!zi(o)?Po(Ka(o)):{}}function eS(o,a,u){var h=o.constructor;switch(a){case Ni:return zl(o);case Ai:case bi:return new h(+o);case Eo:return BE(o,u);case Jc:case Qc:case Xc:case Zc:case el:case tl:case nl:case rl:case ol:return ng(o,u);case An:return new h;case Ii:case Ri:return new h(o);case ki:return UE(o);case bn:return new h;case Oa:return VE(o)}}function tS(o,a){var u=a.length;if(!u)return o;var h=u-1;return a[h]=(u>1?"& ":"")+a[h],a=a.join(u>2?", ":" "),o.replace(r_,`{
|
68
|
+
*/var BB=Zi.exports,Hp;function UB(){return Hp||(Hp=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.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,m="__lodash_placeholder__",v=1,C=2,S=4,T=1,I=2,O=1,$=2,F=4,H=8,z=16,Q=32,we=64,W=128,tt=256,Te=512,Y=30,G="...",Ee=800,Ue=16,yt=1,An=2,sn=3,Mt=1/0,Qe=9007199254740991,Ct=17976931348623157e292,Si=NaN,Kt=4294967295,Yc=Kt-1,Bw=Kt>>>1,Uw=[["ary",W],["bind",O],["bindKey",$],["curry",H],["curryRight",z],["flip",Te],["partial",Q],["partialRight",we],["rearg",tt]],To="[object Arguments]",Ia="[object Array]",Vw="[object AsyncFunction]",Ai="[object Boolean]",bi="[object Date]",Fw="[object DOMException]",ka="[object Error]",Ra="[object Function]",Ph="[object GeneratorFunction]",bn="[object Map]",Ii="[object Number]",Hw="[object Null]",or="[object Object]",Mh="[object Promise]",$w="[object Proxy]",ki="[object RegExp]",In="[object Set]",Ri="[object String]",Oa="[object Symbol]",Kw="[object Undefined]",Oi="[object WeakMap]",zw="[object WeakSet]",Ni="[object ArrayBuffer]",Eo="[object DataView]",Jc="[object Float32Array]",Qc="[object Float64Array]",Xc="[object Int8Array]",Zc="[object Int16Array]",el="[object Int32Array]",tl="[object Uint8Array]",nl="[object Uint8ClampedArray]",rl="[object Uint16Array]",ol="[object Uint32Array]",Ww=/\b__p \+= '';/g,qw=/\b(__p \+=) '' \+/g,Gw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xh=/&(?:amp|lt|gt|quot|#39);/g,Dh=/[&<>"']/g,jw=RegExp(xh.source),Yw=RegExp(Dh.source),Jw=/<%-([\s\S]+?)%>/g,Qw=/<%([\s\S]+?)%>/g,Lh=/<%=([\s\S]+?)%>/g,Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zw=/^\w*$/,e_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,il=/[\\^$.*+?()[\]{}|]/g,t_=RegExp(il.source),al=/^\s+/,n_=/\s/,r_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,o_=/\{\n\/\* \[wrapped with (.+)\] \*/,i_=/,? & /,a_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,s_=/[()=,{}\[\]\/\s]/,c_=/\\(\\)?/g,l_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bh=/\w*$/,u_=/^[-+]0x[0-9a-f]+$/i,d_=/^0b[01]+$/i,h_=/^\[object .+?Constructor\]$/,f_=/^0o[0-7]+$/i,g_=/^(?:0|[1-9]\d*)$/,m_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Na=/($^)/,p_=/['\n\r\u2028\u2029\\]/g,Pa="\\ud800-\\udfff",v_="\\u0300-\\u036f",y_="\\ufe20-\\ufe2f",C_="\\u20d0-\\u20ff",Uh=v_+y_+C_,Vh="\\u2700-\\u27bf",Fh="a-z\\xdf-\\xf6\\xf8-\\xff",w_="\\xac\\xb1\\xd7\\xf7",__="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",T_="\\u2000-\\u206f",E_=" \\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",Hh="A-Z\\xc0-\\xd6\\xd8-\\xde",$h="\\ufe0e\\ufe0f",Kh=w_+__+T_+E_,sl="['’]",S_="["+Pa+"]",zh="["+Kh+"]",Ma="["+Uh+"]",Wh="\\d+",A_="["+Vh+"]",qh="["+Fh+"]",Gh="[^"+Pa+Kh+Wh+Vh+Fh+Hh+"]",cl="\\ud83c[\\udffb-\\udfff]",b_="(?:"+Ma+"|"+cl+")",jh="[^"+Pa+"]",ll="(?:\\ud83c[\\udde6-\\uddff]){2}",ul="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+Hh+"]",Yh="\\u200d",Jh="(?:"+qh+"|"+Gh+")",I_="(?:"+So+"|"+Gh+")",Qh="(?:"+sl+"(?:d|ll|m|re|s|t|ve))?",Xh="(?:"+sl+"(?:D|LL|M|RE|S|T|VE))?",Zh=b_+"?",ef="["+$h+"]?",k_="(?:"+Yh+"(?:"+[jh,ll,ul].join("|")+")"+ef+Zh+")*",R_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",O_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tf=ef+Zh+k_,N_="(?:"+[A_,ll,ul].join("|")+")"+tf,P_="(?:"+[jh+Ma+"?",Ma,ll,ul,S_].join("|")+")",M_=RegExp(sl,"g"),x_=RegExp(Ma,"g"),dl=RegExp(cl+"(?="+cl+")|"+P_+tf,"g"),D_=RegExp([So+"?"+qh+"+"+Qh+"(?="+[zh,So,"$"].join("|")+")",I_+"+"+Xh+"(?="+[zh,So+Jh,"$"].join("|")+")",So+"?"+Jh+"+"+Qh,So+"+"+Xh,O_,R_,Wh,N_].join("|"),"g"),L_=RegExp("["+Yh+Pa+Uh+$h+"]"),B_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U_=["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"],V_=-1,De={};De[Jc]=De[Qc]=De[Xc]=De[Zc]=De[el]=De[tl]=De[nl]=De[rl]=De[ol]=!0,De[To]=De[Ia]=De[Ni]=De[Ai]=De[Eo]=De[bi]=De[ka]=De[Ra]=De[bn]=De[Ii]=De[or]=De[ki]=De[In]=De[Ri]=De[Oi]=!1;var Me={};Me[To]=Me[Ia]=Me[Ni]=Me[Eo]=Me[Ai]=Me[bi]=Me[Jc]=Me[Qc]=Me[Xc]=Me[Zc]=Me[el]=Me[bn]=Me[Ii]=Me[or]=Me[ki]=Me[In]=Me[Ri]=Me[Oa]=Me[tl]=Me[nl]=Me[rl]=Me[ol]=!0,Me[ka]=Me[Ra]=Me[Oi]=!1;var F_={À:"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"},H_={"&":"&","<":"<",">":">",'"':""","'":"'"},$_={"&":"&","<":"<",">":">",""":'"',"'":"'"},K_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},z_=parseFloat,W_=parseInt,nf=typeof Ps=="object"&&Ps&&Ps.Object===Object&&Ps,q_=typeof self=="object"&&self&&self.Object===Object&&self,ht=nf||q_||Function("return this")(),hl=e&&!e.nodeType&&e,jr=hl&&!0&&r&&!r.nodeType&&r,rf=jr&&jr.exports===hl,fl=rf&&nf.process,cn=function(){try{var A=jr&&jr.require&&jr.require("util").types;return A||fl&&fl.binding&&fl.binding("util")}catch{}}(),of=cn&&cn.isArrayBuffer,af=cn&&cn.isDate,sf=cn&&cn.isMap,cf=cn&&cn.isRegExp,lf=cn&&cn.isSet,uf=cn&&cn.isTypedArray;function zt(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 G_(A,M,R,q){for(var se=-1,Se=A==null?0:A.length;++se<Se;){var nt=A[se];M(q,nt,R(nt),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 j_(A,M){for(var R=A==null?0:A.length;R--&&M(A[R],R,A)!==!1;);return A}function df(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 br(A,M){for(var R=-1,q=A==null?0:A.length,se=0,Se=[];++R<q;){var nt=A[R];M(nt,R,A)&&(Se[se++]=nt)}return Se}function xa(A,M){var R=A==null?0:A.length;return!!R&&Ao(A,M,0)>-1}function gl(A,M,R){for(var q=-1,se=A==null?0:A.length;++q<se;)if(R(M,A[q]))return!0;return!1}function Ve(A,M){for(var R=-1,q=A==null?0:A.length,se=Array(q);++R<q;)se[R]=M(A[R],R,A);return se}function Ir(A,M){for(var R=-1,q=M.length,se=A.length;++R<q;)A[se+R]=M[R];return A}function ml(A,M,R,q){var se=-1,Se=A==null?0:A.length;for(q&&Se&&(R=A[++se]);++se<Se;)R=M(R,A[se],se,A);return R}function Y_(A,M,R,q){var se=A==null?0:A.length;for(q&&se&&(R=A[--se]);se--;)R=M(R,A[se],se,A);return R}function pl(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 J_=vl("length");function Q_(A){return A.split("")}function X_(A){return A.match(a_)||[]}function hf(A,M,R){var q;return R(A,function(se,Se,nt){if(M(se,Se,nt))return q=Se,!1}),q}function Da(A,M,R,q){for(var se=A.length,Se=R+(q?1:-1);q?Se--:++Se<se;)if(M(A[Se],Se,A))return Se;return-1}function Ao(A,M,R){return M===M?uT(A,M,R):Da(A,ff,R)}function Z_(A,M,R,q){for(var se=R-1,Se=A.length;++se<Se;)if(q(A[se],M))return se;return-1}function ff(A){return A!==A}function gf(A,M){var R=A==null?0:A.length;return R?Cl(A,M)/R:Si}function vl(A){return function(M){return M==null?t:M[A]}}function yl(A){return function(M){return A==null?t:A[M]}}function mf(A,M,R,q,se){return se(A,function(Se,nt,Ne){R=q?(q=!1,Se):M(R,Se,nt,Ne)}),R}function eT(A,M){var R=A.length;for(A.sort(M);R--;)A[R]=A[R].value;return A}function Cl(A,M){for(var R,q=-1,se=A.length;++q<se;){var Se=M(A[q]);Se!==t&&(R=R===t?Se:R+Se)}return R}function wl(A,M){for(var R=-1,q=Array(A);++R<A;)q[R]=M(R);return q}function tT(A,M){return Ve(M,function(R){return[R,A[R]]})}function pf(A){return A&&A.slice(0,wf(A)+1).replace(al,"")}function Wt(A){return function(M){return A(M)}}function _l(A,M){return Ve(M,function(R){return A[R]})}function Pi(A,M){return A.has(M)}function vf(A,M){for(var R=-1,q=A.length;++R<q&&Ao(M,A[R],0)>-1;);return R}function yf(A,M){for(var R=A.length;R--&&Ao(M,A[R],0)>-1;);return R}function nT(A,M){for(var R=A.length,q=0;R--;)A[R]===M&&++q;return q}var rT=yl(F_),oT=yl(H_);function iT(A){return"\\"+K_[A]}function aT(A,M){return A==null?t:A[M]}function bo(A){return L_.test(A)}function sT(A){return B_.test(A)}function cT(A){for(var M,R=[];!(M=A.next()).done;)R.push(M.value);return R}function Tl(A){var M=-1,R=Array(A.size);return A.forEach(function(q,se){R[++M]=[se,q]}),R}function Cf(A,M){return function(R){return A(M(R))}}function kr(A,M){for(var R=-1,q=A.length,se=0,Se=[];++R<q;){var nt=A[R];(nt===M||nt===m)&&(A[R]=m,Se[se++]=R)}return Se}function La(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=q}),R}function lT(A){var M=-1,R=Array(A.size);return A.forEach(function(q){R[++M]=[q,q]}),R}function uT(A,M,R){for(var q=R-1,se=A.length;++q<se;)if(A[q]===M)return q;return-1}function dT(A,M,R){for(var q=R+1;q--;)if(A[q]===M)return q;return q}function Io(A){return bo(A)?fT(A):J_(A)}function kn(A){return bo(A)?gT(A):Q_(A)}function wf(A){for(var M=A.length;M--&&n_.test(A.charAt(M)););return M}var hT=yl($_);function fT(A){for(var M=dl.lastIndex=0;dl.test(A);)++M;return M}function gT(A){return A.match(dl)||[]}function mT(A){return A.match(D_)||[]}var pT=function A(M){M=M==null?ht:ko.defaults(ht.Object(),M,ko.pick(ht,U_));var R=M.Array,q=M.Date,se=M.Error,Se=M.Function,nt=M.Math,Ne=M.Object,El=M.RegExp,vT=M.String,un=M.TypeError,Ba=R.prototype,yT=Se.prototype,Ro=Ne.prototype,Ua=M["__core-js_shared__"],Va=yT.toString,Ie=Ro.hasOwnProperty,CT=0,_f=function(){var o=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Fa=Ro.toString,wT=Va.call(Ne),_T=ht._,TT=El("^"+Va.call(Ie).replace(il,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ha=rf?M.Buffer:t,Rr=M.Symbol,$a=M.Uint8Array,Tf=Ha?Ha.allocUnsafe:t,Ka=Cf(Ne.getPrototypeOf,Ne),Ef=Ne.create,Sf=Ro.propertyIsEnumerable,za=Ba.splice,Af=Rr?Rr.isConcatSpreadable:t,Mi=Rr?Rr.iterator:t,Yr=Rr?Rr.toStringTag:t,Wa=function(){try{var o=eo(Ne,"defineProperty");return o({},"",{}),o}catch{}}(),ET=M.clearTimeout!==ht.clearTimeout&&M.clearTimeout,ST=q&&q.now!==ht.Date.now&&q.now,AT=M.setTimeout!==ht.setTimeout&&M.setTimeout,qa=nt.ceil,Ga=nt.floor,Sl=Ne.getOwnPropertySymbols,bT=Ha?Ha.isBuffer:t,bf=M.isFinite,IT=Ba.join,kT=Cf(Ne.keys,Ne),rt=nt.max,wt=nt.min,RT=q.now,OT=M.parseInt,If=nt.random,NT=Ba.reverse,Al=eo(M,"DataView"),xi=eo(M,"Map"),bl=eo(M,"Promise"),Oo=eo(M,"Set"),Di=eo(M,"WeakMap"),Li=eo(Ne,"create"),ja=Di&&new Di,No={},PT=to(Al),MT=to(xi),xT=to(bl),DT=to(Oo),LT=to(Di),Ya=Rr?Rr.prototype:t,Bi=Ya?Ya.valueOf:t,kf=Ya?Ya.toString:t;function y(o){if(ze(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof dn)return o;if(Ie.call(o,"__wrapped__"))return Rg(o)}return new dn(o)}var Po=function(){function o(){}return function(a){if(!$e(a))return{};if(Ef)return Ef(a);o.prototype=a;var u=new o;return o.prototype=t,u}}();function Ja(){}function dn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:Jw,evaluate:Qw,interpolate:Lh,variable:"",imports:{_:y}},y.prototype=Ja.prototype,y.prototype.constructor=y,dn.prototype=Po(Ja.prototype),dn.prototype.constructor=dn;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Kt,this.__views__=[]}function BT(){var o=new pe(this.__wrapped__);return o.__actions__=xt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=xt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=xt(this.__views__),o}function UT(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function VT(){var o=this.__wrapped__.value(),a=this.__dir__,u=ce(o),h=a<0,p=u?o.length:0,w=QE(0,p,this.__views__),_=w.start,E=w.end,b=E-_,x=h?E:_-1,D=this.__iteratees__,L=D.length,K=0,J=wt(b,this.__takeCount__);if(!u||!h&&p==b&&J==b)return Xf(o,this.__actions__);var ee=[];e:for(;b--&&K<J;){x+=a;for(var he=-1,te=o[x];++he<L;){var me=D[he],ve=me.iteratee,jt=me.type,Rt=ve(te);if(jt==An)te=Rt;else if(!Rt){if(jt==yt)continue e;break e}}ee[K++]=te}return ee}pe.prototype=Po(Ja.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function FT(){this.__data__=Li?Li(null):{},this.size=0}function HT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function $T(o){var a=this.__data__;if(Li){var u=a[o];return u===f?t:u}return Ie.call(a,o)?a[o]:t}function KT(o){var a=this.__data__;return Li?a[o]!==t:Ie.call(a,o)}function zT(o,a){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=Li&&a===t?f:a,this}Jr.prototype.clear=FT,Jr.prototype.delete=HT,Jr.prototype.get=$T,Jr.prototype.has=KT,Jr.prototype.set=zT;function ir(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function WT(){this.__data__=[],this.size=0}function qT(o){var a=this.__data__,u=Qa(a,o);if(u<0)return!1;var h=a.length-1;return u==h?a.pop():za.call(a,u,1),--this.size,!0}function GT(o){var a=this.__data__,u=Qa(a,o);return u<0?t:a[u][1]}function jT(o){return Qa(this.__data__,o)>-1}function YT(o,a){var u=this.__data__,h=Qa(u,o);return h<0?(++this.size,u.push([o,a])):u[h][1]=a,this}ir.prototype.clear=WT,ir.prototype.delete=qT,ir.prototype.get=GT,ir.prototype.has=jT,ir.prototype.set=YT;function ar(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function JT(){this.size=0,this.__data__={hash:new Jr,map:new(xi||ir),string:new Jr}}function QT(o){var a=ls(this,o).delete(o);return this.size-=a?1:0,a}function XT(o){return ls(this,o).get(o)}function ZT(o){return ls(this,o).has(o)}function eE(o,a){var u=ls(this,o),h=u.size;return u.set(o,a),this.size+=u.size==h?0:1,this}ar.prototype.clear=JT,ar.prototype.delete=QT,ar.prototype.get=XT,ar.prototype.has=ZT,ar.prototype.set=eE;function Qr(o){var a=-1,u=o==null?0:o.length;for(this.__data__=new ar;++a<u;)this.add(o[a])}function tE(o){return this.__data__.set(o,f),this}function nE(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=tE,Qr.prototype.has=nE;function Rn(o){var a=this.__data__=new ir(o);this.size=a.size}function rE(){this.__data__=new ir,this.size=0}function oE(o){var a=this.__data__,u=a.delete(o);return this.size=a.size,u}function iE(o){return this.__data__.get(o)}function aE(o){return this.__data__.has(o)}function sE(o,a){var u=this.__data__;if(u instanceof ir){var h=u.__data__;if(!xi||h.length<i-1)return h.push([o,a]),this.size=++u.size,this;u=this.__data__=new ar(h)}return u.set(o,a),this.size=u.size,this}Rn.prototype.clear=rE,Rn.prototype.delete=oE,Rn.prototype.get=iE,Rn.prototype.has=aE,Rn.prototype.set=sE;function Rf(o,a){var u=ce(o),h=!u&&no(o),p=!u&&!h&&xr(o),w=!u&&!h&&!p&&Lo(o),_=u||h||p||w,E=_?wl(o.length,vT):[],b=E.length;for(var x in o)(a||Ie.call(o,x))&&!(_&&(x=="length"||p&&(x=="offset"||x=="parent")||w&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||ur(x,b)))&&E.push(x);return E}function Of(o){var a=o.length;return a?o[Bl(0,a-1)]:t}function cE(o,a){return us(xt(o),Xr(a,0,o.length))}function lE(o){return us(xt(o))}function Il(o,a,u){(u!==t&&!On(o[a],u)||u===t&&!(a in o))&&sr(o,a,u)}function Ui(o,a,u){var h=o[a];(!(Ie.call(o,a)&&On(h,u))||u===t&&!(a in o))&&sr(o,a,u)}function Qa(o,a){for(var u=o.length;u--;)if(On(o[u][0],a))return u;return-1}function uE(o,a,u,h){return Or(o,function(p,w,_){a(h,p,u(p),_)}),h}function Nf(o,a){return o&&zn(a,st(a),o)}function dE(o,a){return o&&zn(a,Lt(a),o)}function sr(o,a,u){a=="__proto__"&&Wa?Wa(o,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):o[a]=u}function kl(o,a){for(var u=-1,h=a.length,p=R(h),w=o==null;++u<h;)p[u]=w?t:cu(o,a[u]);return p}function Xr(o,a,u){return o===o&&(u!==t&&(o=o<=u?o:u),a!==t&&(o=o>=a?o:a)),o}function hn(o,a,u,h,p,w){var _,E=a&v,b=a&C,x=a&S;if(u&&(_=p?u(o,h,p,w):u(o)),_!==t)return _;if(!$e(o))return o;var D=ce(o);if(D){if(_=ZE(o),!E)return xt(o,_)}else{var L=_t(o),K=L==Ra||L==Ph;if(xr(o))return tg(o,E);if(L==or||L==To||K&&!p){if(_=b||K?{}:wg(o),!E)return b?$E(o,dE(_,o)):HE(o,Nf(_,o))}else{if(!Me[L])return p?o:{};_=eS(o,L,E)}}w||(w=new Rn);var J=w.get(o);if(J)return J;w.set(o,_),Yg(o)?o.forEach(function(te){_.add(hn(te,a,u,te,o,w))}):Gg(o)&&o.forEach(function(te,me){_.set(me,hn(te,a,u,me,o,w))});var ee=x?b?jl:Gl:b?Lt:st,he=D?t:ee(o);return ln(he||o,function(te,me){he&&(me=te,te=o[me]),Ui(_,me,hn(te,a,u,me,o,w))}),_}function hE(o){var a=st(o);return function(u){return Pf(u,o,a)}}function Pf(o,a,u){var h=u.length;if(o==null)return!h;for(o=Ne(o);h--;){var p=u[h],w=a[p],_=o[p];if(_===t&&!(p in o)||!w(_))return!1}return!0}function Mf(o,a,u){if(typeof o!="function")throw new un(l);return Wi(function(){o.apply(t,u)},a)}function Vi(o,a,u,h){var p=-1,w=xa,_=!0,E=o.length,b=[],x=a.length;if(!E)return b;u&&(a=Ve(a,Wt(u))),h?(w=gl,_=!1):a.length>=i&&(w=Pi,_=!1,a=new Qr(a));e:for(;++p<E;){var D=o[p],L=u==null?D:u(D);if(D=h||D!==0?D:0,_&&L===L){for(var K=x;K--;)if(a[K]===L)continue e;b.push(D)}else w(a,L,h)||b.push(D)}return b}var Or=ag(Kn),xf=ag(Ol,!0);function fE(o,a){var u=!0;return Or(o,function(h,p,w){return u=!!a(h,p,w),u}),u}function Xa(o,a,u){for(var h=-1,p=o.length;++h<p;){var w=o[h],_=a(w);if(_!=null&&(E===t?_===_&&!Gt(_):u(_,E)))var E=_,b=w}return b}function gE(o,a,u,h){var p=o.length;for(u=de(u),u<0&&(u=-u>p?0:p+u),h=h===t||h>p?p:de(h),h<0&&(h+=p),h=u>h?0:Qg(h);u<h;)o[u++]=a;return o}function Df(o,a){var u=[];return Or(o,function(h,p,w){a(h,p,w)&&u.push(h)}),u}function ft(o,a,u,h,p){var w=-1,_=o.length;for(u||(u=nS),p||(p=[]);++w<_;){var E=o[w];a>0&&u(E)?a>1?ft(E,a-1,u,h,p):Ir(p,E):h||(p[p.length]=E)}return p}var Rl=sg(),Lf=sg(!0);function Kn(o,a){return o&&Rl(o,a,st)}function Ol(o,a){return o&&Lf(o,a,st)}function Za(o,a){return br(a,function(u){return dr(o[u])})}function Zr(o,a){a=Pr(a,o);for(var u=0,h=a.length;o!=null&&u<h;)o=o[Wn(a[u++])];return u&&u==h?o:t}function Bf(o,a,u){var h=a(o);return ce(o)?h:Ir(h,u(o))}function It(o){return o==null?o===t?Kw:Hw:Yr&&Yr in Ne(o)?JE(o):lS(o)}function Nl(o,a){return o>a}function mE(o,a){return o!=null&&Ie.call(o,a)}function pE(o,a){return o!=null&&a in Ne(o)}function vE(o,a,u){return o>=wt(a,u)&&o<rt(a,u)}function Pl(o,a,u){for(var h=u?gl:xa,p=o[0].length,w=o.length,_=w,E=R(w),b=1/0,x=[];_--;){var D=o[_];_&&a&&(D=Ve(D,Wt(a))),b=wt(D.length,b),E[_]=!u&&(a||p>=120&&D.length>=120)?new Qr(_&&D):t}D=o[0];var L=-1,K=E[0];e:for(;++L<p&&x.length<b;){var J=D[L],ee=a?a(J):J;if(J=u||J!==0?J:0,!(K?Pi(K,ee):h(x,ee,u))){for(_=w;--_;){var he=E[_];if(!(he?Pi(he,ee):h(o[_],ee,u)))continue e}K&&K.push(ee),x.push(J)}}return x}function yE(o,a,u,h){return Kn(o,function(p,w,_){a(h,u(p),w,_)}),h}function Fi(o,a,u){a=Pr(a,o),o=Sg(o,a);var h=o==null?o:o[Wn(gn(a))];return h==null?t:zt(h,o,u)}function Uf(o){return ze(o)&&It(o)==To}function CE(o){return ze(o)&&It(o)==Ni}function wE(o){return ze(o)&&It(o)==bi}function Hi(o,a,u,h,p){return o===a?!0:o==null||a==null||!ze(o)&&!ze(a)?o!==o&&a!==a:_E(o,a,u,h,Hi,p)}function _E(o,a,u,h,p,w){var _=ce(o),E=ce(a),b=_?Ia:_t(o),x=E?Ia:_t(a);b=b==To?or:b,x=x==To?or:x;var D=b==or,L=x==or,K=b==x;if(K&&xr(o)){if(!xr(a))return!1;_=!0,D=!1}if(K&&!D)return w||(w=new Rn),_||Lo(o)?vg(o,a,u,h,p,w):jE(o,a,b,u,h,p,w);if(!(u&T)){var J=D&&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 w||(w=new Rn),p(he,te,u,h,w)}}return K?(w||(w=new Rn),YE(o,a,u,h,p,w)):!1}function TE(o){return ze(o)&&_t(o)==bn}function Ml(o,a,u,h){var p=u.length,w=p,_=!h;if(o==null)return!w;for(o=Ne(o);p--;){var E=u[p];if(_&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++p<w;){E=u[p];var b=E[0],x=o[b],D=E[1];if(_&&E[2]){if(x===t&&!(b in o))return!1}else{var L=new Rn;if(h)var K=h(x,D,b,o,a,L);if(!(K===t?Hi(D,x,T|I,h,L):K))return!1}}return!0}function Vf(o){if(!$e(o)||oS(o))return!1;var a=dr(o)?TT:h_;return a.test(to(o))}function EE(o){return ze(o)&&It(o)==ki}function SE(o){return ze(o)&&_t(o)==In}function AE(o){return ze(o)&&ps(o.length)&&!!De[It(o)]}function Ff(o){return typeof o=="function"?o:o==null?Bt:typeof o=="object"?ce(o)?Kf(o[0],o[1]):$f(o):cm(o)}function xl(o){if(!zi(o))return kT(o);var a=[];for(var u in Ne(o))Ie.call(o,u)&&u!="constructor"&&a.push(u);return a}function bE(o){if(!$e(o))return cS(o);var a=zi(o),u=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||u.push(h);return u}function Dl(o,a){return o<a}function Hf(o,a){var u=-1,h=Dt(o)?R(o.length):[];return Or(o,function(p,w,_){h[++u]=a(p,w,_)}),h}function $f(o){var a=Jl(o);return a.length==1&&a[0][2]?Tg(a[0][0],a[0][1]):function(u){return u===o||Ml(u,o,a)}}function Kf(o,a){return Xl(o)&&_g(a)?Tg(Wn(o),a):function(u){var h=cu(u,o);return h===t&&h===a?lu(u,o):Hi(a,h,T|I)}}function es(o,a,u,h,p){o!==a&&Rl(a,function(w,_){if(p||(p=new Rn),$e(w))IE(o,a,_,u,es,h,p);else{var E=h?h(eu(o,_),w,_+"",o,a,p):t;E===t&&(E=w),Il(o,_,E)}},Lt)}function IE(o,a,u,h,p,w,_){var E=eu(o,u),b=eu(a,u),x=_.get(b);if(x){Il(o,u,x);return}var D=w?w(E,b,u+"",o,a,_):t,L=D===t;if(L){var K=ce(b),J=!K&&xr(b),ee=!K&&!J&&Lo(b);D=b,K||J||ee?ce(E)?D=E:je(E)?D=xt(E):J?(L=!1,D=tg(b,!0)):ee?(L=!1,D=ng(b,!0)):D=[]:qi(b)||no(b)?(D=E,no(E)?D=Xg(E):(!$e(E)||dr(E))&&(D=wg(b))):L=!1}L&&(_.set(b,D),p(D,b,h,w,_),_.delete(b)),Il(o,u,D)}function zf(o,a){var u=o.length;if(u)return a+=a<0?u:0,ur(a,u)?o[a]:t}function Wf(o,a,u){a.length?a=Ve(a,function(w){return ce(w)?function(_){return Zr(_,w.length===1?w[0]:w)}:w}):a=[Bt];var h=-1;a=Ve(a,Wt(Z()));var p=Hf(o,function(w,_,E){var b=Ve(a,function(x){return x(w)});return{criteria:b,index:++h,value:w}});return eT(p,function(w,_){return FE(w,_,u)})}function kE(o,a){return qf(o,a,function(u,h){return lu(o,h)})}function qf(o,a,u){for(var h=-1,p=a.length,w={};++h<p;){var _=a[h],E=Zr(o,_);u(E,_)&&$i(w,Pr(_,o),E)}return w}function RE(o){return function(a){return Zr(a,o)}}function Ll(o,a,u,h){var p=h?Z_:Ao,w=-1,_=a.length,E=o;for(o===a&&(a=xt(a)),u&&(E=Ve(o,Wt(u)));++w<_;)for(var b=0,x=a[w],D=u?u(x):x;(b=p(E,D,b,h))>-1;)E!==o&&za.call(E,b,1),za.call(o,b,1);return o}function Gf(o,a){for(var u=o?a.length:0,h=u-1;u--;){var p=a[u];if(u==h||p!==w){var w=p;ur(p)?za.call(o,p,1):Fl(o,p)}}return o}function Bl(o,a){return o+Ga(If()*(a-o+1))}function OE(o,a,u,h){for(var p=-1,w=rt(qa((a-o)/(u||1)),0),_=R(w);w--;)_[h?w:++p]=o,o+=u;return _}function Ul(o,a){var u="";if(!o||a<1||a>Qe)return u;do a%2&&(u+=o),a=Ga(a/2),a&&(o+=o);while(a);return u}function fe(o,a){return tu(Eg(o,a,Bt),o+"")}function NE(o){return Of(Bo(o))}function PE(o,a){var u=Bo(o);return us(u,Xr(a,0,u.length))}function $i(o,a,u,h){if(!$e(o))return o;a=Pr(a,o);for(var p=-1,w=a.length,_=w-1,E=o;E!=null&&++p<w;){var b=Wn(a[p]),x=u;if(b==="__proto__"||b==="constructor"||b==="prototype")return o;if(p!=_){var D=E[b];x=h?h(D,b,E):t,x===t&&(x=$e(D)?D:ur(a[p+1])?[]:{})}Ui(E,b,x),E=E[b]}return o}var jf=ja?function(o,a){return ja.set(o,a),o}:Bt,ME=Wa?function(o,a){return Wa(o,"toString",{configurable:!0,enumerable:!1,value:du(a),writable:!0})}:Bt;function xE(o){return us(Bo(o))}function fn(o,a,u){var h=-1,p=o.length;a<0&&(a=-a>p?0:p+a),u=u>p?p:u,u<0&&(u+=p),p=a>u?0:u-a>>>0,a>>>=0;for(var w=R(p);++h<p;)w[h]=o[h+a];return w}function DE(o,a){var u;return Or(o,function(h,p,w){return u=a(h,p,w),!u}),!!u}function ts(o,a,u){var h=0,p=o==null?h:o.length;if(typeof a=="number"&&a===a&&p<=Bw){for(;h<p;){var w=h+p>>>1,_=o[w];_!==null&&!Gt(_)&&(u?_<=a:_<a)?h=w+1:p=w}return p}return Vl(o,a,Bt,u)}function Vl(o,a,u,h){var p=0,w=o==null?0:o.length;if(w===0)return 0;a=u(a);for(var _=a!==a,E=a===null,b=Gt(a),x=a===t;p<w;){var D=Ga((p+w)/2),L=u(o[D]),K=L!==t,J=L===null,ee=L===L,he=Gt(L);if(_)var te=h||ee;else x?te=ee&&(h||K):E?te=ee&&K&&(h||!J):b?te=ee&&K&&!J&&(h||!he):J||he?te=!1:te=h?L<=a:L<a;te?p=D+1:w=D}return wt(w,Yc)}function Yf(o,a){for(var u=-1,h=o.length,p=0,w=[];++u<h;){var _=o[u],E=a?a(_):_;if(!u||!On(E,b)){var b=E;w[p++]=_===0?0:_}}return w}function Jf(o){return typeof o=="number"?o:Gt(o)?Si:+o}function qt(o){if(typeof o=="string")return o;if(ce(o))return Ve(o,qt)+"";if(Gt(o))return kf?kf.call(o):"";var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function Nr(o,a,u){var h=-1,p=xa,w=o.length,_=!0,E=[],b=E;if(u)_=!1,p=gl;else if(w>=i){var x=a?null:qE(o);if(x)return La(x);_=!1,p=Pi,b=new Qr}else b=a?[]:E;e:for(;++h<w;){var D=o[h],L=a?a(D):D;if(D=u||D!==0?D:0,_&&L===L){for(var K=b.length;K--;)if(b[K]===L)continue e;a&&b.push(L),E.push(D)}else p(b,L,u)||(b!==E&&b.push(L),E.push(D))}return E}function Fl(o,a){return a=Pr(a,o),o=Sg(o,a),o==null||delete o[Wn(gn(a))]}function Qf(o,a,u,h){return $i(o,a,u(Zr(o,a)),h)}function ns(o,a,u,h){for(var p=o.length,w=h?p:-1;(h?w--:++w<p)&&a(o[w],w,o););return u?fn(o,h?0:w,h?w+1:p):fn(o,h?w+1:0,h?p:w)}function Xf(o,a){var u=o;return u instanceof pe&&(u=u.value()),ml(a,function(h,p){return p.func.apply(p.thisArg,Ir([h],p.args))},u)}function Hl(o,a,u){var h=o.length;if(h<2)return h?Nr(o[0]):[];for(var p=-1,w=R(h);++p<h;)for(var _=o[p],E=-1;++E<h;)E!=p&&(w[p]=Vi(w[p]||_,o[E],a,u));return Nr(ft(w,1),a,u)}function Zf(o,a,u){for(var h=-1,p=o.length,w=a.length,_={};++h<p;){var E=h<w?a[h]:t;u(_,o[h],E)}return _}function $l(o){return je(o)?o:[]}function Kl(o){return typeof o=="function"?o:Bt}function Pr(o,a){return ce(o)?o:Xl(o,a)?[o]:kg(be(o))}var LE=fe;function Mr(o,a,u){var h=o.length;return u=u===t?h:u,!a&&u>=h?o:fn(o,a,u)}var eg=ET||function(o){return ht.clearTimeout(o)};function tg(o,a){if(a)return o.slice();var u=o.length,h=Tf?Tf(u):new o.constructor(u);return o.copy(h),h}function zl(o){var a=new o.constructor(o.byteLength);return new $a(a).set(new $a(o)),a}function BE(o,a){var u=a?zl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.byteLength)}function UE(o){var a=new o.constructor(o.source,Bh.exec(o));return a.lastIndex=o.lastIndex,a}function VE(o){return Bi?Ne(Bi.call(o)):{}}function ng(o,a){var u=a?zl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.length)}function rg(o,a){if(o!==a){var u=o!==t,h=o===null,p=o===o,w=Gt(o),_=a!==t,E=a===null,b=a===a,x=Gt(a);if(!E&&!x&&!w&&o>a||w&&_&&b&&!E&&!x||h&&_&&b||!u&&b||!p)return 1;if(!h&&!w&&!x&&o<a||x&&u&&p&&!h&&!w||E&&u&&p||!_&&p||!b)return-1}return 0}function FE(o,a,u){for(var h=-1,p=o.criteria,w=a.criteria,_=p.length,E=u.length;++h<_;){var b=rg(p[h],w[h]);if(b){if(h>=E)return b;var x=u[h];return b*(x=="desc"?-1:1)}}return o.index-a.index}function og(o,a,u,h){for(var p=-1,w=o.length,_=u.length,E=-1,b=a.length,x=rt(w-_,0),D=R(b+x),L=!h;++E<b;)D[E]=a[E];for(;++p<_;)(L||p<w)&&(D[u[p]]=o[p]);for(;x--;)D[E++]=o[p++];return D}function ig(o,a,u,h){for(var p=-1,w=o.length,_=-1,E=u.length,b=-1,x=a.length,D=rt(w-E,0),L=R(D+x),K=!h;++p<D;)L[p]=o[p];for(var J=p;++b<x;)L[J+b]=a[b];for(;++_<E;)(K||p<w)&&(L[J+u[_]]=o[p++]);return L}function xt(o,a){var u=-1,h=o.length;for(a||(a=R(h));++u<h;)a[u]=o[u];return a}function zn(o,a,u,h){var p=!u;u||(u={});for(var w=-1,_=a.length;++w<_;){var E=a[w],b=h?h(u[E],o[E],E,u,o):t;b===t&&(b=o[E]),p?sr(u,E,b):Ui(u,E,b)}return u}function HE(o,a){return zn(o,Ql(o),a)}function $E(o,a){return zn(o,yg(o),a)}function rs(o,a){return function(u,h){var p=ce(u)?G_:uE,w=a?a():{};return p(u,o,Z(h,2),w)}}function Mo(o){return fe(function(a,u){var h=-1,p=u.length,w=p>1?u[p-1]:t,_=p>2?u[2]:t;for(w=o.length>3&&typeof w=="function"?(p--,w):t,_&&kt(u[0],u[1],_)&&(w=p<3?t:w,p=1),a=Ne(a);++h<p;){var E=u[h];E&&o(a,E,h,w)}return a})}function ag(o,a){return function(u,h){if(u==null)return u;if(!Dt(u))return o(u,h);for(var p=u.length,w=a?p:-1,_=Ne(u);(a?w--:++w<p)&&h(_[w],w,_)!==!1;);return u}}function sg(o){return function(a,u,h){for(var p=-1,w=Ne(a),_=h(a),E=_.length;E--;){var b=_[o?E:++p];if(u(w[b],b,w)===!1)break}return a}}function KE(o,a,u){var h=a&O,p=Ki(o);function w(){var _=this&&this!==ht&&this instanceof w?p:o;return _.apply(h?u:this,arguments)}return w}function cg(o){return function(a){a=be(a);var u=bo(a)?kn(a):t,h=u?u[0]:a.charAt(0),p=u?Mr(u,1).join(""):a.slice(1);return h[o]()+p}}function xo(o){return function(a){return ml(am(im(a).replace(M_,"")),o,"")}}function Ki(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 u=Po(o.prototype),h=o.apply(u,a);return $e(h)?h:u}}function zE(o,a,u){var h=Ki(o);function p(){for(var w=arguments.length,_=R(w),E=w,b=Do(p);E--;)_[E]=arguments[E];var x=w<3&&_[0]!==b&&_[w-1]!==b?[]:kr(_,b);if(w-=x.length,w<u)return fg(o,a,os,p.placeholder,t,_,x,t,t,u-w);var D=this&&this!==ht&&this instanceof p?h:o;return zt(D,this,_)}return p}function lg(o){return function(a,u,h){var p=Ne(a);if(!Dt(a)){var w=Z(u,3);a=st(a),u=function(E){return w(p[E],E,p)}}var _=o(a,u,h);return _>-1?p[w?a[_]:_]:t}}function ug(o){return lr(function(a){var u=a.length,h=u,p=dn.prototype.thru;for(o&&a.reverse();h--;){var w=a[h];if(typeof w!="function")throw new un(l);if(p&&!_&&cs(w)=="wrapper")var _=new dn([],!0)}for(h=_?h:u;++h<u;){w=a[h];var E=cs(w),b=E=="wrapper"?Yl(w):t;b&&Zl(b[0])&&b[1]==(W|H|Q|tt)&&!b[4].length&&b[9]==1?_=_[cs(b[0])].apply(_,b[3]):_=w.length==1&&Zl(w)?_[E]():_.thru(w)}return function(){var x=arguments,D=x[0];if(_&&x.length==1&&ce(D))return _.plant(D).value();for(var L=0,K=u?a[L].apply(this,x):D;++L<u;)K=a[L].call(this,K);return K}})}function os(o,a,u,h,p,w,_,E,b,x){var D=a&W,L=a&O,K=a&$,J=a&(H|z),ee=a&Te,he=K?t:Ki(o);function te(){for(var me=arguments.length,ve=R(me),jt=me;jt--;)ve[jt]=arguments[jt];if(J)var Rt=Do(te),Yt=nT(ve,Rt);if(h&&(ve=og(ve,h,p,J)),w&&(ve=ig(ve,w,_,J)),me-=Yt,J&&me<x){var Ye=kr(ve,Rt);return fg(o,a,os,te.placeholder,u,ve,Ye,E,b,x-me)}var Nn=L?u:this,fr=K?Nn[o]:o;return me=ve.length,E?ve=uS(ve,E):ee&&me>1&&ve.reverse(),D&&b<me&&(ve.length=b),this&&this!==ht&&this instanceof te&&(fr=he||Ki(fr)),fr.apply(Nn,ve)}return te}function dg(o,a){return function(u,h){return yE(u,o,a(h),{})}}function is(o,a){return function(u,h){var p;if(u===t&&h===t)return a;if(u!==t&&(p=u),h!==t){if(p===t)return h;typeof u=="string"||typeof h=="string"?(u=qt(u),h=qt(h)):(u=Jf(u),h=Jf(h)),p=o(u,h)}return p}}function Wl(o){return lr(function(a){return a=Ve(a,Wt(Z())),fe(function(u){var h=this;return o(a,function(p){return zt(p,h,u)})})})}function as(o,a){a=a===t?" ":qt(a);var u=a.length;if(u<2)return u?Ul(a,o):a;var h=Ul(a,qa(o/Io(a)));return bo(a)?Mr(kn(h),0,o).join(""):h.slice(0,o)}function WE(o,a,u,h){var p=a&O,w=Ki(o);function _(){for(var E=-1,b=arguments.length,x=-1,D=h.length,L=R(D+b),K=this&&this!==ht&&this instanceof _?w:o;++x<D;)L[x]=h[x];for(;b--;)L[x++]=arguments[++E];return zt(K,p?u:this,L)}return _}function hg(o){return function(a,u,h){return h&&typeof h!="number"&&kt(a,u,h)&&(u=h=t),a=hr(a),u===t?(u=a,a=0):u=hr(u),h=h===t?a<u?1:-1:hr(h),OE(a,u,h,o)}}function ss(o){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=mn(a),u=mn(u)),o(a,u)}}function fg(o,a,u,h,p,w,_,E,b,x){var D=a&H,L=D?_:t,K=D?t:_,J=D?w:t,ee=D?t:w;a|=D?Q:we,a&=~(D?we:Q),a&F||(a&=~(O|$));var he=[o,a,p,J,L,ee,K,E,b,x],te=u.apply(t,he);return Zl(o)&&Ag(te,he),te.placeholder=h,bg(te,o,a)}function ql(o){var a=nt[o];return function(u,h){if(u=mn(u),h=h==null?0:wt(de(h),292),h&&bf(u)){var p=(be(u)+"e").split("e"),w=a(p[0]+"e"+(+p[1]+h));return p=(be(w)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return a(u)}}var qE=Oo&&1/La(new Oo([,-0]))[1]==Mt?function(o){return new Oo(o)}:gu;function gg(o){return function(a){var u=_t(a);return u==bn?Tl(a):u==In?lT(a):tT(a,o(a))}}function cr(o,a,u,h,p,w,_,E){var b=a&$;if(!b&&typeof o!="function")throw new un(l);var x=h?h.length:0;if(x||(a&=~(Q|we),h=p=t),_=_===t?_:rt(de(_),0),E=E===t?E:de(E),x-=p?p.length:0,a&we){var D=h,L=p;h=p=t}var K=b?t:Yl(o),J=[o,a,u,h,p,D,L,w,_,E];if(K&&sS(J,K),o=J[0],a=J[1],u=J[2],h=J[3],p=J[4],E=J[9]=J[9]===t?b?0:o.length:rt(J[9]-x,0),!E&&a&(H|z)&&(a&=~(H|z)),!a||a==O)var ee=KE(o,a,u);else a==H||a==z?ee=zE(o,a,E):(a==Q||a==(O|Q))&&!p.length?ee=WE(o,a,u,h):ee=os.apply(t,J);var he=K?jf:Ag;return bg(he(ee,J),o,a)}function mg(o,a,u,h){return o===t||On(o,Ro[u])&&!Ie.call(h,u)?a:o}function pg(o,a,u,h,p,w){return $e(o)&&$e(a)&&(w.set(a,o),es(o,a,t,pg,w),w.delete(a)),o}function GE(o){return qi(o)?t:o}function vg(o,a,u,h,p,w){var _=u&T,E=o.length,b=a.length;if(E!=b&&!(_&&b>E))return!1;var x=w.get(o),D=w.get(a);if(x&&D)return x==a&&D==o;var L=-1,K=!0,J=u&I?new Qr:t;for(w.set(o,a),w.set(a,o);++L<E;){var ee=o[L],he=a[L];if(h)var te=_?h(he,ee,L,a,o,w):h(ee,he,L,o,a,w);if(te!==t){if(te)continue;K=!1;break}if(J){if(!pl(a,function(me,ve){if(!Pi(J,ve)&&(ee===me||p(ee,me,u,h,w)))return J.push(ve)})){K=!1;break}}else if(!(ee===he||p(ee,he,u,h,w))){K=!1;break}}return w.delete(o),w.delete(a),K}function jE(o,a,u,h,p,w,_){switch(u){case Eo:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Ni:return!(o.byteLength!=a.byteLength||!w(new $a(o),new $a(a)));case Ai:case bi:case Ii:return On(+o,+a);case ka:return o.name==a.name&&o.message==a.message;case ki:case Ri:return o==a+"";case bn:var E=Tl;case In:var b=h&T;if(E||(E=La),o.size!=a.size&&!b)return!1;var x=_.get(o);if(x)return x==a;h|=I,_.set(o,a);var D=vg(E(o),E(a),h,p,w,_);return _.delete(o),D;case Oa:if(Bi)return Bi.call(o)==Bi.call(a)}return!1}function YE(o,a,u,h,p,w){var _=u&T,E=Gl(o),b=E.length,x=Gl(a),D=x.length;if(b!=D&&!_)return!1;for(var L=b;L--;){var K=E[L];if(!(_?K in a:Ie.call(a,K)))return!1}var J=w.get(o),ee=w.get(a);if(J&&ee)return J==a&&ee==o;var he=!0;w.set(o,a),w.set(a,o);for(var te=_;++L<b;){K=E[L];var me=o[K],ve=a[K];if(h)var jt=_?h(ve,me,K,a,o,w):h(me,ve,K,o,a,w);if(!(jt===t?me===ve||p(me,ve,u,h,w):jt)){he=!1;break}te||(te=K=="constructor")}if(he&&!te){var Rt=o.constructor,Yt=a.constructor;Rt!=Yt&&"constructor"in o&&"constructor"in a&&!(typeof Rt=="function"&&Rt instanceof Rt&&typeof Yt=="function"&&Yt instanceof Yt)&&(he=!1)}return w.delete(o),w.delete(a),he}function lr(o){return tu(Eg(o,t,Pg),o+"")}function Gl(o){return Bf(o,st,Ql)}function jl(o){return Bf(o,Lt,yg)}var Yl=ja?function(o){return ja.get(o)}:gu;function cs(o){for(var a=o.name+"",u=No[a],h=Ie.call(No,a)?u.length:0;h--;){var p=u[h],w=p.func;if(w==null||w==o)return p.name}return a}function Do(o){var a=Ie.call(y,"placeholder")?y:o;return a.placeholder}function Z(){var o=y.iteratee||hu;return o=o===hu?Ff:o,arguments.length?o(arguments[0],arguments[1]):o}function ls(o,a){var u=o.__data__;return rS(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Jl(o){for(var a=st(o),u=a.length;u--;){var h=a[u],p=o[h];a[u]=[h,p,_g(p)]}return a}function eo(o,a){var u=aT(o,a);return Vf(u)?u:t}function JE(o){var a=Ie.call(o,Yr),u=o[Yr];try{o[Yr]=t;var h=!0}catch{}var p=Fa.call(o);return h&&(a?o[Yr]=u:delete o[Yr]),p}var Ql=Sl?function(o){return o==null?[]:(o=Ne(o),br(Sl(o),function(a){return Sf.call(o,a)}))}:mu,yg=Sl?function(o){for(var a=[];o;)Ir(a,Ql(o)),o=Ka(o);return a}:mu,_t=It;(Al&&_t(new Al(new ArrayBuffer(1)))!=Eo||xi&&_t(new xi)!=bn||bl&&_t(bl.resolve())!=Mh||Oo&&_t(new Oo)!=In||Di&&_t(new Di)!=Oi)&&(_t=function(o){var a=It(o),u=a==or?o.constructor:t,h=u?to(u):"";if(h)switch(h){case PT:return Eo;case MT:return bn;case xT:return Mh;case DT:return In;case LT:return Oi}return a});function QE(o,a,u){for(var h=-1,p=u.length;++h<p;){var w=u[h],_=w.size;switch(w.type){case"drop":o+=_;break;case"dropRight":a-=_;break;case"take":a=wt(a,o+_);break;case"takeRight":o=rt(o,a-_);break}}return{start:o,end:a}}function XE(o){var a=o.match(o_);return a?a[1].split(i_):[]}function Cg(o,a,u){a=Pr(a,o);for(var h=-1,p=a.length,w=!1;++h<p;){var _=Wn(a[h]);if(!(w=o!=null&&u(o,_)))break;o=o[_]}return w||++h!=p?w:(p=o==null?0:o.length,!!p&&ps(p)&&ur(_,p)&&(ce(o)||no(o)))}function ZE(o){var a=o.length,u=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(u.index=o.index,u.input=o.input),u}function wg(o){return typeof o.constructor=="function"&&!zi(o)?Po(Ka(o)):{}}function eS(o,a,u){var h=o.constructor;switch(a){case Ni:return zl(o);case Ai:case bi:return new h(+o);case Eo:return BE(o,u);case Jc:case Qc:case Xc:case Zc:case el:case tl:case nl:case rl:case ol:return ng(o,u);case bn:return new h;case Ii:case Ri:return new h(o);case ki:return UE(o);case In:return new h;case Oa:return VE(o)}}function tS(o,a){var u=a.length;if(!u)return o;var h=u-1;return a[h]=(u>1?"& ":"")+a[h],a=a.join(u>2?", ":" "),o.replace(r_,`{
|
69
69
|
/* [wrapped with `+a+`] */
|
70
|
-
`)}function nS(o){return ce(o)||no(o)||!!(Af&&o&&o[Af])}function lr(o,a){var u=typeof o;return a=a??Qe,!!a&&(u=="number"||u!="symbol"&&g_.test(o))&&o>-1&&o%1==0&&o<a}function kt(o,a,u){if(!$e(u))return!1;var h=typeof a;return(h=="number"?xt(u)&&lr(a,u.length):h=="string"&&a in u)?Rn(u[a],o):!1}function Xl(o,a){if(ce(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||qt(o)?!0:Zw.test(o)||!Xw.test(o)||a!=null&&o in Ne(a)}function rS(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function Zl(o){var a=cs(o),u=v[a];if(typeof u!="function"||!(a in pe.prototype))return!1;if(o===u)return!0;var h=Yl(u);return!!h&&o===h[0]}function oS(o){return!!_f&&_f in o}var iS=Ua?ur:pu;function zi(o){var a=o&&o.constructor,u=typeof a=="function"&&a.prototype||Ro;return o===u}function _g(o){return o===o&&!$e(o)}function Tg(o,a){return function(u){return u==null?!1:u[o]===a&&(a!==t||o in Ne(u))}}function aS(o){var a=gs(o,function(h){return u.size===g&&u.clear(),h}),u=a.cache;return a}function sS(o,a){var u=o[1],h=a[1],p=u|h,w=p<(N|K|W),_=h==W&&u==H||h==W&&u==tt&&o[7].length<=a[8]||h==(W|tt)&&a[7].length<=a[8]&&u==H;if(!(w||_))return o;h&N&&(o[2]=a[2],p|=u&N?0:F);var E=a[3];if(E){var b=o[3];o[3]=b?og(b,E,a[4]):E,o[4]=b?br(o[3],m):a[4]}return E=a[5],E&&(b=o[5],o[5]=b?ig(b,E,a[6]):E,o[6]=b?br(o[5],m):a[6]),E=a[7],E&&(o[7]=E),h&W&&(o[8]=o[8]==null?a[8]:wt(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=p,o}function cS(o){var a=[];if(o!=null)for(var u in Ne(o))a.push(u);return a}function lS(o){return Fa.call(o)}function Eg(o,a,u){return a=rt(a===t?o.length-1:a,0),function(){for(var h=arguments,p=-1,w=rt(h.length-a,0),_=R(w);++p<w;)_[p]=h[a+p];p=-1;for(var E=R(a+1);++p<a;)E[p]=h[p];return E[a]=u(_),Kt(o,this,E)}}function Sg(o,a){return a.length<2?o:Zr(o,hn(a,0,-1))}function uS(o,a){for(var u=o.length,h=wt(a.length,u),p=Mt(o);h--;){var w=a[h];o[h]=lr(w,u)?p[w]:t}return o}function eu(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var Ag=Ig(jf),Wi=AT||function(o,a){return ht.setTimeout(o,a)},tu=Ig(ME);function bg(o,a,u){var h=a+"";return tu(o,tS(h,dS(XE(h),u)))}function Ig(o){var a=0,u=0;return function(){var h=RT(),p=Ue-(h-u);if(u=h,p>0){if(++a>=Ee)return arguments[0]}else a=0;return o.apply(t,arguments)}}function us(o,a){var u=-1,h=o.length,p=h-1;for(a=a===t?h:a;++u<a;){var w=Bl(u,p),_=o[w];o[w]=o[u],o[u]=_}return o.length=a,o}var kg=aS(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(e_,function(u,h,p,w){a.push(p?w.replace(c_,"$1"):h||u)}),a});function zn(o){if(typeof o=="string"||qt(o))return o;var a=o+"";return a=="0"&&1/o==-Pt?"-0":a}function to(o){if(o!=null){try{return Va.call(o)}catch{}try{return o+""}catch{}}return""}function dS(o,a){return cn(Uw,function(u){var h="_."+u[0];a&u[1]&&!xa(o,h)&&o.push(h)}),o.sort()}function Rg(o){if(o instanceof pe)return o.clone();var a=new un(o.__wrapped__,o.__chain__);return a.__actions__=Mt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function hS(o,a,u){(u?kt(o,a,u):a===t)?a=1:a=rt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var p=0,w=0,_=R(qa(h/a));p<h;)_[w++]=hn(o,p,p+=a);return _}function fS(o){for(var a=-1,u=o==null?0:o.length,h=0,p=[];++a<u;){var w=o[a];w&&(p[h++]=w)}return p}function gS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),u=arguments[0],h=o;h--;)a[h-1]=arguments[h];return Ar(ce(u)?Mt(u):[u],ft(a,1))}var mS=fe(function(o,a){return je(o)?Vi(o,ft(a,1,je,!0)):[]}),pS=fe(function(o,a){var u=fn(a);return je(u)&&(u=t),je(o)?Vi(o,ft(a,1,je,!0),Z(u,2)):[]}),vS=fe(function(o,a){var u=fn(a);return je(u)&&(u=t),je(o)?Vi(o,ft(a,1,je,!0),t,u):[]});function yS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),hn(o,a<0?0:a,h)):[]}function CS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,hn(o,0,a<0?0:a)):[]}function wS(o,a){return o&&o.length?ns(o,Z(a,3),!0,!0):[]}function _S(o,a){return o&&o.length?ns(o,Z(a,3),!0):[]}function TS(o,a,u,h){var p=o==null?0:o.length;return p?(u&&typeof u!="number"&&kt(o,a,u)&&(u=0,h=p),gE(o,a,u,h)):[]}function Og(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Da(o,Z(a,3),p)}function Ng(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h-1;return u!==t&&(p=de(u),p=u<0?rt(h+p,0):wt(p,h-1)),Da(o,Z(a,3),p,!0)}function Pg(o){var a=o==null?0:o.length;return a?ft(o,1):[]}function ES(o){var a=o==null?0:o.length;return a?ft(o,Pt):[]}function SS(o,a){var u=o==null?0:o.length;return u?(a=a===t?1:de(a),ft(o,a)):[]}function AS(o){for(var a=-1,u=o==null?0:o.length,h={};++a<u;){var p=o[a];h[p[0]]=p[1]}return h}function Mg(o){return o&&o.length?o[0]:t}function bS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Ao(o,a,p)}function IS(o){var a=o==null?0:o.length;return a?hn(o,0,-1):[]}var kS=fe(function(o){var a=Ve(o,$l);return a.length&&a[0]===o[0]?Pl(a):[]}),RS=fe(function(o){var a=fn(o),u=Ve(o,$l);return a===fn(u)?a=t:u.pop(),u.length&&u[0]===o[0]?Pl(u,Z(a,2)):[]}),OS=fe(function(o){var a=fn(o),u=Ve(o,$l);return a=typeof a=="function"?a:t,a&&u.pop(),u.length&&u[0]===o[0]?Pl(u,t,a):[]});function NS(o,a){return o==null?"":IT.call(o,a)}function fn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function PS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h;return u!==t&&(p=de(u),p=p<0?rt(h+p,0):wt(p,h-1)),a===a?dT(o,a,p):Da(o,ff,p,!0)}function MS(o,a){return o&&o.length?zf(o,de(a)):t}var xS=fe(xg);function xg(o,a){return o&&o.length&&a&&a.length?Ll(o,a):o}function DS(o,a,u){return o&&o.length&&a&&a.length?Ll(o,a,Z(u,2)):o}function LS(o,a,u){return o&&o.length&&a&&a.length?Ll(o,a,t,u):o}var BS=cr(function(o,a){var u=o==null?0:o.length,h=kl(o,a);return Gf(o,Ve(a,function(p){return lr(p,u)?+p:p}).sort(rg)),h});function US(o,a){var u=[];if(!(o&&o.length))return u;var h=-1,p=[],w=o.length;for(a=Z(a,3);++h<w;){var _=o[h];a(_,h,o)&&(u.push(_),p.push(h))}return Gf(o,p),u}function nu(o){return o==null?o:NT.call(o)}function VS(o,a,u){var h=o==null?0:o.length;return h?(u&&typeof u!="number"&&kt(o,a,u)?(a=0,u=h):(a=a==null?0:de(a),u=u===t?h:de(u)),hn(o,a,u)):[]}function FS(o,a){return ts(o,a)}function HS(o,a,u){return Vl(o,a,Z(u,2))}function $S(o,a){var u=o==null?0:o.length;if(u){var h=ts(o,a);if(h<u&&Rn(o[h],a))return h}return-1}function KS(o,a){return ts(o,a,!0)}function zS(o,a,u){return Vl(o,a,Z(u,2),!0)}function WS(o,a){var u=o==null?0:o.length;if(u){var h=ts(o,a,!0)-1;if(Rn(o[h],a))return h}return-1}function qS(o){return o&&o.length?Yf(o):[]}function GS(o,a){return o&&o.length?Yf(o,Z(a,2)):[]}function jS(o){var a=o==null?0:o.length;return a?hn(o,1,a):[]}function YS(o,a,u){return o&&o.length?(a=u||a===t?1:de(a),hn(o,0,a<0?0:a)):[]}function JS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,hn(o,a<0?0:a,h)):[]}function QS(o,a){return o&&o.length?ns(o,Z(a,3),!1,!0):[]}function XS(o,a){return o&&o.length?ns(o,Z(a,3)):[]}var ZS=fe(function(o){return Rr(ft(o,1,je,!0))}),eA=fe(function(o){var a=fn(o);return je(a)&&(a=t),Rr(ft(o,1,je,!0),Z(a,2))}),tA=fe(function(o){var a=fn(o);return a=typeof a=="function"?a:t,Rr(ft(o,1,je,!0),t,a)});function nA(o){return o&&o.length?Rr(o):[]}function rA(o,a){return o&&o.length?Rr(o,Z(a,2)):[]}function oA(o,a){return a=typeof a=="function"?a:t,o&&o.length?Rr(o,t,a):[]}function ru(o){if(!(o&&o.length))return[];var a=0;return o=Sr(o,function(u){if(je(u))return a=rt(u.length,a),!0}),wl(a,function(u){return Ve(o,vl(u))})}function Dg(o,a){if(!(o&&o.length))return[];var u=ru(o);return a==null?u:Ve(u,function(h){return Kt(a,t,h)})}var iA=fe(function(o,a){return je(o)?Vi(o,a):[]}),aA=fe(function(o){return Hl(Sr(o,je))}),sA=fe(function(o){var a=fn(o);return je(a)&&(a=t),Hl(Sr(o,je),Z(a,2))}),cA=fe(function(o){var a=fn(o);return a=typeof a=="function"?a:t,Hl(Sr(o,je),t,a)}),lA=fe(ru);function uA(o,a){return Zf(o||[],a||[],Ui)}function dA(o,a){return Zf(o||[],a||[],$i)}var hA=fe(function(o){var a=o.length,u=a>1?o[a-1]:t;return u=typeof u=="function"?(o.pop(),u):t,Dg(o,u)});function Lg(o){var a=v(o);return a.__chain__=!0,a}function fA(o,a){return a(o),o}function ds(o,a){return a(o)}var gA=cr(function(o){var a=o.length,u=a?o[0]:0,h=this.__wrapped__,p=function(w){return kl(w,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!lr(u)?this.thru(p):(h=h.slice(u,+u+(a?1:0)),h.__actions__.push({func:ds,args:[p],thisArg:t}),new un(h,this.__chain__).thru(function(w){return a&&!w.length&&w.push(t),w}))});function mA(){return Lg(this)}function pA(){return new un(this.value(),this.__chain__)}function vA(){this.__values__===t&&(this.__values__=Jg(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function yA(){return this}function CA(o){for(var a,u=this;u instanceof Ja;){var h=Rg(u);h.__index__=0,h.__values__=t,a?p.__wrapped__=h:a=h;var p=h;u=u.__wrapped__}return p.__wrapped__=o,a}function wA(){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:ds,args:[nu],thisArg:t}),new un(a,this.__chain__)}return this.thru(nu)}function _A(){return Xf(this.__wrapped__,this.__actions__)}var TA=rs(function(o,a,u){Ie.call(o,u)?++o[u]:ar(o,u,1)});function EA(o,a,u){var h=ce(o)?df:fE;return u&&kt(o,a,u)&&(a=t),h(o,Z(a,3))}function SA(o,a){var u=ce(o)?Sr:Df;return u(o,Z(a,3))}var AA=lg(Og),bA=lg(Ng);function IA(o,a){return ft(hs(o,a),1)}function kA(o,a){return ft(hs(o,a),Pt)}function RA(o,a,u){return u=u===t?1:de(u),ft(hs(o,a),u)}function Bg(o,a){var u=ce(o)?cn:kr;return u(o,Z(a,3))}function Ug(o,a){var u=ce(o)?j_:xf;return u(o,Z(a,3))}var OA=rs(function(o,a,u){Ie.call(o,u)?o[u].push(a):ar(o,u,[a])});function NA(o,a,u,h){o=xt(o)?o:Bo(o),u=u&&!h?de(u):0;var p=o.length;return u<0&&(u=rt(p+u,0)),vs(o)?u<=p&&o.indexOf(a,u)>-1:!!p&&Ao(o,a,u)>-1}var PA=fe(function(o,a,u){var h=-1,p=typeof a=="function",w=xt(o)?R(o.length):[];return kr(o,function(_){w[++h]=p?Kt(a,_,u):Fi(_,a,u)}),w}),MA=rs(function(o,a,u){ar(o,u,a)});function hs(o,a){var u=ce(o)?Ve:Hf;return u(o,Z(a,3))}function xA(o,a,u,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),u=h?t:u,ce(u)||(u=u==null?[]:[u]),Wf(o,a,u))}var DA=rs(function(o,a,u){o[u?0:1].push(a)},function(){return[[],[]]});function LA(o,a,u){var h=ce(o)?ml:mf,p=arguments.length<3;return h(o,Z(a,4),u,p,kr)}function BA(o,a,u){var h=ce(o)?Y_:mf,p=arguments.length<3;return h(o,Z(a,4),u,p,xf)}function UA(o,a){var u=ce(o)?Sr:Df;return u(o,ms(Z(a,3)))}function VA(o){var a=ce(o)?Of:NE;return a(o)}function FA(o,a,u){(u?kt(o,a,u):a===t)?a=1:a=de(a);var h=ce(o)?cE:PE;return h(o,a)}function HA(o){var a=ce(o)?lE:xE;return a(o)}function $A(o){if(o==null)return 0;if(xt(o))return vs(o)?Io(o):o.length;var a=_t(o);return a==An||a==bn?o.size:xl(o).length}function KA(o,a,u){var h=ce(o)?pl:DE;return u&&kt(o,a,u)&&(a=t),h(o,Z(a,3))}var zA=fe(function(o,a){if(o==null)return[];var u=a.length;return u>1&&kt(o,a[0],a[1])?a=[]:u>2&&kt(a[0],a[1],a[2])&&(a=[a[0]]),Wf(o,ft(a,1),[])}),fs=ST||function(){return ht.Date.now()};function WA(o,a){if(typeof a!="function")throw new ln(l);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function Vg(o,a,u){return a=u?t:a,a=o&&a==null?o.length:a,sr(o,W,t,t,t,t,a)}function Fg(o,a){var u;if(typeof a!="function")throw new ln(l);return o=de(o),function(){return--o>0&&(u=a.apply(this,arguments)),o<=1&&(a=t),u}}var ou=fe(function(o,a,u){var h=N;if(u.length){var p=br(u,Do(ou));h|=Q}return sr(o,h,a,u,p)}),Hg=fe(function(o,a,u){var h=N|K;if(u.length){var p=br(u,Do(Hg));h|=Q}return sr(a,h,o,u,p)});function $g(o,a,u){a=u?t:a;var h=sr(o,H,t,t,t,t,t,a);return h.placeholder=$g.placeholder,h}function Kg(o,a,u){a=u?t:a;var h=sr(o,z,t,t,t,t,t,a);return h.placeholder=Kg.placeholder,h}function zg(o,a,u){var h,p,w,_,E,b,x=0,D=!1,L=!1,$=!0;if(typeof o!="function")throw new ln(l);a=gn(a)||0,$e(u)&&(D=!!u.leading,L="maxWait"in u,w=L?rt(gn(u.maxWait)||0,a):w,$="trailing"in u?!!u.trailing:$);function J(Ye){var On=h,hr=p;return h=p=t,x=Ye,_=o.apply(hr,On),_}function ee(Ye){return x=Ye,E=Wi(me,a),D?J(Ye):_}function he(Ye){var On=Ye-b,hr=Ye-x,lm=a-On;return L?wt(lm,w-hr):lm}function te(Ye){var On=Ye-b,hr=Ye-x;return b===t||On>=a||On<0||L&&hr>=w}function me(){var Ye=fs();if(te(Ye))return ve(Ye);E=Wi(me,he(Ye))}function ve(Ye){return E=t,$&&h?J(Ye):(h=p=t,_)}function Gt(){E!==t&&eg(E),x=0,h=b=p=E=t}function Rt(){return E===t?_:ve(fs())}function jt(){var Ye=fs(),On=te(Ye);if(h=arguments,p=this,b=Ye,On){if(E===t)return ee(b);if(L)return eg(E),E=Wi(me,a),J(b)}return E===t&&(E=Wi(me,a)),_}return jt.cancel=Gt,jt.flush=Rt,jt}var qA=fe(function(o,a){return Mf(o,1,a)}),GA=fe(function(o,a,u){return Mf(o,gn(a)||0,u)});function jA(o){return sr(o,Te)}function gs(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new ln(l);var u=function(){var h=arguments,p=a?a.apply(this,h):h[0],w=u.cache;if(w.has(p))return w.get(p);var _=o.apply(this,h);return u.cache=w.set(p,_)||w,_};return u.cache=new(gs.Cache||ir),u}gs.Cache=ir;function ms(o){if(typeof o!="function")throw new ln(l);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 YA(o){return Fg(2,o)}var JA=LE(function(o,a){a=a.length==1&&ce(a[0])?Ve(a[0],zt(Z())):Ve(ft(a,1),zt(Z()));var u=a.length;return fe(function(h){for(var p=-1,w=wt(h.length,u);++p<w;)h[p]=a[p].call(this,h[p]);return Kt(o,this,h)})}),iu=fe(function(o,a){var u=br(a,Do(iu));return sr(o,Q,t,a,u)}),Wg=fe(function(o,a){var u=br(a,Do(Wg));return sr(o,we,t,a,u)}),QA=cr(function(o,a){return sr(o,tt,t,t,t,a)});function XA(o,a){if(typeof o!="function")throw new ln(l);return a=a===t?a:de(a),fe(o,a)}function ZA(o,a){if(typeof o!="function")throw new ln(l);return a=a==null?0:rt(de(a),0),fe(function(u){var h=u[a],p=Nr(u,0,a);return h&&Ar(p,h),Kt(o,this,p)})}function eb(o,a,u){var h=!0,p=!0;if(typeof o!="function")throw new ln(l);return $e(u)&&(h="leading"in u?!!u.leading:h,p="trailing"in u?!!u.trailing:p),zg(o,a,{leading:h,maxWait:a,trailing:p})}function tb(o){return Vg(o,1)}function nb(o,a){return iu(Kl(a),o)}function rb(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function ob(o){return dn(o,S)}function ib(o,a){return a=typeof a=="function"?a:t,dn(o,S,a)}function ab(o){return dn(o,y|S)}function sb(o,a){return a=typeof a=="function"?a:t,dn(o,y|S,a)}function cb(o,a){return a==null||Pf(o,a,st(a))}function Rn(o,a){return o===a||o!==o&&a!==a}var lb=ss(Nl),ub=ss(function(o,a){return o>=a}),no=Uf(function(){return arguments}())?Uf:function(o){return ze(o)&&Ie.call(o,"callee")&&!Sf.call(o,"callee")},ce=R.isArray,db=of?zt(of):CE;function xt(o){return o!=null&&ps(o.length)&&!ur(o)}function je(o){return ze(o)&&xt(o)}function hb(o){return o===!0||o===!1||ze(o)&&It(o)==Ai}var Pr=bT||pu,fb=af?zt(af):wE;function gb(o){return ze(o)&&o.nodeType===1&&!qi(o)}function mb(o){if(o==null)return!0;if(xt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||Pr(o)||Lo(o)||no(o)))return!o.length;var a=_t(o);if(a==An||a==bn)return!o.size;if(zi(o))return!xl(o).length;for(var u in o)if(Ie.call(o,u))return!1;return!0}function pb(o,a){return Hi(o,a)}function vb(o,a,u){u=typeof u=="function"?u:t;var h=u?u(o,a):t;return h===t?Hi(o,a,t,u):!!h}function au(o){if(!ze(o))return!1;var a=It(o);return a==ka||a==Fw||typeof o.message=="string"&&typeof o.name=="string"&&!qi(o)}function yb(o){return typeof o=="number"&&bf(o)}function ur(o){if(!$e(o))return!1;var a=It(o);return a==Ra||a==Ph||a==Vw||a==$w}function qg(o){return typeof o=="number"&&o==de(o)}function ps(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Qe}function $e(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function ze(o){return o!=null&&typeof o=="object"}var Gg=sf?zt(sf):TE;function Cb(o,a){return o===a||Ml(o,a,Jl(a))}function wb(o,a,u){return u=typeof u=="function"?u:t,Ml(o,a,Jl(a),u)}function _b(o){return jg(o)&&o!=+o}function Tb(o){if(iS(o))throw new se(s);return Vf(o)}function Eb(o){return o===null}function Sb(o){return o==null}function jg(o){return typeof o=="number"||ze(o)&&It(o)==Ii}function qi(o){if(!ze(o)||It(o)!=rr)return!1;var a=Ka(o);if(a===null)return!0;var u=Ie.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Va.call(u)==wT}var su=cf?zt(cf):EE;function Ab(o){return qg(o)&&o>=-Qe&&o<=Qe}var Yg=lf?zt(lf):SE;function vs(o){return typeof o=="string"||!ce(o)&&ze(o)&&It(o)==Ri}function qt(o){return typeof o=="symbol"||ze(o)&&It(o)==Oa}var Lo=uf?zt(uf):AE;function bb(o){return o===t}function Ib(o){return ze(o)&&_t(o)==Oi}function kb(o){return ze(o)&&It(o)==zw}var Rb=ss(Dl),Ob=ss(function(o,a){return o<=a});function Jg(o){if(!o)return[];if(xt(o))return vs(o)?In(o):Mt(o);if(Mi&&o[Mi])return cT(o[Mi]());var a=_t(o),u=a==An?Tl:a==bn?La:Bo;return u(o)}function dr(o){if(!o)return o===0?o:0;if(o=gn(o),o===Pt||o===-Pt){var a=o<0?-1:1;return a*Ct}return o===o?o:0}function de(o){var a=dr(o),u=a%1;return a===a?u?a-u:a:0}function Qg(o){return o?Xr(de(o),0,$t):0}function gn(o){if(typeof o=="number")return o;if(qt(o))return Si;if($e(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=$e(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=pf(o);var u=d_.test(o);return u||f_.test(o)?W_(o.slice(2),u?2:8):u_.test(o)?Si:+o}function Xg(o){return Kn(o,Dt(o))}function Nb(o){return o?Xr(de(o),-Qe,Qe):o===0?o:0}function be(o){return o==null?"":Wt(o)}var Pb=Mo(function(o,a){if(zi(a)||xt(a)){Kn(a,st(a),o);return}for(var u in a)Ie.call(a,u)&&Ui(o,u,a[u])}),Zg=Mo(function(o,a){Kn(a,Dt(a),o)}),ys=Mo(function(o,a,u,h){Kn(a,Dt(a),o,h)}),Mb=Mo(function(o,a,u,h){Kn(a,st(a),o,h)}),xb=cr(kl);function Db(o,a){var u=Po(o);return a==null?u:Nf(u,a)}var Lb=fe(function(o,a){o=Ne(o);var u=-1,h=a.length,p=h>2?a[2]:t;for(p&&kt(a[0],a[1],p)&&(h=1);++u<h;)for(var w=a[u],_=Dt(w),E=-1,b=_.length;++E<b;){var x=_[E],D=o[x];(D===t||Rn(D,Ro[x])&&!Ie.call(o,x))&&(o[x]=w[x])}return o}),Bb=fe(function(o){return o.push(t,pg),Kt(em,t,o)});function Ub(o,a){return hf(o,Z(a,3),$n)}function Vb(o,a){return hf(o,Z(a,3),Ol)}function Fb(o,a){return o==null?o:Rl(o,Z(a,3),Dt)}function Hb(o,a){return o==null?o:Lf(o,Z(a,3),Dt)}function $b(o,a){return o&&$n(o,Z(a,3))}function Kb(o,a){return o&&Ol(o,Z(a,3))}function zb(o){return o==null?[]:Za(o,st(o))}function Wb(o){return o==null?[]:Za(o,Dt(o))}function cu(o,a,u){var h=o==null?t:Zr(o,a);return h===t?u:h}function qb(o,a){return o!=null&&Cg(o,a,mE)}function lu(o,a){return o!=null&&Cg(o,a,pE)}var Gb=dg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Fa.call(a)),o[a]=u},du(Lt)),jb=dg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Fa.call(a)),Ie.call(o,a)?o[a].push(u):o[a]=[u]},Z),Yb=fe(Fi);function st(o){return xt(o)?Rf(o):xl(o)}function Dt(o){return xt(o)?Rf(o,!0):bE(o)}function Jb(o,a){var u={};return a=Z(a,3),$n(o,function(h,p,w){ar(u,a(h,p,w),h)}),u}function Qb(o,a){var u={};return a=Z(a,3),$n(o,function(h,p,w){ar(u,p,a(h,p,w))}),u}var Xb=Mo(function(o,a,u){es(o,a,u)}),em=Mo(function(o,a,u,h){es(o,a,u,h)}),Zb=cr(function(o,a){var u={};if(o==null)return u;var h=!1;a=Ve(a,function(w){return w=Or(w,o),h||(h=w.length>1),w}),Kn(o,jl(o),u),h&&(u=dn(u,y|C|S,GE));for(var p=a.length;p--;)Fl(u,a[p]);return u});function eI(o,a){return tm(o,ms(Z(a)))}var tI=cr(function(o,a){return o==null?{}:kE(o,a)});function tm(o,a){if(o==null)return{};var u=Ve(jl(o),function(h){return[h]});return a=Z(a),qf(o,u,function(h,p){return a(h,p[0])})}function nI(o,a,u){a=Or(a,o);var h=-1,p=a.length;for(p||(p=1,o=t);++h<p;){var w=o==null?t:o[zn(a[h])];w===t&&(h=p,w=u),o=ur(w)?w.call(o):w}return o}function rI(o,a,u){return o==null?o:$i(o,a,u)}function oI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:$i(o,a,u,h)}var nm=gg(st),rm=gg(Dt);function iI(o,a,u){var h=ce(o),p=h||Pr(o)||Lo(o);if(a=Z(a,4),u==null){var w=o&&o.constructor;p?u=h?new w:[]:$e(o)?u=ur(w)?Po(Ka(o)):{}:u={}}return(p?cn:$n)(o,function(_,E,b){return a(u,_,E,b)}),u}function aI(o,a){return o==null?!0:Fl(o,a)}function sI(o,a,u){return o==null?o:Qf(o,a,Kl(u))}function cI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:Qf(o,a,Kl(u),h)}function Bo(o){return o==null?[]:_l(o,st(o))}function lI(o){return o==null?[]:_l(o,Dt(o))}function uI(o,a,u){return u===t&&(u=a,a=t),u!==t&&(u=gn(u),u=u===u?u:0),a!==t&&(a=gn(a),a=a===a?a:0),Xr(gn(o),a,u)}function dI(o,a,u){return a=dr(a),u===t?(u=a,a=0):u=dr(u),o=gn(o),vE(o,a,u)}function hI(o,a,u){if(u&&typeof u!="boolean"&&kt(o,a,u)&&(a=u=t),u===t&&(typeof a=="boolean"?(u=a,a=t):typeof o=="boolean"&&(u=o,o=t)),o===t&&a===t?(o=0,a=1):(o=dr(o),a===t?(a=o,o=0):a=dr(a)),o>a){var h=o;o=a,a=h}if(u||o%1||a%1){var p=If();return wt(o+p*(a-o+z_("1e-"+((p+"").length-1))),a)}return Bl(o,a)}var fI=xo(function(o,a,u){return a=a.toLowerCase(),o+(u?om(a):a)});function om(o){return uu(be(o).toLowerCase())}function im(o){return o=be(o),o&&o.replace(m_,rT).replace(x_,"")}function gI(o,a,u){o=be(o),a=Wt(a);var h=o.length;u=u===t?h:Xr(de(u),0,h);var p=u;return u-=a.length,u>=0&&o.slice(u,p)==a}function mI(o){return o=be(o),o&&Yw.test(o)?o.replace(Dh,oT):o}function pI(o){return o=be(o),o&&t_.test(o)?o.replace(il,"\\$&"):o}var vI=xo(function(o,a,u){return o+(u?"-":"")+a.toLowerCase()}),yI=xo(function(o,a,u){return o+(u?" ":"")+a.toLowerCase()}),CI=cg("toLowerCase");function wI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var p=(a-h)/2;return as(Ga(p),u)+o+as(qa(p),u)}function _I(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+as(a-h,u):o}function TI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?as(a-h,u)+o:o}function EI(o,a,u){return u||a==null?a=0:a&&(a=+a),OT(be(o).replace(al,""),a||0)}function SI(o,a,u){return(u?kt(o,a,u):a===t)?a=1:a=de(a),Ul(be(o),a)}function AI(){var o=arguments,a=be(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var bI=xo(function(o,a,u){return o+(u?"_":"")+a.toLowerCase()});function II(o,a,u){return u&&typeof u!="number"&&kt(o,a,u)&&(a=u=t),u=u===t?$t:u>>>0,u?(o=be(o),o&&(typeof a=="string"||a!=null&&!su(a))&&(a=Wt(a),!a&&bo(o))?Nr(In(o),0,u):o.split(a,u)):[]}var kI=xo(function(o,a,u){return o+(u?" ":"")+uu(a)});function RI(o,a,u){return o=be(o),u=u==null?0:Xr(de(u),0,o.length),a=Wt(a),o.slice(u,u+a.length)==a}function OI(o,a,u){var h=v.templateSettings;u&&kt(o,a,u)&&(a=t),o=be(o),a=ys({},a,h,mg);var p=ys({},a.imports,h.imports,mg),w=st(p),_=_l(p,w),E,b,x=0,D=a.interpolate||Na,L="__p += '",$=El((a.escape||Na).source+"|"+D.source+"|"+(D===Lh?l_:Na).source+"|"+(a.evaluate||Na).source+"|$","g"),J="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++V_+"]")+`
|
71
|
-
`;o.replace(
|
70
|
+
`)}function nS(o){return ce(o)||no(o)||!!(Af&&o&&o[Af])}function ur(o,a){var u=typeof o;return a=a??Qe,!!a&&(u=="number"||u!="symbol"&&g_.test(o))&&o>-1&&o%1==0&&o<a}function kt(o,a,u){if(!$e(u))return!1;var h=typeof a;return(h=="number"?Dt(u)&&ur(a,u.length):h=="string"&&a in u)?On(u[a],o):!1}function Xl(o,a){if(ce(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||Gt(o)?!0:Zw.test(o)||!Xw.test(o)||a!=null&&o in Ne(a)}function rS(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function Zl(o){var a=cs(o),u=y[a];if(typeof u!="function"||!(a in pe.prototype))return!1;if(o===u)return!0;var h=Yl(u);return!!h&&o===h[0]}function oS(o){return!!_f&&_f in o}var iS=Ua?dr:pu;function zi(o){var a=o&&o.constructor,u=typeof a=="function"&&a.prototype||Ro;return o===u}function _g(o){return o===o&&!$e(o)}function Tg(o,a){return function(u){return u==null?!1:u[o]===a&&(a!==t||o in Ne(u))}}function aS(o){var a=gs(o,function(h){return u.size===g&&u.clear(),h}),u=a.cache;return a}function sS(o,a){var u=o[1],h=a[1],p=u|h,w=p<(O|$|W),_=h==W&&u==H||h==W&&u==tt&&o[7].length<=a[8]||h==(W|tt)&&a[7].length<=a[8]&&u==H;if(!(w||_))return o;h&O&&(o[2]=a[2],p|=u&O?0:F);var E=a[3];if(E){var b=o[3];o[3]=b?og(b,E,a[4]):E,o[4]=b?kr(o[3],m):a[4]}return E=a[5],E&&(b=o[5],o[5]=b?ig(b,E,a[6]):E,o[6]=b?kr(o[5],m):a[6]),E=a[7],E&&(o[7]=E),h&W&&(o[8]=o[8]==null?a[8]:wt(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=p,o}function cS(o){var a=[];if(o!=null)for(var u in Ne(o))a.push(u);return a}function lS(o){return Fa.call(o)}function Eg(o,a,u){return a=rt(a===t?o.length-1:a,0),function(){for(var h=arguments,p=-1,w=rt(h.length-a,0),_=R(w);++p<w;)_[p]=h[a+p];p=-1;for(var E=R(a+1);++p<a;)E[p]=h[p];return E[a]=u(_),zt(o,this,E)}}function Sg(o,a){return a.length<2?o:Zr(o,fn(a,0,-1))}function uS(o,a){for(var u=o.length,h=wt(a.length,u),p=xt(o);h--;){var w=a[h];o[h]=ur(w,u)?p[w]:t}return o}function eu(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var Ag=Ig(jf),Wi=AT||function(o,a){return ht.setTimeout(o,a)},tu=Ig(ME);function bg(o,a,u){var h=a+"";return tu(o,tS(h,dS(XE(h),u)))}function Ig(o){var a=0,u=0;return function(){var h=RT(),p=Ue-(h-u);if(u=h,p>0){if(++a>=Ee)return arguments[0]}else a=0;return o.apply(t,arguments)}}function us(o,a){var u=-1,h=o.length,p=h-1;for(a=a===t?h:a;++u<a;){var w=Bl(u,p),_=o[w];o[w]=o[u],o[u]=_}return o.length=a,o}var kg=aS(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(e_,function(u,h,p,w){a.push(p?w.replace(c_,"$1"):h||u)}),a});function Wn(o){if(typeof o=="string"||Gt(o))return o;var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function to(o){if(o!=null){try{return Va.call(o)}catch{}try{return o+""}catch{}}return""}function dS(o,a){return ln(Uw,function(u){var h="_."+u[0];a&u[1]&&!xa(o,h)&&o.push(h)}),o.sort()}function Rg(o){if(o instanceof pe)return o.clone();var a=new dn(o.__wrapped__,o.__chain__);return a.__actions__=xt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function hS(o,a,u){(u?kt(o,a,u):a===t)?a=1:a=rt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var p=0,w=0,_=R(qa(h/a));p<h;)_[w++]=fn(o,p,p+=a);return _}function fS(o){for(var a=-1,u=o==null?0:o.length,h=0,p=[];++a<u;){var w=o[a];w&&(p[h++]=w)}return p}function gS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),u=arguments[0],h=o;h--;)a[h-1]=arguments[h];return Ir(ce(u)?xt(u):[u],ft(a,1))}var mS=fe(function(o,a){return je(o)?Vi(o,ft(a,1,je,!0)):[]}),pS=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Vi(o,ft(a,1,je,!0),Z(u,2)):[]}),vS=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Vi(o,ft(a,1,je,!0),t,u):[]});function yS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),fn(o,a<0?0:a,h)):[]}function CS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,0,a<0?0:a)):[]}function wS(o,a){return o&&o.length?ns(o,Z(a,3),!0,!0):[]}function _S(o,a){return o&&o.length?ns(o,Z(a,3),!0):[]}function TS(o,a,u,h){var p=o==null?0:o.length;return p?(u&&typeof u!="number"&&kt(o,a,u)&&(u=0,h=p),gE(o,a,u,h)):[]}function Og(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Da(o,Z(a,3),p)}function Ng(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h-1;return u!==t&&(p=de(u),p=u<0?rt(h+p,0):wt(p,h-1)),Da(o,Z(a,3),p,!0)}function Pg(o){var a=o==null?0:o.length;return a?ft(o,1):[]}function ES(o){var a=o==null?0:o.length;return a?ft(o,Mt):[]}function SS(o,a){var u=o==null?0:o.length;return u?(a=a===t?1:de(a),ft(o,a)):[]}function AS(o){for(var a=-1,u=o==null?0:o.length,h={};++a<u;){var p=o[a];h[p[0]]=p[1]}return h}function Mg(o){return o&&o.length?o[0]:t}function bS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Ao(o,a,p)}function IS(o){var a=o==null?0:o.length;return a?fn(o,0,-1):[]}var kS=fe(function(o){var a=Ve(o,$l);return a.length&&a[0]===o[0]?Pl(a):[]}),RS=fe(function(o){var a=gn(o),u=Ve(o,$l);return a===gn(u)?a=t:u.pop(),u.length&&u[0]===o[0]?Pl(u,Z(a,2)):[]}),OS=fe(function(o){var a=gn(o),u=Ve(o,$l);return a=typeof a=="function"?a:t,a&&u.pop(),u.length&&u[0]===o[0]?Pl(u,t,a):[]});function NS(o,a){return o==null?"":IT.call(o,a)}function gn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function PS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h;return u!==t&&(p=de(u),p=p<0?rt(h+p,0):wt(p,h-1)),a===a?dT(o,a,p):Da(o,ff,p,!0)}function MS(o,a){return o&&o.length?zf(o,de(a)):t}var xS=fe(xg);function xg(o,a){return o&&o.length&&a&&a.length?Ll(o,a):o}function DS(o,a,u){return o&&o.length&&a&&a.length?Ll(o,a,Z(u,2)):o}function LS(o,a,u){return o&&o.length&&a&&a.length?Ll(o,a,t,u):o}var BS=lr(function(o,a){var u=o==null?0:o.length,h=kl(o,a);return Gf(o,Ve(a,function(p){return ur(p,u)?+p:p}).sort(rg)),h});function US(o,a){var u=[];if(!(o&&o.length))return u;var h=-1,p=[],w=o.length;for(a=Z(a,3);++h<w;){var _=o[h];a(_,h,o)&&(u.push(_),p.push(h))}return Gf(o,p),u}function nu(o){return o==null?o:NT.call(o)}function VS(o,a,u){var h=o==null?0:o.length;return h?(u&&typeof u!="number"&&kt(o,a,u)?(a=0,u=h):(a=a==null?0:de(a),u=u===t?h:de(u)),fn(o,a,u)):[]}function FS(o,a){return ts(o,a)}function HS(o,a,u){return Vl(o,a,Z(u,2))}function $S(o,a){var u=o==null?0:o.length;if(u){var h=ts(o,a);if(h<u&&On(o[h],a))return h}return-1}function KS(o,a){return ts(o,a,!0)}function zS(o,a,u){return Vl(o,a,Z(u,2),!0)}function WS(o,a){var u=o==null?0:o.length;if(u){var h=ts(o,a,!0)-1;if(On(o[h],a))return h}return-1}function qS(o){return o&&o.length?Yf(o):[]}function GS(o,a){return o&&o.length?Yf(o,Z(a,2)):[]}function jS(o){var a=o==null?0:o.length;return a?fn(o,1,a):[]}function YS(o,a,u){return o&&o.length?(a=u||a===t?1:de(a),fn(o,0,a<0?0:a)):[]}function JS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,a<0?0:a,h)):[]}function QS(o,a){return o&&o.length?ns(o,Z(a,3),!1,!0):[]}function XS(o,a){return o&&o.length?ns(o,Z(a,3)):[]}var ZS=fe(function(o){return Nr(ft(o,1,je,!0))}),eA=fe(function(o){var a=gn(o);return je(a)&&(a=t),Nr(ft(o,1,je,!0),Z(a,2))}),tA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Nr(ft(o,1,je,!0),t,a)});function nA(o){return o&&o.length?Nr(o):[]}function rA(o,a){return o&&o.length?Nr(o,Z(a,2)):[]}function oA(o,a){return a=typeof a=="function"?a:t,o&&o.length?Nr(o,t,a):[]}function ru(o){if(!(o&&o.length))return[];var a=0;return o=br(o,function(u){if(je(u))return a=rt(u.length,a),!0}),wl(a,function(u){return Ve(o,vl(u))})}function Dg(o,a){if(!(o&&o.length))return[];var u=ru(o);return a==null?u:Ve(u,function(h){return zt(a,t,h)})}var iA=fe(function(o,a){return je(o)?Vi(o,a):[]}),aA=fe(function(o){return Hl(br(o,je))}),sA=fe(function(o){var a=gn(o);return je(a)&&(a=t),Hl(br(o,je),Z(a,2))}),cA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Hl(br(o,je),t,a)}),lA=fe(ru);function uA(o,a){return Zf(o||[],a||[],Ui)}function dA(o,a){return Zf(o||[],a||[],$i)}var hA=fe(function(o){var a=o.length,u=a>1?o[a-1]:t;return u=typeof u=="function"?(o.pop(),u):t,Dg(o,u)});function Lg(o){var a=y(o);return a.__chain__=!0,a}function fA(o,a){return a(o),o}function ds(o,a){return a(o)}var gA=lr(function(o){var a=o.length,u=a?o[0]:0,h=this.__wrapped__,p=function(w){return kl(w,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!ur(u)?this.thru(p):(h=h.slice(u,+u+(a?1:0)),h.__actions__.push({func:ds,args:[p],thisArg:t}),new dn(h,this.__chain__).thru(function(w){return a&&!w.length&&w.push(t),w}))});function mA(){return Lg(this)}function pA(){return new dn(this.value(),this.__chain__)}function vA(){this.__values__===t&&(this.__values__=Jg(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function yA(){return this}function CA(o){for(var a,u=this;u instanceof Ja;){var h=Rg(u);h.__index__=0,h.__values__=t,a?p.__wrapped__=h:a=h;var p=h;u=u.__wrapped__}return p.__wrapped__=o,a}function wA(){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:ds,args:[nu],thisArg:t}),new dn(a,this.__chain__)}return this.thru(nu)}function _A(){return Xf(this.__wrapped__,this.__actions__)}var TA=rs(function(o,a,u){Ie.call(o,u)?++o[u]:sr(o,u,1)});function EA(o,a,u){var h=ce(o)?df:fE;return u&&kt(o,a,u)&&(a=t),h(o,Z(a,3))}function SA(o,a){var u=ce(o)?br:Df;return u(o,Z(a,3))}var AA=lg(Og),bA=lg(Ng);function IA(o,a){return ft(hs(o,a),1)}function kA(o,a){return ft(hs(o,a),Mt)}function RA(o,a,u){return u=u===t?1:de(u),ft(hs(o,a),u)}function Bg(o,a){var u=ce(o)?ln:Or;return u(o,Z(a,3))}function Ug(o,a){var u=ce(o)?j_:xf;return u(o,Z(a,3))}var OA=rs(function(o,a,u){Ie.call(o,u)?o[u].push(a):sr(o,u,[a])});function NA(o,a,u,h){o=Dt(o)?o:Bo(o),u=u&&!h?de(u):0;var p=o.length;return u<0&&(u=rt(p+u,0)),vs(o)?u<=p&&o.indexOf(a,u)>-1:!!p&&Ao(o,a,u)>-1}var PA=fe(function(o,a,u){var h=-1,p=typeof a=="function",w=Dt(o)?R(o.length):[];return Or(o,function(_){w[++h]=p?zt(a,_,u):Fi(_,a,u)}),w}),MA=rs(function(o,a,u){sr(o,u,a)});function hs(o,a){var u=ce(o)?Ve:Hf;return u(o,Z(a,3))}function xA(o,a,u,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),u=h?t:u,ce(u)||(u=u==null?[]:[u]),Wf(o,a,u))}var DA=rs(function(o,a,u){o[u?0:1].push(a)},function(){return[[],[]]});function LA(o,a,u){var h=ce(o)?ml:mf,p=arguments.length<3;return h(o,Z(a,4),u,p,Or)}function BA(o,a,u){var h=ce(o)?Y_:mf,p=arguments.length<3;return h(o,Z(a,4),u,p,xf)}function UA(o,a){var u=ce(o)?br:Df;return u(o,ms(Z(a,3)))}function VA(o){var a=ce(o)?Of:NE;return a(o)}function FA(o,a,u){(u?kt(o,a,u):a===t)?a=1:a=de(a);var h=ce(o)?cE:PE;return h(o,a)}function HA(o){var a=ce(o)?lE:xE;return a(o)}function $A(o){if(o==null)return 0;if(Dt(o))return vs(o)?Io(o):o.length;var a=_t(o);return a==bn||a==In?o.size:xl(o).length}function KA(o,a,u){var h=ce(o)?pl:DE;return u&&kt(o,a,u)&&(a=t),h(o,Z(a,3))}var zA=fe(function(o,a){if(o==null)return[];var u=a.length;return u>1&&kt(o,a[0],a[1])?a=[]:u>2&&kt(a[0],a[1],a[2])&&(a=[a[0]]),Wf(o,ft(a,1),[])}),fs=ST||function(){return ht.Date.now()};function WA(o,a){if(typeof a!="function")throw new un(l);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function Vg(o,a,u){return a=u?t:a,a=o&&a==null?o.length:a,cr(o,W,t,t,t,t,a)}function Fg(o,a){var u;if(typeof a!="function")throw new un(l);return o=de(o),function(){return--o>0&&(u=a.apply(this,arguments)),o<=1&&(a=t),u}}var ou=fe(function(o,a,u){var h=O;if(u.length){var p=kr(u,Do(ou));h|=Q}return cr(o,h,a,u,p)}),Hg=fe(function(o,a,u){var h=O|$;if(u.length){var p=kr(u,Do(Hg));h|=Q}return cr(a,h,o,u,p)});function $g(o,a,u){a=u?t:a;var h=cr(o,H,t,t,t,t,t,a);return h.placeholder=$g.placeholder,h}function Kg(o,a,u){a=u?t:a;var h=cr(o,z,t,t,t,t,t,a);return h.placeholder=Kg.placeholder,h}function zg(o,a,u){var h,p,w,_,E,b,x=0,D=!1,L=!1,K=!0;if(typeof o!="function")throw new un(l);a=mn(a)||0,$e(u)&&(D=!!u.leading,L="maxWait"in u,w=L?rt(mn(u.maxWait)||0,a):w,K="trailing"in u?!!u.trailing:K);function J(Ye){var Nn=h,fr=p;return h=p=t,x=Ye,_=o.apply(fr,Nn),_}function ee(Ye){return x=Ye,E=Wi(me,a),D?J(Ye):_}function he(Ye){var Nn=Ye-b,fr=Ye-x,lm=a-Nn;return L?wt(lm,w-fr):lm}function te(Ye){var Nn=Ye-b,fr=Ye-x;return b===t||Nn>=a||Nn<0||L&&fr>=w}function me(){var Ye=fs();if(te(Ye))return ve(Ye);E=Wi(me,he(Ye))}function ve(Ye){return E=t,K&&h?J(Ye):(h=p=t,_)}function jt(){E!==t&&eg(E),x=0,h=b=p=E=t}function Rt(){return E===t?_:ve(fs())}function Yt(){var Ye=fs(),Nn=te(Ye);if(h=arguments,p=this,b=Ye,Nn){if(E===t)return ee(b);if(L)return eg(E),E=Wi(me,a),J(b)}return E===t&&(E=Wi(me,a)),_}return Yt.cancel=jt,Yt.flush=Rt,Yt}var qA=fe(function(o,a){return Mf(o,1,a)}),GA=fe(function(o,a,u){return Mf(o,mn(a)||0,u)});function jA(o){return cr(o,Te)}function gs(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new un(l);var u=function(){var h=arguments,p=a?a.apply(this,h):h[0],w=u.cache;if(w.has(p))return w.get(p);var _=o.apply(this,h);return u.cache=w.set(p,_)||w,_};return u.cache=new(gs.Cache||ar),u}gs.Cache=ar;function ms(o){if(typeof o!="function")throw new un(l);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 YA(o){return Fg(2,o)}var JA=LE(function(o,a){a=a.length==1&&ce(a[0])?Ve(a[0],Wt(Z())):Ve(ft(a,1),Wt(Z()));var u=a.length;return fe(function(h){for(var p=-1,w=wt(h.length,u);++p<w;)h[p]=a[p].call(this,h[p]);return zt(o,this,h)})}),iu=fe(function(o,a){var u=kr(a,Do(iu));return cr(o,Q,t,a,u)}),Wg=fe(function(o,a){var u=kr(a,Do(Wg));return cr(o,we,t,a,u)}),QA=lr(function(o,a){return cr(o,tt,t,t,t,a)});function XA(o,a){if(typeof o!="function")throw new un(l);return a=a===t?a:de(a),fe(o,a)}function ZA(o,a){if(typeof o!="function")throw new un(l);return a=a==null?0:rt(de(a),0),fe(function(u){var h=u[a],p=Mr(u,0,a);return h&&Ir(p,h),zt(o,this,p)})}function eb(o,a,u){var h=!0,p=!0;if(typeof o!="function")throw new un(l);return $e(u)&&(h="leading"in u?!!u.leading:h,p="trailing"in u?!!u.trailing:p),zg(o,a,{leading:h,maxWait:a,trailing:p})}function tb(o){return Vg(o,1)}function nb(o,a){return iu(Kl(a),o)}function rb(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function ob(o){return hn(o,S)}function ib(o,a){return a=typeof a=="function"?a:t,hn(o,S,a)}function ab(o){return hn(o,v|S)}function sb(o,a){return a=typeof a=="function"?a:t,hn(o,v|S,a)}function cb(o,a){return a==null||Pf(o,a,st(a))}function On(o,a){return o===a||o!==o&&a!==a}var lb=ss(Nl),ub=ss(function(o,a){return o>=a}),no=Uf(function(){return arguments}())?Uf:function(o){return ze(o)&&Ie.call(o,"callee")&&!Sf.call(o,"callee")},ce=R.isArray,db=of?Wt(of):CE;function Dt(o){return o!=null&&ps(o.length)&&!dr(o)}function je(o){return ze(o)&&Dt(o)}function hb(o){return o===!0||o===!1||ze(o)&&It(o)==Ai}var xr=bT||pu,fb=af?Wt(af):wE;function gb(o){return ze(o)&&o.nodeType===1&&!qi(o)}function mb(o){if(o==null)return!0;if(Dt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||xr(o)||Lo(o)||no(o)))return!o.length;var a=_t(o);if(a==bn||a==In)return!o.size;if(zi(o))return!xl(o).length;for(var u in o)if(Ie.call(o,u))return!1;return!0}function pb(o,a){return Hi(o,a)}function vb(o,a,u){u=typeof u=="function"?u:t;var h=u?u(o,a):t;return h===t?Hi(o,a,t,u):!!h}function au(o){if(!ze(o))return!1;var a=It(o);return a==ka||a==Fw||typeof o.message=="string"&&typeof o.name=="string"&&!qi(o)}function yb(o){return typeof o=="number"&&bf(o)}function dr(o){if(!$e(o))return!1;var a=It(o);return a==Ra||a==Ph||a==Vw||a==$w}function qg(o){return typeof o=="number"&&o==de(o)}function ps(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Qe}function $e(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function ze(o){return o!=null&&typeof o=="object"}var Gg=sf?Wt(sf):TE;function Cb(o,a){return o===a||Ml(o,a,Jl(a))}function wb(o,a,u){return u=typeof u=="function"?u:t,Ml(o,a,Jl(a),u)}function _b(o){return jg(o)&&o!=+o}function Tb(o){if(iS(o))throw new se(s);return Vf(o)}function Eb(o){return o===null}function Sb(o){return o==null}function jg(o){return typeof o=="number"||ze(o)&&It(o)==Ii}function qi(o){if(!ze(o)||It(o)!=or)return!1;var a=Ka(o);if(a===null)return!0;var u=Ie.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Va.call(u)==wT}var su=cf?Wt(cf):EE;function Ab(o){return qg(o)&&o>=-Qe&&o<=Qe}var Yg=lf?Wt(lf):SE;function vs(o){return typeof o=="string"||!ce(o)&&ze(o)&&It(o)==Ri}function Gt(o){return typeof o=="symbol"||ze(o)&&It(o)==Oa}var Lo=uf?Wt(uf):AE;function bb(o){return o===t}function Ib(o){return ze(o)&&_t(o)==Oi}function kb(o){return ze(o)&&It(o)==zw}var Rb=ss(Dl),Ob=ss(function(o,a){return o<=a});function Jg(o){if(!o)return[];if(Dt(o))return vs(o)?kn(o):xt(o);if(Mi&&o[Mi])return cT(o[Mi]());var a=_t(o),u=a==bn?Tl:a==In?La:Bo;return u(o)}function hr(o){if(!o)return o===0?o:0;if(o=mn(o),o===Mt||o===-Mt){var a=o<0?-1:1;return a*Ct}return o===o?o:0}function de(o){var a=hr(o),u=a%1;return a===a?u?a-u:a:0}function Qg(o){return o?Xr(de(o),0,Kt):0}function mn(o){if(typeof o=="number")return o;if(Gt(o))return Si;if($e(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=$e(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=pf(o);var u=d_.test(o);return u||f_.test(o)?W_(o.slice(2),u?2:8):u_.test(o)?Si:+o}function Xg(o){return zn(o,Lt(o))}function Nb(o){return o?Xr(de(o),-Qe,Qe):o===0?o:0}function be(o){return o==null?"":qt(o)}var Pb=Mo(function(o,a){if(zi(a)||Dt(a)){zn(a,st(a),o);return}for(var u in a)Ie.call(a,u)&&Ui(o,u,a[u])}),Zg=Mo(function(o,a){zn(a,Lt(a),o)}),ys=Mo(function(o,a,u,h){zn(a,Lt(a),o,h)}),Mb=Mo(function(o,a,u,h){zn(a,st(a),o,h)}),xb=lr(kl);function Db(o,a){var u=Po(o);return a==null?u:Nf(u,a)}var Lb=fe(function(o,a){o=Ne(o);var u=-1,h=a.length,p=h>2?a[2]:t;for(p&&kt(a[0],a[1],p)&&(h=1);++u<h;)for(var w=a[u],_=Lt(w),E=-1,b=_.length;++E<b;){var x=_[E],D=o[x];(D===t||On(D,Ro[x])&&!Ie.call(o,x))&&(o[x]=w[x])}return o}),Bb=fe(function(o){return o.push(t,pg),zt(em,t,o)});function Ub(o,a){return hf(o,Z(a,3),Kn)}function Vb(o,a){return hf(o,Z(a,3),Ol)}function Fb(o,a){return o==null?o:Rl(o,Z(a,3),Lt)}function Hb(o,a){return o==null?o:Lf(o,Z(a,3),Lt)}function $b(o,a){return o&&Kn(o,Z(a,3))}function Kb(o,a){return o&&Ol(o,Z(a,3))}function zb(o){return o==null?[]:Za(o,st(o))}function Wb(o){return o==null?[]:Za(o,Lt(o))}function cu(o,a,u){var h=o==null?t:Zr(o,a);return h===t?u:h}function qb(o,a){return o!=null&&Cg(o,a,mE)}function lu(o,a){return o!=null&&Cg(o,a,pE)}var Gb=dg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Fa.call(a)),o[a]=u},du(Bt)),jb=dg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Fa.call(a)),Ie.call(o,a)?o[a].push(u):o[a]=[u]},Z),Yb=fe(Fi);function st(o){return Dt(o)?Rf(o):xl(o)}function Lt(o){return Dt(o)?Rf(o,!0):bE(o)}function Jb(o,a){var u={};return a=Z(a,3),Kn(o,function(h,p,w){sr(u,a(h,p,w),h)}),u}function Qb(o,a){var u={};return a=Z(a,3),Kn(o,function(h,p,w){sr(u,p,a(h,p,w))}),u}var Xb=Mo(function(o,a,u){es(o,a,u)}),em=Mo(function(o,a,u,h){es(o,a,u,h)}),Zb=lr(function(o,a){var u={};if(o==null)return u;var h=!1;a=Ve(a,function(w){return w=Pr(w,o),h||(h=w.length>1),w}),zn(o,jl(o),u),h&&(u=hn(u,v|C|S,GE));for(var p=a.length;p--;)Fl(u,a[p]);return u});function eI(o,a){return tm(o,ms(Z(a)))}var tI=lr(function(o,a){return o==null?{}:kE(o,a)});function tm(o,a){if(o==null)return{};var u=Ve(jl(o),function(h){return[h]});return a=Z(a),qf(o,u,function(h,p){return a(h,p[0])})}function nI(o,a,u){a=Pr(a,o);var h=-1,p=a.length;for(p||(p=1,o=t);++h<p;){var w=o==null?t:o[Wn(a[h])];w===t&&(h=p,w=u),o=dr(w)?w.call(o):w}return o}function rI(o,a,u){return o==null?o:$i(o,a,u)}function oI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:$i(o,a,u,h)}var nm=gg(st),rm=gg(Lt);function iI(o,a,u){var h=ce(o),p=h||xr(o)||Lo(o);if(a=Z(a,4),u==null){var w=o&&o.constructor;p?u=h?new w:[]:$e(o)?u=dr(w)?Po(Ka(o)):{}:u={}}return(p?ln:Kn)(o,function(_,E,b){return a(u,_,E,b)}),u}function aI(o,a){return o==null?!0:Fl(o,a)}function sI(o,a,u){return o==null?o:Qf(o,a,Kl(u))}function cI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:Qf(o,a,Kl(u),h)}function Bo(o){return o==null?[]:_l(o,st(o))}function lI(o){return o==null?[]:_l(o,Lt(o))}function uI(o,a,u){return u===t&&(u=a,a=t),u!==t&&(u=mn(u),u=u===u?u:0),a!==t&&(a=mn(a),a=a===a?a:0),Xr(mn(o),a,u)}function dI(o,a,u){return a=hr(a),u===t?(u=a,a=0):u=hr(u),o=mn(o),vE(o,a,u)}function hI(o,a,u){if(u&&typeof u!="boolean"&&kt(o,a,u)&&(a=u=t),u===t&&(typeof a=="boolean"?(u=a,a=t):typeof o=="boolean"&&(u=o,o=t)),o===t&&a===t?(o=0,a=1):(o=hr(o),a===t?(a=o,o=0):a=hr(a)),o>a){var h=o;o=a,a=h}if(u||o%1||a%1){var p=If();return wt(o+p*(a-o+z_("1e-"+((p+"").length-1))),a)}return Bl(o,a)}var fI=xo(function(o,a,u){return a=a.toLowerCase(),o+(u?om(a):a)});function om(o){return uu(be(o).toLowerCase())}function im(o){return o=be(o),o&&o.replace(m_,rT).replace(x_,"")}function gI(o,a,u){o=be(o),a=qt(a);var h=o.length;u=u===t?h:Xr(de(u),0,h);var p=u;return u-=a.length,u>=0&&o.slice(u,p)==a}function mI(o){return o=be(o),o&&Yw.test(o)?o.replace(Dh,oT):o}function pI(o){return o=be(o),o&&t_.test(o)?o.replace(il,"\\$&"):o}var vI=xo(function(o,a,u){return o+(u?"-":"")+a.toLowerCase()}),yI=xo(function(o,a,u){return o+(u?" ":"")+a.toLowerCase()}),CI=cg("toLowerCase");function wI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var p=(a-h)/2;return as(Ga(p),u)+o+as(qa(p),u)}function _I(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+as(a-h,u):o}function TI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?as(a-h,u)+o:o}function EI(o,a,u){return u||a==null?a=0:a&&(a=+a),OT(be(o).replace(al,""),a||0)}function SI(o,a,u){return(u?kt(o,a,u):a===t)?a=1:a=de(a),Ul(be(o),a)}function AI(){var o=arguments,a=be(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var bI=xo(function(o,a,u){return o+(u?"_":"")+a.toLowerCase()});function II(o,a,u){return u&&typeof u!="number"&&kt(o,a,u)&&(a=u=t),u=u===t?Kt:u>>>0,u?(o=be(o),o&&(typeof a=="string"||a!=null&&!su(a))&&(a=qt(a),!a&&bo(o))?Mr(kn(o),0,u):o.split(a,u)):[]}var kI=xo(function(o,a,u){return o+(u?" ":"")+uu(a)});function RI(o,a,u){return o=be(o),u=u==null?0:Xr(de(u),0,o.length),a=qt(a),o.slice(u,u+a.length)==a}function OI(o,a,u){var h=y.templateSettings;u&&kt(o,a,u)&&(a=t),o=be(o),a=ys({},a,h,mg);var p=ys({},a.imports,h.imports,mg),w=st(p),_=_l(p,w),E,b,x=0,D=a.interpolate||Na,L="__p += '",K=El((a.escape||Na).source+"|"+D.source+"|"+(D===Lh?l_:Na).source+"|"+(a.evaluate||Na).source+"|$","g"),J="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++V_+"]")+`
|
71
|
+
`;o.replace(K,function(te,me,ve,jt,Rt,Yt){return ve||(ve=jt),L+=o.slice(x,Yt).replace(p_,iT),me&&(E=!0,L+=`' +
|
72
72
|
__e(`+me+`) +
|
73
73
|
'`),Rt&&(b=!0,L+=`';
|
74
74
|
`+Rt+`;
|
75
75
|
__p += '`),ve&&(L+=`' +
|
76
76
|
((__t = (`+ve+`)) == null ? '' : __t) +
|
77
|
-
'`),x=
|
77
|
+
'`),x=Yt+te.length,te}),L+=`';
|
78
78
|
`;var ee=Ie.call(a,"variable")&&a.variable;if(!ee)L=`with (obj) {
|
79
79
|
`+L+`
|
80
80
|
}
|
@@ -84,4 +84,4 @@ __p += '`),ve&&(L+=`' +
|
|
84
84
|
function print() { __p += __j.call(arguments, '') }
|
85
85
|
`:`;
|
86
86
|
`)+L+`return __p
|
87
|
-
}`;var he=sm(function(){return Se(w,J+"return "+L).apply(t,_)});if(he.source=L,au(he))throw he;return he}function NI(o){return be(o).toLowerCase()}function PI(o){return be(o).toUpperCase()}function MI(o,a,u){if(o=be(o),o&&(u||a===t))return pf(o);if(!o||!(a=Wt(a)))return o;var h=In(o),p=In(a),w=vf(h,p),_=yf(h,p)+1;return Nr(h,w,_).join("")}function xI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,wf(o)+1);if(!o||!(a=Wt(a)))return o;var h=In(o),p=yf(h,In(a))+1;return Nr(h,0,p).join("")}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(al,"");if(!o||!(a=Wt(a)))return o;var h=In(o),p=vf(h,In(a));return Nr(h,p).join("")}function LI(o,a){var u=Y,h=G;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?Wt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var _=In(o);w=_.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var b=_?Nr(_,0,E).join(""):o.slice(0,E);if(p===t)return b+h;if(_&&(E+=b.length-E),su(p)){if(o.slice(E).search(p)){var x,D=b;for(p.global||(p=El(p.source,be(Bh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;b=b.slice(0,L===t?E:L)}}else if(o.indexOf(Wt(p),E)!=E){var $=b.lastIndexOf(p);$>-1&&(b=b.slice(0,$))}return b+h}function BI(o){return o=be(o),o&&jw.test(o)?o.replace(xh,hT):o}var UI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),uu=cg("toUpperCase");function am(o,a,u){return o=be(o),a=u?t:a,a===t?sT(o)?mT(o):X_(o):o.match(a)||[]}var sm=fe(function(o,a){try{return Kt(o,t,a)}catch(u){return au(u)?u:new se(u)}}),VI=cr(function(o,a){return cn(a,function(u){u=zn(u),ar(o,u,ou(o[u],o))}),o});function FI(o){var a=o==null?0:o.length,u=Z();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new ln(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(Kt(w[0],this,h))return Kt(w[1],this,h)}})}function HI(o){return hE(dn(o,y))}function du(o){return function(){return o}}function $I(o,a){return o==null||o!==o?a:o}var KI=ug(),zI=ug(!0);function Lt(o){return o}function hu(o){return Ff(typeof o=="function"?o:dn(o,y))}function WI(o){return $f(dn(o,y))}function qI(o,a){return Kf(o,dn(a,y))}var GI=fe(function(o,a){return function(u){return Fi(u,o,a)}}),jI=fe(function(o,a){return function(u){return Fi(o,u,a)}});function fu(o,a,u){var h=st(a),p=Za(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=Za(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,_=ur(o);return cn(p,function(E){var b=a[E];o[E]=b,_&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=Mt(this.__actions__);return L.push({func:b,args:arguments,thisArg:o}),D.__chain__=x,D}return b.apply(o,Ar([this.value()],arguments))})}),o}function YI(){return ht._===this&&(ht._=_T),this}function gu(){}function JI(o){return o=de(o),fe(function(a){return zf(a,o)})}var QI=Wl(Ve),XI=Wl(df),ZI=Wl(pl);function cm(o){return Xl(o)?vl(zn(o)):RE(o)}function ek(o){return function(a){return o==null?t:Zr(o,a)}}var tk=hg(),nk=hg(!0);function mu(){return[]}function pu(){return!1}function rk(){return{}}function ok(){return""}function ik(){return!0}function ak(o,a){if(o=de(o),o<1||o>Qe)return[];var u=$t,h=wt(o,$t);a=Z(a),o-=$t;for(var p=wl(h,a);++u<o;)a(u);return p}function sk(o){return ce(o)?Ve(o,zn):qt(o)?[o]:Mt(kg(be(o)))}function ck(o){var a=++CT;return be(o)+a}var lk=is(function(o,a){return o+a},0),uk=ql("ceil"),dk=is(function(o,a){return o/a},1),hk=ql("floor");function fk(o){return o&&o.length?Xa(o,Lt,Nl):t}function gk(o,a){return o&&o.length?Xa(o,Z(a,2),Nl):t}function mk(o){return gf(o,Lt)}function pk(o,a){return gf(o,Z(a,2))}function vk(o){return o&&o.length?Xa(o,Lt,Dl):t}function yk(o,a){return o&&o.length?Xa(o,Z(a,2),Dl):t}var Ck=is(function(o,a){return o*a},1),wk=ql("round"),_k=is(function(o,a){return o-a},0);function Tk(o){return o&&o.length?Cl(o,Lt):0}function Ek(o,a){return o&&o.length?Cl(o,Z(a,2)):0}return v.after=WA,v.ary=Vg,v.assign=Pb,v.assignIn=Zg,v.assignInWith=ys,v.assignWith=Mb,v.at=xb,v.before=Fg,v.bind=ou,v.bindAll=VI,v.bindKey=Hg,v.castArray=rb,v.chain=Lg,v.chunk=hS,v.compact=fS,v.concat=gS,v.cond=FI,v.conforms=HI,v.constant=du,v.countBy=TA,v.create=Db,v.curry=$g,v.curryRight=Kg,v.debounce=zg,v.defaults=Lb,v.defaultsDeep=Bb,v.defer=qA,v.delay=GA,v.difference=mS,v.differenceBy=pS,v.differenceWith=vS,v.drop=yS,v.dropRight=CS,v.dropRightWhile=wS,v.dropWhile=_S,v.fill=TS,v.filter=SA,v.flatMap=IA,v.flatMapDeep=kA,v.flatMapDepth=RA,v.flatten=Pg,v.flattenDeep=ES,v.flattenDepth=SS,v.flip=jA,v.flow=KI,v.flowRight=zI,v.fromPairs=AS,v.functions=zb,v.functionsIn=Wb,v.groupBy=OA,v.initial=IS,v.intersection=kS,v.intersectionBy=RS,v.intersectionWith=OS,v.invert=Gb,v.invertBy=jb,v.invokeMap=PA,v.iteratee=hu,v.keyBy=MA,v.keys=st,v.keysIn=Dt,v.map=hs,v.mapKeys=Jb,v.mapValues=Qb,v.matches=WI,v.matchesProperty=qI,v.memoize=gs,v.merge=Xb,v.mergeWith=em,v.method=GI,v.methodOf=jI,v.mixin=fu,v.negate=ms,v.nthArg=JI,v.omit=Zb,v.omitBy=eI,v.once=YA,v.orderBy=xA,v.over=QI,v.overArgs=JA,v.overEvery=XI,v.overSome=ZI,v.partial=iu,v.partialRight=Wg,v.partition=DA,v.pick=tI,v.pickBy=tm,v.property=cm,v.propertyOf=ek,v.pull=xS,v.pullAll=xg,v.pullAllBy=DS,v.pullAllWith=LS,v.pullAt=BS,v.range=tk,v.rangeRight=nk,v.rearg=QA,v.reject=UA,v.remove=US,v.rest=XA,v.reverse=nu,v.sampleSize=FA,v.set=rI,v.setWith=oI,v.shuffle=HA,v.slice=VS,v.sortBy=zA,v.sortedUniq=qS,v.sortedUniqBy=GS,v.split=II,v.spread=ZA,v.tail=jS,v.take=YS,v.takeRight=JS,v.takeRightWhile=QS,v.takeWhile=XS,v.tap=fA,v.throttle=eb,v.thru=ds,v.toArray=Jg,v.toPairs=nm,v.toPairsIn=rm,v.toPath=sk,v.toPlainObject=Xg,v.transform=iI,v.unary=tb,v.union=ZS,v.unionBy=eA,v.unionWith=tA,v.uniq=nA,v.uniqBy=rA,v.uniqWith=oA,v.unset=aI,v.unzip=ru,v.unzipWith=Dg,v.update=sI,v.updateWith=cI,v.values=Bo,v.valuesIn=lI,v.without=iA,v.words=am,v.wrap=nb,v.xor=aA,v.xorBy=sA,v.xorWith=cA,v.zip=lA,v.zipObject=uA,v.zipObjectDeep=dA,v.zipWith=hA,v.entries=nm,v.entriesIn=rm,v.extend=Zg,v.extendWith=ys,fu(v,v),v.add=lk,v.attempt=sm,v.camelCase=fI,v.capitalize=om,v.ceil=uk,v.clamp=uI,v.clone=ob,v.cloneDeep=ab,v.cloneDeepWith=sb,v.cloneWith=ib,v.conformsTo=cb,v.deburr=im,v.defaultTo=$I,v.divide=dk,v.endsWith=gI,v.eq=Rn,v.escape=mI,v.escapeRegExp=pI,v.every=EA,v.find=AA,v.findIndex=Og,v.findKey=Ub,v.findLast=bA,v.findLastIndex=Ng,v.findLastKey=Vb,v.floor=hk,v.forEach=Bg,v.forEachRight=Ug,v.forIn=Fb,v.forInRight=Hb,v.forOwn=$b,v.forOwnRight=Kb,v.get=cu,v.gt=lb,v.gte=ub,v.has=qb,v.hasIn=lu,v.head=Mg,v.identity=Lt,v.includes=NA,v.indexOf=bS,v.inRange=dI,v.invoke=Yb,v.isArguments=no,v.isArray=ce,v.isArrayBuffer=db,v.isArrayLike=xt,v.isArrayLikeObject=je,v.isBoolean=hb,v.isBuffer=Pr,v.isDate=fb,v.isElement=gb,v.isEmpty=mb,v.isEqual=pb,v.isEqualWith=vb,v.isError=au,v.isFinite=yb,v.isFunction=ur,v.isInteger=qg,v.isLength=ps,v.isMap=Gg,v.isMatch=Cb,v.isMatchWith=wb,v.isNaN=_b,v.isNative=Tb,v.isNil=Sb,v.isNull=Eb,v.isNumber=jg,v.isObject=$e,v.isObjectLike=ze,v.isPlainObject=qi,v.isRegExp=su,v.isSafeInteger=Ab,v.isSet=Yg,v.isString=vs,v.isSymbol=qt,v.isTypedArray=Lo,v.isUndefined=bb,v.isWeakMap=Ib,v.isWeakSet=kb,v.join=NS,v.kebabCase=vI,v.last=fn,v.lastIndexOf=PS,v.lowerCase=yI,v.lowerFirst=CI,v.lt=Rb,v.lte=Ob,v.max=fk,v.maxBy=gk,v.mean=mk,v.meanBy=pk,v.min=vk,v.minBy=yk,v.stubArray=mu,v.stubFalse=pu,v.stubObject=rk,v.stubString=ok,v.stubTrue=ik,v.multiply=Ck,v.nth=MS,v.noConflict=YI,v.noop=gu,v.now=fs,v.pad=wI,v.padEnd=_I,v.padStart=TI,v.parseInt=EI,v.random=hI,v.reduce=LA,v.reduceRight=BA,v.repeat=SI,v.replace=AI,v.result=nI,v.round=wk,v.runInContext=A,v.sample=VA,v.size=$A,v.snakeCase=bI,v.some=KA,v.sortedIndex=FS,v.sortedIndexBy=HS,v.sortedIndexOf=$S,v.sortedLastIndex=KS,v.sortedLastIndexBy=zS,v.sortedLastIndexOf=WS,v.startCase=kI,v.startsWith=RI,v.subtract=_k,v.sum=Tk,v.sumBy=Ek,v.template=OI,v.times=ak,v.toFinite=dr,v.toInteger=de,v.toLength=Qg,v.toLower=NI,v.toNumber=gn,v.toSafeInteger=Nb,v.toString=be,v.toUpper=PI,v.trim=MI,v.trimEnd=xI,v.trimStart=DI,v.truncate=LI,v.unescape=BI,v.uniqueId=ck,v.upperCase=UI,v.upperFirst=uu,v.each=Bg,v.eachRight=Ug,v.first=Mg,fu(v,function(){var o={};return $n(v,function(a,u){Ie.call(v.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),v.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){v[o].placeholder=v}),cn(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=wt(u,h.__takeCount__):h.__views__.push({size:wt(u,$t),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),cn(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==yt||u==an;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:Z(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),cn(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),cn(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Lt)},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(u){return Fi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ms(Z(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take($t)},$n(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=v[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(v.prototype[a]=function(){var _=this.__wrapped__,E=h?[1]:arguments,b=_ instanceof pe,x=E[0],D=b||ce(_),L=function(me){var ve=p.apply(v,Ar([me],E));return h&&$?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(b=D=!1);var $=this.__chain__,J=!!this.__actions__.length,ee=w&&!$,he=b&&!J;if(!w&&D){_=he?_:new pe(this);var te=o.apply(_,E);return te.__actions__.push({func:ds,args:[L],thisArg:t}),new un(te,$)}return ee&&he?o.apply(this,E):(te=this.thru(L),ee?h?te.value()[0]:te.value():te)})}),cn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Ba[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);v.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(_){return a.apply(ce(_)?_:[],p)})}}),$n(pe.prototype,function(o,a){var u=v[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[os(t,K).name]=[{name:"wrapper",func:t}],pe.prototype.clone=BT,pe.prototype.reverse=UT,pe.prototype.value=VT,v.prototype.at=gA,v.prototype.chain=mA,v.prototype.commit=pA,v.prototype.next=vA,v.prototype.plant=CA,v.prototype.reverse=wA,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=_A,v.prototype.first=v.prototype.head,Mi&&(v.prototype[Mi]=yA),v},ko=pT();jr?((jr.exports=ko)._=ko,hl._=ko):ht._=ko}).call(LB)}(Zi,Zi.exports)),Zi.exports}var _i=BB();const Js=DB(_i),UB={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-CvusQP1y.js")),meta:{requiresAuth:!1}},VB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-CzVzm1Iu.js")),meta:{requiresAuth:!1}},{isAuthenticated:$p,handleRedirect:FB}=sw(),HB=jc();function $B(r){r.addRoute(UB),r.addRoute(VB),r.beforeEach(async(e,t,n)=>{function i(l){return l.matched.some(d=>d.meta.requiresAuth)}if(!i(e))return n();if(!$p.value){ae.value=!0;try{await FB(),await HB.__init__()}catch(l){console.error("Fail to authenticate",l),await r.push("/jplan-auth-fail")}ae.value=!1}$p.value&&n()})}const{scope:Kp}=jc();function KB(){const r=Nh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Kp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Kp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ti(r){const e=KB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.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 zB(){const r=Ti("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 Fr=zB();function WB(){const r=Ti("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 Hr=WB();function qB(){const r=Ti("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}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.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 Zt=qB();async function GB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Ei(r,e,t=[]){const n=YB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>jB(s,i,t))}function jB(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(l=>s.includes(l))})}function YB(r){return Js.trim(r).toLowerCase().replace(/\s+/g," ")}let Ms=!1;const Wu=c.ref(!1),mn=c.ref([]),zp=c.ref([]),We=c.ref(null),Wo=c.ref([]),qo=c.ref([]),Pw=()=>{const r=Vn(),e=async T=>{Wu.value=!0;const I=T?`_active eq true and ${T}`:"_active eq true",N=await Fr.getOrgList(I);N&&(mn.value=N,Ms=!0),Wu.value=!1},t=async T=>{var I;return(I=mn.value)!=null&&I.length||await e(T),mn.value};function n(T){if(!mn.value)throw new Error("Data not stored yet");const I=Ei(mn.value,T,["name","description"]);return T!==""?I:mn.value}const i=T=>{zp.value=T},s=T=>{We.value=_i.cloneDeep(T)},l=async T=>await Fr.getOrg(T),d=async()=>{if(We.value!=null){const T=await Fr.createOrg(We.value);return T!=null&&T.data.created_at&&(r.success("Organization created."),Ms&&mn.value.push(T.data)),T==null?void 0:T.data}},f=async()=>{if(ae.value=!0,We.value&&We.value.__id){const T=await Fr.updateOrg(We.value);if(Ms&&(T!=null&&T.data.__id)){const I=mn.value.findIndex(N=>N.__id===T.data.__id);return I!==-1?(mn.value[I]=T.data,r.success("Organization updated.")):r.error("Unable to update item"),ae.value=!1,T.data}}else ae.value=!1,r.error("Unable to update item")},g=async()=>{if(ae.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),Ms){const T=mn.value.findIndex(I=>{var N;return I.__id===((N=We.value)==null?void 0:N.__id)});if(T!==-1)return mn.value.splice(T,1),We.value;r.error("Unable to deactivate organization")}ae.value=!1}};async function m(T){ae.value=!0;try{if(We.value&&We.value.__id){const I={...T,organization:We.value.__id};if(!await Hr.updateBranch(I)){ae.value=!1;return}if(Wo.value.findIndex(F=>F.__id===T.__id)===-1)return r.success("Branch added successfully."),Wo.value.push(I),I;r.info("Branch already added.")}}catch(I){console.error(I)}finally{ae.value=!1}}async function y(T){if(ae.value=!0,We.value&&We.value.__id){const I={...T,organization:null};if(!await Hr.updateBranch(I)){ae.value=!1;return}const K=Wo.value.findIndex(F=>F.__id===T.__id);if(K!==-1)return Wo.value.splice(K,1),ae.value=!1,Wo.value;throw new Error("Item not found to remove")}ae.value=!1}async function C(T){ae.value=!0;try{if(We.value&&We.value.__id){const I={...T,organization:We.value.__id};if(!await Zt.updateTeam(I)){ae.value=!1;return}if(qo.value.findIndex(F=>F.__id===T.__id)===-1)return r.success("Team added successfully."),qo.value.push(I),I;r.info("Team already added.")}}catch(I){console.error(I)}finally{ae.value=!1}}async function S(T){if(ae.value=!0,We.value&&We.value.__id){const I={...T,organization:null};if(!await Zt.updateTeam(I)){ae.value=!1;return}const K=qo.value.findIndex(F=>F.__id===T.__id);if(K!==-1)return qo.value.splice(K,1),ae.value=!1,qo.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:mn,loading:Wu,columns:zp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:Wo,orgTeams:qo,linkBranch:m,unlinkBranch:y,linkTeam:C,unlinkTeam:S}};let xs=!1;const pn=c.ref([]),Wp=c.ref([]),ot=c.ref(null),qu=c.ref(!1),Go=c.ref([]),Mw=()=>{const r=Vn(),e=async C=>{qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Zt.getTeamList(S);T&&(pn.value=T,xs=!0),qu.value=!1},t=async C=>(pn.value.length||await e(C),pn.value);function n(C){if(!pn.value)throw new Error("Data not stored yet");const S=Ei(pn.value,C,["name","description"]);return C!==""?S:pn.value}const i=C=>{Wp.value=C},s=C=>{ot.value=_i.cloneDeep(C)},l=async C=>await Zt.getTeam(C),d=async()=>{if(ot.value!=null){const C=await Zt.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),xs&&pn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ae.value=!0,ot.value&&ot.value.__id){const C=await Zt.updateTeam(ot.value);if(xs&&(C!=null&&C.data.__id)){const S=pn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(pn.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(ot.value&&ot.value.created_at&&(await Zt.deactivateTeam(ot.value.__id),xs)){const C=pn.value.findIndex(S=>{var T;return S.__id===((T=ot.value)==null?void 0:T.__id)});if(C!==-1)return pn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ae.value=!0,(S=ot.value)!=null&&S.__id)if(Go.value.findIndex(I=>I.__id===C.__id)===-1)try{const I=await Zt.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),N=await Zt.getTeamUserList(ot.value.__id);return N&&(Go.value=N),r.success("User added successfully."),I}catch(I){console.error(I),r.error("Unable to add User.")}finally{ae.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.");ae.value=!1}async function y(C){if(ae.value=!0,ot.value&&ot.value.__id){const S=Go.value.findIndex(T=>T.__id===C);if(S!==-1)return await Zt.unlinkManageUser(ot.value.__id,C),Go.value.splice(S,1),ae.value=!1,Go.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:pn,loading:qu,columns:Wp,item:ot,usersTeam:Go,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:y}},xw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var N,K,F;const{openDialog:e}=va("global-scope__J-"),{user:t,domain:n,scope:i,session:s,setScope:l}=jc(),{getData:d,data:f}=Pw(),{getData:g,data:m}=Mw(),y=c.ref(!1);c.onBeforeMount(async()=>{y.value=!0,await d(),await g(),y.value=!1});const C=c.ref({scope_type:(N=i.value)==null?void 0:N.scope_type,organization:((K=i.value)==null?void 0:K.organization)??"org",team:(F=i.value)==null?void 0:F.team});function S(){var H,z,Q;C.value={...i.value,scope_type:(H=i.value)==null?void 0:H.scope_type,organization:((z=i.value)==null?void 0:z.organization)??"",team:(Q=i.value)==null?void 0:Q.team},e()}const T=c.computed(()=>{var H;switch((H=i.value)==null?void 0:H.scope_type){case"user":return N1;case"org":return R1;case"team":return P1;default:return O1}});async function I(){var H;((H=i.value)==null?void 0:H.scope_type)!==""&&l(C.value)}return(H,z)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:S,icon:"",class:"text-secondary ms-3",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(T.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(Ca),{loading:y.value,title:"Scope","dialog-id":"global-scope__J-","on-save":I},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Ut.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Ut.VListItemTitle,null,{default:c.withCtx(()=>z[3]||(z[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Ut.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Ut.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Ut.VListItemTitle,null,{default:c.withCtx(()=>z[4]||(z[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Ut.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(n)),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Ut.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Ut.VListItemTitle,null,{default:c.withCtx(()=>z[5]||(z[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Ut.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(s).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(kk.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:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>z[6]||(z[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>z[7]||(z[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>z[8]||(z[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>z[9]||(z[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(la.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>z[10]||(z[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ea.VSelect,{items:c.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"]),c.createVNode(la.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>z[11]||(z[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ea.VSelect,{items:c.unref(m),"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))}}),JB={},QB={class:"double-ring-spinner-container"};function XB(r,e){return c.openBlock(),c.createElementBlock("div",QB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Dw=pi(JB,[["render",XB],["__scopeId","data-v-00d7a69f"]]),ZB={key:0,class:"_jspinner-overlay_jj"},Lw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ae)?(c.openBlock(),c.createElementBlock("div",ZB,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),eU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Fv,ColumnSettingsDialog:Vd,ConfirmDialog:Uv,ContextMenu:Hv,CopyButton:yc,DeleteAllBtn:xd,DotsMenu:Lv,DotsMenuV1:Bv,EditButton:Mv,FormHeadless:Cy,FormMetadata:Ic,GlobalScopeFilter:xw,GlobalSpinner:Lw,JAvatar:Vv,JBtn:tv,JDialog:Ca,JForm:vy,JIconBtn:ev,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ec,SpinnerLoader:Dw,TabFormHeader:yy,TableAdvanced:jv,TableCard:Fd,TableCardsView:uy,TableHeader:Jv,UiTable:$v},Symbol.toStringTag,{value:"Module"})),tU=rR(),nU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Gu=!1;const ju=c.ref(!1),vn=c.ref([]),qp=c.ref([]),gt=c.ref(null),jo=c.ref([]),rU=()=>{const r=Vn(),e=async C=>{ju.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Hr.getBranchList(S);T&&(vn.value=T,Gu=!0),ju.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=Ei(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{qp.value=C},s=C=>{gt.value=_i.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),Gu&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&>.value.__id){const C=await Hr.updateBranch(gt.value);if(Gu&&C){const S=vn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(vn.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(gt.value&>.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=vn.value.findIndex(S=>{var T;return S.__id===((T=gt.value)==null?void 0:T.__id)});if(C!==-1)return vn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ae.value=!0;try{if(gt.value&>.value.__id){const S={...C,branch:gt.value.__id};if(!await Zt.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{ae.value=!1}}async function y(C){if(ae.value=!0,gt.value&>.value.__id){const S={...C,branch:null};if(!await Zt.updateTeam(S))return;const I=jo.value.findIndex(N=>N.__id===C.__id);if(I!==-1)return jo.value.splice(I,1),ae.value=!1,jo.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:vn,columns:qp,item:gt,loading:ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:jo,linkTeam:m,unlinkTeam:y}};function oU(){const r=Ti("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=oU();let Yu=!1;const Ju=c.ref(!1),yn=c.ref([]),Gp=c.ref([]),mt=c.ref(null),Yo=c.ref([]),iU=()=>{const r=Vn(),e=async C=>{Ju.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await ei.getDivisionList(S);T&&(yn.value=T,Yu=!0),Ju.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=Ei(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Gp.value=C},s=C=>{mt.value=_i.cloneDeep(C)},l=async C=>await ei.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ei.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Yu&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ae.value=!0,mt.value&&mt.value.__id){const C=await ei.updateDivision(mt.value);if(Yu&&(C!=null&&C.data.__id)){const S=yn.value.findIndex(T=>T.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),ae.value=!1,C}}else ae.value=!1,r.error("Unable to update item")},g=async()=>{if(ae.value=!0,mt.value&&mt.value.created_at){await ei.deactivateDivision(mt.value.__id);const C=yn.value.findIndex(S=>{var T;return S.__id===((T=mt.value)==null?void 0:T.__id)});if(C!==-1)return yn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ae.value=!1};async function m(C){ae.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.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{ae.value=!1}}async function y(C){if(ae.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const I=Yo.value.findIndex(N=>N.__id===C.__id);if(I!==-1)Yo.value.splice(I,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ae.value=!1,Yo.value}return{data:yn,columns:Gp,item:mt,loading:Ju,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Yo,linkDivision:m,unlinkDivision:y}};function aU(){const r=Ti("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=aU();let Qu=!1,Xu=c.ref(!1);const Cn=c.ref([]),jp=c.ref([]),wn=c.ref(null),sU=c.ref(null),cU=c.ref([]),lU=()=>{const r=Vn(),e=async m=>{Xu.value=!0;const y=m?`_active eq true and ${m}`:"_active eq true",C=await ti.getManageUserList(y);C&&(Cn.value=C,Qu=!0),Xu.value=!1},t=async m=>(Cn.value.length||await e(m),Cn.value);function n(m){if(!Cn.value)throw new Error("Data not stored yet");const y=Ei(Cn.value,m,["name","description"]);return m!==""?y:Cn.value}return{data:Cn,loading:Xu,columns:jp,item:wn,filterData:n,__init__:e,getData:t,setColumns:m=>{jp.value=m},setItem:m=>{wn.value=_i.cloneDeep(m)},getItem:async m=>await ti.getManageUser(m),createItem:async()=>{if(wn.value!=null){const m=crypto.randomUUID(),y=await ti.createManageUser({...wn.value,__id:m});return y!=null&&y.data.created_at&&(r.success("User created."),Qu&&Cn.value.push(y.data)),y==null?void 0:y.data}},updateItem:async()=>{if(ae.value=!0,wn.value&&wn.value.created_at){const m=await ti.updateManageUser(wn.value);if(Qu&&(m!=null&&m.data)){const y=Cn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(y!==-1)Cn.value[y]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ae.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(wn.value&&wn.value.created_at){try{await ti.deactivateManageUser(wn.value.__id)}catch{r.error("Unable to deactivate user");return}const m=Cn.value.findIndex(y=>{var C;return y.__id===((C=wn.value)==null?void 0:C.__id)});if(m!==-1)return Cn.value.splice(m,1),wn.value}},userOrg:sU,userTeams:cU}},uU=r=>{r.use(tU),r.use(iO,nU),Object.entries(eU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Ok).forEach(([e,t])=>{r.provide(e,t)})},dU={install:uU};exports.ContextMenu=Hv;exports.EventBus=_c;exports.FormHeadless=Cy;exports.HttpCore=GB;exports.SpinnerLoader=Dw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ae;exports._export_sfc=pi;exports._sfc_main=$v;exports._sfc_main$1=jv;exports._sfc_main$10=xd;exports._sfc_main$11=Mv;exports._sfc_main$12=Ca;exports._sfc_main$13=ev;exports._sfc_main$14=fy;exports._sfc_main$15=gy;exports._sfc_main$16=hy;exports._sfc_main$17=vy;exports._sfc_main$18=yy;exports._sfc_main$19=Ec;exports._sfc_main$2=Vd;exports._sfc_main$20=Vv;exports._sfc_main$21=Fv;exports._sfc_main$22=xw;exports._sfc_main$23=Lw;exports._sfc_main$3=Fd;exports._sfc_main$4=Uv;exports._sfc_main$5=yc;exports._sfc_main$6=Lv;exports._sfc_main$7=Bv;exports._sfc_main$8=Ic;exports._sfc_main$9=tv;exports.branchInstance=Hr;exports.coreClient=Nh;exports.createToastInterface=ha;exports.dateFormat=Gv;exports.divisionInstance=ei;exports.filterQuery=Ei;exports.globalEventBus=Md;exports.index=dU;exports.manageUserInstance=ti;exports.msal=Br;exports.orgInstance=Fr;exports.provideToast=oO;exports.scopedClient=Ti;exports.setupAuthGuard=$B;exports.teamInstance=Zt;exports.toastInjectionKey=Tc;exports.useBranchStore=rU;exports.useCustomizer=cR;exports.useDialog=va;exports.useDivisionStore=iU;exports.useManageUserStore=lU;exports.useOrganizationStore=Pw;exports.useSession=jc;exports.useTeamStore=Mw;exports.useToast=Vn;
|
87
|
+
}`;var he=sm(function(){return Se(w,J+"return "+L).apply(t,_)});if(he.source=L,au(he))throw he;return he}function NI(o){return be(o).toLowerCase()}function PI(o){return be(o).toUpperCase()}function MI(o,a,u){if(o=be(o),o&&(u||a===t))return pf(o);if(!o||!(a=qt(a)))return o;var h=kn(o),p=kn(a),w=vf(h,p),_=yf(h,p)+1;return Mr(h,w,_).join("")}function xI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,wf(o)+1);if(!o||!(a=qt(a)))return o;var h=kn(o),p=yf(h,kn(a))+1;return Mr(h,0,p).join("")}function DI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(al,"");if(!o||!(a=qt(a)))return o;var h=kn(o),p=vf(h,kn(a));return Mr(h,p).join("")}function LI(o,a){var u=Y,h=G;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?qt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var _=kn(o);w=_.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var b=_?Mr(_,0,E).join(""):o.slice(0,E);if(p===t)return b+h;if(_&&(E+=b.length-E),su(p)){if(o.slice(E).search(p)){var x,D=b;for(p.global||(p=El(p.source,be(Bh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;b=b.slice(0,L===t?E:L)}}else if(o.indexOf(qt(p),E)!=E){var K=b.lastIndexOf(p);K>-1&&(b=b.slice(0,K))}return b+h}function BI(o){return o=be(o),o&&jw.test(o)?o.replace(xh,hT):o}var UI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),uu=cg("toUpperCase");function am(o,a,u){return o=be(o),a=u?t:a,a===t?sT(o)?mT(o):X_(o):o.match(a)||[]}var sm=fe(function(o,a){try{return zt(o,t,a)}catch(u){return au(u)?u:new se(u)}}),VI=lr(function(o,a){return ln(a,function(u){u=Wn(u),sr(o,u,ou(o[u],o))}),o});function FI(o){var a=o==null?0:o.length,u=Z();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new un(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(zt(w[0],this,h))return zt(w[1],this,h)}})}function HI(o){return hE(hn(o,v))}function du(o){return function(){return o}}function $I(o,a){return o==null||o!==o?a:o}var KI=ug(),zI=ug(!0);function Bt(o){return o}function hu(o){return Ff(typeof o=="function"?o:hn(o,v))}function WI(o){return $f(hn(o,v))}function qI(o,a){return Kf(o,hn(a,v))}var GI=fe(function(o,a){return function(u){return Fi(u,o,a)}}),jI=fe(function(o,a){return function(u){return Fi(o,u,a)}});function fu(o,a,u){var h=st(a),p=Za(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=Za(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,_=dr(o);return ln(p,function(E){var b=a[E];o[E]=b,_&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=xt(this.__actions__);return L.push({func:b,args:arguments,thisArg:o}),D.__chain__=x,D}return b.apply(o,Ir([this.value()],arguments))})}),o}function YI(){return ht._===this&&(ht._=_T),this}function gu(){}function JI(o){return o=de(o),fe(function(a){return zf(a,o)})}var QI=Wl(Ve),XI=Wl(df),ZI=Wl(pl);function cm(o){return Xl(o)?vl(Wn(o)):RE(o)}function ek(o){return function(a){return o==null?t:Zr(o,a)}}var tk=hg(),nk=hg(!0);function mu(){return[]}function pu(){return!1}function rk(){return{}}function ok(){return""}function ik(){return!0}function ak(o,a){if(o=de(o),o<1||o>Qe)return[];var u=Kt,h=wt(o,Kt);a=Z(a),o-=Kt;for(var p=wl(h,a);++u<o;)a(u);return p}function sk(o){return ce(o)?Ve(o,Wn):Gt(o)?[o]:xt(kg(be(o)))}function ck(o){var a=++CT;return be(o)+a}var lk=is(function(o,a){return o+a},0),uk=ql("ceil"),dk=is(function(o,a){return o/a},1),hk=ql("floor");function fk(o){return o&&o.length?Xa(o,Bt,Nl):t}function gk(o,a){return o&&o.length?Xa(o,Z(a,2),Nl):t}function mk(o){return gf(o,Bt)}function pk(o,a){return gf(o,Z(a,2))}function vk(o){return o&&o.length?Xa(o,Bt,Dl):t}function yk(o,a){return o&&o.length?Xa(o,Z(a,2),Dl):t}var Ck=is(function(o,a){return o*a},1),wk=ql("round"),_k=is(function(o,a){return o-a},0);function Tk(o){return o&&o.length?Cl(o,Bt):0}function Ek(o,a){return o&&o.length?Cl(o,Z(a,2)):0}return y.after=WA,y.ary=Vg,y.assign=Pb,y.assignIn=Zg,y.assignInWith=ys,y.assignWith=Mb,y.at=xb,y.before=Fg,y.bind=ou,y.bindAll=VI,y.bindKey=Hg,y.castArray=rb,y.chain=Lg,y.chunk=hS,y.compact=fS,y.concat=gS,y.cond=FI,y.conforms=HI,y.constant=du,y.countBy=TA,y.create=Db,y.curry=$g,y.curryRight=Kg,y.debounce=zg,y.defaults=Lb,y.defaultsDeep=Bb,y.defer=qA,y.delay=GA,y.difference=mS,y.differenceBy=pS,y.differenceWith=vS,y.drop=yS,y.dropRight=CS,y.dropRightWhile=wS,y.dropWhile=_S,y.fill=TS,y.filter=SA,y.flatMap=IA,y.flatMapDeep=kA,y.flatMapDepth=RA,y.flatten=Pg,y.flattenDeep=ES,y.flattenDepth=SS,y.flip=jA,y.flow=KI,y.flowRight=zI,y.fromPairs=AS,y.functions=zb,y.functionsIn=Wb,y.groupBy=OA,y.initial=IS,y.intersection=kS,y.intersectionBy=RS,y.intersectionWith=OS,y.invert=Gb,y.invertBy=jb,y.invokeMap=PA,y.iteratee=hu,y.keyBy=MA,y.keys=st,y.keysIn=Lt,y.map=hs,y.mapKeys=Jb,y.mapValues=Qb,y.matches=WI,y.matchesProperty=qI,y.memoize=gs,y.merge=Xb,y.mergeWith=em,y.method=GI,y.methodOf=jI,y.mixin=fu,y.negate=ms,y.nthArg=JI,y.omit=Zb,y.omitBy=eI,y.once=YA,y.orderBy=xA,y.over=QI,y.overArgs=JA,y.overEvery=XI,y.overSome=ZI,y.partial=iu,y.partialRight=Wg,y.partition=DA,y.pick=tI,y.pickBy=tm,y.property=cm,y.propertyOf=ek,y.pull=xS,y.pullAll=xg,y.pullAllBy=DS,y.pullAllWith=LS,y.pullAt=BS,y.range=tk,y.rangeRight=nk,y.rearg=QA,y.reject=UA,y.remove=US,y.rest=XA,y.reverse=nu,y.sampleSize=FA,y.set=rI,y.setWith=oI,y.shuffle=HA,y.slice=VS,y.sortBy=zA,y.sortedUniq=qS,y.sortedUniqBy=GS,y.split=II,y.spread=ZA,y.tail=jS,y.take=YS,y.takeRight=JS,y.takeRightWhile=QS,y.takeWhile=XS,y.tap=fA,y.throttle=eb,y.thru=ds,y.toArray=Jg,y.toPairs=nm,y.toPairsIn=rm,y.toPath=sk,y.toPlainObject=Xg,y.transform=iI,y.unary=tb,y.union=ZS,y.unionBy=eA,y.unionWith=tA,y.uniq=nA,y.uniqBy=rA,y.uniqWith=oA,y.unset=aI,y.unzip=ru,y.unzipWith=Dg,y.update=sI,y.updateWith=cI,y.values=Bo,y.valuesIn=lI,y.without=iA,y.words=am,y.wrap=nb,y.xor=aA,y.xorBy=sA,y.xorWith=cA,y.zip=lA,y.zipObject=uA,y.zipObjectDeep=dA,y.zipWith=hA,y.entries=nm,y.entriesIn=rm,y.extend=Zg,y.extendWith=ys,fu(y,y),y.add=lk,y.attempt=sm,y.camelCase=fI,y.capitalize=om,y.ceil=uk,y.clamp=uI,y.clone=ob,y.cloneDeep=ab,y.cloneDeepWith=sb,y.cloneWith=ib,y.conformsTo=cb,y.deburr=im,y.defaultTo=$I,y.divide=dk,y.endsWith=gI,y.eq=On,y.escape=mI,y.escapeRegExp=pI,y.every=EA,y.find=AA,y.findIndex=Og,y.findKey=Ub,y.findLast=bA,y.findLastIndex=Ng,y.findLastKey=Vb,y.floor=hk,y.forEach=Bg,y.forEachRight=Ug,y.forIn=Fb,y.forInRight=Hb,y.forOwn=$b,y.forOwnRight=Kb,y.get=cu,y.gt=lb,y.gte=ub,y.has=qb,y.hasIn=lu,y.head=Mg,y.identity=Bt,y.includes=NA,y.indexOf=bS,y.inRange=dI,y.invoke=Yb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=db,y.isArrayLike=Dt,y.isArrayLikeObject=je,y.isBoolean=hb,y.isBuffer=xr,y.isDate=fb,y.isElement=gb,y.isEmpty=mb,y.isEqual=pb,y.isEqualWith=vb,y.isError=au,y.isFinite=yb,y.isFunction=dr,y.isInteger=qg,y.isLength=ps,y.isMap=Gg,y.isMatch=Cb,y.isMatchWith=wb,y.isNaN=_b,y.isNative=Tb,y.isNil=Sb,y.isNull=Eb,y.isNumber=jg,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=qi,y.isRegExp=su,y.isSafeInteger=Ab,y.isSet=Yg,y.isString=vs,y.isSymbol=Gt,y.isTypedArray=Lo,y.isUndefined=bb,y.isWeakMap=Ib,y.isWeakSet=kb,y.join=NS,y.kebabCase=vI,y.last=gn,y.lastIndexOf=PS,y.lowerCase=yI,y.lowerFirst=CI,y.lt=Rb,y.lte=Ob,y.max=fk,y.maxBy=gk,y.mean=mk,y.meanBy=pk,y.min=vk,y.minBy=yk,y.stubArray=mu,y.stubFalse=pu,y.stubObject=rk,y.stubString=ok,y.stubTrue=ik,y.multiply=Ck,y.nth=MS,y.noConflict=YI,y.noop=gu,y.now=fs,y.pad=wI,y.padEnd=_I,y.padStart=TI,y.parseInt=EI,y.random=hI,y.reduce=LA,y.reduceRight=BA,y.repeat=SI,y.replace=AI,y.result=nI,y.round=wk,y.runInContext=A,y.sample=VA,y.size=$A,y.snakeCase=bI,y.some=KA,y.sortedIndex=FS,y.sortedIndexBy=HS,y.sortedIndexOf=$S,y.sortedLastIndex=KS,y.sortedLastIndexBy=zS,y.sortedLastIndexOf=WS,y.startCase=kI,y.startsWith=RI,y.subtract=_k,y.sum=Tk,y.sumBy=Ek,y.template=OI,y.times=ak,y.toFinite=hr,y.toInteger=de,y.toLength=Qg,y.toLower=NI,y.toNumber=mn,y.toSafeInteger=Nb,y.toString=be,y.toUpper=PI,y.trim=MI,y.trimEnd=xI,y.trimStart=DI,y.truncate=LI,y.unescape=BI,y.uniqueId=ck,y.upperCase=UI,y.upperFirst=uu,y.each=Bg,y.eachRight=Ug,y.first=Mg,fu(y,function(){var o={};return Kn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=wt(u,h.__takeCount__):h.__views__.push({size:wt(u,Kt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==yt||u==sn;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:Z(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),ln(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),ln(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},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(u){return Fi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ms(Z(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Kt)},Kn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(y.prototype[a]=function(){var _=this.__wrapped__,E=h?[1]:arguments,b=_ instanceof pe,x=E[0],D=b||ce(_),L=function(me){var ve=p.apply(y,Ir([me],E));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(b=D=!1);var K=this.__chain__,J=!!this.__actions__.length,ee=w&&!K,he=b&&!J;if(!w&&D){_=he?_:new pe(this);var te=o.apply(_,E);return te.__actions__.push({func:ds,args:[L],thisArg:t}),new dn(te,K)}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=Ba[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(_){return a.apply(ce(_)?_:[],p)})}}),Kn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[os(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=BT,pe.prototype.reverse=UT,pe.prototype.value=VT,y.prototype.at=gA,y.prototype.chain=mA,y.prototype.commit=pA,y.prototype.next=vA,y.prototype.plant=CA,y.prototype.reverse=wA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=_A,y.prototype.first=y.prototype.head,Mi&&(y.prototype[Mi]=yA),y},ko=pT();jr?((jr.exports=ko)._=ko,hl._=ko):ht._=ko}).call(BB)}(Zi,Zi.exports)),Zi.exports}var _i=UB();const Js=LB(_i),VB={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-CXJQSHqp.js")),meta:{requiresAuth:!1}},FB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-BsbXKpRe.js")),meta:{requiresAuth:!1}},{isAuthenticated:$p,handleRedirect:HB}=sw(),$B=jc();function KB(r,e){r.addRoute(VB),r.addRoute(FB),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!$p.value){ae.value=!0;try{await HB(e),await $B.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ae.value=!1}$p.value&&i()})}const{scope:Kp}=jc();function zB(){const r=Nh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Kp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Kp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ti(r){const e=zB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.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 WB(){const r=Ti("https://api.jplan.com.br/management/organization"),{error:e}=Fn();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 Fr=WB();function qB(){const r=Ti("https://api.jplan.com.br/management/branch/"),{error:e}=Fn();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 Hr=qB();function GB(){const r=Ti("https://api.jplan.com.br/management/team"),{error:e}=Fn();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}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.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 en=GB();async function jB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Ei(r,e,t=[]){const n=JB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>YB(s,i,t))}function YB(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(l=>s.includes(l))})}function JB(r){return Js.trim(r).toLowerCase().replace(/\s+/g," ")}let Ms=!1;const Wu=c.ref(!1),pn=c.ref([]),zp=c.ref([]),We=c.ref(null),Wo=c.ref([]),qo=c.ref([]),Pw=()=>{const r=Fn(),e=async T=>{Wu.value=!0;const I=T?`_active eq true and ${T}`:"_active eq true",O=await Fr.getOrgList(I);O&&(pn.value=O,Ms=!0),Wu.value=!1},t=async T=>{var I;return(I=pn.value)!=null&&I.length||await e(T),pn.value};function n(T){if(!pn.value)throw new Error("Data not stored yet");const I=Ei(pn.value,T,["name","description"]);return T!==""?I:pn.value}const i=T=>{zp.value=T},s=T=>{We.value=_i.cloneDeep(T)},l=async T=>await Fr.getOrg(T),d=async()=>{if(We.value!=null){const T=await Fr.createOrg(We.value);return T!=null&&T.data.created_at&&(r.success("Organization created."),Ms&&pn.value.push(T.data)),T==null?void 0:T.data}},f=async()=>{if(ae.value=!0,We.value&&We.value.__id){const T=await Fr.updateOrg(We.value);if(Ms&&(T!=null&&T.data.__id)){const I=pn.value.findIndex(O=>O.__id===T.data.__id);return I!==-1?(pn.value[I]=T.data,r.success("Organization updated.")):r.error("Unable to update item"),ae.value=!1,T.data}}else ae.value=!1,r.error("Unable to update item")},g=async()=>{if(ae.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),Ms){const T=pn.value.findIndex(I=>{var O;return I.__id===((O=We.value)==null?void 0:O.__id)});if(T!==-1)return pn.value.splice(T,1),We.value;r.error("Unable to deactivate organization")}ae.value=!1}};async function m(T){ae.value=!0;try{if(We.value&&We.value.__id){const I={...T,organization:We.value.__id};if(!await Hr.updateBranch(I)){ae.value=!1;return}if(Wo.value.findIndex(F=>F.__id===T.__id)===-1)return r.success("Branch added successfully."),Wo.value.push(I),I;r.info("Branch already added.")}}catch(I){console.error(I)}finally{ae.value=!1}}async function v(T){if(ae.value=!0,We.value&&We.value.__id){const I={...T,organization:null};if(!await Hr.updateBranch(I)){ae.value=!1;return}const $=Wo.value.findIndex(F=>F.__id===T.__id);if($!==-1)return Wo.value.splice($,1),ae.value=!1,Wo.value;throw new Error("Item not found to remove")}ae.value=!1}async function C(T){ae.value=!0;try{if(We.value&&We.value.__id){const I={...T,organization:We.value.__id};if(!await en.updateTeam(I)){ae.value=!1;return}if(qo.value.findIndex(F=>F.__id===T.__id)===-1)return r.success("Team added successfully."),qo.value.push(I),I;r.info("Team already added.")}}catch(I){console.error(I)}finally{ae.value=!1}}async function S(T){if(ae.value=!0,We.value&&We.value.__id){const I={...T,organization:null};if(!await en.updateTeam(I)){ae.value=!1;return}const $=qo.value.findIndex(F=>F.__id===T.__id);if($!==-1)return qo.value.splice($,1),ae.value=!1,qo.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:pn,loading:Wu,columns:zp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:Wo,orgTeams:qo,linkBranch:m,unlinkBranch:v,linkTeam:C,unlinkTeam:S}};let xs=!1;const vn=c.ref([]),Wp=c.ref([]),ot=c.ref(null),qu=c.ref(!1),Go=c.ref([]),Mw=()=>{const r=Fn(),e=async C=>{qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await en.getTeamList(S);T&&(vn.value=T,xs=!0),qu.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=Ei(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{Wp.value=C},s=C=>{ot.value=_i.cloneDeep(C)},l=async C=>await en.getTeam(C),d=async()=>{if(ot.value!=null){const C=await en.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),xs&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ae.value=!0,ot.value&&ot.value.__id){const C=await en.updateTeam(ot.value);if(xs&&(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(ot.value&&ot.value.created_at&&(await en.deactivateTeam(ot.value.__id),xs)){const C=vn.value.findIndex(S=>{var T;return S.__id===((T=ot.value)==null?void 0:T.__id)});if(C!==-1)return vn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ae.value=!0,(S=ot.value)!=null&&S.__id)if(Go.value.findIndex(I=>I.__id===C.__id)===-1)try{const I=await en.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),O=await en.getTeamUserList(ot.value.__id);return O&&(Go.value=O),r.success("User added successfully."),I}catch(I){console.error(I),r.error("Unable to add User.")}finally{ae.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.");ae.value=!1}async function v(C){if(ae.value=!0,ot.value&&ot.value.__id){const S=Go.value.findIndex(T=>T.__id===C);if(S!==-1)return await en.unlinkManageUser(ot.value.__id,C),Go.value.splice(S,1),ae.value=!1,Go.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:vn,loading:qu,columns:Wp,item:ot,usersTeam:Go,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:v}},xw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var O,$,F;const{openDialog:e}=va("global-scope__J-"),{user:t,domain:n,scope:i,session:s,setScope:l}=jc(),{getData:d,data:f}=Pw(),{getData:g,data:m}=Mw(),v=c.ref(!1);c.onBeforeMount(async()=>{v.value=!0,await d(),await g(),v.value=!1});const C=c.ref({scope_type:(O=i.value)==null?void 0:O.scope_type,organization:(($=i.value)==null?void 0:$.organization)??"org",team:(F=i.value)==null?void 0:F.team});function S(){var H,z,Q;C.value={...i.value,scope_type:(H=i.value)==null?void 0:H.scope_type,organization:((z=i.value)==null?void 0:z.organization)??"",team:(Q=i.value)==null?void 0:Q.team},e()}const T=c.computed(()=>{var H;switch((H=i.value)==null?void 0:H.scope_type){case"user":return N1;case"org":return R1;case"team":return P1;default:return O1}});async function I(){var H;((H=i.value)==null?void 0:H.scope_type)!==""&&l(C.value)}return(H,z)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:S,icon:"",class:"text-secondary ms-3",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(T.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(Ca),{loading:v.value,title:"Scope","dialog-id":"global-scope__J-","on-save":I},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>z[3]||(z[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>z[4]||(z[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(n)),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>z[5]||(z[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(s).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(kk.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:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>z[6]||(z[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>z[7]||(z[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>z[8]||(z[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>z[9]||(z[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(la.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>z[10]||(z[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ea.VSelect,{items:c.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"]),c.createVNode(la.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>z[11]||(z[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ea.VSelect,{items:c.unref(m),"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))}}),QB={},XB={class:"double-ring-spinner-container"};function ZB(r,e){return c.openBlock(),c.createElementBlock("div",XB,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Dw=pi(QB,[["render",ZB],["__scopeId","data-v-00d7a69f"]]),eU={key:0,class:"_jspinner-overlay_jj"},Lw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ae)?(c.openBlock(),c.createElementBlock("div",eU,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),tU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Fv,ColumnSettingsDialog:Vd,ConfirmDialog:Uv,ContextMenu:Hv,CopyButton:yc,DeleteAllBtn:xd,DotsMenu:Lv,DotsMenuV1:Bv,EditButton:Mv,FormHeadless:Cy,FormMetadata:Ic,GlobalScopeFilter:xw,GlobalSpinner:Lw,JAvatar:Vv,JBtn:tv,JDialog:Ca,JForm:vy,JIconBtn:ev,JSelect:fy,JTextArea:gy,JTextField:hy,ParentCard:Ec,SpinnerLoader:Dw,TabFormHeader:yy,TableAdvanced:jv,TableCard:Fd,TableCardsView:uy,TableHeader:Jv,UiTable:$v},Symbol.toStringTag,{value:"Module"})),nU=rR(),rU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Gu=!1;const ju=c.ref(!1),yn=c.ref([]),qp=c.ref([]),gt=c.ref(null),jo=c.ref([]),oU=()=>{const r=Fn(),e=async C=>{ju.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await Hr.getBranchList(S);T&&(yn.value=T,Gu=!0),ju.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=Ei(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{qp.value=C},s=C=>{gt.value=_i.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),Gu&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&>.value.__id){const C=await Hr.updateBranch(gt.value);if(Gu&&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(gt.value&>.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=yn.value.findIndex(S=>{var T;return S.__id===((T=gt.value)==null?void 0:T.__id)});if(C!==-1)return yn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ae.value=!0;try{if(gt.value&>.value.__id){const S={...C,branch:gt.value.__id};if(!await en.updateTeam(S)){r.error("Unable to link team");return}if(jo.value.findIndex(O=>O.__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{ae.value=!1}}async function v(C){if(ae.value=!0,gt.value&>.value.__id){const S={...C,branch:null};if(!await en.updateTeam(S))return;const I=jo.value.findIndex(O=>O.__id===C.__id);if(I!==-1)return jo.value.splice(I,1),ae.value=!1,jo.value;throw new Error("Item not found to remove")}ae.value=!1}return{data:yn,columns:qp,item:gt,loading:ju,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:jo,linkTeam:m,unlinkTeam:v}};function iU(){const r=Ti("https://api.jplan.com.br/management/division"),{error:e}=Fn();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=iU();let Yu=!1;const Ju=c.ref(!1),Cn=c.ref([]),Gp=c.ref([]),mt=c.ref(null),Yo=c.ref([]),aU=()=>{const r=Fn(),e=async C=>{Ju.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",T=await ei.getDivisionList(S);T&&(Cn.value=T,Yu=!0),Ju.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=Ei(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{Gp.value=C},s=C=>{mt.value=_i.cloneDeep(C)},l=async C=>await ei.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ei.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Yu&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ae.value=!0,mt.value&&mt.value.__id){const C=await ei.updateDivision(mt.value);if(Yu&&(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"),ae.value=!1,C}}else ae.value=!1,r.error("Unable to update item")},g=async()=>{if(ae.value=!0,mt.value&&mt.value.created_at){await ei.deactivateDivision(mt.value.__id);const C=Cn.value.findIndex(S=>{var T;return S.__id===((T=mt.value)==null?void 0:T.__id)});if(C!==-1)return Cn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ae.value=!1};async function m(C){ae.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.updateOrg(S)?(Yo.value.findIndex(O=>O.__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{ae.value=!1}}async function v(C){if(ae.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const I=Yo.value.findIndex(O=>O.__id===C.__id);if(I!==-1)Yo.value.splice(I,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ae.value=!1,Yo.value}return{data:Cn,columns:Gp,item:mt,loading:Ju,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Yo,linkDivision:m,unlinkDivision:v}};function sU(){const r=Ti("https://api.jplan.com.br/management/user"),{error:e}=Fn();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=sU();let Qu=!1,Xu=c.ref(!1);const wn=c.ref([]),jp=c.ref([]),_n=c.ref(null),cU=c.ref(null),lU=c.ref([]),uU=()=>{const r=Fn(),e=async m=>{Xu.value=!0;const v=m?`_active eq true and ${m}`:"_active eq true",C=await ti.getManageUserList(v);C&&(wn.value=C,Qu=!0),Xu.value=!1},t=async m=>(wn.value.length||await e(m),wn.value);function n(m){if(!wn.value)throw new Error("Data not stored yet");const v=Ei(wn.value,m,["name","description"]);return m!==""?v:wn.value}return{data:wn,loading:Xu,columns:jp,item:_n,filterData:n,__init__:e,getData:t,setColumns:m=>{jp.value=m},setItem:m=>{_n.value=_i.cloneDeep(m)},getItem:async m=>await ti.getManageUser(m),createItem:async()=>{if(_n.value!=null){const m=crypto.randomUUID(),v=await ti.createManageUser({..._n.value,__id:m});return v!=null&&v.data.created_at&&(r.success("User created."),Qu&&wn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(ae.value=!0,_n.value&&_n.value.created_at){const m=await ti.updateManageUser(_n.value);if(Qu&&(m!=null&&m.data)){const v=wn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(v!==-1)wn.value[v]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ae.value=!1,m==null?void 0:m.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 m=wn.value.findIndex(v=>{var C;return v.__id===((C=_n.value)==null?void 0:C.__id)});if(m!==-1)return wn.value.splice(m,1),_n.value}},userOrg:cU,userTeams:lU}},dU=r=>{r.use(nU),r.use(iO,rU),Object.entries(tU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Ok).forEach(([e,t])=>{r.provide(e,t)})},hU={install:dU};exports.ContextMenu=Hv;exports.EventBus=_c;exports.FormHeadless=Cy;exports.HttpCore=jB;exports.SpinnerLoader=Dw;exports.TableCardsView=uy;exports.TableHeader=Jv;exports.__spinner=ae;exports._export_sfc=pi;exports._sfc_main=$v;exports._sfc_main$1=jv;exports._sfc_main$10=xd;exports._sfc_main$11=Mv;exports._sfc_main$12=Ca;exports._sfc_main$13=ev;exports._sfc_main$14=fy;exports._sfc_main$15=gy;exports._sfc_main$16=hy;exports._sfc_main$17=vy;exports._sfc_main$18=yy;exports._sfc_main$19=Ec;exports._sfc_main$2=Vd;exports._sfc_main$20=Vv;exports._sfc_main$21=Fv;exports._sfc_main$22=xw;exports._sfc_main$23=Lw;exports._sfc_main$3=Fd;exports._sfc_main$4=Uv;exports._sfc_main$5=yc;exports._sfc_main$6=Lv;exports._sfc_main$7=Bv;exports._sfc_main$8=Ic;exports._sfc_main$9=tv;exports.branchInstance=Hr;exports.coreClient=Nh;exports.createToastInterface=ha;exports.dateFormat=Gv;exports.divisionInstance=ei;exports.filterQuery=Ei;exports.globalEventBus=Md;exports.index=hU;exports.manageUserInstance=ti;exports.msal=Nt;exports.orgInstance=Fr;exports.provideToast=oO;exports.scopedClient=Ti;exports.setupAuthGuard=KB;exports.teamInstance=en;exports.toastInjectionKey=Tc;exports.useBranchStore=oU;exports.useCustomizer=cR;exports.useDialog=va;exports.useDivisionStore=aU;exports.useManageUserStore=uU;exports.useOrganizationStore=Pw;exports.useSession=jc;exports.useTeamStore=Mw;exports.useToast=Fn;
|