jplan-pack 0.6.662 → 0.6.663
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-BaNIcGKw.mjs → AuthFailRoute-CWK6Gwwu.mjs} +4 -4
- package/dist/AuthFailRoute-SSauxOz3.js +1 -0
- package/dist/AuthRoute-Cznm_Gy3.js +1 -0
- package/dist/{AuthRoute-DPg0yjrV.mjs → AuthRoute-_9UDyyDg.mjs} +21 -21
- package/dist/index-EbnwL6yx.js +113 -0
- package/dist/index-qZysRG5O.mjs +28565 -0
- package/dist/index.css +2 -2
- package/dist/jplan-pack.cjs.js +1 -1
- package/dist/jplan-pack.es.js +1 -1
- package/dist/types/_auth/_dev/AuthFailRoute.d.ts +1 -1
- package/dist/types/_auth/_dev/AuthRoute.d.ts +1 -1
- package/dist/types/components/ConfirmDialog.d.ts +1 -2
- package/dist/types/components/ContextMenu.d.ts +2 -3
- package/dist/types/components/DotsMenu.d.ts +1 -2
- package/dist/types/components/JBtn.d.ts +1 -2
- package/dist/types/components/JDialog.d.ts +2 -3
- package/dist/types/components/JIconBtn.d.ts +1 -1
- package/dist/types/components/ParentCard.d.ts +1 -2
- package/dist/types/components/ReadOnlyField.d.ts +1 -1
- package/dist/types/components/SearchFilter.d.ts +5 -11
- package/dist/types/components/form/JForm.d.ts +19 -13
- package/dist/types/components/form/JSelect.d.ts +16 -5
- package/dist/types/components/form/JTextArea.d.ts +10 -4
- package/dist/types/components/form/JTextField.d.ts +15 -8
- package/dist/types/components/form/footer/CancelButton.d.ts +5 -4
- package/dist/types/components/form/footer/FormMetadata.d.ts +14 -10
- package/dist/types/components/form/footer/SaveButton.d.ts +5 -4
- package/dist/types/components/form/headless/FormHeadless.d.ts +17 -12
- package/dist/types/components/form/headless/TabFormHeader.d.ts +7 -5
- package/dist/types/components/icon/IconSet.d.ts +9 -3
- package/dist/types/components/menu/SubMenu.d.ts +24 -0
- package/dist/types/components/spinner/SpinnerLoader.d.ts +1 -1
- package/dist/types/components/table/UiTable.d.ts +5 -6
- package/dist/types/components/table/advanced/ColumnSettingsDialog.d.ts +2 -2
- package/dist/types/components/table/advanced/TableAdvanced.d.ts +5 -6
- package/dist/types/components/table/advanced/TableHeader.d.ts +13 -11
- package/dist/types/components/table/card/TableCard.d.ts +1 -1
- package/dist/types/components/table/card/TableCardsView.d.ts +12 -9
- package/dist/types/plugins/i18n/i18n.d.ts +19 -0
- package/dist/types/shims-vue.d.ts +1 -1
- package/dist/types/theme/vuetify.d.ts +1 -2
- package/package.json +3 -3
- package/dist/AuthFailRoute--FUhpbMD.js +0 -1
- package/dist/AuthRoute-Ct4gZcTn.js +0 -1
- package/dist/index-DudRfee8.js +0 -92
- package/dist/index-_9-7WBgF.mjs +0 -25023
@@ -0,0 +1,113 @@
|
|
1
|
+
"use strict";const l=require("vue"),lf=require("@vueuse/core"),ot=require("vuetify/lib/components/VBtn/index.mjs"),Fo=require("vuetify/components"),fl=require("vuetify/lib/components/VIcon/index.mjs"),Lt=require("vuetify/lib/components/VCard/index.mjs"),Jc=require("vuetify/lib/components/VDialog/index.mjs"),mi=require("vuetify/lib/components/VDivider/index.mjs"),Je=require("vuetify/lib/components/VGrid/index.mjs"),Ey=require("vuetify/lib/components/VAvatar/index.mjs"),uf=require("vuetify/lib/components/VImg/index.mjs"),Jt=require("vuetify/lib/components/VList/index.mjs"),df=require("vuetify/lib/components/VMenu/index.mjs"),wy=require("vuetify/lib/components/VDataTable/index.mjs"),mO=require("vuetify/lib/components/VTextField/index.mjs"),as=require("vuetify/lib/components/VSelect/index.mjs"),gO=require("vuetify/lib/components/VCheckbox/index.mjs"),pO=require("vuetify/lib/components/VChip/index.mjs"),gs=require("vuetify/lib/components/VLabel/index.mjs"),_O=require("vuetify/lib/components/VTextarea/index.mjs"),vO=require("vuetify/lib/components/VBtnToggle/index.mjs");function yO(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const CO=yO(lf),EO={key:0},wO={key:1},Ll=l.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(n){const e=n,{copy:t,copied:r,isSupported:i}=lf.useClipboard();return(a,c)=>{const d=l.resolveComponent("CopyIcon");return l.unref(i)?(l.openBlock(),l.createElementBlock("span",EO,[l.createVNode(ot.VBtn,{icon:"",variant:"text",onClick:c[0]||(c[0]=h=>l.unref(t)(e.contentToCopy)),size:a.size,color:a.color},{default:l.withCtx(()=>[l.createVNode(d,{size:a.size},null,8,["size"])]),_:1},8,["size","color"]),l.unref(r)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):l.createCommentVNode("",!0)])):(l.openBlock(),l.createElementBlock("p",wO,"Your browser does not support Clipboard API"))}}}),n_=l.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):l.createCommentVNode("",!0),typeof e.item=="string"?(l.openBlock(),l.createBlock(fl.VIcon,{key:1,color:e.color,size:e.size},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.item),1)]),_:1},8,["color","size"])):l.createCommentVNode("",!0)],64))}}),Ty=l.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(n){const e=n,t=l.useSlots();return(r,i)=>r.tooltip?(l.openBlock(),l.createBlock(l.unref(Fo.VTooltip),{key:0,text:r.tooltip,"open-delay":"1000"},{activator:l.withCtx(({props:a})=>[l.createVNode(l.unref(Fo.VBtn),l.mergeProps(a,{variant:r.variant,color:r.color,icon:"",size:r.size,onClick:i[0]||(i[0]=c=>r.$emit("click"))}),{default:l.withCtx(()=>[!l.unref(t).default&&a.icon?(l.openBlock(),l.createBlock(n_,{key:0,item:a.icon,size:a.size},null,8,["item","size"])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(l.openBlock(),l.createBlock(l.unref(Fo.VBtn),{key:1,variant:r.variant,color:r.color,icon:"",size:r.size,onClick:i[1]||(i[1]=a=>r.$emit("click"))},{default:l.withCtx(()=>[!l.unref(t).default&&e.icon?(l.openBlock(),l.createBlock(n_,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")]),_:3},8,["variant","color","size"]))}}),by=l.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(n){return(e,t)=>(l.openBlock(),l.createBlock(l.unref(Fo.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=r=>e.$emit("click"))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.text)+" ",1),l.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}});var Iy=!1;function Rc(n,e,t){return Array.isArray(n)?(n.length=Math.max(n.length,e),n.splice(e,1,t),t):(n[e]=t,t)}function Od(n,e){if(Array.isArray(n)){n.splice(e,1);return}delete n[e]}function TO(){return Ay().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ay(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const bO=typeof Proxy=="function",IO="devtools-plugin:setup",AO="plugin:settings:set";let Hi,_h;function SO(){var n;return Hi!==void 0||(typeof window<"u"&&window.performance?(Hi=!0,_h=window.performance):typeof globalThis<"u"&&(!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance)?(Hi=!0,_h=globalThis.perf_hooks.performance):Hi=!1),Hi}function kO(){return SO()?_h.now():Date.now()}class NO{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const r={};if(e.settings)for(const c in e.settings){const d=e.settings[c];r[c]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let a=Object.assign({},r);try{const c=localStorage.getItem(i),d=JSON.parse(c);Object.assign(a,d)}catch{}this.fallbacks={getSettings(){return a},setSettings(c){try{localStorage.setItem(i,JSON.stringify(c))}catch{}a=c},now(){return kO()}},t&&t.on(AO,(c,d)=>{c===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(c,d)=>this.target?this.target.on[d]:(...h)=>{this.onQueue.push({method:d,args:h})}}),this.proxiedTarget=new Proxy({},{get:(c,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...h)=>(this.targetQueue.push({method:d,args:h,resolve:()=>{}}),this.fallbacks[d](...h)):(...h)=>new Promise(m=>{this.targetQueue.push({method:d,args:h,resolve:m})})})}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 hf(n,e){const t=n,r=Ay(),i=TO(),a=bO&&t.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(IO,n,e);else{const c=a?new NO(t,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:c}),c&&e(c.proxiedTarget)}}/*!
|
2
|
+
* pinia v2.2.6
|
3
|
+
* (c) 2024 Eduardo San Martin Morote
|
4
|
+
* @license MIT
|
5
|
+
*/let es;const ps=n=>es=n,Sy=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ga(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Fr;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Fr||(Fr={}));const li=typeof window<"u",r_=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 RO(n,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}function ff(n,e,t){const r=new XMLHttpRequest;r.open("GET",n),r.responseType="blob",r.onload=function(){Ry(r.response,e,t)},r.onerror=function(){console.error("could not download file")},r.send()}function ky(n){const e=new XMLHttpRequest;e.open("HEAD",n,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Qc(n){try{n.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),n.dispatchEvent(t)}}const Xc=typeof navigator=="object"?navigator:{userAgent:""},Ny=/Macintosh/.test(Xc.userAgent)&&/AppleWebKit/.test(Xc.userAgent)&&!/Safari/.test(Xc.userAgent),Ry=li?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Ny?OO:"msSaveOrOpenBlob"in Xc?PO:MO:()=>{};function OO(n,e="download",t){const r=document.createElement("a");r.download=e,r.rel="noopener",typeof n=="string"?(r.href=n,r.origin!==location.origin?ky(r.href)?ff(n,e,t):(r.target="_blank",Qc(r)):Qc(r)):(r.href=URL.createObjectURL(n),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Qc(r)},0))}function PO(n,e="download",t){if(typeof n=="string")if(ky(n))ff(n,e,t);else{const r=document.createElement("a");r.href=n,r.target="_blank",setTimeout(function(){Qc(r)})}else navigator.msSaveOrOpenBlob(RO(n,t),e)}function MO(n,e,t,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof n=="string")return ff(n,e,t);const i=n.type==="application/octet-stream",a=/constructor/i.test(String(r_.HTMLElement))||"safari"in r_,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&a||Ny)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let h=d.result;if(typeof h!="string")throw r=null,new Error("Wrong reader.result type");h=c?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=h:location.assign(h),r=null},d.readAsDataURL(n)}else{const d=URL.createObjectURL(n);r?r.location.assign(d):location.href=d,r=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function xt(n,e){const t="🍍 "+n;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function mf(n){return"_a"in n&&"install"in n}function Oy(){if(!("clipboard"in navigator))return xt("Your browser doesn't support the Clipboard API","error"),!0}function Py(n){return n instanceof Error&&n.message.toLowerCase().includes("document is not focused")?(xt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function DO(n){if(!Oy())try{await navigator.clipboard.writeText(JSON.stringify(n.state.value)),xt("Global state copied to clipboard.")}catch(e){if(Py(e))return;xt("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function LO(n){if(!Oy())try{My(n,JSON.parse(await navigator.clipboard.readText())),xt("Global state pasted from clipboard.")}catch(e){if(Py(e))return;xt("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function xO(n){try{Ry(new Blob([JSON.stringify(n.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){xt("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let to;function UO(){to||(to=document.createElement("input"),to.type="file",to.accept=".json");function n(){return new Promise((e,t)=>{to.onchange=async()=>{const r=to.files;if(!r)return e(null);const i=r.item(0);return e(i?{text:await i.text(),file:i}:null)},to.oncancel=()=>e(null),to.onerror=t,to.click()})}return n}async function FO(n){try{const t=await UO()();if(!t)return;const{text:r,file:i}=t;My(n,JSON.parse(r)),xt(`Global state imported from "${i.name}".`)}catch(e){xt("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function My(n,e){for(const t in e){const r=n.state.value[t];r?Object.assign(r,e[t]):n.state.value[t]=e[t]}}function hr(n){return{_custom:{display:n}}}const Dy="🍍 Pinia (root)",Zc="_root";function BO(n){return mf(n)?{id:Zc,label:Dy}:{id:n.$id,label:n.$id}}function VO(n){if(mf(n)){const t=Array.from(n._s.keys()),r=n._s;return{state:t.map(a=>({editable:!0,key:a,value:n.state.value[a]})),getters:t.filter(a=>r.get(a)._getters).map(a=>{const c=r.get(a);return{editable:!1,key:a,value:c._getters.reduce((d,h)=>(d[h]=c[h],d),{})}})}}const e={state:Object.keys(n.$state).map(t=>({editable:!0,key:t,value:n.$state[t]}))};return n._getters&&n._getters.length&&(e.getters=n._getters.map(t=>({editable:!1,key:t,value:n[t]}))),n._customProperties.size&&(e.customProperties=Array.from(n._customProperties).map(t=>({editable:!0,key:t,value:n[t]}))),e}function HO(n){return n?Array.isArray(n)?n.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:hr(n.type),key:hr(n.key),oldValue:n.oldValue,newValue:n.newValue}:{}}function $O(n){switch(n){case Fr.direct:return"mutation";case Fr.patchFunction:return"$patch";case Fr.patchObject:return"$patch";default:return"unknown"}}let sa=!0;const el=[],ai="pinia:mutations",Xt="pinia",{assign:KO}=Object,ml=n=>"🍍 "+n;function WO(n,e){hf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:el,app:n},t=>{typeof t.now!="function"&&xt("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:ai,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Xt,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{DO(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await LO(e),t.sendInspectorTree(Xt),t.sendInspectorState(Xt)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{xO(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await FO(e),t.sendInspectorTree(Xt),t.sendInspectorState(Xt)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const i=e._s.get(r);i?typeof i.$reset!="function"?xt(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),xt(`Store "${r}" reset.`)):xt(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((r,i)=>{const a=r.componentInstance&&r.componentInstance.proxy;if(a&&a._pStores){const c=r.componentInstance.proxy._pStores;Object.values(c).forEach(d=>{r.instanceData.state.push({type:ml(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:l.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((h,m)=>(h[m]=d.$state[m],h),{})}),d._getters&&d._getters.length&&r.instanceData.state.push({type:ml(d.$id),key:"getters",editable:!1,value:d._getters.reduce((h,m)=>{try{h[m]=d[m]}catch(g){h[m]=g}return h},{})})})}}),t.on.getInspectorTree(r=>{if(r.app===n&&r.inspectorId===Xt){let i=[e];i=i.concat(Array.from(e._s.values())),r.rootNodes=(r.filter?i.filter(a=>"$id"in a?a.$id.toLowerCase().includes(r.filter.toLowerCase()):Dy.toLowerCase().includes(r.filter.toLowerCase())):i).map(BO)}}),globalThis.$pinia=e,t.on.getInspectorState(r=>{if(r.app===n&&r.inspectorId===Xt){const i=r.nodeId===Zc?e:e._s.get(r.nodeId);if(!i)return;i&&(r.nodeId!==Zc&&(globalThis.$store=l.toRaw(i)),r.state=VO(i))}}),t.on.editInspectorState((r,i)=>{if(r.app===n&&r.inspectorId===Xt){const a=r.nodeId===Zc?e:e._s.get(r.nodeId);if(!a)return xt(`store "${r.nodeId}" not found`,"error");const{path:c}=r;mf(a)?c.unshift("state"):(c.length!==1||!a._customProperties.has(c[0])||c[0]in a.$state)&&c.unshift("$state"),sa=!1,r.set(a,c,r.state.value),sa=!0}}),t.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const i=r.type.replace(/^🍍\s*/,""),a=e._s.get(i);if(!a)return xt(`store "${i}" not found`,"error");const{path:c}=r;if(c[0]!=="state")return xt(`Invalid path for store "${i}":
|
6
|
+
${c}
|
7
|
+
Only state can be modified.`);c[0]="$state",sa=!1,r.set(a,c,r.state.value),sa=!0}})})}function zO(n,e){el.includes(ml(e.$id))||el.push(ml(e.$id)),hf({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:el,app:n,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const r=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:c,onError:d,name:h,args:m})=>{const g=Ly++;t.addTimelineEvent({layerId:ai,event:{time:r(),title:"🛫 "+h,subtitle:"start",data:{store:hr(e.$id),action:hr(h),args:m},groupId:g}}),c(v=>{xo=void 0,t.addTimelineEvent({layerId:ai,event:{time:r(),title:"🛬 "+h,subtitle:"end",data:{store:hr(e.$id),action:hr(h),args:m,result:v},groupId:g}})}),d(v=>{xo=void 0,t.addTimelineEvent({layerId:ai,event:{time:r(),logType:"error",title:"💥 "+h,subtitle:"end",data:{store:hr(e.$id),action:hr(h),args:m,error:v},groupId:g}})})},!0),e._customProperties.forEach(c=>{l.watch(()=>l.unref(e[c]),(d,h)=>{t.notifyComponentUpdate(),t.sendInspectorState(Xt),sa&&t.addTimelineEvent({layerId:ai,event:{time:r(),title:"Change",subtitle:c,data:{newValue:d,oldValue:h},groupId:xo}})},{deep:!0})}),e.$subscribe(({events:c,type:d},h)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Xt),!sa)return;const m={time:r(),title:$O(d),data:KO({store:hr(e.$id)},HO(c)),groupId:xo};d===Fr.patchFunction?m.subtitle="⤵️":d===Fr.patchObject?m.subtitle="🧩":c&&!Array.isArray(c)&&(m.subtitle=c.type),c&&(m.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:c}}),t.addTimelineEvent({layerId:ai,event:m})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=l.markRaw(c=>{i(c),t.addTimelineEvent({layerId:ai,event:{time:r(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:hr(e.$id),info:hr("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Xt),t.sendInspectorState(Xt)});const{$dispose:a}=e;e.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(Xt),t.sendInspectorState(Xt),t.getSettings().logStoreChanges&&xt(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Xt),t.sendInspectorState(Xt),t.getSettings().logStoreChanges&&xt(`"${e.$id}" store installed 🆕`)})}let Ly=0,xo;function o_(n,e,t){const r=e.reduce((i,a)=>(i[a]=l.toRaw(n)[a],i),{});for(const i in r)n[i]=function(){const a=Ly,c=t?new Proxy(n,{get(...h){return xo=a,Reflect.get(...h)},set(...h){return xo=a,Reflect.set(...h)}}):n;xo=a;const d=r[i].apply(c,arguments);return xo=void 0,d}}function GO({app:n,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){o_(e,Object.keys(t.actions),e._isOptionsAPI);const r=e._hotUpdate;l.toRaw(e)._hotUpdate=function(i){r.apply(this,arguments),o_(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}zO(n,e)}}function qO(){const n=l.effectScope(!0),e=n.run(()=>l.ref({}));let t=[],r=[];const i=l.markRaw({install(a){ps(i),i._a=a,a.provide(Sy,i),a.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&li&&WO(a,i),r.forEach(c=>t.push(c)),r=[]},use(a){return!this._a&&!Iy?r.push(a):t.push(a),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&i.use(GO),i}function xy(n,e){for(const t in e){const r=e[t];if(!(t in n))continue;const i=n[t];ga(i)&&ga(r)&&!l.isRef(r)&&!l.isReactive(r)?n[t]=xy(i,r):n[t]=r}return n}const YO=()=>{};function i_(n,e,t,r=YO){n.push(e);const i=()=>{const a=n.indexOf(e);a>-1&&(n.splice(a,1),r())};return!t&&l.getCurrentScope()&&l.onScopeDispose(i),i}function $i(n,...e){n.slice().forEach(t=>{t(...e)})}const jO=n=>n(),a_=Symbol(),Pd=Symbol();function Uy(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,r)=>n.set(r,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const r=e[t],i=n[t];ga(i)&&ga(r)&&n.hasOwnProperty(t)&&!l.isRef(r)&&!l.isReactive(r)?n[t]=Uy(i,r):n[t]=r}return n}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Zn}=Object;function s_(n){return!!(l.isRef(n)&&n.effect)}function c_(n,e,t,r){const{state:i,actions:a,getters:c}=e,d=t.state.value[n];let h;function m(){!d&&(process.env.NODE_ENV==="production"||!r)&&(t.state.value[n]=i?i():{});const g=process.env.NODE_ENV!=="production"&&r?l.toRefs(l.ref(i?i():{}).value):l.toRefs(t.state.value[n]);return Zn(g,a,Object.keys(c||{}).reduce((v,p)=>(process.env.NODE_ENV!=="production"&&p in g&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${n}".`),v[p]=l.markRaw(l.computed(()=>{ps(t);const w=t._s.get(n);return c[p].call(w,w)})),v),{}))}return h=JO(n,m,e,t,r,!0),h}function JO(n,e,t={},r,i,a){let c;const d=Zn({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const h={deep:!0};process.env.NODE_ENV!=="production"&&!Iy&&(h.onTrigger=Q=>{m?w=Q:m==!1&&!D._hotUpdating&&(Array.isArray(w)?w.push(Q):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let m,g,v=[],p=[],w;const C=r.state.value[n],T=l.ref({});let k;function I(Q){let Z;m=g=!1,process.env.NODE_ENV!=="production"&&(w=[]),typeof Q=="function"?(Q(r.state.value[n]),Z={type:Fr.patchFunction,storeId:n,events:w}):(Uy(r.state.value[n],Q),Z={type:Fr.patchObject,payload:Q,storeId:n,events:w});const le=k=Symbol();l.nextTick().then(()=>{k===le&&(m=!0)}),g=!0,$i(v,Z,r.state.value[n])}const N=function(){const{state:Z}=t,le=Z?Z():{};this.$patch(Ue=>{Zn(Ue,le)})};function O(){c.stop(),v=[],p=[],r._s.delete(n)}const L=(Q,Z="")=>{if(a_ in Q)return Q[Pd]=Z,Q;const le=function(){ps(r);const Ue=Array.from(arguments),yt=[],nn=[];function Gt(Ct){yt.push(Ct)}function Pt(Ct){nn.push(Ct)}$i(p,{args:Ue,name:le[Pd],store:D,after:Gt,onError:Pt});let it;try{it=Q.apply(this&&this.$id===n?this:D,Ue)}catch(Ct){throw $i(nn,Ct),Ct}return it instanceof Promise?it.then(Ct=>($i(yt,Ct),Ct)).catch(Ct=>($i(nn,Ct),Promise.reject(Ct))):($i(yt,it),it)};return le[a_]=!0,le[Pd]=Z,le},$=l.markRaw({actions:{},getters:{},state:[],hotState:T}),G={_p:r,$id:n,$onAction:i_.bind(null,p),$patch:I,$reset:N,$subscribe(Q,Z={}){const le=i_(v,Q,Z.detached,()=>Ue()),Ue=c.run(()=>l.watch(()=>r.state.value[n],yt=>{(Z.flush==="sync"?g:m)&&Q({storeId:n,type:Fr.direct,events:w},yt)},Zn({},h,Z)));return le},$dispose:O},D=l.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&li?Zn({_hmrPayload:$,_customProperties:l.markRaw(new Set)},G):G);r._s.set(n,D);const ie=(r._a&&r._a.runWithContext||jO)(()=>r._e.run(()=>(c=l.effectScope()).run(()=>e({action:L}))));for(const Q in ie){const Z=ie[Q];if(l.isRef(Z)&&!s_(Z)||l.isReactive(Z))process.env.NODE_ENV!=="production"&&i&&Rc(T.value,Q,l.toRef(ie,Q)),process.env.NODE_ENV!=="production"&&$.state.push(Q);else if(typeof Z=="function"){const le=process.env.NODE_ENV!=="production"&&i?Z:L(Z,Q);ie[Q]=le,process.env.NODE_ENV!=="production"&&($.actions[Q]=Z),d.actions[Q]=Z}else process.env.NODE_ENV!=="production"&&s_(Z)&&($.getters[Q]=t.getters[Q],li&&(ie._getters||(ie._getters=l.markRaw([]))).push(Q))}if(Zn(D,ie),Zn(l.toRaw(D),ie),Object.defineProperty(D,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?T.value:r.state.value[n],set:Q=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");I(Z=>{Zn(Z,Q)})}}),process.env.NODE_ENV!=="production"&&(D._hotUpdate=l.markRaw(Q=>{D._hotUpdating=!0,Q._hmrPayload.state.forEach(Z=>{if(Z in D.$state){const le=Q.$state[Z],Ue=D.$state[Z];typeof le=="object"&&ga(le)&&ga(Ue)?xy(le,Ue):Q.$state[Z]=Ue}Rc(D,Z,l.toRef(Q.$state,Z))}),Object.keys(D.$state).forEach(Z=>{Z in Q.$state||Od(D,Z)}),m=!1,g=!1,r.state.value[n]=l.toRef(Q._hmrPayload,"hotState"),g=!0,l.nextTick().then(()=>{m=!0});for(const Z in Q._hmrPayload.actions){const le=Q[Z];Rc(D,Z,L(le,Z))}for(const Z in Q._hmrPayload.getters){const le=Q._hmrPayload.getters[Z],Ue=l.computed(()=>(ps(r),le.call(D,D)));Rc(D,Z,Ue)}Object.keys(D._hmrPayload.getters).forEach(Z=>{Z in Q._hmrPayload.getters||Od(D,Z)}),Object.keys(D._hmrPayload.actions).forEach(Z=>{Z in Q._hmrPayload.actions||Od(D,Z)}),D._hmrPayload=Q._hmrPayload,D._getters=Q._getters,D._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&li){const Q={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(Z=>{Object.defineProperty(D,Z,Zn({value:D[Z]},Q))})}return r._p.forEach(Q=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&li){const Z=c.run(()=>Q({store:D,app:r._a,pinia:r,options:d}));Object.keys(Z||{}).forEach(le=>D._customProperties.add(le)),Zn(D,Z)}else Zn(D,c.run(()=>Q({store:D,app:r._a,pinia:r,options:d})))}),process.env.NODE_ENV!=="production"&&D.$state&&typeof D.$state=="object"&&typeof D.$state.constructor=="function"&&!D.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
8
|
+
state: () => new MyClass()
|
9
|
+
Found in store "${D.$id}".`),C&&a&&t.hydrate&&t.hydrate(D.$state,C),m=!0,g=!0,D}/*! #__NO_SIDE_EFFECTS__ */function QO(n,e,t){let r,i;if(typeof n=="string")r=n,i=e;else if(i=n,r=n.id,process.env.NODE_ENV!=="production"&&typeof r!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function a(c,d){const h=l.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&es&&es._testing?null:c)||(h?l.inject(Sy,null):null),c&&ps(c),process.env.NODE_ENV!=="production"&&!es)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
|
+
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
11
|
+
This will fail in production.`);c=es,c._s.has(r)||(c_(r,i,c),process.env.NODE_ENV!=="production"&&(a._pinia=c));const m=c._s.get(r);if(process.env.NODE_ENV!=="production"&&d){const g="__hot:"+r,v=c_(g,Zn({},i),c,!0);d._hotUpdate(v),delete c.state.value[g],c._s.delete(g)}if(process.env.NODE_ENV!=="production"&&li){const g=l.getCurrentInstance();if(g&&g.proxy&&!d){const v=g.proxy,p="_pStores"in v?v._pStores:v._pStores={};p[r]=m}}return m}return a.$id=r,a}const XO=QO({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(n){this.mini_sidebar=n},SET_CUSTOMIZER_DRAWER(n){this.Customizer_drawer=n},SET_LAYOUT(n){this.setHorizontalLayout=n},SET_THEME(n){this.actTheme=n},SET_FONT(n){this.fontTheme=n}}}),Ki=l.ref({}),Ns=n=>{const e=l.computed(()=>n?Ki.value[n]||!1:Ki.value.default||!1),t=()=>{n?Ki.value[n]=!0:Ki.value.default=!0},r=()=>{n?Ki.value[n]=!1:Ki.value.default=!1};return l.onUnmounted(()=>{r()}),l.onMounted(()=>{r()}),{isDialogActive:e,openDialog:t,closeDialog:r}};var ZO=Object.defineProperty,l_=Object.getOwnPropertySymbols,e0=Object.prototype.hasOwnProperty,t0=Object.prototype.propertyIsEnumerable,u_=(n,e,t)=>e in n?ZO(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Fy=(n,e)=>{for(var t in e||(e={}))e0.call(e,t)&&u_(n,t,e[t]);if(l_)for(var t of l_(e))t0.call(e,t)&&u_(n,t,e[t]);return n},xl=n=>typeof n=="function",Ul=n=>typeof n=="string",By=n=>Ul(n)&&n.trim().length>0,n0=n=>typeof n=="number",ui=n=>typeof n>"u",_s=n=>typeof n=="object"&&n!==null,r0=n=>Br(n,"tag")&&By(n.tag),Vy=n=>window.TouchEvent&&n instanceof TouchEvent,Hy=n=>Br(n,"component")&&$y(n.component),o0=n=>xl(n)||_s(n),$y=n=>!ui(n)&&(Ul(n)||o0(n)||Hy(n)),d_=n=>_s(n)&&["height","width","right","left","top","bottom"].every(e=>n0(n[e])),Br=(n,e)=>(_s(n)||xl(n))&&e in n,i0=(n=>()=>n++)(0);function Md(n){return Vy(n)?n.targetTouches[0].clientX:n.clientX}function h_(n){return Vy(n)?n.targetTouches[0].clientY:n.clientY}var a0=n=>{ui(n.remove)?n.parentNode&&n.parentNode.removeChild(n):n.remove()},Rs=n=>Hy(n)?Rs(n.component):r0(n)?l.defineComponent({render(){return n}}):typeof n=="string"?n:l.toRaw(l.unref(n)),s0=n=>{if(typeof n=="string")return n;const e=Br(n,"props")&&_s(n.props)?n.props:{},t=Br(n,"listeners")&&_s(n.listeners)?n.listeners:{};return{component:Rs(n),props:e,listeners:t}},c0=()=>typeof window<"u",Fl=class{constructor(){this.allHandlers={}}getHandlers(n){return this.allHandlers[n]||[]}on(n,e){const t=this.getHandlers(n);t.push(e),this.allHandlers[n]=t}off(n,e){const t=this.getHandlers(n);t.splice(t.indexOf(e)>>>0,1)}emit(n,e){this.getHandlers(n).forEach(r=>r(e))}},l0=n=>["on","off","emit"].every(e=>Br(n,e)&&xl(n[e]));exports.TYPE=void 0;(function(n){n.SUCCESS="success",n.ERROR="error",n.WARNING="warning",n.INFO="info",n.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(n){n.TOP_LEFT="top-left",n.TOP_CENTER="top-center",n.TOP_RIGHT="top-right",n.BOTTOM_LEFT="bottom-left",n.BOTTOM_CENTER="bottom-center",n.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var Dn;(function(n){n.ADD="add",n.DISMISS="dismiss",n.UPDATE="update",n.CLEAR="clear",n.UPDATE_DEFAULTS="update_defaults"})(Dn||(Dn={}));var gr="Vue-Toastification",mr={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Ky={type:mr.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},tl={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:mr.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},vh={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Wy={transition:{type:[Object,String],default:`${gr}__bounce`}},u0={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:mr.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:mr.trueBoolean,pauseOnHover:mr.trueBoolean,closeOnClick:mr.trueBoolean,timeout:vh.timeout,hideProgressBar:vh.hideProgressBar,toastClassName:mr.classNames,bodyClassName:mr.classNames,icon:Ky.customIcon,closeButton:tl.component,closeButtonClassName:tl.classNames,showCloseButtonOnHover:tl.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Fl}},d0={id:{type:[String,Number],required:!0,default:0},type:mr.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},h0={container:{type:[Object,Function],default:()=>document.body},newestOnTop:mr.trueBoolean,maxToasts:{type:Number,default:20},transition:Wy.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:n=>n},filterToasts:{type:Function,default:n=>n},containerClassName:mr.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},co={CORE_TOAST:u0,TOAST:d0,CONTAINER:h0,PROGRESS_BAR:vh,ICON:Ky,TRANSITION:Wy,CLOSE_BUTTON:tl},zy=l.defineComponent({name:"VtProgressBar",props:co.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?`${gr}__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 f0(n,e){return l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(n.style),class:l.normalizeClass(n.cpClass)},null,6)}zy.render=f0;var m0=zy,Gy=l.defineComponent({name:"VtCloseButton",props:co.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Rs(this.component):"button"},classes(){const n=[`${gr}__close-button`];return this.showOnHover&&n.push("show-on-hover"),n.concat(this.classNames)}}}),g0=l.createTextVNode(" × ");function p0(n,e){return l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.buttonComponent),l.mergeProps({"aria-label":n.ariaLabel,class:n.classes},n.$attrs),{default:l.withCtx(()=>[g0]),_:1},16,["aria-label","class"])}Gy.render=p0;var _0=Gy,qy={},v0={"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"},y0=l.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),C0=[y0];function E0(n,e){return l.openBlock(),l.createElementBlock("svg",v0,C0)}qy.render=E0;var w0=qy,Yy={},T0={"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"},b0=l.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),I0=[b0];function A0(n,e){return l.openBlock(),l.createElementBlock("svg",T0,I0)}Yy.render=A0;var f_=Yy,jy={},S0={"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"},k0=l.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),N0=[k0];function R0(n,e){return l.openBlock(),l.createElementBlock("svg",S0,N0)}jy.render=R0;var O0=jy,Jy={},P0={"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"},M0=l.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),D0=[M0];function L0(n,e){return l.openBlock(),l.createElementBlock("svg",P0,D0)}Jy.render=L0;var x0=Jy,Qy=l.defineComponent({name:"VtIcon",props:co.ICON,computed:{customIconChildren(){return Br(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Ul(this.customIcon)?this.trimValue(this.customIcon):Br(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Br(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:$y(this.customIcon)?Rs(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:f_,[exports.TYPE.INFO]:f_,[exports.TYPE.SUCCESS]:w0,[exports.TYPE.ERROR]:x0,[exports.TYPE.WARNING]:O0}[this.type]},iconClasses(){const n=[`${gr}__icon`];return this.hasCustomIcon?n.concat(this.customIconClass):n}},methods:{trimValue(n,e=""){return By(n)?n.trim():e}}});function U0(n,e){return l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.component),{class:l.normalizeClass(n.iconClasses)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(n.customIconChildren),1)]),_:1},8,["class"])}Qy.render=U0;var F0=Qy,Xy=l.defineComponent({name:"VtToast",components:{ProgressBar:m0,CloseButton:_0,Icon:F0},inheritAttrs:!1,props:Object.assign({},co.CORE_TOAST,co.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const n=[`${gr}__toast`,`${gr}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&n.push("disable-transition"),this.rtl&&n.push(`${gr}__toast--rtl`),n},bodyClasses(){return[`${gr}__toast-${Ul(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 d_(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:Br,getVueComponentFromObj:Rs,closeToast(){this.eventBus.emit(Dn.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 n=this.$el;n.addEventListener("touchstart",this.onDragStart,{passive:!0}),n.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const n=this.$el;n.removeEventListener("touchstart",this.onDragStart),n.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(n){this.beingDragged=!0,this.dragPos={x:Md(n),y:h_(n)},this.dragStart=Md(n),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(n){this.beingDragged&&(n.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Md(n),y:h_(n)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,d_(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}))}}}),B0=["role"];function V0(n,e){const t=l.resolveComponent("Icon"),r=l.resolveComponent("CloseButton"),i=l.resolveComponent("ProgressBar");return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(n.classes),style:l.normalizeStyle(n.draggableStyle),onClick:e[0]||(e[0]=(...a)=>n.clickHandler&&n.clickHandler(...a)),onMouseenter:e[1]||(e[1]=(...a)=>n.hoverPause&&n.hoverPause(...a)),onMouseleave:e[2]||(e[2]=(...a)=>n.hoverPlay&&n.hoverPlay(...a))},[n.icon?(l.openBlock(),l.createBlock(t,{key:0,"custom-icon":n.icon,type:n.type},null,8,["custom-icon","type"])):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{role:n.accessibility.toastRole||"alert",class:l.normalizeClass(n.bodyClasses)},[typeof n.content=="string"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(n.content),1)],2112)):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.getVueComponentFromObj(n.content)),l.mergeProps({key:1,"toast-id":n.id},n.hasProp(n.content,"props")?n.content.props:{},l.toHandlers(n.hasProp(n.content,"listeners")?n.content.listeners:{}),{onCloseToast:n.closeToast}),null,16,["toast-id","onCloseToast"]))],10,B0),n.closeButton?(l.openBlock(),l.createBlock(r,{key:1,component:n.closeButton,"class-names":n.closeButtonClassName,"show-on-hover":n.showCloseButtonOnHover,"aria-label":n.accessibility.closeButtonLabel,onClick:l.withModifiers(n.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):l.createCommentVNode("v-if",!0),n.timeout?(l.openBlock(),l.createBlock(i,{key:2,"is-running":n.isRunning,"hide-progress-bar":n.hideProgressBar,timeout:n.timeout,onCloseToast:n.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):l.createCommentVNode("v-if",!0)],38)}Xy.render=V0;var H0=Xy,Zy=l.defineComponent({name:"VtTransition",props:co.TRANSITION,emits:["leave"],methods:{hasProp:Br,leave(n){n instanceof HTMLElement&&(n.style.left=n.offsetLeft+"px",n.style.top=n.offsetTop+"px",n.style.width=getComputedStyle(n).width,n.style.position="absolute")}}});function $0(n,e){return l.openBlock(),l.createBlock(l.TransitionGroup,{tag:"div","enter-active-class":n.transition.enter?n.transition.enter:`${n.transition}-enter-active`,"move-class":n.transition.move?n.transition.move:`${n.transition}-move`,"leave-active-class":n.transition.leave?n.transition.leave:`${n.transition}-leave-active`,onLeave:n.leave},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Zy.render=$0;var K0=Zy,eC=l.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:H0,VtTransition:K0},props:Object.assign({},co.CORE_TOAST,co.CONTAINER,co.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 n=this.eventBus;n.on(Dn.ADD,this.addToast),n.on(Dn.CLEAR,this.clearToasts),n.on(Dn.DISMISS,this.dismissToast),n.on(Dn.UPDATE,this.updateToast),n.on(Dn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(n){xl(n)&&(n=await n()),a0(this.$el),n.appendChild(this.$el)},setToast(n){ui(n.id)||(this.toasts[n.id]=n)},addToast(n){n.content=s0(n.content);const e=Object.assign({},this.defaults,n.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[n.type],n),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(n){const e=this.toasts[n];!ui(e)&&!ui(e.onClose)&&e.onClose(),delete this.toasts[n]},clearToasts(){Object.keys(this.toasts).forEach(n=>{this.dismissToast(n)})},getPositionToasts(n){const e=this.filteredToasts.filter(t=>t.position===n).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(n){ui(n.container)||this.setup(n.container),this.defaults=Object.assign({},this.defaults,n)},updateToast({id:n,options:e,create:t}){this.toasts[n]?(e.timeout&&e.timeout===this.toasts[n].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[n],e))):t&&this.addToast(Object.assign({},{id:n},e))},getClasses(n){return[`${gr}__container`,n].concat(this.defaults.containerClassName)}}});function W0(n,e){const t=l.resolveComponent("Toast"),r=l.resolveComponent("VtTransition");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.positions,i=>(l.openBlock(),l.createElementBlock("div",{key:i},[l.createVNode(r,{transition:n.defaults.transition,class:l.normalizeClass(n.getClasses(i))},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.getPositionToasts(i),a=>(l.openBlock(),l.createBlock(t,l.mergeProps({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}eC.render=W0;var z0=eC,m_=(n={},e=!0)=>{const t=n.eventBus=n.eventBus||new Fl;e&&l.nextTick(()=>{const a=l.createApp(z0,Fy({},n)),c=a.mount(document.createElement("div")),d=n.onMounted;if(ui(d)||d(c,a),n.shareAppContext){const h=n.shareAppContext;h===!0?console.warn(`[${gr}] App to share context with was not provided.`):(a._context.components=h._context.components,a._context.directives=h._context.directives,a._context.mixins=h._context.mixins,a._context.provides=h._context.provides,a.config.globalProperties=h.config.globalProperties)}});const r=(a,c)=>{const d=Object.assign({},{id:i0(),type:exports.TYPE.DEFAULT},c,{content:a});return t.emit(Dn.ADD,d),d.id};r.clear=()=>t.emit(Dn.CLEAR,void 0),r.updateDefaults=a=>{t.emit(Dn.UPDATE_DEFAULTS,a)},r.dismiss=a=>{t.emit(Dn.DISMISS,a)};function i(a,{content:c,options:d},h=!1){const m=Object.assign({},d,{content:c});t.emit(Dn.UPDATE,{id:a,options:m,create:h})}return r.update=i,r.success=(a,c)=>r(a,Object.assign({},c,{type:exports.TYPE.SUCCESS})),r.info=(a,c)=>r(a,Object.assign({},c,{type:exports.TYPE.INFO})),r.error=(a,c)=>r(a,Object.assign({},c,{type:exports.TYPE.ERROR})),r.warning=(a,c)=>r(a,Object.assign({},c,{type:exports.TYPE.WARNING})),r},G0=()=>{const n=()=>console.warn(`[${gr}] This plugin does not support SSR!`);return new Proxy(n,{get(){return n}})};function vs(n){return c0()?l0(n)?m_({eventBus:n},!1):m_(n,!0):G0()}var Bl=Symbol("VueToastification"),gf=new Fl,q0=(n,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=n);const t=vs(Fy({eventBus:gf},e));n.provide(Bl,t)},Y0=n=>{const e=vs(n);l.getCurrentInstance()&&l.provide(Bl,e)},Er=n=>{if(n)return vs(n);const e=l.getCurrentInstance()?l.inject(Bl,void 0):void 0;return e||vs(gf)},j0=q0;const _e=l.ref(!1),J0={class:"d-flex align-center"},Q0={key:1},X0={class:"ms-auto"},Os=l.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(n,{emit:e}){const t=n,r=e,i=l.ref(!1),{isDialogActive:a,closeDialog:c}=Ns(t.ddId);async function d(){try{await r("onCancel")}catch(m){console.error(m)}c()}async function h(){i.value=!0;try{await r("onSave")}catch(m){console.error(m)}i.value=!1,c()}return(m,g)=>{const v=l.resolveComponent("ExclamationCircleIcon");return l.openBlock(),l.createElementBlock(l.Fragment,null,[m.variant==="global"?(l.openBlock(),l.createBlock(Jc.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:l.unref(a),"onUpdate:modelValue":g[0]||(g[0]=p=>l.isRef(a)?a.value=p:null),"onClick:outside":d},{default:l.withCtx(()=>[l.createVNode(Lt.VCard,{rounded:"",loading:i.value},{default:l.withCtx(()=>[l.createVNode(Lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:l.withCtx(()=>[l.createElementVNode("div",J0,[m.$slots.title?l.renderSlot(m.$slots,"title",{key:0}):(l.openBlock(),l.createElementBlock("div",Q0,l.toDisplayString(t.title),1))]),l.createElementVNode("div",X0,[l.renderSlot(m.$slots,"heading-actions"),l.createVNode(ot.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),l.createVNode(mi.VDivider,{class:"mx-5"}),l.createVNode(Lt.VCardText,{class:"overflow-y-scroll"},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"default")]),_:3}),m.$slots.footer?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(mi.VDivider,{class:"mx-5 mt-2"}),l.createVNode(Lt.VCardActions,null,{default:l.withCtx(()=>[l.renderSlot(m.$slots,"footer")]),_:3})],64)):l.createCommentVNode("",!0),t.buttons?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(mi.VDivider,{class:"mx-5 mt-2"}),l.createVNode(Lt.VCardActions,null,{default:l.withCtx(()=>[m.$slots.metadata?(l.openBlock(),l.createBlock(Je.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"metadata")]),_:3})):l.createCommentVNode("",!0),l.createVNode(Je.VSpacer),l.createVNode(ot.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:l.withCtx(()=>g[3]||(g[3]=[l.createTextVNode(" Cancel")])),_:1}),l.createVNode(ot.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:h,loading:i.value},{default:l.withCtx(()=>g[4]||(g[4]=[l.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):l.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):l.createCommentVNode("",!0),m.variant==="confirm"?(l.openBlock(),l.createBlock(Jc.VDialog,{key:1,scrim:"background",width:t.width,modelValue:l.unref(a),"onUpdate:modelValue":g[1]||(g[1]=p=>l.isRef(a)?a.value=p:null),"onClick:outside":d},{default:l.withCtx(()=>[l.createVNode(Lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:l.withCtx(()=>[l.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:l.withCtx(()=>[l.createVNode(ot.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:l.withCtx(()=>[l.createVNode(Lt.VCardText,{class:"text-center mt-7"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.text),1)]),_:1}),l.createVNode(Lt.VCardActions,{class:"d-flex"},{default:l.withCtx(()=>[l.createVNode(ot.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:l.withCtx(()=>g[5]||(g[5]=[l.createTextVNode(" Cancel")])),_:1}),l.createVNode(ot.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:h},{default:l.withCtx(()=>g[6]||(g[6]=[l.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):l.createCommentVNode("",!0),m.variant==="empty"?(l.openBlock(),l.createBlock(Jc.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:l.unref(a),"onUpdate:modelValue":g[2]||(g[2]=p=>l.isRef(a)?a.value=p:null),"onClick:outside":d},{default:l.withCtx(()=>[l.renderSlot(m.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):l.createCommentVNode("",!0)],64)}}}),pf=l.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(n,{emit:e}){const{openDialog:t}=Ns("delete-all-__J"),r=e;return(i,a)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(Os,{"dd-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>r("removeAll")},null,8,["on-save"]),l.createVNode(ot.VBtn,{onClick:l.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:l.withCtx(()=>a[0]||(a[0]=[l.createTextVNode(" Delete")])),_:1},8,["onClick"])],64))}}),tC=l.defineComponent({__name:"EditButton",emits:["editAll"],setup(n,{emit:e}){const t=e;return(r,i)=>(l.openBlock(),l.createBlock(ot.VBtn,{onClick:i[0]||(i[0]=a=>t("editAll")),variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:l.withCtx(()=>i[1]||(i[1]=[l.createTextVNode(" Edit")])),_:1}))}});var Z0={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.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),l.createTextVNode(" "),l.createVNode("path",{d:"M3 3l18 18"},null),l.createTextVNode(" ")])}},eP={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" ")])}},tP={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" ")])}},nP={name:"EraserIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-eraser",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M18 13.3l-6.3 -6.3"},null),l.createTextVNode(" ")])}},rP={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 9v4"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 16v.01"},null),l.createTextVNode(" ")])}},oP={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.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),l.createTextVNode(" ")])}},iP={name:"GripVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-grip-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),l.createTextVNode(" ")])}},aP={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M12 7l0 6"},null),l.createTextVNode(" ")])}},sP={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.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),l.createTextVNode(" "),l.createVNode("path",{d:"M15 4v16"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M9 10l2 2l-2 2"},null),l.createTextVNode(" ")])}},cP={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),l.createTextVNode(" ")])}},lP={name:"SearchIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M21 21l-6 -6"},null),l.createTextVNode(" ")])}},uP={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const n=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||n,height:e.height||n};return l.createVNode("svg",l.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),[l.createTextVNode(" "),l.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),l.createTextVNode(" "),l.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),l.createTextVNode(" "),l.createVNode("path",{d:"M3 10h18"},null),l.createTextVNode(" "),l.createVNode("path",{d:"M10 3v18"},null),l.createTextVNode(" ")])}};const nC=l.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(n){return(e,t)=>(l.openBlock(),l.createBlock(l.unref(Fo.VMenu),{"close-on-content-click":!0},{activator:l.withCtx(({props:r})=>[l.createVNode(l.unref(Fo.VBtn),l.mergeProps({variant:e.variant},r,{icon:""}),{default:l.withCtx(()=>[e.orientation==="y"?(l.openBlock(),l.createBlock(l.unref(eP),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(l.openBlock(),l.createBlock(l.unref(tP),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:l.withCtx(()=>[l.renderSlot(e.$slots,"default")]),_:3}))}}),Vl=l.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(n){const e=n;return(t,r)=>(l.openBlock(),l.createBlock(Lt.VCard,{"min-height":t.height,height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:l.withCtx(()=>[e.title?(l.openBlock(),l.createBlock(Lt.VCardTitle,{key:0,class:"pa-0"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.title),1)]),_:1})):l.createCommentVNode("",!0),l.renderSlot(t.$slots,"default")]),_:3},8,["min-height","height","loading"]))}}),rC=l.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=n,r=l.ref(!1),i=l.ref(!1);l.onUnmounted(()=>{r.value=!1});const a=e;async function c(){try{await a("onCancel")}catch(h){console.error(h)}r.value=!1}async function d(){i.value=!0;try{await a("onSave")}catch(h){console.error(h)}i.value=!1,r.value=!1}return(h,m)=>(l.openBlock(),l.createBlock(Jc.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:l.withCtx(({isActive:g,props:v})=>[l.renderSlot(h.$slots,"button",l.normalizeProps(l.guardReactiveProps({isActive:g,props:v})))]),default:l.withCtx(({isActive:g})=>[l.createVNode(Lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:l.withCtx(()=>[l.createVNode(l.unref(rP),{color:"rgb(var(--v-theme-secondary))"})]),append:l.withCtx(()=>[l.createVNode(ot.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:c,variant:"plain"})]),default:l.withCtx(()=>[l.createVNode(Lt.VCardText,{class:"text-center mt-7"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.text),1)]),_:1}),l.createVNode(Lt.VCardActions,{class:"d-flex"},{default:l.withCtx(()=>[l.createVNode(ot.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:c},{default:l.withCtx(()=>m[0]||(m[0]=[l.createTextVNode(" Cancel ")])),_:1}),l.createVNode(ot.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:l.withCtx(()=>m[1]||(m[1]=[l.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),Dd="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",oC=l.defineComponent({__name:"JAvatar",props:{src:{}},setup(n){const e=n,t=l.ref(e.src),r=l.computed(()=>t.value||Dd);function i(){t.value=Dd}return(a,c)=>(l.openBlock(),l.createBlock(Ey.VAvatar,{size:"50"},{default:l.withCtx(()=>[l.createVNode(uf.VImg,{src:r.value,"lazy-src":Dd,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Ld="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",iC=l.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(n){const e=n,t=l.ref(e.img),r=l.computed(()=>t.value||Ld);function i(){t.value=Ld}return(a,c)=>(l.openBlock(),l.createBlock(Ey.VAvatar,{size:a.size},{default:l.withCtx(()=>[l.createVNode(uf.VImg,{src:r.value,"lazy-src":Ld,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),dP=l.defineComponent({__name:"ContextMenu",setup(n){const e=l.ref(!1),t=l.ref({x:0,y:0}),r=a=>{a.preventDefault(),t.value={x:a.clientX,y:a.clientY},e.value=!0},i=()=>{e.value=!1};return l.onMounted(()=>{document.addEventListener("click",i)}),l.onUnmounted(()=>{document.removeEventListener("click",i)}),(a,c)=>(l.openBlock(),l.createElementBlock("div",{onContextmenu:l.withModifiers(r,["right"]),class:"relative w-full h-full"},[l.renderSlot(a.$slots,"default",{},void 0,!0),l.createVNode(df.VMenu,{modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=d=>e.value=d),style:l.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:l.withCtx(()=>[l.createVNode(Jt.VList,null,{default:l.withCtx(()=>[l.renderSlot(a.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),Ta=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},aC=Ta(dP,[["__scopeId","data-v-a53b15af"]]),hP={class:"d-inline-flex"},sC=l.defineComponent({__name:"UiTable",props:l.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(n){const e=n,t=l.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(a=>a.checked)}),r=l.useModel(n,"selection");return(i,a)=>(l.openBlock(),l.createBlock(wy.VDataTable,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=c=>r.value=c),"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,height:"calc(100vh - 320px)",class:"customize-table"},{top:l.withCtx(()=>a[1]||(a[1]=[l.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":l.withCtx(({item:c})=>[l.renderSlot(i.$slots,"avatar",{item:c})]),"item.active":l.withCtx(({item:c})=>[l.renderSlot(i.$slots,"active",{item:c})]),"item.image":l.withCtx(({item:c})=>[l.renderSlot(i.$slots,"image",{item:c})]),"item.picture":l.withCtx(({item:c})=>[l.renderSlot(i.$slots,"picture",{item:c})]),"item.icon":l.withCtx(({item:c})=>[l.renderSlot(i.$slots,"icon",{item:c})]),"item.actions":l.withCtx(({item:c})=>[l.createElementVNode("div",hP,[l.renderSlot(i.$slots,"actions",{item:c})])]),"no-data":l.withCtx(()=>[!i.loading&&i.items.length===0?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(" This table is empty.")],64)):l.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),cC=6048e5,fP=864e5,g_=Symbol.for("constructDateFrom");function Vo(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&g_ in n?n[g_](e):n instanceof Date?new n.constructor(e):new Date(e)}function wr(n,e){return Vo(e||n,n)}let mP={};function Hl(){return mP}function ys(n,e){var d,h,m,g;const t=Hl(),r=(e==null?void 0:e.weekStartsOn)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((g=(m=t.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,i=wr(n,e==null?void 0:e.in),a=i.getDay(),c=(a<r?7:0)+a-r;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function gl(n,e){return ys(n,{...e,weekStartsOn:1})}function lC(n,e){const t=wr(n,e==null?void 0:e.in),r=t.getFullYear(),i=Vo(t,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=gl(i),c=Vo(t,0);c.setFullYear(r,0,4),c.setHours(0,0,0,0);const d=gl(c);return t.getTime()>=a.getTime()?r+1:t.getTime()>=d.getTime()?r:r-1}function p_(n){const e=wr(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function gP(n,...e){const t=Vo.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function __(n,e){const t=wr(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function pP(n,e,t){const[r,i]=gP(t==null?void 0:t.in,n,e),a=__(r),c=__(i),d=+a-p_(a),h=+c-p_(c);return Math.round((d-h)/fP)}function _P(n,e){const t=lC(n,e),r=Vo(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),gl(r)}function vP(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function yP(n){return!(!vP(n)&&typeof n!="number"||isNaN(+wr(n)))}function CP(n,e){const t=wr(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const EP={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"}},wP=(n,e,t)=>{let r;const i=EP[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function rr(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const TP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},IP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},AP={date:rr({formats:TP,defaultWidth:"full"}),time:rr({formats:bP,defaultWidth:"full"}),dateTime:rr({formats:IP,defaultWidth:"full"})},SP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kP=(n,e,t,r)=>SP[n];function wt(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const c=n.defaultFormattingWidth||n.defaultWidth,d=t!=null&&t.width?String(t.width):c;i=n.formattingValues[d]||n.formattingValues[c]}else{const c=n.defaultWidth,d=t!=null&&t.width?String(t.width):n.defaultWidth;i=n.values[d]||n.values[c]}const a=n.argumentCallback?n.argumentCallback(e):e;return i[a]}}const NP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},RP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OP={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"]},PP={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"]},MP={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"}},DP={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"}},LP=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},xP={ordinalNumber:LP,era:wt({values:NP,defaultWidth:"wide"}),quarter:wt({values:RP,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:OP,defaultWidth:"wide"}),day:wt({values:PP,defaultWidth:"wide"}),dayPeriod:wt({values:MP,defaultWidth:"wide",formattingValues:DP,defaultFormattingWidth:"wide"})};function Tt(n){return(e,t={})=>{const r=t.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=e.match(i);if(!a)return null;const c=a[0],d=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(d)?FP(d,v=>v.test(c)):UP(d,v=>v.test(c));let m;m=n.valueCallback?n.valueCallback(h):h,m=t.valueCallback?t.valueCallback(m):m;const g=e.slice(c.length);return{value:m,rest:g}}}function UP(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function FP(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function $l(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const i=r[0],a=e.match(n.parsePattern);if(!a)return null;let c=n.valueCallback?n.valueCallback(a[0]):a[0];c=t.valueCallback?t.valueCallback(c):c;const d=e.slice(i.length);return{value:c,rest:d}}}const BP=/^(\d+)(th|st|nd|rd)?/i,VP=/\d+/i,HP={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},$P={any:[/^b/i,/^(a|c)/i]},KP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WP={any:[/1/i,/2/i,/3/i,/4/i]},zP={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},GP={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]},qP={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},YP={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]},jP={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},JP={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}},QP={ordinalNumber:$l({matchPattern:BP,parsePattern:VP,valueCallback:n=>parseInt(n,10)}),era:Tt({matchPatterns:HP,defaultMatchWidth:"wide",parsePatterns:$P,defaultParseWidth:"any"}),quarter:Tt({matchPatterns:KP,defaultMatchWidth:"wide",parsePatterns:WP,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Tt({matchPatterns:zP,defaultMatchWidth:"wide",parsePatterns:GP,defaultParseWidth:"any"}),day:Tt({matchPatterns:qP,defaultMatchWidth:"wide",parsePatterns:YP,defaultParseWidth:"any"}),dayPeriod:Tt({matchPatterns:jP,defaultMatchWidth:"any",parsePatterns:JP,defaultParseWidth:"any"})},_f={code:"en-US",formatDistance:wP,formatLong:AP,formatRelative:kP,localize:xP,match:QP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function XP(n,e){const t=wr(n,e==null?void 0:e.in);return pP(t,CP(t))+1}function ZP(n,e){const t=wr(n,e==null?void 0:e.in),r=+gl(t)-+_P(t);return Math.round(r/cC)+1}function uC(n,e){var g,v,p,w;const t=wr(n,e==null?void 0:e.in),r=t.getFullYear(),i=Hl(),a=(e==null?void 0:e.firstWeekContainsDate)??((v=(g=e==null?void 0:e.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((w=(p=i.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,c=Vo((e==null?void 0:e.in)||n,0);c.setFullYear(r+1,0,a),c.setHours(0,0,0,0);const d=ys(c,e),h=Vo((e==null?void 0:e.in)||n,0);h.setFullYear(r,0,a),h.setHours(0,0,0,0);const m=ys(h,e);return+t>=+d?r+1:+t>=+m?r:r-1}function e1(n,e){var d,h,m,g;const t=Hl(),r=(e==null?void 0:e.firstWeekContainsDate)??((h=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??t.firstWeekContainsDate??((g=(m=t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,i=uC(n,e),a=Vo((e==null?void 0:e.in)||n,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),ys(a,e)}function t1(n,e){const t=wr(n,e==null?void 0:e.in),r=+ys(t,e)-+e1(t,e);return Math.round(r/cC)+1}function Ke(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const ko={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return Ke(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):Ke(t+1,2)},d(n,e){return Ke(n.getDate(),e.length)},a(n,e){const t=n.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(n,e){return Ke(n.getHours()%12||12,e.length)},H(n,e){return Ke(n.getHours(),e.length)},m(n,e){return Ke(n.getMinutes(),e.length)},s(n,e){return Ke(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return Ke(i,e.length)}},Wi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},v_={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return ko.y(n,e)},Y:function(n,e,t,r){const i=uC(n,r),a=i>0?i:1-i;if(e==="YY"){const c=a%100;return Ke(c,2)}return e==="Yo"?t.ordinalNumber(a,{unit:"year"}):Ke(a,e.length)},R:function(n,e){const t=lC(n);return Ke(t,e.length)},u:function(n,e){const t=n.getFullYear();return Ke(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Ke(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Ke(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return ko.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return Ke(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const i=t1(n,r);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Ke(i,e.length)},I:function(n,e,t){const r=ZP(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):Ke(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):ko.d(n,e)},D:function(n,e,t){const r=XP(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):Ke(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const i=n.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return Ke(a,2);case"eo":return t.ordinalNumber(a,{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(n,e,t,r){const i=n.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return Ke(a,e.length);case"co":return t.ordinalNumber(a,{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(n,e,t){const r=n.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return Ke(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const i=n.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(n,e,t){const r=n.getHours();let i;switch(r===12?i=Wi.noon:r===0?i=Wi.midnight:i=r/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(n,e,t){const r=n.getHours();let i;switch(r>=17?i=Wi.evening:r>=12?i=Wi.afternoon:r>=4?i=Wi.morning:i=Wi.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(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return ko.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):ko.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):Ke(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):Ke(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):ko.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):ko.s(n,e)},S:function(n,e){return ko.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return C_(r);case"XXXX":case"XX":return si(r);case"XXXXX":case"XXX":default:return si(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return C_(r);case"xxxx":case"xx":return si(r);case"xxxxx":case"xxx":default:return si(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+y_(r,":");case"OOOO":default:return"GMT"+si(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+y_(r,":");case"zzzz":default:return"GMT"+si(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return Ke(r,e.length)},T:function(n,e,t){return Ke(+n,e.length)}};function y_(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),a=r%60;return a===0?t+String(i):t+String(i)+e+Ke(a,2)}function C_(n,e){return n%60===0?(n>0?"-":"+")+Ke(Math.abs(n)/60,2):si(n,e)}function si(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Ke(Math.trunc(r/60),2),a=Ke(r%60,2);return t+i+e+a}const E_=(n,e)=>{switch(n){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"})}},dC=(n,e)=>{switch(n){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"})}},n1=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return E_(n,e);let a;switch(r){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;case"PPPP":default:a=e.dateTime({width:"full"});break}return a.replace("{{date}}",E_(r,e)).replace("{{time}}",dC(i,e))},r1={p:dC,P:n1},o1=/^D+$/,i1=/^Y+$/,a1=["D","DD","YY","YYYY"];function s1(n){return o1.test(n)}function c1(n){return i1.test(n)}function l1(n,e,t){const r=u1(n,e,t);if(console.warn(r),a1.includes(n))throw new RangeError(r)}function u1(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const d1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,h1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,f1=/^'([^]*?)'?$/,m1=/''/g,g1=/[a-zA-Z]/;function p1(n,e,t){var g,v,p,w,C,T,k,I;const r=Hl(),i=(t==null?void 0:t.locale)??r.locale??_f,a=(t==null?void 0:t.firstWeekContainsDate)??((v=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(p=r.locale)==null?void 0:p.options)==null?void 0:w.firstWeekContainsDate)??1,c=(t==null?void 0:t.weekStartsOn)??((T=(C=t==null?void 0:t.locale)==null?void 0:C.options)==null?void 0:T.weekStartsOn)??r.weekStartsOn??((I=(k=r.locale)==null?void 0:k.options)==null?void 0:I.weekStartsOn)??0,d=wr(n,t==null?void 0:t.in);if(!yP(d))throw new RangeError("Invalid time value");let h=e.match(h1).map(N=>{const O=N[0];if(O==="p"||O==="P"){const L=r1[O];return L(N,i.formatLong)}return N}).join("").match(d1).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:_1(N)};if(v_[O])return{isToken:!0,value:N};if(O.match(g1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});i.localize.preprocessor&&(h=i.localize.preprocessor(d,h));const m={firstWeekContainsDate:a,weekStartsOn:c,locale:i};return h.map(N=>{if(!N.isToken)return N.value;const O=N.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&c1(O)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&s1(O))&&l1(O,e,String(n));const L=v_[O[0]];return L(d,O,i.localize,m)}).join("")}function _1(n){const e=n.match(f1);return e?e[1].replace(m1,"'"):n}const w_={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"}}},v1=(n,e,t)=>{let r;const i=t!=null&&t.addSuffix?w_[n].withPreposition:w_[n].standalone;return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:"vor "+r:r},y1={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},C1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},E1={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},w1={date:rr({formats:y1,defaultWidth:"full"}),time:rr({formats:C1,defaultWidth:"full"}),dateTime:rr({formats:E1,defaultWidth:"full"})},T1={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},b1=(n,e,t,r)=>T1[n],I1={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},A1={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},yh={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"]},S1={narrow:yh.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:yh.wide},k1={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"]},N1={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"}},R1={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"}},O1=n=>Number(n)+".",P1={ordinalNumber:O1,era:wt({values:I1,defaultWidth:"wide"}),quarter:wt({values:A1,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:yh,formattingValues:S1,defaultWidth:"wide"}),day:wt({values:k1,defaultWidth:"wide"}),dayPeriod:wt({values:N1,defaultWidth:"wide",formattingValues:R1,defaultFormattingWidth:"wide"})},M1=/^(\d+)(\.)?/i,D1=/\d+/i,L1={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},x1={any:[/^v/i,/^n/i]},U1={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},F1={any:[/1/i,/2/i,/3/i,/4/i]},B1={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},V1={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]},H1={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},$1={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},K1={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},W1={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}},z1={ordinalNumber:$l({matchPattern:M1,parsePattern:D1,valueCallback:n=>parseInt(n)}),era:Tt({matchPatterns:L1,defaultMatchWidth:"wide",parsePatterns:x1,defaultParseWidth:"any"}),quarter:Tt({matchPatterns:U1,defaultMatchWidth:"wide",parsePatterns:F1,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Tt({matchPatterns:B1,defaultMatchWidth:"wide",parsePatterns:V1,defaultParseWidth:"any"}),day:Tt({matchPatterns:H1,defaultMatchWidth:"wide",parsePatterns:$1,defaultParseWidth:"any"}),dayPeriod:Tt({matchPatterns:K1,defaultMatchWidth:"wide",parsePatterns:W1,defaultParseWidth:"any"})},G1={code:"de",formatDistance:v1,formatLong:w1,formatRelative:b1,localize:P1,match:z1,options:{weekStartsOn:1,firstWeekContainsDate:4}},q1={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"}},Y1=(n,e,t)=>{let r;const i=q1[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+r:"il y a "+r:r},j1={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},J1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Q1={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},X1={date:rr({formats:j1,defaultWidth:"full"}),time:rr({formats:J1,defaultWidth:"full"}),dateTime:rr({formats:Q1,defaultWidth:"full"})},Z1={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},eM=(n,e,t,r)=>Z1[n],tM={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},nM={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"]},rM={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"]},oM={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"]},iM={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"}},aM=(n,e)=>{const t=Number(n),r=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let a;return t===1?a=r&&i.includes(r)?"ère":"er":a="ème",t+a},sM=["MMM","MMMM"],cM={preprocessor:(n,e)=>n.getDate()===1||!e.some(r=>r.isToken&&sM.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:aM,era:wt({values:tM,defaultWidth:"wide"}),quarter:wt({values:nM,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:rM,defaultWidth:"wide"}),day:wt({values:oM,defaultWidth:"wide"}),dayPeriod:wt({values:iM,defaultWidth:"wide"})},lM=/^(\d+)(ième|ère|ème|er|e)?/i,uM=/\d+/i,dM={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},hM={any:[/^av/i,/^ap/i]},fM={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},mM={any:[/1/i,/2/i,/3/i,/4/i]},gM={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},pM={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]},_M={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},vM={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]},yM={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},CM={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}},EM={ordinalNumber:$l({matchPattern:lM,parsePattern:uM,valueCallback:n=>parseInt(n)}),era:Tt({matchPatterns:dM,defaultMatchWidth:"wide",parsePatterns:hM,defaultParseWidth:"any"}),quarter:Tt({matchPatterns:fM,defaultMatchWidth:"wide",parsePatterns:mM,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Tt({matchPatterns:gM,defaultMatchWidth:"wide",parsePatterns:pM,defaultParseWidth:"any"}),day:Tt({matchPatterns:_M,defaultMatchWidth:"wide",parsePatterns:vM,defaultParseWidth:"any"}),dayPeriod:Tt({matchPatterns:yM,defaultMatchWidth:"any",parsePatterns:CM,defaultParseWidth:"any"})},wM={code:"fr",formatDistance:Y1,formatLong:X1,formatRelative:eM,localize:cM,match:EM,options:{weekStartsOn:1,firstWeekContainsDate:4}},TM={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"}},bM=(n,e,t)=>{let r;const i=TM[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+r:"há "+r:r},IM={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},AM={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},SM={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kM={date:rr({formats:IM,defaultWidth:"full"}),time:rr({formats:AM,defaultWidth:"full"}),dateTime:rr({formats:SM,defaultWidth:"full"})},NM={lastWeek:n=>{const e=n.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"},RM=(n,e,t,r)=>{const i=NM[n];return typeof i=="function"?i(e):i},OM={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},PM={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},MM={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"]},DM={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"]},LM={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"}},xM={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"}},UM=(n,e)=>{const t=Number(n);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},FM={ordinalNumber:UM,era:wt({values:OM,defaultWidth:"wide"}),quarter:wt({values:PM,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:MM,defaultWidth:"wide"}),day:wt({values:DM,defaultWidth:"wide"}),dayPeriod:wt({values:LM,defaultWidth:"wide",formattingValues:xM,defaultFormattingWidth:"wide"})},BM=/^(\d+)[ºªo]?/i,VM=/\d+/i,HM={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},$M={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},KM={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},WM={any:[/1/i,/2/i,/3/i,/4/i]},zM={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},GM={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]},qM={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},YM={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]},jM={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},JM={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}},QM={ordinalNumber:$l({matchPattern:BM,parsePattern:VM,valueCallback:n=>parseInt(n,10)}),era:Tt({matchPatterns:HM,defaultMatchWidth:"wide",parsePatterns:$M,defaultParseWidth:"any"}),quarter:Tt({matchPatterns:KM,defaultMatchWidth:"wide",parsePatterns:WM,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Tt({matchPatterns:zM,defaultMatchWidth:"wide",parsePatterns:GM,defaultParseWidth:"any"}),day:Tt({matchPatterns:qM,defaultMatchWidth:"wide",parsePatterns:YM,defaultParseWidth:"any"}),dayPeriod:Tt({matchPatterns:jM,defaultMatchWidth:"any",parsePatterns:JM,defaultParseWidth:"any"})},XM={code:"pt-BR",formatDistance:bM,formatLong:kM,formatRelative:RM,localize:FM,match:QM,options:{weekStartsOn:0,firstWeekContainsDate:1}},ZM={"en-US":_f,"pt-BR":XM,"fr-FR":wM,"de-DE":G1};function hC(n){if(!n)return"";const e=navigator.language,t=ZM[e]||_f;try{const r=typeof n=="string"||n===null?new Date(n||""):n;return isNaN(r.getTime())?"":p1(r,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(r){return console.error("Error formatting date:",r),""}}const Ch="https://app-files.jplan.com.br/pub/resources/assets/thumbs/empty_list.svg";function eD(n){const{clientX:e,clientY:t}=n,{innerWidth:r,innerHeight:i}=window;return{x:Math.min(e,r-350),y:Math.min(t,i-200)}}const tD={key:0,class:"d-flex mt-4 flex-column align-center justify-center w-100"},nD={key:1,class:"mt-4 h-100 rounded-sm"},rD={class:"d-inline-flex"},oD={class:"d-inline-flex"},iD={class:"d-inline-flex"},fC=l.defineComponent({__name:"TableAdvanced",props:l.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:l.mergeModels(["rowClick"],["update:selection"]),setup(n,{emit:e}){const t=[{value:50,title:"50"},{value:100,title:"100"},{value:500,title:"500"},{value:1e3,title:"1000"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}],r=n,i=e,a=l.computed(()=>r.headers?r.headers:r.columns?r.columns.filter(p=>p.checked):[]),c=l.useModel(n,"selection"),d=l.ref(!1),h=l.ref({x:0,y:0}),m=l.ref(null),g=async(p,{item:w})=>{p.preventDefault(),m.value=w,h.value=eD(p),d.value=!0};function v(p,{item:w}){var T;if(i("rowClick",w),!r.selectOnRowClick||!((T=c.value)!=null&&T.length))return;const C=c.value.findIndex(k=>k===w);return C!==-1?c.value.splice(C,1):c.value.push(w),w}return(p,w)=>!p.loading&&p.items.length===0?(l.openBlock(),l.createElementBlock("div",tD,[l.createVNode(uf.VImg,{"lazy-src":l.unref(Ch),src:l.unref(Ch),height:"600",width:"600"},null,8,["lazy-src","src"]),w[2]||(w[2]=l.createElementVNode("p",{class:"text-center text-body-1 w-100"},"No records found.",-1))])):(l.openBlock(),l.createElementBlock("div",nD,[l.createVNode(df.VMenu,{modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=C=>d.value=C),"close-on-content-click":!1,"min-width":"350",style:l.normalizeStyle({position:"fixed",left:`${h.value.x}px`,top:`${h.value.y}px`})},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"contextmenu",{item:m.value})]),_:3},8,["modelValue","style"]),l.createVNode(wy.VDataTable,{modelValue:c.value,"onUpdate:modelValue":w[1]||(w[1]=C=>c.value=C),"fixed-header":"","fixed-footer":"","items-per-page":"50",headers:a.value,items:p.items,"items-length":p.items.length,loading:p.loading||!1,"return-object":"","show-select":"","sort-by":p.sortBy,search:p.search,"filter-keys":p.filterKeys,height:"calc(100vh - 320px)",class:"customize-table bg-containerBg","onContextmenu:row":g,"onClick:row":v,"items-per-page-options":t},l.createSlots({"item.avatar":l.withCtx(({item:C})=>[l.renderSlot(p.$slots,"avatar",{item:C})]),"item.active":l.withCtx(({item:C})=>[l.renderSlot(p.$slots,"active",{item:C})]),"item.image":l.withCtx(({item:C})=>[l.renderSlot(p.$slots,"image",{item:C})]),"item.picture":l.withCtx(({item:C})=>[l.renderSlot(p.$slots,"picture",{item:C})]),"item.icon":l.withCtx(({item:C})=>[l.renderSlot(p.$slots,"icon",{item:C})]),"item.actions":l.withCtx(({item:C})=>[l.createElementVNode("div",oD,[l.renderSlot(p.$slots,"actions",{item:C})])]),"no-data":l.withCtx(()=>[w[3]||(w[3]=l.createElementVNode("p",null,"No results found.",-1))]),_:2},[l.renderList(p.customFields,C=>({name:`item.${C}`,fn:l.withCtx(({item:T})=>[l.createElementVNode("div",rD,[l.renderSlot(p.$slots,C,{item:T})])])})),l.renderList(p.dateFields,C=>({name:`item.${C}`,fn:l.withCtx(({item:T})=>[l.createElementVNode("div",iD,l.toDisplayString(l.unref(hC)(T[C])),1)])}))]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])]))}});/*!
|
12
|
+
* shared v11.1.3
|
13
|
+
* (c) 2025 kazuya kawaguchi
|
14
|
+
* Released under the MIT License.
|
15
|
+
*/const yr=typeof window<"u";let xn,pi;if(process.env.NODE_ENV!=="production"){const n=yr&&window.performance;n&&n.mark&&n.measure&&n.clearMarks&&n.clearMeasures&&(xn=e=>{n.mark(e)},pi=(e,t,r)=>{n.measure(e,t,r),n.clearMarks(t),n.clearMarks(r)})}const aD=/\{([0-9a-zA-Z]+)\}/g;function Kl(n,...e){return e.length===1&&De(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(aD,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const Wr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),sD=(n,e,t)=>cD({l:n,k:e,s:t}),cD=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),bt=n=>typeof n=="number"&&isFinite(n),lD=n=>vf(n)==="[object Date]",pa=n=>vf(n)==="[object RegExp]",Wl=n=>Se(n)&&Object.keys(n).length===0,Rt=Object.assign,uD=Object.create,Ge=(n=null)=>uD(n);let T_;const di=()=>T_||(T_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ge());function b_(n){return n.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const dD=Object.prototype.hasOwnProperty;function pr(n,e){return dD.call(n,e)}const vt=Array.isArray,je=n=>typeof n=="function",te=n=>typeof n=="string",xe=n=>typeof n=="boolean",De=n=>n!==null&&typeof n=="object",hD=n=>De(n)&&je(n.then)&&je(n.catch),mC=Object.prototype.toString,vf=n=>mC.call(n),Se=n=>vf(n)==="[object Object]",fD=n=>n==null?"":vt(n)||Se(n)&&n.toString===mC?JSON.stringify(n,null,2):String(n);function yf(n,e=""){return n.reduce((t,r,i)=>i===0?t+r:t+e+r,"")}const I_=2;function mD(n,e=0,t=n.length){const r=n.split(/\r?\n/);let i=0;const a=[];for(let c=0;c<r.length;c++)if(i+=r[c].length+1,i>=e){for(let d=c-I_;d<=c+I_||t>i;d++){if(d<0||d>=r.length)continue;const h=d+1;a.push(`${h}${" ".repeat(3-String(h).length)}| ${r[d]}`);const m=r[d].length;if(d===c){const g=e-(i-m)+1,v=Math.max(1,t>i?m-g:t-e);a.push(" | "+" ".repeat(g)+"^".repeat(v))}else if(d>c){if(t>i){const g=Math.max(Math.min(t-i,m),1);a.push(" | "+"^".repeat(g))}i+=m+1}}break}return a.join(`
|
16
|
+
`)}function Ko(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const A_={};function Cf(n){A_[n]||(A_[n]=!0,Ko(n))}function Ef(){const n=new Map;return{events:n,on(t,r){const i=n.get(t);i&&i.push(r)||n.set(t,[r])},off(t,r){const i=n.get(t);i&&i.splice(i.indexOf(r)>>>0,1)},emit(t,r){(n.get(t)||[]).slice().map(i=>i(r)),(n.get("*")||[]).slice().map(i=>i(t,r))}}}const Oc=n=>!De(n)||vt(n);function nl(n,e){if(Oc(n)||Oc(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:r,des:i}=t.pop();Object.keys(r).forEach(a=>{a!=="__proto__"&&(De(r[a])&&!De(i[a])&&(i[a]=Array.isArray(r[a])?[]:Ge()),Oc(i[a])||Oc(r[a])?i[a]=r[a]:t.push({src:r[a],des:i[a]}))})}}/*!
|
17
|
+
* message-compiler v11.1.3
|
18
|
+
* (c) 2025 kazuya kawaguchi
|
19
|
+
* Released under the MIT License.
|
20
|
+
*/function gD(n,e,t){return{line:n,column:e,offset:t}}function Eh(n,e,t){return{start:n,end:e}}const ve={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},pD=17,_D={[ve.EXPECTED_TOKEN]:"Expected token: '{0}'",[ve.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ve.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ve.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ve.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ve.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ve.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ve.EMPTY_PLACEHOLDER]:"Empty placeholder",[ve.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ve.INVALID_LINKED_FORMAT]:"Invalid linked format",[ve.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ve.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ve.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ve.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ve.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ve.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ba(n,e,t={}){const{domain:r,messages:i,args:a}=t,c=process.env.NODE_ENV!=="production"?Kl((i||_D)[n]||"",...a||[]):n,d=new SyntaxError(String(c));return d.code=n,e&&(d.location=e),d.domain=r,d}function vD(n){throw n}const yD=/<\/?[\w\s="/.':;#-\/]+>/,CD=n=>yD.test(n),no=" ",ED="\r",ln=`
|
21
|
+
`,wD="\u2028",TD="\u2029";function bD(n){const e=n;let t=0,r=1,i=1,a=0;const c=D=>e[D]===ED&&e[D+1]===ln,d=D=>e[D]===ln,h=D=>e[D]===TD,m=D=>e[D]===wD,g=D=>c(D)||d(D)||h(D)||m(D),v=()=>t,p=()=>r,w=()=>i,C=()=>a,T=D=>c(D)||h(D)||m(D)?ln:e[D],k=()=>T(t),I=()=>T(t+a);function N(){return a=0,g(t)&&(r++,i=0),c(t)&&t++,t++,i++,e[t]}function O(){return c(t+a)&&a++,a++,e[t+a]}function L(){t=0,r=1,i=1,a=0}function $(D=0){a=D}function G(){const D=t+a;for(;D!==t;)N();a=0}return{index:v,line:p,column:w,peekOffset:C,charAt:T,currentChar:k,currentPeek:I,next:N,peek:O,reset:L,resetPeek:$,skipToPeek:G}}const No=void 0,ID=".",S_="'",AD="tokenizer";function SD(n,e={}){const t=e.location!==!1,r=bD(n),i=()=>r.index(),a=()=>gD(r.line(),r.column(),r.index()),c=a(),d=i(),h={currentType:13,offset:d,startLoc:c,endLoc:c,lastType:13,lastOffset:d,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},m=()=>h,{onError:g}=e;function v(S,R,z,...re){const qe=m();if(R.column+=z,R.offset+=z,g){const Xe=t?Eh(qe.startLoc,R):null,Pe=ba(S,Xe,{domain:AD,args:re});g(Pe)}}function p(S,R,z){S.endLoc=a(),S.currentType=R;const re={type:R};return t&&(re.loc=Eh(S.startLoc,S.endLoc)),z!=null&&(re.value=z),re}const w=S=>p(S,13);function C(S,R){return S.currentChar()===R?(S.next(),R):(v(ve.EXPECTED_TOKEN,a(),0,R),"")}function T(S){let R="";for(;S.currentPeek()===no||S.currentPeek()===ln;)R+=S.currentPeek(),S.peek();return R}function k(S){const R=T(S);return S.skipToPeek(),R}function I(S){if(S===No)return!1;const R=S.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function N(S){if(S===No)return!1;const R=S.charCodeAt(0);return R>=48&&R<=57}function O(S,R){const{currentType:z}=R;if(z!==2)return!1;T(S);const re=I(S.currentPeek());return S.resetPeek(),re}function L(S,R){const{currentType:z}=R;if(z!==2)return!1;T(S);const re=S.currentPeek()==="-"?S.peek():S.currentPeek(),qe=N(re);return S.resetPeek(),qe}function $(S,R){const{currentType:z}=R;if(z!==2)return!1;T(S);const re=S.currentPeek()===S_;return S.resetPeek(),re}function G(S,R){const{currentType:z}=R;if(z!==7)return!1;T(S);const re=S.currentPeek()===".";return S.resetPeek(),re}function D(S,R){const{currentType:z}=R;if(z!==8)return!1;T(S);const re=I(S.currentPeek());return S.resetPeek(),re}function se(S,R){const{currentType:z}=R;if(!(z===7||z===11))return!1;T(S);const re=S.currentPeek()===":";return S.resetPeek(),re}function ie(S,R){const{currentType:z}=R;if(z!==9)return!1;const re=()=>{const Xe=S.currentPeek();return Xe==="{"?I(S.peek()):Xe==="@"||Xe==="|"||Xe===":"||Xe==="."||Xe===no||!Xe?!1:Xe===ln?(S.peek(),re()):Z(S,!1)},qe=re();return S.resetPeek(),qe}function Q(S){T(S);const R=S.currentPeek()==="|";return S.resetPeek(),R}function Z(S,R=!0){const z=(qe=!1,Xe="")=>{const Pe=S.currentPeek();return Pe==="{"||Pe==="@"||!Pe?qe:Pe==="|"?!(Xe===no||Xe===ln):Pe===no?(S.peek(),z(!0,no)):Pe===ln?(S.peek(),z(!0,ln)):!0},re=z();return R&&S.resetPeek(),re}function le(S,R){const z=S.currentChar();return z===No?No:R(z)?(S.next(),z):null}function Ue(S){const R=S.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function yt(S){return le(S,Ue)}function nn(S){const R=S.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function Gt(S){return le(S,nn)}function Pt(S){const R=S.charCodeAt(0);return R>=48&&R<=57}function it(S){return le(S,Pt)}function Ct(S){const R=S.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function rn(S){return le(S,Ct)}function It(S){let R="",z="";for(;R=it(S);)z+=R;return z}function Go(S){let R="";for(;;){const z=S.currentChar();if(z==="{"||z==="}"||z==="@"||z==="|"||!z)break;if(z===no||z===ln)if(Z(S))R+=z,S.next();else{if(Q(S))break;R+=z,S.next()}else R+=z,S.next()}return R}function Pa(S){k(S);let R="",z="";for(;R=Gt(S);)z+=R;return S.currentChar()===No&&v(ve.UNTERMINATED_CLOSING_BRACE,a(),0),z}function Ma(S){k(S);let R="";return S.currentChar()==="-"?(S.next(),R+=`-${It(S)}`):R+=It(S),S.currentChar()===No&&v(ve.UNTERMINATED_CLOSING_BRACE,a(),0),R}function br(S){return S!==S_&&S!==ln}function qo(S){k(S),C(S,"'");let R="",z="";for(;R=le(S,br);)R==="\\"?z+=Da(S):z+=R;const re=S.currentChar();return re===ln||re===No?(v(ve.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),re===ln&&(S.next(),C(S,"'")),z):(C(S,"'"),z)}function Da(S){const R=S.currentChar();switch(R){case"\\":case"'":return S.next(),`\\${R}`;case"u":return Ir(S,R,4);case"U":return Ir(S,R,6);default:return v(ve.UNKNOWN_ESCAPE_SEQUENCE,a(),0,R),""}}function Ir(S,R,z){C(S,R);let re="";for(let qe=0;qe<z;qe++){const Xe=rn(S);if(!Xe){v(ve.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${R}${re}${S.currentChar()}`);break}re+=Xe}return`\\${R}${re}`}function zr(S){return S!=="{"&&S!=="}"&&S!==no&&S!==ln}function La(S){k(S);let R="",z="";for(;R=le(S,zr);)z+=R;return z}function go(S){let R="",z="";for(;R=yt(S);)z+=R;return z}function po(S){const R=z=>{const re=S.currentChar();return re==="{"||re==="@"||re==="|"||re==="("||re===")"||!re||re===no?z:(z+=re,S.next(),R(z))};return R("")}function _o(S){k(S);const R=C(S,"|");return k(S),R}function Ft(S,R){let z=null;switch(S.currentChar()){case"{":return R.braceNest>=1&&v(ve.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),S.next(),z=p(R,2,"{"),k(S),R.braceNest++,z;case"}":return R.braceNest>0&&R.currentType===2&&v(ve.EMPTY_PLACEHOLDER,a(),0),S.next(),z=p(R,3,"}"),R.braceNest--,R.braceNest>0&&k(S),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),z;case"@":return R.braceNest>0&&v(ve.UNTERMINATED_CLOSING_BRACE,a(),0),z=Cn(S,R)||w(R),R.braceNest=0,z;default:{let qe=!0,Xe=!0,Pe=!0;if(Q(S))return R.braceNest>0&&v(ve.UNTERMINATED_CLOSING_BRACE,a(),0),z=p(R,1,_o(S)),R.braceNest=0,R.inLinked=!1,z;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return v(ve.UNTERMINATED_CLOSING_BRACE,a(),0),R.braceNest=0,Yo(S,R);if(qe=O(S,R))return z=p(R,4,Pa(S)),k(S),z;if(Xe=L(S,R))return z=p(R,5,Ma(S)),k(S),z;if(Pe=$(S,R))return z=p(R,6,qo(S)),k(S),z;if(!qe&&!Xe&&!Pe)return z=p(R,12,La(S)),v(ve.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,z.value),k(S),z;break}}return z}function Cn(S,R){const{currentType:z}=R;let re=null;const qe=S.currentChar();switch((z===7||z===8||z===11||z===9)&&(qe===ln||qe===no)&&v(ve.INVALID_LINKED_FORMAT,a(),0),qe){case"@":return S.next(),re=p(R,7,"@"),R.inLinked=!0,re;case".":return k(S),S.next(),p(R,8,".");case":":return k(S),S.next(),p(R,9,":");default:return Q(S)?(re=p(R,1,_o(S)),R.braceNest=0,R.inLinked=!1,re):G(S,R)||se(S,R)?(k(S),Cn(S,R)):D(S,R)?(k(S),p(R,11,go(S))):ie(S,R)?(k(S),qe==="{"?Ft(S,R)||re:p(R,10,po(S))):(z===7&&v(ve.INVALID_LINKED_FORMAT,a(),0),R.braceNest=0,R.inLinked=!1,Yo(S,R))}}function Yo(S,R){let z={type:13};if(R.braceNest>0)return Ft(S,R)||w(R);if(R.inLinked)return Cn(S,R)||w(R);switch(S.currentChar()){case"{":return Ft(S,R)||w(R);case"}":return v(ve.UNBALANCED_CLOSING_BRACE,a(),0),S.next(),p(R,3,"}");case"@":return Cn(S,R)||w(R);default:{if(Q(S))return z=p(R,1,_o(S)),R.braceNest=0,R.inLinked=!1,z;if(Z(S))return p(R,0,Go(S));break}}return z}function En(){const{currentType:S,offset:R,startLoc:z,endLoc:re}=h;return h.lastType=S,h.lastOffset=R,h.lastStartLoc=z,h.lastEndLoc=re,h.offset=i(),h.startLoc=a(),r.currentChar()===No?p(h,13):Yo(r,h)}return{nextToken:En,currentOffset:i,currentPosition:a,context:m}}const kD="parser",ND=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function RD(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||t,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function OD(n={}){const e=n.location!==!1,{onError:t}=n;function r(I,N,O,L,...$){const G=I.currentPosition();if(G.offset+=L,G.column+=L,t){const D=e?Eh(O,G):null,se=ba(N,D,{domain:kD,args:$});t(se)}}function i(I,N,O){const L={type:I};return e&&(L.start=N,L.end=N,L.loc={start:O,end:O}),L}function a(I,N,O,L){e&&(I.end=N,I.loc&&(I.loc.end=O))}function c(I,N){const O=I.context(),L=i(3,O.offset,O.startLoc);return L.value=N,a(L,I.currentOffset(),I.currentPosition()),L}function d(I,N){const O=I.context(),{lastOffset:L,lastStartLoc:$}=O,G=i(5,L,$);return G.index=parseInt(N,10),I.nextToken(),a(G,I.currentOffset(),I.currentPosition()),G}function h(I,N){const O=I.context(),{lastOffset:L,lastStartLoc:$}=O,G=i(4,L,$);return G.key=N,I.nextToken(),a(G,I.currentOffset(),I.currentPosition()),G}function m(I,N){const O=I.context(),{lastOffset:L,lastStartLoc:$}=O,G=i(9,L,$);return G.value=N.replace(ND,RD),I.nextToken(),a(G,I.currentOffset(),I.currentPosition()),G}function g(I){const N=I.nextToken(),O=I.context(),{lastOffset:L,lastStartLoc:$}=O,G=i(8,L,$);return N.type!==11?(r(I,ve.UNEXPECTED_EMPTY_LINKED_MODIFIER,O.lastStartLoc,0),G.value="",a(G,L,$),{nextConsumeToken:N,node:G}):(N.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,Rr(N)),G.value=N.value||"",a(G,I.currentOffset(),I.currentPosition()),{node:G})}function v(I,N){const O=I.context(),L=i(7,O.offset,O.startLoc);return L.value=N,a(L,I.currentOffset(),I.currentPosition()),L}function p(I){const N=I.context(),O=i(6,N.offset,N.startLoc);let L=I.nextToken();if(L.type===8){const $=g(I);O.modifier=$.node,L=$.nextConsumeToken||I.nextToken()}switch(L.type!==9&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(L)),L=I.nextToken(),L.type===2&&(L=I.nextToken()),L.type){case 10:L.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(L)),O.key=v(I,L.value||"");break;case 4:L.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(L)),O.key=h(I,L.value||"");break;case 5:L.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(L)),O.key=d(I,L.value||"");break;case 6:L.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(L)),O.key=m(I,L.value||"");break;default:{r(I,ve.UNEXPECTED_EMPTY_LINKED_KEY,N.lastStartLoc,0);const $=I.context(),G=i(7,$.offset,$.startLoc);return G.value="",a(G,$.offset,$.startLoc),O.key=G,a(O,$.offset,$.startLoc),{nextConsumeToken:L,node:O}}}return a(O,I.currentOffset(),I.currentPosition()),{node:O}}function w(I){const N=I.context(),O=N.currentType===1?I.currentOffset():N.offset,L=N.currentType===1?N.endLoc:N.startLoc,$=i(2,O,L);$.items=[];let G=null;do{const ie=G||I.nextToken();switch(G=null,ie.type){case 0:ie.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(ie)),$.items.push(c(I,ie.value||""));break;case 5:ie.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(ie)),$.items.push(d(I,ie.value||""));break;case 4:ie.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(ie)),$.items.push(h(I,ie.value||""));break;case 6:ie.value==null&&r(I,ve.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Rr(ie)),$.items.push(m(I,ie.value||""));break;case 7:{const Q=p(I);$.items.push(Q.node),G=Q.nextConsumeToken||null;break}}}while(N.currentType!==13&&N.currentType!==1);const D=N.currentType===1?N.lastOffset:I.currentOffset(),se=N.currentType===1?N.lastEndLoc:I.currentPosition();return a($,D,se),$}function C(I,N,O,L){const $=I.context();let G=L.items.length===0;const D=i(1,N,O);D.cases=[],D.cases.push(L);do{const se=w(I);G||(G=se.items.length===0),D.cases.push(se)}while($.currentType!==13);return G&&r(I,ve.MUST_HAVE_MESSAGES_IN_PLURAL,O,0),a(D,I.currentOffset(),I.currentPosition()),D}function T(I){const N=I.context(),{offset:O,startLoc:L}=N,$=w(I);return N.currentType===13?$:C(I,O,L,$)}function k(I){const N=SD(I,Rt({},n)),O=N.context(),L=i(0,O.offset,O.startLoc);return e&&L.loc&&(L.loc.source=I),L.body=T(N),n.onCacheKey&&(L.cacheKey=n.onCacheKey(I)),O.currentType!==13&&r(N,ve.UNEXPECTED_LEXICAL_ANALYSIS,O.lastStartLoc,0,I[O.offset]||""),a(L,N.currentOffset(),N.currentPosition()),L}return{parse:k}}function Rr(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function PD(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:a=>(t.helpers.add(a),a)}}function k_(n,e){for(let t=0;t<n.length;t++)wf(n[t],e)}function wf(n,e){switch(n.type){case 1:k_(n.cases,e),e.helper("plural");break;case 2:k_(n.items,e);break;case 6:{wf(n.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function MD(n,e={}){const t=PD(n);t.helper("normalize"),n.body&&wf(n.body,t);const r=t.context();n.helpers=Array.from(r.helpers)}function DD(n){const e=n.body;return e.type===2?N_(e):e.cases.forEach(t=>N_(t)),n}function N_(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<n.items.length;t++){const r=n.items[t];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===n.items.length){n.static=yf(e);for(let t=0;t<n.items.length;t++){const r=n.items[t];(r.type===3||r.type===9)&&delete r.value}}}}const LD="minifier";function ea(n){switch(n.t=n.type,n.type){case 0:{const e=n;ea(e.body),e.b=e.body,delete e.body;break}case 1:{const e=n,t=e.cases;for(let r=0;r<t.length;r++)ea(t[r]);e.c=t,delete e.cases;break}case 2:{const e=n,t=e.items;for(let r=0;r<t.length;r++)ea(t[r]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=n;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=n;ea(e.key),e.k=e.key,delete e.key,e.modifier&&(ea(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=n;e.i=e.index,delete e.index;break}case 4:{const e=n;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw ba(ve.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:LD,args:[n.type]})}delete n.type}const xD="parser";function UD(n,e){const{sourceMap:t,filename:r,breakLineCode:i,needIndent:a}=e,c=e.location!==!1,d={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};c&&n.loc&&(d.source=n.loc.source);const h=()=>d;function m(k,I){d.code+=k}function g(k,I=!0){const N=I?i:"";m(a?N+" ".repeat(k):N)}function v(k=!0){const I=++d.indentLevel;k&&g(I)}function p(k=!0){const I=--d.indentLevel;k&&g(I)}function w(){g(d.indentLevel)}return{context:h,push:m,indent:v,deindent:p,newline:w,helper:k=>`_${k}`,needIndent:()=>d.needIndent}}function FD(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),_a(n,e.key),e.modifier?(n.push(", "),_a(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function BD(n,e){const{helper:t,needIndent:r}=n;n.push(`${t("normalize")}([`),n.indent(r());const i=e.items.length;for(let a=0;a<i&&(_a(n,e.items[a]),a!==i-1);a++)n.push(", ");n.deindent(r()),n.push("])")}function VD(n,e){const{helper:t,needIndent:r}=n;if(e.cases.length>1){n.push(`${t("plural")}([`),n.indent(r());const i=e.cases.length;for(let a=0;a<i&&(_a(n,e.cases[a]),a!==i-1);a++)n.push(", ");n.deindent(r()),n.push("])")}}function HD(n,e){e.body?_a(n,e.body):n.push("null")}function _a(n,e){const{helper:t}=n;switch(e.type){case 0:HD(n,e);break;case 1:VD(n,e);break;case 2:BD(n,e);break;case 6:FD(n,e);break;case 8:n.push(JSON.stringify(e.value),e);break;case 7:n.push(JSON.stringify(e.value),e);break;case 5:n.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:n.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:n.push(JSON.stringify(e.value),e);break;case 3:n.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw ba(ve.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:xD,args:[e.type]})}}const $D=(n,e={})=>{const t=te(e.mode)?e.mode:"normal",r=te(e.filename)?e.filename:"message.intl",i=!!e.sourceMap,a=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
|
22
|
+
`,c=e.needIndent?e.needIndent:t!=="arrow",d=n.helpers||[],h=UD(n,{mode:t,filename:r,sourceMap:i,breakLineCode:a,needIndent:c});h.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),h.indent(c),d.length>0&&(h.push(`const { ${yf(d.map(v=>`${v}: _${v}`),", ")} } = ctx`),h.newline()),h.push("return "),_a(h,n),h.deindent(c),h.push("}"),delete n.helpers;const{code:m,map:g}=h.context();return{ast:n,code:m,map:g?g.toJSON():void 0}};function KD(n,e={}){const t=Rt({},e),r=!!t.jit,i=!!t.minify,a=t.optimize==null?!0:t.optimize,d=OD(t).parse(n);return r?(a&&DD(d),i&&ea(d),{ast:d,code:""}):(MD(d,t),$D(d,t))}/*!
|
23
|
+
* core-base v11.1.3
|
24
|
+
* (c) 2025 kazuya kawaguchi
|
25
|
+
* Released under the MIT License.
|
26
|
+
*/function WD(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(di().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(di().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function or(n){return De(n)&&Tf(n)===0&&(pr(n,"b")||pr(n,"body"))}const gC=["b","body"];function zD(n){return Wo(n,gC)}const pC=["c","cases"];function GD(n){return Wo(n,pC,[])}const _C=["s","static"];function qD(n){return Wo(n,_C)}const vC=["i","items"];function YD(n){return Wo(n,vC,[])}const yC=["t","type"];function Tf(n){return Wo(n,yC)}const CC=["v","value"];function Pc(n,e){const t=Wo(n,CC);if(t!=null)return t;throw Cs(e)}const EC=["m","modifier"];function jD(n){return Wo(n,EC)}const wC=["k","key"];function JD(n){const e=Wo(n,wC);if(e)return e;throw Cs(6)}function Wo(n,e,t){for(let r=0;r<e.length;r++){const i=e[r];if(pr(n,i)&&n[i]!=null)return n[i]}return t}const TC=[...gC,...pC,..._C,...vC,...wC,...EC,...CC,...yC];function Cs(n){return new Error(`unhandled node type: ${n}`)}function xd(n){return t=>QD(t,n)}function QD(n,e){const t=zD(e);if(t==null)throw Cs(0);if(Tf(t)===1){const a=GD(t);return n.plural(a.reduce((c,d)=>[...c,R_(n,d)],[]))}else return R_(n,t)}function R_(n,e){const t=qD(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const r=YD(e).reduce((i,a)=>[...i,wh(n,a)],[]);return n.normalize(r)}}function wh(n,e){const t=Tf(e);switch(t){case 3:return Pc(e,t);case 9:return Pc(e,t);case 4:{const r=e;if(pr(r,"k")&&r.k)return n.interpolate(n.named(r.k));if(pr(r,"key")&&r.key)return n.interpolate(n.named(r.key));throw Cs(t)}case 5:{const r=e;if(pr(r,"i")&&bt(r.i))return n.interpolate(n.list(r.i));if(pr(r,"index")&&bt(r.index))return n.interpolate(n.list(r.index));throw Cs(t)}case 6:{const r=e,i=jD(r),a=JD(r);return n.linked(wh(n,a),i?wh(n,i):void 0,n.type)}case 7:return Pc(e,t);case 8:return Pc(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const XD="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function ZD(n,e){e&&CD(n)&&Ko(Kl(XD,{source:n}))}const eL=n=>n;let Mc=Ge();function tL(n,e={}){let t=!1;const r=e.onError||vD;return e.onError=i=>{t=!0,r(i)},{...KD(n,e),detectError:t}}function nL(n,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&te(n)){const t=xe(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&ZD(n,t);const i=(e.onCacheKey||eL)(n),a=Mc[i];if(a)return a;const{ast:c,detectError:d}=tL(n,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),h=xd(c);return d?h:Mc[i]=h}else{if(process.env.NODE_ENV!=="production"&&!or(n))return Ko(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>n;const t=n.cacheKey;if(t){const r=Mc[t];return r||(Mc[t]=xd(n))}else return xd(n)}}let Es=null;function rL(n){Es=n}function oL(n,e,t){Es&&Es.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const iL=aL("function:translate");function aL(n){return e=>Es&&Es.emit(n,e)}const Zt={INVALID_ARGUMENT:pD,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},sL=24;function io(n){return ba(n,null,process.env.NODE_ENV!=="production"?{messages:cL}:void 0)}const cL={[Zt.INVALID_ARGUMENT]:"Invalid arguments",[Zt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Zt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Zt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Zt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Zt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Zt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function bf(n,e){return e.locale!=null?O_(e.locale):O_(n.locale)}let Ud;function O_(n){if(te(n))return n;if(je(n)){if(n.resolvedOnce&&Ud!=null)return Ud;if(n.constructor.name==="Function"){const e=n();if(hD(e))throw io(Zt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ud=e}else throw io(Zt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw io(Zt.NOT_SUPPORT_LOCALE_TYPE)}function lL(n,e,t){return[...new Set([t,...vt(e)?e:De(e)?Object.keys(e):te(e)?[e]:[t]])]}function bC(n,e,t){const r=te(t)?t:ws,i=n;i.__localeChainCache||(i.__localeChainCache=new Map);let a=i.__localeChainCache.get(r);if(!a){a=[];let c=[t];for(;vt(c);)c=P_(a,c,e);const d=vt(e)||!Se(e)?e:e.default?e.default:null;c=te(d)?[d]:d,vt(c)&&P_(a,c,!1),i.__localeChainCache.set(r,a)}return a}function P_(n,e,t){let r=!0;for(let i=0;i<e.length&&xe(r);i++){const a=e[i];te(a)&&(r=uL(n,e[i],t))}return r}function uL(n,e,t){let r;const i=e.split("-");do{const a=i.join("-");r=dL(n,a,t),i.splice(-1,1)}while(i.length&&r===!0);return r}function dL(n,e,t){let r=!1;if(!n.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const i=e.replace(/!/g,"");n.push(i),(vt(t)||Se(t))&&t[i]&&(r=t[i])}return r}const zo=[];zo[0]={w:[0],i:[3,0],"[":[4],o:[7]};zo[1]={w:[1],".":[2],"[":[4],o:[7]};zo[2]={w:[2],i:[3,0],0:[3,0]};zo[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};zo[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};zo[5]={"'":[4,0],o:8,l:[5,0]};zo[6]={'"':[4,0],o:8,l:[6,0]};const hL=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function fL(n){return hL.test(n)}function mL(n){const e=n.charCodeAt(0),t=n.charCodeAt(n.length-1);return e===t&&(e===34||e===39)?n.slice(1,-1):n}function gL(n){if(n==null)return"o";switch(n.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return n;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function pL(n){const e=n.trim();return n.charAt(0)==="0"&&isNaN(parseInt(n))?!1:fL(e)?mL(e):"*"+e}function _L(n){const e=[];let t=-1,r=0,i=0,a,c,d,h,m,g,v;const p=[];p[0]=()=>{c===void 0?c=d:c+=d},p[1]=()=>{c!==void 0&&(e.push(c),c=void 0)},p[2]=()=>{p[0](),i++},p[3]=()=>{if(i>0)i--,r=4,p[0]();else{if(i=0,c===void 0||(c=pL(c),c===!1))return!1;p[1]()}};function w(){const C=n[t+1];if(r===5&&C==="'"||r===6&&C==='"')return t++,d="\\"+C,p[0](),!0}for(;r!==null;)if(t++,a=n[t],!(a==="\\"&&w())){if(h=gL(a),v=zo[r],m=v[h]||v.l||8,m===8||(r=m[0],m[1]!==void 0&&(g=p[m[1]],g&&(d=a,g()===!1))))return;if(r===7)return e}}const M_=new Map;function vL(n,e){return De(n)?n[e]:null}function yL(n,e){if(!De(n))return null;let t=M_.get(e);if(t||(t=_L(e),t&&M_.set(e,t)),!t)return null;const r=t.length;let i=n,a=0;for(;a<r;){const c=t[a];if(TC.includes(c)&&or(i))return null;const d=i[c];if(d===void 0||je(i))return null;i=d,a++}return i}const pn={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},CL=8,EL={[pn.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[pn.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[pn.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[pn.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[pn.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[pn.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[pn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function _i(n,...e){return Kl(EL[n],...e)}const wL="11.1.3",zl=-1,ws="en-US",pl="",D_=n=>`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function TL(){return{upper:(n,e)=>e==="text"&&te(n)?n.toUpperCase():e==="vnode"&&De(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&te(n)?n.toLowerCase():e==="vnode"&&De(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&te(n)?D_(n):e==="vnode"&&De(n)&&"__v_isVNode"in n?D_(n.children):n}}let IC;function bL(n){IC=n}let AC;function IL(n){AC=n}let SC;function AL(n){SC=n}let kC=null;const SL=n=>{kC=n},kL=()=>kC;let NC=null;const L_=n=>{NC=n},NL=()=>NC;let x_=0;function RL(n={}){const e=je(n.onWarn)?n.onWarn:Ko,t=te(n.version)?n.version:wL,r=te(n.locale)||je(n.locale)?n.locale:ws,i=je(r)?ws:r,a=vt(n.fallbackLocale)||Se(n.fallbackLocale)||te(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:i,c=Se(n.messages)?n.messages:Fd(i),d=Se(n.datetimeFormats)?n.datetimeFormats:Fd(i),h=Se(n.numberFormats)?n.numberFormats:Fd(i),m=Rt(Ge(),n.modifiers,TL()),g=n.pluralRules||Ge(),v=je(n.missing)?n.missing:null,p=xe(n.missingWarn)||pa(n.missingWarn)?n.missingWarn:!0,w=xe(n.fallbackWarn)||pa(n.fallbackWarn)?n.fallbackWarn:!0,C=!!n.fallbackFormat,T=!!n.unresolving,k=je(n.postTranslation)?n.postTranslation:null,I=Se(n.processor)?n.processor:null,N=xe(n.warnHtmlMessage)?n.warnHtmlMessage:!0,O=!!n.escapeParameter,L=je(n.messageCompiler)?n.messageCompiler:IC;process.env.NODE_ENV!=="production"&&je(n.messageCompiler)&&Cf(_i(pn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const $=je(n.messageResolver)?n.messageResolver:AC||vL,G=je(n.localeFallbacker)?n.localeFallbacker:SC||lL,D=De(n.fallbackContext)?n.fallbackContext:void 0,se=n,ie=De(se.__datetimeFormatters)?se.__datetimeFormatters:new Map,Q=De(se.__numberFormatters)?se.__numberFormatters:new Map,Z=De(se.__meta)?se.__meta:{};x_++;const le={version:t,cid:x_,locale:r,fallbackLocale:a,messages:c,modifiers:m,pluralRules:g,missing:v,missingWarn:p,fallbackWarn:w,fallbackFormat:C,unresolving:T,postTranslation:k,processor:I,warnHtmlMessage:N,escapeParameter:O,messageCompiler:L,messageResolver:$,localeFallbacker:G,fallbackContext:D,onWarn:e,__meta:Z};return le.datetimeFormats=d,le.numberFormats=h,le.__datetimeFormatters=ie,le.__numberFormatters=Q,process.env.NODE_ENV!=="production"&&(le.__v_emitter=se.__v_emitter!=null?se.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&oL(le,t,Z),le}const Fd=n=>({[n]:Ge()});function Gl(n,e){return n instanceof RegExp?n.test(e):n}function RC(n,e){return n instanceof RegExp?n.test(e):n}function If(n,e,t,r,i){const{missing:a,onWarn:c}=n;if(process.env.NODE_ENV!=="production"){const d=n.__v_emitter;d&&d.emit("missing",{locale:t,key:e,type:i,groupId:`${i}:${e}`})}if(a!==null){const d=a(n,t,e,i);return te(d)?d:e}else return process.env.NODE_ENV!=="production"&&RC(r,e)&&c(_i(pn.NOT_FOUND_KEY,{key:e,locale:t})),e}function Xa(n,e,t){const r=n;r.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function OC(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function OL(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let r=t+1;r<e.length;r++)if(OC(n,e[r]))return!0;return!1}const U_=typeof Intl<"u",PC={dateTimeFormat:U_&&typeof Intl.DateTimeFormat<"u",numberFormat:U_&&typeof Intl.NumberFormat<"u"};function F_(n,...e){const{datetimeFormats:t,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:c}=n,{__datetimeFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!PC.dateTimeFormat)return a(_i(pn.CANNOT_FORMAT_DATE)),pl;const[h,m,g,v]=Th(...e),p=xe(g.missingWarn)?g.missingWarn:n.missingWarn,w=xe(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=bf(n,g),k=c(n,i,T);if(!te(h)||h==="")return new Intl.DateTimeFormat(T,v).format(m);let I={},N,O=null,L=T,$=null;const G="datetime format";for(let ie=0;ie<k.length;ie++){if(N=$=k[ie],process.env.NODE_ENV!=="production"&&T!==N&&Gl(w,h)&&a(_i(pn.FALLBACK_TO_DATE_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const Q=n.__v_emitter;Q&&Q.emit("fallback",{type:G,key:h,from:L,to:$,groupId:`${G}:${h}`})}if(I=t[N]||{},O=I[h],Se(O))break;If(n,h,N,p,G),L=$}if(!Se(O)||!te(N))return r?zl:h;let D=`${N}__${h}`;Wl(v)||(D=`${D}__${JSON.stringify(v)}`);let se=d.get(D);return se||(se=new Intl.DateTimeFormat(N,Rt({},O,v)),d.set(D,se)),C?se.formatToParts(m):se.format(m)}const MC=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Th(...n){const[e,t,r,i]=n,a=Ge();let c=Ge(),d;if(te(e)){const h=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!h)throw io(Zt.INVALID_ISO_DATE_ARGUMENT);const m=h[3]?h[3].trim().startsWith("T")?`${h[1].trim()}${h[3].trim()}`:`${h[1].trim()}T${h[3].trim()}`:h[1].trim();d=new Date(m);try{d.toISOString()}catch{throw io(Zt.INVALID_ISO_DATE_ARGUMENT)}}else if(lD(e)){if(isNaN(e.getTime()))throw io(Zt.INVALID_DATE_ARGUMENT);d=e}else if(bt(e))d=e;else throw io(Zt.INVALID_ARGUMENT);return te(t)?a.key=t:Se(t)&&Object.keys(t).forEach(h=>{MC.includes(h)?c[h]=t[h]:a[h]=t[h]}),te(r)?a.locale=r:Se(r)&&(c=r),Se(i)&&(c=i),[a.key||"",d,a,c]}function B_(n,e,t){const r=n;for(const i in t){const a=`${e}__${i}`;r.__datetimeFormatters.has(a)&&r.__datetimeFormatters.delete(a)}}function V_(n,...e){const{numberFormats:t,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:c}=n,{__numberFormatters:d}=n;if(process.env.NODE_ENV!=="production"&&!PC.numberFormat)return a(_i(pn.CANNOT_FORMAT_NUMBER)),pl;const[h,m,g,v]=bh(...e),p=xe(g.missingWarn)?g.missingWarn:n.missingWarn,w=xe(g.fallbackWarn)?g.fallbackWarn:n.fallbackWarn,C=!!g.part,T=bf(n,g),k=c(n,i,T);if(!te(h)||h==="")return new Intl.NumberFormat(T,v).format(m);let I={},N,O=null,L=T,$=null;const G="number format";for(let ie=0;ie<k.length;ie++){if(N=$=k[ie],process.env.NODE_ENV!=="production"&&T!==N&&Gl(w,h)&&a(_i(pn.FALLBACK_TO_NUMBER_FORMAT,{key:h,target:N})),process.env.NODE_ENV!=="production"&&T!==N){const Q=n.__v_emitter;Q&&Q.emit("fallback",{type:G,key:h,from:L,to:$,groupId:`${G}:${h}`})}if(I=t[N]||{},O=I[h],Se(O))break;If(n,h,N,p,G),L=$}if(!Se(O)||!te(N))return r?zl:h;let D=`${N}__${h}`;Wl(v)||(D=`${D}__${JSON.stringify(v)}`);let se=d.get(D);return se||(se=new Intl.NumberFormat(N,Rt({},O,v)),d.set(D,se)),C?se.formatToParts(m):se.format(m)}const DC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function bh(...n){const[e,t,r,i]=n,a=Ge();let c=Ge();if(!bt(e))throw io(Zt.INVALID_ARGUMENT);const d=e;return te(t)?a.key=t:Se(t)&&Object.keys(t).forEach(h=>{DC.includes(h)?c[h]=t[h]:a[h]=t[h]}),te(r)?a.locale=r:Se(r)&&(c=r),Se(i)&&(c=i),[a.key||"",d,a,c]}function H_(n,e,t){const r=n;for(const i in t){const a=`${e}__${i}`;r.__numberFormatters.has(a)&&r.__numberFormatters.delete(a)}}const PL=n=>n,ML=n=>"",DL="text",LL=n=>n.length===0?"":yf(n),xL=fD;function $_(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function UL(n){const e=bt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(bt(n.named.count)||bt(n.named.n))?bt(n.named.count)?n.named.count:bt(n.named.n)?n.named.n:e:e}function FL(n,e){e.count||(e.count=n),e.n||(e.n=n)}function BL(n={}){const e=n.locale,t=UL(n),r=De(n.pluralRules)&&te(e)&&je(n.pluralRules[e])?n.pluralRules[e]:$_,i=De(n.pluralRules)&&te(e)&&je(n.pluralRules[e])?$_:void 0,a=I=>I[r(t,I.length,i)],c=n.list||[],d=I=>c[I],h=n.named||Ge();bt(n.pluralIndex)&&FL(t,h);const m=I=>h[I];function g(I,N){const O=je(n.messages)?n.messages(I,!!N):De(n.messages)?n.messages[I]:!1;return O||(n.parent?n.parent.message(I):ML)}const v=I=>n.modifiers?n.modifiers[I]:PL,p=Se(n.processor)&&je(n.processor.normalize)?n.processor.normalize:LL,w=Se(n.processor)&&je(n.processor.interpolate)?n.processor.interpolate:xL,C=Se(n.processor)&&te(n.processor.type)?n.processor.type:DL,k={list:d,named:m,plural:a,linked:(I,...N)=>{const[O,L]=N;let $="text",G="";N.length===1?De(O)?(G=O.modifier||G,$=O.type||$):te(O)&&(G=O||G):N.length===2&&(te(O)&&(G=O||G),te(L)&&($=L||$));const D=g(I,!0)(k),se=$==="vnode"&&vt(D)&&G?D[0]:D;return G?v(G)(se,$):se},message:g,type:C,interpolate:w,normalize:p,values:Rt(Ge(),c,h)};return k}const K_=()=>"",nr=n=>je(n);function W_(n,...e){const{fallbackFormat:t,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:c,messages:d}=n,[h,m]=Ih(...e),g=xe(m.missingWarn)?m.missingWarn:n.missingWarn,v=xe(m.fallbackWarn)?m.fallbackWarn:n.fallbackWarn,p=xe(m.escapeParameter)?m.escapeParameter:n.escapeParameter,w=!!m.resolvedMessage,C=te(m.default)||xe(m.default)?xe(m.default)?a?h:()=>h:m.default:t?a?h:()=>h:null,T=t||C!=null&&(te(C)||je(C)),k=bf(n,m);p&&VL(m);let[I,N,O]=w?[h,k,d[k]||Ge()]:LC(n,h,k,c,v,g),L=I,$=h;if(!w&&!(te(L)||or(L)||nr(L))&&T&&(L=C,$=L),!w&&(!(te(L)||or(L)||nr(L))||!te(N)))return i?zl:h;if(process.env.NODE_ENV!=="production"&&te(L)&&n.messageCompiler==null)return Ko(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${h}'.`),h;let G=!1;const D=()=>{G=!0},se=nr(L)?L:xC(n,h,N,L,$,D);if(G)return L;const ie=WL(n,N,O,m),Q=BL(ie),Z=HL(n,se,Q),le=r?r(Z,h):Z;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Ue={timestamp:Date.now(),key:te(h)?h:nr(L)?L.key:"",locale:N||(nr(L)?L.locale:""),format:te(L)?L:nr(L)?L.source:"",message:le};Ue.meta=Rt({},n.__meta,kL()||{}),iL(Ue)}return le}function VL(n){vt(n.list)?n.list=n.list.map(e=>te(e)?b_(e):e):De(n.named)&&Object.keys(n.named).forEach(e=>{te(n.named[e])&&(n.named[e]=b_(n.named[e]))})}function LC(n,e,t,r,i,a){const{messages:c,onWarn:d,messageResolver:h,localeFallbacker:m}=n,g=m(n,r,t);let v=Ge(),p,w=null,C=t,T=null;const k="translate";for(let I=0;I<g.length;I++){if(p=T=g[I],process.env.NODE_ENV!=="production"&&t!==p&&!OC(t,p)&&Gl(i,e)&&d(_i(pn.FALLBACK_TO_TRANSLATE,{key:e,target:p})),process.env.NODE_ENV!=="production"&&t!==p){const $=n.__v_emitter;$&&$.emit("fallback",{type:k,key:e,from:C,to:T,groupId:`${k}:${e}`})}v=c[p]||Ge();let N=null,O,L;if(process.env.NODE_ENV!=="production"&&yr&&(N=window.performance.now(),O="intlify-message-resolve-start",L="intlify-message-resolve-end",xn&&xn(O)),(w=h(v,e))===null&&(w=v[e]),process.env.NODE_ENV!=="production"&&yr){const $=window.performance.now(),G=n.__v_emitter;G&&N&&w&&G.emit("message-resolve",{type:"message-resolve",key:e,message:w,time:$-N,groupId:`${k}:${e}`}),O&&L&&xn&&pi&&(xn(L),pi("intlify message resolve",O,L))}if(te(w)||or(w)||nr(w))break;if(!OL(p,g)){const $=If(n,e,p,a,k);$!==e&&(w=$)}C=T}return[w,p,v]}function xC(n,e,t,r,i,a){const{messageCompiler:c,warnHtmlMessage:d}=n;if(nr(r)){const p=r;return p.locale=p.locale||t,p.key=p.key||e,p}if(c==null){const p=()=>r;return p.locale=t,p.key=e,p}let h=null,m,g;process.env.NODE_ENV!=="production"&&yr&&(h=window.performance.now(),m="intlify-message-compilation-start",g="intlify-message-compilation-end",xn&&xn(m));const v=c(r,$L(n,t,i,r,d,a));if(process.env.NODE_ENV!=="production"&&yr){const p=window.performance.now(),w=n.__v_emitter;w&&h&&w.emit("message-compilation",{type:"message-compilation",message:r,time:p-h,groupId:`translate:${e}`}),m&&g&&xn&&pi&&(xn(g),pi("intlify message compilation",m,g))}return v.locale=t,v.key=e,v.source=r,v}function HL(n,e,t){let r=null,i,a;process.env.NODE_ENV!=="production"&&yr&&(r=window.performance.now(),i="intlify-message-evaluation-start",a="intlify-message-evaluation-end",xn&&xn(i));const c=e(t);if(process.env.NODE_ENV!=="production"&&yr){const d=window.performance.now(),h=n.__v_emitter;h&&r&&h.emit("message-evaluation",{type:"message-evaluation",value:c,time:d-r,groupId:`translate:${e.key}`}),i&&a&&xn&&pi&&(xn(a),pi("intlify message evaluation",i,a))}return c}function Ih(...n){const[e,t,r]=n,i=Ge();if(!te(e)&&!bt(e)&&!nr(e)&&!or(e))throw io(Zt.INVALID_ARGUMENT);const a=bt(e)?String(e):(nr(e),e);return bt(t)?i.plural=t:te(t)?i.default=t:Se(t)&&!Wl(t)?i.named=t:vt(t)&&(i.list=t),bt(r)?i.plural=r:te(r)?i.default=r:Se(r)&&Rt(i,r),[a,i]}function $L(n,e,t,r,i,a){return{locale:e,key:t,warnHtmlMessage:i,onError:c=>{if(a&&a(c),process.env.NODE_ENV!=="production"){const d=KL(r),h=`Message compilation error: ${c.message}`,m=c.location&&d&&mD(d,c.location.start.offset,c.location.end.offset),g=n.__v_emitter;g&&d&&g.emit("compile-error",{message:d,error:c.message,start:c.location&&c.location.start.offset,end:c.location&&c.location.end.offset,groupId:`translate:${t}`}),console.error(m?`${h}
|
27
|
+
${m}`:h)}else throw c},onCacheKey:c=>sD(e,t,c)}}function KL(n){if(te(n))return n;if(n.loc&&n.loc.source)return n.loc.source}function WL(n,e,t,r){const{modifiers:i,pluralRules:a,messageResolver:c,fallbackLocale:d,fallbackWarn:h,missingWarn:m,fallbackContext:g}=n,p={locale:e,modifiers:i,pluralRules:a,messages:(w,C)=>{let T=c(t,w);if(T==null&&(g||C)){const[,,k]=LC(g||n,w,e,d,h,m);T=c(k,w)}if(te(T)||or(T)){let k=!1;const N=xC(n,w,e,T,w,()=>{k=!0});return k?K_:N}else return nr(T)?T:K_}};return n.processor&&(p.processor=n.processor),r.list&&(p.list=r.list),r.named&&(p.named=r.named),bt(r.plural)&&(p.pluralIndex=r.plural),p}WD();/*!
|
28
|
+
* vue-i18n v11.1.3
|
29
|
+
* (c) 2025 kazuya kawaguchi
|
30
|
+
* Released under the MIT License.
|
31
|
+
*/const zL="11.1.3";function GL(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(di().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(di().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(di().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(di().__INTLIFY_PROD_DEVTOOLS__=!1)}const tt={UNEXPECTED_RETURN_TYPE:sL,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function yn(n,...e){return ba(n,null,process.env.NODE_ENV!=="production"?{messages:qL,args:e}:void 0)}const qL={[tt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[tt.INVALID_ARGUMENT]:"Invalid argument",[tt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[tt.NOT_INSTALLED]:"Need to install with `app.use` function",[tt.UNEXPECTED_ERROR]:"Unexpected error",[tt.REQUIRED_VALUE]:"Required in value: {0}",[tt.INVALID_VALUE]:"Invalid value",[tt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[tt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[tt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[tt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Ah=Wr("__translateVNode"),Sh=Wr("__datetimeParts"),kh=Wr("__numberParts"),vi=Wr("__enableEmitter"),Ts=Wr("__disableEmitter"),UC=Wr("__setPluralRules"),FC=Wr("__injectWithOption"),Nh=Wr("__dispose"),Dr={FALLBACK_TO_ROOT:CL,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12},YL={[Dr.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Dr.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Dr.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Dr.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
32
|
+
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Dr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead."};function Ps(n,...e){return Kl(YL[n],...e)}function bs(n){if(!De(n)||or(n))return n;for(const e in n)if(pr(n,e))if(!e.includes("."))De(n[e])&&bs(n[e]);else{const t=e.split("."),r=t.length-1;let i=n,a=!1;for(let c=0;c<r;c++){if(t[c]==="__proto__")throw new Error(`unsafe key: ${t[c]}`);if(t[c]in i||(i[t[c]]=Ge()),!De(i[t[c]])){process.env.NODE_ENV!=="production"&&Ko(Ps(Dr.IGNORE_OBJ_FLATTEN,{key:t[c]})),a=!0;break}i=i[t[c]]}if(a||(or(i)?TC.includes(t[r])||delete n[e]:(i[t[r]]=n[e],delete n[e])),!or(i)){const c=i[t[r]];De(c)&&bs(c)}}return n}function Af(n,e){const{messages:t,__i18n:r,messageResolver:i,flatJson:a}=e,c=Se(t)?t:vt(r)?Ge():{[n]:Ge()};if(vt(r)&&r.forEach(d=>{if("locale"in d&&"resource"in d){const{locale:h,resource:m}=d;h?(c[h]=c[h]||Ge(),nl(m,c[h])):nl(m,c)}else te(d)&&nl(JSON.parse(d),c)}),i==null&&a)for(const d in c)pr(c,d)&&bs(c[d]);return c}function BC(n){return n.type}function VC(n,e,t){let r=De(e.messages)?e.messages:Ge();"__i18nGlobal"in t&&(r=Af(n.locale.value,{messages:r,__i18n:t.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(a=>{n.mergeLocaleMessage(a,r[a])});{if(De(e.datetimeFormats)){const a=Object.keys(e.datetimeFormats);a.length&&a.forEach(c=>{n.mergeDateTimeFormat(c,e.datetimeFormats[c])})}if(De(e.numberFormats)){const a=Object.keys(e.numberFormats);a.length&&a.forEach(c=>{n.mergeNumberFormat(c,e.numberFormats[c])})}}}function z_(n){return l.createVNode(l.Text,null,n,0)}const G_="__INTLIFY_META__",q_=()=>[],jL=()=>!1;let Y_=0;function j_(n){return(e,t,r,i)=>n(t,r,l.getCurrentInstance()||void 0,i)}const JL=()=>{const n=l.getCurrentInstance();let e=null;return n&&(e=BC(n)[G_])?{[G_]:e}:null};function Sf(n={}){const{__root:e,__injectWithOption:t}=n,r=e===void 0,i=n.flatJson,a=yr?l.ref:l.shallowRef;let c=xe(n.inheritLocale)?n.inheritLocale:!0;const d=a(e&&c?e.locale.value:te(n.locale)?n.locale:ws),h=a(e&&c?e.fallbackLocale.value:te(n.fallbackLocale)||vt(n.fallbackLocale)||Se(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:d.value),m=a(Af(d.value,n)),g=a(Se(n.datetimeFormats)?n.datetimeFormats:{[d.value]:{}}),v=a(Se(n.numberFormats)?n.numberFormats:{[d.value]:{}});let p=e?e.missingWarn:xe(n.missingWarn)||pa(n.missingWarn)?n.missingWarn:!0,w=e?e.fallbackWarn:xe(n.fallbackWarn)||pa(n.fallbackWarn)?n.fallbackWarn:!0,C=e?e.fallbackRoot:xe(n.fallbackRoot)?n.fallbackRoot:!0,T=!!n.fallbackFormat,k=je(n.missing)?n.missing:null,I=je(n.missing)?j_(n.missing):null,N=je(n.postTranslation)?n.postTranslation:null,O=e?e.warnHtmlMessage:xe(n.warnHtmlMessage)?n.warnHtmlMessage:!0,L=!!n.escapeParameter;const $=e?e.modifiers:Se(n.modifiers)?n.modifiers:{};let G=n.pluralRules||e&&e.pluralRules,D;D=(()=>{r&&L_(null);const V={version:zL,locale:d.value,fallbackLocale:h.value,messages:m.value,modifiers:$,pluralRules:G,missing:I===null?void 0:I,missingWarn:p,fallbackWarn:w,fallbackFormat:T,unresolving:!0,postTranslation:N===null?void 0:N,warnHtmlMessage:O,escapeParameter:L,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};V.datetimeFormats=g.value,V.numberFormats=v.value,V.__datetimeFormatters=Se(D)?D.__datetimeFormatters:void 0,V.__numberFormatters=Se(D)?D.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(V.__v_emitter=Se(D)?D.__v_emitter:void 0);const j=RL(V);return r&&L_(j),j})(),Xa(D,d.value,h.value);function ie(){return[d.value,h.value,m.value,g.value,v.value]}const Q=l.computed({get:()=>d.value,set:V=>{D.locale=V,d.value=V}}),Z=l.computed({get:()=>h.value,set:V=>{D.fallbackLocale=V,h.value=V,Xa(D,d.value,V)}}),le=l.computed(()=>m.value),Ue=l.computed(()=>g.value),yt=l.computed(()=>v.value);function nn(){return je(N)?N:null}function Gt(V){N=V,D.postTranslation=V}function Pt(){return k}function it(V){V!==null&&(I=j_(V)),k=V,D.missing=I}function Ct(V,j){return V!=="translate"||!j.resolvedMessage}const rn=(V,j,ke,We,ir,vo)=>{ie();let Ar;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(D.fallbackContext=e?NL():void 0),Ar=V(D)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(D.fallbackContext=void 0)}if(ke!=="translate exists"&&bt(Ar)&&Ar===zl||ke==="translate exists"&&!Ar){const[ar,xa]=j();if(process.env.NODE_ENV!=="production"&&e&&te(ar)&&Ct(ke,xa)&&(C&&(Gl(w,ar)||RC(p,ar))&&Ko(Ps(Dr.FALLBACK_TO_ROOT,{key:ar,type:ke})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ai}=D;Ai&&C&&Ai.emit("fallback",{type:ke,key:ar,to:"global",groupId:`${ke}:${ar}`})}return e&&C?We(e):ir(ar)}else{if(vo(Ar))return Ar;throw yn(tt.UNEXPECTED_RETURN_TYPE)}};function It(...V){return rn(j=>Reflect.apply(W_,null,[j,...V]),()=>Ih(...V),"translate",j=>Reflect.apply(j.t,j,[...V]),j=>j,j=>te(j))}function Go(...V){const[j,ke,We]=V;if(We&&!De(We))throw yn(tt.INVALID_ARGUMENT);return It(j,ke,Rt({resolvedMessage:!0},We||{}))}function Pa(...V){return rn(j=>Reflect.apply(F_,null,[j,...V]),()=>Th(...V),"datetime format",j=>Reflect.apply(j.d,j,[...V]),()=>pl,j=>te(j))}function Ma(...V){return rn(j=>Reflect.apply(V_,null,[j,...V]),()=>bh(...V),"number format",j=>Reflect.apply(j.n,j,[...V]),()=>pl,j=>te(j))}function br(V){return V.map(j=>te(j)||bt(j)||xe(j)?z_(String(j)):j)}const Da={normalize:br,interpolate:V=>V,type:"vnode"};function Ir(...V){return rn(j=>{let ke;const We=j;try{We.processor=Da,ke=Reflect.apply(W_,null,[We,...V])}finally{We.processor=null}return ke},()=>Ih(...V),"translate",j=>j[Ah](...V),j=>[z_(j)],j=>vt(j))}function zr(...V){return rn(j=>Reflect.apply(V_,null,[j,...V]),()=>bh(...V),"number format",j=>j[kh](...V),q_,j=>te(j)||vt(j))}function La(...V){return rn(j=>Reflect.apply(F_,null,[j,...V]),()=>Th(...V),"datetime format",j=>j[Sh](...V),q_,j=>te(j)||vt(j))}function go(V){G=V,D.pluralRules=G}function po(V,j){return rn(()=>{if(!V)return!1;const ke=te(j)?j:d.value,We=Cn(ke),ir=D.messageResolver(We,V);return or(ir)||nr(ir)||te(ir)},()=>[V],"translate exists",ke=>Reflect.apply(ke.te,ke,[V,j]),jL,ke=>xe(ke))}function _o(V){let j=null;const ke=bC(D,h.value,d.value);for(let We=0;We<ke.length;We++){const ir=m.value[ke[We]]||{},vo=D.messageResolver(ir,V);if(vo!=null){j=vo;break}}return j}function Ft(V){const j=_o(V);return j??(e?e.tm(V)||{}:{})}function Cn(V){return m.value[V]||{}}function Yo(V,j){if(i){const ke={[V]:j};for(const We in ke)pr(ke,We)&&bs(ke[We]);j=ke[V]}m.value[V]=j,D.messages=m.value}function En(V,j){m.value[V]=m.value[V]||{};const ke={[V]:j};if(i)for(const We in ke)pr(ke,We)&&bs(ke[We]);j=ke[V],nl(j,m.value[V]),D.messages=m.value}function S(V){return g.value[V]||{}}function R(V,j){g.value[V]=j,D.datetimeFormats=g.value,B_(D,V,j)}function z(V,j){g.value[V]=Rt(g.value[V]||{},j),D.datetimeFormats=g.value,B_(D,V,j)}function re(V){return v.value[V]||{}}function qe(V,j){v.value[V]=j,D.numberFormats=v.value,H_(D,V,j)}function Xe(V,j){v.value[V]=Rt(v.value[V]||{},j),D.numberFormats=v.value,H_(D,V,j)}Y_++,e&&yr&&(l.watch(e.locale,V=>{c&&(d.value=V,D.locale=V,Xa(D,d.value,h.value))}),l.watch(e.fallbackLocale,V=>{c&&(h.value=V,D.fallbackLocale=V,Xa(D,d.value,h.value))}));const Pe={id:Y_,locale:Q,fallbackLocale:Z,get inheritLocale(){return c},set inheritLocale(V){c=V,V&&e&&(d.value=e.locale.value,h.value=e.fallbackLocale.value,Xa(D,d.value,h.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:le,get modifiers(){return $},get pluralRules(){return G||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(V){p=V,D.missingWarn=p},get fallbackWarn(){return w},set fallbackWarn(V){w=V,D.fallbackWarn=w},get fallbackRoot(){return C},set fallbackRoot(V){C=V},get fallbackFormat(){return T},set fallbackFormat(V){T=V,D.fallbackFormat=T},get warnHtmlMessage(){return O},set warnHtmlMessage(V){O=V,D.warnHtmlMessage=V},get escapeParameter(){return L},set escapeParameter(V){L=V,D.escapeParameter=V},t:It,getLocaleMessage:Cn,setLocaleMessage:Yo,mergeLocaleMessage:En,getPostTranslationHandler:nn,setPostTranslationHandler:Gt,getMissingHandler:Pt,setMissingHandler:it,[UC]:go};return Pe.datetimeFormats=Ue,Pe.numberFormats=yt,Pe.rt=Go,Pe.te=po,Pe.tm=Ft,Pe.d=Pa,Pe.n=Ma,Pe.getDateTimeFormat=S,Pe.setDateTimeFormat=R,Pe.mergeDateTimeFormat=z,Pe.getNumberFormat=re,Pe.setNumberFormat=qe,Pe.mergeNumberFormat=Xe,Pe[FC]=t,Pe[Ah]=Ir,Pe[Sh]=La,Pe[kh]=zr,process.env.NODE_ENV!=="production"&&(Pe[vi]=V=>{D.__v_emitter=V},Pe[Ts]=()=>{D.__v_emitter=void 0}),Pe}const HC="vue-i18n: composer properties",Bd={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},QL={"vue-i18n-resource-inspector":"Search for scopes ..."},XL={"vue-i18n-timeline":16764185};let Rh;async function ZL(n,e){return new Promise((t,r)=>{try{hf({id:"vue-devtools-plugin-vue-i18n",label:Bd["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[HC],app:n},i=>{Rh=i,i.on.visitComponentTree(({componentInstance:c,treeNode:d})=>{ex(c,d,e)}),i.on.inspectComponent(({componentInstance:c,instanceData:d})=>{c.vnode.el&&c.vnode.el.__VUE_I18N__&&d&&(e.mode==="legacy"?c.vnode.el.__VUE_I18N__!==e.global.__composer&&J_(d,c.vnode.el.__VUE_I18N__):J_(d,c.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:Bd["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:QL["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(c=>{c.app===n&&c.inspectorId==="vue-i18n-resource-inspector"&&ix(c,e)});const a=new Map;i.on.getInspectorState(async c=>{if(c.app===n&&c.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),sx(c,e),c.nodeId==="global"){if(!a.has(c.app)){const[d]=await i.getComponentInstances(c.app);a.set(c.app,d)}i.highlightElement(a.get(c.app))}else{const d=ax(c.nodeId,e);d&&i.highlightElement(d)}}),i.on.editInspectorState(c=>{c.app===n&&c.inspectorId==="vue-i18n-resource-inspector"&&lx(c,e)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:Bd["vue-i18n-timeline"],color:XL["vue-i18n-timeline"]}),t(!0)})}catch(i){console.error(i),r(!1)}})}function $C(n){return n.type.name||n.type.displayName||n.type.__file||"Anonymous"}function ex(n,e,t){const r=t.mode==="composition"?t.global:t.global.__composer;if(n&&n.vnode.el&&n.vnode.el.__VUE_I18N__&&n.vnode.el.__VUE_I18N__!==r){const i={label:`i18n (${$C(n)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(i)}}function J_(n,e){const t=HC;n.state.push({type:t,key:"locale",editable:!0,value:e.locale.value}),n.state.push({type:t,key:"availableLocales",editable:!1,value:e.availableLocales}),n.state.push({type:t,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),n.state.push({type:t,key:"inheritLocale",editable:!0,value:e.inheritLocale}),n.state.push({type:t,key:"messages",editable:!1,value:kf(e.messages.value)}),n.state.push({type:t,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),n.state.push({type:t,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function kf(n){const e={};return Object.keys(n).forEach(t=>{const r=n[t];je(r)&&"source"in r?e[t]=ox(r):or(r)&&r.loc&&r.loc.source?e[t]=r.loc.source:De(r)?e[t]=kf(r):e[t]=r}),e}const tx={"<":"<",">":">",'"':""","&":"&"};function nx(n){return n.replace(/[<>"&]/g,rx)}function rx(n){return tx[n]||n}function ox(n){return{_custom:{type:"function",display:`<span>ƒ</span> ${n.source?`("${nx(n.source)}")`:"(?)"}`}}}function ix(n,e){n.rootNodes.push({id:"global",label:"Global Scope"});const t=e.mode==="composition"?e.global:e.global.__composer;for(const[r,i]of e.__instances){const a=e.mode==="composition"?i:i.__composer;t!==a&&n.rootNodes.push({id:a.id.toString(),label:`${$C(r)} Scope`})}}function ax(n,e){let t=null;if(n!=="global"){for(const[r,i]of e.__instances.entries())if(i.id.toString()===n){t=r;break}}return t}function KC(n,e){if(n==="global")return e.mode==="composition"?e.global:e.global.__composer;{const t=Array.from(e.__instances.values()).find(r=>r.id.toString()===n);return t?e.mode==="composition"?t:t.__composer:null}}function sx(n,e){const t=KC(n.nodeId,e);return t&&(n.state=cx(t)),null}function cx(n){const e={},t="Locale related info",r=[{type:t,key:"locale",editable:!0,value:n.locale.value},{type:t,key:"fallbackLocale",editable:!0,value:n.fallbackLocale.value},{type:t,key:"availableLocales",editable:!1,value:n.availableLocales},{type:t,key:"inheritLocale",editable:!0,value:n.inheritLocale}];e[t]=r;const i="Locale messages info",a=[{type:i,key:"messages",editable:!1,value:kf(n.messages.value)}];e[i]=a;{const c="Datetime formats info",d=[{type:c,key:"datetimeFormats",editable:!1,value:n.datetimeFormats.value}];e[c]=d;const h="Datetime formats info",m=[{type:h,key:"numberFormats",editable:!1,value:n.numberFormats.value}];e[h]=m}return e}function Is(n,e){if(Rh){let t;e&&"groupId"in e&&(t=e.groupId,delete e.groupId),Rh.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:n,groupId:t,time:Date.now(),meta:{},data:e||{},logType:n==="compile-error"?"error":n==="fallback"||n==="missing"?"warning":"default"}})}}function lx(n,e){const t=KC(n.nodeId,e);if(t){const[r]=n.path;r==="locale"&&te(n.state.value)?t.locale.value=n.state.value:r==="fallbackLocale"&&(te(n.state.value)||vt(n.state.value)||De(n.state.value))?t.fallbackLocale.value=n.state.value:r==="inheritLocale"&&xe(n.state.value)&&(t.inheritLocale=n.state.value)}}function ux(n){const e=te(n.locale)?n.locale:ws,t=te(n.fallbackLocale)||vt(n.fallbackLocale)||Se(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:e,r=je(n.missing)?n.missing:void 0,i=xe(n.silentTranslationWarn)||pa(n.silentTranslationWarn)?!n.silentTranslationWarn:!0,a=xe(n.silentFallbackWarn)||pa(n.silentFallbackWarn)?!n.silentFallbackWarn:!0,c=xe(n.fallbackRoot)?n.fallbackRoot:!0,d=!!n.formatFallbackMessages,h=Se(n.modifiers)?n.modifiers:{},m=n.pluralizationRules,g=je(n.postTranslation)?n.postTranslation:void 0,v=te(n.warnHtmlInMessage)?n.warnHtmlInMessage!=="off":!0,p=!!n.escapeParameterHtml,w=xe(n.sync)?n.sync:!0;let C=n.messages;if(Se(n.sharedMessages)){const $=n.sharedMessages;C=Object.keys($).reduce((D,se)=>{const ie=D[se]||(D[se]={});return Rt(ie,$[se]),D},C||{})}const{__i18n:T,__root:k,__injectWithOption:I}=n,N=n.datetimeFormats,O=n.numberFormats,L=n.flatJson;return{locale:e,fallbackLocale:t,messages:C,flatJson:L,datetimeFormats:N,numberFormats:O,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:c,fallbackFormat:d,modifiers:h,pluralRules:m,postTranslation:g,warnHtmlMessage:v,escapeParameter:p,messageResolver:n.messageResolver,inheritLocale:w,__i18n:T,__root:k,__injectWithOption:I}}function Oh(n={}){const e=Sf(ux(n)),{__extender:t}=n,r={id:e.id,get locale(){return e.locale.value},set locale(i){e.locale.value=i},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(i){e.fallbackLocale.value=i},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(i){e.setMissingHandler(i)},get silentTranslationWarn(){return xe(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(i){e.missingWarn=xe(i)?!i:i},get silentFallbackWarn(){return xe(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(i){e.fallbackWarn=xe(i)?!i:i},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(i){e.fallbackFormat=i},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(i){e.setPostTranslationHandler(i)},get sync(){return e.inheritLocale},set sync(i){e.inheritLocale=i},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){e.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(i){e.escapeParameter=i},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...i){return Reflect.apply(e.t,e,[...i])},rt(...i){return Reflect.apply(e.rt,e,[...i])},te(i,a){return e.te(i,a)},tm(i){return e.tm(i)},getLocaleMessage(i){return e.getLocaleMessage(i)},setLocaleMessage(i,a){e.setLocaleMessage(i,a)},mergeLocaleMessage(i,a){e.mergeLocaleMessage(i,a)},d(...i){return Reflect.apply(e.d,e,[...i])},getDateTimeFormat(i){return e.getDateTimeFormat(i)},setDateTimeFormat(i,a){e.setDateTimeFormat(i,a)},mergeDateTimeFormat(i,a){e.mergeDateTimeFormat(i,a)},n(...i){return Reflect.apply(e.n,e,[...i])},getNumberFormat(i){return e.getNumberFormat(i)},setNumberFormat(i,a){e.setNumberFormat(i,a)},mergeNumberFormat(i,a){e.mergeNumberFormat(i,a)}};return r.__extender=t,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=i=>{const a=e;a[vi]&&a[vi](i)},r.__disableEmitter=()=>{const i=e;i[Ts]&&i[Ts]()}),r}function dx(n,e,t){return{beforeCreate(){const r=l.getCurrentInstance();if(!r)throw yn(tt.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const a=i.i18n;if(i.__i18n&&(a.__i18n=i.__i18n),a.__root=e,this===this.$root)this.$i18n=Q_(n,a);else{a.__injectWithOption=!0,a.__extender=t.__vueI18nExtend,this.$i18n=Oh(a);const c=this.$i18n;c.__extender&&(c.__disposer=c.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=Q_(n,i);else{this.$i18n=Oh({__i18n:i.__i18n,__injectWithOption:!0,__extender:t.__vueI18nExtend,__root:e});const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}else this.$i18n=n;i.__i18nGlobal&&VC(e,i,i),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$te=(a,c)=>this.$i18n.te(a,c),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a),t.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const i=this.__v_emitter=Ef();r.__enableEmitter&&r.__enableEmitter(i),i.on("*",Is)}},unmounted(){const r=l.getCurrentInstance();if(!r)throw yn(tt.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Is),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),t.__deleteInstance(r),delete this.$i18n}}}function Q_(n,e){n.locale=e.locale||n.locale,n.fallbackLocale=e.fallbackLocale||n.fallbackLocale,n.missing=e.missing||n.missing,n.silentTranslationWarn=e.silentTranslationWarn||n.silentFallbackWarn,n.silentFallbackWarn=e.silentFallbackWarn||n.silentFallbackWarn,n.formatFallbackMessages=e.formatFallbackMessages||n.formatFallbackMessages,n.postTranslation=e.postTranslation||n.postTranslation,n.warnHtmlInMessage=e.warnHtmlInMessage||n.warnHtmlInMessage,n.escapeParameterHtml=e.escapeParameterHtml||n.escapeParameterHtml,n.sync=e.sync||n.sync,n.__composer[UC](e.pluralizationRules||n.pluralizationRules);const t=Af(n.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(t).forEach(r=>n.mergeLocaleMessage(r,t[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>n.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>n.mergeNumberFormat(r,e.numberFormats[r])),n}const Nf={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function hx({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((r,i)=>[...r,...i.type===l.Fragment?i.children:[i]],[]):e.reduce((t,r)=>{const i=n[r];return i&&(t[r]=i()),t},Ge())}function WC(){return l.Fragment}const fx=l.defineComponent({name:"i18n-t",props:Rt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>bt(n)||!isNaN(n)}},Nf),setup(n,e){const{slots:t,attrs:r}=e,i=n.i18n||Ms({useScope:n.scope,__useComponent:!0});return()=>{const a=Object.keys(t).filter(v=>v!=="_"),c=Ge();n.locale&&(c.locale=n.locale),n.plural!==void 0&&(c.plural=te(n.plural)?+n.plural:n.plural);const d=hx(e,a),h=i[Ah](n.keypath,d,c),m=Rt(Ge(),r),g=te(n.tag)||De(n.tag)?n.tag:WC();return l.h(g,m,h)}}}),X_=fx;function mx(n){return vt(n)&&!te(n[0])}function zC(n,e,t,r){const{slots:i,attrs:a}=e;return()=>{const c={part:!0};let d=Ge();n.locale&&(c.locale=n.locale),te(n.format)?c.key=n.format:De(n.format)&&(te(n.format.key)&&(c.key=n.format.key),d=Object.keys(n.format).reduce((p,w)=>t.includes(w)?Rt(Ge(),p,{[w]:n.format[w]}):p,Ge()));const h=r(n.value,c,d);let m=[c.key];vt(h)?m=h.map((p,w)=>{const C=i[p.type],T=C?C({[p.type]:p.value,index:w,parts:h}):[p.value];return mx(T)&&(T[0].key=`${p.type}-${w}`),T}):te(h)&&(m=[h]);const g=Rt(Ge(),a),v=te(n.tag)||De(n.tag)?n.tag:WC();return l.h(v,g,m)}}const gx=l.defineComponent({name:"i18n-n",props:Rt({value:{type:Number,required:!0},format:{type:[String,Object]}},Nf),setup(n,e){const t=n.i18n||Ms({useScope:n.scope,__useComponent:!0});return zC(n,e,DC,(...r)=>t[kh](...r))}}),Z_=gx;function px(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const r=t.__getInstance(e);return r!=null?r.__composer:n.global.__composer}}function _x(n){const e=c=>{process.env.NODE_ENV!=="production"&&Cf(Ps(Dr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:d,value:h}=c;if(!d||!d.$)throw yn(tt.UNEXPECTED_ERROR);const m=px(n,d.$),g=ev(h);return[Reflect.apply(m.t,m,[...tv(g)]),m]};return{created:(c,d)=>{const[h,m]=e(d);yr&&n.global===m&&(c.__i18nWatcher=l.watch(m.locale,()=>{d.instance&&d.instance.$forceUpdate()})),c.__composer=m,c.textContent=h},unmounted:c=>{yr&&c.__i18nWatcher&&(c.__i18nWatcher(),c.__i18nWatcher=void 0,delete c.__i18nWatcher),c.__composer&&(c.__composer=void 0,delete c.__composer)},beforeUpdate:(c,{value:d})=>{if(c.__composer){const h=c.__composer,m=ev(d);c.textContent=Reflect.apply(h.t,h,[...tv(m)])}},getSSRProps:c=>{const[d]=e(c);return{textContent:d}}}}function ev(n){if(te(n))return{path:n};if(Se(n)){if(!("path"in n))throw yn(tt.REQUIRED_VALUE,"path");return n}else throw yn(tt.INVALID_VALUE)}function tv(n){const{path:e,locale:t,args:r,choice:i,plural:a}=n,c={},d=r||{};return te(t)&&(c.locale=t),bt(i)&&(c.plural=i),bt(a)&&(c.plural=a),[e,d,c]}function vx(n,e,...t){const r=Se(t[0])?t[0]:{};(xe(r.globalInstall)?r.globalInstall:!0)&&([X_.name,"I18nT"].forEach(a=>n.component(a,X_)),[Z_.name,"I18nN"].forEach(a=>n.component(a,Z_)),[rv.name,"I18nD"].forEach(a=>n.component(a,rv))),n.directive("t",_x(e))}const yx=Wr("global-vue-i18n");function Cx(n={}){const e=__VUE_I18N_LEGACY_API__&&xe(n.legacy)?n.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&e&&Cf(Ps(Dr.DEPRECATE_LEGACY_MODE));const t=xe(n.globalInjection)?n.globalInjection:!0,r=new Map,[i,a]=Ex(n,e),c=Wr(process.env.NODE_ENV!=="production"?"vue-i18n":"");function d(v){return r.get(v)||null}function h(v,p){r.set(v,p)}function m(v){r.delete(v)}const g={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(v,...p){if(process.env.NODE_ENV!=="production"&&(v.__VUE_I18N__=g),v.__VUE_I18N_SYMBOL__=c,v.provide(v.__VUE_I18N_SYMBOL__,g),Se(p[0])){const T=p[0];g.__composerExtend=T.__composerExtend,g.__vueI18nExtend=T.__vueI18nExtend}let w=null;!e&&t&&(w=Nx(v,g.global)),__VUE_I18N_FULL_INSTALL__&&vx(v,g,...p),__VUE_I18N_LEGACY_API__&&e&&v.mixin(dx(a,a.__composer,g));const C=v.unmount;if(v.unmount=()=>{w&&w(),g.dispose(),C()},process.env.NODE_ENV!=="production"){if(!await ZL(v,g))throw yn(tt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const k=Ef();if(e){const I=a;I.__enableEmitter&&I.__enableEmitter(k)}else{const I=a;I[vi]&&I[vi](k)}k.on("*",Is)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:d,__setInstance:h,__deleteInstance:m};return g}function Ms(n={}){const e=l.getCurrentInstance();if(e==null)throw yn(tt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw yn(tt.NOT_INSTALLED);const t=wx(e),r=bx(t),i=BC(e),a=Tx(n,i);if(a==="global")return VC(r,n,i),r;if(a==="parent"){let h=Ix(t,e,n.__useComponent);return h==null&&(process.env.NODE_ENV!=="production"&&Ko(Ps(Dr.NOT_FOUND_PARENT_SCOPE)),h=r),h}const c=t;let d=c.__getInstance(e);if(d==null){const h=Rt({},n);"__i18n"in i&&(h.__i18n=i.__i18n),r&&(h.__root=r),d=Sf(h),c.__composerExtend&&(d[Nh]=c.__composerExtend(d)),Sx(c,e,d),c.__setInstance(e,d)}return d}function Ex(n,e){const t=l.effectScope(),r=__VUE_I18N_LEGACY_API__&&e?t.run(()=>Oh(n)):t.run(()=>Sf(n));if(r==null)throw yn(tt.UNEXPECTED_ERROR);return[t,r]}function wx(n){const e=l.inject(n.isCE?yx:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw yn(n.isCE?tt.NOT_INSTALLED_WITH_PROVIDE:tt.UNEXPECTED_ERROR);return e}function Tx(n,e){return Wl(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function bx(n){return n.mode==="composition"?n.global:n.global.__composer}function Ix(n,e,t=!1){let r=null;const i=e.root;let a=Ax(e,t);for(;a!=null;){const c=n;if(n.mode==="composition")r=c.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const d=c.__getInstance(a);d!=null&&(r=d.__composer,t&&r&&!r[FC]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function Ax(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function Sx(n,e,t){let r=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,r=Ef();const i=t;i[vi]&&i[vi](r),r.on("*",Is)}},e),l.onUnmounted(()=>{const i=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Is),i[Ts]&&i[Ts](),delete e.vnode.el.__VUE_I18N__),n.__deleteInstance(e);const a=i[Nh];a&&(a(),delete i[Nh])},e)}const kx=["locale","fallbackLocale","availableLocales"],nv=["t","rt","d","n","tm","te"];function Nx(n,e){const t=Object.create(null);return kx.forEach(i=>{const a=Object.getOwnPropertyDescriptor(e,i);if(!a)throw yn(tt.UNEXPECTED_ERROR);const c=l.isRef(a.value)?{get(){return a.value.value},set(d){a.value.value=d}}:{get(){return a.get&&a.get()}};Object.defineProperty(t,i,c)}),n.config.globalProperties.$i18n=t,nv.forEach(i=>{const a=Object.getOwnPropertyDescriptor(e,i);if(!a||!a.value)throw yn(tt.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${i}`,a)}),()=>{delete n.config.globalProperties.$i18n,nv.forEach(i=>{delete n.config.globalProperties[`$${i}`]})}}const Rx=l.defineComponent({name:"i18n-d",props:Rt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Nf),setup(n,e){const t=n.i18n||Ms({useScope:n.scope,__useComponent:!0});return zC(n,e,MC,(...r)=>t[Sh](...r))}}),rv=Rx;GL();bL(nL);IL(yL);AL(bC);if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const n=di();n.__INTLIFY__=!0,rL(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const ql=l.defineComponent({__name:"SearchFilter",props:l.mergeModels({placeholder:{}},{search:{},searchModifiers:{}}),emits:["update:search"],setup(n){const e=l.useModel(n,"search"),{t}=Ms();return(r,i)=>(l.openBlock(),l.createBlock(mO.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:r.placeholder??l.unref(t)("placeholders.search"),variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=a=>e.value=a)},{"prepend-inner":l.withCtx(()=>[l.createVNode(l.unref(lP),{size:"15",class:"ma-1 me-1"})]),_:1},8,["placeholder","modelValue"]))}}),Ox=l.defineComponent({__name:"TableHeader",props:l.mergeModels({columns:{},filter_visualize:{type:Boolean,default:!0}},{search:{},searchModifiers:{}}),emits:l.mergeModels(["refresh","remove"],["update:search"]),setup(n,{emit:e}){var g,v;const t=n,r=l.computed(()=>t.columns),i=e,a=l.useModel(n,"search"),{openDialog:c}=Ns("col-settings"),d=l.getCurrentInstance(),h=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((v=d==null?void 0:d.vnode.props)==null?void 0:v["onUpdate:remove"])!==void 0,{t:m}=Ms();return(p,w)=>(l.openBlock(),l.createElementBlock("div",null,[l.createVNode(l.unref(Mf),{modelValue:r.value,"onUpdate:modelValue":w[0]||(w[0]=C=>r.value=C)},null,8,["modelValue"]),l.createVNode(Je.VRow,{"no-gutters":"",align:"center"},{default:l.withCtx(()=>[l.createVNode(Je.VCol,{cols:"12",md:"6",class:"d-flex align-center flex-wrap gap-2"},{default:l.withCtx(()=>[l.createElementVNode("div",null,[l.createVNode(l.unref(oP),{class:"mt-1 me-2",color:"rgb(var(--v-theme-lightprimary))"})]),l.renderSlot(p.$slots,"filter",{},void 0,!0),p.$slots.filter?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(as.VSelect,{key:0,items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:l.unref(m)("placeholders.selectFilter"),density:"compact",class:"filter-field","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])),l.createVNode(ot.VBtn,{icon:"",variant:"text",onClick:w[1]||(w[1]=C=>i("refresh"))},{default:l.withCtx(()=>[l.createVNode(l.unref(cP),{color:"rgb(var(--v-theme-secondary))"})]),_:1}),l.createVNode(ot.VBtn,{icon:"",variant:"text"},{default:l.withCtx(()=>[l.createVNode(l.unref(nP),{color:"rgb(var(--v-theme-secondary))"})]),_:1})]),_:3}),l.createVNode(Je.VCol,{cols:"12",md:"6",class:"d-flex align-center justify-end flex-wrap gap-2"},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"top-right",{},void 0,!0),l.createVNode(ot.VBtn,{class:"me-2",icon:"",variant:"text",onClick:l.unref(c)},{default:l.withCtx(()=>[l.createVNode(l.unref(sP),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"]),l.createVNode(ql,{class:"search-field",modelValue:a.value,"onUpdate:modelValue":w[2]||(w[2]=C=>a.value=C)},null,8,["modelValue"])]),_:3})]),_:3}),l.createVNode(mi.VDivider,{class:"my-4"}),l.createVNode(Je.VRow,{align:"center"},{default:l.withCtx(()=>[l.createVNode(Je.VCol,{md:"3",cols:"6",class:"d-flex flex-wrap gap-2"},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"left-prepend",{},void 0,!0),l.unref(h)?(l.openBlock(),l.createBlock(l.unref(pf),{key:0,onRemoveAll:w[3]||(w[3]=C=>i("remove"))})):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"left-append",{},void 0,!0)]),_:3}),l.createVNode(Je.VCol,{md:"9",cols:"12",class:"d-flex justify-end align-center flex-wrap gap-2"},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"right-prepend",{},void 0,!0),p.filter_visualize?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(uP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),l.createVNode(as.VSelect,{items:[],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:l.unref(m)("placeholders.visualize"),density:"compact",class:"bottom-field me-2","hide-details":"",multiple:"",clearable:""},null,8,["placeholder"])],64)):l.createCommentVNode("",!0),l.createVNode(l.unref(aP),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),l.createVNode(as.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:l.unref(m)("placeholders.actions"),density:"compact",class:"bottom-field","hide-details":"",clearable:""},null,8,["placeholder"])]),_:3})]),_:3})]))}}),GC=Ta(Ox,[["__scopeId","data-v-faa90978"]]);/*!
|
33
|
+
* vue-draggable-next v2.2.0
|
34
|
+
* (c) 2023 Anish George
|
35
|
+
* @license MIT
|
36
|
+
*//**!
|
37
|
+
* Sortable 1.14.0
|
38
|
+
* @author RubaXa <trash@rubaxa.org>
|
39
|
+
* @author owenm <owen23355@gmail.com>
|
40
|
+
* @license MIT
|
41
|
+
*/function ov(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function $r(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ov(Object(t),!0).forEach(function(r){Px(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ov(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function rl(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rl=function(e){return typeof e}:rl=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rl(n)}function Px(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ho(){return ho=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ho.apply(this,arguments)}function Mx(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function Dx(n,e){if(n==null)return{};var t=Mx(n,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}var Lx="1.14.0";function lo(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var mo=lo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ds=lo(/Edge/i),iv=lo(/firefox/i),ss=lo(/safari/i)&&!lo(/chrome/i)&&!lo(/android/i),qC=lo(/iP(ad|od|hone)/i),xx=lo(/chrome/i)&&lo(/android/i),YC={capture:!1,passive:!1};function Be(n,e,t){n.addEventListener(e,t,!mo&&YC)}function Le(n,e,t){n.removeEventListener(e,t,!mo&&YC)}function _l(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ux(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Mr(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&_l(n,e):_l(n,e))||r&&n===t)return n;if(n===t)break}while(n=Ux(n))}return null}var av=/\s+/g;function kn(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(av," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(av," ")}}function ge(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function ha(n,e){var t="";if(typeof n=="string")t=n;else do{var r=ge(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function jC(n,e,t){if(n){var r=n.getElementsByTagName(e),i=0,a=r.length;if(t)for(;i<a;i++)t(r[i],i);return r}return[]}function Vr(){var n=document.scrollingElement;return n||document.documentElement}function Nt(n,e,t,r,i){if(!(!n.getBoundingClientRect&&n!==window)){var a,c,d,h,m,g,v;if(n!==window&&n.parentNode&&n!==Vr()?(a=n.getBoundingClientRect(),c=a.top,d=a.left,h=a.bottom,m=a.right,g=a.height,v=a.width):(c=0,d=0,h=window.innerHeight,m=window.innerWidth,g=window.innerHeight,v=window.innerWidth),(e||t)&&n!==window&&(i=i||n.parentNode,!mo))do if(i&&i.getBoundingClientRect&&(ge(i,"transform")!=="none"||t&&ge(i,"position")!=="static")){var p=i.getBoundingClientRect();c-=p.top+parseInt(ge(i,"border-top-width")),d-=p.left+parseInt(ge(i,"border-left-width")),h=c+a.height,m=d+a.width;break}while(i=i.parentNode);if(r&&n!==window){var w=ha(i||n),C=w&&w.a,T=w&&w.d;w&&(c/=T,d/=C,v/=C,g/=T,h=c+g,m=d+v)}return{top:c,left:d,bottom:h,right:m,width:v,height:g}}}function sv(n,e,t){for(var r=Uo(n,!0),i=Nt(n)[e];r;){var a=Nt(r)[t],c=void 0;if(c=i>=a,!c)return r;if(r===Vr())break;r=Uo(r,!1)}return!1}function va(n,e,t,r){for(var i=0,a=0,c=n.children;a<c.length;){if(c[a].style.display!=="none"&&c[a]!==pe.ghost&&(r||c[a]!==pe.dragged)&&Mr(c[a],t.draggable,n,!1)){if(i===e)return c[a];i++}a++}return null}function Rf(n,e){for(var t=n.lastElementChild;t&&(t===pe.ghost||ge(t,"display")==="none"||e&&!_l(t,e));)t=t.previousElementSibling;return t||null}function tr(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==pe.clone&&(!e||_l(n,e))&&t++;return t}function cv(n){var e=0,t=0,r=Vr();if(n)do{var i=ha(n),a=i.a,c=i.d;e+=n.scrollLeft*a,t+=n.scrollTop*c}while(n!==r&&(n=n.parentNode));return[e,t]}function Fx(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function Uo(n,e){if(!n||!n.getBoundingClientRect)return Vr();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=ge(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 Vr();if(r||e)return t;r=!0}}while(t=t.parentNode);return Vr()}function Bx(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function Vd(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var cs;function JC(n,e){return function(){if(!cs){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),cs=setTimeout(function(){cs=void 0},e)}}}function Vx(){clearTimeout(cs),cs=void 0}function QC(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function XC(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}var Ln="Sortable"+new Date().getTime();function Hx(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(ge(i,"display")==="none"||i===pe.ghost)){n.push({target:i,rect:Nt(i)});var a=$r({},n[n.length-1].rect);if(i.thisAnimationDuration){var c=ha(i,!0);c&&(a.top-=c.f,a.left-=c.e)}i.fromRect=a}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(Fx(n,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var a=!1,c=0;n.forEach(function(d){var h=0,m=d.target,g=m.fromRect,v=Nt(m),p=m.prevFromRect,w=m.prevToRect,C=d.rect,T=ha(m,!0);T&&(v.top-=T.f,v.left-=T.e),m.toRect=v,m.thisAnimationDuration&&Vd(p,v)&&!Vd(g,v)&&(C.top-v.top)/(C.left-v.left)===(g.top-v.top)/(g.left-v.left)&&(h=Kx(C,p,w,i.options)),Vd(v,g)||(m.prevFromRect=g,m.prevToRect=v,h||(h=i.options.animation),i.animate(m,C,v,h)),h&&(a=!0,c=Math.max(c,h),clearTimeout(m.animationResetTimer),m.animationResetTimer=setTimeout(function(){m.animationTime=0,m.prevFromRect=null,m.fromRect=null,m.prevToRect=null,m.thisAnimationDuration=null},h),m.thisAnimationDuration=h)}),clearTimeout(e),a?e=setTimeout(function(){typeof r=="function"&&r()},c):typeof r=="function"&&r(),n=[]},animate:function(r,i,a,c){if(c){ge(r,"transition",""),ge(r,"transform","");var d=ha(this.el),h=d&&d.a,m=d&&d.d,g=(i.left-a.left)/(h||1),v=(i.top-a.top)/(m||1);r.animatingX=!!g,r.animatingY=!!v,ge(r,"transform","translate3d("+g+"px,"+v+"px,0)"),this.forRepaintDummy=$x(r),ge(r,"transition","transform "+c+"ms"+(this.options.easing?" "+this.options.easing:"")),ge(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){ge(r,"transition",""),ge(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},c)}}}}function $x(n){return n.offsetWidth}function Kx(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var zi=[],Hd={initializeByDefault:!0},Ls={mount:function(e){for(var t in Hd)Hd.hasOwnProperty(t)&&!(t in e)&&(e[t]=Hd[t]);zi.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),zi.push(e)},pluginEvent:function(e,t,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var a=e+"Global";zi.forEach(function(c){t[c.pluginName]&&(t[c.pluginName][a]&&t[c.pluginName][a]($r({sortable:t},r)),t.options[c.pluginName]&&t[c.pluginName][e]&&t[c.pluginName][e]($r({sortable:t},r)))})},initializePlugins:function(e,t,r,i){zi.forEach(function(d){var h=d.pluginName;if(!(!e.options[h]&&!d.initializeByDefault)){var m=new d(e,t,e.options);m.sortable=e,m.options=e.options,e[h]=m,ho(r,m.defaults)}});for(var a in e.options)if(e.options.hasOwnProperty(a)){var c=this.modifyOption(e,a,e.options[a]);typeof c<"u"&&(e.options[a]=c)}},getEventProperties:function(e,t){var r={};return zi.forEach(function(i){typeof i.eventProperties=="function"&&ho(r,i.eventProperties.call(t[i.pluginName],e))}),r},modifyOption:function(e,t,r){var i;return zi.forEach(function(a){e[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(i=a.optionListeners[t].call(e[a.pluginName],r))}),i}};function Wx(n){var e=n.sortable,t=n.rootEl,r=n.name,i=n.targetEl,a=n.cloneEl,c=n.toEl,d=n.fromEl,h=n.oldIndex,m=n.newIndex,g=n.oldDraggableIndex,v=n.newDraggableIndex,p=n.originalEvent,w=n.putSortable,C=n.extraEventProperties;if(e=e||t&&t[Ln],!!e){var T,k=e.options,I="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!mo&&!Ds?T=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(r,!0,!0)),T.to=c||t,T.from=d||t,T.item=i||t,T.clone=a,T.oldIndex=h,T.newIndex=m,T.oldDraggableIndex=g,T.newDraggableIndex=v,T.originalEvent=p,T.pullMode=w?w.lastPutMode:void 0;var N=$r($r({},C),Ls.getEventProperties(r,e));for(var O in N)T[O]=N[O];t&&t.dispatchEvent(T),k[I]&&k[I].call(e,T)}}var zx=["evt"],gn=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,a=Dx(r,zx);Ls.pluginEvent.bind(pe)(e,t,$r({dragEl:X,parentEl:ft,ghostEl:Ee,rootEl:st,nextEl:ci,lastDownEl:ol,cloneEl:mt,cloneHidden:Mo,dragStarted:ts,putSortable:Wt,activeSortable:pe.active,originalEvent:i,oldIndex:ca,oldDraggableIndex:ls,newIndex:Nn,newDraggableIndex:Po,hideGhostForTarget:nE,unhideGhostForTarget:rE,cloneNowHidden:function(){Mo=!0},cloneNowShown:function(){Mo=!1},dispatchSortableEvent:function(d){cn({sortable:t,name:d,originalEvent:i})}},a))};function cn(n){Wx($r({putSortable:Wt,cloneEl:mt,targetEl:X,rootEl:st,oldIndex:ca,oldDraggableIndex:ls,newIndex:Nn,newDraggableIndex:Po},n))}var X,ft,Ee,st,ci,ol,mt,Mo,ca,Nn,ls,Po,Dc,Wt,ta=!1,vl=!1,yl=[],oi,dr,$d,Kd,lv,uv,ts,Gi,us,ds=!1,Lc=!1,il,jt,Wd=[],Ph=!1,Cl=[],Yl=typeof document<"u",xc=qC,dv=Ds||mo?"cssFloat":"float",Gx=Yl&&!xx&&!qC&&"draggable"in document.createElement("div"),ZC=function(){if(Yl){if(mo)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),eE=function(e,t){var r=ge(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=va(e,0,t),c=va(e,1,t),d=a&&ge(a),h=c&&ge(c),m=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Nt(a).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+Nt(c).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&d.float&&d.float!=="none"){var v=d.float==="left"?"left":"right";return c&&(h.clear==="both"||h.clear===v)?"vertical":"horizontal"}return a&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||m>=i&&r[dv]==="none"||c&&r[dv]==="none"&&m+g>i)?"vertical":"horizontal"},qx=function(e,t,r){var i=r?e.left:e.top,a=r?e.right:e.bottom,c=r?e.width:e.height,d=r?t.left:t.top,h=r?t.right:t.bottom,m=r?t.width:t.height;return i===d||a===h||i+c/2===d+m/2},Yx=function(e,t){var r;return yl.some(function(i){var a=i[Ln].options.emptyInsertThreshold;if(!(!a||Rf(i))){var c=Nt(i),d=e>=c.left-a&&e<=c.right+a,h=t>=c.top-a&&t<=c.bottom+a;if(d&&h)return r=i}}),r},tE=function(e){function t(a,c){return function(d,h,m,g){var v=d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name;if(a==null&&(c||v))return!0;if(a==null||a===!1)return!1;if(c&&a==="clone")return a;if(typeof a=="function")return t(a(d,h,m,g),c)(d,h,m,g);var p=(c?d:h).options.group.name;return a===!0||typeof a=="string"&&a===p||a.join&&a.indexOf(p)>-1}}var r={},i=e.group;(!i||rl(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=t(i.pull,!0),r.checkPut=t(i.put),r.revertClone=i.revertClone,e.group=r},nE=function(){!ZC&&Ee&&ge(Ee,"display","none")},rE=function(){!ZC&&Ee&&ge(Ee,"display","")};Yl&&document.addEventListener("click",function(n){if(vl)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),vl=!1,!1},!0);var ii=function(e){if(X){e=e.touches?e.touches[0]:e;var t=Yx(e.clientX,e.clientY);if(t){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[Ln]._onDragOver(r)}}},jx=function(e){X&&X.parentNode[Ln]._isOutsideThisEl(e.target)};function pe(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=ho({},e),n[Ln]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return eE(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(c,d){c.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:pe.supportPointer!==!1&&"PointerEvent"in window&&!ss,emptyInsertThreshold:5};Ls.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);tE(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Gx,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Be(n,"pointerdown",this._onTapStart):(Be(n,"mousedown",this._onTapStart),Be(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Be(n,"dragover",this),Be(n,"dragenter",this)),yl.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ho(this,Hx())}pe.prototype={constructor:pe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Gi=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,X):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,i=this.options,a=i.preventOnFilter,c=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,h=(d||e).target,m=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||h,g=i.filter;if(rU(r),!X&&!(/mousedown|pointerdown/.test(c)&&e.button!==0||i.disabled)&&!m.isContentEditable&&!(!this.nativeDraggable&&ss&&h&&h.tagName.toUpperCase()==="SELECT")&&(h=Mr(h,i.draggable,r,!1),!(h&&h.animated)&&ol!==h)){if(ca=tr(h),ls=tr(h,i.draggable),typeof g=="function"){if(g.call(this,e,h,this)){cn({sortable:t,rootEl:m,name:"filter",targetEl:h,toEl:r,fromEl:r}),gn("filter",t,{evt:e}),a&&e.cancelable&&e.preventDefault();return}}else if(g&&(g=g.split(",").some(function(v){if(v=Mr(m,v.trim(),r,!1),v)return cn({sortable:t,rootEl:v,name:"filter",targetEl:h,fromEl:r,toEl:r}),gn("filter",t,{evt:e}),!0}),g)){a&&e.cancelable&&e.preventDefault();return}i.handle&&!Mr(m,i.handle,r,!1)||this._prepareDragStart(e,d,h)}}},_prepareDragStart:function(e,t,r){var i=this,a=i.el,c=i.options,d=a.ownerDocument,h;if(r&&!X&&r.parentNode===a){var m=Nt(r);if(st=a,X=r,ft=X.parentNode,ci=X.nextSibling,ol=r,Dc=c.group,pe.dragged=X,oi={target:X,clientX:(t||e).clientX,clientY:(t||e).clientY},lv=oi.clientX-m.left,uv=oi.clientY-m.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,X.style["will-change"]="all",h=function(){if(gn("delayEnded",i,{evt:e}),pe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!iv&&i.nativeDraggable&&(X.draggable=!0),i._triggerDragStart(e,t),cn({sortable:i,name:"choose",originalEvent:e}),kn(X,c.chosenClass,!0)},c.ignore.split(",").forEach(function(g){jC(X,g.trim(),zd)}),Be(d,"dragover",ii),Be(d,"mousemove",ii),Be(d,"touchmove",ii),Be(d,"mouseup",i._onDrop),Be(d,"touchend",i._onDrop),Be(d,"touchcancel",i._onDrop),iv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,X.draggable=!0),gn("delayStart",this,{evt:e}),c.delay&&(!c.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ds||mo))){if(pe.eventCanceled){this._onDrop();return}Be(d,"mouseup",i._disableDelayedDrag),Be(d,"touchend",i._disableDelayedDrag),Be(d,"touchcancel",i._disableDelayedDrag),Be(d,"mousemove",i._delayedDragTouchMoveHandler),Be(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&Be(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(h,c.delay)}else h()}},_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(){X&&zd(X),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Le(e,"mouseup",this._disableDelayedDrag),Le(e,"touchend",this._disableDelayedDrag),Le(e,"touchcancel",this._disableDelayedDrag),Le(e,"mousemove",this._delayedDragTouchMoveHandler),Le(e,"touchmove",this._delayedDragTouchMoveHandler),Le(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Be(document,"pointermove",this._onTouchMove):t?Be(document,"touchmove",this._onTouchMove):Be(document,"mousemove",this._onTouchMove):(Be(X,"dragend",this),Be(st,"dragstart",this._onDragStart));try{document.selection?al(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(ta=!1,st&&X){gn("dragStarted",this,{evt:t}),this.nativeDraggable&&Be(document,"dragover",jx);var r=this.options;!e&&kn(X,r.dragClass,!1),kn(X,r.ghostClass,!0),pe.active=this,e&&this._appendGhost(),cn({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(dr){this._lastX=dr.clientX,this._lastY=dr.clientY,nE();for(var e=document.elementFromPoint(dr.clientX,dr.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(dr.clientX,dr.clientY),e!==t);)t=e;if(X.parentNode[Ln]._isOutsideThisEl(e),t)do{if(t[Ln]){var r=void 0;if(r=t[Ln]._onDragOver({clientX:dr.clientX,clientY:dr.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);rE()}},_onTouchMove:function(e){if(oi){var t=this.options,r=t.fallbackTolerance,i=t.fallbackOffset,a=e.touches?e.touches[0]:e,c=Ee&&ha(Ee,!0),d=Ee&&c&&c.a,h=Ee&&c&&c.d,m=xc&&jt&&cv(jt),g=(a.clientX-oi.clientX+i.x)/(d||1)+(m?m[0]-Wd[0]:0)/(d||1),v=(a.clientY-oi.clientY+i.y)/(h||1)+(m?m[1]-Wd[1]:0)/(h||1);if(!pe.active&&!ta){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Ee){c?(c.e+=g-($d||0),c.f+=v-(Kd||0)):c={a:1,b:0,c:0,d:1,e:g,f:v};var p="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")");ge(Ee,"webkitTransform",p),ge(Ee,"mozTransform",p),ge(Ee,"msTransform",p),ge(Ee,"transform",p),$d=g,Kd=v,dr=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Ee){var e=this.options.fallbackOnBody?document.body:st,t=Nt(X,!0,xc,!0,e),r=this.options;if(xc){for(jt=e;ge(jt,"position")==="static"&&ge(jt,"transform")==="none"&&jt!==document;)jt=jt.parentNode;jt!==document.body&&jt!==document.documentElement?(jt===document&&(jt=Vr()),t.top+=jt.scrollTop,t.left+=jt.scrollLeft):jt=Vr(),Wd=cv(jt)}Ee=X.cloneNode(!0),kn(Ee,r.ghostClass,!1),kn(Ee,r.fallbackClass,!0),kn(Ee,r.dragClass,!0),ge(Ee,"transition",""),ge(Ee,"transform",""),ge(Ee,"box-sizing","border-box"),ge(Ee,"margin",0),ge(Ee,"top",t.top),ge(Ee,"left",t.left),ge(Ee,"width",t.width),ge(Ee,"height",t.height),ge(Ee,"opacity","0.8"),ge(Ee,"position",xc?"absolute":"fixed"),ge(Ee,"zIndex","100000"),ge(Ee,"pointerEvents","none"),pe.ghost=Ee,e.appendChild(Ee),ge(Ee,"transform-origin",lv/parseInt(Ee.style.width)*100+"% "+uv/parseInt(Ee.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,i=e.dataTransfer,a=r.options;if(gn("dragStart",this,{evt:e}),pe.eventCanceled){this._onDrop();return}gn("setupClone",this),pe.eventCanceled||(mt=XC(X),mt.draggable=!1,mt.style["will-change"]="",this._hideClone(),kn(mt,this.options.chosenClass,!1),pe.clone=mt),r.cloneId=al(function(){gn("clone",r),!pe.eventCanceled&&(r.options.removeCloneOnHide||st.insertBefore(mt,X),r._hideClone(),cn({sortable:r,name:"clone"}))}),!t&&kn(X,a.dragClass,!0),t?(vl=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Le(document,"mouseup",r._onDrop),Le(document,"touchend",r._onDrop),Le(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(r,i,X)),Be(document,"drop",r),ge(X,"transform","translateZ(0)")),ta=!0,r._dragStartId=al(r._dragStarted.bind(r,t,e)),Be(document,"selectstart",r),ts=!0,ss&&ge(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,i,a,c,d=this.options,h=d.group,m=pe.active,g=Dc===h,v=d.sort,p=Wt||m,w,C=this,T=!1;if(Ph)return;function k(it,Ct){gn(it,C,$r({evt:e,isOwner:g,axis:w?"vertical":"horizontal",revert:c,dragRect:i,targetRect:a,canSort:v,fromSortable:p,target:r,completed:N,onMove:function(It,Go){return Uc(st,t,X,i,It,Nt(It),e,Go)},changed:O},Ct))}function I(){k("dragOverAnimationCapture"),C.captureAnimationState(),C!==p&&p.captureAnimationState()}function N(it){return k("dragOverCompleted",{insertion:it}),it&&(g?m._hideClone():m._showClone(C),C!==p&&(kn(X,Wt?Wt.options.ghostClass:m.options.ghostClass,!1),kn(X,d.ghostClass,!0)),Wt!==C&&C!==pe.active?Wt=C:C===pe.active&&Wt&&(Wt=null),p===C&&(C._ignoreWhileAnimating=r),C.animateAll(function(){k("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===X&&!X.animated||r===t&&!r.animated)&&(Gi=null),!d.dragoverBubble&&!e.rootEl&&r!==document&&(X.parentNode[Ln]._isOutsideThisEl(e.target),!it&&ii(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),T=!0}function O(){Nn=tr(X),Po=tr(X,d.draggable),cn({sortable:C,name:"change",toEl:t,newIndex:Nn,newDraggableIndex:Po,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Mr(r,d.draggable,t,!0),k("dragOver"),pe.eventCanceled)return T;if(X.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||C._ignoreWhileAnimating===r)return N(!1);if(vl=!1,m&&!d.disabled&&(g?v||(c=ft!==st):Wt===this||(this.lastPutMode=Dc.checkPull(this,m,X,e))&&h.checkPut(this,m,X,e))){if(w=this._getDirection(e,r)==="vertical",i=Nt(X),k("dragOverValid"),pe.eventCanceled)return T;if(c)return ft=st,I(),this._hideClone(),k("revert"),pe.eventCanceled||(ci?st.insertBefore(X,ci):st.appendChild(X)),N(!0);var L=Rf(t,d.draggable);if(!L||Zx(e,w,this)&&!L.animated){if(L===X)return N(!1);if(L&&t===e.target&&(r=L),r&&(a=Nt(r)),Uc(st,t,X,i,r,a,e,!!r)!==!1)return I(),t.appendChild(X),ft=t,O(),N(!0)}else if(L&&Xx(e,w,this)){var $=va(t,0,d,!0);if($===X)return N(!1);if(r=$,a=Nt(r),Uc(st,t,X,i,r,a,e,!1)!==!1)return I(),t.insertBefore(X,$),ft=t,O(),N(!0)}else if(r.parentNode===t){a=Nt(r);var G=0,D,se=X.parentNode!==t,ie=!qx(X.animated&&X.toRect||i,r.animated&&r.toRect||a,w),Q=w?"top":"left",Z=sv(r,"top","top")||sv(X,"top","top"),le=Z?Z.scrollTop:void 0;Gi!==r&&(D=a[Q],ds=!1,Lc=!ie&&d.invertSwap||se),G=eU(e,r,a,w,ie?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Lc,Gi===r);var Ue;if(G!==0){var yt=tr(X);do yt-=G,Ue=ft.children[yt];while(Ue&&(ge(Ue,"display")==="none"||Ue===Ee))}if(G===0||Ue===r)return N(!1);Gi=r,us=G;var nn=r.nextElementSibling,Gt=!1;Gt=G===1;var Pt=Uc(st,t,X,i,r,a,e,Gt);if(Pt!==!1)return(Pt===1||Pt===-1)&&(Gt=Pt===1),Ph=!0,setTimeout(Qx,30),I(),Gt&&!nn?t.appendChild(X):r.parentNode.insertBefore(X,Gt?nn:r),Z&&QC(Z,0,le-Z.scrollTop),ft=X.parentNode,D!==void 0&&!Lc&&(il=Math.abs(D-Nt(r)[Q])),O(),N(!0)}if(t.contains(X))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Le(document,"mousemove",this._onTouchMove),Le(document,"touchmove",this._onTouchMove),Le(document,"pointermove",this._onTouchMove),Le(document,"dragover",ii),Le(document,"mousemove",ii),Le(document,"touchmove",ii)},_offUpEvents:function(){var e=this.el.ownerDocument;Le(e,"mouseup",this._onDrop),Le(e,"touchend",this._onDrop),Le(e,"pointerup",this._onDrop),Le(e,"touchcancel",this._onDrop),Le(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Nn=tr(X),Po=tr(X,r.draggable),gn("drop",this,{evt:e}),ft=X&&X.parentNode,Nn=tr(X),Po=tr(X,r.draggable),pe.eventCanceled){this._nulling();return}ta=!1,Lc=!1,ds=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Mh(this.cloneId),Mh(this._dragStartId),this.nativeDraggable&&(Le(document,"drop",this),Le(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ss&&ge(document.body,"user-select",""),ge(X,"transform",""),e&&(ts&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Ee&&Ee.parentNode&&Ee.parentNode.removeChild(Ee),(st===ft||Wt&&Wt.lastPutMode!=="clone")&&mt&&mt.parentNode&&mt.parentNode.removeChild(mt),X&&(this.nativeDraggable&&Le(X,"dragend",this),zd(X),X.style["will-change"]="",ts&&!ta&&kn(X,Wt?Wt.options.ghostClass:this.options.ghostClass,!1),kn(X,this.options.chosenClass,!1),cn({sortable:this,name:"unchoose",toEl:ft,newIndex:null,newDraggableIndex:null,originalEvent:e}),st!==ft?(Nn>=0&&(cn({rootEl:ft,name:"add",toEl:ft,fromEl:st,originalEvent:e}),cn({sortable:this,name:"remove",toEl:ft,originalEvent:e}),cn({rootEl:ft,name:"sort",toEl:ft,fromEl:st,originalEvent:e}),cn({sortable:this,name:"sort",toEl:ft,originalEvent:e})),Wt&&Wt.save()):Nn!==ca&&Nn>=0&&(cn({sortable:this,name:"update",toEl:ft,originalEvent:e}),cn({sortable:this,name:"sort",toEl:ft,originalEvent:e})),pe.active&&((Nn==null||Nn===-1)&&(Nn=ca,Po=ls),cn({sortable:this,name:"end",toEl:ft,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){gn("nulling",this),st=X=ft=Ee=ci=mt=ol=Mo=oi=dr=ts=Nn=Po=ca=ls=Gi=us=Wt=Dc=pe.dragged=pe.ghost=pe.clone=pe.active=null,Cl.forEach(function(e){e.checked=!0}),Cl.length=$d=Kd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":X&&(this._onDragOver(e),Jx(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,i=0,a=r.length,c=this.options;i<a;i++)t=r[i],Mr(t,c.draggable,this.el,!1)&&e.push(t.getAttribute(c.dataIdAttr)||nU(t));return e},sort:function(e,t){var r={},i=this.el;this.toArray().forEach(function(a,c){var d=i.children[c];Mr(d,this.options.draggable,i,!1)&&(r[a]=d)},this),t&&this.captureAnimationState(),e.forEach(function(a){r[a]&&(i.removeChild(r[a]),i.appendChild(r[a]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Mr(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var i=Ls.modifyOption(this,e,t);typeof i<"u"?r[e]=i:r[e]=t,e==="group"&&tE(r)},destroy:function(){gn("destroy",this);var e=this.el;e[Ln]=null,Le(e,"mousedown",this._onTapStart),Le(e,"touchstart",this._onTapStart),Le(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Le(e,"dragover",this),Le(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),yl.splice(yl.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Mo){if(gn("hideClone",this),pe.eventCanceled)return;ge(mt,"display","none"),this.options.removeCloneOnHide&&mt.parentNode&&mt.parentNode.removeChild(mt),Mo=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Mo){if(gn("showClone",this),pe.eventCanceled)return;X.parentNode==st&&!this.options.group.revertClone?st.insertBefore(mt,X):ci?st.insertBefore(mt,ci):st.appendChild(mt),this.options.group.revertClone&&this.animate(X,mt),ge(mt,"display",""),Mo=!1}}};function Jx(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Uc(n,e,t,r,i,a,c,d){var h,m=n[Ln],g=m.options.onMove,v;return window.CustomEvent&&!mo&&!Ds?h=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent("move",!0,!0)),h.to=e,h.from=n,h.dragged=t,h.draggedRect=r,h.related=i||e,h.relatedRect=a||Nt(e),h.willInsertAfter=d,h.originalEvent=c,n.dispatchEvent(h),g&&(v=g.call(m,h,c)),v}function zd(n){n.draggable=!1}function Qx(){Ph=!1}function Xx(n,e,t){var r=Nt(va(t.el,0,t.options,!0)),i=10;return e?n.clientX<r.left-i||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-i||n.clientY<r.bottom&&n.clientX<r.left}function Zx(n,e,t){var r=Nt(Rf(t.el,t.options.draggable)),i=10;return e?n.clientX>r.right+i||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+i}function eU(n,e,t,r,i,a,c,d){var h=r?n.clientY:n.clientX,m=r?t.height:t.width,g=r?t.top:t.left,v=r?t.bottom:t.right,p=!1;if(!c){if(d&&il<m*i){if(!ds&&(us===1?h>g+m*a/2:h<v-m*a/2)&&(ds=!0),ds)p=!0;else if(us===1?h<g+il:h>v-il)return-us}else if(h>g+m*(1-i)/2&&h<v-m*(1-i)/2)return tU(e)}return p=p||c,p&&(h<g+m*a/2||h>v-m*a/2)?h>g+m/2?1:-1:0}function tU(n){return tr(X)<tr(n)?1:-1}function nU(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function rU(n){Cl.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&Cl.push(r)}}function al(n){return setTimeout(n,0)}function Mh(n){return clearTimeout(n)}Yl&&Be(document,"touchmove",function(n){(pe.active||ta)&&n.cancelable&&n.preventDefault()});pe.utils={on:Be,off:Le,css:ge,find:jC,is:function(e,t){return!!Mr(e,t,e,!1)},extend:Bx,throttle:JC,closest:Mr,toggleClass:kn,clone:XC,index:tr,nextTick:al,cancelNextTick:Mh,detectDirection:eE,getChild:va};pe.get=function(n){return n[Ln]};pe.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(pe.utils=$r($r({},pe.utils),r.utils)),Ls.mount(r)})};pe.create=function(n,e){return new pe(n,e)};pe.version=Lx;var Et=[],ns,Dh,Lh=!1,Gd,qd,El,rs;function oU(){function n(){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 n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?Be(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Be(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Be(document,"touchmove",this._handleFallbackAutoScroll):Be(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Le(document,"dragover",this._handleAutoScroll):(Le(document,"pointermove",this._handleFallbackAutoScroll),Le(document,"touchmove",this._handleFallbackAutoScroll),Le(document,"mousemove",this._handleFallbackAutoScroll)),hv(),sl(),Vx()},nulling:function(){El=Dh=ns=Lh=rs=Gd=qd=null,Et.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var i=this,a=(t.touches?t.touches[0]:t).clientX,c=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(a,c);if(El=t,r||this.options.forceAutoScrollFallback||Ds||mo||ss){Yd(t,this.options,d,r);var h=Uo(d,!0);Lh&&(!rs||a!==Gd||c!==qd)&&(rs&&hv(),rs=setInterval(function(){var m=Uo(document.elementFromPoint(a,c),!0);m!==h&&(h=m,sl()),Yd(t,i.options,m,r)},10),Gd=a,qd=c)}else{if(!this.options.bubbleScroll||Uo(d,!0)===Vr()){sl();return}Yd(t,this.options,Uo(d,!1),!1)}}},ho(n,{pluginName:"scroll",initializeByDefault:!0})}function sl(){Et.forEach(function(n){clearInterval(n.pid)}),Et=[]}function hv(){clearInterval(rs)}var Yd=JC(function(n,e,t,r){if(e.scroll){var i=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,c=e.scrollSensitivity,d=e.scrollSpeed,h=Vr(),m=!1,g;Dh!==t&&(Dh=t,sl(),ns=e.scroll,g=e.scrollFn,ns===!0&&(ns=Uo(t,!0)));var v=0,p=ns;do{var w=p,C=Nt(w),T=C.top,k=C.bottom,I=C.left,N=C.right,O=C.width,L=C.height,$=void 0,G=void 0,D=w.scrollWidth,se=w.scrollHeight,ie=ge(w),Q=w.scrollLeft,Z=w.scrollTop;w===h?($=O<D&&(ie.overflowX==="auto"||ie.overflowX==="scroll"||ie.overflowX==="visible"),G=L<se&&(ie.overflowY==="auto"||ie.overflowY==="scroll"||ie.overflowY==="visible")):($=O<D&&(ie.overflowX==="auto"||ie.overflowX==="scroll"),G=L<se&&(ie.overflowY==="auto"||ie.overflowY==="scroll"));var le=$&&(Math.abs(N-i)<=c&&Q+O<D)-(Math.abs(I-i)<=c&&!!Q),Ue=G&&(Math.abs(k-a)<=c&&Z+L<se)-(Math.abs(T-a)<=c&&!!Z);if(!Et[v])for(var yt=0;yt<=v;yt++)Et[yt]||(Et[yt]={});(Et[v].vx!=le||Et[v].vy!=Ue||Et[v].el!==w)&&(Et[v].el=w,Et[v].vx=le,Et[v].vy=Ue,clearInterval(Et[v].pid),(le!=0||Ue!=0)&&(m=!0,Et[v].pid=setInterval((function(){r&&this.layer===0&&pe.active._onTouchMove(El);var nn=Et[this.layer].vy?Et[this.layer].vy*d:0,Gt=Et[this.layer].vx?Et[this.layer].vx*d:0;typeof g=="function"&&g.call(pe.dragged.parentNode[Ln],Gt,nn,n,El,Et[this.layer].el)!=="continue"||QC(Et[this.layer].el,Gt,nn)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&p!==h&&(p=Uo(p,!1)));Lh=m}},30),oE=function(e){var t=e.originalEvent,r=e.putSortable,i=e.dragEl,a=e.activeSortable,c=e.dispatchSortableEvent,d=e.hideGhostForTarget,h=e.unhideGhostForTarget;if(t){var m=r||a;d();var g=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(g.clientX,g.clientY);h(),m&&!m.el.contains(v)&&(c("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Of(){}Of.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=va(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:oE};ho(Of,{pluginName:"revertOnSpill"});function Pf(){}Pf.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,i=r||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:oE};ho(Pf,{pluginName:"removeOnSpill"});pe.mount(new oU);pe.mount(Pf,Of);function iU(){return typeof window<"u"?window.console:global.console}const aU=iU();function sU(n){const e=Object.create(null);return function(r){return e[r]||(e[r]=n(r))}}const cU=/-(\w)/g,fv=sU(n=>n.replace(cU,(e,t)=>t?t.toUpperCase():""));function jd(n){n.parentElement!==null&&n.parentElement.removeChild(n)}function mv(n,e,t){const r=t===0?n.children[0]:n.children[t-1].nextSibling;n.insertBefore(e,r)}function lU(n,e){return Object.values(n).indexOf(e)}function uU(n,e,t,r){if(!n)return[];const i=Object.values(n),a=e.length-r;return[...e].map((d,h)=>h>=a?i.length:i.indexOf(d))}function iE(n,e){this.$nextTick(()=>this.$emit(n.toLowerCase(),e))}function dU(n){return e=>{this.realList!==null&&this["onDrag"+n](e),iE.call(this,n,e)}}function hU(n){return["transition-group","TransitionGroup"].includes(n)}function fU(n){if(!n||n.length!==1)return!1;const[{type:e}]=n;return e?hU(e.name):!1}function mU(n,e){return e?{...e.props,...e.attrs}:n}const xh=["Start","Add","Remove","Update","End"],Uh=["Choose","Unchoose","Sort","Filter","Clone"],gU=["Move",...xh,...Uh].map(n=>"on"+n);let Jd=null;const pU={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:n=>n},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}},_U=l.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...xh.map(n=>n.toLowerCase()),...Uh.map(n=>n.toLowerCase())],props:pU,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const n=this.$slots.default?this.$slots.default():null,e=mU(this.$attrs,this.componentData);return n?(this.transitionMode=fU(n),l.h(this.getTag(),e,n)):l.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&aU.error("list props are mutually exclusive! Please set one.")},mounted(){const n={};xh.forEach(i=>{n["on"+i]=dU.call(this,i)}),Uh.forEach(i=>{n["on"+i]=iE.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,a)=>(i[fv(a)]=this.$attrs[a],i),{}),t=Object.assign({},e,n,{onMove:(i,a)=>this.onDragMove(i,a)});!("draggable"in t)&&(t.draggable=">*");const r=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new pe(r,t),r.__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(n){this.updateOptions(n)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?l.resolveComponent(this.component):this.tag},updateOptions(n){for(var e in n){const t=fv(e);gU.indexOf(t)===-1&&this._sortable.option(t,n[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=uU(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(n){const e=lU(this.getChildrenNodes()||[],n);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(n){this.$nextTick(()=>{this.$emit("change",n)})},alterList(n){if(this.list){n(this.list);return}const e=[...this.modelValue];n(e),this.$emit("update:modelValue",e)},spliceList(){const n=e=>e.splice(...arguments);this.alterList(n)},updatePosition(n,e){const t=r=>r.splice(e,0,r.splice(n,1)[0]);this.alterList(t)},getVmIndex(n){const e=this.visibleIndexes,t=e.length;return n>t-1?t:e[n]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(n){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[n].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(n){this.computeIndexes(),this.context=this.getUnderlyingVm(n.item),this.context&&(n.item._underlying_vm_=this.clone(this.context.element),Jd=n.item)},onDragAdd(n){const e=n.item._underlying_vm_;if(e===void 0)return;jd(n.item);const t=this.getVmIndex(n.newIndex);this.spliceList(t,0,e),this.computeIndexes();const r={element:e,newIndex:t};this.emitChanges({added:r})},onDragRemove(n){if(mv(this.$el,n.item,n.oldIndex),n.pullMode==="clone"){jd(n.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(n){jd(n.item),mv(n.from,n.item,n.oldIndex);const e=this.context.index,t=this.getVmIndex(n.newIndex);this.updatePosition(e,t);const r={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:r})},updateProperty(n,e){n.hasOwnProperty(e)&&(n[e]+=this.headerOffset)},onDragMove(n,e){const t=this.move;if(!t||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(n),i=this.context,a=this.computeFutureIndex(r,n);Object.assign(i,{futureIndex:a});const c=Object.assign({},n,{relatedContext:r,draggedContext:i});return t(c,e)},onDragEnd(){this.computeIndexes(),Jd=null},getTrargetedComponent(n){return n.__draggable_component__},getRelatedContextFromMoveEvent({to:n,related:e}){const t=this.getTrargetedComponent(n);if(!t)return{component:t};const r=t.realList,i={list:r,component:t};if(n!==e&&r&&t.getUnderlyingVm){const a=t.getUnderlyingVm(e);if(a)return Object.assign(a,i)}return i},computeFutureIndex(n,e){const t=[...e.to.children].filter(c=>c.style.display!=="none");if(t.length===0)return 0;const r=t.indexOf(e.related),i=n.component.getVmIndex(r);return t.indexOf(Jd)!==-1||!e.willInsertAfter?i:i+1}}}),vU={class:"d-flex flex-row align-center"},Mf=l.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const e=l.useModel(n,"modelValue"),t=l.ref(""),r=l.computed(()=>{var i;return(i=e.value)==null?void 0:i.filter(a=>a.title.toLowerCase().includes(t.value.toLowerCase()))});return(i,a)=>{const c=l.resolveComponent("v-list-item-content");return l.openBlock(),l.createBlock(Os,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:l.withCtx(()=>[l.createVNode(ql,{modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=d=>t.value=d)},null,8,["modelValue"]),l.createVNode(Jt.VList,null,{default:l.withCtx(()=>[l.createVNode(l.unref(_U),{list:r.value,animation:200,"ghost-class":"ghost-card"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,d=>(l.openBlock(),l.createBlock(Jt.VListItem,{key:d.key,class:"pa-0"},{default:l.withCtx(()=>[l.createElementVNode("div",vU,[l.createVNode(l.unref(iP),{class:"cursor-grab mb-2"}),l.createVNode(Jt.VListItemAction,null,{default:l.withCtx(()=>[l.createVNode(gO.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":h=>d.checked=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),l.createVNode(c,null,{default:l.withCtx(()=>[l.createVNode(Jt.VListItemTitle,{class:"mb-1"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d.title)+" ",1)]),_:2},1024)]),_:2},1024),d.icon?(l.openBlock(),l.createBlock(fl.VIcon,{key:0},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d.icon),1)]),_:2},1024)):l.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),yU=["src","height","width"],CU={key:0,class:"text-center text-h6"},EU={key:1,class:"text-center text-h5"},wU={key:0,class:"text-center"},TU={class:"d-flex justify-center align-center mt-4 ga-3"},Df=l.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(n){const e=n,t=()=>{var i;return((i=e.columns.find(a=>a.isHeader))==null?void 0:i.key)||""},r=()=>{var i;return((i=e.columns.find(a=>a.isSubtitle))==null?void 0:i.key)||""};return(i,a)=>(l.openBlock(),l.createBlock(Lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:l.withCtx(()=>[l.createVNode(Lt.VCardActions,null,{default:l.withCtx(()=>[l.createVNode(Je.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:l.withCtx(()=>[l.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),l.createVNode(Lt.VCardTitle,null,{default:l.withCtx(()=>[l.createVNode(Je.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:l.withCtx(()=>[i.image?(l.openBlock(),l.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,yU)):l.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(l.openBlock(),l.createElementBlock("div",CU,l.toDisplayString(i.item[t()]),1)):l.createCommentVNode("",!0),r()?(l.openBlock(),l.createElementBlock("div",EU,l.toDisplayString(i.item[r()]),1)):l.createCommentVNode("",!0),l.createVNode(mi.VDivider,{class:"ma-3"}),l.createVNode(Lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.columns,c=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:c.key},[i.item[c.key]&&!c.isHeader&&!c.isSubtitle?(l.openBlock(),l.createElementBlock("div",wU,l.toDisplayString(c.title)+": "+l.toDisplayString(i.item[c.key]),1)):l.createCommentVNode("",!0)],64))),128)),l.createElementVNode("div",TU,[i.tags?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(i.tags,c=>(l.openBlock(),l.createBlock(pO.VChip,{class:"pa-3",key:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(c),1)]),_:2},1024))),128)):l.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),bU=l.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(n){return(e,t)=>(l.openBlock(),l.createBlock(Je.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.data,r=>(l.openBlock(),l.createBlock(Je.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:r[e.itemKey]},{default:l.withCtx(()=>[l.createVNode(Df,{item:r,columns:e.columns,size:e.size},{actions:l.withCtx(({item:i})=>[l.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),aE=Ta(bU,[["__scopeId","data-v-e1a4ccbc"]]),IU={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},sE=l.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",IU,l.toDisplayString(e.value),1))}}),AU={key:0,class:"mb-2 ms-1"},cE=l.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=l.computed(()=>t.readonly?"solo":"solo-filled");return(a,c)=>(l.openBlock(),l.createElementBlock("div",null,[a.name?(l.openBlock(),l.createElementBlock("p",AU,l.toDisplayString(a.name),1)):l.createCommentVNode("",!0),a.label?(l.openBlock(),l.createBlock(gs.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.label),1)]),_:1})):l.createCommentVNode("",!0),a.readonly?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(Fo.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:a.type,density:a.density,rules:a.rules,value:a.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>r("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),a.readonly?(l.openBlock(),l.createBlock(sE,{key:3,value:a.modelValue},null,8,["value"])):l.createCommentVNode("",!0)]))}}),SU={class:"text-faded mt-7"},kU={class:"d-flex align-baseline mb-1"},NU={class:"me-1"},RU={class:"max-w-_form-metadataJ"},OU={key:0,class:"mb-1"},PU={key:1,class:"mb-1"},MU={class:"mb-1"},jl=l.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",SU,[l.createVNode(Je.VRow,{"no-gutters":"",class:"align-end ga-3",align:"center"},{default:l.withCtx(()=>[l.renderSlot(e.$slots,"default"),e.id?(l.openBlock(),l.createBlock(Je.VCol,{key:0,cols:"auto",class:"pa-2"},{default:l.withCtx(()=>[l.createElementVNode("p",kU,[l.createElementVNode("b",NU,l.toDisplayString(e.id.title)+": ",1),l.createElementVNode("span",RU,l.toDisplayString(e.id.key||"-"),1),l.createElementVNode("span",null,[l.createVNode(Ll,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),l.createElementVNode("p",null,[t[0]||(t[0]=l.createElementVNode("b",null,"Created: ",-1)),l.createTextVNode(l.toDisplayString(e.meta.created_at)+" - "+l.toDisplayString(e.meta.created_by),1)])]),_:1})):l.createCommentVNode("",!0),l.createVNode(Je.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:l.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(l.openBlock(),l.createElementBlock("p",OU,[t[1]||(t[1]=l.createElementVNode("b",null,"Updated: ",-1)),l.createTextVNode(l.toDisplayString(e.meta.updated_at)+" - "+l.toDisplayString(e.meta.updated_by),1)])):(l.openBlock(),l.createElementBlock("p",PU,[t[2]||(t[2]=l.createElementVNode("b",null,"Modified: ",-1)),l.createTextVNode(l.toDisplayString(e.meta.modified_at)+" - "+l.toDisplayString(e.meta.modified_by),1)])),l.createElementVNode("p",MU,[t[3]||(t[3]=l.createElementVNode("b",null,"Delegated: ",-1)),l.createTextVNode(l.toDisplayString(e.meta.delegated_at)+" - "+l.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),DU={key:0,class:"mb-2 ms-1"},lE=l.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean},clearable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=l.computed(()=>t.readonly?"solo":"solo-filled"),a=l.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(h=>h[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),c=d=>{r("update:modelValue",d)};return(d,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[d.name?(l.openBlock(),l.createElementBlock("p",DU,l.toDisplayString(d.name),1)):l.createCommentVNode("",!0),d.label?(l.openBlock(),l.createBlock(gs.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(d.label),1)]),_:1})):l.createCommentVNode("",!0),d.readonly?(l.openBlock(),l.createBlock(sE,{key:3,value:a.value},null,8,["value"])):(l.openBlock(),l.createBlock(l.unref(Fo.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[h[0]||(h[0]=m=>t.modelValue=m),c],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field",clearable:d.clearable},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density","clearable"]))],64))}}),LU={key:0,class:"mb-2 ms-1"},xU={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},uE=l.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=l.computed(()=>t.readonly?"solo":"solo-filled");return(a,c)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[a.name?(l.openBlock(),l.createElementBlock("p",LU,l.toDisplayString(a.name),1)):l.createCommentVNode("",!0),a.label?(l.openBlock(),l.createBlock(gs.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.label),1)]),_:1})):l.createCommentVNode("",!0),a.readonly?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_O.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:a.rows,hideDetails:a.hideDetails,value:a.modelValue,"onUpdate:modelValue":c[0]||(c[0]=d=>r("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),a.readonly?(l.openBlock(),l.createElementBlock("div",xU,l.toDisplayString(a.modelValue),1)):l.createCommentVNode("",!0)],64))}}),dE=l.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(n,{emit:e}){const t=e;return(r,i)=>(l.openBlock(),l.createBlock(ot.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=a=>t("cancel")),class:"me-2 j-btn-form"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.title?"Cancel":"Back"),1)]),_:1}))}}),hE=l.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(n,{emit:e}){const t=e,r=l.ref(!1);async function i(){r.value=!0,await t("onSave"),r.value=!1}return(a,c)=>(l.openBlock(),l.createBlock(ot.VBtn,{disabled:a.disabled,loading:r.value,color:"secondary",onClick:i,onKeydown:l.withKeys(i,["enter"]),class:"j-btn-form"},{default:l.withCtx(()=>c[0]||(c[0]=[l.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),UU={class:"mt-4"},fE=l.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=e;return(r,i)=>(l.openBlock(),l.createBlock(Vl,{title:r.title,class:"d-flex flex-column ma-0"},{default:l.withCtx(()=>[r.title?(l.openBlock(),l.createBlock(mi.VDivider,{key:0})):l.createCommentVNode("",!0),l.createElementVNode("div",UU,[l.renderSlot(r.$slots,"default")]),l.createVNode(Lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:l.withCtx(()=>[l.createVNode(Je.VRow,{justify:"space-between",class:"mt-4"},{default:l.withCtx(()=>[l.createVNode(Je.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:l.withCtx(()=>[l.createVNode(jl,{id:r.id,meta:r.metadata},null,8,["id","meta"])]),_:1}),l.createVNode(Je.VSpacer),l.createVNode(Je.VCol,{cols:"auto",class:"align-content-end"},{default:l.withCtx(()=>[l.createVNode(dE,{"cancel-return":r.cancelReturn,onCancel:i[0]||(i[0]=a=>t("onCancel"))},null,8,["cancel-return"]),l.createVNode(hE,{onOnSave:i[1]||(i[1]=a=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),FU={class:"d-flex align-items-center"},BU={key:0,class:"d-flex align-center"},VU={class:"ms-1"},HU={class:"d-flex"},$U={class:"d-flex mb-1 align-center"},KU={class:"min-w-100 relative"},mE=l.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(n,{emit:e}){var m;const t=n,r=e,i=l.getCurrentInstance(),a=((m=i==null?void 0:i.vnode.props)==null?void 0:m.onDisable)!==void 0,c=l.ref(t.readonly);function d(){c.value=!c.value,r("update:isEdition",c.value)}async function h(){r("delete"),r("disable")}return(g,v)=>(l.openBlock(),l.createElementBlock("div",FU,[g.id?(l.openBlock(),l.createElementBlock("div",BU,[v[0]||(v[0]=l.createElementVNode("b",null,"ID:",-1)),l.createElementVNode("span",VU,l.toDisplayString(g.id),1),l.createVNode(Ll,{"content-to-copy":g.id,size:20},null,8,["content-to-copy"])])):l.createCommentVNode("",!0),l.createVNode(Je.VSpacer),l.createElementVNode("div",HU,[l.createVNode(ot.VBtn,{onClick:h,variant:"text"},{default:l.withCtx(()=>[a?(l.openBlock(),l.createBlock(l.unref(Z0),{key:0,size:"11",class:"me-2"})):l.createCommentVNode("",!0),l.createVNode(fl.VIcon,{class:"me-2"},{default:l.withCtx(()=>v[1]||(v[1]=[l.createTextVNode("mdi-delete-outline")])),_:1}),l.createTextVNode(" "+l.toDisplayString(a?"Disable":"Delete"),1)]),_:1}),l.createElementVNode("div",$U,[l.createVNode(mi.VDivider,{class:"mx-2 my-1",vertical:""}),l.createElementVNode("div",KU,[l.withDirectives(l.createVNode(ot.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:l.withCtx(()=>v[2]||(v[2]=[l.createTextVNode(" Edit ")])),_:1},512),[[l.vShow,!c.value]]),l.withDirectives(l.createVNode(ot.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:l.withCtx(()=>[l.createVNode(fl.VIcon,{class:"pt-1 pe-2"},{default:l.withCtx(()=>v[3]||(v[3]=[l.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=l.createTextVNode(" Cancel "))]),_:1},512),[[l.vShow,c.value]])])])])]))}}),WU={class:"d-flex flex-column"},zU={class:"height d-flex flex-column"},GU={class:"d-flex justify-between align-end"},qU=l.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(n,{emit:e}){const t=e,r=l.getCurrentInstance(),i=l.computed(()=>{var c;return!!((c=r==null?void 0:r.vnode.props)!=null&&c.onOnSave)}),a=l.computed(()=>{var c;return!!((c=r==null?void 0:r.vnode.props)!=null&&c.onOnCancel)});return(c,d)=>(l.openBlock(),l.createBlock(Vl,null,{default:l.withCtx(()=>[l.createElementVNode("div",WU,[l.createElementVNode("div",zU,[l.renderSlot(c.$slots,"default",{},void 0,!0)])]),l.createElementVNode("div",GU,[l.createVNode(Je.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:l.withCtx(()=>[l.createVNode(Je.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:l.withCtx(()=>[l.createVNode(jl,{id:c.id,meta:c.metadata},null,8,["id","meta"])]),_:1}),c.readonly?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Je.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createBlock(dE,{key:0,title:"Back",onCancel:d[0]||(d[0]=h=>t("onCancel"))})):l.createCommentVNode("",!0),i.value?(l.openBlock(),l.createBlock(hE,{key:1,onOnSave:d[1]||(d[1]=h=>t("onSave"))})):l.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),gE=Ta(qU,[["__scopeId","data-v-515844c6"]]);/**
|
42
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
43
|
+
*
|
44
|
+
* This source code is licensed under the MIT license.
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
46
|
+
*/var gv={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
|
47
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
48
|
+
*
|
49
|
+
* This source code is licensed under the MIT license.
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
51
|
+
*/const xs=(n,e,t,r)=>({color:i="currentColor",size:a=24,stroke:c=2,title:d,class:h,...m},{attrs:g,slots:v})=>{let p=[...r.map(w=>l.h(...w)),...v.default?[v.default()]:[]];return d&&(p=[l.h("title",d),...p]),l.h("svg",{...gv[n],width:a,height:a,...g,class:["tabler-icon",`tabler-icon-${e}`],...n==="filled"?{fill:i}:{"stroke-width":c??gv[n]["stroke-width"],stroke:i},...m},p)};/**
|
52
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
53
|
+
*
|
54
|
+
* This source code is licensed under the MIT license.
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
56
|
+
*/var YU=xs("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
|
57
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
58
|
+
*
|
59
|
+
* This source code is licensed under the MIT license.
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
61
|
+
*/var jU=xs("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
|
62
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
63
|
+
*
|
64
|
+
* This source code is licensed under the MIT license.
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
66
|
+
*/var JU=xs("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
|
67
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
68
|
+
*
|
69
|
+
* This source code is licensed under the MIT license.
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
71
|
+
*/var QU=xs("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"}]]);/**
|
72
|
+
* @license @tabler/icons-vue v3.22.0 - MIT
|
73
|
+
*
|
74
|
+
* This source code is licensed under the MIT license.
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
76
|
+
*/var XU=xs("filled","caret-right-filled","IconCaretRightFilled",[["path",{d:"M9 6c0 -.852 .986 -1.297 1.623 -.783l.084 .076l6 6a1 1 0 0 1 .083 1.32l-.083 .094l-6 6l-.094 .083l-.077 .054l-.096 .054l-.036 .017l-.067 .027l-.108 .032l-.053 .01l-.06 .01l-.057 .004l-.059 .002l-.059 -.002l-.058 -.005l-.06 -.009l-.052 -.01l-.108 -.032l-.067 -.027l-.132 -.07l-.09 -.065l-.081 -.073l-.083 -.094l-.054 -.077l-.054 -.096l-.017 -.036l-.027 -.067l-.032 -.108l-.01 -.053l-.01 -.06l-.004 -.057l-.002 -12.059z",key:"svg-0"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const B={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"},Fc={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},Ia=[B.OPENID_SCOPE,B.PROFILE_SCOPE,B.OFFLINE_ACCESS_SCOPE],pv=[...Ia,B.EMAIL_SCOPE],un={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"},Dt={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"},Bo={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},Bc={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},Ut={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},_v={PLAIN:"plain",S256:"S256"},Us={QUERY:"query",FRAGMENT:"fragment"},ZU={...Us,FORM_POST:"form_post"},pE={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"},Vc={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},en={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},me={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Lf="appmetadata",eF="client_info",hs="1",wl={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Rn={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},Kt={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"},ze={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},fs={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},vv={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},yv={username:"username",password:"password"},Hc={httpSuccess:200,httpBadRequest:400},qi={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Qd={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Oo={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},tF={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},nF=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const xf="unexpected_error",rF="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const Cv={[xf]:"Unexpected error in authentication.",[rF]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class ct extends Error{constructor(e,t,r){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,ct.prototype),this.errorCode=e||B.EMPTY_STRING,this.errorMessage=t||B.EMPTY_STRING,this.subError=r||B.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function _E(n,e){return new ct(n,e?`${Cv[n]} ${e}`:Cv[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Uf="client_info_decoding_error",vE="client_info_empty_error",Ff="token_parsing_error",yE="null_or_empty_token",oo="endpoints_resolution_error",CE="network_error",EE="openid_config_error",wE="hash_not_deserialized",ya="invalid_state",TE="state_mismatch",Tl="state_not_found",bE="nonce_mismatch",Bf="auth_time_not_found",IE="max_age_transpired",oF="multiple_matching_tokens",iF="multiple_matching_accounts",AE="multiple_matching_appMetadata",SE="request_cannot_be_made",kE="cannot_remove_empty_scope",NE="cannot_append_scopeset",Fh="empty_input_scopeset",aF="device_code_polling_cancelled",sF="device_code_expired",cF="device_code_unknown_error",Vf="no_account_in_silent_request",RE="invalid_cache_record",Hf="invalid_cache_environment",Bh="no_account_found",Vh="no_crypto_object",Hh="unexpected_credential_type",lF="invalid_assertion",uF="invalid_client_credential",ao="token_refresh_required",dF="user_timeout_reached",OE="token_claims_cnf_required_for_signedjwt",PE="authorization_code_missing_from_server_response",ME="binding_key_not_removed",DE="end_session_endpoint_not_supported",$f="key_id_missing",hF="no_network_connectivity",fF="user_canceled",mF="missing_tenant_id_error",Ae="method_not_implemented",gF="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Ev={[Uf]:"The client info could not be parsed/decoded correctly",[vE]:"The client info was empty",[Ff]:"Token cannot be parsed",[yE]:"The token is null or empty",[oo]:"Endpoints cannot be resolved",[CE]:"Network request failed",[EE]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[wE]:"The hash parameters could not be deserialized",[ya]:"State was not the expected format",[TE]:"State mismatch error",[Tl]:"State not found",[bE]:"Nonce mismatch error",[Bf]:"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.",[IE]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[oF]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[iF]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[AE]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[SE]:"Token request cannot be made without authorization code or refresh token.",[kE]:"Cannot remove null or empty scope from ScopeSet",[NE]:"Cannot append ScopeSet",[Fh]:"Empty input ScopeSet cannot be processed",[aF]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[sF]:"Device code is expired.",[cF]:"Device code stopped polling for unknown reasons.",[Vf]:"Please pass an account object, silent flow is not supported without account information",[RE]:"Cache record object was null or undefined.",[Hf]:"Invalid environment when attempting to create cache entry",[Bh]:"No account found in cache for given key.",[Vh]:"No crypto object detected.",[Hh]:"Unexpected credential type.",[lF]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[uF]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[ao]:"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.",[dF]:"User defined timeout for device code polling reached",[OE]:"Cannot generate a POP jwt if the token_claims are not populated",[PE]:"Server response does not contain an authorization code to proceed",[ME]:"Could not remove the credential's binding key from storage.",[DE]:"The provided authority does not support logout",[$f]:"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.",[hF]:"No network connectivity. Check your internet connection.",[fF]:"User cancelled the flow.",[mF]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Ae]:"This method has not been implemented",[gF]:"The nested app auth bridge is disabled"};class Jl extends ct{constructor(e,t){super(e,t?`${Ev[e]}: ${t}`:Ev[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Jl.prototype)}}function Y(n,e){return new Jl(n,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const bl={createNewGuid:()=>{throw Y(Ae)},base64Decode:()=>{throw Y(Ae)},base64Encode:()=>{throw Y(Ae)},base64UrlEncode:()=>{throw Y(Ae)},encodeKid:()=>{throw Y(Ae)},async getPublicKeyThumbprint(){throw Y(Ae)},async removeTokenBindingKey(){throw Y(Ae)},async clearKeystore(){throw Y(Ae)},async signJwt(){throw Y(Ae)},async hashString(){throw Y(Ae)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var et;(function(n){n[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Info=2]="Info",n[n.Verbose=3]="Verbose",n[n.Trace=4]="Trace"})(et||(et={}));class Ho{constructor(e,t,r){this.level=et.Info;const i=()=>{},a=e||Ho.createDefaultLoggerOptions();this.localCallback=a.loggerCallback||i,this.piiLoggingEnabled=a.piiLoggingEnabled||!1,this.level=typeof a.logLevel=="number"?a.logLevel:et.Info,this.correlationId=a.correlationId||B.EMPTY_STRING,this.packageName=t||B.EMPTY_STRING,this.packageVersion=r||B.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:et.Info}}clone(e,t,r){return new Ho({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const a=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${et[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,a,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:et.Error,containsPii:!1,correlationId:t||B.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:et.Error,containsPii:!0,correlationId:t||B.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:et.Warning,containsPii:!1,correlationId:t||B.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:et.Warning,containsPii:!0,correlationId:t||B.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:et.Info,containsPii:!1,correlationId:t||B.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:et.Info,containsPii:!0,correlationId:t||B.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:et.Verbose,containsPii:!1,correlationId:t||B.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:et.Verbose,containsPii:!0,correlationId:t||B.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:et.Trace,containsPii:!1,correlationId:t||B.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:et.Trace,containsPii:!0,correlationId:t||B.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const LE="@azure/msal-common",Kf="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Wf={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 bi(n,e){const t=pF(n);try{const r=e(t);return JSON.parse(r)}catch{throw Y(Ff)}}function pF(n){if(!n)throw Y(yE);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(n);if(!t||t.length<4)throw Y(Ff);return t[2]}function xE(n,e){if(e===0||Date.now()-3e5>n+e)throw Y(IE)}/*! @azure/msal-common v14.16.0 2024-11-05 */function Kr(){return Math.round(new Date().getTime()/1e3)}function $h(n,e){const t=Number(n)||0;return Kr()+e>t}function _F(n){return Number(n)>Kr()}/*! @azure/msal-common v14.16.0 2024-11-05 */function la(n){return[vF(n),yF(n),CF(n),EF(n),wF(n)].join(en.CACHE_KEY_SEPARATOR).toLowerCase()}function Ql(n,e,t,r,i){return{credentialType:me.ID_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t,realm:i}}function Xl(n,e,t,r,i,a,c,d,h,m,g,v,p,w,C){var k,I;const T={homeAccountId:n,credentialType:me.ACCESS_TOKEN,secret:t,cachedAt:Kr().toString(),expiresOn:c.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:r,realm:i,target:a,tokenType:g||ze.BEARER};if(v&&(T.userAssertionHash=v),m&&(T.refreshOn=m.toString()),w&&(T.requestedClaims=w,T.requestedClaimsHash=C),((k=T.tokenType)==null?void 0:k.toLowerCase())!==ze.BEARER.toLowerCase())switch(T.credentialType=me.ACCESS_TOKEN_WITH_AUTH_SCHEME,T.tokenType){case ze.POP:const N=bi(t,h);if(!((I=N==null?void 0:N.cnf)!=null&&I.kid))throw Y(OE);T.keyId=N.cnf.kid;break;case ze.SSH:T.keyId=p}return T}function UE(n,e,t,r,i,a,c){const d={credentialType:me.REFRESH_TOKEN,homeAccountId:n,environment:e,clientId:r,secret:t};return a&&(d.userAssertionHash=a),i&&(d.familyId=i),c&&(d.expiresOn=c.toString()),d}function zf(n){return n.hasOwnProperty("homeAccountId")&&n.hasOwnProperty("environment")&&n.hasOwnProperty("credentialType")&&n.hasOwnProperty("clientId")&&n.hasOwnProperty("secret")}function wv(n){return n?zf(n)&&n.hasOwnProperty("realm")&&n.hasOwnProperty("target")&&(n.credentialType===me.ACCESS_TOKEN||n.credentialType===me.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function Tv(n){return n?zf(n)&&n.hasOwnProperty("realm")&&n.credentialType===me.ID_TOKEN:!1}function bv(n){return n?zf(n)&&n.credentialType===me.REFRESH_TOKEN:!1}function vF(n){return[n.homeAccountId,n.environment].join(en.CACHE_KEY_SEPARATOR).toLowerCase()}function yF(n){const e=n.credentialType===me.REFRESH_TOKEN&&n.familyId||n.clientId;return[n.credentialType,e,n.realm||""].join(en.CACHE_KEY_SEPARATOR).toLowerCase()}function CF(n){return(n.target||"").toLowerCase()}function EF(n){return(n.requestedClaimsHash||"").toLowerCase()}function wF(n){return n.tokenType&&n.tokenType.toLowerCase()!==ze.BEARER.toLowerCase()?n.tokenType.toLowerCase():""}function TF(n,e){const t=n.indexOf(Kt.CACHE_KEY)===0;let r=!0;return e&&(r=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&r}function bF(n,e){let t=!1;n&&(t=n.indexOf(fs.THROTTLING_PREFIX)===0);let r=!0;return e&&(r=e.hasOwnProperty("throttleTime")),t&&r}function IF({environment:n,clientId:e}){return[Lf,n,e].join(en.CACHE_KEY_SEPARATOR).toLowerCase()}function AF(n,e){return e?n.indexOf(Lf)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function SF(n,e){return e?n.indexOf(wl.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 Iv(){return Kr()+wl.REFRESH_TIME_SECONDS}function $c(n,e,t){n.authorization_endpoint=e.authorization_endpoint,n.token_endpoint=e.token_endpoint,n.end_session_endpoint=e.end_session_endpoint,n.issuer=e.issuer,n.endpointsFromNetwork=t,n.jwks_uri=e.jwks_uri}function Xd(n,e,t){n.aliases=e.aliases,n.preferred_cache=e.preferred_cache,n.preferred_network=e.preferred_network,n.aliasesFromNetwork=t}function Av(n){return n.expiresAt<=Kr()}/*! @azure/msal-common v14.16.0 2024-11-05 */const FE="redirect_uri_empty",kF="claims_request_parsing_error",BE="authority_uri_insecure",os="url_parse_error",VE="empty_url_error",HE="empty_input_scopes_error",$E="invalid_prompt_value",Gf="invalid_claims",KE="token_request_empty",WE="logout_request_empty",zE="invalid_code_challenge_method",qf="pkce_params_missing",Yf="invalid_cloud_discovery_metadata",GE="invalid_authority_metadata",qE="untrusted_authority",Zl="missing_ssh_jwk",YE="missing_ssh_kid",NF="missing_nonce_authentication_header",RF="invalid_authentication_header",jE="cannot_set_OIDCOptions",JE="cannot_allow_native_broker",QE="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const OF={[FE]:"A redirect URI is required for all calls, and none has been set.",[kF]:"Could not parse the given claims request object.",[BE]:"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",[os]:"URL could not be parsed into appropriate segments.",[VE]:"URL was empty or null.",[HE]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[$E]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Gf]:"Given claims parameter must be a stringified JSON object.",[KE]:"Token request was empty and not found in cache.",[WE]:"The logout request was null or undefined.",[zE]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[qf]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Yf]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[GE]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[qE]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Zl]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[YE]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[NF]:"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.",[RF]:"Invalid authentication header provided",[jE]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[JE]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[QE]:"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 jf extends ct{constructor(e){super(e,OF[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,jf.prototype)}}function Qe(n){return new jf(n)}/*! @azure/msal-common v14.16.0 2024-11-05 */class _r{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={},r=e.split("&"),i=a=>decodeURIComponent(a.replace(/\+/g," "));return r.forEach(a=>{if(a.trim()){const[c,d]=a.split(/=(.+)/g,2);c&&d&&(t[i(c)]=i(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class _t{constructor(e){const t=e?_r.trimArrayEntries([...e]):[],r=t?_r.removeEmptyStringsFromArray(t):[];this.validateInputScopes(r),this.scopes=new Set,r.forEach(i=>this.scopes.add(i))}static fromString(e){const r=(e||B.EMPTY_STRING).split(" ");return new _t(r)}static createSearchScopes(e){const t=new _t(e);return t.containsOnlyOIDCScopes()?t.removeScope(B.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Qe(HE)}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new _t(t);return e?r.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 pv.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 Y(NE)}}removeScope(e){if(!e)throw Y(kE);this.scopes.delete(e.trim())}removeOIDCScopes(){pv.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Y(Fh);const t=new Set;return e.scopes.forEach(r=>t.add(r.toLowerCase())),this.scopes.forEach(r=>t.add(r.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw Y(Fh);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),i=this.getScopeCount();return t.size<i+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):B.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Il(n,e){if(!n)throw Y(vE);try{const t=e(n);return JSON.parse(t)}catch{throw Y(Uf)}}function ua(n){if(!n)throw Y(Uf);const e=n.split(en.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?B.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Al(n,e){return!!n&&!!e&&n===e.split(".")[1]}function Jf(n,e,t,r){if(r){const{oid:i,sub:a,tid:c,name:d,tfp:h,acr:m}=r,g=c||h||m||"";return{tenantId:g,localAccountId:i||a||"",name:d,isHomeTenant:Al(g,n)}}else return{tenantId:t,localAccountId:e,isHomeTenant:Al(t,n)}}function Qf(n,e,t,r){let i=n;if(e){const{isHomeTenant:a,...c}=e;i={...n,...c}}if(t){const{isHomeTenant:a,...c}=Jf(n.homeAccountId,n.localAccountId,n.tenantId,t);return i={...i,...c,idTokenClaims:t,idToken:r},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const fr={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function XE(n){return n&&(n.tid||n.tfp||n.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const uo={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class Ot{generateAccountId(){return[this.homeAccountId,this.environment].join(en.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return Ot.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(en.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,r){var m,g,v,p,w,C;const i=new Ot;t.authorityType===fr.Adfs?i.authorityType=Vc.ADFS_ACCOUNT_TYPE:t.protocolMode===uo.AAD?i.authorityType=Vc.MSSTS_ACCOUNT_TYPE:i.authorityType=Vc.GENERIC_ACCOUNT_TYPE;let a;e.clientInfo&&r&&(a=Il(e.clientInfo,r)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const c=e.environment||t&&t.getPreferredCache();if(!c)throw Y(Hf);i.environment=c,i.realm=(a==null?void 0:a.utid)||XE(e.idTokenClaims)||"",i.localAccountId=(a==null?void 0:a.uid)||((m=e.idTokenClaims)==null?void 0:m.oid)||((g=e.idTokenClaims)==null?void 0:g.sub)||"";const d=((v=e.idTokenClaims)==null?void 0:v.preferred_username)||((p=e.idTokenClaims)==null?void 0:p.upn),h=(w=e.idTokenClaims)!=null&&w.emails?e.idTokenClaims.emails[0]:null;if(i.username=d||h||"",i.name=((C=e.idTokenClaims)==null?void 0:C.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const T=Jf(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[T]}return i}static createFromAccountInfo(e,t,r){var a;const i=new Ot;return i.authorityType=e.authorityType||Vc.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=r,i.tenantProfiles=Array.from(((a=e.tenantProfiles)==null?void 0:a.values())||[]),i}static generateHomeAccountId(e,t,r,i,a){if(!(t===fr.Adfs||t===fr.Dsts)){if(e)try{const c=Il(e,i.base64Decode);if(c.uid&&c.utid)return`${c.uid}.${c.utid}`}catch{}r.warning("No client info in response")}return(a==null?void 0:a.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,r){if(!e||!t)return!1;let i=!0;if(r){const a=e.idTokenClaims||{},c=t.idTokenClaims||{};i=a.iat===c.iat&&a.nonce===c.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}/*! @azure/msal-common v14.16.0 2024-11-05 */function ZE(n){return n.startsWith("#/")?n.substring(2):n.startsWith("#")||n.startsWith("?")?n.substring(1):n}function Sl(n){if(!n||n.indexOf("=")<0)return null;try{const e=ZE(n),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw Y(wE)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class Me{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Qe(VE);e.includes("#")||(this._urlString=Me.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return _r.endsWith(t,"?")?t=t.slice(0,-1):_r.endsWith(t,"?/")&&(t=t.slice(0,-2)),_r.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Qe(os)}if(!e.HostNameAndPort||!e.PathSegments)throw Qe(os);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Qe(BE)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return Me.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return e&&r.length!==0&&(r[0]===Bo.COMMON||r[0]===Bo.ORGANIZATIONS)&&(r[0]=e),Me.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Qe(os);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=r.AbsolutePath.split("/");return i=i.filter(a=>a&&a.length>0),r.PathSegments=i,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw Qe(os);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===B.FORWARD_SLASH){const i=new Me(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new Me(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Sl(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const ew={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"]}]}},Sv=ew.endpointMetadata,Xf=ew.instanceDiscoveryMetadata,tw=new Set;Xf.metadata.forEach(n=>{n.aliases.forEach(e=>{tw.add(e)})});function PF(n,e){var i;let t;const r=n.canonicalAuthority;if(r){const a=new Me(r).getUrlComponents().HostNameAndPort;t=kv(a,(i=n.cloudDiscoveryMetadata)==null?void 0:i.metadata,Rn.CONFIG,e)||kv(a,Xf.metadata,Rn.HARDCODED_VALUES,e)||n.knownAuthorities}return t||[]}function kv(n,e,t,r){if(r==null||r.trace(`getAliasesFromMetadata called with source: ${t}`),n&&e){const i=kl(e,n);if(i)return r==null||r.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),i.aliases;r==null||r.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function MF(n){return kl(Xf.metadata,n)}function kl(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(r.aliases.includes(e))return r}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const nw="cache_quota_exceeded",Zf="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Zd={[nw]:"Exceeded cache storage capacity.",[Zf]:"Unexpected error occurred when using cache storage."};class fa extends Error{constructor(e,t){const r=t||(Zd[e]?Zd[e]:Zd[Zf]);super(`${e}: ${r}`),Object.setPrototypeOf(this,fa.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ca{constructor(e,t,r,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(LE,Kf),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(r=>this.getTenantProfilesFromAccountEntity(r,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,r,i){let a=null,c;if(i&&!this.tenantProfileMatchesFilter(r,i))return null;const d=this.getIdToken(e,t,r.tenantId);return d&&(c=bi(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(c,i))?null:(a=Qf(e,r,c,d==null?void 0:d.secret),a)}getTenantProfilesFromAccountEntity(e,t,r){const i=e.getAccountInfo();let a=i.tenantProfiles||new Map;const c=this.getTokenKeys();if(t){const h=a.get(t);if(h)a=new Map([[t,h]]);else return[]}const d=[];return a.forEach(h=>{const m=this.getTenantedAccountInfoByFilter(i,c,h,r);m&&d.push(m)}),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,r){var i,a,c,d;if(!e)throw Y(RE);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(h){throw(i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),h instanceof Error?((a=this.commonLogger)==null||a.errorPii(`CacheManager.saveCacheRecord: ${h.message}`,r),h.name==="QuotaExceededError"||h.name==="NS_ERROR_DOM_QUOTA_REACHED"||h.message.includes("exceeded the quota")?((c=this.commonLogger)==null||c.error("CacheManager.saveCacheRecord: exceeded storage quota",r),new fa(nw)):new fa(h.name,h.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${h}`,r),new fa(Zf))}}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},r=this.getTokenKeys(),i=_t.fromString(e.target),a=[];r.accessToken.forEach(c=>{if(!this.accessTokenKeyMatchesFilter(c,t,!1))return;const d=this.getAccessTokenCredential(c);d&&this.credentialMatchesFilter(d,t)&&_t.fromString(d.target).intersectingScopeSets(i)&&a.push(this.removeAccessToken(c))}),await Promise.all(a),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach(i=>{var h;if(!this.isAccountKey(i,e.homeAccountId))return;const a=this.getAccount(i,this.commonLogger);if(!a||e.homeAccountId&&!this.matchHomeAccountId(a,e.homeAccountId)||e.username&&!this.matchUsername(a.username,e.username)||e.environment&&!this.matchEnvironment(a,e.environment)||e.realm&&!this.matchRealm(a,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(a,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(a,e.authorityType))return;const c={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(h=a.tenantProfiles)==null?void 0:h.filter(m=>this.tenantProfileMatchesFilter(m,c));d&&d.length===0||r.push(a)}),r}isAccountKey(e,t,r){return!(e.split(en.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||r&&!e.toLowerCase().includes(r.toLowerCase()))}isCredentialKey(e){if(e.split(en.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(me.ID_TOKEN.toLowerCase())===-1&&t.indexOf(me.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(me.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(me.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(me.REFRESH_TOKEN.toLowerCase())>-1){const r=`${me.REFRESH_TOKEN}${en.CACHE_KEY_SEPARATOR}${this.clientId}${en.CACHE_KEY_SEPARATOR}`,i=`${me.REFRESH_TOKEN}${en.CACHE_KEY_SEPARATOR}${hs}${en.CACHE_KEY_SEPARATOR}`;if(t.indexOf(r.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===me.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===ze.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach(i=>{if(!this.isAppMetadata(i))return;const a=this.getAppMetadata(i);a&&(e.environment&&!this.matchEnvironment(a,e.environment)||e.clientId&&!this.matchClientId(a,e.clientId)||(r[i]=a))}),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const a=this.getAuthorityMetadata(i);a&&a.aliases.indexOf(e)!==-1&&(r=a)}),r}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(r=>{t.push(this.removeAccount(r))}),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(),r=e.generateAccountId(),i=[];t.idToken.forEach(a=>{a.indexOf(r)===0&&this.removeIdToken(a)}),t.accessToken.forEach(a=>{a.indexOf(r)===0&&i.push(this.removeAccessToken(a))}),t.refreshToken.forEach(a=>{a.indexOf(r)===0&&this.removeRefreshToken(a)}),await Promise.all(i)}updateOutdatedCachedAccount(e,t,r){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 a=this.getAccountKeys().filter(g=>g.startsWith(t.homeAccountId)),c=[];a.forEach(g=>{const v=this.getCachedAccountEntity(g);v&&c.push(v)});const d=c.find(g=>Al(g.realm,g.homeAccountId))||c[0];d.tenantProfiles=c.map(g=>({tenantId:g.realm,localAccountId:g.localAccountId,name:g.name,isHomeTenant:Al(g.realm,g.homeAccountId)}));const h=Ca.toObject(new Ot,{...d}),m=h.generateAccountKey();return a.forEach(g=>{g!==m&&this.removeOutdatedAccount(e)}),this.setAccount(h),r==null||r.verbose("Updated an outdated account entity in the cache"),h}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===me.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===ze.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw Y(ME)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=Ot.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,r,i,a){this.commonLogger.trace("CacheManager - getIdToken called");const c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:me.ID_TOKEN,clientId:this.clientId,realm:r},d=this.getIdTokensByFilter(c,t),h=d.size;if(h<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(h>1){let m=d;if(!r){const g=new Map;d.forEach((p,w)=>{p.realm===e.tenantId&&g.set(w,p)});const v=g.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"),g.values().next().value;m=g}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),m.forEach((g,v)=>{this.removeIdToken(v)}),i&&a&&i.addFields({multiMatchedID:d.size},a),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const r=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return r.forEach(a=>{if(!this.idTokenKeyMatchesFilter(a,{clientId:this.clientId,...e}))return;const c=this.getIdTokenCredential(a);c&&this.credentialMatchesFilter(c,e)&&i.set(a,c)}),i}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,r,i,a,c){this.commonLogger.trace("CacheManager - getAccessToken called");const d=_t.createSearchScopes(t.scopes),h=t.authenticationScheme||ze.BEARER,m=h&&h.toLowerCase()!==ze.BEARER.toLowerCase()?me.ACCESS_TOKEN_WITH_AUTH_SCHEME:me.ACCESS_TOKEN,g={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:m,clientId:this.clientId,realm:i||e.tenantId,target:d,tokenType:h,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},v=r&&r.accessToken||this.getTokenKeys().accessToken,p=[];v.forEach(C=>{if(this.accessTokenKeyMatchesFilter(C,g,!0)){const T=this.getAccessTokenCredential(C);T&&this.credentialMatchesFilter(T,g)&&p.push(T)}});const w=p.length;return w<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):w>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),p.forEach(C=>{this.removeAccessToken(la(C))}),a&&c&&a.addFields({multiMatchedAT:p.length},c),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),p[0])}accessTokenKeyMatchesFilter(e,t,r){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 a=t.target.asArray();for(let c=0;c<a.length;c++){if(r&&!i.includes(a[c].toLowerCase()))return!1;if(!r&&i.includes(a[c].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),r=[];return t.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const a=this.getAccessTokenCredential(i);a&&this.credentialMatchesFilter(a,e)&&r.push(a)}),r}getRefreshToken(e,t,r,i,a){this.commonLogger.trace("CacheManager - getRefreshToken called");const c=t?hs:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:me.REFRESH_TOKEN,clientId:this.clientId,familyId:c},h=r&&r.refreshToken||this.getTokenKeys().refreshToken,m=[];h.forEach(v=>{if(this.refreshTokenKeyMatchesFilter(v,d)){const p=this.getRefreshTokenCredential(v);p&&this.credentialMatchesFilter(p,d)&&m.push(p)}});const g=m.length;return g<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(g>1&&i&&a&&i.addFields({multiMatchedRT:g},a),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),m[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.familyId&&r.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&r.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&r.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),i=Object.keys(r).map(c=>r[c]),a=i.length;if(a<1)return null;if(a>1)throw Y(AE);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===hs)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const r=e.oid||e.sub;return t===r}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var r;return t.toLowerCase()===((r=e.name)==null?void 0:r.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=PF(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.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 r;return((r=e.realm)==null?void 0:r.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!==me.ACCESS_TOKEN&&e.credentialType!==me.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:_t.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(Lf)!==-1}isAuthorityMetadata(e){return e.indexOf(wl.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${wl.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}}class DF extends Ca{setAccount(){throw Y(Ae)}getAccount(){throw Y(Ae)}getCachedAccountEntity(){throw Y(Ae)}setIdTokenCredential(){throw Y(Ae)}getIdTokenCredential(){throw Y(Ae)}setAccessTokenCredential(){throw Y(Ae)}getAccessTokenCredential(){throw Y(Ae)}setRefreshTokenCredential(){throw Y(Ae)}getRefreshTokenCredential(){throw Y(Ae)}setAppMetadata(){throw Y(Ae)}getAppMetadata(){throw Y(Ae)}setServerTelemetry(){throw Y(Ae)}getServerTelemetry(){throw Y(Ae)}setAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadata(){throw Y(Ae)}getAuthorityMetadataKeys(){throw Y(Ae)}setThrottlingCache(){throw Y(Ae)}getThrottlingCache(){throw Y(Ae)}removeItem(){throw Y(Ae)}getKeys(){throw Y(Ae)}getAccountKeys(){throw Y(Ae)}getTokenKeys(){throw Y(Ae)}updateCredentialCacheKey(){throw Y(Ae)}removeOutdatedAccount(){throw Y(Ae)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const rw={tokenRenewalOffsetSeconds:nF,preventCorsPreflight:!1},LF={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:et.Info,correlationId:B.EMPTY_STRING},xF={claimsBasedCachingEnabled:!1},UF={async sendGetRequestAsync(){throw Y(Ae)},async sendPostRequestAsync(){throw Y(Ae)}},FF={sku:B.SKU,version:Kf,cpu:B.EMPTY_STRING,os:B.EMPTY_STRING},BF={clientSecret:B.EMPTY_STRING,clientAssertion:void 0},VF={azureCloudInstance:Wf.None,tenant:`${B.DEFAULT_COMMON_TENANT}`},HF={application:{appName:"",appVersion:""}};function $F({authOptions:n,systemOptions:e,loggerOptions:t,cacheOptions:r,storageInterface:i,networkInterface:a,cryptoInterface:c,clientCredentials:d,libraryInfo:h,telemetry:m,serverTelemetryManager:g,persistencePlugin:v,serializableCache:p}){const w={...LF,...t};return{authOptions:KF(n),systemOptions:{...rw,...e},loggerOptions:w,cacheOptions:{...xF,...r},storageInterface:i||new DF(n.clientId,bl,new Ho(w)),networkInterface:a||UF,cryptoInterface:c||bl,clientCredentials:d||BF,libraryInfo:{...FF,...h},telemetry:{...HF,...m},serverTelemetryManager:g||null,persistencePlugin:v||null,serializableCache:p||null}}function KF(n){return{clientCapabilities:[],azureCloudOptions:VF,skipAuthorityMetadataCache:!1,instanceAware:!1,...n}}function Kh(n){return n.authOptions.authority.options.protocolMode===uo.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const Un={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const yi="client_id",ow="redirect_uri",Nv="response_type",WF="response_mode",zF="grant_type",GF="claims",qF="scope",YF="refresh_token",jF="state",JF="nonce",QF="prompt",XF="code",ZF="code_challenge",eB="code_challenge_method",tB="code_verifier",nB="client-request-id",rB="x-client-SKU",oB="x-client-VER",iB="x-client-OS",aB="x-client-CPU",sB="x-client-current-telemetry",cB="x-client-last-telemetry",lB="x-ms-lib-capability",uB="x-app-name",dB="x-app-ver",hB="post_logout_redirect_uri",fB="id_token_hint",mB="device_code",gB="client_secret",pB="client_assertion",_B="client_assertion_type",Rv="token_type",Ov="req_cnf",vB="assertion",yB="requested_token_use",Pv="return_spa_code",CB="nativebroker",EB="logout_hint",wB="sid",TB="login_hint",bB="domain_hint",IB="x-client-xtra-sku",em="brk_client_id",Wh="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class na{static validateRedirectUri(e){if(!e)throw Qe(FE)}static validatePrompt(e){const t=[];for(const r in Ut)t.push(Ut[r]);if(t.indexOf(e)<0)throw Qe($E)}static validateClaims(e){try{JSON.parse(e)}catch{throw Qe(Gf)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Qe(qf);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([_v.PLAIN,_v.S256].indexOf(e)<0)throw Qe(zE)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function AB(n,e,t){if(!e)return;const r=n.get(yi);r&&n.has(em)&&(t==null||t.addFields({embeddedClientId:r,embeddedRedirectUri:n.get(ow)},e))}class ms{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Nv,encodeURIComponent(B.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Nv,encodeURIComponent(`${B.TOKEN_RESPONSE_TYPE} ${B.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(WF,encodeURIComponent(e||ZU.QUERY))}addNativeBroker(){this.parameters.set(CB,encodeURIComponent("1"))}addScopes(e,t=!0,r=Ia){t&&!r.includes("openid")&&!e.includes("openid")&&r.push("openid");const i=t?[...e||[],...r]:e||[],a=new _t(i);this.parameters.set(qF,encodeURIComponent(a.printScopes()))}addClientId(e){this.parameters.set(yi,encodeURIComponent(e))}addRedirectUri(e){na.validateRedirectUri(e),this.parameters.set(ow,encodeURIComponent(e))}addPostLogoutRedirectUri(e){na.validateRedirectUri(e),this.parameters.set(hB,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(fB,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(bB,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(TB,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(un.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(un.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(wB,encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);na.validateClaims(r),this.parameters.set(GF,encodeURIComponent(r))}addCorrelationId(e){this.parameters.set(nB,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(rB,e.sku),this.parameters.set(oB,e.version),e.os&&this.parameters.set(iB,e.os),e.cpu&&this.parameters.set(aB,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(uB,e.appName),e!=null&&e.appVersion&&this.parameters.set(dB,e.appVersion)}addPrompt(e){na.validatePrompt(e),this.parameters.set(`${QF}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(jF,encodeURIComponent(e))}addNonce(e){this.parameters.set(JF,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(na.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(ZF,encodeURIComponent(e)),this.parameters.set(eB,encodeURIComponent(t));else throw Qe(qf)}addAuthorizationCode(e){this.parameters.set(XF,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(mB,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(YF,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(tB,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(gB,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(pB,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(_B,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(vB,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(yB,encodeURIComponent(e))}addGrantType(e){this.parameters.set(zF,encodeURIComponent(e))}addClientInfo(){this.parameters.set(eF,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,r])=>{!this.parameters.has(t)&&r&&this.parameters.set(t,r)})}addClientCapabilitiesToClaims(e,t){let r;if(!e)r={};else try{r=JSON.parse(e)}catch{throw Qe(Gf)}return t&&t.length>0&&(r.hasOwnProperty(Bc.ACCESS_TOKEN)||(r[Bc.ACCESS_TOKEN]={}),r[Bc.ACCESS_TOKEN][Bc.XMS_CC]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(yv.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(yv.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(Rv,ze.POP),this.parameters.set(Ov,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(Rv,ze.SSH),this.parameters.set(Ov,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(sB,e.generateCurrentRequestHeaderValue()),this.parameters.set(cB,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(lB,fs.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(EB,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[em]=e.brokerClientId,t[Wh]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,r)=>{e.push(`${r}=${t}`)}),AB(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function SB(n){return n.hasOwnProperty("authorization_endpoint")&&n.hasOwnProperty("token_endpoint")&&n.hasOwnProperty("issuer")&&n.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function kB(n){return n.hasOwnProperty("tenant_discovery_endpoint")&&n.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function NB(n){return n.hasOwnProperty("error")&&n.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const x={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"},RB={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const Ii=(n,e,t,r,i)=>(...a)=>{t.trace(`Executing function ${e}`);const c=r==null?void 0:r.startMeasurement(e,i);if(i){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},i)}try{const d=n(...a);return c==null||c.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d}},J=(n,e,t,r,i)=>(...a)=>{t.trace(`Executing function ${e}`);const c=r==null?void 0:r.startMeasurement(e,i);if(i){const d=e+"CallCount";r==null||r.incrementFields({[d]:1},i)}return r==null||r.setPreQueueTime(e,i),n(...a).then(d=>(t.trace(`Returning result from ${e}`),c==null||c.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw c==null||c.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class eu{constructor(e,t,r,i){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=i}async detectRegion(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(x.RegionDiscoveryDetectRegion,this.correlationId);let r=e;if(r)t.region_source=qi.ENVIRONMENT_VARIABLE;else{const a=eu.IMDS_OPTIONS;try{const c=await J(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(B.IMDS_VERSION,a);if(c.status===Hc.httpSuccess&&(r=c.body,t.region_source=qi.IMDS),c.status===Hc.httpBadRequest){const d=await J(this.getCurrentVersion.bind(this),x.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(a);if(!d)return t.region_source=qi.FAILED_AUTO_DETECTION,null;const h=await J(this.getRegionFromIMDS.bind(this),x.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,a);h.status===Hc.httpSuccess&&(r=h.body,t.region_source=qi.IMDS)}}catch{return t.region_source=qi.FAILED_AUTO_DETECTION,null}}return r||(t.region_source=qi.FAILED_AUTO_DETECTION),r||null}async getRegionFromIMDS(e,t){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${B.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,B.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(x.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const r=await this.networkInterface.sendGetRequestAsync(`${B.IMDS_ENDPOINT}?format=json`,e);return r.status===Hc.httpBadRequest&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch{return null}}}eu.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class Qt{constructor(e,t,r,i,a,c,d,h){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=a,this.performanceClient=d,this.correlationId=c,this.managedIdentity=h||!1,this.regionDiscovery=new eu(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(B.CIAM_AUTH_URL))return fr.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case B.ADFS:return fr.Adfs;case B.DSTS:return fr.Dsts}return fr.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 Me(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 Y(oo)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Y(oo)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Y(oo)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Y(DE);return this.replacePath(this.metadata.end_session_endpoint)}else throw Y(oo)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Y(oo)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Y(oo)}canReplaceTenant(e){return e.PathSegments.length===1&&!Qt.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===fr.Default&&this.protocolMode===uo.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new Me(this.metadata.canonical_authority).getUrlComponents(),a=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,h)=>{let m=a[h];if(h===0&&this.canReplaceTenant(i)){const g=new Me(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];m!==g&&(this.logger.verbose(`Replacing tenant domain name ${m} with id ${g}`),m=g)}d!==m&&(t=t.replace(`/${m}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===fr.Adfs||this.protocolMode!==uo.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,a;(i=this.performanceClient)==null||i.addQueueMeasurement(x.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await J(this.updateCloudDiscoveryMetadata.bind(this),x.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await J(this.updateEndpointMetadata.bind(this),x.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),(a=this.performanceClient)==null||a.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},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:Iv(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==Rn.CACHE&&(r==null?void 0:r.source)!==Rn.CACHE&&(e.expiresAt=Iv(),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,a,c;(i=this.performanceClient)==null||i.addQueueMeasurement(x.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Rn.HARDCODED_VALUES&&(a=this.authorityOptions.azureRegionConfiguration)!=null&&a.azureRegion&&t.metadata){const d=await J(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);$c(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let r=await J(this.getEndpointMetadataFromNetwork.bind(this),x.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return(c=this.authorityOptions.azureRegionConfiguration)!=null&&c.azureRegion&&(r=await J(this.updateMetadataWithRegionalInformation.bind(this),x.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r)),$c(e,r,!0),Rn.NETWORK;throw Y(EE,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"),$c(e,t,!1),{source:Rn.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 $c(e,i,!1),{source:Rn.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 r=Av(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Rn.CACHE}):(r&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new Me(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Qe(GE)}return null}async getEndpointMetadataFromNetwork(){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.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 SB(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 Sv?Sv[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var r,i,a;(r=this.performanceClient)==null||r.addQueueMeasurement(x.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(t){if(t!==B.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Qd.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,Qt.replaceWithRegionalInformation(e,t);const c=await J(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),x.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((a=this.authorityOptions.azureRegionConfiguration)==null?void 0:a.environmentRegion,this.regionDiscoveryMetadata);if(c)return this.regionDiscoveryMetadata.region_outcome=Qd.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=c,Qt.replaceWithRegionalInformation(e,c);this.regionDiscoveryMetadata.region_outcome=Qd.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(x.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await J(this.getCloudDiscoveryMetadataFromNetwork.bind(this),x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return Xd(e,r,!0),Rn.NETWORK;throw Qe(qE)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||B.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||B.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||B.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Xd(e,t,!1),Rn.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=MF(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Xd(e,i,!1),Rn.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 r=Av(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!r?(this.logger.verbose("Found cloud discovery metadata in the cache."),Rn.CACHE):(r&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===fr.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Qt.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=kl(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."),Qe(Yf)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Qt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(x.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${B.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let r=null;try{const a=await this.networkInterface.sendGetRequestAsync(e,t);let c,d;if(kB(a.body))c=a.body,d=c.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${c.tenant_discovery_endpoint}`);else if(NB(a.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${a.status}`),c=a.body,c.error===B.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${c.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${c.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=kl(d,this.hostnameAndPort)}catch(a){if(a instanceof ct)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
|
77
|
+
Error: ${a.errorCode}
|
78
|
+
Error Description: ${a.errorMessage}`);else{const c=a;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
79
|
+
Error: ${c.name}
|
80
|
+
Error Description: ${c.message}`)}return null}return r||(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."),r=Qt.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&Me.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==Wf.None){const i=t.tenant?t.tenant:B.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${i}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return B.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Y(oo)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return tw.has(e)}static isPublicCloudAuthority(e){return B.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const i=new Me(e);i.validateAsUri();const a=i.getUrlComponents();let c=`${t}.${a.HostNameAndPort}`;this.isPublicCloudAuthority(a.HostNameAndPort)&&(c=`${t}.${B.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=Me.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:c}).urlString;return r?`${d}?${r}`:d}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=Qt.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Qt.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Qt.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const i=new Me(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(B.CIAM_AUTH_URL)){const a=i.HostNameAndPort.split(".")[0];t=`${t}${a}${B.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}Qt.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Bo.COMMON,Bo.CONSUMERS,Bo.ORGANIZATIONS]);function OB(n){var i;const r=(i=new Me(n).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(r){case Bo.COMMON:case Bo.ORGANIZATIONS:case Bo.CONSUMERS:return;default:return r}}function iw(n){return n.endsWith(B.FORWARD_SLASH)?n:`${n}${B.FORWARD_SLASH}`}function PB(n){const e=n.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Qe(Yf)}return{canonicalAuthority:n.authority?iw(n.authority):void 0,knownAuthorities:n.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function aw(n,e,t,r,i,a,c){c==null||c.addQueueMeasurement(x.AuthorityFactoryCreateDiscoveredInstance,a);const d=Qt.transformCIAMAuthority(iw(n)),h=new Qt(d,e,t,r,i,a,c);try{return await J(h.resolveEndpointsAsync.bind(h),x.AuthorityResolveEndpointsAsync,i,c,a)(),h}catch{throw Y(oo)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class $o extends ct{constructor(e,t,r,i,a){super(e,t,r),this.name="ServerError",this.errorNo=i,this.status=a,Object.setPrototypeOf(this,$o.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Lr{static generateThrottlingStorageKey(e){return`${fs.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var a;const r=Lr.generateThrottlingStorageKey(t),i=e.getThrottlingCache(r);if(i){if(i.throttleTime<Date.now()){e.removeItem(r);return}throw new $o(((a=i.errorCodes)==null?void 0:a.join(" "))||B.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,r){if(Lr.checkResponseStatus(r)||Lr.checkResponseForRetryAfter(r)){const i={throttleTime:Lr.calculateThrottleTime(parseInt(r.headers[un.RETRY_AFTER])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(Lr.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(un.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(Math.min(r+(t||fs.DEFAULT_THROTTLE_TIME_SECONDS),r+fs.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,r,i){const a={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:i,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},c=this.generateThrottlingStorageKey(a);e.removeItem(c)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class tu extends ct{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,tu.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function Mv(n,e,t){return new tu(n,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class tm{constructor(e,t){this.config=$F(e),this.logger=new Ho(this.config.loggerOptions,LE,Kf),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[un.CONTENT_TYPE]=B.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Un.HOME_ACCOUNT_ID:try{const r=ua(e.credential);t[un.CCS_HEADER]=`Oid:${r.uid}@${r.utid}`}catch(r){this.logger.verbose("Could not parse home account ID for CCS Header: "+r)}break;case Un.UPN:t[un.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,r,i,a,c){var h;c&&((h=this.performanceClient)==null||h.addQueueMeasurement(c,a));const d=await this.sendPostRequest(i,e,{body:t,headers:r},a);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,r,i){var c,d,h;Lr.preProcess(this.cacheManager,e);let a;try{a=await J(this.networkClient.sendPostRequestAsync.bind(this.networkClient),x.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,i)(t,r);const m=a.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((c=a.body.refresh_token)==null?void 0:c.length)||0,httpVerToken:m[un.X_MS_HTTP_VERSION]||"",requestId:m[un.X_MS_REQUEST_ID]||""},i)}catch(m){if(m instanceof tu){const g=m.responseHeaders;throw g&&((h=this.performanceClient)==null||h.addFields({httpVerToken:g[un.X_MS_HTTP_VERSION]||"",requestId:g[un.X_MS_REQUEST_ID]||"",contentTypeHeader:g[un.CONTENT_TYPE]||void 0,contentLengthHeader:g[un.CONTENT_LENGTH]||void 0,httpStatus:m.httpStatus},i)),m.error}throw m instanceof ct?m:Y(CE)}return Lr.postProcess(this.cacheManager,e,a),a}async updateAuthority(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.UpdateTokenEndpointAuthority,t);const r=`https://${e}/${this.authority.tenant}/`,i=await aw(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new ms(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 Nl="no_tokens_found",sw="native_account_unavailable",nm="refresh_token_expired",MB="interaction_required",DB="consent_required",LB="login_required",nu="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const Dv=[MB,DB,LB,nu],xB=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],UB={[Nl]:"No refresh token found in the cache. Please sign-in.",[sw]:"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.",[nm]:"Refresh token has expired.",[nu]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Cr extends ct{constructor(e,t,r,i,a,c,d,h){super(e,t,r),Object.setPrototypeOf(this,Cr.prototype),this.timestamp=i||B.EMPTY_STRING,this.traceId=a||B.EMPTY_STRING,this.correlationId=c||B.EMPTY_STRING,this.claims=d||B.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=h}}function Lv(n,e,t){const r=!!n&&Dv.indexOf(n)>-1,i=!!t&&xB.indexOf(t)>-1,a=!!e&&Dv.some(c=>e.indexOf(c)>-1);return r||a||i}function zh(n){return new Cr(n,UB[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class vr{static setRequestState(e,t,r){const i=vr.generateLibraryState(e,r);return t?`${i}${B.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw Y(Vh);const r={id:e.createNewGuid()};t&&(r.meta=t);const i=JSON.stringify(r);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw Y(Vh);if(!t)throw Y(ya);try{const r=t.split(B.RESOURCE_DELIM),i=r[0],a=r.length>1?r.slice(1).join(B.RESOURCE_DELIM):B.EMPTY_STRING,c=e.base64Decode(i),d=JSON.parse(c);return{userRequestState:a||B.EMPTY_STRING,libraryState:d}}catch{throw Y(ya)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const FB={SW:"sw",UHW:"uhw"};class Ea{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.PopTokenGenerateCnf,e.correlationId);const r=await J(this.generateKid.bind(this),x.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:i}}async generateKid(e){var r;return(r=this.performanceClient)==null||r.addQueueMeasurement(x.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:FB.SW}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,i){const{resourceRequestMethod:a,resourceRequestUri:c,shrClaims:d,shrNonce:h,shrOptions:m}=r,g=c?new Me(c):void 0,v=g==null?void 0:g.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:Kr(),m:a==null?void 0:a.toUpperCase(),u:v==null?void 0:v.HostNameAndPort,nonce:h||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,m,r.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class BB{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 VB(n){var r,i;const e="code=",t=(r=n.error_uri)==null?void 0:r.lastIndexOf(e);return t&&t>=0?(i=n.error_uri)==null?void 0:i.substring(t+e.length):void 0}class Ci{constructor(e,t,r,i,a,c,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=i,this.serializableCache=a,this.persistencePlugin=c,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?Y(Tl,"Cached State"):Y(Tl,"Server State");let r,i;try{r=decodeURIComponent(e.state)}catch{throw Y(ya,e.state)}try{i=decodeURIComponent(t)}catch{throw Y(ya,e.state)}if(r!==i)throw Y(TE);if(e.error||e.error_description||e.suberror){const a=VB(e);throw Lv(e.error,e.error_description,e.suberror)?new Cr(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",a):new $o(e.error||"",e.error_description,e.suberror,a)}}validateTokenResponse(e,t){var r;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||B.NOT_AVAILABLE} - Timestamp: ${e.timestamp||B.NOT_AVAILABLE} - Description: ${e.error_description||B.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||B.NOT_AVAILABLE} - Trace ID: ${e.trace_id||B.NOT_AVAILABLE}`,a=(r=e.error_codes)!=null&&r.length?e.error_codes[0]:void 0,c=new $o(e.error,i,e.suberror,a,e.status);if(t&&e.status&&e.status>=Fc.SERVER_ERROR_RANGE_START&&e.status<=Fc.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
|
81
|
+
${c}`);return}else if(t&&e.status&&e.status>=Fc.CLIENT_ERROR_RANGE_START&&e.status<=Fc.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
|
82
|
+
${c}`);return}throw Lv(e.error,e.error_description,e.suberror)?new Cr(e.error,e.error_description,e.suberror,e.timestamp||B.EMPTY_STRING,e.trace_id||B.EMPTY_STRING,e.correlation_id||B.EMPTY_STRING,e.claims||B.EMPTY_STRING,a):c}}async handleServerTokenResponse(e,t,r,i,a,c,d,h,m){var C;(C=this.performanceClient)==null||C.addQueueMeasurement(x.HandleServerTokenResponse,e.correlation_id);let g;if(e.id_token){if(g=bi(e.id_token||B.EMPTY_STRING,this.cryptoObj.base64Decode),a&&a.nonce&&g.nonce!==a.nonce)throw Y(bE);if(i.maxAge||i.maxAge===0){const T=g.auth_time;if(!T)throw Y(Bf);xE(T,i.maxAge)}}this.homeAccountIdentifier=Ot.generateHomeAccountId(e.client_info||B.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,g);let v;a&&a.state&&(v=vr.parseRequestState(this.cryptoObj,a.state)),e.key_id=e.key_id||i.sshKid||void 0;const p=this.generateCacheRecord(e,t,r,i,g,c,a);let w;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),w=new BB(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(w)),d&&!h&&p.account){const T=p.account.generateAccountKey();if(!this.cacheStorage.getAccount(T,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Ci.generateAuthenticationResult(this.cryptoObj,t,p,!1,i,g,v,void 0,m)}await this.cacheStorage.saveCacheRecord(p,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&w&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(w))}return Ci.generateAuthenticationResult(this.cryptoObj,t,p,!1,i,g,v,e,m)}generateCacheRecord(e,t,r,i,a,c,d){const h=t.getPreferredCache();if(!h)throw Y(Hf);const m=XE(a);let g,v;e.id_token&&a&&(g=Ql(this.homeAccountIdentifier,h,e.id_token,this.clientId,m||""),v=rm(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,a,e.client_info,h,m,d,void 0,this.logger));let p=null;if(e.access_token){const T=e.scope?_t.fromString(e.scope):new _t(i.scopes||[]),k=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,I=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,N=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,O=r+k,L=O+I,$=N&&N>0?r+N:void 0;p=Xl(this.homeAccountIdentifier,h,e.access_token,this.clientId,m||t.tenant||"",T.printScopes(),O,L,this.cryptoObj.base64Decode,$,e.token_type,c,e.key_id,i.claims,i.requestedClaimsHash)}let w=null;if(e.refresh_token){let T;if(e.refresh_token_expires_in){const k=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;T=r+k}w=UE(this.homeAccountIdentifier,h,e.refresh_token,this.clientId,e.foci,c,T)}let C=null;return e.foci&&(C={clientId:this.clientId,environment:h,familyId:e.foci}),{account:v,idToken:g,accessToken:p,refreshToken:w,appMetadata:C}}static async generateAuthenticationResult(e,t,r,i,a,c,d,h,m){var O,L,$,G,D;let g=B.EMPTY_STRING,v=[],p=null,w,C,T=B.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType===ze.POP&&!a.popKid){const se=new Ea(e),{secret:ie,keyId:Q}=r.accessToken;if(!Q)throw Y($f);g=await se.signPopToken(ie,Q,a)}else g=r.accessToken.secret;v=_t.fromString(r.accessToken.target).asArray(),p=new Date(Number(r.accessToken.expiresOn)*1e3),w=new Date(Number(r.accessToken.extendedExpiresOn)*1e3),r.accessToken.refreshOn&&(C=new Date(Number(r.accessToken.refreshOn)*1e3))}r.appMetadata&&(T=r.appMetadata.familyId===hs?hs:"");const k=(c==null?void 0:c.oid)||(c==null?void 0:c.sub)||"",I=(c==null?void 0:c.tid)||"";h!=null&&h.spa_accountid&&r.account&&(r.account.nativeAccountId=h==null?void 0:h.spa_accountid);const N=r.account?Qf(r.account.getAccountInfo(),void 0,c,(O=r.idToken)==null?void 0:O.secret):null;return{authority:t.canonicalAuthority,uniqueId:k,tenantId:I,scopes:v,account:N,idToken:((L=r==null?void 0:r.idToken)==null?void 0:L.secret)||"",idTokenClaims:c||{},accessToken:g,fromCache:i,expiresOn:p,extExpiresOn:w,refreshOn:C,correlationId:a.correlationId,requestId:m||B.EMPTY_STRING,familyId:T,tokenType:(($=r.accessToken)==null?void 0:$.tokenType)||B.EMPTY_STRING,state:d?d.userRequestState:B.EMPTY_STRING,cloudGraphHostName:((G=r.account)==null?void 0:G.cloudGraphHostName)||B.EMPTY_STRING,msGraphHost:((D=r.account)==null?void 0:D.msGraphHost)||B.EMPTY_STRING,code:h==null?void 0:h.spa_code,fromNativeBroker:!1}}}function rm(n,e,t,r,i,a,c,d,h,m,g){g==null||g.verbose("setCachedAccount called");const p=n.getAccountKeys().find(I=>I.startsWith(t));let w=null;p&&(w=n.getAccount(p,g));const C=w||Ot.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:a,environment:c,cloudGraphHostName:h==null?void 0:h.cloud_graph_host_name,msGraphHost:h==null?void 0:h.msgraph_host,nativeAccountId:m},e,r),T=C.tenantProfiles||[],k=d||C.realm;if(k&&!T.find(I=>I.tenantId===k)){const I=Jf(t,C.localAccountId,k,i);T.push(I)}return C.tenantProfiles=T,C}/*! @azure/msal-common v14.16.0 2024-11-05 */async function cw(n,e,t){return typeof n=="string"?n:n({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class lw extends tm{constructor(e,t){var r;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(r=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:r.defaultScopes}async getAuthCodeUrl(e){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(x.GetAuthCodeUrl,e.correlationId);const t=await J(this.createAuthCodeUrlQueryString.bind(this),x.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return Me.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,h;if((d=this.performanceClient)==null||d.addQueueMeasurement(x.AuthClientAcquireToken,e.correlationId),!e.code)throw Y(SE);const r=Kr(),i=await J(this.executeTokenRequest.bind(this),x.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),a=(h=i.headers)==null?void 0:h[un.X_MS_REQUEST_ID],c=new Ci(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return c.validateTokenResponse(i.body),J(c.handleServerTokenResponse.bind(c),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,r,e,t,void 0,void 0,void 0,a)}handleFragmentResponse(e,t){if(new Ci(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw Y(PE);return e}getLogoutUri(e){if(!e)throw Qe(WE);const t=this.createLogoutUrlQueryString(e);return Me.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var m,g;(m=this.performanceClient)==null||m.addQueueMeasurement(x.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),i=Me.appendQueryString(e.tokenEndpoint,r),a=await J(this.createTokenRequestBody.bind(this),x.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let c;if(t.clientInfo)try{const v=Il(t.clientInfo,this.cryptoUtils.base64Decode);c={credential:`${v.uid}${en.CLIENT_INFO_SEPARATOR}${v.utid}`,type:Un.HOME_ACCOUNT_ID}}catch(v){this.logger.verbose("Could not parse client info for CCS Header: "+v)}const d=this.createTokenRequestHeaders(c||t.ccsCredential),h={clientId:((g=t.tokenBodyParameters)==null?void 0:g.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 J(this.executePostToTokenEndpoint.bind(this),x.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(i,a,d,h,t.correlationId,x.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,a;(i=this.performanceClient)==null||i.addQueueMeasurement(x.AuthClientCreateTokenRequestBody,e.correlationId);const t=new ms(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[yi])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):na.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&&!Kh(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const c=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await cw(c.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(c.assertionType)}if(t.addGrantType(pE.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===ze.POP){const c=new Ea(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await J(c.generateCnf.bind(c),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===ze.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Qe(Zl);(!_r.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let r;if(e.clientInfo)try{const c=Il(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${c.uid}${en.CLIENT_INFO_SEPARATOR}${c.utid}`,type:Un.HOME_ACCOUNT_ID}}catch(c){this.logger.verbose("Could not parse client info for CCS Header: "+c)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Un.HOME_ACCOUNT_ID:try{const c=ua(r.credential);t.addCcsOid(c)}catch(c){this.logger.verbose("Could not parse home account ID for CCS Header: "+c)}break;case Un.UPN:t.addCcsUpn(r.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[Pv])&&t.addExtraQueryParameters({[Pv]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var a,c;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(a=this.performanceClient)==null||a.addQueueMeasurement(x.AuthClientCreateQueryString,t);const r=new ms(t,this.performanceClient);r.addClientId(e.embeddedClientId||((c=e.extraQueryParameters)==null?void 0:c[yi])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];if(r.addScopes(i,!0,this.oidcDefaultScopes),r.addRedirectUri(e.redirectUri),r.addCorrelationId(t),r.addResponseMode(e.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),Kh(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&r.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&r.addPrompt(e.prompt),e.domainHint&&r.addDomainHint(e.domainHint),e.prompt!==Ut.SELECT_ACCOUNT)if(e.sid&&e.prompt===Ut.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let h=this.extractLoginHint(e.account);if(h&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),h=null),h){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(h);try{const m=ua(e.account.homeAccountId);r.addCcsOid(m)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===Ut.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(d);try{const m=ua(e.account.homeAccountId);r.addCcsOid(m)}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"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(e.account.username);try{const m=ua(e.account.homeAccountId);r.addCcsOid(m)}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"),r.addLoginHint(e.loginHint),r.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&r.addNonce(e.nonce),e.state&&r.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,r),e.nativeBroker&&(r.addNativeBroker(),e.authenticationScheme===ze.POP)){const d=new Ea(this.cryptoUtils);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await J(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}return r.createQueryString()}createLogoutUrlQueryString(e){const t=new ms(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 HB=300;class Gh extends tm{constructor(e,t){super(e,t)}async acquireToken(e){var c,d;(c=this.performanceClient)==null||c.addQueueMeasurement(x.RefreshTokenClientAcquireToken,e.correlationId);const t=Kr(),r=await J(this.executeTokenRequest.bind(this),x.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=r.headers)==null?void 0:d[un.X_MS_REQUEST_ID],a=new Ci(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return a.validateTokenResponse(r.body),J(a.handleServerTokenResponse.bind(a),x.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){var r;if(!e)throw Qe(KE);if((r=this.performanceClient)==null||r.addQueueMeasurement(x.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw Y(Vf);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await J(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const a=i instanceof Cr&&i.errorCode===Nl,c=i instanceof $o&&i.errorCode===vv.INVALID_GRANT_ERROR&&i.subError===vv.CLIENT_MISMATCH_ERROR;if(a||c)return J(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return J(this.acquireTokenWithCachedRefreshToken.bind(this),x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var a;(a=this.performanceClient)==null||a.addQueueMeasurement(x.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=Ii(this.cacheManager.getRefreshToken.bind(this.cacheManager),x.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw zh(Nl);if(r.expiresOn&&$h(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||HB))throw zh(nm);const i={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||ze.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Un.HOME_ACCOUNT_ID}};try{return await J(this.acquireToken.bind(this),x.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(c){if(c instanceof Cr&&c.subError===nu){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=la(r);this.cacheManager.removeRefreshToken(d)}throw c}}async executeTokenRequest(e,t){var h,m;(h=this.performanceClient)==null||h.addQueueMeasurement(x.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),i=Me.appendQueryString(t.tokenEndpoint,r),a=await J(this.createTokenRequestBody.bind(this),x.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),c=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((m=e.tokenBodyParameters)==null?void 0:m.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 J(this.executePostToTokenEndpoint.bind(this),x.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,a,c,d,e.correlationId,x.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,a,c;(i=this.performanceClient)==null||i.addQueueMeasurement(x.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new ms(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||((a=e.tokenBodyParameters)==null?void 0:a[yi])||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,(c=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:c.defaultScopes),r.addGrantType(pE.REFRESH_TOKEN_GRANT),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!Kh(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await cw(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===ze.POP){const d=new Ea(this.cryptoUtils,this.performanceClient);let h;e.popKid?h=this.cryptoUtils.encodeKid(e.popKid):h=(await J(d.generateCnf.bind(d),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,r.addPopToken(h)}else if(e.authenticationScheme===ze.SSH)if(e.sshJwk)r.addSshJwk(e.sshJwk);else throw Qe(Zl);if((!_r.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case Un.HOME_ACCOUNT_ID:try{const d=ua(e.ccsCredential.credential);r.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case Un.UPN:r.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&r.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&r.addExtraQueryParameters(e.tokenBodyParameters),r.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class $B extends tm{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[r,i]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...Ia]});return i===Oo.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 Gh(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),r}catch(r){if(r instanceof Jl&&r.errorCode===ao)return new Gh(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw r}}async acquireCachedToken(e){var h;(h=this.performanceClient)==null||h.addQueueMeasurement(x.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Oo.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!_r.isEmptyObj(e.claims))throw this.setCacheOutcome(Oo.FORCE_REFRESH_OR_CLAIMS,e.correlationId),Y(ao);if(!e.account)throw Y(Vf);const r=e.account.tenantId||OB(e.authority),i=this.cacheManager.getTokenKeys(),a=this.cacheManager.getAccessToken(e.account,e,i,r,this.performanceClient,e.correlationId);if(a){if(_F(a.cachedAt)||$h(a.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Oo.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),Y(ao);a.refreshOn&&$h(a.refreshOn,0)&&(t=Oo.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Oo.NO_CACHED_ACCESS_TOKEN,e.correlationId),Y(ao);const c=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:a,idToken:this.cacheManager.getIdToken(e.account,i,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(c)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await J(this.generateResultFromCacheRecord.bind(this),x.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var r,i;(r=this.serverTelemetryManager)==null||r.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},t),e!==Oo.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(x.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let r;if(e.idToken&&(r=bi(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const a=r==null?void 0:r.auth_time;if(!a)throw Y(Bf);xE(a,t.maxAge)}return Ci.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const KB={sendGetRequestAsync:()=>Promise.reject(Y(Ae)),sendPostRequestAsync:()=>Promise.reject(Y(Ae))};/*! @azure/msal-common v14.16.0 2024-11-05 */const xv=",",uw="|";function WB(n){const{skus:e,libraryName:t,libraryVersion:r,extensionName:i,extensionVersion:a}=n,c=new Map([[0,[t,r]],[2,[i,a]]]);let d=[];if(e!=null&&e.length){if(d=e.split(xv),d.length<4)return e}else d=Array.from({length:4},()=>uw);return c.forEach((h,m)=>{var g,v;h.length===2&&((g=h[0])!=null&&g.length)&&((v=h[1])!=null&&v.length)&&zB({skuArr:d,index:m,skuName:h[0],skuVersion:h[1]})}),d.join(xv)}function zB(n){const{skuArr:e,index:t,skuName:r,skuVersion:i}=n;t>=e.length||(e[t]=[r,i].join(uw))}class As{constructor(e,t){this.cacheOutcome=Oo.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||B.EMPTY_STRING,this.wrapperVer=e.wrapperVer||B.EMPTY_STRING,this.telemetryCacheKey=Kt.CACHE_KEY+en.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${Kt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r!=null&&r.length&&t.push(`broker_error=${r}`);const i=t.join(Kt.VALUE_SEPARATOR),a=this.getRegionDiscoveryFields(),c=[e,a].join(Kt.VALUE_SEPARATOR);return[Kt.SCHEMA_VERSION,c,i].join(Kt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=As.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(Kt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(Kt.VALUE_SEPARATOR),a=e.errors.length,c=t<a?Kt.OVERFLOW_TRUE:Kt.OVERFLOW_FALSE,d=[a,c].join(Kt.VALUE_SEPARATOR);return[Kt.SCHEMA_VERSION,e.cacheHits,r,i,d].join(Kt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=Kt.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 ct?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(Kt.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=As.maxErrorsToSend(e),r=e.errors.length;if(t===r)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,r=0,i=0;const a=e.errors.length;for(t=0;t<a;t++){const c=e.failedRequests[2*t]||B.EMPTY_STRING,d=e.failedRequests[2*t+1]||B.EMPTY_STRING,h=e.errors[t]||B.EMPTY_STRING;if(i+=c.toString().length+d.toString().length+h.length+3,i<Kt.MAX_LAST_HEADER_BYTES)r+=1;else break}return r}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||B.EMPTY_STRING),e.push(this.regionSource||B.EMPTY_STRING),e.push(this.regionOutcome||B.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 WB(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const dw="missing_kid_error",hw="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const GB={[dw]:"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.",[hw]:"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 om extends ct{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,om.prototype)}}function Uv(n){return new om(n,GB[n])}/*! @azure/msal-common v14.16.0 2024-11-05 */class im{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw Uv(dw);if(!e.alg)throw Uv(hw);const t=new im({typ:e.typ||tF.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Fv{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class qB{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:RB.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new Fv}}startPerformanceMeasurement(){return new Fv}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 am="pkce_not_created",qh="crypto_nonexistent",ru="empty_navigate_uri",fw="hash_empty_error",sm="no_state_in_hash",mw="hash_does_not_contain_known_properties",gw="unable_to_parse_state",pw="state_interaction_type_mismatch",_w="interaction_in_progress",vw="popup_window_error",yw="empty_window_error",Ei="user_cancelled",YB="monitor_popup_timeout",Cw="monitor_window_timeout",Ew="redirect_in_iframe",ww="block_iframe_reload",Tw="block_nested_popups",jB="iframe_closed_prematurely",ou="silent_logout_unsupported",bw="no_account_error",JB="silent_prompt_value_error",Iw="no_token_request_cache_error",Aw="unable_to_parse_token_request_cache_error",cm="no_cached_authority_error",QB="auth_request_not_set_error",XB="invalid_cache_type",iu="non_browser_environment",ra="database_not_open",Rl="no_network_connectivity",Sw="post_request_failed",kw="get_request_failed",Yh="failed_to_parse_response",Nw="unable_to_load_token",lm="crypto_key_not_found",Rw="auth_code_required",Ow="auth_code_or_nativeAccountId_required",Pw="spa_code_and_nativeAccountId_present",um="database_unavailable",Mw="unable_to_acquire_token_from_native_platform",Dw="native_handshake_timeout",Lw="native_extension_not_installed",Fs="native_connection_not_established",xw="uninitialized_public_client_application",Uw="native_prompt_not_supported",Fw="invalid_base64_string",Bw="invalid_pop_token_request",Vw="failed_to_build_headers",Hw="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const ro="For more visit: aka.ms/msaljs/browser-errors",ZB={[am]:"The PKCE code challenge and verifier could not be generated.",[qh]:"The crypto object or function is not available.",[ru]:"Navigation URI is empty. Please check stack trace for more info.",[fw]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${ro}`,[sm]:"Hash does not contain state. Please verify that the request originated from msal.",[mw]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${ro}`,[gw]:"Unable to parse state. Please verify that the request originated from msal.",[pw]:"Hash contains state but the interaction type does not match the caller.",[_w]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${ro}`,[vw]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[yw]:"window.open returned null or undefined window object.",[Ei]:"User cancelled the flow.",[YB]:`Token acquisition in popup failed due to timeout. ${ro}`,[Cw]:`Token acquisition in iframe failed due to timeout. ${ro}`,[Ew]:"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.",[ww]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${ro}`,[Tw]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[jB]:"The iframe being monitored was closed prematurely.",[ou]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[bw]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[JB]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[Iw]:"No token request found in cache.",[Aw]:"The cached token request could not be parsed.",[cm]:"No cached authority found.",[QB]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[XB]:"Invalid cache type",[iu]:"Login and token requests are not supported in non-browser environments.",[ra]:"Database is not open!",[Rl]:"No network connectivity. Check your internet connection.",[Sw]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[kw]:"Network request failed. Please check the network trace to determine root cause.",[Yh]:"Failed to parse network response. Check network trace.",[Nw]:"Error loading token to cache.",[lm]:"Cryptographic Key or Keypair not found in browser storage.",[Rw]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Ow]:"An authorization code or nativeAccountId must be provided to this flow.",[Pw]:"Request cannot contain both spa code and native account id.",[um]:"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.",[Mw]:`Unable to acquire token from native platform. ${ro}`,[Dw]:"Timed out while attempting to establish connection to browser extension",[Lw]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Fs]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${ro}`,[xw]:`You must call and await the initialize function before attempting to call any other MSAL API. ${ro}`,[Uw]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Fw]:"Invalid base64 encoded string.",[Bw]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[Vw]:"Failed to build request headers object.",[Hw]:"Failed to parse response headers"};class Bs extends ct{constructor(e,t){super(e,ZB[e],t),Object.setPrototypeOf(this,Bs.prototype),this.name="BrowserAuthError"}}function oe(n,e){return new Bs(n,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Mn={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"},da={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},hi={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},_n={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},Bv={GET:"GET",POST:"POST"},$e={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"},Ro={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Kc={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},rt={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var ce;(function(n){n.Redirect="redirect",n.Popup="popup",n.Silent="silent",n.None="none"})(ce||(ce={}));const Vv={scopes:Ia},$w="jwk",jh="msal.db",eV=1,tV=`${jh}.keys`,On={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},nV=[On.Default,On.Skip,On.RefreshTokenAndNetwork],rV="msal.browser.log.level",oV="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Wc(n){return encodeURIComponent(dm(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function au(n){return Kw(n).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function dm(n){return Kw(new TextEncoder().encode(n))}function Kw(n){const e=Array.from(n,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const iV="RSASSA-PKCS1-v1_5",Ww="SHA-256",aV=2048,sV=new Uint8Array([1,0,1]),Hv="0123456789abcdef",$v=new Uint32Array(1),cV="crypto_subtle_undefined",hm={name:iV,hash:Ww,modulusLength:aV,publicExponent:sV};function lV(n){if(!window)throw oe(iu);if(!window.crypto)throw oe(qh);if(!n&&!window.crypto.subtle)throw oe(qh,cV)}async function zw(n,e,t){e==null||e.addQueueMeasurement(x.Sha256Digest,t);const i=new TextEncoder().encode(n);return window.crypto.subtle.digest(Ww,i)}function uV(n){return window.crypto.getRandomValues(n)}function eh(){return window.crypto.getRandomValues($v),$v[0]}function fo(){const n=Date.now(),e=eh()*1024+(eh()&1023),t=new Uint8Array(16),r=Math.trunc(e/2**30),i=e&2**30-1,a=eh();t[0]=n/2**40,t[1]=n/2**32,t[2]=n/2**24,t[3]=n/2**16,t[4]=n/2**8,t[5]=n,t[6]=112|r>>>8,t[7]=r,t[8]=128|i>>>24,t[9]=i>>>16,t[10]=i>>>8,t[11]=i,t[12]=a>>>24,t[13]=a>>>16,t[14]=a>>>8,t[15]=a;let c="";for(let d=0;d<t.length;d++)c+=Hv.charAt(t[d]>>>4),c+=Hv.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(c+="-");return c}async function dV(n,e){return window.crypto.subtle.generateKey(hm,n,e)}async function th(n){return window.crypto.subtle.exportKey($w,n)}async function hV(n,e,t){return window.crypto.subtle.importKey($w,n,hm,e,t)}async function fV(n,e){return window.crypto.subtle.sign(hm,n,e)}async function Gw(n){const e=await zw(n),t=new Uint8Array(e);return au(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Ss="storage_not_supported",Jh="stubbed_public_client_application_called",Ol="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const cl={[Ss]:"Given storage configuration option was not supported.",[Jh]:"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",[Ol]:"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."};cl[Ss],cl[Jh],cl[Ol];class fm extends ct{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,fm.prototype)}}function mm(n){return new fm(n,cl[n])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function mV(n){n.location.hash="",typeof n.history.replaceState=="function"&&n.history.replaceState(null,"",`${n.location.origin}${n.location.pathname}${n.location.search}`)}function gV(n){const e=n.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function gm(){return window.parent!==window}function pV(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${Mn.POPUP_NAME_PREFIX}.`)===0}function so(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function _V(){const e=new Me(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function vV(){if(Me.hashContainsKnownProperties(window.location.hash)&&gm())throw oe(ww)}function yV(n){if(gm()&&!n)throw oe(Ew)}function CV(){if(pV())throw oe(Tw)}function qw(){if(typeof window>"u")throw oe(iu)}function Yw(n){if(!n)throw oe(xw)}function pm(n){qw(),vV(),CV(),Yw(n)}function Kv(n,e){if(pm(n),yV(e.system.allowRedirectInIframe),e.cache.cacheLocation===_n.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw mm(Ol)}function jw(n){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(n).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function EV(){return fo()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Pl{navigateInternal(e,t){return Pl.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Pl.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(r=>{setTimeout(()=>{r(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class wV{async sendGetRequestAsync(e,t){let r,i={},a=0;const c=Wv(t);try{r=await fetch(e,{method:Bv.GET,headers:c})}catch{throw oe(window.navigator.onLine?kw:Rl)}i=zv(r.headers);try{return a=r.status,{headers:i,body:await r.json(),status:a}}catch{throw Mv(oe(Yh),a,i)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",i=Wv(t);let a,c=0,d={};try{a=await fetch(e,{method:Bv.POST,headers:i,body:r})}catch{throw oe(window.navigator.onLine?Sw:Rl)}d=zv(a.headers);try{return c=a.status,{headers:d,body:await a.json(),status:c}}catch{throw Mv(oe(Yh),c,d)}}}function Wv(n){try{const e=new Headers;if(!(n&&n.headers))return e;const t=n.headers;return Object.entries(t).forEach(([r,i])=>{e.append(r,i)}),e}catch{throw oe(Vw)}}function zv(n){try{const e={};return n.forEach((t,r)=>{e[r]=t}),e}catch{throw oe(Hw)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const TV=6e4,Qh=1e4,bV=3e4,IV=2e3;function AV({auth:n,cache:e,system:t,telemetry:r},i){const a={clientId:B.EMPTY_STRING,authority:`${B.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:B.EMPTY_STRING,authorityMetadata:B.EMPTY_STRING,redirectUri:typeof window<"u"?so():"",postLogoutRedirectUri:B.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:uo.AAD,OIDCOptions:{serverResponseType:Us.FRAGMENT,defaultScopes:[B.OPENID_SCOPE,B.PROFILE_SCOPE,B.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Wf.None,tenant:B.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},c={cacheLocation:_n.SessionStorage,temporaryCacheLocation:_n.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===_n.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:et.Info,piiLoggingEnabled:!1},m={...{...rw,loggerOptions:d,networkClient:i?new wV:KB,navigationClient:new Pl,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||TV,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||Qh,navigateFrameWait:0,redirectNavigationTimeout:bV,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||IV,pollIntervalMilliseconds:Mn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},g={application:{appName:B.EMPTY_STRING,appVersion:B.EMPTY_STRING},client:new qB};if((n==null?void 0:n.protocolMode)!==uo.OIDC&&(n!=null&&n.OIDCOptions)&&new Ho(m.loggerOptions).warning(JSON.stringify(Qe(jE))),n!=null&&n.protocolMode&&n.protocolMode!==uo.AAD&&(m!=null&&m.allowNativeBroker))throw Qe(JE);return{auth:{...a,...n,OIDCOptions:{...a.OIDCOptions,...n==null?void 0:n.OIDCOptions}},cache:{...c,...e},system:m,telemetry:{...g,...r}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const SV="@azure/msal-browser",su="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class _m{static loggerCallback(e,t){switch(e){case et.Error:console.error(t);return;case et.Info:console.info(t);return;case et.Verbose:console.debug(t);return;case et.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var h;this.browserEnvironment=typeof window<"u",this.config=AV(e,this.browserEnvironment);let t;try{t=window[_n.SessionStorage]}catch{}const r=t==null?void 0:t.getItem(rV),i=(h=t==null?void 0:t.getItem(oV))==null?void 0:h.toLowerCase(),a=i==="true"?!0:i==="false"?!1:void 0,c={...this.config.system.loggerOptions},d=r&&Object.keys(et).includes(r)?et[r]:void 0;d&&(c.loggerCallback=_m.loggerCallback,c.logLevel=d),a!==void 0&&(c.piiLoggingEnabled=a),this.logger=new Ho(c,SV,su),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 wi extends _m{getModuleName(){return wi.MODULE_NAME}getId(){return wi.ID}async initialize(){return this.available=typeof window<"u",this.available}}wi.MODULE_NAME="";wi.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Hr(n){return new TextDecoder().decode(kV(n))}function kV(n){let e=n.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw oe(Fw)}const t=atob(e);return Uint8Array.from(t,r=>r.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class NV{constructor(){this.dbName=jh,this.version=eV,this.tableName=tV,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",i=>{i.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",i=>{const a=i;this.db=a.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(oe(um)))})}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,r)=>{if(!this.db)return r(oe(ra));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);c.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result)}),c.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((r,i)=>{if(!this.db)return i(oe(ra));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),r()}),d.addEventListener("error",h=>{this.closeConnection(),i(h)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(oe(ra));const c=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);c.addEventListener("success",()=>{this.closeConnection(),t()}),c.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(oe(ra));const a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();a.addEventListener("success",c=>{const d=c;this.closeConnection(),e(d.target.result)}),a.addEventListener("error",c=>{this.closeConnection(),t(c)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(oe(ra));const c=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);c.addEventListener("success",d=>{const h=d;this.closeConnection(),t(h.target.result===1)}),c.addEventListener("error",d=>{this.closeConnection(),r(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const r=window.indexedDB.deleteDatabase(jh),i=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(i),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),r.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Xh{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,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class RV{constructor(e){this.inMemoryCache=new Xh,this.indexedDBCache=new NV,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Bs&&e.errorCode===um)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(r){this.handleDatabaseAccessError(r)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(r){this.handleDatabaseAccessError(r)}}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(r){this.handleDatabaseAccessError(r)}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 wa{constructor(e,t,r){this.logger=e,lV(r??!1),this.cache=new RV(this.logger),this.performanceClient=t}createNewGuid(){return fo()}base64Encode(e){return dm(e)}base64Decode(e){return Hr(e)}base64UrlEncode(e){return Wc(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var g;const t=(g=this.performanceClient)==null?void 0:g.startMeasurement(x.CryptoOptsGetPublicKeyThumbprint,e.correlationId),r=await dV(wa.EXTRACTABLE,wa.POP_KEY_USAGES),i=await th(r.publicKey),a={e:i.e,kty:i.kty,n:i.n},c=Gv(a),d=await this.hashString(c),h=await th(r.privateKey),m=await hV(h,!1,["sign"]);return await this.cache.setItem(d,{privateKey:m,publicKey:r.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,r,i){var O;const a=(O=this.performanceClient)==null?void 0:O.startMeasurement(x.CryptoOptsSignJwt,i),c=await this.cache.getItem(t);if(!c)throw oe(lm);const d=await th(c.publicKey),h=Gv(d),m=Wc(JSON.stringify({kid:t})),g=im.getShrHeaderString({...r==null?void 0:r.header,alg:d.alg,kid:m}),v=Wc(g);e.cnf={jwk:JSON.parse(h)};const p=Wc(JSON.stringify(e)),w=`${v}.${p}`,T=new TextEncoder().encode(w),k=await fV(c.privateKey,T),I=au(new Uint8Array(k)),N=`${w}.${I}`;return a&&a.end({success:!0}),N}async hashString(e){return Gw(e)}}wa.POP_KEY_USAGES=["sign","verify"];wa.EXTRACTABLE=!0;function Gv(n){return JSON.stringify(n,Object.keys(n).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class OV{constructor(){if(!window.localStorage)throw mm(Ss)}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 PV{constructor(){if(!window.sessionStorage)throw mm(Ss)}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 Jw(n,e){if(!e)return null;try{return vr.parseRequestState(n,e).libraryState.meta}catch{throw Y(ya)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const MV=24*60*60*1e3;class DV{getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let i=0;i<r.length;i++){const a=r[i],[c,...d]=decodeURIComponent(a).trim().split("="),h=d.join("=");if(c===t)return h}return""}setItem(e,t,r,i=!0){let a=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(r){const c=LV(r);a+=`expires=${c};`}i&&(a+="Secure;"),document.cookie=a}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(r=>{const i=decodeURIComponent(r).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function LV(n){const e=new Date;return new Date(e.getTime()+n*MV).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Zh extends Ca{constructor(e,t,r,i,a,c){super(e,r,i,a),this.cacheConfig=t,this.logger=i,this.internalStorage=new Xh,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new DV,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=c}setupBrowserStorage(e){try{switch(e){case _n.LocalStorage:return new OV;case _n.SessionStorage:return new PV;case _n.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=_n.MemoryStorage,new Xh}migrateCacheEntries(){const e=`${B.CACHE_PREFIX}.${Dt.ID_TOKEN}`,t=`${B.CACHE_PREFIX}.${Dt.CLIENT_INFO}`,r=`${B.CACHE_PREFIX}.${Dt.ERROR}`,i=`${B.CACHE_PREFIX}.${Dt.ERROR_DESC}`,a=this.browserStorage.getItem(e),c=this.browserStorage.getItem(t),d=this.browserStorage.getItem(r),h=this.browserStorage.getItem(i),m=[a,c,d,h];[Dt.ID_TOKEN,Dt.CLIENT_INFO,Dt.ERROR,Dt.ERROR_DESC].forEach((v,p)=>{const w=m[p];w&&this.setTemporaryCache(v,w,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Ro.ACCOUNT_KEYS),t=this.getItem(`${Ro.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 a=this.getItem(i);if(a){const c=this.validateAndParseJson(a);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case me.ID_TOKEN:if(Tv(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const d=c,h=this.updateCredentialCacheKey(i,d);this.addTokenKey(h,me.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 me.ACCESS_TOKEN:case me.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(wv(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const d=c,h=this.updateCredentialCacheKey(i,d);this.addTokenKey(h,me.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 me.REFRESH_TOKEN:if(bv(c)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const d=c,h=this.updateCredentialCacheKey(i,d);this.addTokenKey(h,me.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 a=this.getItem(i);if(a){const c=this.validateAndParseJson(a);c&&Ot.isAccountEntity(c)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const r=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,r,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const r=this.validateAndParseJson(t);return!r||!Ot.isAccountEntity(r)?(this.removeAccountKeyFromMap(e),null):Ca.toObject(new Ot,r)}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(Ro.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(Ro.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(),r=t.indexOf(e);r>-1?(t.splice(r,1),this.setItem(Ro.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,me.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,me.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,me.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Ro.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 r=this.getTokenKeys();switch(t){case me.ID_TOKEN:r.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),r.idToken.push(e));break;case me.ACCESS_TOKEN:r.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),r.accessToken.push(e));break;case me.REFRESH_TOKEN:r.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),r.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Hh)}this.setItem(`${Ro.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const r=this.getTokenKeys();switch(t){case me.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=r.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),r.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 me.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const a=r.accessToken.indexOf(e);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),r.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case me.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const c=r.refreshToken.indexOf(e);c>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),r.refreshToken.splice(c,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),Y(Hh)}this.setItem(`${Ro.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(r))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.ID_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!Tv(r)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),r)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=la(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,me.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.ACCESS_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!wv(r)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),r)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=la(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,me.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.REFRESH_TOKEN),null;const r=this.validateAndParseJson(t);return!r||!bv(r)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,me.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),r)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=la(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,me.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!AF(e,r)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=IF(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 r=this.validateAndParseJson(t);return!r||!TF(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r)}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 r=this.validateAndParseJson(t);return r&&SF(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Kc.WRAPPER_SKU,e),this.internalStorage.setItem(Kc.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Kc.WRAPPER_SKU)||B.EMPTY_STRING,t=this.internalStorage.getItem(Kc.WRAPPER_VER)||B.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(Dt.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(Dt.ACTIVE_ACCOUNT),a=this.getItem(i);if(!a)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const c=this.getAccountInfoFilteredBy({localAccountId:a});return c?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(c),c):null}const r=this.validateAndParseJson(t);return r?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:r.homeAccountId,localAccountId:r.localAccountId,tenantId:r.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(Dt.ACTIVE_ACCOUNT_FILTERS),r=this.generateCacheKey(Dt.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(r,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(r)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return!r||!bF(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const a=this.cookieStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),a}const i=this.temporaryCacheStorage.getItem(r);if(!i){if(this.cacheConfig.cacheLocation===_n.LocalStorage){const a=this.browserStorage.getItem(r);if(a)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),a}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,r){const i=r?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(B.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(B.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(x.ClearTokensAndKeysWithClaims,t);const r=this.getTokenKeys(),i=[];r.accessToken.forEach(a=>{const c=this.getAccessTokenCredential(a);c!=null&&c.requestedClaimsHash&&a.includes(c.requestedClaimsHash.toLowerCase())&&i.push(this.removeAccessToken(a))}),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):_r.startsWith(e,B.CACHE_PREFIX)||_r.startsWith(e,Dt.ADAL_ID_TOKEN)?e:`${B.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=vr.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${$e.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=vr.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${$e.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=vr.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${$e.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),r=this.getTemporaryCache(t);if(!r)return null;const i=this.generateAuthorityKey(r);return this.getTemporaryCache(i)}updateCacheEntries(e,t,r,i,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const c=this.generateStateKey(e);this.setTemporaryCache(c,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const h=this.generateAuthorityKey(e);if(this.setTemporaryCache(h,r,!1),a){const m={credential:a.homeAccountId,type:Un.HOME_ACCOUNT_ID};this.setTemporaryCache($e.CCS_CREDENTIAL,JSON.stringify(m),!0)}else if(i){const m={credential:i,type:Un.UPN};this.setTemporaryCache($e.CCS_CREDENTIAL,JSON.stringify(m),!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($e.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey($e.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey($e.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey($e.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey($e.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey($e.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),r=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r||B.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf($e.REQUEST_STATE)===-1)return;const r=this.temporaryCacheStorage.getItem(t);if(!r)return;const i=Jw(this.cryptoImpl,r);i&&i.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${r}`),this.resetRequestCache(r))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=dm(JSON.stringify(e));this.setTemporaryCache($e.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache($e.REQUEST_PARAMS,!0);if(!t)throw oe(Iw);let r;try{r=JSON.parse(Hr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),oe(Aw)}if(this.removeTemporaryItem(this.generateCacheKey($e.REQUEST_PARAMS)),!r.authority){const i=this.generateAuthorityKey(e),a=this.getTemporaryCache(i);if(!a)throw oe(cm);r.authority=a}return r}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache($e.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=`${B.CACHE_PREFIX}.${$e.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${B.CACHE_PREFIX}.${$e.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw oe(_w);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(Dt.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(Dt.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(Dt.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(Dt.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const r=t||e;if(r){const i=bi(r,Hr);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 r=la(t);if(e!==r){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(r,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),r;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,h,m;const r=Ql((d=e.account)==null?void 0:d.homeAccountId,(h=e.account)==null?void 0:h.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const a=Xl((m=e.account)==null?void 0:m.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,Hr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),c={idToken:r,accessToken:a};return this.saveCacheRecord(c)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(i){if(i instanceof fa&&this.performanceClient&&r)try{const a=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:a.refreshToken.length,cacheIdCount:a.idToken.length,cacheAtCount:a.accessToken.length},r)}catch{}throw i}}}const xV=(n,e)=>{const t={cacheLocation:_n.MemoryStorage,temporaryCacheLocation:_n.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Zh(n,t,bl,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function UV(n,e,t,r){return n.verbose("getAllAccounts called"),t?e.getAllAccounts(r):[]}function FV(n,e,t){if(e.trace("getAccount called"),Object.keys(n).length===0)return e.warning("getAccount: No accountFilter provided"),null;const r=t.getAccountInfoFilteredBy(n);return r?(e.verbose("getAccount: Account matching provided filter found, returning"),r):(e.verbose("getAccount: No matching account found, returning null"),null)}function BV(n,e,t){if(e.trace("getAccountByUsername called"),!n)return e.warning("getAccountByUsername: No username provided"),null;const r=t.getAccountInfoFilteredBy({username:n});return r?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${n}`),r):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function VV(n,e,t){if(e.trace("getAccountByHomeId called"),!n)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=t.getAccountInfoFilteredBy({homeAccountId:n});return r?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${n}`),r):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function HV(n,e,t){if(e.trace("getAccountByLocalId called"),!n)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const r=t.getAccountInfoFilteredBy({localAccountId:n});return r?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${n}`),r):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function $V(n,e){e.setActiveAccount(n)}function KV(n){return n.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const fe={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 WV{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Ho({})}addEventCallback(e,t,r){if(typeof window<"u"){const i=r||EV();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,r,i){if(typeof window<"u"){const a={eventType:e,interactionType:t||null,payload:r||null,error:i||null,timestamp:Date.now()};this.eventCallbacks.forEach(([c,d],h)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${h}: ${e}`),c.apply(null,[a]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Qw{constructor(e,t,r,i,a,c,d,h,m){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=a,this.navigationClient=c,this.nativeMessageHandler=h,this.correlationId=m||fo(),this.logger=i.clone(Mn.MSAL_SKU,su,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){Ot.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(Ot.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 Me.getAbsoluteUrl(t,so())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={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 As(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(x.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},a=e.requestAuthority||this.config.auth.authority,c=r!=null&&r.length?r==="true":this.config.auth.instanceAware,d=t&&c?this.config.auth.authority.replace(Me.getDomainFromUrl(a),t.environment):a,h=Qt.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),m=await J(aw,x.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(h,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!m.isAlias(t.environment))throw Qe(QE);return m}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const zV=32;async function GV(n,e,t){n.addQueueMeasurement(x.GeneratePkceCodes,t);const r=Ii(qV,x.GenerateCodeVerifier,e,n,t)(n,e,t),i=await J(YV,x.GenerateCodeChallengeFromVerifier,e,n,t)(r,n,e,t);return{verifier:r,challenge:i}}function qV(n,e,t){try{const r=new Uint8Array(zV);return Ii(uV,x.GetRandomValues,e,n,t)(r),au(r)}catch{throw oe(am)}}async function YV(n,e,t,r){e.addQueueMeasurement(x.GenerateCodeChallengeFromVerifier,r);try{const i=await J(zw,x.Sha256Digest,t,e,r)(n,e,r);return au(new Uint8Array(i))}catch{throw oe(am)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function vm(n,e,t,r){t.addQueueMeasurement(x.InitializeBaseRequest,n.correlationId);const i=n.authority||e.auth.authority,a=[...n&&n.scopes||[]],c={...n,correlationId:n.correlationId,authority:i,scopes:a};if(!c.authenticationScheme)c.authenticationScheme=ze.BEARER,r.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(c.authenticationScheme===ze.SSH){if(!n.sshJwk)throw Qe(Zl);if(!n.sshKid)throw Qe(YE)}r.verbose(`Authentication Scheme set to "${c.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&n.claims&&!_r.isEmptyObj(n.claims)&&(c.requestedClaimsHash=await Gw(n.claims)),c}async function jV(n,e,t,r,i){r.addQueueMeasurement(x.InitializeSilentRequest,n.correlationId);const a=await J(vm,x.InitializeBaseRequest,i,r,n.correlationId)(n,t,r,i);return{...n,...a,account:e,forceRefresh:n.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Aa extends Qw{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await J(GV,x.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),r={...e,redirectUri:e.redirectUri,code:B.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=B.S256_CODE_CHALLENGE_METHOD,r}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||fo(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}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=Me.getAbsoluteUrl(e.postLogoutRedirectUri,so())):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=Me.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,so())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=Me.getAbsoluteUrl(so(),so())):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(x.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await J(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new lw(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:i,requestExtraQueryParameters:a,account:c}=e;this.performanceClient.addQueueMeasurement(x.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await J(this.getDiscoveredAuthority.bind(this),x.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:i,requestExtraQueryParameters:a,account:c}),h=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:h.loggerCallback,piiLoggingEnabled:h.piiLoggingEnabled,logLevel:h.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Mn.MSAL_SKU,version:su,cpu:B.EMPTY_STRING,os:B.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(x.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const r=this.getRedirectUri(e.redirectUri),i={interactionType:t},a=vr.setRequestState(this.browserCrypto,e&&e.state||B.EMPTY_STRING,i),d={...await J(vm,x.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:a,nonce:e.nonce||fo(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const h=e.account||this.browserStorage.getActiveAccount();if(h&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${h.homeAccountId}`,this.correlationId),d.account=h),!d.loginHint&&!h){const m=this.browserStorage.getLegacyLoginHint();m&&(d.loginHint=m)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const JV="ContentError",Xw="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const QV="USER_INTERACTION_REQUIRED",XV="USER_CANCEL",ZV="NO_NETWORK",e2="PERSISTENT_ERROR",t2="DISABLED",n2="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const r2=-2147186943,o2={[Xw]:"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 xr extends ct{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,xr.prototype),this.name="NativeAuthError",this.ext=r}}function oa(n){if(n.ext&&n.ext.status&&(n.ext.status===e2||n.ext.status===t2)||n.ext&&n.ext.error&&n.ext.error===r2)return!0;switch(n.errorCode){case JV:return!0;default:return!1}}function ef(n,e,t){if(t&&t.status)switch(t.status){case n2:return zh(sw);case QV:return new Cr(n,e);case XV:return oe(Ei);case ZV:return oe(Rl)}return new xr(n,o2[n]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Zw extends Aa{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(rt.acquireTokenSilent_silentFlow),r=await J(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new $B(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const c=(await J(i.acquireCachedToken.bind(i),x.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),c}catch(a){throw a instanceof Bs&&a.errorCode===lm&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),a}}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 ma extends Qw{constructor(e,t,r,i,a,c,d,h,m,g,v,p){var C;super(e,t,r,i,a,c,h,m,p),this.apiId=d,this.accountId=g,this.nativeMessageHandler=m,this.nativeStorageManager=v,this.silentCacheClient=new Zw(e,this.nativeStorageManager,r,i,a,c,h,m,p),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const w=this.nativeMessageHandler.getExtensionId()===da.PREFERRED_EXTENSION_ID?"chrome":(C=this.nativeMessageHandler.getExtensionId())!=null&&C.length?"unknown":void 0;this.skus=As.makeExtraSkuString({libraryName:Mn.MSAL_SKU,libraryVersion:su,extensionName:w,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[IB]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(x.NativeInteractionClientAcquireToken,e.correlationId),r=Kr();try{const i=await this.initializeNativeRequest(e);try{const m=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),m}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...a}=i,c={method:hi.GetToken,request:a},d=await this.nativeMessageHandler.sendMessage(c),h=this.validateNativeResponse(d);return await this.handleNativeResponse(h,i,r).then(m=>(t.end({success:!0,isNativeBroker:!0,requestId:m.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),m)).catch(m=>{throw t.end({success:!1,errorCode:m.errorCode,subErrorCode:m.subError,isNativeBroker:!0}),m})}catch(i){throw i instanceof xr&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:_t.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Y(Bh);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!r)throw Y(Bh);try{const i=this.createSilentCacheRequest(t,r),a=await this.silentCacheClient.acquireToken(i),c={...r,idTokenClaims:a==null?void 0:a.idTokenClaims,idToken:a==null?void 0:a.idToken};return{...a,account:c}}catch(i){throw i}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const i=await this.initializeNativeRequest(r),a={method:hi.GetToken,request:i};try{const h=await this.nativeMessageHandler.sendMessage(a);this.validateNativeResponse(h)}catch(h){if(h instanceof xr&&(this.serverTelemetryManager.setNativeBrokerErrorCode(h.errorCode),oa(h)))throw h}this.browserStorage.setTemporaryCache($e.NATIVE_REQUEST,JSON.stringify(i),!0);const c={apiId:rt.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,c)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)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,...a}=r;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($e.NATIVE_REQUEST));const c={method:hi.GetToken,request:a},d=Kr();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const h=await this.nativeMessageHandler.sendMessage(c);this.validateNativeResponse(h);const m=this.handleNativeResponse(h,a,d);this.browserStorage.setInteractionInProgress(!1);const g=await m;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),g}catch(h){throw this.browserStorage.setInteractionInProgress(!1),h}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){var g;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=bi(e.id_token,Hr),a=this.createHomeAccountIdentifier(e,i),c=(g=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:g.homeAccountId;if(a!==c&&e.account.id!==t.accountId)throw ef(Xw);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),h=rm(this.browserStorage,d,a,Hr,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),m=await this.generateAuthenticationResult(e,t,i,h,d.canonicalAuthority,r);return this.cacheAccount(h),this.cacheNativeTokens(e,t,a,i,e.access_token,m.tenantId,r),m}createHomeAccountIdentifier(e,t){return Ot.generateHomeAccountId(e.client_info||B.EMPTY_STRING,fr.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?_t.fromString(e.scope):_t.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===ze.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Ea(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Y($f);return r.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,r,i,a,c){const d=this.addTelemetryFromNativeResponse(e),h=e.scope?_t.fromString(e.scope):_t.fromString(t.scope),m=e.account.properties||{},g=m.UID||r.oid||r.sub||B.EMPTY_STRING,v=m.TenantId||r.tid||B.EMPTY_STRING,p=Qf(i.getAccountInfo(),void 0,r,e.id_token);p.nativeAccountId!==e.account.id&&(p.nativeAccountId=e.account.id);const w=await this.generatePopAccessToken(e,t),C=t.tokenType===ze.POP?ze.POP:ze.BEARER;return{authority:a,uniqueId:g,tenantId:v,scopes:h.asArray(),account:p,idToken:e.id_token,idTokenClaims:r,accessToken:w,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(c+e.expires_in)*1e3),tokenType:C,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,r,i,a,c,d){const h=Ql(r,t.authority,e.id_token||"",t.clientId,i.tid||""),m=t.tokenType===ze.POP?B.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,g=d+m,v=this.generateScopes(e,t),p=Xl(r,t.authority,a,t.clientId,i.tid||c,v.printScopes(),g,0,Hr,void 0,t.tokenType,void 0,t.keyId),w={idToken:h,accessToken:p};this.nativeStorageManager.saveCacheRecord(w,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 _E(xf,"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 r=new Me(t);r.validateAsUri();const{scopes:i,...a}=e,c=new _t(i||[]);c.appendScopes(Ia);const d=()=>{switch(this.apiId){case rt.ssoSilent:case rt.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),Ut.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case Ut.NONE:case Ut.CONSENT:case Ut.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`),oe(Uw)}},h={...a,accountId:this.accountId,clientId:this.config.auth.clientId,authority:r.urlString,scope:c.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(h.signPopToken&&e.popKid)throw oe(Bw);if(this.handleExtraBrokerParams(h),h.extraParameters=h.extraParameters||{},h.extraParameters.telemetry=da.MATS_TELEMETRY,e.authenticationScheme===ze.POP){const m={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},g=new Ea(this.browserCrypto);let v;if(h.keyId)v=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:h.keyId})),h.signPopToken=!1;else{const p=await J(g.generateCnf.bind(g),x.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(m,this.logger);v=p.reqCnfString,h.keyId=p.kid,h.signPopToken=!0}h.reqCnf=v}return this.addRequestSKUs(h),h}handleExtraBrokerParams(e){var a;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(em)&&e.extraParameters.hasOwnProperty(Wh)&&e.extraParameters.hasOwnProperty(yi);if(!e.embeddedClientId&&!t)return;let r="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[Wh],r=e.extraParameters[yi]),e.extraParameters={child_client_id:r,child_redirect_uri:i},(a=this.performanceClient)==null||a.addFields({embeddedClientId:r,embeddedRedirectUri:i},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ur{constructor(e,t,r,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=r,this.handshakeEvent=r.startMeasurement(x.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:da.CHANNEL_ID,extensionId:this.extensionId,responseId:fo(),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((r,i)=>{this.resolvers.set(t.responseId,{resolve:r,reject:i})})}static async createProvider(e,t,r){e.trace("NativeMessageHandler - createProvider called.");try{const i=new Ur(e,t,r,da.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const a=new Ur(e,t,r);return await a.sendHandshakeRequest(),a}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:da.CHANNEL_ID,extensionId:this.extensionId,responseId:fo(),body:{method:hi.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,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),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}),r(oe(Dw)),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!==da.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===hi.HandshakeRequest){const r=this.handshakeResolvers.get(t.responseId);if(!r){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}),r.reject(oe(Lw))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const a=t.body.method;if(a===hi.Response){if(!r)return;const c=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(c)}`),c.status!=="Success")r.reject(ef(c.code,c.description,c.ext));else if(c.result)c.result.code&&c.result.description?r.reject(ef(c.result.code,c.result.description,c.result.ext)):r.resolve(c.result);else throw _E(xf,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(a===hi.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(a){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${a}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(a):i&&i.reject(a)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,r,i){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!r)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case ze.BEARER:case ze.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 ym{constructor(e,t,r,i,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=i,this.performanceClient=a}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(x.HandleCodeResponse,t.correlationId);let r;try{r=this.authModule.handleFragmentResponse(e,t.state)}catch(i){throw i instanceof $o&&i.subError===Ei?oe(Ei):i}return J(this.handleCodeResponseFromServer.bind(this),x.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(x.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await J(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const a=this.createCcsCredentials(t);a&&(this.authCodeRequest.ccsCredential=a)}return await J(this.authModule.acquireToken.bind(this.authModule),x.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:Un.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:Un.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function eT(n,e,t){const r=Sl(n);if(!r)throw ZE(n)?(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: ${n}`),oe(mw)):(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.`),oe(fw));return r}function i2(n,e,t){if(!n.state)throw oe(sm);const r=Jw(e,n.state);if(!r)throw oe(gw);if(r.interactionType!==t)throw oe(pw)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class a2 extends Aa{constructor(e,t,r,i,a,c,d,h,m,g){super(e,t,r,i,a,c,d,m,g),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=h}acquireToken(e){try{const r={popupName:this.generatePopupName(e.scopes||Ia,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,r)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(e,r))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},i=e&&e.authority,a=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,i,a)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,i,a))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var a;this.logger.verbose("acquireTokenPopupAsync called");const r=this.initializeServerTelemetryManager(rt.acquireTokenPopup),i=await J(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ce.Popup);jw(i.authority);try{const c=await J(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),h=Ur.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let m;h&&(m=this.performanceClient.startMeasurement(x.FetchAccountIdWithNativeBroker,e.correlationId));const g=await d.getAuthCodeUrl({...i,nativeBroker:h}),v=new ym(d,this.browserStorage,c,this.logger,this.performanceClient),p=this.initiateAuthRequest(g,t);this.eventHandler.emitEvent(fe.POPUP_OPENED,ce.Popup,{popupWindow:p},null);const w=await this.monitorPopupForHash(p,t.popupWindowParent),C=Ii(eT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(w,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Lr.removeThrottle(this.browserStorage,this.config.auth.clientId,c),C.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),m&&m.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw oe(Fs);const k=new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,C.accountId,this.nativeStorage,i.correlationId),{userRequestState:I}=vr.parseRequestState(this.browserCrypto,i.state);return await k.acquireToken({...i,state:I,prompt:void 0})}return await v.handleCodeResponse(C,i)}catch(c){throw(a=t.popup)==null||a.close(),c instanceof ct&&(c.setCorrelationId(this.correlationId),r.cacheFailedRequest(c)),c}}async logoutPopupAsync(e,t,r,i){var c,d,h,m;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(fe.LOGOUT_START,ce.Popup,e);const a=this.initializeServerTelemetryManager(rt.logoutPopup);try{await this.clearCacheOnLogout(e.account);const g=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:a,requestAuthority:r,account:e.account||void 0});try{g.authority.endSessionEndpoint}catch{if((c=e.account)!=null&&c.homeAccountId&&e.postLogoutRedirectUri&&g.authority.protocolMode===uo.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(fe.LOGOUT_SUCCESS,ce.Popup,e),i){const w={apiId:rt.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=Me.getAbsoluteUrl(i,so());await this.navigationClient.navigateInternal(C,w)}(h=t.popup)==null||h.close();return}}const v=g.getLogoutUri(e);this.eventHandler.emitEvent(fe.LOGOUT_SUCCESS,ce.Popup,e);const p=this.openPopup(v,t);if(this.eventHandler.emitEvent(fe.POPUP_OPENED,ce.Popup,{popupWindow:p},null),await this.monitorPopupForHash(p,t.popupWindowParent).catch(()=>{}),i){const w={apiId:rt.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},C=Me.getAbsoluteUrl(i,so());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${C}`),await this.navigationClient.navigateInternal(C,w)}else this.logger.verbose("No main window navigation requested")}catch(g){throw(m=t.popup)==null||m.close(),g instanceof ct&&(g.setCorrelationId(this.correlationId),a.cacheFailedRequest(g)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(fe.LOGOUT_FAILURE,ce.Popup,null,g),this.eventHandler.emitEvent(fe.LOGOUT_END,ce.Popup),g}this.eventHandler.emitEvent(fe.LOGOUT_END,ce.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"),oe(ru)}monitorPopupForHash(e,t){return new Promise((r,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const a=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(a),i(oe(Ei));return}let c="";try{c=e.location.href}catch{}if(!c||c==="about:blank")return;clearInterval(a);let d="";const h=this.config.auth.OIDCOptions.serverResponseType;e&&(h===Us.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw oe(yw);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(r){throw this.logger.error("error opening popup "+r.message),this.browserStorage.setInteractionInProgress(!1),oe(vw)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:i}){var w,C,T,k;const a=i.screenLeft?i.screenLeft:i.screenX,c=i.screenTop?i.screenTop:i.screenY,d=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let m=(w=r.popupSize)==null?void 0:w.width,g=(C=r.popupSize)==null?void 0:C.height,v=(T=r.popupPosition)==null?void 0:T.top,p=(k=r.popupPosition)==null?void 0:k.left;return(!m||m<0||m>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),m=Mn.POPUP_WIDTH),(!g||g<0||g>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),g=Mn.POPUP_HEIGHT),(!v||v<0||v>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,h/2-Mn.POPUP_HEIGHT/2+c)),(!p||p<0||p>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),p=Math.max(0,d/2-Mn.POPUP_WIDTH/2+a)),i.open(e,t,`width=${m}, height=${g}, top=${v}, left=${p}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(ce.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`${Mn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${Mn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class qv{constructor(e,t,r,i,a){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=i,this.performanceClient=a}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($e.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache($e.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:rt.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,r);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,r);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),oe(ru)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const r=this.browserStorage.generateStateKey(t),i=this.browserStorage.getTemporaryCache(r);if(!i)throw Y(Tl,"Cached State");let a;try{a=this.authModule.handleFragmentResponse(e,i)}catch(m){throw m instanceof $o&&m.subError===Ei?oe(Ei):m}const c=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(c);if(this.authCodeRequest.code=a.code,a.cloud_instance_host_name&&await J(this.authModule.updateAuthority.bind(this.authModule),x.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(a.cloud_instance_host_name,this.authCodeRequest.correlationId),a.nonce=d||void 0,a.state=i,a.client_info)this.authCodeRequest.clientInfo=a.client_info;else{const m=this.checkCcsCredentials();m&&(this.authCodeRequest.ccsCredential=m)}const h=await this.authModule.acquireToken(this.authCodeRequest,a);return this.browserStorage.cleanRequestByState(t),h}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache($e.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 s2(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const n=window.performance.getEntriesByType("navigation"),e=n.length?n[0]:void 0;return e==null?void 0:e.type}class c2 extends Aa{constructor(e,t,r,i,a,c,d,h,m,g){super(e,t,r,i,a,c,d,m,g),this.nativeStorage=h}async acquireToken(e){const t=await J(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,ce.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const r=this.initializeServerTelemetryManager(rt.acquireTokenRedirect),i=a=>{a.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(fe.RESTORE_FROM_BFCACHE,ce.Redirect))};try{const a=await J(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),c=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new qv(c,this.browserStorage,a,this.logger,this.performanceClient),h=await c.getAuthCodeUrl({...t,nativeBroker:Ur.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),m=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${m}`),window.addEventListener("pageshow",i),await d.initiateAuthRequest(h,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:m,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(a){throw a instanceof ct&&(a.setCorrelationId(this.correlationId),r.cacheFailedRequest(a)),window.removeEventListener("pageshow",i),this.browserStorage.cleanRequestByState(t.state),a}}async handleRedirectPromise(e="",t){const r=this.initializeServerTelemetryManager(rt.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,a]=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(ce.Redirect),s2()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const c=this.browserStorage.getTemporaryCache($e.ORIGIN_URI,!0)||B.EMPTY_STRING,d=Me.removeHashFromUrl(c),h=Me.removeHashFromUrl(window.location.href);if(d===h&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),c.indexOf("#")>-1&&gV(c),await this.handleResponse(i,r);if(this.config.auth.navigateToLoginRequestUrl){if(!gm()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache($e.URL_HASH,a,!0);const m={apiId:rt.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let g=!0;if(!c||c==="null"){const v=_V();this.browserStorage.setTemporaryCache($e.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),g=await this.navigationClient.navigateInternal(v,m)}else this.logger.verbose(`Navigating to loginRequestUrl: ${c}`),g=await this.navigationClient.navigateInternal(c,m);if(!g)return await this.handleResponse(i,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,r);return null}catch(i){throw i instanceof ct&&(i.setCorrelationId(this.correlationId),r.cacheFailedRequest(i)),this.browserStorage.cleanRequestByInteractionType(ce.Redirect),i}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Us.QUERY?t=window.location.search:t=window.location.hash);let r=Sl(t);if(r){try{i2(r,this.browserCrypto,ce.Redirect)}catch(a){return a instanceof ct&&this.logger.error(`Interaction type validation failed due to ${a.errorCode}: ${a.errorMessage}`),[null,""]}return mV(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const i=this.browserStorage.getTemporaryCache($e.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey($e.URL_HASH)),i&&(r=Sl(i),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,i]):[null,""]}async handleResponse(e,t){const r=e.state;if(!r)throw oe(sm);const i=this.browserStorage.getCachedRequest(r);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 oe(Fs);const h=new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:m}=vr.parseRequestState(this.browserCrypto,r);return h.acquireToken({...i,state:m,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(r)})}const a=this.browserStorage.getCachedAuthority(r);if(!a)throw oe(cm);const c=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:a});return Lr.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new qv(c,this.browserStorage,i,this.logger,this.performanceClient).handleCodeResponse(e,r)}async logout(e){var i,a;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(rt.logout);try{this.eventHandler.emitEvent(fe.LOGOUT_START,ce.Redirect,e),await this.clearCacheOnLogout(t.account);const c={apiId:rt.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===uo.OIDC)try{d.authority.endSessionEndpoint}catch{if((i=t.account)!=null&&i.homeAccountId){this.browserStorage.removeAccount((a=t.account)==null?void 0:a.homeAccountId),this.eventHandler.emitEvent(fe.LOGOUT_SUCCESS,ce.Redirect,t);return}}const h=d.getLogoutUri(t);if(this.eventHandler.emitEvent(fe.LOGOUT_SUCCESS,ce.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(h)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,c);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(h,c);return}}catch(c){throw c instanceof ct&&(c.setCorrelationId(this.correlationId),r.cacheFailedRequest(c)),this.eventHandler.emitEvent(fe.LOGOUT_FAILURE,ce.Redirect,null,c),this.eventHandler.emitEvent(fe.LOGOUT_END,ce.Redirect),c}this.eventHandler.emitEvent(fe.LOGOUT_END,ce.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return Me.getAbsoluteUrl(t,so())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function l2(n,e,t,r,i){if(e.addQueueMeasurement(x.SilentHandlerInitiateAuthRequest,r),!n)throw t.info("Navigate url is empty"),oe(ru);return i?J(d2,x.SilentHandlerLoadFrame,t,e,r)(n,i,e,r):Ii(h2,x.SilentHandlerLoadFrameSync,t,e,r)(n)}async function u2(n,e,t,r,i,a,c){return r.addQueueMeasurement(x.SilentHandlerMonitorIframeForHash,a),new Promise((d,h)=>{e<Qh&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${Qh}ms). This may result in timeouts.`);const m=window.setTimeout(()=>{window.clearInterval(g),h(oe(Cw))},e),g=window.setInterval(()=>{let v="";const p=n.contentWindow;try{v=p?p.location.href:""}catch{}if(!v||v==="about:blank")return;let w="";p&&(c===Us.QUERY?w=p.location.search:w=p.location.hash),window.clearTimeout(m),window.clearInterval(g),d(w)},t)}).finally(()=>{Ii(f2,x.RemoveHiddenIframe,i,r,a)(n)})}function d2(n,e,t,r){return t.addQueueMeasurement(x.SilentHandlerLoadFrame,r),new Promise((i,a)=>{const c=tT();window.setTimeout(()=>{if(!c){a("Unable to load iframe");return}c.src=n,i(c)},e)})}function h2(n){const e=tT();return e.src=n,e}function tT(){const n=document.createElement("iframe");return n.className="msalSilentIframe",n.style.visibility="hidden",n.style.position="absolute",n.style.width=n.style.height="0",n.style.border="0",n.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(n),n}function f2(n){document.body===n.parentNode&&document.body.removeChild(n)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class m2 extends Aa{constructor(e,t,r,i,a,c,d,h,m,g,v){super(e,t,r,i,a,c,h,g,v),this.apiId=d,this.nativeStorage=m}async acquireToken(e){this.performanceClient.addQueueMeasurement(x.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!==Ut.NONE&&t.prompt!==Ut.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${Ut.NONE}`),t.prompt=Ut.NONE):t.prompt=Ut.NONE;const r=await J(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ce.Silent);jw(r.authority);const i=this.initializeServerTelemetryManager(this.apiId);let a;try{return a=await J(this.createAuthCodeClient.bind(this),x.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:r.authority,requestAzureCloudOptions:r.azureCloudOptions,requestExtraQueryParameters:r.extraQueryParameters,account:r.account}),await J(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(a,r)}catch(c){if(c instanceof ct&&(c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c)),!a||!(c instanceof ct)||c.errorCode!==Mn.INVALID_GRANT_ERROR)throw c;this.performanceClient.addFields({retryError:c.errorCode},this.correlationId);const d=await J(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,ce.Silent);return await J(this.silentTokenHelper.bind(this),x.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(a,d)}}logout(){return Promise.reject(oe(ou))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(x.SilentIframeClientTokenHelper,r);const i=await J(this.initializeAuthorizationCodeRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,r)(t),a=await J(e.getAuthCodeUrl.bind(e),x.GetAuthCodeUrl,this.logger,this.performanceClient,r)({...t,nativeBroker:Ur.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),c=new ym(e,this.browserStorage,i,this.logger,this.performanceClient),d=await J(l2,x.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,r)(a,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait),h=this.config.auth.OIDCOptions.serverResponseType,m=await J(u2,x.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,r)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,h),g=Ii(eT,x.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(m,h,this.logger);if(g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw oe(Fs);const v=new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,g.accountId,this.browserStorage,r),{userRequestState:p}=vr.parseRequestState(this.browserCrypto,t.state);return J(v.acquireToken.bind(v),x.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,r)({...t,state:p,prompt:t.prompt||Ut.NONE})}return J(c.handleCodeResponse.bind(c),x.HandleCodeResponse,this.logger,this.performanceClient,r)(g,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class g2 extends Aa{async acquireToken(e){this.performanceClient.addQueueMeasurement(x.SilentRefreshClientAcquireToken,e.correlationId);const t=await J(vm,x.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(rt.acquireTokenSilent_silentFlow),a=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return J(a.acquireTokenByRefreshToken.bind(a),x.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(r).catch(c=>{throw c.setCorrelationId(this.correlationId),i.cacheFailedRequest(c),c})}logout(){return Promise.reject(oe(ou))}async createRefreshTokenClient(e){const t=await J(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Gh(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class p2{constructor(e,t,r,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=r,this.cryptoObj=i}loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw oe(iu);const i=t.id_token?bi(t.id_token,Hr):void 0,a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},c=e.authority?new Qt(Qt.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,a,this.logger,e.correlationId||fo()):void 0,d=this.loadAccount(e,r.clientInfo||t.client_info||"",i,c),h=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),m=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,r),g=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:h,accessToken:m,refreshToken:g},i,c)}loadAccount(e,t,r,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const h=Ot.createFromAccountInfo(e.account);return this.storage.setAccount(h),h}else if(!i||!t&&!r)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),oe(Nw);const a=Ot.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,r),c=r==null?void 0:r.tid,d=rm(this.storage,i,a,Hr,r,t,i.hostnameAndPort,c,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,r,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 a=Ql(t,r,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(a),a}loadAccessToken(e,t,r,i,a,c){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?_t.fromString(t.scope):new _t(e.scopes),h=c.expiresOn||t.expires_in+new Date().getTime()/1e3,m=c.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,g=Xl(r,i,t.access_token,this.config.auth.clientId,a,d.printScopes(),h,m,Hr);return this.storage.setAccessTokenCredential(g),g}loadRefreshToken(e,t,r){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=UE(t,r,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,r,i){var g,v,p;let a="",c=[],d=null,h;t!=null&&t.accessToken&&(a=t.accessToken.secret,c=_t.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),h=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const m=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:c,account:m.getAccountInfo(),idToken:((g=t.idToken)==null?void 0:g.secret)||"",idTokenClaims:r||{},accessToken:a,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:h,familyId:((v=t.refreshToken)==null?void 0:v.familyId)||"",tokenType:((p=t==null?void 0:t.accessToken)==null?void 0:p.tokenType)||"",state:e.state||"",cloudGraphHostName:m.cloudGraphHostName||"",msGraphHost:m.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class _2 extends lw{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class v2 extends Aa{constructor(e,t,r,i,a,c,d,h,m,g){super(e,t,r,i,a,c,h,m,g),this.apiId=d}async acquireToken(e){if(!e.code)throw oe(Rw);const t=await J(this.initializeAuthorizationRequest.bind(this),x.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,ce.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},a=await J(this.getClientConfiguration.bind(this),x.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),c=new _2(a);this.logger.verbose("Auth code client created");const d=new ym(c,this.browserStorage,i,this.logger,this.performanceClient);return await J(d.handleCodeResponseFromServer.bind(d),x.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 ct&&(i.setCorrelationId(this.correlationId),r.cacheFailedRequest(i)),i}}logout(){return Promise.reject(oe(ou))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Or(n){const e=n==null?void 0:n.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 zc(n,e){try{pm(n)}catch(t){throw e.end({success:!1},t),t}}class cu{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 wa(this.logger,this.performanceClient):bl,this.eventHandler=new WV(this.logger),this.browserStorage=this.isBrowserEnvironment?new Zh(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,PB(this.config.auth),this.performanceClient):xV(this.config.auth.clientId,this.logger);const t={cacheLocation:_n.MemoryStorage,temporaryCacheLocation:_n.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Zh(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new p2(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 r=new cu(e);return await r.initialize(t),r}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(fe.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),r=this.config.system.allowNativeBroker,i=this.performanceClient.startMeasurement(x.InitializeClientApplication,t);if(this.eventHandler.emitEvent(fe.INITIALIZE_START),r)try{this.nativeExtensionProvider=await Ur.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(a){this.logger.verbose(a)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await J(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),x.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(fe.INITIALIZE_END),i.end({allowNativeBroker:r,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),Yw(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return typeof r>"u"?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),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"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),r=this.browserStorage.getCachedNativeRequest(),i=r&&Ur.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,a=i?r==null?void 0:r.correlationId:this.browserStorage.getTemporaryCache($e.CORRELATION_ID,!0)||"",c=this.performanceClient.startMeasurement(x.AcquireTokenRedirect,a);this.eventHandler.emitEvent(fe.HANDLE_REDIRECT_START,ce.Redirect);let d;if(i&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const h=new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,r.accountId,this.nativeInternalStorage,r.correlationId);d=J(h.handleRedirectPromise.bind(h),x.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(this.performanceClient,c.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const h=this.createRedirectClient(a);d=J(h.handleRedirectPromise.bind(h),x.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,c.event.correlationId)(e,c)}return d.then(h=>(h?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(fe.LOGIN_SUCCESS,ce.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_SUCCESS,ce.Redirect,h),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),c.end({success:!0,accountType:Or(h.account)})):c.event.errorCode?c.end({success:!1}):c.discard(),this.eventHandler.emitEvent(fe.HANDLE_REDIRECT_END,ce.Redirect),h)).catch(h=>{const m=h;throw t.length>0?this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_FAILURE,ce.Redirect,null,m):this.eventHandler.emitEvent(fe.LOGIN_FAILURE,ce.Redirect,null,m),this.eventHandler.emitEvent(fe.HANDLE_REDIRECT_END,ce.Redirect),c.end({success:!1},m),h})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement(x.AcquireTokenPreRedirect,t);r.add({accountType:Or(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=c=>{const d=typeof i=="function"?i(c):void 0;return d!==!1?r.end({success:!0}):r.discard(),d};else{const c=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const h=typeof c=="function"?c(d):void 0;return h!==!1?r.end({success:!0}):r.discard(),h}}const a=this.getAllAccounts().length>0;try{Kv(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),a?this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_START,ce.Redirect,e):this.eventHandler.emitEvent(fe.LOGIN_START,ce.Redirect,e);let c;return this.nativeExtensionProvider&&this.canUseNative(e)?c=new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(h=>{if(h instanceof xr&&oa(h))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(h instanceof Cr)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),h}):c=this.createRedirectClient(t).acquireToken(e),await c}catch(c){throw r.end({success:!1},c),a?this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_FAILURE,ce.Redirect,null,c):this.eventHandler.emitEvent(fe.LOGIN_FAILURE,ce.Redirect,null,c),c}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenPopup,t);r.add({scenarioId:e.scenarioId,accountType:Or(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),zc(this.initialized,r),this.browserStorage.setInteractionInProgress(!0)}catch(c){return Promise.reject(c)}const i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_START,ce.Popup,e):this.eventHandler.emitEvent(fe.LOGIN_START,ce.Popup,e);let a;return this.canUseNative(e)?a=this.acquireTokenNative({...e,correlationId:t},rt.acquireTokenPopup).then(c=>(this.browserStorage.setInteractionInProgress(!1),r.end({success:!0,isNativeBroker:!0,accountType:Or(c.account)}),c)).catch(c=>{if(c instanceof xr&&oa(c))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(c instanceof Cr)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),c}):a=this.createPopupClient(t).acquireToken(e),a.then(c=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(fe.LOGIN_SUCCESS,ce.Popup,c):this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_SUCCESS,ce.Popup,c),r.end({success:!0,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Or(c.account)}),c)).catch(c=>(i.length>0?this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_FAILURE,ce.Popup,null,c):this.eventHandler.emitEvent(fe.LOGIN_FAILURE,ce.Popup,null,c),r.end({success:!1},c),Promise.reject(c)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var a,c;const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(x.SsoSilent,t),(a=this.ssoSilentMeasurement)==null||a.add({scenarioId:e.scenarioId,accountType:Or(e.account)}),zc(this.initialized,this.ssoSilentMeasurement),(c=this.ssoSilentMeasurement)==null||c.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(fe.SSO_SILENT_START,ce.Silent,r);let i;return this.canUseNative(r)?i=this.acquireTokenNative(r,rt.ssoSilent).catch(d=>{if(d instanceof xr&&oa(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw d}):i=this.createSilentIframeClient(r.correlationId).acquireToken(r),i.then(d=>{var h;return this.eventHandler.emitEvent(fe.SSO_SILENT_SUCCESS,ce.Silent,d),(h=this.ssoSilentMeasurement)==null||h.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Or(d.account)}),d}).catch(d=>{var h;throw this.eventHandler.emitEvent(fe.SSO_SILENT_FAILURE,ce.Silent,null,d),(h=this.ssoSilentMeasurement)==null||h.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 r=this.performanceClient.startMeasurement(x.AcquireTokenByCode,t);zc(this.initialized,r),this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_BY_CODE_START,ce.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw oe(Pw);if(e.code){const i=e.code;let a=this.hybridAuthCodeResponses.get(i);return a?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),a=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(c=>(this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_BY_CODE_SUCCESS,ce.Silent,c),this.hybridAuthCodeResponses.delete(i),r.end({success:!0,isNativeBroker:c.fromNativeBroker,accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length,accountType:Or(c.account)}),c)).catch(c=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ce.Silent,null,c),r.end({success:!1},c),c}),this.hybridAuthCodeResponses.set(i,a)),await a}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const i=await this.acquireTokenNative({...e,correlationId:t},rt.acquireTokenByCode,e.nativeAccountId).catch(a=>{throw a instanceof xr&&oa(a)&&(this.nativeExtensionProvider=void 0),a});return r.end({accountType:Or(i.account),success:!0}),i}else throw oe(Mw);else throw oe(Ow)}catch(i){throw this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_BY_CODE_FAILURE,ce.Silent,null,i),r.end({success:!1},i),i}}async acquireTokenByCodeAsync(e){var i;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(x.AcquireTokenByCodeAsync,e.correlationId),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(a=>{var c;return(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!0,fromCache:a.fromCache,isNativeBroker:a.fromNativeBroker}),a}).catch(a=>{var c;throw(c=this.acquireTokenByCodeAsyncMeasurement)==null||c.end({success:!1},a),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenFromCache,e.correlationId),t){case On.Default:case On.AccessToken:case On.AccessTokenAndRefreshToken:const r=this.createSilentCacheClient(e.correlationId);return J(r.acquireToken.bind(r),x.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(ao)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(x.AcquireTokenByRefreshToken,e.correlationId),t){case On.Default:case On.AccessTokenAndRefreshToken:case On.RefreshToken:case On.RefreshTokenAndNetwork:const r=this.createSilentRefreshClient(e.correlationId);return J(r.acquireToken.bind(r),x.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw Y(ao)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(x.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return J(t.acquireToken.bind(t),x.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 Kv(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return pm(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 UV(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return FV(e,this.logger,this.browserStorage)}getAccountByUsername(e){return BV(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return VV(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return HV(e,this.logger,this.browserStorage)}setActiveAccount(e){$V(e,this.browserStorage)}getActiveAccount(){return KV(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=Ot.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(r),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,r){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw oe(Fs);return new ma(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Ur.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 Ut.NONE:case Ut.CONSENT:case Ut.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 a2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new c2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new m2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new Zw(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new g2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new v2(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,rt.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return qw(),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(Dt.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(fe.ACTIVE_ACCOUNT_CHANGED);const r=e.newValue||e.oldValue;if(!r)return;const i=JSON.parse(r);if(typeof i!="object"||!Ot.isAccountEntity(i))return;const c=Ca.toObject(new Ot,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(fe.ACCOUNT_ADDED,void 0,c)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(fe.ACCOUNT_REMOVED,void 0,c))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?fo():B.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Vv})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Vv})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(x.AcquireTokenSilent,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),zc(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw oe(bw);r.add({accountType:Or(i)});const a={clientId:this.config.auth.clientId,authority:e.authority||B.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:i.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},c=JSON.stringify(a),d=this.activeSilentTokenRequests.get(c);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const h=J(this.acquireTokenSilentAsync.bind(this),x.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(m=>(this.activeSilentTokenRequests.delete(c),r.end({success:!0,fromCache:m.fromCache,isNativeBroker:m.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:m.accessToken.length,idTokenSize:m.idToken.length}),m)).catch(m=>{throw this.activeSilentTokenRequests.delete(c),r.end({success:!1},m),m});return this.activeSilentTokenRequests.set(c,h),{...await h,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),r.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(x.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_START,ce.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const i=await J(jV,x.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),a=e.cacheLookupPolicy||On.Default;return this.acquireTokenSilentNoIframe(i,a).catch(async d=>{if(y2(d,a))if(this.activeIframeRequest)if(a!==On.Skip){const[m,g]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${g}`,i.correlationId);const v=this.performanceClient.startMeasurement(x.AwaitConcurrentIframe,i.correlationId);v.add({awaitIframeCorrelationId:g});const p=await m;if(v.end({success:p}),p)return this.logger.verbose(`Parallel iframe request with correlationId: ${g} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,a);throw this.logger.info(`Iframe request with correlationId: ${g} 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),J(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let m;return this.activeIframeRequest=[new Promise(g=>{m=g}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),J(this.acquireTokenBySilentIframe.bind(this),x.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(g=>(m(!0),g)).catch(g=>{throw m(!1),g}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_SUCCESS,ce.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_FAILURE,ce.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return Ur.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,rt.acquireTokenSilent_silentFlow).catch(async r=>{throw r instanceof xr&&oa(r)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,Y(ao)):r})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),J(this.acquireTokenFromCache.bind(this),x.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(t===On.AccessToken)throw r;return this.eventHandler.emitEvent(fe.ACQUIRE_TOKEN_NETWORK_START,ce.Silent,e),J(this.acquireTokenByRefreshToken.bind(this),x.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function y2(n,e){const t=!(n instanceof Cr&&n.subError!==nu),r=n.errorCode===Mn.INVALID_GRANT_ERROR||n.errorCode===ao,i=t&&r||n.errorCode===Nl||n.errorCode===nm,a=nV.includes(e);return i&&a}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function C2(n,e){const t=new wi(n);return await t.initialize(),cu.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Cm{static async createPublicClientApplication(e){const t=await C2(e);return new Cm(e,t)}constructor(e,t){this.controller=t||new cu(new wi(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 nh=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",E2=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",w2=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",tf=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",T2={auth:{clientId:E2,authority:`https://${nh}.b2clogin.com/${nh}.onmicrosoft.com/${w2}`,knownAuthorities:[`${nh}.b2clogin.com`],redirectUri:process.env.JPLAN_AUTOMATION_ENVIRONMENT?`${tf}/_/dashboard`:tf},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(n,e)=>{n===et.Error&&console.error(e)},logLevel:et.Warning}}},nT=(n,e)=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:`${tf}${n}`,extraQueryParameters:e}),zt=new Cm(T2),Yv=l.ref(null);function rT(){async function n(e){var t;if(e)try{const r=e.idTokenClaims;if(!(r!=null&&r.aud))throw new Error("User audience (aud) is missing in ID token claims");const i=localStorage.getItem(`msal.token.keys.${r.aud}`);if(!i)throw new Error(`Token keys para ${r.aud} não encontrados no localStorage`);const a=JSON.parse(i),c=(t=a==null?void 0:a.idToken)==null?void 0:t[0];if(!c)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(c);if(!d)throw new Error(`Dados do token para ID ${c} não encontrados no localStorage`);const h=JSON.parse(d),m=h==null?void 0:h.secret;if(!m)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),Yv.value=m}catch(r){console.error("Erro ao obter token de acesso:",r)}}return{jToken:Yv,setJToken:n}}let Gc=null;const er=l.ref(null),Yi=l.ref(null),oT=l.ref(Math.floor(Date.now()/1e3));lf.useIntervalFn(()=>b2(),1e3);function b2(){var r,i;if(!((i=(r=er.value)==null?void 0:r.idTokenClaims)!=null&&i.exp))return;const n=Math.floor(Date.now()/1e3),e=300,t=er.value.idTokenClaims.exp;oT.value=t-n-e}function Em(){if(Gc)return Gc;const{setJToken:n,jToken:e}=rT(),t=l.computed(()=>!!er.value),r=l.computed(()=>er.value);let i;async function a(p,w){if(!t.value)switch(p){case"redirect":if(w){i=w,await h();break}case"tab":default:await c();break}}const c=async()=>new Promise((p,w)=>{try{localStorage.clear();const C=process.env.JPLAN_WEBAPP__URL_AUTH,T=window.open(C);if(!T){console.error("Failed to open authentication window"),w("Failed to open authentication window");return}const k=Date.now(),I=6e4,N=setInterval(()=>{if(Date.now()-k>I||T.closed){clearInterval(N),console.error("Authentication canceled or timeout reached."),w("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(L=>L.startsWith("msal.account.keys"))&&(clearInterval(N),d(),T.close(),p())},500)}catch(C){console.error("Error in handleRedirect:",C),w(C)}}),d=async()=>{try{await zt.initialize();const p=zt.getActiveAccount();if(p)er.value=p;else{const w=await zt.handleRedirectPromise();w?(zt.setActiveAccount(w.account),er.value=zt.getActiveAccount()):console.error("Falha na autenticação")}}catch(p){console.error("Erro no processo de autenticação:",p)}er.value&&await n(er.value)},h=async()=>{try{await zt.initialize();const p=await zt.handleRedirectPromise();if(!p||zt.getAllAccounts().length===0){const w=nT(i);await zt.loginRedirect(w);return}zt.setActiveAccount(p.account),er.value=zt.getActiveAccount(),er.value&&await n(er.value),Yi.value="updated"}catch(p){console.error("handleRedirect failed",p)}};async function m(){_e.value=!0,Yi.value="updating";try{const p=await zt.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});zt.setActiveAccount(p.account),await n(er.value),Yi.value="updated"}catch(p){console.error("Failed to refresh token, forcing new login.",p),Yi.value="error",localStorage.clear(),window.location.reload()}_e.value=!1}const g=async()=>{try{await zt.initialize(),localStorage.clear(),await zt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(p){console.error("Logout error",p)}};l.watch(oT,async p=>{p<=0&&Yi.value==="updated"&&await m()});const v=l.computed(()=>e.value);return Gc={isAuthenticated:t,authState:Yi,account:r,token:v,refreshToken:m,handleRedirect:a,logout:g},Gc}function iT(n,e){return function(){return n.apply(e,arguments)}}const{toString:I2}=Object.prototype,{getPrototypeOf:wm}=Object,lu=(n=>e=>{const t=I2.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Tr=n=>(n=n.toLowerCase(),e=>lu(e)===n),uu=n=>e=>typeof e===n,{isArray:Sa}=Array,ks=uu("undefined");function A2(n){return n!==null&&!ks(n)&&n.constructor!==null&&!ks(n.constructor)&&Fn(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const aT=Tr("ArrayBuffer");function S2(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&aT(n.buffer),e}const k2=uu("string"),Fn=uu("function"),sT=uu("number"),du=n=>n!==null&&typeof n=="object",N2=n=>n===!0||n===!1,ll=n=>{if(lu(n)!=="object")return!1;const e=wm(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},R2=Tr("Date"),O2=Tr("File"),P2=Tr("Blob"),M2=Tr("FileList"),D2=n=>du(n)&&Fn(n.pipe),L2=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Fn(n.append)&&((e=lu(n))==="formdata"||e==="object"&&Fn(n.toString)&&n.toString()==="[object FormData]"))},x2=Tr("URLSearchParams"),[U2,F2,B2,V2]=["ReadableStream","Request","Response","Headers"].map(Tr),H2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vs(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),Sa(n))for(r=0,i=n.length;r<i;r++)e.call(null,n[r],r,n);else{const a=t?Object.getOwnPropertyNames(n):Object.keys(n),c=a.length;let d;for(r=0;r<c;r++)d=a[r],e.call(null,n[d],d,n)}}function cT(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const fi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lT=n=>!ks(n)&&n!==fi;function nf(){const{caseless:n}=lT(this)&&this||{},e={},t=(r,i)=>{const a=n&&cT(e,i)||i;ll(e[a])&&ll(r)?e[a]=nf(e[a],r):ll(r)?e[a]=nf({},r):Sa(r)?e[a]=r.slice():e[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Vs(arguments[r],t);return e}const $2=(n,e,t,{allOwnKeys:r}={})=>(Vs(e,(i,a)=>{t&&Fn(i)?n[a]=iT(i,t):n[a]=i},{allOwnKeys:r}),n),K2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),W2=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},z2=(n,e,t,r)=>{let i,a,c;const d={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),a=i.length;a-- >0;)c=i[a],(!r||r(c,n,e))&&!d[c]&&(e[c]=n[c],d[c]=!0);n=t!==!1&&wm(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},G2=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},q2=n=>{if(!n)return null;if(Sa(n))return n;let e=n.length;if(!sT(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},Y2=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&wm(Uint8Array)),j2=(n,e)=>{const r=(n&&n[Symbol.iterator]).call(n);let i;for(;(i=r.next())&&!i.done;){const a=i.value;e.call(n,a[0],a[1])}},J2=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},Q2=Tr("HTMLFormElement"),X2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,i){return r.toUpperCase()+i}),jv=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),Z2=Tr("RegExp"),uT=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Vs(t,(i,a)=>{let c;(c=e(i,a,n))!==!1&&(r[a]=c||i)}),Object.defineProperties(n,r)},eH=n=>{uT(n,(e,t)=>{if(Fn(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Fn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},tH=(n,e)=>{const t={},r=i=>{i.forEach(a=>{t[a]=!0})};return Sa(n)?r(n):r(String(n).split(e)),t},nH=()=>{},rH=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e,rh="abcdefghijklmnopqrstuvwxyz",Jv="0123456789",dT={DIGIT:Jv,ALPHA:rh,ALPHA_DIGIT:rh+rh.toUpperCase()+Jv},oH=(n=16,e=dT.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function iH(n){return!!(n&&Fn(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const aH=n=>{const e=new Array(10),t=(r,i)=>{if(du(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const a=Sa(r)?[]:{};return Vs(r,(c,d)=>{const h=t(c,i+1);!ks(h)&&(a[d]=h)}),e[i]=void 0,a}}return r};return t(n,0)},sH=Tr("AsyncFunction"),cH=n=>n&&(du(n)||Fn(n))&&Fn(n.then)&&Fn(n.catch),hT=((n,e)=>n?setImmediate:e?((t,r)=>(fi.addEventListener("message",({source:i,data:a})=>{i===fi&&a===t&&r.length&&r.shift()()},!1),i=>{r.push(i),fi.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Fn(fi.postMessage)),lH=typeof queueMicrotask<"u"?queueMicrotask.bind(fi):typeof process<"u"&&process.nextTick||hT,F={isArray:Sa,isArrayBuffer:aT,isBuffer:A2,isFormData:L2,isArrayBufferView:S2,isString:k2,isNumber:sT,isBoolean:N2,isObject:du,isPlainObject:ll,isReadableStream:U2,isRequest:F2,isResponse:B2,isHeaders:V2,isUndefined:ks,isDate:R2,isFile:O2,isBlob:P2,isRegExp:Z2,isFunction:Fn,isStream:D2,isURLSearchParams:x2,isTypedArray:Y2,isFileList:M2,forEach:Vs,merge:nf,extend:$2,trim:H2,stripBOM:K2,inherits:W2,toFlatObject:z2,kindOf:lu,kindOfTest:Tr,endsWith:G2,toArray:q2,forEachEntry:j2,matchAll:J2,isHTMLForm:Q2,hasOwnProperty:jv,hasOwnProp:jv,reduceDescriptors:uT,freezeMethods:eH,toObjectSet:tH,toCamelCase:X2,noop:nH,toFiniteNumber:rH,findKey:cT,global:fi,isContextDefined:lT,ALPHABET:dT,generateString:oH,isSpecCompliantForm:iH,toJSONObject:aH,isAsyncFn:sH,isThenable:cH,setImmediate:hT,asap:lH};function we(n,e,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(we,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:F.toJSONObject(this.config),code:this.code,status:this.status}}});const fT=we.prototype,mT={};["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(n=>{mT[n]={value:n}});Object.defineProperties(we,mT);Object.defineProperty(fT,"isAxiosError",{value:!0});we.from=(n,e,t,r,i,a)=>{const c=Object.create(fT);return F.toFlatObject(n,c,function(h){return h!==Error.prototype},d=>d!=="isAxiosError"),we.call(c,n.message,e,t,r,i),c.cause=n,c.name=n.name,a&&Object.assign(c,a),c};const uH=null;function rf(n){return F.isPlainObject(n)||F.isArray(n)}function gT(n){return F.endsWith(n,"[]")?n.slice(0,-2):n}function Qv(n,e,t){return n?n.concat(e).map(function(i,a){return i=gT(i),!t&&a?"["+i+"]":i}).join(t?".":""):e}function dH(n){return F.isArray(n)&&!n.some(rf)}const hH=F.toFlatObject(F,{},null,function(e){return/^is[A-Z]/.test(e)});function hu(n,e,t){if(!F.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,k){return!F.isUndefined(k[T])});const r=t.metaTokens,i=t.visitor||g,a=t.dots,c=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function m(C){if(C===null)return"";if(F.isDate(C))return C.toISOString();if(!h&&F.isBlob(C))throw new we("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(C)||F.isTypedArray(C)?h&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function g(C,T,k){let I=C;if(C&&!k&&typeof C=="object"){if(F.endsWith(T,"{}"))T=r?T:T.slice(0,-2),C=JSON.stringify(C);else if(F.isArray(C)&&dH(C)||(F.isFileList(C)||F.endsWith(T,"[]"))&&(I=F.toArray(C)))return T=gT(T),I.forEach(function(O,L){!(F.isUndefined(O)||O===null)&&e.append(c===!0?Qv([T],L,a):c===null?T:T+"[]",m(O))}),!1}return rf(C)?!0:(e.append(Qv(k,T,a),m(C)),!1)}const v=[],p=Object.assign(hH,{defaultVisitor:g,convertValue:m,isVisitable:rf});function w(C,T){if(!F.isUndefined(C)){if(v.indexOf(C)!==-1)throw Error("Circular reference detected in "+T.join("."));v.push(C),F.forEach(C,function(I,N){(!(F.isUndefined(I)||I===null)&&i.call(e,I,F.isString(N)?N.trim():N,T,p))===!0&&w(I,T?T.concat(N):[N])}),v.pop()}}if(!F.isObject(n))throw new TypeError("data must be an object");return w(n),e}function Xv(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Tm(n,e){this._pairs=[],n&&hu(n,this,e)}const pT=Tm.prototype;pT.append=function(e,t){this._pairs.push([e,t])};pT.toString=function(e){const t=e?function(r){return e.call(this,r,Xv)}:Xv;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function fH(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _T(n,e,t){if(!e)return n;const r=t&&t.encode||fH;F.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let a;if(i?a=i(e,t):a=F.isURLSearchParams(e)?e.toString():new Tm(e,t).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Zv{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(r){r!==null&&e(r)})}}const vT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mH=typeof URLSearchParams<"u"?URLSearchParams:Tm,gH=typeof FormData<"u"?FormData:null,pH=typeof Blob<"u"?Blob:null,_H={isBrowser:!0,classes:{URLSearchParams:mH,FormData:gH,Blob:pH},protocols:["http","https","file","blob","url","data"]},bm=typeof window<"u"&&typeof document<"u",of=typeof navigator=="object"&&navigator||void 0,vH=bm&&(!of||["ReactNative","NativeScript","NS"].indexOf(of.product)<0),yH=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",CH=bm&&window.location.href||"http://localhost",EH=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bm,hasStandardBrowserEnv:vH,hasStandardBrowserWebWorkerEnv:yH,navigator:of,origin:CH},Symbol.toStringTag,{value:"Module"})),tn={...EH,..._H};function wH(n,e){return hu(n,new tn.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,a){return tn.isNode&&F.isBuffer(t)?(this.append(r,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function TH(n){return F.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function bH(n){const e={},t=Object.keys(n);let r;const i=t.length;let a;for(r=0;r<i;r++)a=t[r],e[a]=n[a];return e}function yT(n){function e(t,r,i,a){let c=t[a++];if(c==="__proto__")return!0;const d=Number.isFinite(+c),h=a>=t.length;return c=!c&&F.isArray(i)?i.length:c,h?(F.hasOwnProp(i,c)?i[c]=[i[c],r]:i[c]=r,!d):((!i[c]||!F.isObject(i[c]))&&(i[c]=[]),e(t,r,i[c],a)&&F.isArray(i[c])&&(i[c]=bH(i[c])),!d)}if(F.isFormData(n)&&F.isFunction(n.entries)){const t={};return F.forEachEntry(n,(r,i)=>{e(TH(r),i,t,0)}),t}return null}function IH(n,e,t){if(F.isString(n))try{return(e||JSON.parse)(n),F.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Hs={transitional:vT,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,a=F.isObject(e);if(a&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return i?JSON.stringify(yT(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e)||F.isReadableStream(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return wH(e,this.formSerializer).toString();if((d=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return hu(d?{"files[]":e}:e,h&&new h,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),IH(e)):e}],transformResponse:[function(e){const t=this.transitional||Hs.transitional,r=t&&t.forcedJSONParsing,i=this.responseType==="json";if(F.isResponse(e)||F.isReadableStream(e))return e;if(e&&F.isString(e)&&(r&&!this.responseType||i)){const c=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(c)throw d.name==="SyntaxError"?we.from(d,we.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:tn.classes.FormData,Blob:tn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],n=>{Hs.headers[n]={}});const AH=F.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"]),SH=n=>{const e={};let t,r,i;return n&&n.split(`
|
83
|
+
`).forEach(function(c){i=c.indexOf(":"),t=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim(),!(!t||e[t]&&AH[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},ey=Symbol("internals");function Za(n){return n&&String(n).trim().toLowerCase()}function ul(n){return n===!1||n==null?n:F.isArray(n)?n.map(ul):String(n)}function kH(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const NH=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function oh(n,e,t,r,i){if(F.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!F.isString(e)){if(F.isString(r))return e.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(e)}}function RH(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function OH(n,e){const t=F.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(i,a,c){return this[r].call(this,e,i,a,c)},configurable:!0})})}class vn{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function a(d,h,m){const g=Za(h);if(!g)throw new Error("header name must be a non-empty string");const v=F.findKey(i,g);(!v||i[v]===void 0||m===!0||m===void 0&&i[v]!==!1)&&(i[v||h]=ul(d))}const c=(d,h)=>F.forEach(d,(m,g)=>a(m,g,h));if(F.isPlainObject(e)||e instanceof this.constructor)c(e,t);else if(F.isString(e)&&(e=e.trim())&&!NH(e))c(SH(e),t);else if(F.isHeaders(e))for(const[d,h]of e.entries())a(h,d,r);else e!=null&&a(t,e,r);return this}get(e,t){if(e=Za(e),e){const r=F.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return kH(i);if(F.isFunction(t))return t.call(this,i,r);if(F.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Za(e),e){const r=F.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||oh(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function a(c){if(c=Za(c),c){const d=F.findKey(r,c);d&&(!t||oh(r,r[d],d,t))&&(delete r[d],i=!0)}}return F.isArray(e)?e.forEach(a):a(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const a=t[r];(!e||oh(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){const t=this,r={};return F.forEach(this,(i,a)=>{const c=F.findKey(r,a);if(c){t[c]=ul(i),delete t[a];return}const d=e?RH(a):String(a).trim();d!==a&&delete t[a],t[d]=ul(i),r[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&F.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
84
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ey]=this[ey]={accessors:{}}).accessors,i=this.prototype;function a(c){const d=Za(c);r[d]||(OH(i,c),r[d]=!0)}return F.isArray(e)?e.forEach(a):a(e),this}}vn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(vn.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});F.freezeMethods(vn);function ih(n,e){const t=this||Hs,r=e||t,i=vn.from(r.headers);let a=r.data;return F.forEach(n,function(d){a=d.call(t,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}function CT(n){return!!(n&&n.__CANCEL__)}function ka(n,e,t){we.call(this,n??"canceled",we.ERR_CANCELED,e,t),this.name="CanceledError"}F.inherits(ka,we,{__CANCEL__:!0});function ET(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new we("Request failed with status code "+t.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function PH(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function MH(n,e){n=n||10;const t=new Array(n),r=new Array(n);let i=0,a=0,c;return e=e!==void 0?e:1e3,function(h){const m=Date.now(),g=r[a];c||(c=m),t[i]=h,r[i]=m;let v=a,p=0;for(;v!==i;)p+=t[v++],v=v%n;if(i=(i+1)%n,i===a&&(a=(a+1)%n),m-c<e)return;const w=g&&m-g;return w?Math.round(p*1e3/w):void 0}}function DH(n,e){let t=0,r=1e3/e,i,a;const c=(m,g=Date.now())=>{t=g,i=null,a&&(clearTimeout(a),a=null),n.apply(null,m)};return[(...m)=>{const g=Date.now(),v=g-t;v>=r?c(m,g):(i=m,a||(a=setTimeout(()=>{a=null,c(i)},r-v)))},()=>i&&c(i)]}const Ml=(n,e,t=3)=>{let r=0;const i=MH(50,250);return DH(a=>{const c=a.loaded,d=a.lengthComputable?a.total:void 0,h=c-r,m=i(h),g=c<=d;r=c;const v={loaded:c,total:d,progress:d?c/d:void 0,bytes:h,rate:m||void 0,estimated:m&&d&&g?(d-c)/m:void 0,event:a,lengthComputable:d!=null,[e?"download":"upload"]:!0};n(v)},t)},ty=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},ny=n=>(...e)=>F.asap(()=>n(...e)),LH=tn.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,tn.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,xH=tn.hasStandardBrowserEnv?{write(n,e,t,r,i,a){const c=[n+"="+encodeURIComponent(e)];F.isNumber(t)&&c.push("expires="+new Date(t).toGMTString()),F.isString(r)&&c.push("path="+r),F.isString(i)&&c.push("domain="+i),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function UH(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function FH(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function wT(n,e){return n&&!UH(e)?FH(n,e):e}const ry=n=>n instanceof vn?{...n}:n;function Ti(n,e){e=e||{};const t={};function r(m,g,v,p){return F.isPlainObject(m)&&F.isPlainObject(g)?F.merge.call({caseless:p},m,g):F.isPlainObject(g)?F.merge({},g):F.isArray(g)?g.slice():g}function i(m,g,v,p){if(F.isUndefined(g)){if(!F.isUndefined(m))return r(void 0,m,v,p)}else return r(m,g,v,p)}function a(m,g){if(!F.isUndefined(g))return r(void 0,g)}function c(m,g){if(F.isUndefined(g)){if(!F.isUndefined(m))return r(void 0,m)}else return r(void 0,g)}function d(m,g,v){if(v in e)return r(m,g);if(v in n)return r(void 0,m)}const h={url:a,method:a,data:a,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(m,g,v)=>i(ry(m),ry(g),v,!0)};return F.forEach(Object.keys(Object.assign({},n,e)),function(g){const v=h[g]||i,p=v(n[g],e[g],g);F.isUndefined(p)&&v!==d||(t[g]=p)}),t}const TT=n=>{const e=Ti({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:c,auth:d}=e;e.headers=c=vn.from(c),e.url=_T(wT(e.baseURL,e.url),n.params,n.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let h;if(F.isFormData(t)){if(tn.hasStandardBrowserEnv||tn.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((h=c.getContentType())!==!1){const[m,...g]=h?h.split(";").map(v=>v.trim()).filter(Boolean):[];c.setContentType([m||"multipart/form-data",...g].join("; "))}}if(tn.hasStandardBrowserEnv&&(r&&F.isFunction(r)&&(r=r(e)),r||r!==!1&&LH(e.url))){const m=i&&a&&xH.read(a);m&&c.set(i,m)}return e},BH=typeof XMLHttpRequest<"u",VH=BH&&function(n){return new Promise(function(t,r){const i=TT(n);let a=i.data;const c=vn.from(i.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:m}=i,g,v,p,w,C;function T(){w&&w(),C&&C(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let k=new XMLHttpRequest;k.open(i.method.toUpperCase(),i.url,!0),k.timeout=i.timeout;function I(){if(!k)return;const O=vn.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),$={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:O,config:n,request:k};ET(function(D){t(D),T()},function(D){r(D),T()},$),k=null}"onloadend"in k?k.onloadend=I:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(I)},k.onabort=function(){k&&(r(new we("Request aborted",we.ECONNABORTED,n,k)),k=null)},k.onerror=function(){r(new we("Network Error",we.ERR_NETWORK,n,k)),k=null},k.ontimeout=function(){let L=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const $=i.transitional||vT;i.timeoutErrorMessage&&(L=i.timeoutErrorMessage),r(new we(L,$.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,n,k)),k=null},a===void 0&&c.setContentType(null),"setRequestHeader"in k&&F.forEach(c.toJSON(),function(L,$){k.setRequestHeader($,L)}),F.isUndefined(i.withCredentials)||(k.withCredentials=!!i.withCredentials),d&&d!=="json"&&(k.responseType=i.responseType),m&&([p,C]=Ml(m,!0),k.addEventListener("progress",p)),h&&k.upload&&([v,w]=Ml(h),k.upload.addEventListener("progress",v),k.upload.addEventListener("loadend",w)),(i.cancelToken||i.signal)&&(g=O=>{k&&(r(!O||O.type?new ka(null,n,k):O),k.abort(),k=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const N=PH(i.url);if(N&&tn.protocols.indexOf(N)===-1){r(new we("Unsupported protocol "+N+":",we.ERR_BAD_REQUEST,n));return}k.send(a||null)})},HH=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,i;const a=function(m){if(!i){i=!0,d();const g=m instanceof Error?m:this.reason;r.abort(g instanceof we?g:new ka(g instanceof Error?g.message:g))}};let c=e&&setTimeout(()=>{c=null,a(new we(`timeout ${e} of ms exceeded`,we.ETIMEDOUT))},e);const d=()=>{n&&(c&&clearTimeout(c),c=null,n.forEach(m=>{m.unsubscribe?m.unsubscribe(a):m.removeEventListener("abort",a)}),n=null)};n.forEach(m=>m.addEventListener("abort",a));const{signal:h}=r;return h.unsubscribe=()=>F.asap(d),h}},$H=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,i;for(;r<t;)i=r+e,yield n.slice(r,i),r=i},KH=async function*(n,e){for await(const t of WH(n))yield*$H(t,e)},WH=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},oy=(n,e,t,r)=>{const i=KH(n,e);let a=0,c,d=h=>{c||(c=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:m,value:g}=await i.next();if(m){d(),h.close();return}let v=g.byteLength;if(t){let p=a+=v;t(p)}h.enqueue(new Uint8Array(g))}catch(m){throw d(m),m}},cancel(h){return d(h),i.return()}},{highWaterMark:2})},fu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bT=fu&&typeof ReadableStream=="function",zH=fu&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),IT=(n,...e)=>{try{return!!n(...e)}catch{return!1}},GH=bT&&IT(()=>{let n=!1;const e=new Request(tn.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),iy=64*1024,af=bT&&IT(()=>F.isReadableStream(new Response("").body)),Dl={stream:af&&(n=>n.body)};fu&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Dl[e]&&(Dl[e]=F.isFunction(n[e])?t=>t[e]():(t,r)=>{throw new we(`Response type '${e}' is not supported`,we.ERR_NOT_SUPPORT,r)})})})(new Response);const qH=async n=>{if(n==null)return 0;if(F.isBlob(n))return n.size;if(F.isSpecCompliantForm(n))return(await new Request(tn.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(F.isArrayBufferView(n)||F.isArrayBuffer(n))return n.byteLength;if(F.isURLSearchParams(n)&&(n=n+""),F.isString(n))return(await zH(n)).byteLength},YH=async(n,e)=>{const t=F.toFiniteNumber(n.getContentLength());return t??qH(e)},jH=fu&&(async n=>{let{url:e,method:t,data:r,signal:i,cancelToken:a,timeout:c,onDownloadProgress:d,onUploadProgress:h,responseType:m,headers:g,withCredentials:v="same-origin",fetchOptions:p}=TT(n);m=m?(m+"").toLowerCase():"text";let w=HH([i,a&&a.toAbortSignal()],c),C;const T=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let k;try{if(h&&GH&&t!=="get"&&t!=="head"&&(k=await YH(g,r))!==0){let $=new Request(e,{method:"POST",body:r,duplex:"half"}),G;if(F.isFormData(r)&&(G=$.headers.get("content-type"))&&g.setContentType(G),$.body){const[D,se]=ty(k,Ml(ny(h)));r=oy($.body,iy,D,se)}}F.isString(v)||(v=v?"include":"omit");const I="credentials"in Request.prototype;C=new Request(e,{...p,signal:w,method:t.toUpperCase(),headers:g.normalize().toJSON(),body:r,duplex:"half",credentials:I?v:void 0});let N=await fetch(C);const O=af&&(m==="stream"||m==="response");if(af&&(d||O&&T)){const $={};["status","statusText","headers"].forEach(ie=>{$[ie]=N[ie]});const G=F.toFiniteNumber(N.headers.get("content-length")),[D,se]=d&&ty(G,Ml(ny(d),!0))||[];N=new Response(oy(N.body,iy,D,()=>{se&&se(),T&&T()}),$)}m=m||"text";let L=await Dl[F.findKey(Dl,m)||"text"](N,n);return!O&&T&&T(),await new Promise(($,G)=>{ET($,G,{data:L,headers:vn.from(N.headers),status:N.status,statusText:N.statusText,config:n,request:C})})}catch(I){throw T&&T(),I&&I.name==="TypeError"&&/fetch/i.test(I.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,n,C),{cause:I.cause||I}):we.from(I,I&&I.code,n,C)}}),sf={http:uH,xhr:VH,fetch:jH};F.forEach(sf,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const ay=n=>`- ${n}`,JH=n=>F.isFunction(n)||n===null||n===!1,AT={getAdapter:n=>{n=F.isArray(n)?n:[n];const{length:e}=n;let t,r;const i={};for(let a=0;a<e;a++){t=n[a];let c;if(r=t,!JH(t)&&(r=sf[(c=String(t)).toLowerCase()],r===void 0))throw new we(`Unknown adapter '${c}'`);if(r)break;i[c||"#"+a]=r}if(!r){const a=Object.entries(i).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=e?a.length>1?`since :
|
85
|
+
`+a.map(ay).join(`
|
86
|
+
`):" "+ay(a[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r},adapters:sf};function ah(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ka(null,n)}function sy(n){return ah(n),n.headers=vn.from(n.headers),n.data=ih.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),AT.getAdapter(n.adapter||Hs.adapter)(n).then(function(r){return ah(n),r.data=ih.call(n,n.transformResponse,r),r.headers=vn.from(r.headers),r},function(r){return CT(r)||(ah(n),r&&r.response&&(r.response.data=ih.call(n,n.transformResponse,r.response),r.response.headers=vn.from(r.response.headers))),Promise.reject(r)})}const ST="1.7.9",mu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{mu[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const cy={};mu.transitional=function(e,t,r){function i(a,c){return"[Axios v"+ST+"] Transitional option '"+a+"'"+c+(r?". "+r:"")}return(a,c,d)=>{if(e===!1)throw new we(i(c," has been removed"+(t?" in "+t:"")),we.ERR_DEPRECATED);return t&&!cy[c]&&(cy[c]=!0,console.warn(i(c," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,c,d):!0}};mu.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function QH(n,e,t){if(typeof n!="object")throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const a=r[i],c=e[a];if(c){const d=n[a],h=d===void 0||c(d,a,n);if(h!==!0)throw new we("option "+a+" must be "+h,we.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new we("Unknown option "+a,we.ERR_BAD_OPTION)}}const dl={assertOptions:QH,validators:mu},Pr=dl.validators;class gi{constructor(e){this.defaults=e,this.interceptors={request:new Zv,response:new Zv}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
87
|
+
`+a):r.stack=a}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ti(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:a}=t;r!==void 0&&dl.assertOptions(r,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean)},!1),i!=null&&(F.isFunction(i)?t.paramsSerializer={serialize:i}:dl.assertOptions(i,{encode:Pr.function,serialize:Pr.function},!0)),dl.assertOptions(t,{baseUrl:Pr.spelling("baseURL"),withXsrfToken:Pr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let c=a&&F.merge(a.common,a[t.method]);a&&F.forEach(["delete","get","head","post","put","patch","common"],C=>{delete a[C]}),t.headers=vn.concat(c,a);const d=[];let h=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(t)===!1||(h=h&&T.synchronous,d.unshift(T.fulfilled,T.rejected))});const m=[];this.interceptors.response.forEach(function(T){m.push(T.fulfilled,T.rejected)});let g,v=0,p;if(!h){const C=[sy.bind(this),void 0];for(C.unshift.apply(C,d),C.push.apply(C,m),p=C.length,g=Promise.resolve(t);v<p;)g=g.then(C[v++],C[v++]);return g}p=d.length;let w=t;for(v=0;v<p;){const C=d[v++],T=d[v++];try{w=C(w)}catch(k){T.call(this,k);break}}try{g=sy.call(this,w)}catch(C){return Promise.reject(C)}for(v=0,p=m.length;v<p;)g=g.then(m[v++],m[v++]);return g}getUri(e){e=Ti(this.defaults,e);const t=wT(e.baseURL,e.url);return _T(t,e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],function(e){gi.prototype[e]=function(t,r){return this.request(Ti(r||{},{method:e,url:t,data:(r||{}).data}))}});F.forEach(["post","put","patch"],function(e){function t(r){return function(a,c,d){return this.request(Ti(d||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:c}))}}gi.prototype[e]=t(),gi.prototype[e+"Form"]=t(!0)});class Im{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const c=new Promise(d=>{r.subscribe(d),a=d}).then(i);return c.cancel=function(){r.unsubscribe(a)},c},e(function(a,c,d){r.reason||(r.reason=new ka(a,c,d),t(r.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=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Im(function(i){e=i}),cancel:e}}}function XH(n){return function(t){return n.apply(null,t)}}function ZH(n){return F.isObject(n)&&n.isAxiosError===!0}const cf={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(cf).forEach(([n,e])=>{cf[e]=n});function kT(n){const e=new gi(n),t=iT(gi.prototype.request,e);return F.extend(t,gi.prototype,e,{allOwnKeys:!0}),F.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return kT(Ti(n,i))},t}const ut=kT(Hs);ut.Axios=gi;ut.CanceledError=ka;ut.CancelToken=Im;ut.isCancel=CT;ut.VERSION=ST;ut.toFormData=hu;ut.AxiosError=we;ut.Cancel=ut.CanceledError;ut.all=function(e){return Promise.all(e)};ut.spread=XH;ut.isAxiosError=ZH;ut.mergeConfig=Ti;ut.AxiosHeaders=vn;ut.formToJSON=n=>yT(F.isHTMLForm(n)?new FormData(n):n);ut.getAdapter=AT.getAdapter;ut.HttpStatusCode=cf;ut.default=ut;const{jToken:ly}=rT(),Am=()=>{const n=ut.create({headers:{"Content-Type":"application/json"}});l.watch(ly,i=>{n.interceptors.request.use(a=>(i&&(a.headers.Authorization=`Bearer ${i}`),a))},{immediate:!0});let e=1;n.interceptors.response.use(async i=>i,async i=>{var a;if(i.config&&i.config.headers){const c=i.config;if(((a=i.response)==null?void 0:a.status)===401&&e>0){e--;try{return c.headers.Authorization=`Bearer ${ly.value}`,await n(c)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:a,header:c={},body:d,baseURL:h}){try{return h&&(n.defaults.baseURL=h),(await n({url:i,method:a,headers:c,data:d})).data}catch(m){if(console.error(`Request error [${a} ${i}]:`,m),ut.isAxiosError(m)){const{response:g,message:v}=m;throw new Error(`Axios error: ${v}, Status: ${g==null?void 0:g.status}, URL: ${i}`)}throw m}}async function r({url:i,method:a,header:c,body:d,baseURL:h}){try{h&&(n.defaults.baseURL=h);const m=await n({url:i,method:a,headers:c,data:d});return{status:m.status,header:m.headers,body:m.data}}catch(m){if(ut.isAxiosError(m)){const{response:g,message:v}=m;console.error(`Raw Request Error: ${v}, Status: ${g==null?void 0:g.status}`)}return Promise.reject(m)}}return Object.assign(n,{_request:t,rawRequest:r})},{request:uy}=Am(),dy=l.ref(null),hy=l.ref("default"),sh=l.ref(null),ch=l.ref({scope_type:"org"});function gu(){var v,p;const{handleRedirect:n,account:e,logout:t}=Em();(p=(v=e.value)==null?void 0:v.idTokenClaims)==null||p.domain;const r=l.computed(()=>{var w,C;return{domain:(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.domain,environment:hy.value,...ch.value}}),i=l.computed(()=>ch.value);async function a(){var w;(!e.value||!((w=e.value.idTokenClaims)!=null&&w.email))&&await n();try{await c(),await d()}catch{}}async function c(){var w,C;try{const T=(C=(w=e.value)==null?void 0:w.idTokenClaims)==null?void 0:C.email;if(!T)throw new Error("Email is undefined");const k=await uy({url:`https://api.jplan.com.br/platform/user/profile/?email=${T}`,method:"GET"});sh.value=k.data??null}catch(T){console.error("Failed to fetch user profile:",T)}}async function d(){var w;try{if(!((w=sh.value)!=null&&w.email))throw new Error("User email is undefined");const C=await uy({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});dy.value=C.data.data??[]}catch(C){console.error("Failed to fetch user domains:",C)}}function h(w){ch.value=w}function m(w){hy.value=w,h(r.value)}async function g(w,C){const T=nT(w,{request_domain:C});await zt.loginRedirect(T)}return{__init__:a,user:sh,userDomains:dy,setEnv:m,setScope:h,changeDomain:g,session:r,scope:i,logout:t}}var qc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e$(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var is={exports:{}};/**
|
88
|
+
* @license
|
89
|
+
* Lodash <https://lodash.com/>
|
90
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
91
|
+
* Released under MIT license <https://lodash.com/license>
|
92
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
93
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
94
|
+
*/var t$=is.exports,fy;function n$(){return fy||(fy=1,function(n,e){(function(){var t,r="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",m=500,g="__lodash_placeholder__",v=1,p=2,w=4,C=1,T=2,k=1,I=2,N=4,O=8,L=16,$=32,G=64,D=128,se=256,ie=512,Q=30,Z="...",le=800,Ue=16,yt=1,nn=2,Gt=3,Pt=1/0,it=9007199254740991,Ct=17976931348623157e292,rn=NaN,It=4294967295,Go=It-1,Pa=It>>>1,Ma=[["ary",D],["bind",k],["bindKey",I],["curry",O],["curryRight",L],["flip",ie],["partial",$],["partialRight",G],["rearg",se]],br="[object Arguments]",qo="[object Array]",Da="[object AsyncFunction]",Ir="[object Boolean]",zr="[object Date]",La="[object DOMException]",go="[object Error]",po="[object Function]",_o="[object GeneratorFunction]",Ft="[object Map]",Cn="[object Number]",Yo="[object Null]",En="[object Object]",S="[object Promise]",R="[object Proxy]",z="[object RegExp]",re="[object Set]",qe="[object String]",Xe="[object Symbol]",Pe="[object Undefined]",V="[object WeakMap]",j="[object WeakSet]",ke="[object ArrayBuffer]",We="[object DataView]",ir="[object Float32Array]",vo="[object Float64Array]",Ar="[object Int8Array]",ar="[object Int16Array]",xa="[object Int32Array]",Ai="[object Uint8Array]",pu="[object Uint8ClampedArray]",_u="[object Uint16Array]",vu="[object Uint32Array]",LT=/\b__p \+= '';/g,xT=/\b(__p \+=) '' \+/g,UT=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Sm=/&(?:amp|lt|gt|quot|#39);/g,km=/[&<>"']/g,FT=RegExp(Sm.source),BT=RegExp(km.source),VT=/<%-([\s\S]+?)%>/g,HT=/<%([\s\S]+?)%>/g,Nm=/<%=([\s\S]+?)%>/g,$T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KT=/^\w*$/,WT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yu=/[\\^$.*+?()[\]{}|]/g,zT=RegExp(yu.source),Cu=/^\s+/,GT=/\s/,qT=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,YT=/\{\n\/\* \[wrapped with (.+)\] \*/,jT=/,? & /,JT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,QT=/[()=,{}\[\]\/\s]/,XT=/\\(\\)?/g,ZT=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Rm=/\w*$/,eb=/^[-+]0x[0-9a-f]+$/i,tb=/^0b[01]+$/i,nb=/^\[object .+?Constructor\]$/,rb=/^0o[0-7]+$/i,ob=/^(?:0|[1-9]\d*)$/,ib=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$s=/($^)/,ab=/['\n\r\u2028\u2029\\]/g,Ks="\\ud800-\\udfff",sb="\\u0300-\\u036f",cb="\\ufe20-\\ufe2f",lb="\\u20d0-\\u20ff",Om=sb+cb+lb,Pm="\\u2700-\\u27bf",Mm="a-z\\xdf-\\xf6\\xf8-\\xff",ub="\\xac\\xb1\\xd7\\xf7",db="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hb="\\u2000-\\u206f",fb=" \\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",Dm="A-Z\\xc0-\\xd6\\xd8-\\xde",Lm="\\ufe0e\\ufe0f",xm=ub+db+hb+fb,Eu="['’]",mb="["+Ks+"]",Um="["+xm+"]",Ws="["+Om+"]",Fm="\\d+",gb="["+Pm+"]",Bm="["+Mm+"]",Vm="[^"+Ks+xm+Fm+Pm+Mm+Dm+"]",wu="\\ud83c[\\udffb-\\udfff]",pb="(?:"+Ws+"|"+wu+")",Hm="[^"+Ks+"]",Tu="(?:\\ud83c[\\udde6-\\uddff]){2}",bu="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+Dm+"]",$m="\\u200d",Km="(?:"+Bm+"|"+Vm+")",_b="(?:"+Si+"|"+Vm+")",Wm="(?:"+Eu+"(?:d|ll|m|re|s|t|ve))?",zm="(?:"+Eu+"(?:D|LL|M|RE|S|T|VE))?",Gm=pb+"?",qm="["+Lm+"]?",vb="(?:"+$m+"(?:"+[Hm,Tu,bu].join("|")+")"+qm+Gm+")*",yb="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ym=qm+Gm+vb,Eb="(?:"+[gb,Tu,bu].join("|")+")"+Ym,wb="(?:"+[Hm+Ws+"?",Ws,Tu,bu,mb].join("|")+")",Tb=RegExp(Eu,"g"),bb=RegExp(Ws,"g"),Iu=RegExp(wu+"(?="+wu+")|"+wb+Ym,"g"),Ib=RegExp([Si+"?"+Bm+"+"+Wm+"(?="+[Um,Si,"$"].join("|")+")",_b+"+"+zm+"(?="+[Um,Si+Km,"$"].join("|")+")",Si+"?"+Km+"+"+Wm,Si+"+"+zm,Cb,yb,Fm,Eb].join("|"),"g"),Ab=RegExp("["+$m+Ks+Om+Lm+"]"),Sb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kb=["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"],Nb=-1,nt={};nt[ir]=nt[vo]=nt[Ar]=nt[ar]=nt[xa]=nt[Ai]=nt[pu]=nt[_u]=nt[vu]=!0,nt[br]=nt[qo]=nt[ke]=nt[Ir]=nt[We]=nt[zr]=nt[go]=nt[po]=nt[Ft]=nt[Cn]=nt[En]=nt[z]=nt[re]=nt[qe]=nt[V]=!1;var Ze={};Ze[br]=Ze[qo]=Ze[ke]=Ze[We]=Ze[Ir]=Ze[zr]=Ze[ir]=Ze[vo]=Ze[Ar]=Ze[ar]=Ze[xa]=Ze[Ft]=Ze[Cn]=Ze[En]=Ze[z]=Ze[re]=Ze[qe]=Ze[Xe]=Ze[Ai]=Ze[pu]=Ze[_u]=Ze[vu]=!0,Ze[go]=Ze[po]=Ze[V]=!1;var Rb={À:"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"},Ob={"&":"&","<":"<",">":">",'"':""","'":"'"},Pb={"&":"&","<":"<",">":">",""":'"',"'":"'"},Mb={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Db=parseFloat,Lb=parseInt,jm=typeof qc=="object"&&qc&&qc.Object===Object&&qc,xb=typeof self=="object"&&self&&self.Object===Object&&self,Bt=jm||xb||Function("return this")(),Au=e&&!e.nodeType&&e,jo=Au&&!0&&n&&!n.nodeType&&n,Jm=jo&&jo.exports===Au,Su=Jm&&jm.process,Bn=function(){try{var P=jo&&jo.require&&jo.require("util").types;return P||Su&&Su.binding&&Su.binding("util")}catch{}}(),Qm=Bn&&Bn.isArrayBuffer,Xm=Bn&&Bn.isDate,Zm=Bn&&Bn.isMap,eg=Bn&&Bn.isRegExp,tg=Bn&&Bn.isSet,ng=Bn&&Bn.isTypedArray;function wn(P,H,U){switch(U.length){case 0:return P.call(H);case 1:return P.call(H,U[0]);case 2:return P.call(H,U[0],U[1]);case 3:return P.call(H,U[0],U[1],U[2])}return P.apply(H,U)}function Ub(P,H,U,ne){for(var ye=-1,Fe=P==null?0:P.length;++ye<Fe;){var At=P[ye];H(ne,At,U(At),P)}return ne}function Vn(P,H){for(var U=-1,ne=P==null?0:P.length;++U<ne&&H(P[U],U,P)!==!1;);return P}function Fb(P,H){for(var U=P==null?0:P.length;U--&&H(P[U],U,P)!==!1;);return P}function rg(P,H){for(var U=-1,ne=P==null?0:P.length;++U<ne;)if(!H(P[U],U,P))return!1;return!0}function yo(P,H){for(var U=-1,ne=P==null?0:P.length,ye=0,Fe=[];++U<ne;){var At=P[U];H(At,U,P)&&(Fe[ye++]=At)}return Fe}function zs(P,H){var U=P==null?0:P.length;return!!U&&ki(P,H,0)>-1}function ku(P,H,U){for(var ne=-1,ye=P==null?0:P.length;++ne<ye;)if(U(H,P[ne]))return!0;return!1}function at(P,H){for(var U=-1,ne=P==null?0:P.length,ye=Array(ne);++U<ne;)ye[U]=H(P[U],U,P);return ye}function Co(P,H){for(var U=-1,ne=H.length,ye=P.length;++U<ne;)P[ye+U]=H[U];return P}function Nu(P,H,U,ne){var ye=-1,Fe=P==null?0:P.length;for(ne&&Fe&&(U=P[++ye]);++ye<Fe;)U=H(U,P[ye],ye,P);return U}function Bb(P,H,U,ne){var ye=P==null?0:P.length;for(ne&&ye&&(U=P[--ye]);ye--;)U=H(U,P[ye],ye,P);return U}function Ru(P,H){for(var U=-1,ne=P==null?0:P.length;++U<ne;)if(H(P[U],U,P))return!0;return!1}var Vb=Ou("length");function Hb(P){return P.split("")}function $b(P){return P.match(JT)||[]}function og(P,H,U){var ne;return U(P,function(ye,Fe,At){if(H(ye,Fe,At))return ne=Fe,!1}),ne}function Gs(P,H,U,ne){for(var ye=P.length,Fe=U+(ne?1:-1);ne?Fe--:++Fe<ye;)if(H(P[Fe],Fe,P))return Fe;return-1}function ki(P,H,U){return H===H?eI(P,H,U):Gs(P,ig,U)}function Kb(P,H,U,ne){for(var ye=U-1,Fe=P.length;++ye<Fe;)if(ne(P[ye],H))return ye;return-1}function ig(P){return P!==P}function ag(P,H){var U=P==null?0:P.length;return U?Mu(P,H)/U:rn}function Ou(P){return function(H){return H==null?t:H[P]}}function Pu(P){return function(H){return P==null?t:P[H]}}function sg(P,H,U,ne,ye){return ye(P,function(Fe,At,Ye){U=ne?(ne=!1,Fe):H(U,Fe,At,Ye)}),U}function Wb(P,H){var U=P.length;for(P.sort(H);U--;)P[U]=P[U].value;return P}function Mu(P,H){for(var U,ne=-1,ye=P.length;++ne<ye;){var Fe=H(P[ne]);Fe!==t&&(U=U===t?Fe:U+Fe)}return U}function Du(P,H){for(var U=-1,ne=Array(P);++U<P;)ne[U]=H(U);return ne}function zb(P,H){return at(H,function(U){return[U,P[U]]})}function cg(P){return P&&P.slice(0,hg(P)+1).replace(Cu,"")}function Tn(P){return function(H){return P(H)}}function Lu(P,H){return at(H,function(U){return P[U]})}function Ua(P,H){return P.has(H)}function lg(P,H){for(var U=-1,ne=P.length;++U<ne&&ki(H,P[U],0)>-1;);return U}function ug(P,H){for(var U=P.length;U--&&ki(H,P[U],0)>-1;);return U}function Gb(P,H){for(var U=P.length,ne=0;U--;)P[U]===H&&++ne;return ne}var qb=Pu(Rb),Yb=Pu(Ob);function jb(P){return"\\"+Mb[P]}function Jb(P,H){return P==null?t:P[H]}function Ni(P){return Ab.test(P)}function Qb(P){return Sb.test(P)}function Xb(P){for(var H,U=[];!(H=P.next()).done;)U.push(H.value);return U}function xu(P){var H=-1,U=Array(P.size);return P.forEach(function(ne,ye){U[++H]=[ye,ne]}),U}function dg(P,H){return function(U){return P(H(U))}}function Eo(P,H){for(var U=-1,ne=P.length,ye=0,Fe=[];++U<ne;){var At=P[U];(At===H||At===g)&&(P[U]=g,Fe[ye++]=U)}return Fe}function qs(P){var H=-1,U=Array(P.size);return P.forEach(function(ne){U[++H]=ne}),U}function Zb(P){var H=-1,U=Array(P.size);return P.forEach(function(ne){U[++H]=[ne,ne]}),U}function eI(P,H,U){for(var ne=U-1,ye=P.length;++ne<ye;)if(P[ne]===H)return ne;return-1}function tI(P,H,U){for(var ne=U+1;ne--;)if(P[ne]===H)return ne;return ne}function Ri(P){return Ni(P)?rI(P):Vb(P)}function sr(P){return Ni(P)?oI(P):Hb(P)}function hg(P){for(var H=P.length;H--&>.test(P.charAt(H)););return H}var nI=Pu(Pb);function rI(P){for(var H=Iu.lastIndex=0;Iu.test(P);)++H;return H}function oI(P){return P.match(Iu)||[]}function iI(P){return P.match(Ib)||[]}var aI=function P(H){H=H==null?Bt:Oi.defaults(Bt.Object(),H,Oi.pick(Bt,kb));var U=H.Array,ne=H.Date,ye=H.Error,Fe=H.Function,At=H.Math,Ye=H.Object,Uu=H.RegExp,sI=H.String,Hn=H.TypeError,Ys=U.prototype,cI=Fe.prototype,Pi=Ye.prototype,js=H["__core-js_shared__"],Js=cI.toString,He=Pi.hasOwnProperty,lI=0,fg=function(){var o=/[^.]+$/.exec(js&&js.keys&&js.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Qs=Pi.toString,uI=Js.call(Ye),dI=Bt._,hI=Uu("^"+Js.call(He).replace(yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xs=Jm?H.Buffer:t,wo=H.Symbol,Zs=H.Uint8Array,mg=Xs?Xs.allocUnsafe:t,ec=dg(Ye.getPrototypeOf,Ye),gg=Ye.create,pg=Pi.propertyIsEnumerable,tc=Ys.splice,_g=wo?wo.isConcatSpreadable:t,Fa=wo?wo.iterator:t,Jo=wo?wo.toStringTag:t,nc=function(){try{var o=ti(Ye,"defineProperty");return o({},"",{}),o}catch{}}(),fI=H.clearTimeout!==Bt.clearTimeout&&H.clearTimeout,mI=ne&&ne.now!==Bt.Date.now&&ne.now,gI=H.setTimeout!==Bt.setTimeout&&H.setTimeout,rc=At.ceil,oc=At.floor,Fu=Ye.getOwnPropertySymbols,pI=Xs?Xs.isBuffer:t,vg=H.isFinite,_I=Ys.join,vI=dg(Ye.keys,Ye),St=At.max,qt=At.min,yI=ne.now,CI=H.parseInt,yg=At.random,EI=Ys.reverse,Bu=ti(H,"DataView"),Ba=ti(H,"Map"),Vu=ti(H,"Promise"),Mi=ti(H,"Set"),Va=ti(H,"WeakMap"),Ha=ti(Ye,"create"),ic=Va&&new Va,Di={},wI=ni(Bu),TI=ni(Ba),bI=ni(Vu),II=ni(Mi),AI=ni(Va),ac=wo?wo.prototype:t,$a=ac?ac.valueOf:t,Cg=ac?ac.toString:t;function y(o){if(dt(o)&&!Ce(o)&&!(o instanceof Re)){if(o instanceof $n)return o;if(He.call(o,"__wrapped__"))return Ep(o)}return new $n(o)}var Li=function(){function o(){}return function(s){if(!lt(s))return{};if(gg)return gg(s);o.prototype=s;var u=new o;return o.prototype=t,u}}();function sc(){}function $n(o,s){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=t}y.templateSettings={escape:VT,evaluate:HT,interpolate:Nm,variable:"",imports:{_:y}},y.prototype=sc.prototype,y.prototype.constructor=y,$n.prototype=Li(sc.prototype),$n.prototype.constructor=$n;function Re(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=It,this.__views__=[]}function SI(){var o=new Re(this.__wrapped__);return o.__actions__=dn(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=dn(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=dn(this.__views__),o}function kI(){if(this.__filtered__){var o=new Re(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function NI(){var o=this.__wrapped__.value(),s=this.__dir__,u=Ce(o),f=s<0,_=u?o.length:0,E=HA(0,_,this.__views__),b=E.start,A=E.end,M=A-b,K=f?A:b-1,W=this.__iteratees__,q=W.length,ee=0,ae=qt(M,this.__takeCount__);if(!u||!f&&_==M&&ae==M)return Wg(o,this.__actions__);var de=[];e:for(;M--&&ee<ae;){K+=s;for(var be=-1,he=o[K];++be<q;){var Ne=W[be],Oe=Ne.iteratee,An=Ne.type,sn=Oe(he);if(An==nn)he=sn;else if(!sn){if(An==yt)continue e;break e}}de[ee++]=he}return de}Re.prototype=Li(sc.prototype),Re.prototype.constructor=Re;function Qo(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}function RI(){this.__data__=Ha?Ha(null):{},this.size=0}function OI(o){var s=this.has(o)&&delete this.__data__[o];return this.size-=s?1:0,s}function PI(o){var s=this.__data__;if(Ha){var u=s[o];return u===h?t:u}return He.call(s,o)?s[o]:t}function MI(o){var s=this.__data__;return Ha?s[o]!==t:He.call(s,o)}function DI(o,s){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=Ha&&s===t?h:s,this}Qo.prototype.clear=RI,Qo.prototype.delete=OI,Qo.prototype.get=PI,Qo.prototype.has=MI,Qo.prototype.set=DI;function Gr(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}function LI(){this.__data__=[],this.size=0}function xI(o){var s=this.__data__,u=cc(s,o);if(u<0)return!1;var f=s.length-1;return u==f?s.pop():tc.call(s,u,1),--this.size,!0}function UI(o){var s=this.__data__,u=cc(s,o);return u<0?t:s[u][1]}function FI(o){return cc(this.__data__,o)>-1}function BI(o,s){var u=this.__data__,f=cc(u,o);return f<0?(++this.size,u.push([o,s])):u[f][1]=s,this}Gr.prototype.clear=LI,Gr.prototype.delete=xI,Gr.prototype.get=UI,Gr.prototype.has=FI,Gr.prototype.set=BI;function qr(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}function VI(){this.size=0,this.__data__={hash:new Qo,map:new(Ba||Gr),string:new Qo}}function HI(o){var s=Cc(this,o).delete(o);return this.size-=s?1:0,s}function $I(o){return Cc(this,o).get(o)}function KI(o){return Cc(this,o).has(o)}function WI(o,s){var u=Cc(this,o),f=u.size;return u.set(o,s),this.size+=u.size==f?0:1,this}qr.prototype.clear=VI,qr.prototype.delete=HI,qr.prototype.get=$I,qr.prototype.has=KI,qr.prototype.set=WI;function Xo(o){var s=-1,u=o==null?0:o.length;for(this.__data__=new qr;++s<u;)this.add(o[s])}function zI(o){return this.__data__.set(o,h),this}function GI(o){return this.__data__.has(o)}Xo.prototype.add=Xo.prototype.push=zI,Xo.prototype.has=GI;function cr(o){var s=this.__data__=new Gr(o);this.size=s.size}function qI(){this.__data__=new Gr,this.size=0}function YI(o){var s=this.__data__,u=s.delete(o);return this.size=s.size,u}function jI(o){return this.__data__.get(o)}function JI(o){return this.__data__.has(o)}function QI(o,s){var u=this.__data__;if(u instanceof Gr){var f=u.__data__;if(!Ba||f.length<i-1)return f.push([o,s]),this.size=++u.size,this;u=this.__data__=new qr(f)}return u.set(o,s),this.size=u.size,this}cr.prototype.clear=qI,cr.prototype.delete=YI,cr.prototype.get=jI,cr.prototype.has=JI,cr.prototype.set=QI;function Eg(o,s){var u=Ce(o),f=!u&&ri(o),_=!u&&!f&&So(o),E=!u&&!f&&!_&&Bi(o),b=u||f||_||E,A=b?Du(o.length,sI):[],M=A.length;for(var K in o)(s||He.call(o,K))&&!(b&&(K=="length"||_&&(K=="offset"||K=="parent")||E&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||Qr(K,M)))&&A.push(K);return A}function wg(o){var s=o.length;return s?o[Qu(0,s-1)]:t}function XI(o,s){return Ec(dn(o),Zo(s,0,o.length))}function ZI(o){return Ec(dn(o))}function Hu(o,s,u){(u!==t&&!lr(o[s],u)||u===t&&!(s in o))&&Yr(o,s,u)}function Ka(o,s,u){var f=o[s];(!(He.call(o,s)&&lr(f,u))||u===t&&!(s in o))&&Yr(o,s,u)}function cc(o,s){for(var u=o.length;u--;)if(lr(o[u][0],s))return u;return-1}function eA(o,s,u,f){return To(o,function(_,E,b){s(f,_,u(_),b)}),f}function Tg(o,s){return o&&kr(s,Mt(s),o)}function tA(o,s){return o&&kr(s,fn(s),o)}function Yr(o,s,u){s=="__proto__"&&nc?nc(o,s,{configurable:!0,enumerable:!0,value:u,writable:!0}):o[s]=u}function $u(o,s){for(var u=-1,f=s.length,_=U(f),E=o==null;++u<f;)_[u]=E?t:wd(o,s[u]);return _}function Zo(o,s,u){return o===o&&(u!==t&&(o=o<=u?o:u),s!==t&&(o=o>=s?o:s)),o}function Kn(o,s,u,f,_,E){var b,A=s&v,M=s&p,K=s&w;if(u&&(b=_?u(o,f,_,E):u(o)),b!==t)return b;if(!lt(o))return o;var W=Ce(o);if(W){if(b=KA(o),!A)return dn(o,b)}else{var q=Yt(o),ee=q==po||q==_o;if(So(o))return qg(o,A);if(q==En||q==br||ee&&!_){if(b=M||ee?{}:hp(o),!A)return M?PA(o,tA(b,o)):OA(o,Tg(b,o))}else{if(!Ze[q])return _?o:{};b=WA(o,q,A)}}E||(E=new cr);var ae=E.get(o);if(ae)return ae;E.set(o,b),Hp(o)?o.forEach(function(he){b.add(Kn(he,s,u,he,o,E))}):Bp(o)&&o.forEach(function(he,Ne){b.set(Ne,Kn(he,s,u,Ne,o,E))});var de=K?M?cd:sd:M?fn:Mt,be=W?t:de(o);return Vn(be||o,function(he,Ne){be&&(Ne=he,he=o[Ne]),Ka(b,Ne,Kn(he,s,u,Ne,o,E))}),b}function nA(o){var s=Mt(o);return function(u){return bg(u,o,s)}}function bg(o,s,u){var f=u.length;if(o==null)return!f;for(o=Ye(o);f--;){var _=u[f],E=s[_],b=o[_];if(b===t&&!(_ in o)||!E(b))return!1}return!0}function Ig(o,s,u){if(typeof o!="function")throw new Hn(c);return Ja(function(){o.apply(t,u)},s)}function Wa(o,s,u,f){var _=-1,E=zs,b=!0,A=o.length,M=[],K=s.length;if(!A)return M;u&&(s=at(s,Tn(u))),f?(E=ku,b=!1):s.length>=i&&(E=Ua,b=!1,s=new Xo(s));e:for(;++_<A;){var W=o[_],q=u==null?W:u(W);if(W=f||W!==0?W:0,b&&q===q){for(var ee=K;ee--;)if(s[ee]===q)continue e;M.push(W)}else E(s,q,f)||M.push(W)}return M}var To=Xg(Sr),Ag=Xg(Wu,!0);function rA(o,s){var u=!0;return To(o,function(f,_,E){return u=!!s(f,_,E),u}),u}function lc(o,s,u){for(var f=-1,_=o.length;++f<_;){var E=o[f],b=s(E);if(b!=null&&(A===t?b===b&&!In(b):u(b,A)))var A=b,M=E}return M}function oA(o,s,u,f){var _=o.length;for(u=Te(u),u<0&&(u=-u>_?0:_+u),f=f===t||f>_?_:Te(f),f<0&&(f+=_),f=u>f?0:Kp(f);u<f;)o[u++]=s;return o}function Sg(o,s){var u=[];return To(o,function(f,_,E){s(f,_,E)&&u.push(f)}),u}function Vt(o,s,u,f,_){var E=-1,b=o.length;for(u||(u=GA),_||(_=[]);++E<b;){var A=o[E];s>0&&u(A)?s>1?Vt(A,s-1,u,f,_):Co(_,A):f||(_[_.length]=A)}return _}var Ku=Zg(),kg=Zg(!0);function Sr(o,s){return o&&Ku(o,s,Mt)}function Wu(o,s){return o&&kg(o,s,Mt)}function uc(o,s){return yo(s,function(u){return Xr(o[u])})}function ei(o,s){s=Io(s,o);for(var u=0,f=s.length;o!=null&&u<f;)o=o[Nr(s[u++])];return u&&u==f?o:t}function Ng(o,s,u){var f=s(o);return Ce(o)?f:Co(f,u(o))}function on(o){return o==null?o===t?Pe:Yo:Jo&&Jo in Ye(o)?VA(o):ZA(o)}function zu(o,s){return o>s}function iA(o,s){return o!=null&&He.call(o,s)}function aA(o,s){return o!=null&&s in Ye(o)}function sA(o,s,u){return o>=qt(s,u)&&o<St(s,u)}function Gu(o,s,u){for(var f=u?ku:zs,_=o[0].length,E=o.length,b=E,A=U(E),M=1/0,K=[];b--;){var W=o[b];b&&s&&(W=at(W,Tn(s))),M=qt(W.length,M),A[b]=!u&&(s||_>=120&&W.length>=120)?new Xo(b&&W):t}W=o[0];var q=-1,ee=A[0];e:for(;++q<_&&K.length<M;){var ae=W[q],de=s?s(ae):ae;if(ae=u||ae!==0?ae:0,!(ee?Ua(ee,de):f(K,de,u))){for(b=E;--b;){var be=A[b];if(!(be?Ua(be,de):f(o[b],de,u)))continue e}ee&&ee.push(de),K.push(ae)}}return K}function cA(o,s,u,f){return Sr(o,function(_,E,b){s(f,u(_),E,b)}),f}function za(o,s,u){s=Io(s,o),o=pp(o,s);var f=o==null?o:o[Nr(zn(s))];return f==null?t:wn(f,o,u)}function Rg(o){return dt(o)&&on(o)==br}function lA(o){return dt(o)&&on(o)==ke}function uA(o){return dt(o)&&on(o)==zr}function Ga(o,s,u,f,_){return o===s?!0:o==null||s==null||!dt(o)&&!dt(s)?o!==o&&s!==s:dA(o,s,u,f,Ga,_)}function dA(o,s,u,f,_,E){var b=Ce(o),A=Ce(s),M=b?qo:Yt(o),K=A?qo:Yt(s);M=M==br?En:M,K=K==br?En:K;var W=M==En,q=K==En,ee=M==K;if(ee&&So(o)){if(!So(s))return!1;b=!0,W=!1}if(ee&&!W)return E||(E=new cr),b||Bi(o)?lp(o,s,u,f,_,E):FA(o,s,M,u,f,_,E);if(!(u&C)){var ae=W&&He.call(o,"__wrapped__"),de=q&&He.call(s,"__wrapped__");if(ae||de){var be=ae?o.value():o,he=de?s.value():s;return E||(E=new cr),_(be,he,u,f,E)}}return ee?(E||(E=new cr),BA(o,s,u,f,_,E)):!1}function hA(o){return dt(o)&&Yt(o)==Ft}function qu(o,s,u,f){var _=u.length,E=_,b=!f;if(o==null)return!E;for(o=Ye(o);_--;){var A=u[_];if(b&&A[2]?A[1]!==o[A[0]]:!(A[0]in o))return!1}for(;++_<E;){A=u[_];var M=A[0],K=o[M],W=A[1];if(b&&A[2]){if(K===t&&!(M in o))return!1}else{var q=new cr;if(f)var ee=f(K,W,M,o,s,q);if(!(ee===t?Ga(W,K,C|T,f,q):ee))return!1}}return!0}function Og(o){if(!lt(o)||YA(o))return!1;var s=Xr(o)?hI:nb;return s.test(ni(o))}function fA(o){return dt(o)&&on(o)==z}function mA(o){return dt(o)&&Yt(o)==re}function gA(o){return dt(o)&&Sc(o.length)&&!!nt[on(o)]}function Pg(o){return typeof o=="function"?o:o==null?mn:typeof o=="object"?Ce(o)?Lg(o[0],o[1]):Dg(o):e_(o)}function Yu(o){if(!ja(o))return vI(o);var s=[];for(var u in Ye(o))He.call(o,u)&&u!="constructor"&&s.push(u);return s}function pA(o){if(!lt(o))return XA(o);var s=ja(o),u=[];for(var f in o)f=="constructor"&&(s||!He.call(o,f))||u.push(f);return u}function ju(o,s){return o<s}function Mg(o,s){var u=-1,f=hn(o)?U(o.length):[];return To(o,function(_,E,b){f[++u]=s(_,E,b)}),f}function Dg(o){var s=ud(o);return s.length==1&&s[0][2]?mp(s[0][0],s[0][1]):function(u){return u===o||qu(u,o,s)}}function Lg(o,s){return hd(o)&&fp(s)?mp(Nr(o),s):function(u){var f=wd(u,o);return f===t&&f===s?Td(u,o):Ga(s,f,C|T)}}function dc(o,s,u,f,_){o!==s&&Ku(s,function(E,b){if(_||(_=new cr),lt(E))_A(o,s,b,u,dc,f,_);else{var A=f?f(md(o,b),E,b+"",o,s,_):t;A===t&&(A=E),Hu(o,b,A)}},fn)}function _A(o,s,u,f,_,E,b){var A=md(o,u),M=md(s,u),K=b.get(M);if(K){Hu(o,u,K);return}var W=E?E(A,M,u+"",o,s,b):t,q=W===t;if(q){var ee=Ce(M),ae=!ee&&So(M),de=!ee&&!ae&&Bi(M);W=M,ee||ae||de?Ce(A)?W=A:gt(A)?W=dn(A):ae?(q=!1,W=qg(M,!0)):de?(q=!1,W=Yg(M,!0)):W=[]:Qa(M)||ri(M)?(W=A,ri(A)?W=Wp(A):(!lt(A)||Xr(A))&&(W=hp(M))):q=!1}q&&(b.set(M,W),_(W,M,f,E,b),b.delete(M)),Hu(o,u,W)}function xg(o,s){var u=o.length;if(u)return s+=s<0?u:0,Qr(s,u)?o[s]:t}function Ug(o,s,u){s.length?s=at(s,function(E){return Ce(E)?function(b){return ei(b,E.length===1?E[0]:E)}:E}):s=[mn];var f=-1;s=at(s,Tn(ue()));var _=Mg(o,function(E,b,A){var M=at(s,function(K){return K(E)});return{criteria:M,index:++f,value:E}});return Wb(_,function(E,b){return RA(E,b,u)})}function vA(o,s){return Fg(o,s,function(u,f){return Td(o,f)})}function Fg(o,s,u){for(var f=-1,_=s.length,E={};++f<_;){var b=s[f],A=ei(o,b);u(A,b)&&qa(E,Io(b,o),A)}return E}function yA(o){return function(s){return ei(s,o)}}function Ju(o,s,u,f){var _=f?Kb:ki,E=-1,b=s.length,A=o;for(o===s&&(s=dn(s)),u&&(A=at(o,Tn(u)));++E<b;)for(var M=0,K=s[E],W=u?u(K):K;(M=_(A,W,M,f))>-1;)A!==o&&tc.call(A,M,1),tc.call(o,M,1);return o}function Bg(o,s){for(var u=o?s.length:0,f=u-1;u--;){var _=s[u];if(u==f||_!==E){var E=_;Qr(_)?tc.call(o,_,1):ed(o,_)}}return o}function Qu(o,s){return o+oc(yg()*(s-o+1))}function CA(o,s,u,f){for(var _=-1,E=St(rc((s-o)/(u||1)),0),b=U(E);E--;)b[f?E:++_]=o,o+=u;return b}function Xu(o,s){var u="";if(!o||s<1||s>it)return u;do s%2&&(u+=o),s=oc(s/2),s&&(o+=o);while(s);return u}function Ie(o,s){return gd(gp(o,s,mn),o+"")}function EA(o){return wg(Vi(o))}function wA(o,s){var u=Vi(o);return Ec(u,Zo(s,0,u.length))}function qa(o,s,u,f){if(!lt(o))return o;s=Io(s,o);for(var _=-1,E=s.length,b=E-1,A=o;A!=null&&++_<E;){var M=Nr(s[_]),K=u;if(M==="__proto__"||M==="constructor"||M==="prototype")return o;if(_!=b){var W=A[M];K=f?f(W,M,A):t,K===t&&(K=lt(W)?W:Qr(s[_+1])?[]:{})}Ka(A,M,K),A=A[M]}return o}var Vg=ic?function(o,s){return ic.set(o,s),o}:mn,TA=nc?function(o,s){return nc(o,"toString",{configurable:!0,enumerable:!1,value:Id(s),writable:!0})}:mn;function bA(o){return Ec(Vi(o))}function Wn(o,s,u){var f=-1,_=o.length;s<0&&(s=-s>_?0:_+s),u=u>_?_:u,u<0&&(u+=_),_=s>u?0:u-s>>>0,s>>>=0;for(var E=U(_);++f<_;)E[f]=o[f+s];return E}function IA(o,s){var u;return To(o,function(f,_,E){return u=s(f,_,E),!u}),!!u}function hc(o,s,u){var f=0,_=o==null?f:o.length;if(typeof s=="number"&&s===s&&_<=Pa){for(;f<_;){var E=f+_>>>1,b=o[E];b!==null&&!In(b)&&(u?b<=s:b<s)?f=E+1:_=E}return _}return Zu(o,s,mn,u)}function Zu(o,s,u,f){var _=0,E=o==null?0:o.length;if(E===0)return 0;s=u(s);for(var b=s!==s,A=s===null,M=In(s),K=s===t;_<E;){var W=oc((_+E)/2),q=u(o[W]),ee=q!==t,ae=q===null,de=q===q,be=In(q);if(b)var he=f||de;else K?he=de&&(f||ee):A?he=de&&ee&&(f||!ae):M?he=de&&ee&&!ae&&(f||!be):ae||be?he=!1:he=f?q<=s:q<s;he?_=W+1:E=W}return qt(E,Go)}function Hg(o,s){for(var u=-1,f=o.length,_=0,E=[];++u<f;){var b=o[u],A=s?s(b):b;if(!u||!lr(A,M)){var M=A;E[_++]=b===0?0:b}}return E}function $g(o){return typeof o=="number"?o:In(o)?rn:+o}function bn(o){if(typeof o=="string")return o;if(Ce(o))return at(o,bn)+"";if(In(o))return Cg?Cg.call(o):"";var s=o+"";return s=="0"&&1/o==-Pt?"-0":s}function bo(o,s,u){var f=-1,_=zs,E=o.length,b=!0,A=[],M=A;if(u)b=!1,_=ku;else if(E>=i){var K=s?null:xA(o);if(K)return qs(K);b=!1,_=Ua,M=new Xo}else M=s?[]:A;e:for(;++f<E;){var W=o[f],q=s?s(W):W;if(W=u||W!==0?W:0,b&&q===q){for(var ee=M.length;ee--;)if(M[ee]===q)continue e;s&&M.push(q),A.push(W)}else _(M,q,u)||(M!==A&&M.push(q),A.push(W))}return A}function ed(o,s){return s=Io(s,o),o=pp(o,s),o==null||delete o[Nr(zn(s))]}function Kg(o,s,u,f){return qa(o,s,u(ei(o,s)),f)}function fc(o,s,u,f){for(var _=o.length,E=f?_:-1;(f?E--:++E<_)&&s(o[E],E,o););return u?Wn(o,f?0:E,f?E+1:_):Wn(o,f?E+1:0,f?_:E)}function Wg(o,s){var u=o;return u instanceof Re&&(u=u.value()),Nu(s,function(f,_){return _.func.apply(_.thisArg,Co([f],_.args))},u)}function td(o,s,u){var f=o.length;if(f<2)return f?bo(o[0]):[];for(var _=-1,E=U(f);++_<f;)for(var b=o[_],A=-1;++A<f;)A!=_&&(E[_]=Wa(E[_]||b,o[A],s,u));return bo(Vt(E,1),s,u)}function zg(o,s,u){for(var f=-1,_=o.length,E=s.length,b={};++f<_;){var A=f<E?s[f]:t;u(b,o[f],A)}return b}function nd(o){return gt(o)?o:[]}function rd(o){return typeof o=="function"?o:mn}function Io(o,s){return Ce(o)?o:hd(o,s)?[o]:Cp(Ve(o))}var AA=Ie;function Ao(o,s,u){var f=o.length;return u=u===t?f:u,!s&&u>=f?o:Wn(o,s,u)}var Gg=fI||function(o){return Bt.clearTimeout(o)};function qg(o,s){if(s)return o.slice();var u=o.length,f=mg?mg(u):new o.constructor(u);return o.copy(f),f}function od(o){var s=new o.constructor(o.byteLength);return new Zs(s).set(new Zs(o)),s}function SA(o,s){var u=s?od(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.byteLength)}function kA(o){var s=new o.constructor(o.source,Rm.exec(o));return s.lastIndex=o.lastIndex,s}function NA(o){return $a?Ye($a.call(o)):{}}function Yg(o,s){var u=s?od(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.length)}function jg(o,s){if(o!==s){var u=o!==t,f=o===null,_=o===o,E=In(o),b=s!==t,A=s===null,M=s===s,K=In(s);if(!A&&!K&&!E&&o>s||E&&b&&M&&!A&&!K||f&&b&&M||!u&&M||!_)return 1;if(!f&&!E&&!K&&o<s||K&&u&&_&&!f&&!E||A&&u&&_||!b&&_||!M)return-1}return 0}function RA(o,s,u){for(var f=-1,_=o.criteria,E=s.criteria,b=_.length,A=u.length;++f<b;){var M=jg(_[f],E[f]);if(M){if(f>=A)return M;var K=u[f];return M*(K=="desc"?-1:1)}}return o.index-s.index}function Jg(o,s,u,f){for(var _=-1,E=o.length,b=u.length,A=-1,M=s.length,K=St(E-b,0),W=U(M+K),q=!f;++A<M;)W[A]=s[A];for(;++_<b;)(q||_<E)&&(W[u[_]]=o[_]);for(;K--;)W[A++]=o[_++];return W}function Qg(o,s,u,f){for(var _=-1,E=o.length,b=-1,A=u.length,M=-1,K=s.length,W=St(E-A,0),q=U(W+K),ee=!f;++_<W;)q[_]=o[_];for(var ae=_;++M<K;)q[ae+M]=s[M];for(;++b<A;)(ee||_<E)&&(q[ae+u[b]]=o[_++]);return q}function dn(o,s){var u=-1,f=o.length;for(s||(s=U(f));++u<f;)s[u]=o[u];return s}function kr(o,s,u,f){var _=!u;u||(u={});for(var E=-1,b=s.length;++E<b;){var A=s[E],M=f?f(u[A],o[A],A,u,o):t;M===t&&(M=o[A]),_?Yr(u,A,M):Ka(u,A,M)}return u}function OA(o,s){return kr(o,dd(o),s)}function PA(o,s){return kr(o,up(o),s)}function mc(o,s){return function(u,f){var _=Ce(u)?Ub:eA,E=s?s():{};return _(u,o,ue(f,2),E)}}function xi(o){return Ie(function(s,u){var f=-1,_=u.length,E=_>1?u[_-1]:t,b=_>2?u[2]:t;for(E=o.length>3&&typeof E=="function"?(_--,E):t,b&&an(u[0],u[1],b)&&(E=_<3?t:E,_=1),s=Ye(s);++f<_;){var A=u[f];A&&o(s,A,f,E)}return s})}function Xg(o,s){return function(u,f){if(u==null)return u;if(!hn(u))return o(u,f);for(var _=u.length,E=s?_:-1,b=Ye(u);(s?E--:++E<_)&&f(b[E],E,b)!==!1;);return u}}function Zg(o){return function(s,u,f){for(var _=-1,E=Ye(s),b=f(s),A=b.length;A--;){var M=b[o?A:++_];if(u(E[M],M,E)===!1)break}return s}}function MA(o,s,u){var f=s&k,_=Ya(o);function E(){var b=this&&this!==Bt&&this instanceof E?_:o;return b.apply(f?u:this,arguments)}return E}function ep(o){return function(s){s=Ve(s);var u=Ni(s)?sr(s):t,f=u?u[0]:s.charAt(0),_=u?Ao(u,1).join(""):s.slice(1);return f[o]()+_}}function Ui(o){return function(s){return Nu(Xp(Qp(s).replace(Tb,"")),o,"")}}function Ya(o){return function(){var s=arguments;switch(s.length){case 0:return new o;case 1:return new o(s[0]);case 2:return new o(s[0],s[1]);case 3:return new o(s[0],s[1],s[2]);case 4:return new o(s[0],s[1],s[2],s[3]);case 5:return new o(s[0],s[1],s[2],s[3],s[4]);case 6:return new o(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new o(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var u=Li(o.prototype),f=o.apply(u,s);return lt(f)?f:u}}function DA(o,s,u){var f=Ya(o);function _(){for(var E=arguments.length,b=U(E),A=E,M=Fi(_);A--;)b[A]=arguments[A];var K=E<3&&b[0]!==M&&b[E-1]!==M?[]:Eo(b,M);if(E-=K.length,E<u)return ip(o,s,gc,_.placeholder,t,b,K,t,t,u-E);var W=this&&this!==Bt&&this instanceof _?f:o;return wn(W,this,b)}return _}function tp(o){return function(s,u,f){var _=Ye(s);if(!hn(s)){var E=ue(u,3);s=Mt(s),u=function(A){return E(_[A],A,_)}}var b=o(s,u,f);return b>-1?_[E?s[b]:b]:t}}function np(o){return Jr(function(s){var u=s.length,f=u,_=$n.prototype.thru;for(o&&s.reverse();f--;){var E=s[f];if(typeof E!="function")throw new Hn(c);if(_&&!b&&yc(E)=="wrapper")var b=new $n([],!0)}for(f=b?f:u;++f<u;){E=s[f];var A=yc(E),M=A=="wrapper"?ld(E):t;M&&fd(M[0])&&M[1]==(D|O|$|se)&&!M[4].length&&M[9]==1?b=b[yc(M[0])].apply(b,M[3]):b=E.length==1&&fd(E)?b[A]():b.thru(E)}return function(){var K=arguments,W=K[0];if(b&&K.length==1&&Ce(W))return b.plant(W).value();for(var q=0,ee=u?s[q].apply(this,K):W;++q<u;)ee=s[q].call(this,ee);return ee}})}function gc(o,s,u,f,_,E,b,A,M,K){var W=s&D,q=s&k,ee=s&I,ae=s&(O|L),de=s&ie,be=ee?t:Ya(o);function he(){for(var Ne=arguments.length,Oe=U(Ne),An=Ne;An--;)Oe[An]=arguments[An];if(ae)var sn=Fi(he),Sn=Gb(Oe,sn);if(f&&(Oe=Jg(Oe,f,_,ae)),E&&(Oe=Qg(Oe,E,b,ae)),Ne-=Sn,ae&&Ne<K){var pt=Eo(Oe,sn);return ip(o,s,gc,he.placeholder,u,Oe,pt,A,M,K-Ne)}var ur=q?u:this,eo=ee?ur[o]:o;return Ne=Oe.length,A?Oe=eS(Oe,A):de&&Ne>1&&Oe.reverse(),W&&M<Ne&&(Oe.length=M),this&&this!==Bt&&this instanceof he&&(eo=be||Ya(eo)),eo.apply(ur,Oe)}return he}function rp(o,s){return function(u,f){return cA(u,o,s(f),{})}}function pc(o,s){return function(u,f){var _;if(u===t&&f===t)return s;if(u!==t&&(_=u),f!==t){if(_===t)return f;typeof u=="string"||typeof f=="string"?(u=bn(u),f=bn(f)):(u=$g(u),f=$g(f)),_=o(u,f)}return _}}function id(o){return Jr(function(s){return s=at(s,Tn(ue())),Ie(function(u){var f=this;return o(s,function(_){return wn(_,f,u)})})})}function _c(o,s){s=s===t?" ":bn(s);var u=s.length;if(u<2)return u?Xu(s,o):s;var f=Xu(s,rc(o/Ri(s)));return Ni(s)?Ao(sr(f),0,o).join(""):f.slice(0,o)}function LA(o,s,u,f){var _=s&k,E=Ya(o);function b(){for(var A=-1,M=arguments.length,K=-1,W=f.length,q=U(W+M),ee=this&&this!==Bt&&this instanceof b?E:o;++K<W;)q[K]=f[K];for(;M--;)q[K++]=arguments[++A];return wn(ee,_?u:this,q)}return b}function op(o){return function(s,u,f){return f&&typeof f!="number"&&an(s,u,f)&&(u=f=t),s=Zr(s),u===t?(u=s,s=0):u=Zr(u),f=f===t?s<u?1:-1:Zr(f),CA(s,u,f,o)}}function vc(o){return function(s,u){return typeof s=="string"&&typeof u=="string"||(s=Gn(s),u=Gn(u)),o(s,u)}}function ip(o,s,u,f,_,E,b,A,M,K){var W=s&O,q=W?b:t,ee=W?t:b,ae=W?E:t,de=W?t:E;s|=W?$:G,s&=~(W?G:$),s&N||(s&=~(k|I));var be=[o,s,_,ae,q,de,ee,A,M,K],he=u.apply(t,be);return fd(o)&&_p(he,be),he.placeholder=f,vp(he,o,s)}function ad(o){var s=At[o];return function(u,f){if(u=Gn(u),f=f==null?0:qt(Te(f),292),f&&vg(u)){var _=(Ve(u)+"e").split("e"),E=s(_[0]+"e"+(+_[1]+f));return _=(Ve(E)+"e").split("e"),+(_[0]+"e"+(+_[1]-f))}return s(u)}}var xA=Mi&&1/qs(new Mi([,-0]))[1]==Pt?function(o){return new Mi(o)}:kd;function ap(o){return function(s){var u=Yt(s);return u==Ft?xu(s):u==re?Zb(s):zb(s,o(s))}}function jr(o,s,u,f,_,E,b,A){var M=s&I;if(!M&&typeof o!="function")throw new Hn(c);var K=f?f.length:0;if(K||(s&=~($|G),f=_=t),b=b===t?b:St(Te(b),0),A=A===t?A:Te(A),K-=_?_.length:0,s&G){var W=f,q=_;f=_=t}var ee=M?t:ld(o),ae=[o,s,u,f,_,W,q,E,b,A];if(ee&&QA(ae,ee),o=ae[0],s=ae[1],u=ae[2],f=ae[3],_=ae[4],A=ae[9]=ae[9]===t?M?0:o.length:St(ae[9]-K,0),!A&&s&(O|L)&&(s&=~(O|L)),!s||s==k)var de=MA(o,s,u);else s==O||s==L?de=DA(o,s,A):(s==$||s==(k|$))&&!_.length?de=LA(o,s,u,f):de=gc.apply(t,ae);var be=ee?Vg:_p;return vp(be(de,ae),o,s)}function sp(o,s,u,f){return o===t||lr(o,Pi[u])&&!He.call(f,u)?s:o}function cp(o,s,u,f,_,E){return lt(o)&<(s)&&(E.set(s,o),dc(o,s,t,cp,E),E.delete(s)),o}function UA(o){return Qa(o)?t:o}function lp(o,s,u,f,_,E){var b=u&C,A=o.length,M=s.length;if(A!=M&&!(b&&M>A))return!1;var K=E.get(o),W=E.get(s);if(K&&W)return K==s&&W==o;var q=-1,ee=!0,ae=u&T?new Xo:t;for(E.set(o,s),E.set(s,o);++q<A;){var de=o[q],be=s[q];if(f)var he=b?f(be,de,q,s,o,E):f(de,be,q,o,s,E);if(he!==t){if(he)continue;ee=!1;break}if(ae){if(!Ru(s,function(Ne,Oe){if(!Ua(ae,Oe)&&(de===Ne||_(de,Ne,u,f,E)))return ae.push(Oe)})){ee=!1;break}}else if(!(de===be||_(de,be,u,f,E))){ee=!1;break}}return E.delete(o),E.delete(s),ee}function FA(o,s,u,f,_,E,b){switch(u){case We:if(o.byteLength!=s.byteLength||o.byteOffset!=s.byteOffset)return!1;o=o.buffer,s=s.buffer;case ke:return!(o.byteLength!=s.byteLength||!E(new Zs(o),new Zs(s)));case Ir:case zr:case Cn:return lr(+o,+s);case go:return o.name==s.name&&o.message==s.message;case z:case qe:return o==s+"";case Ft:var A=xu;case re:var M=f&C;if(A||(A=qs),o.size!=s.size&&!M)return!1;var K=b.get(o);if(K)return K==s;f|=T,b.set(o,s);var W=lp(A(o),A(s),f,_,E,b);return b.delete(o),W;case Xe:if($a)return $a.call(o)==$a.call(s)}return!1}function BA(o,s,u,f,_,E){var b=u&C,A=sd(o),M=A.length,K=sd(s),W=K.length;if(M!=W&&!b)return!1;for(var q=M;q--;){var ee=A[q];if(!(b?ee in s:He.call(s,ee)))return!1}var ae=E.get(o),de=E.get(s);if(ae&&de)return ae==s&&de==o;var be=!0;E.set(o,s),E.set(s,o);for(var he=b;++q<M;){ee=A[q];var Ne=o[ee],Oe=s[ee];if(f)var An=b?f(Oe,Ne,ee,s,o,E):f(Ne,Oe,ee,o,s,E);if(!(An===t?Ne===Oe||_(Ne,Oe,u,f,E):An)){be=!1;break}he||(he=ee=="constructor")}if(be&&!he){var sn=o.constructor,Sn=s.constructor;sn!=Sn&&"constructor"in o&&"constructor"in s&&!(typeof sn=="function"&&sn instanceof sn&&typeof Sn=="function"&&Sn instanceof Sn)&&(be=!1)}return E.delete(o),E.delete(s),be}function Jr(o){return gd(gp(o,t,bp),o+"")}function sd(o){return Ng(o,Mt,dd)}function cd(o){return Ng(o,fn,up)}var ld=ic?function(o){return ic.get(o)}:kd;function yc(o){for(var s=o.name+"",u=Di[s],f=He.call(Di,s)?u.length:0;f--;){var _=u[f],E=_.func;if(E==null||E==o)return _.name}return s}function Fi(o){var s=He.call(y,"placeholder")?y:o;return s.placeholder}function ue(){var o=y.iteratee||Ad;return o=o===Ad?Pg:o,arguments.length?o(arguments[0],arguments[1]):o}function Cc(o,s){var u=o.__data__;return qA(s)?u[typeof s=="string"?"string":"hash"]:u.map}function ud(o){for(var s=Mt(o),u=s.length;u--;){var f=s[u],_=o[f];s[u]=[f,_,fp(_)]}return s}function ti(o,s){var u=Jb(o,s);return Og(u)?u:t}function VA(o){var s=He.call(o,Jo),u=o[Jo];try{o[Jo]=t;var f=!0}catch{}var _=Qs.call(o);return f&&(s?o[Jo]=u:delete o[Jo]),_}var dd=Fu?function(o){return o==null?[]:(o=Ye(o),yo(Fu(o),function(s){return pg.call(o,s)}))}:Nd,up=Fu?function(o){for(var s=[];o;)Co(s,dd(o)),o=ec(o);return s}:Nd,Yt=on;(Bu&&Yt(new Bu(new ArrayBuffer(1)))!=We||Ba&&Yt(new Ba)!=Ft||Vu&&Yt(Vu.resolve())!=S||Mi&&Yt(new Mi)!=re||Va&&Yt(new Va)!=V)&&(Yt=function(o){var s=on(o),u=s==En?o.constructor:t,f=u?ni(u):"";if(f)switch(f){case wI:return We;case TI:return Ft;case bI:return S;case II:return re;case AI:return V}return s});function HA(o,s,u){for(var f=-1,_=u.length;++f<_;){var E=u[f],b=E.size;switch(E.type){case"drop":o+=b;break;case"dropRight":s-=b;break;case"take":s=qt(s,o+b);break;case"takeRight":o=St(o,s-b);break}}return{start:o,end:s}}function $A(o){var s=o.match(YT);return s?s[1].split(jT):[]}function dp(o,s,u){s=Io(s,o);for(var f=-1,_=s.length,E=!1;++f<_;){var b=Nr(s[f]);if(!(E=o!=null&&u(o,b)))break;o=o[b]}return E||++f!=_?E:(_=o==null?0:o.length,!!_&&Sc(_)&&Qr(b,_)&&(Ce(o)||ri(o)))}function KA(o){var s=o.length,u=new o.constructor(s);return s&&typeof o[0]=="string"&&He.call(o,"index")&&(u.index=o.index,u.input=o.input),u}function hp(o){return typeof o.constructor=="function"&&!ja(o)?Li(ec(o)):{}}function WA(o,s,u){var f=o.constructor;switch(s){case ke:return od(o);case Ir:case zr:return new f(+o);case We:return SA(o,u);case ir:case vo:case Ar:case ar:case xa:case Ai:case pu:case _u:case vu:return Yg(o,u);case Ft:return new f;case Cn:case qe:return new f(o);case z:return kA(o);case re:return new f;case Xe:return NA(o)}}function zA(o,s){var u=s.length;if(!u)return o;var f=u-1;return s[f]=(u>1?"& ":"")+s[f],s=s.join(u>2?", ":" "),o.replace(qT,`{
|
95
|
+
/* [wrapped with `+s+`] */
|
96
|
+
`)}function GA(o){return Ce(o)||ri(o)||!!(_g&&o&&o[_g])}function Qr(o,s){var u=typeof o;return s=s??it,!!s&&(u=="number"||u!="symbol"&&ob.test(o))&&o>-1&&o%1==0&&o<s}function an(o,s,u){if(!lt(u))return!1;var f=typeof s;return(f=="number"?hn(u)&&Qr(s,u.length):f=="string"&&s in u)?lr(u[s],o):!1}function hd(o,s){if(Ce(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||In(o)?!0:KT.test(o)||!$T.test(o)||s!=null&&o in Ye(s)}function qA(o){var s=typeof o;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?o!=="__proto__":o===null}function fd(o){var s=yc(o),u=y[s];if(typeof u!="function"||!(s in Re.prototype))return!1;if(o===u)return!0;var f=ld(u);return!!f&&o===f[0]}function YA(o){return!!fg&&fg in o}var jA=js?Xr:Rd;function ja(o){var s=o&&o.constructor,u=typeof s=="function"&&s.prototype||Pi;return o===u}function fp(o){return o===o&&!lt(o)}function mp(o,s){return function(u){return u==null?!1:u[o]===s&&(s!==t||o in Ye(u))}}function JA(o){var s=Ic(o,function(f){return u.size===m&&u.clear(),f}),u=s.cache;return s}function QA(o,s){var u=o[1],f=s[1],_=u|f,E=_<(k|I|D),b=f==D&&u==O||f==D&&u==se&&o[7].length<=s[8]||f==(D|se)&&s[7].length<=s[8]&&u==O;if(!(E||b))return o;f&k&&(o[2]=s[2],_|=u&k?0:N);var A=s[3];if(A){var M=o[3];o[3]=M?Jg(M,A,s[4]):A,o[4]=M?Eo(o[3],g):s[4]}return A=s[5],A&&(M=o[5],o[5]=M?Qg(M,A,s[6]):A,o[6]=M?Eo(o[5],g):s[6]),A=s[7],A&&(o[7]=A),f&D&&(o[8]=o[8]==null?s[8]:qt(o[8],s[8])),o[9]==null&&(o[9]=s[9]),o[0]=s[0],o[1]=_,o}function XA(o){var s=[];if(o!=null)for(var u in Ye(o))s.push(u);return s}function ZA(o){return Qs.call(o)}function gp(o,s,u){return s=St(s===t?o.length-1:s,0),function(){for(var f=arguments,_=-1,E=St(f.length-s,0),b=U(E);++_<E;)b[_]=f[s+_];_=-1;for(var A=U(s+1);++_<s;)A[_]=f[_];return A[s]=u(b),wn(o,this,A)}}function pp(o,s){return s.length<2?o:ei(o,Wn(s,0,-1))}function eS(o,s){for(var u=o.length,f=qt(s.length,u),_=dn(o);f--;){var E=s[f];o[f]=Qr(E,u)?_[E]:t}return o}function md(o,s){if(!(s==="constructor"&&typeof o[s]=="function")&&s!="__proto__")return o[s]}var _p=yp(Vg),Ja=gI||function(o,s){return Bt.setTimeout(o,s)},gd=yp(TA);function vp(o,s,u){var f=s+"";return gd(o,zA(f,tS($A(f),u)))}function yp(o){var s=0,u=0;return function(){var f=yI(),_=Ue-(f-u);if(u=f,_>0){if(++s>=le)return arguments[0]}else s=0;return o.apply(t,arguments)}}function Ec(o,s){var u=-1,f=o.length,_=f-1;for(s=s===t?f:s;++u<s;){var E=Qu(u,_),b=o[E];o[E]=o[u],o[u]=b}return o.length=s,o}var Cp=JA(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(WT,function(u,f,_,E){s.push(_?E.replace(XT,"$1"):f||u)}),s});function Nr(o){if(typeof o=="string"||In(o))return o;var s=o+"";return s=="0"&&1/o==-Pt?"-0":s}function ni(o){if(o!=null){try{return Js.call(o)}catch{}try{return o+""}catch{}}return""}function tS(o,s){return Vn(Ma,function(u){var f="_."+u[0];s&u[1]&&!zs(o,f)&&o.push(f)}),o.sort()}function Ep(o){if(o instanceof Re)return o.clone();var s=new $n(o.__wrapped__,o.__chain__);return s.__actions__=dn(o.__actions__),s.__index__=o.__index__,s.__values__=o.__values__,s}function nS(o,s,u){(u?an(o,s,u):s===t)?s=1:s=St(Te(s),0);var f=o==null?0:o.length;if(!f||s<1)return[];for(var _=0,E=0,b=U(rc(f/s));_<f;)b[E++]=Wn(o,_,_+=s);return b}function rS(o){for(var s=-1,u=o==null?0:o.length,f=0,_=[];++s<u;){var E=o[s];E&&(_[f++]=E)}return _}function oS(){var o=arguments.length;if(!o)return[];for(var s=U(o-1),u=arguments[0],f=o;f--;)s[f-1]=arguments[f];return Co(Ce(u)?dn(u):[u],Vt(s,1))}var iS=Ie(function(o,s){return gt(o)?Wa(o,Vt(s,1,gt,!0)):[]}),aS=Ie(function(o,s){var u=zn(s);return gt(u)&&(u=t),gt(o)?Wa(o,Vt(s,1,gt,!0),ue(u,2)):[]}),sS=Ie(function(o,s){var u=zn(s);return gt(u)&&(u=t),gt(o)?Wa(o,Vt(s,1,gt,!0),t,u):[]});function cS(o,s,u){var f=o==null?0:o.length;return f?(s=u||s===t?1:Te(s),Wn(o,s<0?0:s,f)):[]}function lS(o,s,u){var f=o==null?0:o.length;return f?(s=u||s===t?1:Te(s),s=f-s,Wn(o,0,s<0?0:s)):[]}function uS(o,s){return o&&o.length?fc(o,ue(s,3),!0,!0):[]}function dS(o,s){return o&&o.length?fc(o,ue(s,3),!0):[]}function hS(o,s,u,f){var _=o==null?0:o.length;return _?(u&&typeof u!="number"&&an(o,s,u)&&(u=0,f=_),oA(o,s,u,f)):[]}function wp(o,s,u){var f=o==null?0:o.length;if(!f)return-1;var _=u==null?0:Te(u);return _<0&&(_=St(f+_,0)),Gs(o,ue(s,3),_)}function Tp(o,s,u){var f=o==null?0:o.length;if(!f)return-1;var _=f-1;return u!==t&&(_=Te(u),_=u<0?St(f+_,0):qt(_,f-1)),Gs(o,ue(s,3),_,!0)}function bp(o){var s=o==null?0:o.length;return s?Vt(o,1):[]}function fS(o){var s=o==null?0:o.length;return s?Vt(o,Pt):[]}function mS(o,s){var u=o==null?0:o.length;return u?(s=s===t?1:Te(s),Vt(o,s)):[]}function gS(o){for(var s=-1,u=o==null?0:o.length,f={};++s<u;){var _=o[s];f[_[0]]=_[1]}return f}function Ip(o){return o&&o.length?o[0]:t}function pS(o,s,u){var f=o==null?0:o.length;if(!f)return-1;var _=u==null?0:Te(u);return _<0&&(_=St(f+_,0)),ki(o,s,_)}function _S(o){var s=o==null?0:o.length;return s?Wn(o,0,-1):[]}var vS=Ie(function(o){var s=at(o,nd);return s.length&&s[0]===o[0]?Gu(s):[]}),yS=Ie(function(o){var s=zn(o),u=at(o,nd);return s===zn(u)?s=t:u.pop(),u.length&&u[0]===o[0]?Gu(u,ue(s,2)):[]}),CS=Ie(function(o){var s=zn(o),u=at(o,nd);return s=typeof s=="function"?s:t,s&&u.pop(),u.length&&u[0]===o[0]?Gu(u,t,s):[]});function ES(o,s){return o==null?"":_I.call(o,s)}function zn(o){var s=o==null?0:o.length;return s?o[s-1]:t}function wS(o,s,u){var f=o==null?0:o.length;if(!f)return-1;var _=f;return u!==t&&(_=Te(u),_=_<0?St(f+_,0):qt(_,f-1)),s===s?tI(o,s,_):Gs(o,ig,_,!0)}function TS(o,s){return o&&o.length?xg(o,Te(s)):t}var bS=Ie(Ap);function Ap(o,s){return o&&o.length&&s&&s.length?Ju(o,s):o}function IS(o,s,u){return o&&o.length&&s&&s.length?Ju(o,s,ue(u,2)):o}function AS(o,s,u){return o&&o.length&&s&&s.length?Ju(o,s,t,u):o}var SS=Jr(function(o,s){var u=o==null?0:o.length,f=$u(o,s);return Bg(o,at(s,function(_){return Qr(_,u)?+_:_}).sort(jg)),f});function kS(o,s){var u=[];if(!(o&&o.length))return u;var f=-1,_=[],E=o.length;for(s=ue(s,3);++f<E;){var b=o[f];s(b,f,o)&&(u.push(b),_.push(f))}return Bg(o,_),u}function pd(o){return o==null?o:EI.call(o)}function NS(o,s,u){var f=o==null?0:o.length;return f?(u&&typeof u!="number"&&an(o,s,u)?(s=0,u=f):(s=s==null?0:Te(s),u=u===t?f:Te(u)),Wn(o,s,u)):[]}function RS(o,s){return hc(o,s)}function OS(o,s,u){return Zu(o,s,ue(u,2))}function PS(o,s){var u=o==null?0:o.length;if(u){var f=hc(o,s);if(f<u&&lr(o[f],s))return f}return-1}function MS(o,s){return hc(o,s,!0)}function DS(o,s,u){return Zu(o,s,ue(u,2),!0)}function LS(o,s){var u=o==null?0:o.length;if(u){var f=hc(o,s,!0)-1;if(lr(o[f],s))return f}return-1}function xS(o){return o&&o.length?Hg(o):[]}function US(o,s){return o&&o.length?Hg(o,ue(s,2)):[]}function FS(o){var s=o==null?0:o.length;return s?Wn(o,1,s):[]}function BS(o,s,u){return o&&o.length?(s=u||s===t?1:Te(s),Wn(o,0,s<0?0:s)):[]}function VS(o,s,u){var f=o==null?0:o.length;return f?(s=u||s===t?1:Te(s),s=f-s,Wn(o,s<0?0:s,f)):[]}function HS(o,s){return o&&o.length?fc(o,ue(s,3),!1,!0):[]}function $S(o,s){return o&&o.length?fc(o,ue(s,3)):[]}var KS=Ie(function(o){return bo(Vt(o,1,gt,!0))}),WS=Ie(function(o){var s=zn(o);return gt(s)&&(s=t),bo(Vt(o,1,gt,!0),ue(s,2))}),zS=Ie(function(o){var s=zn(o);return s=typeof s=="function"?s:t,bo(Vt(o,1,gt,!0),t,s)});function GS(o){return o&&o.length?bo(o):[]}function qS(o,s){return o&&o.length?bo(o,ue(s,2)):[]}function YS(o,s){return s=typeof s=="function"?s:t,o&&o.length?bo(o,t,s):[]}function _d(o){if(!(o&&o.length))return[];var s=0;return o=yo(o,function(u){if(gt(u))return s=St(u.length,s),!0}),Du(s,function(u){return at(o,Ou(u))})}function Sp(o,s){if(!(o&&o.length))return[];var u=_d(o);return s==null?u:at(u,function(f){return wn(s,t,f)})}var jS=Ie(function(o,s){return gt(o)?Wa(o,s):[]}),JS=Ie(function(o){return td(yo(o,gt))}),QS=Ie(function(o){var s=zn(o);return gt(s)&&(s=t),td(yo(o,gt),ue(s,2))}),XS=Ie(function(o){var s=zn(o);return s=typeof s=="function"?s:t,td(yo(o,gt),t,s)}),ZS=Ie(_d);function ek(o,s){return zg(o||[],s||[],Ka)}function tk(o,s){return zg(o||[],s||[],qa)}var nk=Ie(function(o){var s=o.length,u=s>1?o[s-1]:t;return u=typeof u=="function"?(o.pop(),u):t,Sp(o,u)});function kp(o){var s=y(o);return s.__chain__=!0,s}function rk(o,s){return s(o),o}function wc(o,s){return s(o)}var ok=Jr(function(o){var s=o.length,u=s?o[0]:0,f=this.__wrapped__,_=function(E){return $u(E,o)};return s>1||this.__actions__.length||!(f instanceof Re)||!Qr(u)?this.thru(_):(f=f.slice(u,+u+(s?1:0)),f.__actions__.push({func:wc,args:[_],thisArg:t}),new $n(f,this.__chain__).thru(function(E){return s&&!E.length&&E.push(t),E}))});function ik(){return kp(this)}function ak(){return new $n(this.value(),this.__chain__)}function sk(){this.__values__===t&&(this.__values__=$p(this.value()));var o=this.__index__>=this.__values__.length,s=o?t:this.__values__[this.__index__++];return{done:o,value:s}}function ck(){return this}function lk(o){for(var s,u=this;u instanceof sc;){var f=Ep(u);f.__index__=0,f.__values__=t,s?_.__wrapped__=f:s=f;var _=f;u=u.__wrapped__}return _.__wrapped__=o,s}function uk(){var o=this.__wrapped__;if(o instanceof Re){var s=o;return this.__actions__.length&&(s=new Re(this)),s=s.reverse(),s.__actions__.push({func:wc,args:[pd],thisArg:t}),new $n(s,this.__chain__)}return this.thru(pd)}function dk(){return Wg(this.__wrapped__,this.__actions__)}var hk=mc(function(o,s,u){He.call(o,u)?++o[u]:Yr(o,u,1)});function fk(o,s,u){var f=Ce(o)?rg:rA;return u&&an(o,s,u)&&(s=t),f(o,ue(s,3))}function mk(o,s){var u=Ce(o)?yo:Sg;return u(o,ue(s,3))}var gk=tp(wp),pk=tp(Tp);function _k(o,s){return Vt(Tc(o,s),1)}function vk(o,s){return Vt(Tc(o,s),Pt)}function yk(o,s,u){return u=u===t?1:Te(u),Vt(Tc(o,s),u)}function Np(o,s){var u=Ce(o)?Vn:To;return u(o,ue(s,3))}function Rp(o,s){var u=Ce(o)?Fb:Ag;return u(o,ue(s,3))}var Ck=mc(function(o,s,u){He.call(o,u)?o[u].push(s):Yr(o,u,[s])});function Ek(o,s,u,f){o=hn(o)?o:Vi(o),u=u&&!f?Te(u):0;var _=o.length;return u<0&&(u=St(_+u,0)),kc(o)?u<=_&&o.indexOf(s,u)>-1:!!_&&ki(o,s,u)>-1}var wk=Ie(function(o,s,u){var f=-1,_=typeof s=="function",E=hn(o)?U(o.length):[];return To(o,function(b){E[++f]=_?wn(s,b,u):za(b,s,u)}),E}),Tk=mc(function(o,s,u){Yr(o,u,s)});function Tc(o,s){var u=Ce(o)?at:Mg;return u(o,ue(s,3))}function bk(o,s,u,f){return o==null?[]:(Ce(s)||(s=s==null?[]:[s]),u=f?t:u,Ce(u)||(u=u==null?[]:[u]),Ug(o,s,u))}var Ik=mc(function(o,s,u){o[u?0:1].push(s)},function(){return[[],[]]});function Ak(o,s,u){var f=Ce(o)?Nu:sg,_=arguments.length<3;return f(o,ue(s,4),u,_,To)}function Sk(o,s,u){var f=Ce(o)?Bb:sg,_=arguments.length<3;return f(o,ue(s,4),u,_,Ag)}function kk(o,s){var u=Ce(o)?yo:Sg;return u(o,Ac(ue(s,3)))}function Nk(o){var s=Ce(o)?wg:EA;return s(o)}function Rk(o,s,u){(u?an(o,s,u):s===t)?s=1:s=Te(s);var f=Ce(o)?XI:wA;return f(o,s)}function Ok(o){var s=Ce(o)?ZI:bA;return s(o)}function Pk(o){if(o==null)return 0;if(hn(o))return kc(o)?Ri(o):o.length;var s=Yt(o);return s==Ft||s==re?o.size:Yu(o).length}function Mk(o,s,u){var f=Ce(o)?Ru:IA;return u&&an(o,s,u)&&(s=t),f(o,ue(s,3))}var Dk=Ie(function(o,s){if(o==null)return[];var u=s.length;return u>1&&an(o,s[0],s[1])?s=[]:u>2&&an(s[0],s[1],s[2])&&(s=[s[0]]),Ug(o,Vt(s,1),[])}),bc=mI||function(){return Bt.Date.now()};function Lk(o,s){if(typeof s!="function")throw new Hn(c);return o=Te(o),function(){if(--o<1)return s.apply(this,arguments)}}function Op(o,s,u){return s=u?t:s,s=o&&s==null?o.length:s,jr(o,D,t,t,t,t,s)}function Pp(o,s){var u;if(typeof s!="function")throw new Hn(c);return o=Te(o),function(){return--o>0&&(u=s.apply(this,arguments)),o<=1&&(s=t),u}}var vd=Ie(function(o,s,u){var f=k;if(u.length){var _=Eo(u,Fi(vd));f|=$}return jr(o,f,s,u,_)}),Mp=Ie(function(o,s,u){var f=k|I;if(u.length){var _=Eo(u,Fi(Mp));f|=$}return jr(s,f,o,u,_)});function Dp(o,s,u){s=u?t:s;var f=jr(o,O,t,t,t,t,t,s);return f.placeholder=Dp.placeholder,f}function Lp(o,s,u){s=u?t:s;var f=jr(o,L,t,t,t,t,t,s);return f.placeholder=Lp.placeholder,f}function xp(o,s,u){var f,_,E,b,A,M,K=0,W=!1,q=!1,ee=!0;if(typeof o!="function")throw new Hn(c);s=Gn(s)||0,lt(u)&&(W=!!u.leading,q="maxWait"in u,E=q?St(Gn(u.maxWait)||0,s):E,ee="trailing"in u?!!u.trailing:ee);function ae(pt){var ur=f,eo=_;return f=_=t,K=pt,b=o.apply(eo,ur),b}function de(pt){return K=pt,A=Ja(Ne,s),W?ae(pt):b}function be(pt){var ur=pt-M,eo=pt-K,t_=s-ur;return q?qt(t_,E-eo):t_}function he(pt){var ur=pt-M,eo=pt-K;return M===t||ur>=s||ur<0||q&&eo>=E}function Ne(){var pt=bc();if(he(pt))return Oe(pt);A=Ja(Ne,be(pt))}function Oe(pt){return A=t,ee&&f?ae(pt):(f=_=t,b)}function An(){A!==t&&Gg(A),K=0,f=M=_=A=t}function sn(){return A===t?b:Oe(bc())}function Sn(){var pt=bc(),ur=he(pt);if(f=arguments,_=this,M=pt,ur){if(A===t)return de(M);if(q)return Gg(A),A=Ja(Ne,s),ae(M)}return A===t&&(A=Ja(Ne,s)),b}return Sn.cancel=An,Sn.flush=sn,Sn}var xk=Ie(function(o,s){return Ig(o,1,s)}),Uk=Ie(function(o,s,u){return Ig(o,Gn(s)||0,u)});function Fk(o){return jr(o,ie)}function Ic(o,s){if(typeof o!="function"||s!=null&&typeof s!="function")throw new Hn(c);var u=function(){var f=arguments,_=s?s.apply(this,f):f[0],E=u.cache;if(E.has(_))return E.get(_);var b=o.apply(this,f);return u.cache=E.set(_,b)||E,b};return u.cache=new(Ic.Cache||qr),u}Ic.Cache=qr;function Ac(o){if(typeof o!="function")throw new Hn(c);return function(){var s=arguments;switch(s.length){case 0:return!o.call(this);case 1:return!o.call(this,s[0]);case 2:return!o.call(this,s[0],s[1]);case 3:return!o.call(this,s[0],s[1],s[2])}return!o.apply(this,s)}}function Bk(o){return Pp(2,o)}var Vk=AA(function(o,s){s=s.length==1&&Ce(s[0])?at(s[0],Tn(ue())):at(Vt(s,1),Tn(ue()));var u=s.length;return Ie(function(f){for(var _=-1,E=qt(f.length,u);++_<E;)f[_]=s[_].call(this,f[_]);return wn(o,this,f)})}),yd=Ie(function(o,s){var u=Eo(s,Fi(yd));return jr(o,$,t,s,u)}),Up=Ie(function(o,s){var u=Eo(s,Fi(Up));return jr(o,G,t,s,u)}),Hk=Jr(function(o,s){return jr(o,se,t,t,t,s)});function $k(o,s){if(typeof o!="function")throw new Hn(c);return s=s===t?s:Te(s),Ie(o,s)}function Kk(o,s){if(typeof o!="function")throw new Hn(c);return s=s==null?0:St(Te(s),0),Ie(function(u){var f=u[s],_=Ao(u,0,s);return f&&Co(_,f),wn(o,this,_)})}function Wk(o,s,u){var f=!0,_=!0;if(typeof o!="function")throw new Hn(c);return lt(u)&&(f="leading"in u?!!u.leading:f,_="trailing"in u?!!u.trailing:_),xp(o,s,{leading:f,maxWait:s,trailing:_})}function zk(o){return Op(o,1)}function Gk(o,s){return yd(rd(s),o)}function qk(){if(!arguments.length)return[];var o=arguments[0];return Ce(o)?o:[o]}function Yk(o){return Kn(o,w)}function jk(o,s){return s=typeof s=="function"?s:t,Kn(o,w,s)}function Jk(o){return Kn(o,v|w)}function Qk(o,s){return s=typeof s=="function"?s:t,Kn(o,v|w,s)}function Xk(o,s){return s==null||bg(o,s,Mt(s))}function lr(o,s){return o===s||o!==o&&s!==s}var Zk=vc(zu),eN=vc(function(o,s){return o>=s}),ri=Rg(function(){return arguments}())?Rg:function(o){return dt(o)&&He.call(o,"callee")&&!pg.call(o,"callee")},Ce=U.isArray,tN=Qm?Tn(Qm):lA;function hn(o){return o!=null&&Sc(o.length)&&!Xr(o)}function gt(o){return dt(o)&&hn(o)}function nN(o){return o===!0||o===!1||dt(o)&&on(o)==Ir}var So=pI||Rd,rN=Xm?Tn(Xm):uA;function oN(o){return dt(o)&&o.nodeType===1&&!Qa(o)}function iN(o){if(o==null)return!0;if(hn(o)&&(Ce(o)||typeof o=="string"||typeof o.splice=="function"||So(o)||Bi(o)||ri(o)))return!o.length;var s=Yt(o);if(s==Ft||s==re)return!o.size;if(ja(o))return!Yu(o).length;for(var u in o)if(He.call(o,u))return!1;return!0}function aN(o,s){return Ga(o,s)}function sN(o,s,u){u=typeof u=="function"?u:t;var f=u?u(o,s):t;return f===t?Ga(o,s,t,u):!!f}function Cd(o){if(!dt(o))return!1;var s=on(o);return s==go||s==La||typeof o.message=="string"&&typeof o.name=="string"&&!Qa(o)}function cN(o){return typeof o=="number"&&vg(o)}function Xr(o){if(!lt(o))return!1;var s=on(o);return s==po||s==_o||s==Da||s==R}function Fp(o){return typeof o=="number"&&o==Te(o)}function Sc(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=it}function lt(o){var s=typeof o;return o!=null&&(s=="object"||s=="function")}function dt(o){return o!=null&&typeof o=="object"}var Bp=Zm?Tn(Zm):hA;function lN(o,s){return o===s||qu(o,s,ud(s))}function uN(o,s,u){return u=typeof u=="function"?u:t,qu(o,s,ud(s),u)}function dN(o){return Vp(o)&&o!=+o}function hN(o){if(jA(o))throw new ye(a);return Og(o)}function fN(o){return o===null}function mN(o){return o==null}function Vp(o){return typeof o=="number"||dt(o)&&on(o)==Cn}function Qa(o){if(!dt(o)||on(o)!=En)return!1;var s=ec(o);if(s===null)return!0;var u=He.call(s,"constructor")&&s.constructor;return typeof u=="function"&&u instanceof u&&Js.call(u)==uI}var Ed=eg?Tn(eg):fA;function gN(o){return Fp(o)&&o>=-it&&o<=it}var Hp=tg?Tn(tg):mA;function kc(o){return typeof o=="string"||!Ce(o)&&dt(o)&&on(o)==qe}function In(o){return typeof o=="symbol"||dt(o)&&on(o)==Xe}var Bi=ng?Tn(ng):gA;function pN(o){return o===t}function _N(o){return dt(o)&&Yt(o)==V}function vN(o){return dt(o)&&on(o)==j}var yN=vc(ju),CN=vc(function(o,s){return o<=s});function $p(o){if(!o)return[];if(hn(o))return kc(o)?sr(o):dn(o);if(Fa&&o[Fa])return Xb(o[Fa]());var s=Yt(o),u=s==Ft?xu:s==re?qs:Vi;return u(o)}function Zr(o){if(!o)return o===0?o:0;if(o=Gn(o),o===Pt||o===-Pt){var s=o<0?-1:1;return s*Ct}return o===o?o:0}function Te(o){var s=Zr(o),u=s%1;return s===s?u?s-u:s:0}function Kp(o){return o?Zo(Te(o),0,It):0}function Gn(o){if(typeof o=="number")return o;if(In(o))return rn;if(lt(o)){var s=typeof o.valueOf=="function"?o.valueOf():o;o=lt(s)?s+"":s}if(typeof o!="string")return o===0?o:+o;o=cg(o);var u=tb.test(o);return u||rb.test(o)?Lb(o.slice(2),u?2:8):eb.test(o)?rn:+o}function Wp(o){return kr(o,fn(o))}function EN(o){return o?Zo(Te(o),-it,it):o===0?o:0}function Ve(o){return o==null?"":bn(o)}var wN=xi(function(o,s){if(ja(s)||hn(s)){kr(s,Mt(s),o);return}for(var u in s)He.call(s,u)&&Ka(o,u,s[u])}),zp=xi(function(o,s){kr(s,fn(s),o)}),Nc=xi(function(o,s,u,f){kr(s,fn(s),o,f)}),TN=xi(function(o,s,u,f){kr(s,Mt(s),o,f)}),bN=Jr($u);function IN(o,s){var u=Li(o);return s==null?u:Tg(u,s)}var AN=Ie(function(o,s){o=Ye(o);var u=-1,f=s.length,_=f>2?s[2]:t;for(_&&an(s[0],s[1],_)&&(f=1);++u<f;)for(var E=s[u],b=fn(E),A=-1,M=b.length;++A<M;){var K=b[A],W=o[K];(W===t||lr(W,Pi[K])&&!He.call(o,K))&&(o[K]=E[K])}return o}),SN=Ie(function(o){return o.push(t,cp),wn(Gp,t,o)});function kN(o,s){return og(o,ue(s,3),Sr)}function NN(o,s){return og(o,ue(s,3),Wu)}function RN(o,s){return o==null?o:Ku(o,ue(s,3),fn)}function ON(o,s){return o==null?o:kg(o,ue(s,3),fn)}function PN(o,s){return o&&Sr(o,ue(s,3))}function MN(o,s){return o&&Wu(o,ue(s,3))}function DN(o){return o==null?[]:uc(o,Mt(o))}function LN(o){return o==null?[]:uc(o,fn(o))}function wd(o,s,u){var f=o==null?t:ei(o,s);return f===t?u:f}function xN(o,s){return o!=null&&dp(o,s,iA)}function Td(o,s){return o!=null&&dp(o,s,aA)}var UN=rp(function(o,s,u){s!=null&&typeof s.toString!="function"&&(s=Qs.call(s)),o[s]=u},Id(mn)),FN=rp(function(o,s,u){s!=null&&typeof s.toString!="function"&&(s=Qs.call(s)),He.call(o,s)?o[s].push(u):o[s]=[u]},ue),BN=Ie(za);function Mt(o){return hn(o)?Eg(o):Yu(o)}function fn(o){return hn(o)?Eg(o,!0):pA(o)}function VN(o,s){var u={};return s=ue(s,3),Sr(o,function(f,_,E){Yr(u,s(f,_,E),f)}),u}function HN(o,s){var u={};return s=ue(s,3),Sr(o,function(f,_,E){Yr(u,_,s(f,_,E))}),u}var $N=xi(function(o,s,u){dc(o,s,u)}),Gp=xi(function(o,s,u,f){dc(o,s,u,f)}),KN=Jr(function(o,s){var u={};if(o==null)return u;var f=!1;s=at(s,function(E){return E=Io(E,o),f||(f=E.length>1),E}),kr(o,cd(o),u),f&&(u=Kn(u,v|p|w,UA));for(var _=s.length;_--;)ed(u,s[_]);return u});function WN(o,s){return qp(o,Ac(ue(s)))}var zN=Jr(function(o,s){return o==null?{}:vA(o,s)});function qp(o,s){if(o==null)return{};var u=at(cd(o),function(f){return[f]});return s=ue(s),Fg(o,u,function(f,_){return s(f,_[0])})}function GN(o,s,u){s=Io(s,o);var f=-1,_=s.length;for(_||(_=1,o=t);++f<_;){var E=o==null?t:o[Nr(s[f])];E===t&&(f=_,E=u),o=Xr(E)?E.call(o):E}return o}function qN(o,s,u){return o==null?o:qa(o,s,u)}function YN(o,s,u,f){return f=typeof f=="function"?f:t,o==null?o:qa(o,s,u,f)}var Yp=ap(Mt),jp=ap(fn);function jN(o,s,u){var f=Ce(o),_=f||So(o)||Bi(o);if(s=ue(s,4),u==null){var E=o&&o.constructor;_?u=f?new E:[]:lt(o)?u=Xr(E)?Li(ec(o)):{}:u={}}return(_?Vn:Sr)(o,function(b,A,M){return s(u,b,A,M)}),u}function JN(o,s){return o==null?!0:ed(o,s)}function QN(o,s,u){return o==null?o:Kg(o,s,rd(u))}function XN(o,s,u,f){return f=typeof f=="function"?f:t,o==null?o:Kg(o,s,rd(u),f)}function Vi(o){return o==null?[]:Lu(o,Mt(o))}function ZN(o){return o==null?[]:Lu(o,fn(o))}function eR(o,s,u){return u===t&&(u=s,s=t),u!==t&&(u=Gn(u),u=u===u?u:0),s!==t&&(s=Gn(s),s=s===s?s:0),Zo(Gn(o),s,u)}function tR(o,s,u){return s=Zr(s),u===t?(u=s,s=0):u=Zr(u),o=Gn(o),sA(o,s,u)}function nR(o,s,u){if(u&&typeof u!="boolean"&&an(o,s,u)&&(s=u=t),u===t&&(typeof s=="boolean"?(u=s,s=t):typeof o=="boolean"&&(u=o,o=t)),o===t&&s===t?(o=0,s=1):(o=Zr(o),s===t?(s=o,o=0):s=Zr(s)),o>s){var f=o;o=s,s=f}if(u||o%1||s%1){var _=yg();return qt(o+_*(s-o+Db("1e-"+((_+"").length-1))),s)}return Qu(o,s)}var rR=Ui(function(o,s,u){return s=s.toLowerCase(),o+(u?Jp(s):s)});function Jp(o){return bd(Ve(o).toLowerCase())}function Qp(o){return o=Ve(o),o&&o.replace(ib,qb).replace(bb,"")}function oR(o,s,u){o=Ve(o),s=bn(s);var f=o.length;u=u===t?f:Zo(Te(u),0,f);var _=u;return u-=s.length,u>=0&&o.slice(u,_)==s}function iR(o){return o=Ve(o),o&&BT.test(o)?o.replace(km,Yb):o}function aR(o){return o=Ve(o),o&&zT.test(o)?o.replace(yu,"\\$&"):o}var sR=Ui(function(o,s,u){return o+(u?"-":"")+s.toLowerCase()}),cR=Ui(function(o,s,u){return o+(u?" ":"")+s.toLowerCase()}),lR=ep("toLowerCase");function uR(o,s,u){o=Ve(o),s=Te(s);var f=s?Ri(o):0;if(!s||f>=s)return o;var _=(s-f)/2;return _c(oc(_),u)+o+_c(rc(_),u)}function dR(o,s,u){o=Ve(o),s=Te(s);var f=s?Ri(o):0;return s&&f<s?o+_c(s-f,u):o}function hR(o,s,u){o=Ve(o),s=Te(s);var f=s?Ri(o):0;return s&&f<s?_c(s-f,u)+o:o}function fR(o,s,u){return u||s==null?s=0:s&&(s=+s),CI(Ve(o).replace(Cu,""),s||0)}function mR(o,s,u){return(u?an(o,s,u):s===t)?s=1:s=Te(s),Xu(Ve(o),s)}function gR(){var o=arguments,s=Ve(o[0]);return o.length<3?s:s.replace(o[1],o[2])}var pR=Ui(function(o,s,u){return o+(u?"_":"")+s.toLowerCase()});function _R(o,s,u){return u&&typeof u!="number"&&an(o,s,u)&&(s=u=t),u=u===t?It:u>>>0,u?(o=Ve(o),o&&(typeof s=="string"||s!=null&&!Ed(s))&&(s=bn(s),!s&&Ni(o))?Ao(sr(o),0,u):o.split(s,u)):[]}var vR=Ui(function(o,s,u){return o+(u?" ":"")+bd(s)});function yR(o,s,u){return o=Ve(o),u=u==null?0:Zo(Te(u),0,o.length),s=bn(s),o.slice(u,u+s.length)==s}function CR(o,s,u){var f=y.templateSettings;u&&an(o,s,u)&&(s=t),o=Ve(o),s=Nc({},s,f,sp);var _=Nc({},s.imports,f.imports,sp),E=Mt(_),b=Lu(_,E),A,M,K=0,W=s.interpolate||$s,q="__p += '",ee=Uu((s.escape||$s).source+"|"+W.source+"|"+(W===Nm?ZT:$s).source+"|"+(s.evaluate||$s).source+"|$","g"),ae="//# sourceURL="+(He.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nb+"]")+`
|
97
|
+
`;o.replace(ee,function(he,Ne,Oe,An,sn,Sn){return Oe||(Oe=An),q+=o.slice(K,Sn).replace(ab,jb),Ne&&(A=!0,q+=`' +
|
98
|
+
__e(`+Ne+`) +
|
99
|
+
'`),sn&&(M=!0,q+=`';
|
100
|
+
`+sn+`;
|
101
|
+
__p += '`),Oe&&(q+=`' +
|
102
|
+
((__t = (`+Oe+`)) == null ? '' : __t) +
|
103
|
+
'`),K=Sn+he.length,he}),q+=`';
|
104
|
+
`;var de=He.call(s,"variable")&&s.variable;if(!de)q=`with (obj) {
|
105
|
+
`+q+`
|
106
|
+
}
|
107
|
+
`;else if(QT.test(de))throw new ye(d);q=(M?q.replace(LT,""):q).replace(xT,"$1").replace(UT,"$1;"),q="function("+(de||"obj")+`) {
|
108
|
+
`+(de?"":`obj || (obj = {});
|
109
|
+
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
|
110
|
+
function print() { __p += __j.call(arguments, '') }
|
111
|
+
`:`;
|
112
|
+
`)+q+`return __p
|
113
|
+
}`;var be=Zp(function(){return Fe(E,ae+"return "+q).apply(t,b)});if(be.source=q,Cd(be))throw be;return be}function ER(o){return Ve(o).toLowerCase()}function wR(o){return Ve(o).toUpperCase()}function TR(o,s,u){if(o=Ve(o),o&&(u||s===t))return cg(o);if(!o||!(s=bn(s)))return o;var f=sr(o),_=sr(s),E=lg(f,_),b=ug(f,_)+1;return Ao(f,E,b).join("")}function bR(o,s,u){if(o=Ve(o),o&&(u||s===t))return o.slice(0,hg(o)+1);if(!o||!(s=bn(s)))return o;var f=sr(o),_=ug(f,sr(s))+1;return Ao(f,0,_).join("")}function IR(o,s,u){if(o=Ve(o),o&&(u||s===t))return o.replace(Cu,"");if(!o||!(s=bn(s)))return o;var f=sr(o),_=lg(f,sr(s));return Ao(f,_).join("")}function AR(o,s){var u=Q,f=Z;if(lt(s)){var _="separator"in s?s.separator:_;u="length"in s?Te(s.length):u,f="omission"in s?bn(s.omission):f}o=Ve(o);var E=o.length;if(Ni(o)){var b=sr(o);E=b.length}if(u>=E)return o;var A=u-Ri(f);if(A<1)return f;var M=b?Ao(b,0,A).join(""):o.slice(0,A);if(_===t)return M+f;if(b&&(A+=M.length-A),Ed(_)){if(o.slice(A).search(_)){var K,W=M;for(_.global||(_=Uu(_.source,Ve(Rm.exec(_))+"g")),_.lastIndex=0;K=_.exec(W);)var q=K.index;M=M.slice(0,q===t?A:q)}}else if(o.indexOf(bn(_),A)!=A){var ee=M.lastIndexOf(_);ee>-1&&(M=M.slice(0,ee))}return M+f}function SR(o){return o=Ve(o),o&&FT.test(o)?o.replace(Sm,nI):o}var kR=Ui(function(o,s,u){return o+(u?" ":"")+s.toUpperCase()}),bd=ep("toUpperCase");function Xp(o,s,u){return o=Ve(o),s=u?t:s,s===t?Qb(o)?iI(o):$b(o):o.match(s)||[]}var Zp=Ie(function(o,s){try{return wn(o,t,s)}catch(u){return Cd(u)?u:new ye(u)}}),NR=Jr(function(o,s){return Vn(s,function(u){u=Nr(u),Yr(o,u,vd(o[u],o))}),o});function RR(o){var s=o==null?0:o.length,u=ue();return o=s?at(o,function(f){if(typeof f[1]!="function")throw new Hn(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var _=-1;++_<s;){var E=o[_];if(wn(E[0],this,f))return wn(E[1],this,f)}})}function OR(o){return nA(Kn(o,v))}function Id(o){return function(){return o}}function PR(o,s){return o==null||o!==o?s:o}var MR=np(),DR=np(!0);function mn(o){return o}function Ad(o){return Pg(typeof o=="function"?o:Kn(o,v))}function LR(o){return Dg(Kn(o,v))}function xR(o,s){return Lg(o,Kn(s,v))}var UR=Ie(function(o,s){return function(u){return za(u,o,s)}}),FR=Ie(function(o,s){return function(u){return za(o,u,s)}});function Sd(o,s,u){var f=Mt(s),_=uc(s,f);u==null&&!(lt(s)&&(_.length||!f.length))&&(u=s,s=o,o=this,_=uc(s,Mt(s)));var E=!(lt(u)&&"chain"in u)||!!u.chain,b=Xr(o);return Vn(_,function(A){var M=s[A];o[A]=M,b&&(o.prototype[A]=function(){var K=this.__chain__;if(E||K){var W=o(this.__wrapped__),q=W.__actions__=dn(this.__actions__);return q.push({func:M,args:arguments,thisArg:o}),W.__chain__=K,W}return M.apply(o,Co([this.value()],arguments))})}),o}function BR(){return Bt._===this&&(Bt._=dI),this}function kd(){}function VR(o){return o=Te(o),Ie(function(s){return xg(s,o)})}var HR=id(at),$R=id(rg),KR=id(Ru);function e_(o){return hd(o)?Ou(Nr(o)):yA(o)}function WR(o){return function(s){return o==null?t:ei(o,s)}}var zR=op(),GR=op(!0);function Nd(){return[]}function Rd(){return!1}function qR(){return{}}function YR(){return""}function jR(){return!0}function JR(o,s){if(o=Te(o),o<1||o>it)return[];var u=It,f=qt(o,It);s=ue(s),o-=It;for(var _=Du(f,s);++u<o;)s(u);return _}function QR(o){return Ce(o)?at(o,Nr):In(o)?[o]:dn(Cp(Ve(o)))}function XR(o){var s=++lI;return Ve(o)+s}var ZR=pc(function(o,s){return o+s},0),eO=ad("ceil"),tO=pc(function(o,s){return o/s},1),nO=ad("floor");function rO(o){return o&&o.length?lc(o,mn,zu):t}function oO(o,s){return o&&o.length?lc(o,ue(s,2),zu):t}function iO(o){return ag(o,mn)}function aO(o,s){return ag(o,ue(s,2))}function sO(o){return o&&o.length?lc(o,mn,ju):t}function cO(o,s){return o&&o.length?lc(o,ue(s,2),ju):t}var lO=pc(function(o,s){return o*s},1),uO=ad("round"),dO=pc(function(o,s){return o-s},0);function hO(o){return o&&o.length?Mu(o,mn):0}function fO(o,s){return o&&o.length?Mu(o,ue(s,2)):0}return y.after=Lk,y.ary=Op,y.assign=wN,y.assignIn=zp,y.assignInWith=Nc,y.assignWith=TN,y.at=bN,y.before=Pp,y.bind=vd,y.bindAll=NR,y.bindKey=Mp,y.castArray=qk,y.chain=kp,y.chunk=nS,y.compact=rS,y.concat=oS,y.cond=RR,y.conforms=OR,y.constant=Id,y.countBy=hk,y.create=IN,y.curry=Dp,y.curryRight=Lp,y.debounce=xp,y.defaults=AN,y.defaultsDeep=SN,y.defer=xk,y.delay=Uk,y.difference=iS,y.differenceBy=aS,y.differenceWith=sS,y.drop=cS,y.dropRight=lS,y.dropRightWhile=uS,y.dropWhile=dS,y.fill=hS,y.filter=mk,y.flatMap=_k,y.flatMapDeep=vk,y.flatMapDepth=yk,y.flatten=bp,y.flattenDeep=fS,y.flattenDepth=mS,y.flip=Fk,y.flow=MR,y.flowRight=DR,y.fromPairs=gS,y.functions=DN,y.functionsIn=LN,y.groupBy=Ck,y.initial=_S,y.intersection=vS,y.intersectionBy=yS,y.intersectionWith=CS,y.invert=UN,y.invertBy=FN,y.invokeMap=wk,y.iteratee=Ad,y.keyBy=Tk,y.keys=Mt,y.keysIn=fn,y.map=Tc,y.mapKeys=VN,y.mapValues=HN,y.matches=LR,y.matchesProperty=xR,y.memoize=Ic,y.merge=$N,y.mergeWith=Gp,y.method=UR,y.methodOf=FR,y.mixin=Sd,y.negate=Ac,y.nthArg=VR,y.omit=KN,y.omitBy=WN,y.once=Bk,y.orderBy=bk,y.over=HR,y.overArgs=Vk,y.overEvery=$R,y.overSome=KR,y.partial=yd,y.partialRight=Up,y.partition=Ik,y.pick=zN,y.pickBy=qp,y.property=e_,y.propertyOf=WR,y.pull=bS,y.pullAll=Ap,y.pullAllBy=IS,y.pullAllWith=AS,y.pullAt=SS,y.range=zR,y.rangeRight=GR,y.rearg=Hk,y.reject=kk,y.remove=kS,y.rest=$k,y.reverse=pd,y.sampleSize=Rk,y.set=qN,y.setWith=YN,y.shuffle=Ok,y.slice=NS,y.sortBy=Dk,y.sortedUniq=xS,y.sortedUniqBy=US,y.split=_R,y.spread=Kk,y.tail=FS,y.take=BS,y.takeRight=VS,y.takeRightWhile=HS,y.takeWhile=$S,y.tap=rk,y.throttle=Wk,y.thru=wc,y.toArray=$p,y.toPairs=Yp,y.toPairsIn=jp,y.toPath=QR,y.toPlainObject=Wp,y.transform=jN,y.unary=zk,y.union=KS,y.unionBy=WS,y.unionWith=zS,y.uniq=GS,y.uniqBy=qS,y.uniqWith=YS,y.unset=JN,y.unzip=_d,y.unzipWith=Sp,y.update=QN,y.updateWith=XN,y.values=Vi,y.valuesIn=ZN,y.without=jS,y.words=Xp,y.wrap=Gk,y.xor=JS,y.xorBy=QS,y.xorWith=XS,y.zip=ZS,y.zipObject=ek,y.zipObjectDeep=tk,y.zipWith=nk,y.entries=Yp,y.entriesIn=jp,y.extend=zp,y.extendWith=Nc,Sd(y,y),y.add=ZR,y.attempt=Zp,y.camelCase=rR,y.capitalize=Jp,y.ceil=eO,y.clamp=eR,y.clone=Yk,y.cloneDeep=Jk,y.cloneDeepWith=Qk,y.cloneWith=jk,y.conformsTo=Xk,y.deburr=Qp,y.defaultTo=PR,y.divide=tO,y.endsWith=oR,y.eq=lr,y.escape=iR,y.escapeRegExp=aR,y.every=fk,y.find=gk,y.findIndex=wp,y.findKey=kN,y.findLast=pk,y.findLastIndex=Tp,y.findLastKey=NN,y.floor=nO,y.forEach=Np,y.forEachRight=Rp,y.forIn=RN,y.forInRight=ON,y.forOwn=PN,y.forOwnRight=MN,y.get=wd,y.gt=Zk,y.gte=eN,y.has=xN,y.hasIn=Td,y.head=Ip,y.identity=mn,y.includes=Ek,y.indexOf=pS,y.inRange=tR,y.invoke=BN,y.isArguments=ri,y.isArray=Ce,y.isArrayBuffer=tN,y.isArrayLike=hn,y.isArrayLikeObject=gt,y.isBoolean=nN,y.isBuffer=So,y.isDate=rN,y.isElement=oN,y.isEmpty=iN,y.isEqual=aN,y.isEqualWith=sN,y.isError=Cd,y.isFinite=cN,y.isFunction=Xr,y.isInteger=Fp,y.isLength=Sc,y.isMap=Bp,y.isMatch=lN,y.isMatchWith=uN,y.isNaN=dN,y.isNative=hN,y.isNil=mN,y.isNull=fN,y.isNumber=Vp,y.isObject=lt,y.isObjectLike=dt,y.isPlainObject=Qa,y.isRegExp=Ed,y.isSafeInteger=gN,y.isSet=Hp,y.isString=kc,y.isSymbol=In,y.isTypedArray=Bi,y.isUndefined=pN,y.isWeakMap=_N,y.isWeakSet=vN,y.join=ES,y.kebabCase=sR,y.last=zn,y.lastIndexOf=wS,y.lowerCase=cR,y.lowerFirst=lR,y.lt=yN,y.lte=CN,y.max=rO,y.maxBy=oO,y.mean=iO,y.meanBy=aO,y.min=sO,y.minBy=cO,y.stubArray=Nd,y.stubFalse=Rd,y.stubObject=qR,y.stubString=YR,y.stubTrue=jR,y.multiply=lO,y.nth=TS,y.noConflict=BR,y.noop=kd,y.now=bc,y.pad=uR,y.padEnd=dR,y.padStart=hR,y.parseInt=fR,y.random=nR,y.reduce=Ak,y.reduceRight=Sk,y.repeat=mR,y.replace=gR,y.result=GN,y.round=uO,y.runInContext=P,y.sample=Nk,y.size=Pk,y.snakeCase=pR,y.some=Mk,y.sortedIndex=RS,y.sortedIndexBy=OS,y.sortedIndexOf=PS,y.sortedLastIndex=MS,y.sortedLastIndexBy=DS,y.sortedLastIndexOf=LS,y.startCase=vR,y.startsWith=yR,y.subtract=dO,y.sum=hO,y.sumBy=fO,y.template=CR,y.times=JR,y.toFinite=Zr,y.toInteger=Te,y.toLength=Kp,y.toLower=ER,y.toNumber=Gn,y.toSafeInteger=EN,y.toString=Ve,y.toUpper=wR,y.trim=TR,y.trimEnd=bR,y.trimStart=IR,y.truncate=AR,y.unescape=SR,y.uniqueId=XR,y.upperCase=kR,y.upperFirst=bd,y.each=Np,y.eachRight=Rp,y.first=Ip,Sd(y,function(){var o={};return Sr(y,function(s,u){He.call(y.prototype,u)||(o[u]=s)}),o}(),{chain:!1}),y.VERSION=r,Vn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),Vn(["drop","take"],function(o,s){Re.prototype[o]=function(u){u=u===t?1:St(Te(u),0);var f=this.__filtered__&&!s?new Re(this):this.clone();return f.__filtered__?f.__takeCount__=qt(u,f.__takeCount__):f.__views__.push({size:qt(u,It),type:o+(f.__dir__<0?"Right":"")}),f},Re.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),Vn(["filter","map","takeWhile"],function(o,s){var u=s+1,f=u==yt||u==Gt;Re.prototype[o]=function(_){var E=this.clone();return E.__iteratees__.push({iteratee:ue(_,3),type:u}),E.__filtered__=E.__filtered__||f,E}}),Vn(["head","last"],function(o,s){var u="take"+(s?"Right":"");Re.prototype[o]=function(){return this[u](1).value()[0]}}),Vn(["initial","tail"],function(o,s){var u="drop"+(s?"":"Right");Re.prototype[o]=function(){return this.__filtered__?new Re(this):this[u](1)}}),Re.prototype.compact=function(){return this.filter(mn)},Re.prototype.find=function(o){return this.filter(o).head()},Re.prototype.findLast=function(o){return this.reverse().find(o)},Re.prototype.invokeMap=Ie(function(o,s){return typeof o=="function"?new Re(this):this.map(function(u){return za(u,o,s)})}),Re.prototype.reject=function(o){return this.filter(Ac(ue(o)))},Re.prototype.slice=function(o,s){o=Te(o);var u=this;return u.__filtered__&&(o>0||s<0)?new Re(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),s!==t&&(s=Te(s),u=s<0?u.dropRight(-s):u.take(s-o)),u)},Re.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Re.prototype.toArray=function(){return this.take(It)},Sr(Re.prototype,function(o,s){var u=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),_=y[f?"take"+(s=="last"?"Right":""):s],E=f||/^find/.test(s);_&&(y.prototype[s]=function(){var b=this.__wrapped__,A=f?[1]:arguments,M=b instanceof Re,K=A[0],W=M||Ce(b),q=function(Ne){var Oe=_.apply(y,Co([Ne],A));return f&&ee?Oe[0]:Oe};W&&u&&typeof K=="function"&&K.length!=1&&(M=W=!1);var ee=this.__chain__,ae=!!this.__actions__.length,de=E&&!ee,be=M&&!ae;if(!E&&W){b=be?b:new Re(this);var he=o.apply(b,A);return he.__actions__.push({func:wc,args:[q],thisArg:t}),new $n(he,ee)}return de&&be?o.apply(this,A):(he=this.thru(q),de?f?he.value()[0]:he.value():he)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(o){var s=Ys[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",f=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var _=arguments;if(f&&!this.__chain__){var E=this.value();return s.apply(Ce(E)?E:[],_)}return this[u](function(b){return s.apply(Ce(b)?b:[],_)})}}),Sr(Re.prototype,function(o,s){var u=y[s];if(u){var f=u.name+"";He.call(Di,f)||(Di[f]=[]),Di[f].push({name:s,func:u})}}),Di[gc(t,I).name]=[{name:"wrapper",func:t}],Re.prototype.clone=SI,Re.prototype.reverse=kI,Re.prototype.value=NI,y.prototype.at=ok,y.prototype.chain=ik,y.prototype.commit=ak,y.prototype.next=sk,y.prototype.plant=lk,y.prototype.reverse=uk,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=dk,y.prototype.first=y.prototype.head,Fa&&(y.prototype[Fa]=ck),y},Oi=aI();jo?((jo.exports=Oi)._=Oi,Au._=Oi):Bt._=Oi}).call(t$)}(is,is.exports)),is.exports}var Na=n$();const hl=e$(Na),r$={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-Cznm_Gy3.js")),meta:{requiresAuth:!1}},o$={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-SSauxOz3.js")),meta:{requiresAuth:!1}},{isAuthenticated:my,handleRedirect:i$}=Em(),a$=gu();function s$(n,e){n.addRoute(r$),n.addRoute(o$),n.beforeEach(async(t,r,i)=>{function a(d){return d.matched.some(h=>h.meta.requiresAuth)}if(!a(t))return i();if(!my.value){_e.value=!0;try{await i$(e,t.fullPath),await a$.__init__()}catch(d){console.error("Fail to authenticate",d),await n.push("/jplan-auth-fail")}_e.value=!1}if(my.value){if(localStorage.getItem("returnRoute")&&localStorage.getItem("returnRoute")!==null){const d=localStorage.getItem("returnRoute")??"/";console.log("trying to go to saved route:",d),i(d),localStorage.removeItem("returnRoute");return}i()}})}const{scope:gy}=gu();function c$(){const n=Am(),e=l.ref({scope_type:"org"});async function t(r){e.value=r}return l.watch(gy,()=>{n.interceptors.request.use(r=>{const i=r.headers,a=i.Authorization;a&&(i.Authorization=a);const c=gy.value;return c&&(c.scope_type&&(i["j-scope-type"]=c.scope_type,c.organization&&(i["j-scope-organization"]=c.organization),c.team&&(i["j-scope-team"]=c.team)),c.environment&&(i["j-scope-environment"]=c.environment)),r})},{immediate:!0}),Object.assign(n,{setScope:t,scope:e})}function Ra(n){const e=c$();e.defaults.baseURL=n;const t=l.ref({scope_type:"org"});async function r(i){t.value=i}return l.watch(t,()=>{e.interceptors.request.use(i=>{const a=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],a!=null&&a.scope_type&&(i.headers["j-scope-type"]=a.scope_type),a!=null&&a.organization&&(i.headers["j-scope-organization"]=a.organization),a!=null&&a.team&&(i.headers["j-scope-team"]=a.team),i})},{immediate:!0}),Object.assign(e,{setScope:r,scope:t})}function l$(){const n=Ra("https://api.jplan.com.br/management/organization"),{error:e}=Er();return{async getOrgList(t){try{const r=t?`?filter_query=${t}`:"",i=await n.get(`/list/${r}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(r){console.error("Error in getOrgList:",r),e("Failed to fetch Organization list");return}},async createOrg(t){var r,i;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createOrg:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to create Organization"),a}},async updateOrg(t){var r,i;try{const a=await n.patch("/item",t);if(a.data.error)throw e("Failed to update Organization"),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateOrg:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to update Organization"),a}},async getOrg(t){var r,i;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e("Failed to fetch Organization"),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getOrg:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch Organization"),a}},async activateOrg(t){var r,i;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e("Failed to activate Organization"),new Error(a.data.error)}catch(a){throw console.error("Error in activateOrg:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to activate Organization"),a}},async deactivateOrg(t){var r,i;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e("Failed to deactivate Organization"),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateOrg:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to deactivate Organization"),a}}}}const Do=l$();function u$(){const n=Ra("https://api.jplan.com.br/management/branch/"),{error:e}=Er();return{async getBranchList(t){try{const r=t?`?filter_query=${t}`:"",i=await n.get(`/list/${r}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(r){console.error("Error in getBranchList:",r),e("Failed to fetch Branch list")}},async createBranch(t){var r,i;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){console.error("Error in createBranch:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var r,i;try{const a=await n.patch("/item",t);if(a.data.error){e(a.data.error||"Failed to update Branch");return}return a}catch(a){console.error("Error in updateBranch:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var r,i;try{const a=await n.get(`/item/${t}`);if(a.data.error){e(a.data.error||"Failed to fetch Branch");return}return a.data}catch(a){console.error("Error in getBranch:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var r,i;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error){e(a.data.error||"Failed to activate Branch");return}}catch(a){console.error("Error in activateBranch:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var r,i;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error){e(a.data.error||"Failed to deactivate Branch");return}}catch(a){console.error("Error in deactivateBranch:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Lo=u$();function d$(){const n=Ra("https://api.jplan.com.br/management/team"),{error:e}=Er();return{async getTeamList(t){try{const r=t?`?filter_query=${t}`:"",i=await n.get(`/list/${r}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(r){console.error("Error in getTeamList:",r),e("Failed to fetch Team list");return}},async createTeam(t){var r,i;try{const a=await n.post("/item",t);if(a.data.error)throw e("Failed to create Team"),new Error(a.data.error);return a}catch(a){throw console.error("Error in createTeam:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to create Team"),a}},async updateTeam(t){var r,i;try{const a=await n.patch("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in updateTeam:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to update Team"),a}},async getTeam(t){var r,i;try{const a=await n.get(`/item/${t}`);return a.data.error&&e("Failed to fetch Team"),a.data}catch(a){console.error("Error in getTeam:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var r,i;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e("Failed to activate Team"),new Error(a.data.error)}catch(a){throw console.error("Error in activateTeam:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to activate Team"),a}},async deactivateTeam(t){var r,i;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e("Failed to deactivate Team"),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateTeam:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to deactivate Team"),a}},async getTeamUserList(t,r){try{const i=r?`?filter_query=${r}`:"",a=await n.get(`/item/${t}/user/list/${i}`);if(a.data.error)throw e("Failed to fetch Team User list"),new Error(a.data.error);return a.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,r){try{const i=await n.post(`/item/${t}/user/item/`,r);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,r){try{const i=await n.patch(`/item/${t}/user/item/`,r);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,r,i){try{const a=i?`?filter_query=${i}`:"",c=await n.get(`/item/${t}/user/item/${r}/${a}`);if(c.data.error)throw e("Failed to fetch User"),new Error(c.data.error);return c.data.data}catch(a){console.error("Error in getUser:",a),e("Failed to fetch User");return}},async unlinkManageUser(t,r,i){try{const a=i?`?filter_query=${i}`:"";await n.delete(`/item/${t}/user/item/${r}/${a}`)}catch(a){throw console.error("Error in unlink User:",a),e("Failed to unlink User"),a}}}}const Pn=d$();async function h$({url:n,method:e,header:t={},body:r,bearerToken:i}){const a=i?{Authorization:`Bearer ${i}`}:{};try{return(await ut({url:n,method:e,headers:{...t,...a},data:r??{}})).data}catch(c){throw console.error(`Request failed for ${e} ${n}:`,c),c}}function Oa(n,e,t=[]){const r=m$(e);if(!r)return n;const i=r.split(" ");return n.filter(a=>f$(a,i,t))}function f$(n,e,t){return t.some(r=>{const i=hl.get(n,r);if(hl.isNil(i))return!1;const a=hl.toString(i).toLowerCase();return e.every(c=>a.includes(c))})}function m$(n){return hl.trim(n).toLowerCase().replace(/\s+/g," ")}let Yc=!1;const lh=l.ref(!1),qn=l.ref([]),py=l.ref([]),ht=l.ref(null),ji=l.ref([]),Ji=l.ref([]),NT=()=>{const n=Er(),e=async C=>{lh.value=!0;const T=C?`_active eq true and ${C}`:"_active eq true",k=await Do.getOrgList(T);k&&(qn.value=k,Yc=!0),lh.value=!1},t=async C=>{var T;return(T=qn.value)!=null&&T.length||await e(C),qn.value};function r(C){if(!qn.value)throw new Error("Data not stored yet");const T=Oa(qn.value,C,["name","description"]);return C!==""?T:qn.value}const i=C=>{py.value=C},a=C=>{ht.value=Na.cloneDeep(C)},c=async C=>await Do.getOrg(C),d=async()=>{if(ht.value!=null){const C=await Do.createOrg(ht.value);return C!=null&&C.data.created_at&&(n.success("Organization created."),Yc&&qn.value.push(C.data)),C==null?void 0:C.data}},h=async()=>{if(_e.value=!0,ht.value&&ht.value.__id){const C=await Do.updateOrg(ht.value);if(Yc&&(C!=null&&C.data.__id)){const T=qn.value.findIndex(k=>k.__id===C.data.__id);return T!==-1?(qn.value[T]=C.data,n.success("Organization updated.")):n.error("Unable to update item"),_e.value=!1,C.data}}else _e.value=!1,n.error("Unable to update item")},m=async()=>{if(_e.value=!0,ht.value&&ht.value.created_at){if(await Do.deactivateOrg(ht.value.__id),Yc){const C=qn.value.findIndex(T=>{var k;return T.__id===((k=ht.value)==null?void 0:k.__id)});if(C!==-1)return qn.value.splice(C,1),ht.value;n.error("Unable to deactivate organization")}_e.value=!1}};async function g(C){_e.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Lo.updateBranch(T)){_e.value=!1;return}if(ji.value.findIndex(N=>N.__id===C.__id)===-1)return n.success("Branch added successfully."),ji.value.push(T),T;n.info("Branch already added.")}}catch(T){console.error(T)}finally{_e.value=!1}}async function v(C){if(_e.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Lo.updateBranch(T)){_e.value=!1;return}const I=ji.value.findIndex(N=>N.__id===C.__id);if(I!==-1)return ji.value.splice(I,1),_e.value=!1,ji.value;throw new Error("Item not found to remove")}_e.value=!1}async function p(C){_e.value=!0;try{if(ht.value&&ht.value.__id){const T={...C,organization:ht.value.__id};if(!await Pn.updateTeam(T)){_e.value=!1;return}if(Ji.value.findIndex(N=>N.__id===C.__id)===-1)return n.success("Team added successfully."),Ji.value.push(T),T;n.info("Team already added.")}}catch(T){console.error(T)}finally{_e.value=!1}}async function w(C){if(_e.value=!0,ht.value&&ht.value.__id){const T={...C,organization:null};if(!await Pn.updateTeam(T)){_e.value=!1;return}const I=Ji.value.findIndex(N=>N.__id===C.__id);if(I!==-1)return Ji.value.splice(I,1),_e.value=!1,Ji.value;throw new Error("Item not found to remove")}_e.value=!1}return{data:qn,loading:lh,columns:py,item:ht,filterData:r,__init__:e,getData:t,setColumns:i,setItem:a,getItem:c,createItem:d,updateItem:h,removeItem:m,orgBranches:ji,orgTeams:Ji,linkBranch:g,unlinkBranch:v,linkTeam:p,unlinkTeam:w}};let jc=!1;const Yn=l.ref([]),_y=l.ref([]),kt=l.ref(null),uh=l.ref(!1),Qi=l.ref([]),RT=()=>{const n=Er(),e=async p=>{uh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Pn.getTeamList(w);C&&(Yn.value=C,jc=!0),uh.value=!1},t=async p=>(Yn.value.length||await e(p),Yn.value);function r(p){if(!Yn.value)throw new Error("Data not stored yet");const w=Oa(Yn.value,p,["name","description"]);return p!==""?w:Yn.value}const i=p=>{_y.value=p},a=p=>{kt.value=Na.cloneDeep(p)},c=async p=>await Pn.getTeam(p),d=async()=>{if(kt.value!=null){const p=await Pn.createTeam(kt.value);return p!=null&&p.data.created_at&&(n.success("Team created."),jc&&Yn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(_e.value=!0,kt.value&&kt.value.__id){const p=await Pn.updateTeam(kt.value);if(jc&&(p!=null&&p.data.__id)){const w=Yn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Yn.value[w]=p.data,n.success("Team updated.")):n.error("Unable to update item"),p.data}}else n.error("Unable to update item")},m=async()=>{if(kt.value&&kt.value.created_at&&(await Pn.deactivateTeam(kt.value.__id),jc)){const p=Yn.value.findIndex(w=>{var C;return w.__id===((C=kt.value)==null?void 0:C.__id)});if(p!==-1)return Yn.value.splice(p,1),kt.value;n.error("Unable to deactivate organization")}};async function g(p){var w;if(_e.value=!0,(w=kt.value)!=null&&w.__id)if(Qi.value.findIndex(T=>T.__id===p.__id)===-1)try{const T=await Pn.linkManageUser(kt.value.__id,{team:kt.value.__id,user:p.__id,role:"string",joined_at:"string",comments:"string"}),k=await Pn.getTeamUserList(kt.value.__id);return k&&(Qi.value=k),n.success("User added successfully."),T}catch(T){console.error(T),n.error("Unable to add User.")}finally{_e.value=!1}else n.info("User already added.");else console.warn("No item selected or item ID is missing."),n.info("Please select a valid item.");_e.value=!1}async function v(p){if(_e.value=!0,kt.value&&kt.value.__id){const w=Qi.value.findIndex(C=>C.__id===p);if(w!==-1)return await Pn.unlinkManageUser(kt.value.__id,p),Qi.value.splice(w,1),_e.value=!1,Qi.value;throw new Error("Item not found to remove")}_e.value=!1}return{data:Yn,loading:uh,columns:_y,item:kt,usersTeam:Qi,__init__:e,getData:t,filterData:r,setColumns:i,setItem:a,getItem:c,createItem:d,updateItem:h,removeItem:m,linkUser:g,unlinkUser:v}},OT=l.defineComponent({__name:"GlobalScopeFilter",setup(n){var T,k,I;const{openDialog:e}=Ns("global-scope__J-"),{user:t,scope:r,session:i,setScope:a}=gu(),{getData:c,data:d}=NT(),{getData:h,data:m}=RT(),g=l.ref(!1);l.onBeforeMount(async()=>{g.value=!0,await c(),await h(),g.value=!1});const v=l.ref({scope_type:(T=r.value)==null?void 0:T.scope_type,organization:((k=r.value)==null?void 0:k.organization)??"org",team:(I=r.value)==null?void 0:I.team});function p(){var N,O,L;v.value={...r.value,scope_type:(N=r.value)==null?void 0:N.scope_type,organization:((O=r.value)==null?void 0:O.organization)??"",team:(L=r.value)==null?void 0:L.team},e()}const w=l.computed(()=>{var N;switch((N=r.value)==null?void 0:N.scope_type){case"user":return JU;case"org":return YU;case"team":return QU;default:return jU}});async function C(){var N;((N=r.value)==null?void 0:N.scope_type)!==""&&a(v.value)}return(N,O)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(ot.VBtn,{onClick:p,icon:"",class:"text-secondary",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(w.value),{size:"20"}))]),_:1}),l.createVNode(l.unref(Os),{loading:g.value,title:"Scope","dd-id":"global-scope__J-",onOnSave:C},{default:l.withCtx(()=>[l.createElementVNode("div",null,[l.createVNode(Je.VRow,null,{default:l.withCtx(()=>[l.createVNode(Je.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:l.withCtx(()=>[l.createVNode(Jt.VListItem,null,{default:l.withCtx(()=>[l.createVNode(Jt.VListItemTitle,null,{default:l.withCtx(()=>O[3]||(O[3]=[l.createTextVNode(" User")])),_:1}),l.createVNode(Jt.VListItemSubtitle,null,{default:l.withCtx(()=>{var L;return[l.createTextVNode(l.toDisplayString(((L=l.unref(t))==null?void 0:L.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),l.createVNode(Je.VCol,{cols:"4"},{default:l.withCtx(()=>[l.createVNode(Jt.VListItem,null,{default:l.withCtx(()=>[l.createVNode(Jt.VListItemTitle,null,{default:l.withCtx(()=>O[4]||(O[4]=[l.createTextVNode(" Domain")])),_:1}),l.createVNode(Jt.VListItemSubtitle,null,{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),l.createVNode(Je.VCol,{cols:"4"},{default:l.withCtx(()=>[l.createVNode(Jt.VListItem,null,{default:l.withCtx(()=>[l.createVNode(Jt.VListItemTitle,null,{default:l.withCtx(()=>O[5]||(O[5]=[l.createTextVNode(" Environment")])),_:1}),l.createVNode(Jt.VListItemSubtitle,null,{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),l.createVNode(vO.VBtnToggle,{density:"compact",variant:"outlined",modelValue:v.value.scope_type,"onUpdate:modelValue":O[0]||(O[0]=L=>v.value.scope_type=L),class:"d-flex justify-center my-4"},{default:l.withCtx(()=>[l.createVNode(ot.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:l.withCtx(()=>O[6]||(O[6]=[l.createTextVNode("Organizational")])),_:1}),l.createVNode(ot.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:l.withCtx(()=>O[7]||(O[7]=[l.createTextVNode("Team")])),_:1}),l.createVNode(ot.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:l.withCtx(()=>O[8]||(O[8]=[l.createTextVNode("User")])),_:1}),l.createVNode(ot.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:l.withCtx(()=>O[9]||(O[9]=[l.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),l.createElementVNode("div",null,[l.createVNode(gs.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:l.withCtx(()=>O[10]||(O[10]=[l.createTextVNode("Organization")])),_:1}),l.createVNode(as.VSelect,{items:l.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:v.value.organization,"onUpdate:modelValue":O[1]||(O[1]=L=>v.value.organization=L),clearable:""},null,8,["items","modelValue"]),l.createVNode(gs.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:l.withCtx(()=>O[11]||(O[11]=[l.createTextVNode("Team")])),_:1}),l.createVNode(as.VSelect,{items:l.unref(m),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:v.value.team,"onUpdate:modelValue":O[2]||(O[2]=L=>v.value.team=L),clearable:""},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),g$={},p$={class:"double-ring-spinner-container"};function _$(n,e){return l.openBlock(),l.createElementBlock("div",p$,e[0]||(e[0]=[l.createElementVNode("div",{class:"spinner-loading"},[l.createElementVNode("div"),l.createElementVNode("div"),l.createElementVNode("div",null,[l.createElementVNode("div")]),l.createElementVNode("div",null,[l.createElementVNode("div")])],-1)]))}const PT=Ta(g$,[["render",_$],["__scopeId","data-v-00d7a69f"]]),v$={key:0,class:"_jspinner-overlay_jj"},MT=l.defineComponent({__name:"GlobalSpinner",setup(n){return(e,t)=>l.unref(_e)?(l.openBlock(),l.createElementBlock("div",v$,t[0]||(t[0]=[l.createElementVNode("div",{class:"j-double-ring-spinner-container"},[l.createElementVNode("div",{class:"j-global-spinner-loading"},[l.createElementVNode("div"),l.createElementVNode("div"),l.createElementVNode("div",null,[l.createElementVNode("div")]),l.createElementVNode("div",null,[l.createElementVNode("div")])])],-1)]))):l.createCommentVNode("",!0)}}),DT=l.defineComponent({__name:"SubMenu",props:{title:{}},setup(n,{expose:e}){return e({props:n}),(r,i)=>(l.openBlock(),l.createBlock(Jt.VListItem,{onClick:i[0]||(i[0]=()=>{}),density:"compact"},{append:l.withCtx(()=>[l.createVNode(l.unref(XU))]),default:l.withCtx(()=>[l.createVNode(Jt.VListItemTitle,null,{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(r.title),1)]),_:1}),l.createVNode(df.VMenu,{activator:"parent","open-on-hover":"",submenu:"",density:"compact"},{default:l.withCtx(()=>[l.renderSlot(r.$slots,"default")]),_:3})]),_:3}))}}),y$=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:iC,ColumnSettingsDialog:Mf,ConfirmDialog:rC,ContextMenu:aC,CopyButton:Ll,DeleteAllBtn:pf,DotsMenu:nC,EditButton:tC,FormHeadless:gE,FormMetadata:jl,GlobalScopeFilter:OT,GlobalSpinner:MT,JAvatar:oC,JBtn:by,JDialog:Os,JForm:fE,JIconBtn:Ty,JSelect:lE,JTextArea:uE,JTextField:cE,ParentCard:Vl,SearchFilter:ql,SpinnerLoader:PT,SubMenu:DT,TabFormHeader:mE,TableAdvanced:fC,TableCard:Df,TableCardsView:aE,TableHeader:GC,UiTable:sC},Symbol.toStringTag,{value:"Module"})),C$=qO(),E$={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0},w$={"pt-BR":{placeholders:{selectFilter:"Selecionar filtro",visualize:"Visualizar",actions:"Ações",search:"Pesquisar"}},"en-US":{placeholders:{selectFilter:"Select a filter",visualize:"Visualize",actions:"Actions",search:"Search"}}},T$=Cx({locale:"pt-BR",fallbackLocale:"en-US",messages:w$});let dh=!1;const hh=l.ref(!1),jn=l.ref([]),vy=l.ref([]),Ht=l.ref(null),Xi=l.ref([]),b$=()=>{const n=Er(),e=async p=>{hh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await Lo.getBranchList(w);C&&(jn.value=C,dh=!0),hh.value=!1},t=async p=>(jn.value.length||await e(p),jn.value);function r(p){if(!jn.value)throw new Error("Data not stored yet");const w=Oa(jn.value,p,["name","description"]);return p!==""?w:jn.value}const i=p=>{vy.value=p},a=p=>{Ht.value=Na.cloneDeep(p)},c=async p=>await Lo.getBranch(p),d=async()=>{if(Ht.value!=null){const p=await Lo.createBranch(Ht.value);return p!=null&&p.data.created_at&&(n.success("Branch created."),dh&&jn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(Ht.value&&Ht.value.__id){const p=await Lo.updateBranch(Ht.value);if(dh&&p){const w=jn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(jn.value[w]=p.data,n.success("Branch updated.")):n.error("Unable to update item"),p}}else n.error("Unable to update item")},m=async()=>{if(Ht.value&&Ht.value.created_at){await Lo.deactivateBranch(Ht.value.__id);const p=jn.value.findIndex(w=>{var C;return w.__id===((C=Ht.value)==null?void 0:C.__id)});if(p!==-1)return jn.value.splice(p,1),Ht.value;n.error("Unable to deactivate Domain")}};async function g(p){_e.value=!0;try{if(Ht.value&&Ht.value.__id){const w={...p,branch:Ht.value.__id};if(!await Pn.updateTeam(w)){n.error("Unable to link team");return}if(Xi.value.findIndex(k=>k.__id===p.__id)===-1)return n.success("Team added successfully."),Xi.value.push(w),w;n.info("Team already added.")}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{_e.value=!1}}async function v(p){if(_e.value=!0,Ht.value&&Ht.value.__id){const w={...p,branch:null};if(!await Pn.updateTeam(w))return;const T=Xi.value.findIndex(k=>k.__id===p.__id);if(T!==-1)return Xi.value.splice(T,1),_e.value=!1,Xi.value;throw new Error("Item not found to remove")}_e.value=!1}return{data:jn,columns:vy,item:Ht,loading:hh,__init__:e,getData:t,filterData:r,setColumns:i,setItem:a,getItem:c,createItem:d,updateItem:h,removeItem:m,branchTeams:Xi,linkTeam:g,unlinkTeam:v}};function I$(){const n=Ra("https://api.jplan.com.br/management/division"),{error:e}=Er();return{async getDivisionList(t){try{const r=t?`?filter_query=${t}`:"",i=await n.get(`/list/${r}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(r){console.error("Error in getDivisionList:",r),e("Failed to fetch Division list");return}},async createDivision(t){var r,i;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createDivision:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to create Division"),a}},async updateDivision(t){var r,i;try{const a=await n.patch("/item",t);if(a.data.error)throw e("Failed to update Division"),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateDivision:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to update Division"),a}},async getDivision(t){var r,i;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e("Failed to fetch Division"),new Error(a.data.error);return a.data}catch(a){throw console.error("Error in getDivision:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch Division"),a}},async activateDivision(t){var r,i;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e("Failed to activate Division"),new Error(a.data.error)}catch(a){throw console.error("Error in activateDivision:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to activate Division"),a}},async deactivateDivision(t){var r,i;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e("Failed to deactivate Division"),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateDivision:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to deactivate Division"),a}}}}const ia=I$();let fh=!1;const mh=l.ref(!1),Jn=l.ref([]),yy=l.ref([]),$t=l.ref(null),Zi=l.ref([]),A$=()=>{const n=Er(),e=async p=>{mh.value=!0;const w=p?`_active eq true and ${p}`:"_active eq true",C=await ia.getDivisionList(w);C&&(Jn.value=C,fh=!0),mh.value=!1},t=async p=>(Jn.value.length||await e(p),Jn.value);function r(p){if(!Jn.value)throw new Error("Data not stored yet");const w=Oa(Jn.value,p,["name","description"]);return p!==""?w:Jn.value}const i=p=>{yy.value=p},a=p=>{$t.value=Na.cloneDeep(p)},c=async p=>await ia.getDivision(p),d=async()=>{if($t.value!=null){const p=await ia.createDivision($t.value);return p!=null&&p.data.created_at&&(n.success("Division created."),fh&&Jn.value.push(p.data)),p==null?void 0:p.data}},h=async()=>{if(_e.value=!0,$t.value&&$t.value.__id){const p=await ia.updateDivision($t.value);if(fh&&(p!=null&&p.data.__id)){const w=Jn.value.findIndex(C=>C.__id===p.data.__id);return w!==-1?(Jn.value[w]=p.data,n.success("Updated Division.")):n.error("Unable to update item"),_e.value=!1,p}}else _e.value=!1,n.error("Unable to update item")},m=async()=>{if(_e.value=!0,$t.value&&$t.value.created_at){await ia.deactivateDivision($t.value.__id);const p=Jn.value.findIndex(w=>{var C;return w.__id===((C=$t.value)==null?void 0:C.__id)});if(p!==-1)return Jn.value.splice(p,1),$t.value;n.error("Unable to deactivate Division")}_e.value=!1};async function g(p){_e.value=!0;try{if($t.value&&$t.value.__id){const w={...p,division:$t.value.__id};return await Do.updateOrg(w)?(Zi.value.findIndex(k=>k.__id===p.__id)===-1?(n.success("Organization added successfully."),Zi.value.push(w)):n.info("Organization already added."),w):void 0}else throw new Error("Item is not defined")}catch(w){console.error(w)}finally{_e.value=!1}}async function v(p){if(_e.value=!0,$t.value&&$t.value.__id){const w={...p,division:null};if(!await Do.updateOrg(w))return;const T=Zi.value.findIndex(k=>k.__id===p.__id);if(T!==-1)Zi.value.splice(T,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return _e.value=!1,Zi.value}return{data:Jn,columns:yy,item:$t,loading:mh,__init__:e,filterData:r,getData:t,setColumns:i,setItem:a,getItem:c,createItem:d,updateItem:h,removeItem:m,orgs:Zi,linkDivision:g,unlinkDivision:v}};function S$(){const n=Ra("https://api.jplan.com.br/management/user"),{error:e}=Er();return{async getManageUserList(t){try{const r=t?`?filter_query=${t}`:"",i=await n.get(`/list/${r}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(r){console.error("Error in getManageUserList:",r),e("Failed to fetch User list");return}},async createManageUser(t){var r,i;try{const a=await n.post("/item",t);return a.status>=200&&a.status<300?a:void 0}catch(a){throw console.error("Error in createManageUser:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to create User"),a}},async updateManageUser(t){var r,i;try{const a=await n.patch("/item",t);if(a.data.error)throw e("Failed to update User"),new Error(a.data.error);return a}catch(a){throw console.error("Error in updateManageUser:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to update User"),a}},async getManageUser(t){var r,i;try{const a=await n.get(`/item/${t}`);if(a.data.error)throw e("Failed to fetch User"),new Error(a.data.error);return a.data}catch(a){console.error("Error in getManageUser:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var r,i;try{const a=await n.post(`/item/${t}/activate`);if(a.data.error)throw e("Failed to activate User"),new Error(a.data.error)}catch(a){throw console.error("Error in activateManageUser:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to activate User"),a}},async deactivateManageUser(t){var r,i;try{const a=await n.post(`/item/${t}/deactivate`);if(a.data.error)throw e("Failed to deactivate User"),new Error(a.data.error)}catch(a){throw console.error("Error in deactivateManageUser:",a),e(((i=(r=a.response)==null?void 0:r.data)==null?void 0:i.message)||"Failed to deactivate User"),a}}}}const aa=S$();let gh=!1,ph=l.ref(!1);const Qn=l.ref([]),Cy=l.ref([]),Xn=l.ref(null),k$=l.ref(null),N$=l.ref([]),R$=()=>{const n=Er(),e=async g=>{ph.value=!0;const v=g?`_active eq true and ${g}`:"_active eq true",p=await aa.getManageUserList(v);p&&(Qn.value=p,gh=!0),ph.value=!1},t=async g=>(Qn.value.length||await e(g),Qn.value);function r(g){if(!Qn.value)throw new Error("Data not stored yet");const v=Oa(Qn.value,g,["name","description"]);return g!==""?v:Qn.value}return{data:Qn,loading:ph,columns:Cy,item:Xn,filterData:r,__init__:e,getData:t,setColumns:g=>{Cy.value=g},setItem:g=>{Xn.value=Na.cloneDeep(g)},getItem:async g=>await aa.getManageUser(g),createItem:async()=>{if(Xn.value!=null){const g=crypto.randomUUID(),v=await aa.createManageUser({...Xn.value,__id:g});return v!=null&&v.data.created_at&&(n.success("User created."),gh&&Qn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(_e.value=!0,Xn.value&&Xn.value.created_at){const g=await aa.updateManageUser(Xn.value);if(gh&&(g!=null&&g.data)){const v=Qn.value.findIndex(p=>p.__id===(g==null?void 0:g.data.__id));if(v!==-1)Qn.value[v]=g==null?void 0:g.data,n.success("User created.");else throw new Error("Unable to find item after update")}return _e.value=!1,g==null?void 0:g.data}},removeItem:async()=>{if(Xn.value&&Xn.value.created_at){try{await aa.deactivateManageUser(Xn.value.__id)}catch{n.error("Unable to deactivate user");return}const g=Qn.value.findIndex(v=>{var p;return v.__id===((p=Xn.value)==null?void 0:p.__id)});if(g!==-1)return Qn.value.splice(g,1),Xn.value}},userOrg:k$,userTeams:N$}},O$=n=>{n.use(C$),n.use(j0,E$),n.use(T$),Object.entries(y$).forEach(([e,t])=>{n.component(e,t)}),Object.entries(CO).forEach(([e,t])=>{n.provide(e,t)})},P$={install:O$};exports.ContextMenu=aC;exports.EmptyListImg=Ch;exports.EventBus=Fl;exports.FormHeadless=gE;exports.HttpCore=h$;exports.SpinnerLoader=PT;exports.TableCardsView=aE;exports.TableHeader=GC;exports.__spinner=_e;exports._export_sfc=Ta;exports._sfc_main=sC;exports._sfc_main$1=fC;exports._sfc_main$10=pf;exports._sfc_main$11=tC;exports._sfc_main$12=Ty;exports._sfc_main$13=lE;exports._sfc_main$14=uE;exports._sfc_main$15=cE;exports._sfc_main$16=fE;exports._sfc_main$17=mE;exports._sfc_main$18=Vl;exports._sfc_main$19=oC;exports._sfc_main$2=Mf;exports._sfc_main$20=iC;exports._sfc_main$21=Os;exports._sfc_main$22=DT;exports._sfc_main$23=OT;exports._sfc_main$24=MT;exports._sfc_main$3=Df;exports._sfc_main$4=ql;exports._sfc_main$5=rC;exports._sfc_main$6=Ll;exports._sfc_main$7=nC;exports._sfc_main$8=jl;exports._sfc_main$9=by;exports.branchInstance=Lo;exports.coreClient=Am;exports.createToastInterface=vs;exports.dateFormat=hC;exports.divisionInstance=ia;exports.filterQuery=Oa;exports.globalEventBus=gf;exports.index=P$;exports.manageUserInstance=aa;exports.msal=zt;exports.orgInstance=Do;exports.provideToast=Y0;exports.scopedClient=Ra;exports.setupAuthGuard=s$;exports.teamInstance=Pn;exports.toastInjectionKey=Bl;exports.useAuth=Em;exports.useBranchStore=b$;exports.useCustomizer=XO;exports.useDialog=Ns;exports.useDivisionStore=A$;exports.useManageUserStore=R$;exports.useOrganizationStore=NT;exports.useSession=gu;exports.useTeamStore=RT;exports.useToast=Er;
|