@luizleon/sf.prefeiturasp.vuecomponents 0.0.39 → 0.0.40

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/lib.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Q,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Q=typeof globalThis<"u"?globalThis:Q||self,c(Q.Lib={},Q.Vue))})(this,function(Q,c){"use strict";var ad=Object.defineProperty;var cd=(Q,c,Je)=>c in Q?ad(Q,c,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Q[c]=Je;var We=(Q,c,Je)=>(cd(Q,typeof c!="symbol"?c+"":c,Je),Je);class Je{constructor(){We(this,"_visible",c.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const ks=new Je,pn=()=>ks;class Ye{constructor(e){We(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}function As(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const o=getComputedStyle(n).zIndex;return+o==+o?+o:0}))}let Cs=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var Ht=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(Ht||{}),rt=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(rt||{});const po=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Ss={},_s={class:"sf-loading-circle"},xs=[c.createElementVNode("div",null,[c.createElementVNode("svg",{viewBox:"25 25 50 50"},[c.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function vs(t,e){return c.openBlock(),c.createElementBlock("div",_s,xs)}const Ts=po(Ss,[["render",vs]]),Ps=["disabled","tabindex"],Rs=["data-color"],Et=c.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:rt.Medio},dot:{type:Boolean},dotColor:{default:Ht.Error},buttonProps:{}},setup(t){const e=t;function n(){return new Ye(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.tamanho===rt.Pequeno).AddClass("sf-icon-medium",e.tamanho===rt.Medio).AddClass("sf-icon-large",e.tamanho===rt.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,r)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style),class:c.normalizeClass(n())},[c.createElementVNode("button",c.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ts,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icone),1)],64))],16,Ps),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Rs)):c.createCommentVNode("",!0)],6))}}),Ls=["id","onClick"],Os={class:"sf-drawer-header"},Is={class:"sf-drawer-title"},Bs={class:"sf-drawer-content"},Ns={key:0,class:"sf-drawer-footer"},Fs=c.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,o=e,r=c.useSlots(),s=c.ref(n.visible),a=c.ref(!1),f=c.ref(0),u=Cs();function w(){s.value=!1}function E($){($.key==="Escape"||$.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function X($){f.value=As(),$.style.zIndex=`${f.value}`}function M($){var ee;o("before-close"),(ee=$==null?void 0:$.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),a.value=!1}function N(){return new Ye("sf-mask sf-mask-overlay").AddClass("right",n.position==="right").AddClass("bottom",n.position==="bottom").AddClass("full",n.position==="full").AddClass("sf-mask-overlay-enter",n.visible===!0).Build()}return c.watch(()=>n.visible,$=>{s.value=$}),c.watch(()=>s.value,$=>{o("update:visible",$),$&&(a.value=!0)}),($,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N()),style:c.normalizeStyle({zIndex:f.value-1}),onClick:c.withModifiers(w,["stop"])},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:X,onEnter:b,onBeforeLeave:M,onAfterLeave:B},{default:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!c.unref(r).footer}]),style:c.normalizeStyle(n.style),role:"dialog"},[c.createElementVNode("div",Os,[c.createElementVNode("span",Is,[c.renderSlot($.$slots,"title")]),c.createVNode(Et,{button:!0,icone:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Bs,[c.renderSlot($.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Ns,[c.renderSlot($.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],14,Ls)):c.createCommentVNode("",!0)]))}}),Us=["id","name","disabled","data-color","form","type"],Ds={class:"sf-button-label"},mo=c.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ye(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,r)=>(c.openBlock(),c.createElementBlock("button",{id:e.id,name:e.name,class:c.normalizeClass(n()),style:c.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(c.openBlock(),c.createBlock(Et,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(c.openBlock(),c.createBlock(Et,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Ds,[c.renderSlot(o.$slots,"default")])],14,Us))}}),go="SweetAlert2:",Ms=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},mn=t=>t.charAt(0).toUpperCase()+t.slice(1),xe=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${go} ${typeof t=="object"?t.join(" "):t}`)},Xe=t=>{console.error(`${go} ${t}`)},yo=[],$s=t=>{yo.includes(t)||(yo.push(t),Ee(t))},Hs=(t,e)=>{$s(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},jt=t=>typeof t=="function"?t():t,gn=t=>t&&typeof t.toPromise=="function",kt=t=>gn(t)?t.toPromise():Promise.resolve(t),yn=t=>t&&Promise.resolve(t)===t,st={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},js=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Vs={},zs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],bo=t=>Object.prototype.hasOwnProperty.call(st,t),wo=t=>js.indexOf(t)!==-1,bn=t=>Vs[t],Ws=t=>{bo(t)||Ee(`Unknown parameter "${t}"`)},qs=t=>{zs.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},Ks=t=>{bn(t)&&Hs(t,bn(t))},Gs=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ws(e),t.toast&&qs(e),Ks(e)},Js="swal2-",Eo=t=>{const e={};for(const n in t)e[t[n]]=Js+t[n];return e},h=Eo(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),At=Eo(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${h.container}`),Ct=t=>{const e=de();return e?e.querySelector(t):null},Pe=t=>Ct(`.${t}`),Z=()=>Pe(h.popup),St=()=>Pe(h.icon),ko=()=>Pe(h.title),Vt=()=>Pe(h["html-container"]),Ao=()=>Pe(h.image),Co=()=>Pe(h["progress-steps"]),zt=()=>Pe(h["validation-message"]),Be=()=>Ct(`.${h.actions} .${h.confirm}`),qe=()=>Ct(`.${h.actions} .${h.deny}`),Ys=()=>Pe(h["input-label"]),it=()=>Ct(`.${h.loader}`),Ze=()=>Ct(`.${h.actions} .${h.cancel}`),_t=()=>Pe(h.actions),So=()=>Pe(h.footer),Wt=()=>Pe(h["timer-progress-bar"]),wn=()=>Pe(h.close),Xs=`
1
+ (function(Q,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Q=typeof globalThis<"u"?globalThis:Q||self,c(Q.Lib={},Q.Vue))})(this,function(Q,c){"use strict";var ad=Object.defineProperty;var cd=(Q,c,Je)=>c in Q?ad(Q,c,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Q[c]=Je;var We=(Q,c,Je)=>(cd(Q,typeof c!="symbol"?c+"":c,Je),Je);class Je{constructor(){We(this,"_visible",c.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const As=new Je,pn=()=>As;class Ye{constructor(e){We(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}function Cs(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const o=getComputedStyle(n).zIndex;return+o==+o?+o:0}))}let Ss=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var Ht=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(Ht||{}),rt=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(rt||{});const po=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},_s={},xs={class:"sf-loading-circle"},vs=[c.createElementVNode("div",null,[c.createElementVNode("svg",{viewBox:"25 25 50 50"},[c.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function Ts(t,e){return c.openBlock(),c.createElementBlock("div",xs,vs)}const Ps=po(_s,[["render",Ts]]),Rs=["disabled","tabindex"],Ls=["data-color"],Et=c.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:rt.Medio},dot:{type:Boolean},dotColor:{default:Ht.Error},buttonProps:{}},setup(t){const e=t;function n(){return new Ye(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.tamanho===rt.Pequeno).AddClass("sf-icon-medium",e.tamanho===rt.Medio).AddClass("sf-icon-large",e.tamanho===rt.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,r)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style),class:c.normalizeClass(n())},[c.createElementVNode("button",c.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ps,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icone),1)],64))],16,Rs),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ls)):c.createCommentVNode("",!0)],6))}}),Os=["id","onClick"],Is={class:"sf-drawer-header"},Bs={class:"sf-drawer-title"},Ns={class:"sf-drawer-content"},Fs={key:0,class:"sf-drawer-footer"},mo=c.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,o=e,r=c.useSlots(),s=c.ref(n.visible),a=c.ref(!1),f=c.ref(0),u=Ss();function w(){s.value=!1}function E($){($.key==="Escape"||$.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function X($){f.value=Cs(),$.style.zIndex=`${f.value}`}function M($){var ee;o("before-close"),(ee=$==null?void 0:$.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),a.value=!1}function N(){return new Ye("sf-mask sf-mask-overlay").AddClass("right",n.position==="right").AddClass("bottom",n.position==="bottom").AddClass("full",n.position==="full").AddClass("sf-mask-overlay-enter",n.visible===!0).Build()}return c.watch(()=>n.visible,$=>{s.value=$}),c.watch(()=>s.value,$=>{o("update:visible",$),$&&(a.value=!0)}),($,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N()),style:c.normalizeStyle({zIndex:f.value-1}),onClick:c.withModifiers(w,["stop"])},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:X,onEnter:b,onBeforeLeave:M,onAfterLeave:B},{default:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!c.unref(r).footer}]),style:c.normalizeStyle(n.style),role:"dialog"},[c.createElementVNode("div",Is,[c.createElementVNode("span",Bs,[c.renderSlot($.$slots,"title")]),c.createVNode(Et,{button:!0,icone:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Ns,[c.renderSlot($.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Fs,[c.renderSlot($.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],14,Os)):c.createCommentVNode("",!0)]))}}),Us=["id","name","disabled","data-color","form","type"],Ds={class:"sf-button-label"},go=c.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ye(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,r)=>(c.openBlock(),c.createElementBlock("button",{id:e.id,name:e.name,class:c.normalizeClass(n()),style:c.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(c.openBlock(),c.createBlock(Et,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(c.openBlock(),c.createBlock(Et,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Ds,[c.renderSlot(o.$slots,"default")])],14,Us))}}),yo="SweetAlert2:",Ms=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},mn=t=>t.charAt(0).toUpperCase()+t.slice(1),xe=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${yo} ${typeof t=="object"?t.join(" "):t}`)},Xe=t=>{console.error(`${yo} ${t}`)},bo=[],$s=t=>{bo.includes(t)||(bo.push(t),Ee(t))},Hs=(t,e)=>{$s(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},jt=t=>typeof t=="function"?t():t,gn=t=>t&&typeof t.toPromise=="function",kt=t=>gn(t)?t.toPromise():Promise.resolve(t),yn=t=>t&&Promise.resolve(t)===t,st={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},js=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Vs={},zs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],wo=t=>Object.prototype.hasOwnProperty.call(st,t),Eo=t=>js.indexOf(t)!==-1,bn=t=>Vs[t],Ws=t=>{wo(t)||Ee(`Unknown parameter "${t}"`)},qs=t=>{zs.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},Ks=t=>{bn(t)&&Hs(t,bn(t))},Gs=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ws(e),t.toast&&qs(e),Ks(e)},Js="swal2-",ko=t=>{const e={};for(const n in t)e[t[n]]=Js+t[n];return e},h=ko(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),At=ko(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${h.container}`),Ct=t=>{const e=de();return e?e.querySelector(t):null},Pe=t=>Ct(`.${t}`),Z=()=>Pe(h.popup),St=()=>Pe(h.icon),Ao=()=>Pe(h.title),Vt=()=>Pe(h["html-container"]),Co=()=>Pe(h.image),So=()=>Pe(h["progress-steps"]),zt=()=>Pe(h["validation-message"]),Be=()=>Ct(`.${h.actions} .${h.confirm}`),qe=()=>Ct(`.${h.actions} .${h.deny}`),Ys=()=>Pe(h["input-label"]),it=()=>Ct(`.${h.loader}`),Ze=()=>Ct(`.${h.actions} .${h.cancel}`),_t=()=>Pe(h.actions),_o=()=>Pe(h.footer),Wt=()=>Pe(h["timer-progress-bar"]),wn=()=>Pe(h.close),Xs=`
2
2
  a[href],
3
3
  area[href],
4
4
  input:not([disabled]),
@@ -13,7 +13,7 @@
13
13
  audio[controls],
14
14
  video[controls],
15
15
  summary
16
- `,En=()=>{const t=xe(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const r=parseInt(n.getAttribute("tabindex")),s=parseInt(o.getAttribute("tabindex"));return r>s?1:r<s?-1:0}),e=xe(Z().querySelectorAll(Xs)).filter(n=>n.getAttribute("tabindex")!=="-1");return Ms(t.concat(e)).filter(n=>ve(n))},kn=()=>He(document.body,h.shown)&&!He(document.body,h["toast-shown"])&&!He(document.body,h["no-backdrop"]),qt=()=>Z()&&He(Z(),h.toast),Zs=()=>Z().hasAttribute("data-loading"),at={previousBodyPadding:null},fe=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");xe(o.querySelector("head").childNodes).forEach(r=>{t.appendChild(r)}),xe(o.querySelector("body").childNodes).forEach(r=>{t.appendChild(r)})}},He=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},Qs=(t,e)=>{xe(t.classList).forEach(n=>{!Object.values(h).includes(n)&&!Object.values(At).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Re=(t,e,n)=>{if(Qs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Ee(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);J(t,e.customClass[n])}},An=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${h.popup} > .${h[e]}`);case"checkbox":return t.querySelector(`.${h.popup} > .${h.checkbox} input`);case"radio":return t.querySelector(`.${h.popup} > .${h.radio} input:checked`)||t.querySelector(`.${h.popup} > .${h.radio} input:first-child`);case"range":return t.querySelector(`.${h.popup} > .${h.range} input`);default:return t.querySelector(`.${h.popup} > .${h.input}`)}},_o=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},xo=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},J=(t,e)=>{xo(t,e,!0)},Fe=(t,e)=>{xo(t,e,!1)},Ke=(t,e)=>{const n=xe(t.childNodes);for(let o=0;o<n.length;o++)if(He(n[o],e))return n[o]},xt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},le=(t,e="flex")=>{t.style.display=e},he=t=>{t.style.display="none"},vo=(t,e,n,o)=>{const r=t.querySelector(e);r&&(r.style[n]=o)},Kt=(t,e,n)=>{e?le(t,n):he(t)},ve=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ei=()=>!ve(Be())&&!ve(qe())&&!ve(Ze()),To=t=>t.scrollHeight>t.clientHeight,Po=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Cn=(t,e=!1)=>{const n=Wt();ve(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ti=()=>{const t=Wt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},Ro=()=>typeof window>"u"||typeof document>"u",ni=100,W={},oi=()=>{W.previousActiveElement&&W.previousActiveElement.focus?(W.previousActiveElement.focus(),W.previousActiveElement=null):document.body&&document.body.focus()},ri=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;W.restoreFocusTimeout=setTimeout(()=>{oi(),e()},ni),window.scrollTo(n,o)}),si=`
16
+ `,En=()=>{const t=xe(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const r=parseInt(n.getAttribute("tabindex")),s=parseInt(o.getAttribute("tabindex"));return r>s?1:r<s?-1:0}),e=xe(Z().querySelectorAll(Xs)).filter(n=>n.getAttribute("tabindex")!=="-1");return Ms(t.concat(e)).filter(n=>ve(n))},kn=()=>He(document.body,h.shown)&&!He(document.body,h["toast-shown"])&&!He(document.body,h["no-backdrop"]),qt=()=>Z()&&He(Z(),h.toast),Zs=()=>Z().hasAttribute("data-loading"),at={previousBodyPadding:null},fe=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");xe(o.querySelector("head").childNodes).forEach(r=>{t.appendChild(r)}),xe(o.querySelector("body").childNodes).forEach(r=>{t.appendChild(r)})}},He=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},Qs=(t,e)=>{xe(t.classList).forEach(n=>{!Object.values(h).includes(n)&&!Object.values(At).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Re=(t,e,n)=>{if(Qs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Ee(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);J(t,e.customClass[n])}},An=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${h.popup} > .${h[e]}`);case"checkbox":return t.querySelector(`.${h.popup} > .${h.checkbox} input`);case"radio":return t.querySelector(`.${h.popup} > .${h.radio} input:checked`)||t.querySelector(`.${h.popup} > .${h.radio} input:first-child`);case"range":return t.querySelector(`.${h.popup} > .${h.range} input`);default:return t.querySelector(`.${h.popup} > .${h.input}`)}},xo=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},vo=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},J=(t,e)=>{vo(t,e,!0)},Fe=(t,e)=>{vo(t,e,!1)},Ke=(t,e)=>{const n=xe(t.childNodes);for(let o=0;o<n.length;o++)if(He(n[o],e))return n[o]},xt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},le=(t,e="flex")=>{t.style.display=e},he=t=>{t.style.display="none"},To=(t,e,n,o)=>{const r=t.querySelector(e);r&&(r.style[n]=o)},Kt=(t,e,n)=>{e?le(t,n):he(t)},ve=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ei=()=>!ve(Be())&&!ve(qe())&&!ve(Ze()),Po=t=>t.scrollHeight>t.clientHeight,Ro=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Cn=(t,e=!1)=>{const n=Wt();ve(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ti=()=>{const t=Wt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},Lo=()=>typeof window>"u"||typeof document>"u",ni=100,W={},oi=()=>{W.previousActiveElement&&W.previousActiveElement.focus?(W.previousActiveElement.focus(),W.previousActiveElement=null):document.body&&document.body.focus()},ri=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;W.restoreFocusTimeout=setTimeout(()=>{oi(),e()},ni),window.scrollTo(n,o)}),si=`
17
17
  <div aria-labelledby="${h.title}" aria-describedby="${h["html-container"]}" class="${h.popup}" tabindex="-1">
18
18
  <button type="button" class="${h.close}"></button>
19
19
  <ul class="${h["progress-steps"]}"></ul>
@@ -46,7 +46,7 @@
46
46
  <div class="${h["timer-progress-bar"]}"></div>
47
47
  </div>
48
48
  </div>
49
- `.replace(/(^|\n)\s*/g,""),ii=()=>{const t=de();return t?(t.remove(),Fe([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0):!1},Qe=()=>{W.currentInstance.resetValidationMessage()},ai=()=>{const t=Z(),e=Ke(t,h.input),n=Ke(t,h.file),o=t.querySelector(`.${h.range} input`),r=t.querySelector(`.${h.range} output`),s=Ke(t,h.select),a=t.querySelector(`.${h.checkbox} input`),f=Ke(t,h.textarea);e.oninput=Qe,n.onchange=Qe,s.onchange=Qe,a.onchange=Qe,f.oninput=Qe,o.oninput=()=>{Qe(),r.value=o.value},o.onchange=()=>{Qe(),o.nextSibling.value=o.value}},ci=t=>typeof t=="string"?document.querySelector(t):t,li=t=>{const e=Z();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},ui=t=>{window.getComputedStyle(t).direction==="rtl"&&J(de(),h.rtl)},di=t=>{const e=ii();if(Ro()){Xe("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=h.container,e&&J(n,h["no-transition"]),fe(n,si);const o=ci(t.target);o.appendChild(n),li(t),ui(o),ai()},Sn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?fi(t,e):t&&fe(e,t)},fi=(t,e)=>{t.jquery?hi(e,t):fe(e,t.toString())},hi=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=(()=>{if(Ro())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),pi=()=>{const t=document.createElement("div");t.className=h["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},mi=(t,e)=>{const n=_t(),o=it();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?he(n):le(n),Re(n,e,"actions"),gi(n,o,e),fe(o,e.loaderHtml),Re(o,e,"loader")};function gi(t,e,n){const o=Be(),r=qe(),s=Ze();_n(o,"confirm",n),_n(r,"deny",n),_n(s,"cancel",n),yi(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e)))}function yi(t,e,n,o){if(!o.buttonsStyling)return Fe([t,e,n],h.styled);J([t,e,n],h.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,J(t,h["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,J(e,h["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,J(n,h["default-outline"]))}function _n(t,e,n){Kt(t,n[`show${mn(e)}Button`],"inline-block"),fe(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=h[e],Re(t,n,`${e}Button`),J(t,n[`${e}ButtonClass`])}function bi(t,e){typeof e=="string"?t.style.background=e:e||J([document.documentElement,document.body],h["no-backdrop"])}function wi(t,e){e in h?J(t,h[e]):(Ee('The "position" parameter is not valid, defaulting to "center"'),J(t,h.center))}function Ei(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in h&&J(t,h[n])}}const ki=(t,e)=>{const n=de();n&&(bi(n,e.backdrop),wi(n,e.position),Ei(n,e.grow),Re(n,e,"container"))},K={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ai=["input","file","range","select","radio","checkbox","textarea"],Ci=(t,e)=>{const n=Z(),o=K.innerParams.get(t),r=!o||e.input!==o.input;Ai.forEach(s=>{const a=h[s],f=Ke(n,a);xi(s,e.inputAttributes),f.className=a,r&&he(f)}),e.input&&(r&&Si(e),vi(e))},Si=t=>{if(!ke[t.input])return Xe(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Lo(t.input),n=ke[t.input](e,t);le(n),setTimeout(()=>{_o(n)})},_i=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},xi=(t,e)=>{const n=An(Z(),t);if(n){_i(n);for(const o in e)n.setAttribute(o,e[o])}},vi=t=>{const e=Lo(t.input);t.customClass&&J(e,t.customClass.input)},xn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},Tt=(t,e,n)=>{if(n.inputLabel){t.id=h.input;const o=document.createElement("label"),r=h["input-label"];o.setAttribute("for",t.id),o.className=r,J(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Lo=t=>{const e=h[t]?h[t]:h.input;return Ke(Z(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:yn(e.inputValue)||Ee(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),Tt(t,t,e),xn(t,e),t.type=e.input,t),ke.file=(t,e)=>(Tt(t,t,e),xn(t,e),t),ke.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Tt(n,t,e),t},ke.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");fe(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Tt(t,t,e),t},ke.radio=t=>(t.textContent="",t),ke.checkbox=(t,e)=>{const n=An(Z(),"checkbox");n.value="1",n.id=h.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return fe(o,e.inputPlaceholder),t},ke.textarea=(t,e)=>{t.value=e.inputValue,xn(t,e),Tt(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(Z()).width),r=()=>{const s=t.offsetWidth+n(t);s>o?Z().style.width=`${s}px`:Z().style.width=null};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const Ti=(t,e)=>{const n=Vt();Re(n,e,"htmlContainer"),e.html?(Sn(e.html,n),le(n,"block")):e.text?(n.textContent=e.text,le(n,"block")):he(n),Ci(t,e)},Pi=(t,e)=>{const n=So();Kt(n,e.footer),e.footer&&Sn(e.footer,n),Re(n,e,"footer")},Ri=(t,e)=>{const n=wn();fe(n,e.closeButtonHtml),Re(n,e,"closeButton"),Kt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Li=(t,e)=>{const n=K.innerParams.get(t),o=St();if(n&&e.icon===n.icon){Io(o,e),Oo(o,e);return}if(!e.icon&&!e.iconHtml)return he(o);if(e.icon&&Object.keys(At).indexOf(e.icon)===-1)return Xe(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),he(o);le(o),Io(o,e),Oo(o,e),J(o,e.showClass.icon)},Oo=(t,e)=>{for(const n in At)e.icon!==n&&Fe(t,At[n]);J(t,At[e.icon]),Ni(t,e),Oi(),Re(t,e,"icon")},Oi=()=>{const t=Z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Ii=`
49
+ `.replace(/(^|\n)\s*/g,""),ii=()=>{const t=de();return t?(t.remove(),Fe([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0):!1},Qe=()=>{W.currentInstance.resetValidationMessage()},ai=()=>{const t=Z(),e=Ke(t,h.input),n=Ke(t,h.file),o=t.querySelector(`.${h.range} input`),r=t.querySelector(`.${h.range} output`),s=Ke(t,h.select),a=t.querySelector(`.${h.checkbox} input`),f=Ke(t,h.textarea);e.oninput=Qe,n.onchange=Qe,s.onchange=Qe,a.onchange=Qe,f.oninput=Qe,o.oninput=()=>{Qe(),r.value=o.value},o.onchange=()=>{Qe(),o.nextSibling.value=o.value}},ci=t=>typeof t=="string"?document.querySelector(t):t,li=t=>{const e=Z();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},ui=t=>{window.getComputedStyle(t).direction==="rtl"&&J(de(),h.rtl)},di=t=>{const e=ii();if(Lo()){Xe("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=h.container,e&&J(n,h["no-transition"]),fe(n,si);const o=ci(t.target);o.appendChild(n),li(t),ui(o),ai()},Sn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?fi(t,e):t&&fe(e,t)},fi=(t,e)=>{t.jquery?hi(e,t):fe(e,t.toString())},hi=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=(()=>{if(Lo())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),pi=()=>{const t=document.createElement("div");t.className=h["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},mi=(t,e)=>{const n=_t(),o=it();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?he(n):le(n),Re(n,e,"actions"),gi(n,o,e),fe(o,e.loaderHtml),Re(o,e,"loader")};function gi(t,e,n){const o=Be(),r=qe(),s=Ze();_n(o,"confirm",n),_n(r,"deny",n),_n(s,"cancel",n),yi(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e)))}function yi(t,e,n,o){if(!o.buttonsStyling)return Fe([t,e,n],h.styled);J([t,e,n],h.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,J(t,h["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,J(e,h["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,J(n,h["default-outline"]))}function _n(t,e,n){Kt(t,n[`show${mn(e)}Button`],"inline-block"),fe(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=h[e],Re(t,n,`${e}Button`),J(t,n[`${e}ButtonClass`])}function bi(t,e){typeof e=="string"?t.style.background=e:e||J([document.documentElement,document.body],h["no-backdrop"])}function wi(t,e){e in h?J(t,h[e]):(Ee('The "position" parameter is not valid, defaulting to "center"'),J(t,h.center))}function Ei(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in h&&J(t,h[n])}}const ki=(t,e)=>{const n=de();n&&(bi(n,e.backdrop),wi(n,e.position),Ei(n,e.grow),Re(n,e,"container"))},K={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ai=["input","file","range","select","radio","checkbox","textarea"],Ci=(t,e)=>{const n=Z(),o=K.innerParams.get(t),r=!o||e.input!==o.input;Ai.forEach(s=>{const a=h[s],f=Ke(n,a);xi(s,e.inputAttributes),f.className=a,r&&he(f)}),e.input&&(r&&Si(e),vi(e))},Si=t=>{if(!ke[t.input])return Xe(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Oo(t.input),n=ke[t.input](e,t);le(n),setTimeout(()=>{xo(n)})},_i=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},xi=(t,e)=>{const n=An(Z(),t);if(n){_i(n);for(const o in e)n.setAttribute(o,e[o])}},vi=t=>{const e=Oo(t.input);t.customClass&&J(e,t.customClass.input)},xn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},Tt=(t,e,n)=>{if(n.inputLabel){t.id=h.input;const o=document.createElement("label"),r=h["input-label"];o.setAttribute("for",t.id),o.className=r,J(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Oo=t=>{const e=h[t]?h[t]:h.input;return Ke(Z(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:yn(e.inputValue)||Ee(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),Tt(t,t,e),xn(t,e),t.type=e.input,t),ke.file=(t,e)=>(Tt(t,t,e),xn(t,e),t),ke.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Tt(n,t,e),t},ke.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");fe(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Tt(t,t,e),t},ke.radio=t=>(t.textContent="",t),ke.checkbox=(t,e)=>{const n=An(Z(),"checkbox");n.value="1",n.id=h.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return fe(o,e.inputPlaceholder),t},ke.textarea=(t,e)=>{t.value=e.inputValue,xn(t,e),Tt(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(Z()).width),r=()=>{const s=t.offsetWidth+n(t);s>o?Z().style.width=`${s}px`:Z().style.width=null};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const Ti=(t,e)=>{const n=Vt();Re(n,e,"htmlContainer"),e.html?(Sn(e.html,n),le(n,"block")):e.text?(n.textContent=e.text,le(n,"block")):he(n),Ci(t,e)},Pi=(t,e)=>{const n=_o();Kt(n,e.footer),e.footer&&Sn(e.footer,n),Re(n,e,"footer")},Ri=(t,e)=>{const n=wn();fe(n,e.closeButtonHtml),Re(n,e,"closeButton"),Kt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Li=(t,e)=>{const n=K.innerParams.get(t),o=St();if(n&&e.icon===n.icon){Bo(o,e),Io(o,e);return}if(!e.icon&&!e.iconHtml)return he(o);if(e.icon&&Object.keys(At).indexOf(e.icon)===-1)return Xe(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),he(o);le(o),Bo(o,e),Io(o,e),J(o,e.showClass.icon)},Io=(t,e)=>{for(const n in At)e.icon!==n&&Fe(t,At[n]);J(t,At[e.icon]),Ni(t,e),Oi(),Re(t,e,"icon")},Oi=()=>{const t=Z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Ii=`
50
50
  <div class="swal2-success-circular-line-left"></div>
51
51
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
52
52
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
@@ -56,29 +56,29 @@
56
56
  <span class="swal2-x-mark-line-left"></span>
57
57
  <span class="swal2-x-mark-line-right"></span>
58
58
  </span>
59
- `,Io=(t,e)=>{t.textContent="",e.iconHtml?fe(t,Bo(e.iconHtml)):e.icon==="success"?fe(t,Ii):e.icon==="error"?fe(t,Bi):fe(t,Bo({question:"?",warning:"!",info:"i"}[e.icon]))},Ni=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])vo(t,n,"backgroundColor",e.iconColor);vo(t,".swal2-success-ring","borderColor",e.iconColor)}},Bo=t=>`<div class="${h["icon-content"]}">${t}</div>`,Fi=(t,e)=>{const n=Ao();if(!e.imageUrl)return he(n);le(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),xt(n,"width",e.imageWidth),xt(n,"height",e.imageHeight),n.className=h.image,Re(n,e,"image")},Ui=t=>{const e=document.createElement("li");return J(e,h["progress-step"]),fe(e,t),e},Di=t=>{const e=document.createElement("li");return J(e,h["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Mi=(t,e)=>{const n=Co();if(!e.progressSteps||e.progressSteps.length===0)return he(n);le(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,r)=>{const s=Ui(o);if(n.appendChild(s),r===e.currentProgressStep&&J(s,h["active-progress-step"]),r!==e.progressSteps.length-1){const a=Di(e);n.appendChild(a)}})},$i=(t,e)=>{const n=ko();Kt(n,e.title||e.titleText,"block"),e.title&&Sn(e.title,n),e.titleText&&(n.innerText=e.titleText),Re(n,e,"title")},Hi=(t,e)=>{const n=de(),o=Z();e.toast?(xt(n,"width",e.width),o.style.width="100%",o.insertBefore(it(),St())):xt(o,"width",e.width),xt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),he(zt()),ji(o,e)},ji=(t,e)=>{t.className=`${h.popup} ${ve(t)?e.showClass.popup:""}`,e.toast?(J([document.documentElement,document.body],h["toast-shown"]),J(t,h.toast)):J(t,h.modal),Re(t,e,"popup"),typeof e.customClass=="string"&&J(t,e.customClass),e.icon&&J(t,h[`icon-${e.icon}`])},No=(t,e)=>{Hi(t,e),ki(t,e),Mi(t,e),Li(t,e),Fi(t,e),$i(t,e),Ri(t,e),Ti(t,e),mi(t,e),Pi(t,e),typeof e.didRender=="function"&&e.didRender(Z())},ct=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Vi=()=>{xe(document.body.children).forEach(e=>{e===de()||e.contains(de())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Fo=()=>{xe(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Uo=["swal-title","swal-html","swal-footer"],zi=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Xi(n),Object.assign(Wi(n),qi(n),Ki(n),Gi(n),Ji(n),Yi(n,Uo))},Wi=t=>{const e={};return xe(t.querySelectorAll("swal-param")).forEach(n=>{et(n,["name","value"]);const o=n.getAttribute("name"),r=n.getAttribute("value");typeof st[o]=="boolean"&&r==="false"&&(e[o]=!1),typeof st[o]=="object"&&(e[o]=JSON.parse(r))}),e},qi=t=>{const e={};return xe(t.querySelectorAll("swal-button")).forEach(n=>{et(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${mn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ki=t=>{const e={},n=t.querySelector("swal-image");return n&&(et(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Gi=t=>{const e={},n=t.querySelector("swal-icon");return n&&(et(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Ji=t=>{const e={},n=t.querySelector("swal-input");n&&(et(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},xe(o).forEach(r=>{et(r,["value"]);const s=r.getAttribute("value"),a=r.innerHTML;e.inputOptions[s]=a})),e},Yi=(t,e)=>{const n={};for(const o in e){const r=e[o],s=t.querySelector(r);s&&(et(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Xi=t=>{const e=Uo.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);xe(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&Ee(`Unrecognized element <${o}>`)})},et=(t,e)=>{xe(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Ee([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Do={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Zi(t){t.inputValidator||Object.keys(Do).forEach(e=>{t.input===e&&(t.inputValidator=Do[e])})}function Qi(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),t.target="body")}function ea(t){Zi(t),t.showLoaderOnConfirm&&!t.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
59
+ `,Bo=(t,e)=>{t.textContent="",e.iconHtml?fe(t,No(e.iconHtml)):e.icon==="success"?fe(t,Ii):e.icon==="error"?fe(t,Bi):fe(t,No({question:"?",warning:"!",info:"i"}[e.icon]))},Ni=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])To(t,n,"backgroundColor",e.iconColor);To(t,".swal2-success-ring","borderColor",e.iconColor)}},No=t=>`<div class="${h["icon-content"]}">${t}</div>`,Fi=(t,e)=>{const n=Co();if(!e.imageUrl)return he(n);le(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),xt(n,"width",e.imageWidth),xt(n,"height",e.imageHeight),n.className=h.image,Re(n,e,"image")},Ui=t=>{const e=document.createElement("li");return J(e,h["progress-step"]),fe(e,t),e},Di=t=>{const e=document.createElement("li");return J(e,h["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Mi=(t,e)=>{const n=So();if(!e.progressSteps||e.progressSteps.length===0)return he(n);le(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,r)=>{const s=Ui(o);if(n.appendChild(s),r===e.currentProgressStep&&J(s,h["active-progress-step"]),r!==e.progressSteps.length-1){const a=Di(e);n.appendChild(a)}})},$i=(t,e)=>{const n=Ao();Kt(n,e.title||e.titleText,"block"),e.title&&Sn(e.title,n),e.titleText&&(n.innerText=e.titleText),Re(n,e,"title")},Hi=(t,e)=>{const n=de(),o=Z();e.toast?(xt(n,"width",e.width),o.style.width="100%",o.insertBefore(it(),St())):xt(o,"width",e.width),xt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),he(zt()),ji(o,e)},ji=(t,e)=>{t.className=`${h.popup} ${ve(t)?e.showClass.popup:""}`,e.toast?(J([document.documentElement,document.body],h["toast-shown"]),J(t,h.toast)):J(t,h.modal),Re(t,e,"popup"),typeof e.customClass=="string"&&J(t,e.customClass),e.icon&&J(t,h[`icon-${e.icon}`])},Fo=(t,e)=>{Hi(t,e),ki(t,e),Mi(t,e),Li(t,e),Fi(t,e),$i(t,e),Ri(t,e),Ti(t,e),mi(t,e),Pi(t,e),typeof e.didRender=="function"&&e.didRender(Z())},ct=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Vi=()=>{xe(document.body.children).forEach(e=>{e===de()||e.contains(de())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Uo=()=>{xe(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Do=["swal-title","swal-html","swal-footer"],zi=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Xi(n),Object.assign(Wi(n),qi(n),Ki(n),Gi(n),Ji(n),Yi(n,Do))},Wi=t=>{const e={};return xe(t.querySelectorAll("swal-param")).forEach(n=>{et(n,["name","value"]);const o=n.getAttribute("name"),r=n.getAttribute("value");typeof st[o]=="boolean"&&r==="false"&&(e[o]=!1),typeof st[o]=="object"&&(e[o]=JSON.parse(r))}),e},qi=t=>{const e={};return xe(t.querySelectorAll("swal-button")).forEach(n=>{et(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${mn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ki=t=>{const e={},n=t.querySelector("swal-image");return n&&(et(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Gi=t=>{const e={},n=t.querySelector("swal-icon");return n&&(et(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Ji=t=>{const e={},n=t.querySelector("swal-input");n&&(et(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},xe(o).forEach(r=>{et(r,["value"]);const s=r.getAttribute("value"),a=r.innerHTML;e.inputOptions[s]=a})),e},Yi=(t,e)=>{const n={};for(const o in e){const r=e[o],s=t.querySelector(r);s&&(et(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Xi=t=>{const e=Do.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);xe(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&Ee(`Unrecognized element <${o}>`)})},et=(t,e)=>{xe(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Ee([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Mo={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Zi(t){t.inputValidator||Object.keys(Mo).forEach(e=>{t.input===e&&(t.inputValidator=Mo[e])})}function Qi(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),t.target="body")}function ea(t){Zi(t),t.showLoaderOnConfirm&&!t.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
60
60
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
61
61
  https://sweetalert2.github.io/#ajax-request`),Qi(t),typeof t.title=="string"&&(t.title=t.title.split(`
62
- `).join("<br />")),di(t)}class ta{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const na=()=>{at.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(at.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at.previousBodyPadding+pi()}px`)},oa=()=>{at.previousBodyPadding!==null&&(document.body.style.paddingRight=`${at.previousBodyPadding}px`,at.previousBodyPadding=null)},ra=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!He(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,J(document.body,h.iosfix),ia(),sa()}},sa=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Z().scrollHeight>window.innerHeight-44&&(de().style.paddingBottom="44px")},ia=()=>{const t=de();let e;t.ontouchstart=n=>{e=aa(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},aa=t=>{const e=t.target,n=de();return ca(t)||la(t)?!1:e===n||!To(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(To(Vt())&&Vt().contains(e))},ca=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",la=t=>t.touches&&t.touches.length>1,ua=()=>{if(He(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Fe(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Mo=10,da=t=>{const e=de(),n=Z();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;pa(e,n,t),setTimeout(()=>{fa(e,n)},Mo),kn()&&(ha(e,t.scrollbarPadding,r),Vi()),!qt()&&!W.previousActiveElement&&(W.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Fe(e,h["no-transition"])},$o=t=>{const e=Z();if(t.target!==e)return;const n=de();e.removeEventListener(vt,$o),n.style.overflowY="auto"},fa=(t,e)=>{vt&&Po(e)?(t.style.overflowY="hidden",e.addEventListener(vt,$o)):t.style.overflowY="auto"},ha=(t,e,n)=>{ra(),e&&n!=="hidden"&&na(),setTimeout(()=>{t.scrollTop=0})},pa=(t,e,n)=>{J(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{J(e,n.showClass.popup),e.style.removeProperty("opacity")},Mo),J([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&J([document.documentElement,document.body],h["height-auto"])},lt=t=>{let e=Z();e||new dt,e=Z();const n=it();qt()?he(St()):ma(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ma=(t,e)=>{const n=_t(),o=it();!e&&ve(Be())&&(e=Be()),le(n),e&&(he(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),J([t,n],h.loading)},ga=(t,e)=>{e.input==="select"||e.input==="radio"?ka(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(gn(e.inputValue)||yn(e.inputValue))&&(lt(Be()),Aa(t,e))},ya=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return ba(n);case"radio":return wa(n);case"file":return Ea(n);default:return e.inputAutoTrim?n.value.trim():n.value}},ba=t=>t.checked?1:0,wa=t=>t.checked?t.value:null,Ea=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,ka=(t,e)=>{const n=Z(),o=r=>Ca[e.input](n,vn(r),e);gn(e.inputOptions)||yn(e.inputOptions)?(lt(Be()),kt(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Xe(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Aa=(t,e)=>{const n=t.getInput();he(n),kt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Xe(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},Ca={select:(t,e,n)=>{const o=Ke(t,h.select),r=(s,a,f)=>{const u=document.createElement("option");u.value=f,fe(u,a),u.selected=Ho(f,n.inputValue),s.appendChild(u)};e.forEach(s=>{const a=s[0],f=s[1];if(Array.isArray(f)){const u=document.createElement("optgroup");u.label=a,u.disabled=!1,o.appendChild(u),f.forEach(w=>r(u,w[1],w[0]))}else r(o,f,a)}),o.focus()},radio:(t,e,n)=>{const o=Ke(t,h.radio);e.forEach(s=>{const a=s[0],f=s[1],u=document.createElement("input"),w=document.createElement("label");u.type="radio",u.name=h.radio,u.value=a,Ho(a,n.inputValue)&&(u.checked=!0);const E=document.createElement("span");fe(E,f),E.className=h.label,w.appendChild(u),w.appendChild(E),o.appendChild(w)});const r=o.querySelectorAll("input");r.length&&r[0].focus()}},vn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=vn(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=vn(o)),e.push([n,o])}),e},Ho=(t,e)=>e&&e.toString()===t.toString();function jo(){const t=K.innerParams.get(this);if(!t)return;const e=K.domCache.get(this);he(e.loader),qt()?t.icon&&le(St()):Sa(e),Fe([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Sa=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):ei()&&he(t.actions)};function _a(t){const e=K.innerParams.get(t||this),n=K.domCache.get(t||this);return n?An(n.popup,e.input):null}const Pt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},xa=()=>ve(Z()),Vo=()=>Be()&&Be().click(),va=()=>qe()&&qe().click(),Ta=()=>Ze()&&Ze().click(),zo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Pa=(t,e,n,o)=>{zo(e),n.toast||(e.keydownHandler=r=>La(t,r,o),e.keydownTarget=n.keydownListenerCapture?window:Z(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Tn=(t,e,n)=>{const o=En();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Z().focus()},Wo=["ArrowRight","ArrowDown"],Ra=["ArrowLeft","ArrowUp"],La=(t,e,n)=>{const o=K.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Oa(t,e,o):e.key==="Tab"?Ia(e,o):[...Wo,...Ra].includes(e.key)?Ba(e.key):e.key==="Escape"&&Na(e,o,n)))},Oa=(t,e,n)=>{if(jt(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Vo(),e.preventDefault()}},Ia=(t,e)=>{const n=t.target,o=En();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?Tn(e,r,-1):Tn(e,r,1),t.stopPropagation(),t.preventDefault()},Ba=t=>{const e=Be(),n=qe(),o=Ze();if(![e,n,o].includes(document.activeElement))return;const r=Wo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let a=0;a<_t().children.length;a++){if(s=s[r],!s)return;if(ve(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Na=(t,e,n)=>{jt(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function qo(t,e,n,o){qt()?Ko(t,o):(ri(n).then(()=>Ko(t,o)),zo(W)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),kn()&&(oa(),ua(),Fo()),Fa()}function Fa(){Fe([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function Gt(t){t=$a(t);const e=Pt.swalPromiseResolve.get(this),n=Da(this);this.isAwaitingPromise()?t.isDismissed||(Rt(this),e(t)):n&&e(t)}function Ua(){return!!K.awaitingPromise.get(this)}const Da=t=>{const e=Z();if(!e)return!1;const n=K.innerParams.get(t);if(!n||He(e,n.hideClass.popup))return!1;Fe(e,n.showClass.popup),J(e,n.hideClass.popup);const o=de();return Fe(o,n.showClass.backdrop),J(o,n.hideClass.backdrop),Ha(t,e,n),!0};function Ma(t){const e=Pt.swalPromiseReject.get(this);Rt(this),e&&e(t)}const Rt=t=>{t.isAwaitingPromise()&&(K.awaitingPromise.delete(t),K.innerParams.get(t)||t._destroy())},$a=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Ha=(t,e,n)=>{const o=de(),r=vt&&Po(e);typeof n.willClose=="function"&&n.willClose(e),r?ja(t,e,o,n.returnFocus,n.didClose):qo(t,o,n.returnFocus,n.didClose)},ja=(t,e,n,o,r)=>{W.swalCloseEventFinishedCallback=qo.bind(null,t,n,o,r),e.addEventListener(vt,function(s){s.target===e&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback)})},Ko=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Go(t,e,n){const o=K.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Jo(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let r=0;r<o.length;r++)o[r].disabled=e}else t.disabled=e}function Va(){Go(this,["confirmButton","denyButton","cancelButton"],!1)}function za(){Go(this,["confirmButton","denyButton","cancelButton"],!0)}function Wa(){return Jo(this.getInput(),!1)}function qa(){return Jo(this.getInput(),!0)}function Ka(t){const e=K.domCache.get(this),n=K.innerParams.get(this);fe(e.validationMessage,t),e.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&J(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),_o(o),J(o,h.inputerror))}function Ga(){const t=K.domCache.get(this);t.validationMessage&&he(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Fe(e,h.inputerror))}function Ja(){return K.domCache.get(this).progressSteps}function Ya(t){const e=Z(),n=K.innerParams.get(this);if(!e||He(e,n.hideClass.popup))return Ee("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=Xa(t),r=Object.assign({},n,o);No(this,r),K.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Xa=t=>{const e={};return Object.keys(t).forEach(n=>{wo(n)?e[n]=t[n]:Ee(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
62
+ `).join("<br />")),di(t)}class ta{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const na=()=>{at.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(at.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at.previousBodyPadding+pi()}px`)},oa=()=>{at.previousBodyPadding!==null&&(document.body.style.paddingRight=`${at.previousBodyPadding}px`,at.previousBodyPadding=null)},ra=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!He(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,J(document.body,h.iosfix),ia(),sa()}},sa=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Z().scrollHeight>window.innerHeight-44&&(de().style.paddingBottom="44px")},ia=()=>{const t=de();let e;t.ontouchstart=n=>{e=aa(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},aa=t=>{const e=t.target,n=de();return ca(t)||la(t)?!1:e===n||!Po(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Po(Vt())&&Vt().contains(e))},ca=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",la=t=>t.touches&&t.touches.length>1,ua=()=>{if(He(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Fe(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},$o=10,da=t=>{const e=de(),n=Z();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;pa(e,n,t),setTimeout(()=>{fa(e,n)},$o),kn()&&(ha(e,t.scrollbarPadding,r),Vi()),!qt()&&!W.previousActiveElement&&(W.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Fe(e,h["no-transition"])},Ho=t=>{const e=Z();if(t.target!==e)return;const n=de();e.removeEventListener(vt,Ho),n.style.overflowY="auto"},fa=(t,e)=>{vt&&Ro(e)?(t.style.overflowY="hidden",e.addEventListener(vt,Ho)):t.style.overflowY="auto"},ha=(t,e,n)=>{ra(),e&&n!=="hidden"&&na(),setTimeout(()=>{t.scrollTop=0})},pa=(t,e,n)=>{J(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{J(e,n.showClass.popup),e.style.removeProperty("opacity")},$o),J([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&J([document.documentElement,document.body],h["height-auto"])},lt=t=>{let e=Z();e||new dt,e=Z();const n=it();qt()?he(St()):ma(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ma=(t,e)=>{const n=_t(),o=it();!e&&ve(Be())&&(e=Be()),le(n),e&&(he(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),J([t,n],h.loading)},ga=(t,e)=>{e.input==="select"||e.input==="radio"?ka(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(gn(e.inputValue)||yn(e.inputValue))&&(lt(Be()),Aa(t,e))},ya=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return ba(n);case"radio":return wa(n);case"file":return Ea(n);default:return e.inputAutoTrim?n.value.trim():n.value}},ba=t=>t.checked?1:0,wa=t=>t.checked?t.value:null,Ea=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,ka=(t,e)=>{const n=Z(),o=r=>Ca[e.input](n,vn(r),e);gn(e.inputOptions)||yn(e.inputOptions)?(lt(Be()),kt(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Xe(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Aa=(t,e)=>{const n=t.getInput();he(n),kt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Xe(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},Ca={select:(t,e,n)=>{const o=Ke(t,h.select),r=(s,a,f)=>{const u=document.createElement("option");u.value=f,fe(u,a),u.selected=jo(f,n.inputValue),s.appendChild(u)};e.forEach(s=>{const a=s[0],f=s[1];if(Array.isArray(f)){const u=document.createElement("optgroup");u.label=a,u.disabled=!1,o.appendChild(u),f.forEach(w=>r(u,w[1],w[0]))}else r(o,f,a)}),o.focus()},radio:(t,e,n)=>{const o=Ke(t,h.radio);e.forEach(s=>{const a=s[0],f=s[1],u=document.createElement("input"),w=document.createElement("label");u.type="radio",u.name=h.radio,u.value=a,jo(a,n.inputValue)&&(u.checked=!0);const E=document.createElement("span");fe(E,f),E.className=h.label,w.appendChild(u),w.appendChild(E),o.appendChild(w)});const r=o.querySelectorAll("input");r.length&&r[0].focus()}},vn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=vn(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=vn(o)),e.push([n,o])}),e},jo=(t,e)=>e&&e.toString()===t.toString();function Vo(){const t=K.innerParams.get(this);if(!t)return;const e=K.domCache.get(this);he(e.loader),qt()?t.icon&&le(St()):Sa(e),Fe([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Sa=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):ei()&&he(t.actions)};function _a(t){const e=K.innerParams.get(t||this),n=K.domCache.get(t||this);return n?An(n.popup,e.input):null}const Pt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},xa=()=>ve(Z()),zo=()=>Be()&&Be().click(),va=()=>qe()&&qe().click(),Ta=()=>Ze()&&Ze().click(),Wo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Pa=(t,e,n,o)=>{Wo(e),n.toast||(e.keydownHandler=r=>La(t,r,o),e.keydownTarget=n.keydownListenerCapture?window:Z(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Tn=(t,e,n)=>{const o=En();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Z().focus()},qo=["ArrowRight","ArrowDown"],Ra=["ArrowLeft","ArrowUp"],La=(t,e,n)=>{const o=K.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Oa(t,e,o):e.key==="Tab"?Ia(e,o):[...qo,...Ra].includes(e.key)?Ba(e.key):e.key==="Escape"&&Na(e,o,n)))},Oa=(t,e,n)=>{if(jt(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;zo(),e.preventDefault()}},Ia=(t,e)=>{const n=t.target,o=En();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?Tn(e,r,-1):Tn(e,r,1),t.stopPropagation(),t.preventDefault()},Ba=t=>{const e=Be(),n=qe(),o=Ze();if(![e,n,o].includes(document.activeElement))return;const r=qo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let a=0;a<_t().children.length;a++){if(s=s[r],!s)return;if(ve(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Na=(t,e,n)=>{jt(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function Ko(t,e,n,o){qt()?Go(t,o):(ri(n).then(()=>Go(t,o)),Wo(W)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),kn()&&(oa(),ua(),Uo()),Fa()}function Fa(){Fe([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function Gt(t){t=$a(t);const e=Pt.swalPromiseResolve.get(this),n=Da(this);this.isAwaitingPromise()?t.isDismissed||(Rt(this),e(t)):n&&e(t)}function Ua(){return!!K.awaitingPromise.get(this)}const Da=t=>{const e=Z();if(!e)return!1;const n=K.innerParams.get(t);if(!n||He(e,n.hideClass.popup))return!1;Fe(e,n.showClass.popup),J(e,n.hideClass.popup);const o=de();return Fe(o,n.showClass.backdrop),J(o,n.hideClass.backdrop),Ha(t,e,n),!0};function Ma(t){const e=Pt.swalPromiseReject.get(this);Rt(this),e&&e(t)}const Rt=t=>{t.isAwaitingPromise()&&(K.awaitingPromise.delete(t),K.innerParams.get(t)||t._destroy())},$a=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Ha=(t,e,n)=>{const o=de(),r=vt&&Ro(e);typeof n.willClose=="function"&&n.willClose(e),r?ja(t,e,o,n.returnFocus,n.didClose):Ko(t,o,n.returnFocus,n.didClose)},ja=(t,e,n,o,r)=>{W.swalCloseEventFinishedCallback=Ko.bind(null,t,n,o,r),e.addEventListener(vt,function(s){s.target===e&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback)})},Go=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Jo(t,e,n){const o=K.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Yo(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let r=0;r<o.length;r++)o[r].disabled=e}else t.disabled=e}function Va(){Jo(this,["confirmButton","denyButton","cancelButton"],!1)}function za(){Jo(this,["confirmButton","denyButton","cancelButton"],!0)}function Wa(){return Yo(this.getInput(),!1)}function qa(){return Yo(this.getInput(),!0)}function Ka(t){const e=K.domCache.get(this),n=K.innerParams.get(this);fe(e.validationMessage,t),e.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&J(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),xo(o),J(o,h.inputerror))}function Ga(){const t=K.domCache.get(this);t.validationMessage&&he(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Fe(e,h.inputerror))}function Ja(){return K.domCache.get(this).progressSteps}function Ya(t){const e=Z(),n=K.innerParams.get(this);if(!e||He(e,n.hideClass.popup))return Ee("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=Xa(t),r=Object.assign({},n,o);Fo(this,r),K.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Xa=t=>{const e={};return Object.keys(t).forEach(n=>{Eo(n)?e[n]=t[n]:Ee(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
63
63
 
64
- If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function Za(){const t=K.domCache.get(this),e=K.innerParams.get(this);if(!e){Yo(this);return}t.popup&&W.swalCloseEventFinishedCallback&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback),W.deferDisposalTimer&&(clearTimeout(W.deferDisposalTimer),delete W.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Qa(this)}const Qa=t=>{Yo(t),delete t.params,delete W.keydownHandler,delete W.keydownTarget,delete W.currentInstance},Yo=t=>{t.isAwaitingPromise()?(Pn(K,t),K.awaitingPromise.set(t,!0)):(Pn(Pt,t),Pn(K,t))},Pn=(t,e)=>{for(const n in t)t[n].delete(e)},Xo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Za,close:Gt,closeModal:Gt,closePopup:Gt,closeToast:Gt,disableButtons:za,disableInput:qa,disableLoading:jo,enableButtons:Va,enableInput:Wa,getInput:_a,getProgressSteps:Ja,handleAwaitingPromise:Rt,hideLoading:jo,isAwaitingPromise:Ua,rejectPromise:Ma,resetValidationMessage:Ga,showValidationMessage:Ka,update:Ya},Symbol.toStringTag,{value:"Module"})),ec=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.input?Zo(t,"confirm"):Ln(t,!0)},tc=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Zo(t,"deny"):Rn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Zo=(t,e)=>{const n=K.innerParams.get(t);if(!n.input)return Xe(`The "input" parameter is needed to be set when using returnInputValueOn${mn(e)}`);const o=ya(t,n);n.inputValidator?oc(t,o,e):t.getInput().checkValidity()?e==="deny"?Rn(t,o):Ln(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},oc=(t,e,n)=>{const o=K.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>kt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Rn(t,e):Ln(t,e)})},Rn=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnDeny&&lt(qe()),n.preDeny?(K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Rt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>er(t||globalThis,r))):t.closePopup({isDenied:!0,value:e})},Qo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},er=(t,e)=>{t.rejectPromise(e)},Ln=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preConfirm(e,n.validationMessage))).then(r=>{ve(zt())||r===!1?(t.hideLoading(),Rt(t)):Qo(t,typeof r>"u"?e:r)}).catch(r=>er(t||globalThis,r))):Qo(t,e)},rc=(t,e,n)=>{K.innerParams.get(t).toast?sc(t,e,n):(ac(e),cc(e),lc(t,e,n))},sc=(t,e,n)=>{e.popup.onclick=()=>{const o=K.innerParams.get(t);o&&(ic(o)||o.timer||o.input)||n(ct.close)}},ic=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Jt=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Jt=!0)}}},cc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Jt=!0)}}},lc=(t,e,n)=>{e.container.onclick=o=>{const r=K.innerParams.get(t);if(Jt){Jt=!1;return}o.target===e.container&&jt(r.allowOutsideClick)&&n(ct.backdrop)}},uc=t=>typeof t=="object"&&t.jquery,tr=t=>t instanceof Element||uc(t),dc=t=>{const e={};return typeof t[0]=="object"&&!tr(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||tr(r)?e[n]=r:r!==void 0&&Xe(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function fc(...t){const e=this;return new e(...t)}function hc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const pc=()=>W.timeout&&W.timeout.getTimerLeft(),nr=()=>{if(W.timeout)return ti(),W.timeout.stop()},or=()=>{if(W.timeout){const t=W.timeout.start();return Cn(t),t}},mc=()=>{const t=W.timeout;return t&&(t.running?nr():or())},gc=t=>{if(W.timeout){const e=W.timeout.increase(t);return Cn(e,!0),e}},yc=()=>W.timeout&&W.timeout.isRunning();let rr=!1;const On={};function bc(t="data-swal-template"){On[t]=this,rr||(document.body.addEventListener("click",wc),rr=!0)}const wc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in On){const o=e.getAttribute(n);if(o){On[n].fire({template:o});return}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:dc,bindClickHandler:bc,clickCancel:Ta,clickConfirm:Vo,clickDeny:va,enableLoading:lt,fire:fc,getActions:_t,getCancelButton:Ze,getCloseButton:wn,getConfirmButton:Be,getContainer:de,getDenyButton:qe,getFocusableElements:En,getFooter:So,getHtmlContainer:Vt,getIcon:St,getImage:Ao,getInputLabel:Ys,getLoader:it,getPopup:Z,getTimerLeft:pc,getTimerProgressBar:Wt,getTitle:ko,getValidationMessage:zt,increaseTimer:gc,isDeprecatedParameter:bn,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:wo,isValidParameter:bo,isVisible:xa,mixin:hc,resumeTimer:or,showLoading:lt,stopTimer:nr,toggleTimer:mc},Symbol.toStringTag,{value:"Module"}));let In;class ut{constructor(...e){if(typeof window>"u")return;In=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);K.promise.set(this,o)}_main(e,n={}){Gs(Object.assign({},n,e)),W.currentInstance&&(W.currentInstance._destroy(),kn()&&Fo()),W.currentInstance=this;const o=Ac(e,n);ea(o),Object.freeze(o),W.timeout&&(W.timeout.stop(),delete W.timeout),clearTimeout(W.restoreFocusTimeout);const r=Cc(this);return No(this,o),K.innerParams.set(this,o),kc(this,r,o)}then(e){return K.promise.get(this).then(e)}finally(e){return K.promise.get(this).finally(e)}}const kc=(t,e,n)=>new Promise((o,r)=>{const s=a=>{t.closePopup({isDismissed:!0,dismiss:a})};Pt.swalPromiseResolve.set(t,o),Pt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>ec(t),e.denyButton.onclick=()=>tc(t),e.cancelButton.onclick=()=>nc(t,s),e.closeButton.onclick=()=>s(ct.close),rc(t,e,s),Pa(t,W,n,s),ga(t,n),da(n),Sc(W,n,s),_c(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ac=(t,e)=>{const n=zi(t),o=Object.assign({},st,e,n,t);return o.showClass=Object.assign({},st.showClass,o.showClass),o.hideClass=Object.assign({},st.hideClass,o.hideClass),o},Cc=t=>{const e={popup:Z(),container:de(),actions:_t(),confirmButton:Be(),denyButton:qe(),cancelButton:Ze(),loader:it(),closeButton:wn(),validationMessage:zt(),progressSteps:Co()};return K.domCache.set(t,e),e},Sc=(t,e,n)=>{const o=Wt();he(o),e.timer&&(t.timeout=new ta(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Re(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Cn(e.timer)})))},_c=(t,e)=>{if(!e.toast){if(!jt(e.allowEnterKey))return vc();xc(t,e)||Tn(e,-1,1)}},xc=(t,e)=>e.focusDeny&&ve(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ve(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ve(t.confirmButton)?(t.confirmButton.focus(),!0):!1,vc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Xo),Object.assign(ut,Ec),Object.keys(Xo).forEach(t=>{ut[t]=function(...e){if(In)return In[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:sr,setPrototypeOf:ir,isFrozen:Tc,getPrototypeOf:Pc,getOwnPropertyDescriptor:ar}=Object;let{freeze:ge,seal:Ne,create:cr}=Object,{apply:Bn,construct:Nn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Ne||(Ne=function(e){return e}),Bn||(Bn=function(e,n,o){return e.apply(n,o)}),Nn||(Nn=function(e,n){return new e(...n)});const Yt=Le(Array.prototype.forEach),lr=Le(Array.prototype.pop),Lt=Le(Array.prototype.push),Xt=Le(String.prototype.toLowerCase),Fn=Le(String.prototype.toString),Rc=Le(String.prototype.match),Ot=Le(String.prototype.replace),Lc=Le(String.prototype.indexOf),Oc=Le(String.prototype.trim),Te=Le(RegExp.prototype.test),It=Ic(TypeError);function Le(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return Bn(t,e,o)}}function Ic(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Nn(t,n)}}function q(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xt;ir&&ir(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(Tc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function ft(t){const e=cr(null);for(const[n,o]of sr(t))ar(t,n)!==void 0&&(e[n]=o);return e}function Zt(t,e){for(;t!==null;){const o=ar(t,e);if(o){if(o.get)return Le(o.get);if(typeof o.value=="function")return Le(o.value)}t=Pc(t)}function n(o){return console.warn("fallback value for",o),null}return n}const ur=ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Un=ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dn=ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bc=ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mn=ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Nc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=ge(["#text"]),fr=ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$n=ge(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hr=ge(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qt=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fc=Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uc=Ne(/<%[\w\W]*|[\w\W]*%>/gm),Dc=Ne(/\${[\w\W]*}/gm),Mc=Ne(/^data-[\-\w.\u00B7-\uFFFF]/),$c=Ne(/^aria-[\-\w]+$/),pr=Ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hc=Ne(/^(?:\w+script|data):/i),jc=Ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mr=Ne(/^html$/i);var gr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Fc,ERB_EXPR:Uc,TMPLIT_EXPR:Dc,DATA_ATTR:Mc,ARIA_ATTR:$c,IS_ALLOWED_URI:pr,IS_SCRIPT_OR_DATA:Hc,ATTR_WHITESPACE:jc,DOCTYPE_NAME:mr});const Vc=function(){return typeof window>"u"?null:window},zc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function yr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vc();const e=F=>yr(F);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:X,trustedTypes:M}=t,B=u.prototype,N=Zt(B,"cloneNode"),$=Zt(B,"nextSibling"),ee=Zt(B,"childNodes"),oe=Zt(B,"parentNode");if(typeof a=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let j,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let v={};e.isSupported=typeof sr=="function"&&typeof oe=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:x,ERB_EXPR:V,TMPLIT_EXPR:k,DATA_ATTR:z,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=gr;let{IS_ALLOWED_URI:be}=gr,D=null;const Ae=q({},[...ur,...Un,...Dn,...Mn,...dr]);let i=null;const d=q({},[...fr,...$n,...hr,...Qt]);let m=Object.seal(cr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,y=null,R=!0,A=!0,S=!1,O=!0,L=!1,H=!1,G=!1,Ce=!1,we=!1,ue=!1,$e=!1,os=!0,rs=!1;const Zu="user-content-";let io=!0,Mt=!1,gt={},yt=null;const ss=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let is=null;const as=q({},["audio","video","img","source","image","track"]);let ao=null;const cs=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",fn="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let bt=Ve,co=!1,lo=null;const Qu=q({},[dn,fn,Ve],Fn);let tt=null;const ed=["application/xhtml+xml","text/html"],td="text/html";let ce=null,wt=null;const nd=n.createElement("form"),ls=function(l){return l instanceof RegExp||l instanceof Function},uo=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wt&&wt===l)){if((!l||typeof l!="object")&&(l={}),l=ft(l),tt=ed.indexOf(l.PARSER_MEDIA_TYPE)===-1?tt=td:tt=l.PARSER_MEDIA_TYPE,ce=tt==="application/xhtml+xml"?Fn:Xt,D="ALLOWED_TAGS"in l?q({},l.ALLOWED_TAGS,ce):Ae,i="ALLOWED_ATTR"in l?q({},l.ALLOWED_ATTR,ce):d,lo="ALLOWED_NAMESPACES"in l?q({},l.ALLOWED_NAMESPACES,Fn):Qu,ao="ADD_URI_SAFE_ATTR"in l?q(ft(cs),l.ADD_URI_SAFE_ATTR,ce):cs,is="ADD_DATA_URI_TAGS"in l?q(ft(as),l.ADD_DATA_URI_TAGS,ce):as,yt="FORBID_CONTENTS"in l?q({},l.FORBID_CONTENTS,ce):ss,C="FORBID_TAGS"in l?q({},l.FORBID_TAGS,ce):{},y="FORBID_ATTR"in l?q({},l.FORBID_ATTR,ce):{},gt="USE_PROFILES"in l?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,A=l.ALLOW_DATA_ATTR!==!1,S=l.ALLOW_UNKNOWN_PROTOCOLS||!1,O=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=l.SAFE_FOR_TEMPLATES||!1,H=l.WHOLE_DOCUMENT||!1,we=l.RETURN_DOM||!1,ue=l.RETURN_DOM_FRAGMENT||!1,$e=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,os=l.SANITIZE_DOM!==!1,rs=l.SANITIZE_NAMED_PROPS||!1,io=l.KEEP_CONTENT!==!1,Mt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||pr,bt=l.NAMESPACE||Ve,m=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(A=!1),ue&&(we=!0),gt&&(D=q({},[...dr]),i=[],gt.html===!0&&(q(D,ur),q(i,fr)),gt.svg===!0&&(q(D,Un),q(i,$n),q(i,Qt)),gt.svgFilters===!0&&(q(D,Dn),q(i,$n),q(i,Qt)),gt.mathMl===!0&&(q(D,Mn),q(i,hr),q(i,Qt))),l.ADD_TAGS&&(D===Ae&&(D=ft(D)),q(D,l.ADD_TAGS,ce)),l.ADD_ATTR&&(i===d&&(i=ft(i)),q(i,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&q(ao,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(yt===ss&&(yt=ft(yt)),q(yt,l.FORBID_CONTENTS,ce)),io&&(D["#text"]=!0),H&&q(D,["html","head","body"]),D.table&&(q(D,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=l.TRUSTED_TYPES_POLICY,ye=j.createHTML("")}else j===void 0&&(j=zc(M,r)),j!==null&&typeof ye=="string"&&(ye=j.createHTML(""));ge&&ge(l),wt=l}},us=q({},["mi","mo","mn","ms","mtext"]),ds=q({},["foreignobject","desc","title","annotation-xml"]),od=q({},["title","style","font","a","script"]),hn=q({},Un);q(hn,Dn),q(hn,Bc);const fo=q({},Mn);q(fo,Nc);const rd=function(l){let _=oe(l);(!_||!_.tagName)&&(_={namespaceURI:bt,tagName:"template"});const I=Xt(l.tagName),ne=Xt(_.tagName);return lo[l.namespaceURI]?l.namespaceURI===fn?_.namespaceURI===Ve?I==="svg":_.namespaceURI===dn?I==="svg"&&(ne==="annotation-xml"||us[ne]):!!hn[I]:l.namespaceURI===dn?_.namespaceURI===Ve?I==="math":_.namespaceURI===fn?I==="math"&&ds[ne]:!!fo[I]:l.namespaceURI===Ve?_.namespaceURI===fn&&!ds[ne]||_.namespaceURI===dn&&!us[ne]?!1:!fo[I]&&(od[I]||!hn[I]):!!(tt==="application/xhtml+xml"&&lo[l.namespaceURI]):!1},nt=function(l){Lt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},ho=function(l,_){try{Lt(e.removed,{attribute:_.getAttributeNode(l),from:_})}catch{Lt(e.removed,{attribute:null,from:_})}if(_.removeAttribute(l),l==="is"&&!i[l])if(we||ue)try{nt(_)}catch{}else try{_.setAttribute(l,"")}catch{}},fs=function(l){let _=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Rc(l,/^[\r\n\t ]+/);I=me&&me[0]}tt==="application/xhtml+xml"&&bt===Ve&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=j?j.createHTML(l):l;if(bt===Ve)try{_=new X().parseFromString(ne,tt)}catch{}if(!_||!_.documentElement){_=ae.createDocument(bt,"template",null);try{_.documentElement.innerHTML=co?ye:ne}catch{}}const pe=_.body||_.documentElement;return l&&I&&pe.insertBefore(n.createTextNode(I),pe.childNodes[0]||null),bt===Ve?U.call(_,H?"html":"body")[0]:H?_.documentElement:pe},hs=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},sd=function(l){return l instanceof b&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof E)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},ps=function(l){return typeof f=="function"&&l instanceof f},ze=function(l,_,I){v[l]&&Yt(v[l],ne=>{ne.call(e,_,I,wt)})},ms=function(l){let _=null;if(ze("beforeSanitizeElements",l,null),sd(l))return nt(l),!0;const I=ce(l.nodeName);if(ze("uponSanitizeElement",l,{tagName:I,allowedTags:D}),l.hasChildNodes()&&!ps(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return nt(l),!0;if(!D[I]||C[I]){if(!C[I]&&ys(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(io&&!yt[I]){const ne=oe(l)||l.parentNode,pe=ee(l)||l.childNodes;if(pe&&ne){const me=pe.length;for(let Se=me-1;Se>=0;--Se)ne.insertBefore(N(pe[Se],!0),$(l))}}return nt(l),!0}return l instanceof u&&!rd(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(nt(l),!0):(L&&l.nodeType===3&&(_=l.textContent,Yt([x,V,k],ne=>{_=Ot(_,ne," ")}),l.textContent!==_&&(Lt(e.removed,{element:l.cloneNode()}),l.textContent=_)),ze("afterSanitizeElements",l,null),!1)},gs=function(l,_,I){if(os&&(_==="id"||_==="name")&&(I in n||I in nd))return!1;if(!(A&&!y[_]&&Te(z,_))){if(!(R&&Te(te,_))){if(!i[_]||y[_]){if(!(ys(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,_)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(_))||_==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!ao[_]){if(!Te(be,Ot(I,se,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&l!=="script"&&Lc(I,"data:")===0&&is[l])){if(!(S&&!Te(ie,Ot(I,se,"")))){if(I)return!1}}}}}}return!0},ys=function(l){return l.indexOf("-")>0},bs=function(l){ze("beforeSanitizeAttributes",l,null);const{attributes:_}=l;if(!_)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:i};let ne=_.length;for(;ne--;){const pe=_[ne],{name:me,namespaceURI:Se,value:ot}=pe,$t=ce(me);let _e=me==="value"?ot:Oc(ot);if(I.attrName=$t,I.attrValue=_e,I.keepAttr=!0,I.forceKeepAttr=void 0,ze("uponSanitizeAttribute",l,I),_e=I.attrValue,I.forceKeepAttr||(ho(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,_e)){ho(me,l);continue}L&&Yt([x,V,k],Es=>{_e=Ot(_e,Es," ")});const ws=ce(l.nodeName);if(gs(ws,$t,_e)){if(rs&&($t==="id"||$t==="name")&&(ho(me,l),_e=Zu+_e),j&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!Se)switch(M.getAttributeType(ws,$t)){case"TrustedHTML":{_e=j.createHTML(_e);break}case"TrustedScriptURL":{_e=j.createScriptURL(_e);break}}try{Se?l.setAttributeNS(Se,me,_e):l.setAttribute(me,_e),lr(e.removed)}catch{}}}ze("afterSanitizeAttributes",l,null)},id=function F(l){let _=null;const I=hs(l);for(ze("beforeSanitizeShadowDOM",l,null);_=I.nextNode();)ze("uponSanitizeShadowNode",_,null),!ms(_)&&(_.content instanceof s&&F(_.content),bs(_));ze("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,I=null,ne=null,pe=null;if(co=!F,co&&(F="<!-->"),typeof F!="string"&&!ps(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return F;if(G||uo(l),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const ot=ce(F.nodeName);if(!D[ot]||C[ot])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)_=fs("<!---->"),I=_.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?_=I:_.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return j&&$e?j.createHTML(F):F;if(_=fs(F),!_)return we?null:$e?ye:""}_&&Ce&&nt(_.firstChild);const me=hs(Mt?F:_);for(;ne=me.nextNode();)ms(ne)||(ne.content instanceof s&&id(ne.content),bs(ne));if(Mt)return F;if(we){if(ue)for(pe=T.call(_.ownerDocument);_.firstChild;)pe.appendChild(_.firstChild);else pe=_;return(i.shadowroot||i.shadowrootmode)&&(pe=P.call(o,pe,!0)),pe}let Se=H?_.outerHTML:_.innerHTML;return H&&D["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Te(mr,_.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
65
- `+Se),L&&Yt([x,V,k],ot=>{Se=Ot(Se,ot," ")}),j&&$e?j.createHTML(Se):Se},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uo(F),G=!0},e.clearConfig=function(){wt=null,G=!1},e.isValidAttribute=function(F,l,_){wt||uo({});const I=ce(F),ne=ce(l);return gs(I,ne,_)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Lt(v[F],l))},e.removeHook=function(F){if(v[F])return lr(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var br=yr();class Wc{get IsVisible(){return dt.isVisible()}async ConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:br.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
64
+ If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function Za(){const t=K.domCache.get(this),e=K.innerParams.get(this);if(!e){Xo(this);return}t.popup&&W.swalCloseEventFinishedCallback&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback),W.deferDisposalTimer&&(clearTimeout(W.deferDisposalTimer),delete W.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Qa(this)}const Qa=t=>{Xo(t),delete t.params,delete W.keydownHandler,delete W.keydownTarget,delete W.currentInstance},Xo=t=>{t.isAwaitingPromise()?(Pn(K,t),K.awaitingPromise.set(t,!0)):(Pn(Pt,t),Pn(K,t))},Pn=(t,e)=>{for(const n in t)t[n].delete(e)},Zo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Za,close:Gt,closeModal:Gt,closePopup:Gt,closeToast:Gt,disableButtons:za,disableInput:qa,disableLoading:Vo,enableButtons:Va,enableInput:Wa,getInput:_a,getProgressSteps:Ja,handleAwaitingPromise:Rt,hideLoading:Vo,isAwaitingPromise:Ua,rejectPromise:Ma,resetValidationMessage:Ga,showValidationMessage:Ka,update:Ya},Symbol.toStringTag,{value:"Module"})),ec=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.input?Qo(t,"confirm"):Ln(t,!0)},tc=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Qo(t,"deny"):Rn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Qo=(t,e)=>{const n=K.innerParams.get(t);if(!n.input)return Xe(`The "input" parameter is needed to be set when using returnInputValueOn${mn(e)}`);const o=ya(t,n);n.inputValidator?oc(t,o,e):t.getInput().checkValidity()?e==="deny"?Rn(t,o):Ln(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},oc=(t,e,n)=>{const o=K.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>kt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Rn(t,e):Ln(t,e)})},Rn=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnDeny&&lt(qe()),n.preDeny?(K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Rt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>tr(t||globalThis,r))):t.closePopup({isDenied:!0,value:e})},er=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},tr=(t,e)=>{t.rejectPromise(e)},Ln=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preConfirm(e,n.validationMessage))).then(r=>{ve(zt())||r===!1?(t.hideLoading(),Rt(t)):er(t,typeof r>"u"?e:r)}).catch(r=>tr(t||globalThis,r))):er(t,e)},rc=(t,e,n)=>{K.innerParams.get(t).toast?sc(t,e,n):(ac(e),cc(e),lc(t,e,n))},sc=(t,e,n)=>{e.popup.onclick=()=>{const o=K.innerParams.get(t);o&&(ic(o)||o.timer||o.input)||n(ct.close)}},ic=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Jt=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Jt=!0)}}},cc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Jt=!0)}}},lc=(t,e,n)=>{e.container.onclick=o=>{const r=K.innerParams.get(t);if(Jt){Jt=!1;return}o.target===e.container&&jt(r.allowOutsideClick)&&n(ct.backdrop)}},uc=t=>typeof t=="object"&&t.jquery,nr=t=>t instanceof Element||uc(t),dc=t=>{const e={};return typeof t[0]=="object"&&!nr(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||nr(r)?e[n]=r:r!==void 0&&Xe(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function fc(...t){const e=this;return new e(...t)}function hc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const pc=()=>W.timeout&&W.timeout.getTimerLeft(),or=()=>{if(W.timeout)return ti(),W.timeout.stop()},rr=()=>{if(W.timeout){const t=W.timeout.start();return Cn(t),t}},mc=()=>{const t=W.timeout;return t&&(t.running?or():rr())},gc=t=>{if(W.timeout){const e=W.timeout.increase(t);return Cn(e,!0),e}},yc=()=>W.timeout&&W.timeout.isRunning();let sr=!1;const On={};function bc(t="data-swal-template"){On[t]=this,sr||(document.body.addEventListener("click",wc),sr=!0)}const wc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in On){const o=e.getAttribute(n);if(o){On[n].fire({template:o});return}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:dc,bindClickHandler:bc,clickCancel:Ta,clickConfirm:zo,clickDeny:va,enableLoading:lt,fire:fc,getActions:_t,getCancelButton:Ze,getCloseButton:wn,getConfirmButton:Be,getContainer:de,getDenyButton:qe,getFocusableElements:En,getFooter:_o,getHtmlContainer:Vt,getIcon:St,getImage:Co,getInputLabel:Ys,getLoader:it,getPopup:Z,getTimerLeft:pc,getTimerProgressBar:Wt,getTitle:Ao,getValidationMessage:zt,increaseTimer:gc,isDeprecatedParameter:bn,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:Eo,isValidParameter:wo,isVisible:xa,mixin:hc,resumeTimer:rr,showLoading:lt,stopTimer:or,toggleTimer:mc},Symbol.toStringTag,{value:"Module"}));let In;class ut{constructor(...e){if(typeof window>"u")return;In=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);K.promise.set(this,o)}_main(e,n={}){Gs(Object.assign({},n,e)),W.currentInstance&&(W.currentInstance._destroy(),kn()&&Uo()),W.currentInstance=this;const o=Ac(e,n);ea(o),Object.freeze(o),W.timeout&&(W.timeout.stop(),delete W.timeout),clearTimeout(W.restoreFocusTimeout);const r=Cc(this);return Fo(this,o),K.innerParams.set(this,o),kc(this,r,o)}then(e){return K.promise.get(this).then(e)}finally(e){return K.promise.get(this).finally(e)}}const kc=(t,e,n)=>new Promise((o,r)=>{const s=a=>{t.closePopup({isDismissed:!0,dismiss:a})};Pt.swalPromiseResolve.set(t,o),Pt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>ec(t),e.denyButton.onclick=()=>tc(t),e.cancelButton.onclick=()=>nc(t,s),e.closeButton.onclick=()=>s(ct.close),rc(t,e,s),Pa(t,W,n,s),ga(t,n),da(n),Sc(W,n,s),_c(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ac=(t,e)=>{const n=zi(t),o=Object.assign({},st,e,n,t);return o.showClass=Object.assign({},st.showClass,o.showClass),o.hideClass=Object.assign({},st.hideClass,o.hideClass),o},Cc=t=>{const e={popup:Z(),container:de(),actions:_t(),confirmButton:Be(),denyButton:qe(),cancelButton:Ze(),loader:it(),closeButton:wn(),validationMessage:zt(),progressSteps:So()};return K.domCache.set(t,e),e},Sc=(t,e,n)=>{const o=Wt();he(o),e.timer&&(t.timeout=new ta(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Re(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Cn(e.timer)})))},_c=(t,e)=>{if(!e.toast){if(!jt(e.allowEnterKey))return vc();xc(t,e)||Tn(e,-1,1)}},xc=(t,e)=>e.focusDeny&&ve(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ve(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ve(t.confirmButton)?(t.confirmButton.focus(),!0):!1,vc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Zo),Object.assign(ut,Ec),Object.keys(Zo).forEach(t=>{ut[t]=function(...e){if(In)return In[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:ir,setPrototypeOf:ar,isFrozen:Tc,getPrototypeOf:Pc,getOwnPropertyDescriptor:cr}=Object;let{freeze:ge,seal:Ne,create:lr}=Object,{apply:Bn,construct:Nn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Ne||(Ne=function(e){return e}),Bn||(Bn=function(e,n,o){return e.apply(n,o)}),Nn||(Nn=function(e,n){return new e(...n)});const Yt=Le(Array.prototype.forEach),ur=Le(Array.prototype.pop),Lt=Le(Array.prototype.push),Xt=Le(String.prototype.toLowerCase),Fn=Le(String.prototype.toString),Rc=Le(String.prototype.match),Ot=Le(String.prototype.replace),Lc=Le(String.prototype.indexOf),Oc=Le(String.prototype.trim),Te=Le(RegExp.prototype.test),It=Ic(TypeError);function Le(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return Bn(t,e,o)}}function Ic(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Nn(t,n)}}function q(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xt;ar&&ar(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(Tc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function ft(t){const e=lr(null);for(const[n,o]of ir(t))cr(t,n)!==void 0&&(e[n]=o);return e}function Zt(t,e){for(;t!==null;){const o=cr(t,e);if(o){if(o.get)return Le(o.get);if(typeof o.value=="function")return Le(o.value)}t=Pc(t)}function n(o){return console.warn("fallback value for",o),null}return n}const dr=ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Un=ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dn=ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bc=ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mn=ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Nc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fr=ge(["#text"]),hr=ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$n=ge(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pr=ge(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Qt=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fc=Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uc=Ne(/<%[\w\W]*|[\w\W]*%>/gm),Dc=Ne(/\${[\w\W]*}/gm),Mc=Ne(/^data-[\-\w.\u00B7-\uFFFF]/),$c=Ne(/^aria-[\-\w]+$/),mr=Ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hc=Ne(/^(?:\w+script|data):/i),jc=Ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),gr=Ne(/^html$/i);var yr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Fc,ERB_EXPR:Uc,TMPLIT_EXPR:Dc,DATA_ATTR:Mc,ARIA_ATTR:$c,IS_ALLOWED_URI:mr,IS_SCRIPT_OR_DATA:Hc,ATTR_WHITESPACE:jc,DOCTYPE_NAME:gr});const Vc=function(){return typeof window>"u"?null:window},zc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function br(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vc();const e=F=>br(F);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:X,trustedTypes:M}=t,B=u.prototype,N=Zt(B,"cloneNode"),$=Zt(B,"nextSibling"),ee=Zt(B,"childNodes"),oe=Zt(B,"parentNode");if(typeof a=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let j,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let v={};e.isSupported=typeof ir=="function"&&typeof oe=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:x,ERB_EXPR:V,TMPLIT_EXPR:k,DATA_ATTR:z,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=yr;let{IS_ALLOWED_URI:be}=yr,D=null;const Ae=q({},[...dr,...Un,...Dn,...Mn,...fr]);let i=null;const d=q({},[...hr,...$n,...pr,...Qt]);let m=Object.seal(lr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,y=null,R=!0,A=!0,S=!1,O=!0,L=!1,H=!1,G=!1,Ce=!1,we=!1,ue=!1,$e=!1,rs=!0,ss=!1;const Zu="user-content-";let io=!0,Mt=!1,gt={},yt=null;const is=q({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let as=null;const cs=q({},["audio","video","img","source","image","track"]);let ao=null;const ls=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",fn="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let bt=Ve,co=!1,lo=null;const Qu=q({},[dn,fn,Ve],Fn);let tt=null;const ed=["application/xhtml+xml","text/html"],td="text/html";let ce=null,wt=null;const nd=n.createElement("form"),us=function(l){return l instanceof RegExp||l instanceof Function},uo=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wt&&wt===l)){if((!l||typeof l!="object")&&(l={}),l=ft(l),tt=ed.indexOf(l.PARSER_MEDIA_TYPE)===-1?tt=td:tt=l.PARSER_MEDIA_TYPE,ce=tt==="application/xhtml+xml"?Fn:Xt,D="ALLOWED_TAGS"in l?q({},l.ALLOWED_TAGS,ce):Ae,i="ALLOWED_ATTR"in l?q({},l.ALLOWED_ATTR,ce):d,lo="ALLOWED_NAMESPACES"in l?q({},l.ALLOWED_NAMESPACES,Fn):Qu,ao="ADD_URI_SAFE_ATTR"in l?q(ft(ls),l.ADD_URI_SAFE_ATTR,ce):ls,as="ADD_DATA_URI_TAGS"in l?q(ft(cs),l.ADD_DATA_URI_TAGS,ce):cs,yt="FORBID_CONTENTS"in l?q({},l.FORBID_CONTENTS,ce):is,C="FORBID_TAGS"in l?q({},l.FORBID_TAGS,ce):{},y="FORBID_ATTR"in l?q({},l.FORBID_ATTR,ce):{},gt="USE_PROFILES"in l?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,A=l.ALLOW_DATA_ATTR!==!1,S=l.ALLOW_UNKNOWN_PROTOCOLS||!1,O=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=l.SAFE_FOR_TEMPLATES||!1,H=l.WHOLE_DOCUMENT||!1,we=l.RETURN_DOM||!1,ue=l.RETURN_DOM_FRAGMENT||!1,$e=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,rs=l.SANITIZE_DOM!==!1,ss=l.SANITIZE_NAMED_PROPS||!1,io=l.KEEP_CONTENT!==!1,Mt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||mr,bt=l.NAMESPACE||Ve,m=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&us(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&us(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(A=!1),ue&&(we=!0),gt&&(D=q({},[...fr]),i=[],gt.html===!0&&(q(D,dr),q(i,hr)),gt.svg===!0&&(q(D,Un),q(i,$n),q(i,Qt)),gt.svgFilters===!0&&(q(D,Dn),q(i,$n),q(i,Qt)),gt.mathMl===!0&&(q(D,Mn),q(i,pr),q(i,Qt))),l.ADD_TAGS&&(D===Ae&&(D=ft(D)),q(D,l.ADD_TAGS,ce)),l.ADD_ATTR&&(i===d&&(i=ft(i)),q(i,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&q(ao,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(yt===is&&(yt=ft(yt)),q(yt,l.FORBID_CONTENTS,ce)),io&&(D["#text"]=!0),H&&q(D,["html","head","body"]),D.table&&(q(D,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=l.TRUSTED_TYPES_POLICY,ye=j.createHTML("")}else j===void 0&&(j=zc(M,r)),j!==null&&typeof ye=="string"&&(ye=j.createHTML(""));ge&&ge(l),wt=l}},ds=q({},["mi","mo","mn","ms","mtext"]),fs=q({},["foreignobject","desc","title","annotation-xml"]),od=q({},["title","style","font","a","script"]),hn=q({},Un);q(hn,Dn),q(hn,Bc);const fo=q({},Mn);q(fo,Nc);const rd=function(l){let _=oe(l);(!_||!_.tagName)&&(_={namespaceURI:bt,tagName:"template"});const I=Xt(l.tagName),ne=Xt(_.tagName);return lo[l.namespaceURI]?l.namespaceURI===fn?_.namespaceURI===Ve?I==="svg":_.namespaceURI===dn?I==="svg"&&(ne==="annotation-xml"||ds[ne]):!!hn[I]:l.namespaceURI===dn?_.namespaceURI===Ve?I==="math":_.namespaceURI===fn?I==="math"&&fs[ne]:!!fo[I]:l.namespaceURI===Ve?_.namespaceURI===fn&&!fs[ne]||_.namespaceURI===dn&&!ds[ne]?!1:!fo[I]&&(od[I]||!hn[I]):!!(tt==="application/xhtml+xml"&&lo[l.namespaceURI]):!1},nt=function(l){Lt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},ho=function(l,_){try{Lt(e.removed,{attribute:_.getAttributeNode(l),from:_})}catch{Lt(e.removed,{attribute:null,from:_})}if(_.removeAttribute(l),l==="is"&&!i[l])if(we||ue)try{nt(_)}catch{}else try{_.setAttribute(l,"")}catch{}},hs=function(l){let _=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Rc(l,/^[\r\n\t ]+/);I=me&&me[0]}tt==="application/xhtml+xml"&&bt===Ve&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=j?j.createHTML(l):l;if(bt===Ve)try{_=new X().parseFromString(ne,tt)}catch{}if(!_||!_.documentElement){_=ae.createDocument(bt,"template",null);try{_.documentElement.innerHTML=co?ye:ne}catch{}}const pe=_.body||_.documentElement;return l&&I&&pe.insertBefore(n.createTextNode(I),pe.childNodes[0]||null),bt===Ve?U.call(_,H?"html":"body")[0]:H?_.documentElement:pe},ps=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},sd=function(l){return l instanceof b&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof E)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},ms=function(l){return typeof f=="function"&&l instanceof f},ze=function(l,_,I){v[l]&&Yt(v[l],ne=>{ne.call(e,_,I,wt)})},gs=function(l){let _=null;if(ze("beforeSanitizeElements",l,null),sd(l))return nt(l),!0;const I=ce(l.nodeName);if(ze("uponSanitizeElement",l,{tagName:I,allowedTags:D}),l.hasChildNodes()&&!ms(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return nt(l),!0;if(!D[I]||C[I]){if(!C[I]&&bs(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(io&&!yt[I]){const ne=oe(l)||l.parentNode,pe=ee(l)||l.childNodes;if(pe&&ne){const me=pe.length;for(let Se=me-1;Se>=0;--Se)ne.insertBefore(N(pe[Se],!0),$(l))}}return nt(l),!0}return l instanceof u&&!rd(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(nt(l),!0):(L&&l.nodeType===3&&(_=l.textContent,Yt([x,V,k],ne=>{_=Ot(_,ne," ")}),l.textContent!==_&&(Lt(e.removed,{element:l.cloneNode()}),l.textContent=_)),ze("afterSanitizeElements",l,null),!1)},ys=function(l,_,I){if(rs&&(_==="id"||_==="name")&&(I in n||I in nd))return!1;if(!(A&&!y[_]&&Te(z,_))){if(!(R&&Te(te,_))){if(!i[_]||y[_]){if(!(bs(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,_)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(_))||_==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!ao[_]){if(!Te(be,Ot(I,se,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&l!=="script"&&Lc(I,"data:")===0&&as[l])){if(!(S&&!Te(ie,Ot(I,se,"")))){if(I)return!1}}}}}}return!0},bs=function(l){return l.indexOf("-")>0},ws=function(l){ze("beforeSanitizeAttributes",l,null);const{attributes:_}=l;if(!_)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:i};let ne=_.length;for(;ne--;){const pe=_[ne],{name:me,namespaceURI:Se,value:ot}=pe,$t=ce(me);let _e=me==="value"?ot:Oc(ot);if(I.attrName=$t,I.attrValue=_e,I.keepAttr=!0,I.forceKeepAttr=void 0,ze("uponSanitizeAttribute",l,I),_e=I.attrValue,I.forceKeepAttr||(ho(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,_e)){ho(me,l);continue}L&&Yt([x,V,k],ks=>{_e=Ot(_e,ks," ")});const Es=ce(l.nodeName);if(ys(Es,$t,_e)){if(ss&&($t==="id"||$t==="name")&&(ho(me,l),_e=Zu+_e),j&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!Se)switch(M.getAttributeType(Es,$t)){case"TrustedHTML":{_e=j.createHTML(_e);break}case"TrustedScriptURL":{_e=j.createScriptURL(_e);break}}try{Se?l.setAttributeNS(Se,me,_e):l.setAttribute(me,_e),ur(e.removed)}catch{}}}ze("afterSanitizeAttributes",l,null)},id=function F(l){let _=null;const I=ps(l);for(ze("beforeSanitizeShadowDOM",l,null);_=I.nextNode();)ze("uponSanitizeShadowNode",_,null),!gs(_)&&(_.content instanceof s&&F(_.content),ws(_));ze("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,I=null,ne=null,pe=null;if(co=!F,co&&(F="<!-->"),typeof F!="string"&&!ms(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return F;if(G||uo(l),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const ot=ce(F.nodeName);if(!D[ot]||C[ot])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)_=hs("<!---->"),I=_.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?_=I:_.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return j&&$e?j.createHTML(F):F;if(_=hs(F),!_)return we?null:$e?ye:""}_&&Ce&&nt(_.firstChild);const me=ps(Mt?F:_);for(;ne=me.nextNode();)gs(ne)||(ne.content instanceof s&&id(ne.content),ws(ne));if(Mt)return F;if(we){if(ue)for(pe=T.call(_.ownerDocument);_.firstChild;)pe.appendChild(_.firstChild);else pe=_;return(i.shadowroot||i.shadowrootmode)&&(pe=P.call(o,pe,!0)),pe}let Se=H?_.outerHTML:_.innerHTML;return H&&D["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Te(gr,_.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
65
+ `+Se),L&&Yt([x,V,k],ot=>{Se=Ot(Se,ot," ")}),j&&$e?j.createHTML(Se):Se},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uo(F),G=!0},e.clearConfig=function(){wt=null,G=!1},e.isValidAttribute=function(F,l,_){wt||uo({});const I=ce(F),ne=ce(l);return ys(I,ne,_)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Lt(v[F],l))},e.removeHook=function(F){if(v[F])return ur(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var wr=br();class Wc{get IsVisible(){return dt.isVisible()}async ConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:wr.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
66
66
  ${e.text.join("<br />")}
67
- </div>`:o=e.text,new Promise(r=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:br.sanitize(o)}).then(()=>r(!0))})}}const qc=new Wc,wr=()=>qc,Kc=["data-cor"],Gc={class:"sf-p-4"},Jc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=wr(),o=c.ref("?"),r=e;async function s(){await n.ConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function a(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter(M=>M.length>0).map(M=>M[0].toUpperCase()),X=Math.min(2,b.length);return E=b.slice(0,X).join(""),E.length>0?E:"?"}const f=c.computed(()=>{const w=o.value[0],E=w==="?"?0:(w.charCodeAt(0)-64)%19;return Math.max(E,0)}),u=c.ref(!1);return c.onMounted(()=>{o.value=a()}),(w,E)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{id:"sf-header-avatar","data-cor":f.value,onClick:E[0]||(E[0]=b=>u.value=!0)},c.toDisplayString(o.value),9,Kc),c.createVNode(Fs,{visible:u.value,"onUpdate:visible":E[1]||(E[1]=b=>u.value=b),position:"right"},{title:c.withCtx(()=>[c.createTextVNode("Minha conta")]),default:c.withCtx(()=>[c.createElementVNode("div",Gc,[c.createVNode(mo,{color:c.unref(Ht).Error,onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1},8,["color"])])]),_:1},8,["visible"])],64))}}),Yc={},Xc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},Zc=[c.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function Qc(t,e){return c.openBlock(),c.createElementBlock("svg",Xc,Zc)}const el=po(Yc,[["render",Qc]]);class tl{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const Hn=(()=>new tl)(),nl=[c.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],ol=c.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(c.openBlock(),c.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>c.unref(Hn).Toggle&&c.unref(Hn).Toggle(...o))},nl))}}),rl={id:"sf-layout"},sl=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),il={class:"title"},al={class:"sf-layout-nav-content"},cl=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),ll={id:"sf-layout-content"},ul=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=pn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",rl,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=a=>c.unref(n).Toggle())},[sl,c.createVNode(el)],2),c.createElementVNode("div",il,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(ol),c.createVNode(Jc,{onLogout:s[1]||(s[1]=a=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",al,[c.renderSlot(r.$slots,"menu")])],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[cl,c.createElementVNode("section",ll,[c.renderSlot(r.$slots,"content")])],2)]))}}),dl=["href","data-active","onClick"],fl={class:"sf-navmenulink-text"},hl=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=pn();function o(r,s){r.preventDefault();const f=r.target.closest(".sf-layout-nav-content");s(),f&&f.clientWidth+10>document.body.clientWidth&&n.Close()}return(r,s)=>{const a=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(a,{to:e.href,custom:""},{default:c.withCtx(({href:f,navigate:u,isExactActive:w,isActive:E})=>[c.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:E,onClick:b=>o(b,u)},[e.icon?(c.openBlock(),c.createBlock(Et,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):c.createCommentVNode("",!0),c.createElementVNode("span",fl,c.toDisplayString(e.text),1)],8,dl)]),_:1},8,["to"])}}}),pl=c.defineComponent({__name:"ScrollToTop",setup(t){const e=c.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return c.onMounted(()=>{var s;o=((s=document.getElementById(n))==null?void 0:s.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(s,a)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),ml=c.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ye("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ye("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ye("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ye("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(a,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(a.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(a.$slots,"default"),c.createVNode(pl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(a.$slots,"footer")],2)],6))}}),gl={class:"sf-tab-navigation"},yl=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],bl=["data-active"],wl=["href","onClick"],El=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],kl=c.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=c.ref(null),o=new ResizeObserver(u=>{f()}),r=c.ref(!1),s=c.ref(!1);function a(u=!1){const w=n.value.clientWidth;n.value.scrollLeft+=u?-w:w}function f(){const u=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<u-10}return c.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),c.onBeforeUnmount(()=>{var u;try{(u=n.value)==null||u.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(u,w)=>{const E=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("div",gl,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>a(!0))},yl,2),c.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.tabs,b=>(c.openBlock(),c.createBlock(E,{to:b.route,custom:!0},{default:c.withCtx(({navigate:X,isActive:M})=>[c.createElementVNode("li",{"data-active":M},[c.renderSlot(u.$slots,"item",{item:b,navigate:X,isActive:M},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:M}),onClick:X},c.toDisplayString(b.text),11,wl)])],8,bl)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>a())},El,2)])}}});var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var en={};en.byteLength=vl,en.toByteArray=Pl,en.fromByteArray=Ol;for(var Ue=[],Oe=[],_l=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht=0,xl=jn.length;ht<xl;++ht)Ue[ht]=jn[ht],Oe[jn.charCodeAt(ht)]=ht;Oe["-".charCodeAt(0)]=62,Oe["_".charCodeAt(0)]=63;function Er(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function vl(t){var e=Er(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Tl(t,e,n){return(e+n)*3/4-n}function Pl(t){var e,n=Er(t),o=n[0],r=n[1],s=new _l(Tl(t,o,r)),a=0,f=r>0?o-4:o,u;for(u=0;u<f;u+=4)e=Oe[t.charCodeAt(u)]<<18|Oe[t.charCodeAt(u+1)]<<12|Oe[t.charCodeAt(u+2)]<<6|Oe[t.charCodeAt(u+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[a++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Rl(t){return Ue[t>>18&63]+Ue[t>>12&63]+Ue[t>>6&63]+Ue[t&63]}function Ll(t,e,n){for(var o,r=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),r.push(Rl(o));return r.join("")}function Ol(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,f=n-o;a<f;a+=s)r.push(Ll(t,a,a+s>f?f:a+s));return o===1?(e=t[n-1],r.push(Ue[e>>2]+Ue[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(Ue[e>>10]+Ue[e>>4&63]+Ue[e<<2&63]+"=")),r.join("")}var kr={exports:{}};const Ar=Sl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
67
+ </div>`:o=e.text,new Promise(r=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:wr.sanitize(o)}).then(()=>r(!0))})}}const qc=new Wc,Er=()=>qc,Kc=["data-cor"],Gc={class:"sf-p-4"},Jc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=Er(),o=c.ref("?"),r=e;async function s(){await n.ConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function a(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter(M=>M.length>0).map(M=>M[0].toUpperCase()),X=Math.min(2,b.length);return E=b.slice(0,X).join(""),E.length>0?E:"?"}const f=c.computed(()=>{const w=o.value[0],E=w==="?"?0:(w.charCodeAt(0)-64)%19;return Math.max(E,0)}),u=c.ref(!1);return c.onMounted(()=>{o.value=a()}),(w,E)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{id:"sf-header-avatar","data-cor":f.value,onClick:E[0]||(E[0]=b=>u.value=!0)},c.toDisplayString(o.value),9,Kc),c.createVNode(mo,{visible:u.value,"onUpdate:visible":E[1]||(E[1]=b=>u.value=b),position:"right"},{title:c.withCtx(()=>[c.createTextVNode("Minha conta")]),default:c.withCtx(()=>[c.createElementVNode("div",Gc,[c.createVNode(go,{color:c.unref(Ht).Error,onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1},8,["color"])])]),_:1},8,["visible"])],64))}}),Yc={},Xc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},Zc=[c.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function Qc(t,e){return c.openBlock(),c.createElementBlock("svg",Xc,Zc)}const el=po(Yc,[["render",Qc]]);class tl{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const Hn=(()=>new tl)(),nl=[c.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],ol=c.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(c.openBlock(),c.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>c.unref(Hn).Toggle&&c.unref(Hn).Toggle(...o))},nl))}}),rl={id:"sf-layout"},sl=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),il={class:"title"},al={class:"sf-layout-nav-content"},cl=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),ll={id:"sf-layout-content"},ul=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=pn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",rl,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=a=>c.unref(n).Toggle())},[sl,c.createVNode(el)],2),c.createElementVNode("div",il,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(ol),c.createVNode(Jc,{onLogout:s[1]||(s[1]=a=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",al,[c.renderSlot(r.$slots,"menu")])],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[cl,c.createElementVNode("section",ll,[c.renderSlot(r.$slots,"content")])],2)]))}}),dl=["href","data-active","onClick"],fl={class:"sf-navmenulink-text"},hl=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=pn();function o(r,s){r.preventDefault();const f=r.target.closest(".sf-layout-nav-content");s(),f&&f.clientWidth+10>document.body.clientWidth&&n.Close()}return(r,s)=>{const a=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(a,{to:e.href,custom:""},{default:c.withCtx(({href:f,navigate:u,isExactActive:w,isActive:E})=>[c.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:E,onClick:b=>o(b,u)},[e.icon?(c.openBlock(),c.createBlock(Et,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):c.createCommentVNode("",!0),c.createElementVNode("span",fl,c.toDisplayString(e.text),1)],8,dl)]),_:1},8,["to"])}}}),pl=c.defineComponent({__name:"ScrollToTop",setup(t){const e=c.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return c.onMounted(()=>{var s;o=((s=document.getElementById(n))==null?void 0:s.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(s,a)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),ml=c.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ye("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ye("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ye("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ye("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(a,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(a.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(a.$slots,"default"),c.createVNode(pl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(a.$slots,"footer")],2)],6))}}),gl={class:"sf-tab-navigation"},yl=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],bl=["data-active"],wl=["href","onClick"],El=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],kl=c.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=c.ref(null),o=new ResizeObserver(u=>{f()}),r=c.ref(!1),s=c.ref(!1);function a(u=!1){const w=n.value.clientWidth;n.value.scrollLeft+=u?-w:w}function f(){const u=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<u-10}return c.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),c.onBeforeUnmount(()=>{var u;try{(u=n.value)==null||u.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(u,w)=>{const E=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("div",gl,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>a(!0))},yl,2),c.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.tabs,b=>(c.openBlock(),c.createBlock(E,{to:b.route,custom:!0},{default:c.withCtx(({navigate:X,isActive:M})=>[c.createElementVNode("li",{"data-active":M},[c.renderSlot(u.$slots,"item",{item:b,navigate:X,isActive:M},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:M}),onClick:X},c.toDisplayString(b.text),11,wl)])],8,bl)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>a())},El,2)])}}});var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var en={};en.byteLength=vl,en.toByteArray=Pl,en.fromByteArray=Ol;for(var Ue=[],Oe=[],_l=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht=0,xl=jn.length;ht<xl;++ht)Ue[ht]=jn[ht],Oe[jn.charCodeAt(ht)]=ht;Oe["-".charCodeAt(0)]=62,Oe["_".charCodeAt(0)]=63;function kr(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function vl(t){var e=kr(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Tl(t,e,n){return(e+n)*3/4-n}function Pl(t){var e,n=kr(t),o=n[0],r=n[1],s=new _l(Tl(t,o,r)),a=0,f=r>0?o-4:o,u;for(u=0;u<f;u+=4)e=Oe[t.charCodeAt(u)]<<18|Oe[t.charCodeAt(u+1)]<<12|Oe[t.charCodeAt(u+2)]<<6|Oe[t.charCodeAt(u+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[a++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Rl(t){return Ue[t>>18&63]+Ue[t>>12&63]+Ue[t>>6&63]+Ue[t&63]}function Ll(t,e,n){for(var o,r=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),r.push(Rl(o));return r.join("")}function Ol(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,f=n-o;a<f;a+=s)r.push(Ll(t,a,a+s>f?f:a+s));return o===1?(e=t[n-1],r.push(Ue[e>>2]+Ue[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(Ue[e>>10]+Ue[e>>4&63]+Ue[e<<2&63]+"=")),r.join("")}var Ar={exports:{}};const Cr=Sl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
68
68
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
69
69
  *
70
70
  * @version 0.10.1
71
71
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
72
72
  * @copyright Chen, Yi-Cyuan 2014-2023
73
73
  * @license MIT
74
- */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&typeof self=="object",s=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=Al:r&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],E=[24,16,8,0],b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],X=["hex","array","digest","arrayBuffer"],M=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),f&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var B=function(g,T){return function(U){return new j(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=$(T,g)),T.create=function(){return new j(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=B(P,g)}return T},$=function(g,T){var U=Ar,P=Ar.Buffer,v=T?"sha224":"sha256",x;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?x=P.from:x=function(k){return new P(k)};var V=function(k){if(typeof k=="string")return U.createHash(v).update(k,"utf8").digest("hex");if(k==null)throw new Error(e);return k.constructor===ArrayBuffer&&(k=new Uint8Array(k)),Array.isArray(k)||ArrayBuffer.isView(k)||k.constructor===P?U.createHash(v).update(x(k)).digest("hex"):g(k)};return V},ee=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},oe=function(g){var T=ee("hex",g);T.create=function(v){return new ye(v,g)},T.update=function(v,x){return T.create(v).update(x)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=ee(P,g)}return T};function j(g,T){T?(M[0]=M[16]=M[1]=M[2]=M[3]=M[4]=M[5]=M[6]=M[7]=M[8]=M[9]=M[10]=M[11]=M[12]=M[13]=M[14]=M[15]=0,this.blocks=M):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=g}j.prototype.update=function(g){if(!this.finalized){var T,U=typeof g;if(U!=="string"){if(U==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);T=!0}for(var P,v=0,x,V=g.length,k=this.blocks;v<V;){if(this.hashed&&(this.hashed=!1,k[0]=this.block,k[16]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=0),T)for(x=this.start;v<V&&x<64;++v)k[x>>2]|=g[v]<<E[x++&3];else for(x=this.start;v<V&&x<64;++v)P=g.charCodeAt(v),P<128?k[x>>2]|=P<<E[x++&3]:P<2048?(k[x>>2]|=(192|P>>6)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):P<55296||P>=57344?(k[x>>2]|=(224|P>>12)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),k[x>>2]|=(240|P>>18)<<E[x++&3],k[x>>2]|=(128|P>>12&63)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=k[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},j.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,T=this.lastByteIndex;g[16]=this.block,g[T>>2]|=w[T&3],this.block=g[16],T>=56&&(this.hashed||this.hash(),g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},j.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=this.blocks,te,ie,se,be,D,Ae,i,d,m,C,y;for(te=16;te<64;++te)D=z[te-15],ie=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=z[te-2],se=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,z[te]=z[te-16]+ie+z[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,D=z[0]-1413257819,k=D-150054599<<0,P=D+24177077<<0):(d=704751109,D=z[0]-210244248,k=D-1521486534<<0,P=D+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),d=g&T,be=d^g&U^y,i=v&x^~v&V,D=k+se+i+b[te]+z[te],Ae=ie+be,k=P+D<<0,P=D+Ae<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),m=P&g,be=m^P&T^d,i=k&v^~k&x,D=V+se+i+b[te+1]+z[te+1],Ae=ie+be,V=U+D<<0,U=D+Ae<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(V>>>6|V<<26)^(V>>>11|V<<21)^(V>>>25|V<<7),C=U&P,be=C^U&g^m,i=V&k^~V&v,D=x+se+i+b[te+2]+z[te+2],Ae=ie+be,x=T+D<<0,T=D+Ae<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),y=T&U,be=y^T&P^C,i=x&V^~x&k,D=v+se+i+b[te+3]+z[te+3],Ae=ie+be,v=g+D<<0,g=D+Ae<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+g<<0,this.h1=this.h1+T<<0,this.h2=this.h2+U<<0,this.h3=this.h3+P<<0,this.h4=this.h4+v<<0,this.h5=this.h5+x<<0,this.h6=this.h6+V<<0,this.h7=this.h7+k<<0},j.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=u[g>>28&15]+u[g>>24&15]+u[g>>20&15]+u[g>>16&15]+u[g>>12&15]+u[g>>8&15]+u[g>>4&15]+u[g&15]+u[T>>28&15]+u[T>>24&15]+u[T>>20&15]+u[T>>16&15]+u[T>>12&15]+u[T>>8&15]+u[T>>4&15]+u[T&15]+u[U>>28&15]+u[U>>24&15]+u[U>>20&15]+u[U>>16&15]+u[U>>12&15]+u[U>>8&15]+u[U>>4&15]+u[U&15]+u[P>>28&15]+u[P>>24&15]+u[P>>20&15]+u[P>>16&15]+u[P>>12&15]+u[P>>8&15]+u[P>>4&15]+u[P&15]+u[v>>28&15]+u[v>>24&15]+u[v>>20&15]+u[v>>16&15]+u[v>>12&15]+u[v>>8&15]+u[v>>4&15]+u[v&15]+u[x>>28&15]+u[x>>24&15]+u[x>>20&15]+u[x>>16&15]+u[x>>12&15]+u[x>>8&15]+u[x>>4&15]+u[x&15]+u[V>>28&15]+u[V>>24&15]+u[V>>20&15]+u[V>>16&15]+u[V>>12&15]+u[V>>8&15]+u[V>>4&15]+u[V&15];return this.is224||(z+=u[k>>28&15]+u[k>>24&15]+u[k>>20&15]+u[k>>16&15]+u[k>>12&15]+u[k>>8&15]+u[k>>4&15]+u[k&15]),z},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=[g>>24&255,g>>16&255,g>>8&255,g&255,T>>24&255,T>>16&255,T>>8&255,T&255,U>>24&255,U>>16&255,U>>8&255,U&255,P>>24&255,P>>16&255,P>>8&255,P&255,v>>24&255,v>>16&255,v>>8&255,v&255,x>>24&255,x>>16&255,x>>8&255,x&255,V>>24&255,V>>16&255,V>>8&255,V&255];return this.is224||z.push(k>>24&255,k>>16&255,k>>8&255,k&255),z},j.prototype.array=j.prototype.digest,j.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),T=new DataView(g);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),g};function ye(g,T,U){var P,v=typeof g;if(v==="string"){var x=[],V=g.length,k=0,z;for(P=0;P<V;++P)z=g.charCodeAt(P),z<128?x[k++]=z:z<2048?(x[k++]=192|z>>6,x[k++]=128|z&63):z<55296||z>=57344?(x[k++]=224|z>>12,x[k++]=128|z>>6&63,x[k++]=128|z&63):(z=65536+((z&1023)<<10|g.charCodeAt(++P)&1023),x[k++]=240|z>>18,x[k++]=128|z>>12&63,x[k++]=128|z>>6&63,x[k++]=128|z&63);g=x}else if(v==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);g.length>64&&(g=new j(T,!0).update(g).array());var te=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;te[P]=92^se,ie[P]=54^se}j.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new j,ye.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),a?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(kr);var Il=kr.exports;const Bl=Cl(Il);class Bt extends Error{}Bt.prototype.name="InvalidTokenError";function Nl(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function Fl(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Nl(e)}catch{return atob(e)}}function Vn(t,e){if(typeof t!="string")throw new Bt("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new Bt(`Invalid token specified: missing part #${n+1}`);let r;try{r=Fl(o)}catch(s){throw new Bt(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Bt(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Cr(t){if(!(this instanceof Cr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),f=0;f<a.length;f++)(a[f].src.indexOf("keycloak.js")!==-1||a[f].src.indexOf("keycloak.min.js")!==-1)&&a[f].src.indexOf("version=")!==-1&&(e.iframeVersion=a[f].src.substring(a[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=Ae(console.info),E=Ae(console.warn);e.init=function(i){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=D();var d=["default","cordova","cordova-native"];if(i&&d.indexOf(i.adapter)>-1?n=ie(i.adapter):i&&typeof i.adapter=="object"?n=i.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),i){if(typeof i.useNonce<"u"&&(u=i.useNonce),typeof i.checkLoginIframe<"u"&&(s.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(s.interval=i.checkLoginIframeInterval),i.onLoad==="login-required"&&(e.loginRequired=!0),i.responseMode)if(i.responseMode==="query"||i.responseMode==="fragment")e.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=i.flow}if(i.timeSkew!=null&&(e.timeSkew=i.timeSkew),i.redirectUri&&(e.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),typeof i.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=i.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,i.pkceMethod){if(i.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=i.pkceMethod}typeof i.enableLogging=="boolean"?e.enableLogging=i.enableLogging:e.enableLogging=!1,typeof i.scope=="string"&&(e.scope=i.scope),typeof i.acrValues=="string"&&(e.acrValues=i.acrValues),typeof i.messageReceiveTimeout=="number"&&i.messageReceiveTimeout>0?e.messageReceiveTimeout=i.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=v(),C=v();C.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=j();function R(){var O=function(G){G||(H.prompt="none"),i&&i.locale&&(H.locale=i.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var G=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});G.setAttribute("src",Ce),G.setAttribute("sandbox","allow-scripts allow-same-origin"),G.setAttribute("title","keycloak-silent-check-sso"),G.style.display="none",document.body.appendChild(G);var we=function(ue){if(!(ue.origin!==window.location.origin||G.contentWindow!==ue.source)){var $e=T(ue.data);oe($e,C),document.body.removeChild(G),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(i.onLoad){case"check-sso":s.enable?V().then(function(){z().then(function(G){G?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(G){C.setError(G)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function A(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return V().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});i?i.token&&i.refreshToken?(ae(i.token,i.refreshToken,i.idToken),s.enable?V().then(function(){z().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),k()):C.setSuccess()}).catch(function(L){C.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),i.onLoad?R():C.setError(L)})):i.onLoad?R():C.setSuccess():C.setSuccess()}function S(){var O=v(),L=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",L),O.setSuccess())};return document.addEventListener("readystatechange",L),L(),O.promise}return y.then(function(){S().then(te).then(A).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(i){return n.login(i)};function b(i){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(i),m.getRandomValues(d),d;d=new Array(i);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function X(i){return M(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function M(i,d){for(var m=b(i),C=new Array(i),y=0;y<i;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(i,d){switch(i){case"S256":var m=new Uint8Array(Bl.arrayBuffer(d)),C=en.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(i){var d={id_token:{acr:i}};return JSON.stringify(d)}e.createLoginUrl=function(i){var d=g(),m=g(),C=n.redirectUri(i),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};i&&i.prompt&&(y.prompt=i.prompt);var R;i&&i.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var A=i&&i.scope||e.scope;A?A.indexOf("openid")===-1&&(A="openid "+A):A="openid";var S=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(C)+"&state="+encodeURIComponent(d)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(A);if(u&&(S=S+"&nonce="+encodeURIComponent(m)),i&&i.prompt&&(S+="&prompt="+encodeURIComponent(i.prompt)),i&&i.maxAge&&(S+="&max_age="+encodeURIComponent(i.maxAge)),i&&i.loginHint&&(S+="&login_hint="+encodeURIComponent(i.loginHint)),i&&i.idpHint&&(S+="&kc_idp_hint="+encodeURIComponent(i.idpHint)),i&&i.action&&i.action!="register"&&(S+="&kc_action="+encodeURIComponent(i.action)),i&&i.locale&&(S+="&ui_locales="+encodeURIComponent(i.locale)),i&&i.acr){var O=N(i.acr);S+="&claims="+encodeURIComponent(O)}if((i&&i.acrValues||e.acrValues)&&(S+="&acr_values="+encodeURIComponent(i.acrValues||e.acrValues)),e.pkceMethod){var L=X(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);S+="&code_challenge="+H,S+="&code_challenge_method="+e.pkceMethod}return r.add(y),S},e.logout=function(i){return n.logout(i)},e.createLogoutUrl=function(i){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(i,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(i){return n.register(i)},e.createRegisterUrl=function(i){return i||(i={}),i.action="register",e.createLoginUrl(i)},e.createAccountUrl=function(i){var d=$(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(i))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(i){var d=e.realmAccess;return!!d&&d.roles.indexOf(i)>=0},e.hasResourceRole=function(i,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(i)>=0},e.loadUserProfile=function(){var i=$()+"/account",d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.profile=JSON.parse(d.responseText),m.setSuccess(e.profile)):m.setError())},d.send(),m.promise},e.loadUserInfo=function(){var i=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.userInfo=JSON.parse(d.responseText),m.setSuccess(e.userInfo)):m.setError())},d.send(),m.promise},e.isTokenExpired=function(i){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var d=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(i){if(isNaN(i))throw"Invalid minValidity";d-=i}return d<0},e.updateToken=function(i){var d=v();if(!e.refreshToken)return d.setError(),d.promise;i=i||5;var m=function(){var y=!1;if(i==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(i))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,A=e.endpoints.token();if(o.push(d),o.length==1){var S=new XMLHttpRequest;S.open("POST",A,!0),S.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(S.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var H=o.pop();H!=null;H=o.pop())H.setSuccess(!0)}else{E("[KEYCLOAK] Failed to refresh token"),S.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},S.send(R)}}};if(s.enable){var C=z();C.then(function(){m()}).catch(function(y){d.setError(y)})}else m();return d.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function $(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function oe(i,d){var m=i.code,C=i.error,y=i.prompt,R=new Date().getTime();if(i.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(i.kc_action_status),C){if(y!="none"){var A={error:C,error_description:i.error_description};e.onAuthError&&e.onAuthError(A),d&&d.setError(A)}else d&&d.setSuccess();return}else e.flow!="standard"&&(i.access_token||i.id_token)&&H(i.access_token,null,i.id_token,!0);if(e.flow!="implicit"&&m){var S="code="+m+"&grant_type=authorization_code",O=e.endpoints.token(),L=new XMLHttpRequest;L.open("POST",O,!0),L.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S+="&client_id="+encodeURIComponent(e.clientId),S+="&redirect_uri="+i.redirectUri,i.pkceCodeVerifier&&(S+="&code_verifier="+i.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var G=JSON.parse(L.responseText);H(G.access_token,G.refresh_token,G.id_token,e.flow==="standard"),k()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(S)}function H(G,Ce,we,ue){R=(R+new Date().getTime())/2,ae(G,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=i.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=i.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=i.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function j(i){var d=v(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function C(L){L?e.endpoints={authorize:function(){return L.authorization_endpoint},token:function(){return L.token_endpoint},logout:function(){if(!L.end_session_endpoint)throw"Not supported by the OIDC server";return L.end_session_endpoint},checkSessionIframe:function(){if(!L.check_session_iframe)throw"Not supported by the OIDC server";return L.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!L.userinfo_endpoint)throw"Not supported by the OIDC server";return L.userinfo_endpoint}}:e.endpoints={authorize:function(){return $()+"/protocol/openid-connect/auth"},token:function(){return $()+"/protocol/openid-connect/token"},logout:function(){return $()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=$()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=$()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return $()+"/protocol/openid-connect/registrations"},userinfo:function(){return $()+"/protocol/openid-connect/userinfo"}}}if(m){var y=new XMLHttpRequest;y.open("GET",m,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var L=JSON.parse(y.responseText);e.authServerUrl=L["auth-server-url"],e.realm=L.realm,e.clientId=L.resource,C(null),d.setSuccess()}else d.setError()},y.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var O;R.charAt(R.length-1)=="/"?O=R+".well-known/openid-configuration":O=R+"/.well-known/openid-configuration";var y=new XMLHttpRequest;y.open("GET",O,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var H=JSON.parse(y.responseText);C(H),d.setSuccess()}else d.setError()},y.send()}else C(R),d.setSuccess();else{if(!t.url){for(var A=document.getElementsByTagName("script"),S=0;S<A.length;S++)if(A[S].src.match(/.*keycloak\.js/)){t.url=A[S].src.substr(0,A[S].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,C(null),d.setSuccess()}}return d.promise}function ye(i){return i.status==0&&i.responseText&&i.responseURL.startsWith("file:")}function ae(i,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=Vn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=Vn(m)):(delete e.idToken,delete e.idTokenParsed),i){if(e.token=i,e.tokenParsed=Vn(i),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,C&&(e.timeSkew=Math.floor(C/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(w("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var y=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;w("[KEYCLOAK] Token expires in "+Math.round(y/1e3)+" s"),y<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,y)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function g(){var i="0123456789abcdef",d=M(36,i).split("");d[14]="4",d[19]=i.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(i){var d=U(i);if(d){var m=r.get(d.state);return m&&(d.valid=!0,d.redirectUri=m.redirectUri,d.storedNonce=m.nonce,d.prompt=m.prompt,d.pkceCodeVerifier=m.pkceCodeVerifier),d}}function U(i){var d;switch(e.flow){case"standard":d=["code","state","session_state","kc_action_status","iss"];break;case"implicit":d=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":d=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}d.push("error"),d.push("error_description"),d.push("error_uri");var m=i.indexOf("?"),C=i.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=i.substring(0,m),R=P(i.substring(m+1,C!==-1?C:i.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=i.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=i.substring(0,C),R=P(i.substring(C+1),d),R.paramsString!==""&&(y+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}}function P(i,d){for(var m=i.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),A=m[y].slice(0,R);d.indexOf(A)!==-1?C.oauthParams[A]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var i={setSuccess:function(d){i.resolve(d)},setError:function(d){i.reject(d)}};return i.promise=new Promise(function(d,m){i.resolve=d,i.reject=m}),i}function x(i,d,m){var C=null,y=new Promise(function(R,A){C=setTimeout(function(){A({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([i,y]).finally(function(){clearTimeout(C)})}function V(){var i=v();if(!s.enable||s.iframe)return i.setSuccess(),i.promise;var d=document.createElement("iframe");s.iframe=d,d.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=ee():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),i.setSuccess()};var m=e.endpoints.checkSessionIframe();d.setAttribute("src",m),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-session-iframe"),d.style.display="none",document.body.appendChild(d);var C=function(y){if(!(y.origin!==s.iframeOrigin||s.iframe.contentWindow!==y.source)&&(y.data=="unchanged"||y.data=="changed"||y.data=="error")){y.data!="unchanged"&&e.clearToken();for(var R=s.callbackList.splice(0,s.callbackList.length),A=R.length-1;A>=0;--A){var S=R[A];y.data=="error"?S.setError():S.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),i.promise}function k(){s.enable&&e.token&&setTimeout(function(){z().then(function(i){i&&k()})},s.interval*1e3)}function z(){var i=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(i);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else i.setSuccess();return i.promise}function te(){var i=v();if(s.enable||e.silentCheckSsoRedirectUri){var d=document.createElement("iframe");d.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-3p-check-iframe"),d.style.display="none",document.body.appendChild(d);var m=function(C){d.contentWindow===C.source&&(C.data!=="supported"&&C.data!=="unsupported"||(C.data==="unsupported"&&(E(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
74
+ */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&typeof self=="object",s=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=Al:r&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],E=[24,16,8,0],b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],X=["hex","array","digest","arrayBuffer"],M=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),f&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var B=function(g,T){return function(U){return new j(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=$(T,g)),T.create=function(){return new j(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=B(P,g)}return T},$=function(g,T){var U=Cr,P=Cr.Buffer,v=T?"sha224":"sha256",x;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?x=P.from:x=function(k){return new P(k)};var V=function(k){if(typeof k=="string")return U.createHash(v).update(k,"utf8").digest("hex");if(k==null)throw new Error(e);return k.constructor===ArrayBuffer&&(k=new Uint8Array(k)),Array.isArray(k)||ArrayBuffer.isView(k)||k.constructor===P?U.createHash(v).update(x(k)).digest("hex"):g(k)};return V},ee=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},oe=function(g){var T=ee("hex",g);T.create=function(v){return new ye(v,g)},T.update=function(v,x){return T.create(v).update(x)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=ee(P,g)}return T};function j(g,T){T?(M[0]=M[16]=M[1]=M[2]=M[3]=M[4]=M[5]=M[6]=M[7]=M[8]=M[9]=M[10]=M[11]=M[12]=M[13]=M[14]=M[15]=0,this.blocks=M):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=g}j.prototype.update=function(g){if(!this.finalized){var T,U=typeof g;if(U!=="string"){if(U==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);T=!0}for(var P,v=0,x,V=g.length,k=this.blocks;v<V;){if(this.hashed&&(this.hashed=!1,k[0]=this.block,k[16]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=0),T)for(x=this.start;v<V&&x<64;++v)k[x>>2]|=g[v]<<E[x++&3];else for(x=this.start;v<V&&x<64;++v)P=g.charCodeAt(v),P<128?k[x>>2]|=P<<E[x++&3]:P<2048?(k[x>>2]|=(192|P>>6)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):P<55296||P>=57344?(k[x>>2]|=(224|P>>12)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),k[x>>2]|=(240|P>>18)<<E[x++&3],k[x>>2]|=(128|P>>12&63)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=k[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},j.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,T=this.lastByteIndex;g[16]=this.block,g[T>>2]|=w[T&3],this.block=g[16],T>=56&&(this.hashed||this.hash(),g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},j.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=this.blocks,te,ie,se,be,D,Ae,i,d,m,C,y;for(te=16;te<64;++te)D=z[te-15],ie=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=z[te-2],se=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,z[te]=z[te-16]+ie+z[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,D=z[0]-1413257819,k=D-150054599<<0,P=D+24177077<<0):(d=704751109,D=z[0]-210244248,k=D-1521486534<<0,P=D+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),d=g&T,be=d^g&U^y,i=v&x^~v&V,D=k+se+i+b[te]+z[te],Ae=ie+be,k=P+D<<0,P=D+Ae<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),m=P&g,be=m^P&T^d,i=k&v^~k&x,D=V+se+i+b[te+1]+z[te+1],Ae=ie+be,V=U+D<<0,U=D+Ae<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(V>>>6|V<<26)^(V>>>11|V<<21)^(V>>>25|V<<7),C=U&P,be=C^U&g^m,i=V&k^~V&v,D=x+se+i+b[te+2]+z[te+2],Ae=ie+be,x=T+D<<0,T=D+Ae<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),y=T&U,be=y^T&P^C,i=x&V^~x&k,D=v+se+i+b[te+3]+z[te+3],Ae=ie+be,v=g+D<<0,g=D+Ae<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+g<<0,this.h1=this.h1+T<<0,this.h2=this.h2+U<<0,this.h3=this.h3+P<<0,this.h4=this.h4+v<<0,this.h5=this.h5+x<<0,this.h6=this.h6+V<<0,this.h7=this.h7+k<<0},j.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=u[g>>28&15]+u[g>>24&15]+u[g>>20&15]+u[g>>16&15]+u[g>>12&15]+u[g>>8&15]+u[g>>4&15]+u[g&15]+u[T>>28&15]+u[T>>24&15]+u[T>>20&15]+u[T>>16&15]+u[T>>12&15]+u[T>>8&15]+u[T>>4&15]+u[T&15]+u[U>>28&15]+u[U>>24&15]+u[U>>20&15]+u[U>>16&15]+u[U>>12&15]+u[U>>8&15]+u[U>>4&15]+u[U&15]+u[P>>28&15]+u[P>>24&15]+u[P>>20&15]+u[P>>16&15]+u[P>>12&15]+u[P>>8&15]+u[P>>4&15]+u[P&15]+u[v>>28&15]+u[v>>24&15]+u[v>>20&15]+u[v>>16&15]+u[v>>12&15]+u[v>>8&15]+u[v>>4&15]+u[v&15]+u[x>>28&15]+u[x>>24&15]+u[x>>20&15]+u[x>>16&15]+u[x>>12&15]+u[x>>8&15]+u[x>>4&15]+u[x&15]+u[V>>28&15]+u[V>>24&15]+u[V>>20&15]+u[V>>16&15]+u[V>>12&15]+u[V>>8&15]+u[V>>4&15]+u[V&15];return this.is224||(z+=u[k>>28&15]+u[k>>24&15]+u[k>>20&15]+u[k>>16&15]+u[k>>12&15]+u[k>>8&15]+u[k>>4&15]+u[k&15]),z},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=[g>>24&255,g>>16&255,g>>8&255,g&255,T>>24&255,T>>16&255,T>>8&255,T&255,U>>24&255,U>>16&255,U>>8&255,U&255,P>>24&255,P>>16&255,P>>8&255,P&255,v>>24&255,v>>16&255,v>>8&255,v&255,x>>24&255,x>>16&255,x>>8&255,x&255,V>>24&255,V>>16&255,V>>8&255,V&255];return this.is224||z.push(k>>24&255,k>>16&255,k>>8&255,k&255),z},j.prototype.array=j.prototype.digest,j.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),T=new DataView(g);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),g};function ye(g,T,U){var P,v=typeof g;if(v==="string"){var x=[],V=g.length,k=0,z;for(P=0;P<V;++P)z=g.charCodeAt(P),z<128?x[k++]=z:z<2048?(x[k++]=192|z>>6,x[k++]=128|z&63):z<55296||z>=57344?(x[k++]=224|z>>12,x[k++]=128|z>>6&63,x[k++]=128|z&63):(z=65536+((z&1023)<<10|g.charCodeAt(++P)&1023),x[k++]=240|z>>18,x[k++]=128|z>>12&63,x[k++]=128|z>>6&63,x[k++]=128|z&63);g=x}else if(v==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);g.length>64&&(g=new j(T,!0).update(g).array());var te=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;te[P]=92^se,ie[P]=54^se}j.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new j,ye.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),a?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(Ar);var Il=Ar.exports;const Bl=Cl(Il);class Bt extends Error{}Bt.prototype.name="InvalidTokenError";function Nl(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function Fl(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Nl(e)}catch{return atob(e)}}function Vn(t,e){if(typeof t!="string")throw new Bt("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new Bt(`Invalid token specified: missing part #${n+1}`);let r;try{r=Fl(o)}catch(s){throw new Bt(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Bt(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Sr(t){if(!(this instanceof Sr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),f=0;f<a.length;f++)(a[f].src.indexOf("keycloak.js")!==-1||a[f].src.indexOf("keycloak.min.js")!==-1)&&a[f].src.indexOf("version=")!==-1&&(e.iframeVersion=a[f].src.substring(a[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=Ae(console.info),E=Ae(console.warn);e.init=function(i){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=D();var d=["default","cordova","cordova-native"];if(i&&d.indexOf(i.adapter)>-1?n=ie(i.adapter):i&&typeof i.adapter=="object"?n=i.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),i){if(typeof i.useNonce<"u"&&(u=i.useNonce),typeof i.checkLoginIframe<"u"&&(s.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(s.interval=i.checkLoginIframeInterval),i.onLoad==="login-required"&&(e.loginRequired=!0),i.responseMode)if(i.responseMode==="query"||i.responseMode==="fragment")e.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=i.flow}if(i.timeSkew!=null&&(e.timeSkew=i.timeSkew),i.redirectUri&&(e.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),typeof i.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=i.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,i.pkceMethod){if(i.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=i.pkceMethod}typeof i.enableLogging=="boolean"?e.enableLogging=i.enableLogging:e.enableLogging=!1,typeof i.scope=="string"&&(e.scope=i.scope),typeof i.acrValues=="string"&&(e.acrValues=i.acrValues),typeof i.messageReceiveTimeout=="number"&&i.messageReceiveTimeout>0?e.messageReceiveTimeout=i.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=v(),C=v();C.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=j();function R(){var O=function(G){G||(H.prompt="none"),i&&i.locale&&(H.locale=i.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var G=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});G.setAttribute("src",Ce),G.setAttribute("sandbox","allow-scripts allow-same-origin"),G.setAttribute("title","keycloak-silent-check-sso"),G.style.display="none",document.body.appendChild(G);var we=function(ue){if(!(ue.origin!==window.location.origin||G.contentWindow!==ue.source)){var $e=T(ue.data);oe($e,C),document.body.removeChild(G),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(i.onLoad){case"check-sso":s.enable?V().then(function(){z().then(function(G){G?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(G){C.setError(G)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function A(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return V().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});i?i.token&&i.refreshToken?(ae(i.token,i.refreshToken,i.idToken),s.enable?V().then(function(){z().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),k()):C.setSuccess()}).catch(function(L){C.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),i.onLoad?R():C.setError(L)})):i.onLoad?R():C.setSuccess():C.setSuccess()}function S(){var O=v(),L=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",L),O.setSuccess())};return document.addEventListener("readystatechange",L),L(),O.promise}return y.then(function(){S().then(te).then(A).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(i){return n.login(i)};function b(i){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(i),m.getRandomValues(d),d;d=new Array(i);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function X(i){return M(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function M(i,d){for(var m=b(i),C=new Array(i),y=0;y<i;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(i,d){switch(i){case"S256":var m=new Uint8Array(Bl.arrayBuffer(d)),C=en.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(i){var d={id_token:{acr:i}};return JSON.stringify(d)}e.createLoginUrl=function(i){var d=g(),m=g(),C=n.redirectUri(i),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};i&&i.prompt&&(y.prompt=i.prompt);var R;i&&i.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var A=i&&i.scope||e.scope;A?A.indexOf("openid")===-1&&(A="openid "+A):A="openid";var S=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(C)+"&state="+encodeURIComponent(d)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(A);if(u&&(S=S+"&nonce="+encodeURIComponent(m)),i&&i.prompt&&(S+="&prompt="+encodeURIComponent(i.prompt)),i&&i.maxAge&&(S+="&max_age="+encodeURIComponent(i.maxAge)),i&&i.loginHint&&(S+="&login_hint="+encodeURIComponent(i.loginHint)),i&&i.idpHint&&(S+="&kc_idp_hint="+encodeURIComponent(i.idpHint)),i&&i.action&&i.action!="register"&&(S+="&kc_action="+encodeURIComponent(i.action)),i&&i.locale&&(S+="&ui_locales="+encodeURIComponent(i.locale)),i&&i.acr){var O=N(i.acr);S+="&claims="+encodeURIComponent(O)}if((i&&i.acrValues||e.acrValues)&&(S+="&acr_values="+encodeURIComponent(i.acrValues||e.acrValues)),e.pkceMethod){var L=X(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);S+="&code_challenge="+H,S+="&code_challenge_method="+e.pkceMethod}return r.add(y),S},e.logout=function(i){return n.logout(i)},e.createLogoutUrl=function(i){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(i,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(i){return n.register(i)},e.createRegisterUrl=function(i){return i||(i={}),i.action="register",e.createLoginUrl(i)},e.createAccountUrl=function(i){var d=$(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(i))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(i){var d=e.realmAccess;return!!d&&d.roles.indexOf(i)>=0},e.hasResourceRole=function(i,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(i)>=0},e.loadUserProfile=function(){var i=$()+"/account",d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.profile=JSON.parse(d.responseText),m.setSuccess(e.profile)):m.setError())},d.send(),m.promise},e.loadUserInfo=function(){var i=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.userInfo=JSON.parse(d.responseText),m.setSuccess(e.userInfo)):m.setError())},d.send(),m.promise},e.isTokenExpired=function(i){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var d=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(i){if(isNaN(i))throw"Invalid minValidity";d-=i}return d<0},e.updateToken=function(i){var d=v();if(!e.refreshToken)return d.setError(),d.promise;i=i||5;var m=function(){var y=!1;if(i==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(i))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,A=e.endpoints.token();if(o.push(d),o.length==1){var S=new XMLHttpRequest;S.open("POST",A,!0),S.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(S.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var H=o.pop();H!=null;H=o.pop())H.setSuccess(!0)}else{E("[KEYCLOAK] Failed to refresh token"),S.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},S.send(R)}}};if(s.enable){var C=z();C.then(function(){m()}).catch(function(y){d.setError(y)})}else m();return d.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function $(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function oe(i,d){var m=i.code,C=i.error,y=i.prompt,R=new Date().getTime();if(i.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(i.kc_action_status),C){if(y!="none"){var A={error:C,error_description:i.error_description};e.onAuthError&&e.onAuthError(A),d&&d.setError(A)}else d&&d.setSuccess();return}else e.flow!="standard"&&(i.access_token||i.id_token)&&H(i.access_token,null,i.id_token,!0);if(e.flow!="implicit"&&m){var S="code="+m+"&grant_type=authorization_code",O=e.endpoints.token(),L=new XMLHttpRequest;L.open("POST",O,!0),L.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S+="&client_id="+encodeURIComponent(e.clientId),S+="&redirect_uri="+i.redirectUri,i.pkceCodeVerifier&&(S+="&code_verifier="+i.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var G=JSON.parse(L.responseText);H(G.access_token,G.refresh_token,G.id_token,e.flow==="standard"),k()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(S)}function H(G,Ce,we,ue){R=(R+new Date().getTime())/2,ae(G,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=i.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=i.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=i.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function j(i){var d=v(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function C(L){L?e.endpoints={authorize:function(){return L.authorization_endpoint},token:function(){return L.token_endpoint},logout:function(){if(!L.end_session_endpoint)throw"Not supported by the OIDC server";return L.end_session_endpoint},checkSessionIframe:function(){if(!L.check_session_iframe)throw"Not supported by the OIDC server";return L.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!L.userinfo_endpoint)throw"Not supported by the OIDC server";return L.userinfo_endpoint}}:e.endpoints={authorize:function(){return $()+"/protocol/openid-connect/auth"},token:function(){return $()+"/protocol/openid-connect/token"},logout:function(){return $()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=$()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=$()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return $()+"/protocol/openid-connect/registrations"},userinfo:function(){return $()+"/protocol/openid-connect/userinfo"}}}if(m){var y=new XMLHttpRequest;y.open("GET",m,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var L=JSON.parse(y.responseText);e.authServerUrl=L["auth-server-url"],e.realm=L.realm,e.clientId=L.resource,C(null),d.setSuccess()}else d.setError()},y.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var O;R.charAt(R.length-1)=="/"?O=R+".well-known/openid-configuration":O=R+"/.well-known/openid-configuration";var y=new XMLHttpRequest;y.open("GET",O,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var H=JSON.parse(y.responseText);C(H),d.setSuccess()}else d.setError()},y.send()}else C(R),d.setSuccess();else{if(!t.url){for(var A=document.getElementsByTagName("script"),S=0;S<A.length;S++)if(A[S].src.match(/.*keycloak\.js/)){t.url=A[S].src.substr(0,A[S].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,C(null),d.setSuccess()}}return d.promise}function ye(i){return i.status==0&&i.responseText&&i.responseURL.startsWith("file:")}function ae(i,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=Vn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=Vn(m)):(delete e.idToken,delete e.idTokenParsed),i){if(e.token=i,e.tokenParsed=Vn(i),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,C&&(e.timeSkew=Math.floor(C/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(w("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var y=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;w("[KEYCLOAK] Token expires in "+Math.round(y/1e3)+" s"),y<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,y)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function g(){var i="0123456789abcdef",d=M(36,i).split("");d[14]="4",d[19]=i.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(i){var d=U(i);if(d){var m=r.get(d.state);return m&&(d.valid=!0,d.redirectUri=m.redirectUri,d.storedNonce=m.nonce,d.prompt=m.prompt,d.pkceCodeVerifier=m.pkceCodeVerifier),d}}function U(i){var d;switch(e.flow){case"standard":d=["code","state","session_state","kc_action_status","iss"];break;case"implicit":d=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":d=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}d.push("error"),d.push("error_description"),d.push("error_uri");var m=i.indexOf("?"),C=i.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=i.substring(0,m),R=P(i.substring(m+1,C!==-1?C:i.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=i.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=i.substring(0,C),R=P(i.substring(C+1),d),R.paramsString!==""&&(y+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}}function P(i,d){for(var m=i.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),A=m[y].slice(0,R);d.indexOf(A)!==-1?C.oauthParams[A]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var i={setSuccess:function(d){i.resolve(d)},setError:function(d){i.reject(d)}};return i.promise=new Promise(function(d,m){i.resolve=d,i.reject=m}),i}function x(i,d,m){var C=null,y=new Promise(function(R,A){C=setTimeout(function(){A({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([i,y]).finally(function(){clearTimeout(C)})}function V(){var i=v();if(!s.enable||s.iframe)return i.setSuccess(),i.promise;var d=document.createElement("iframe");s.iframe=d,d.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=ee():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),i.setSuccess()};var m=e.endpoints.checkSessionIframe();d.setAttribute("src",m),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-session-iframe"),d.style.display="none",document.body.appendChild(d);var C=function(y){if(!(y.origin!==s.iframeOrigin||s.iframe.contentWindow!==y.source)&&(y.data=="unchanged"||y.data=="changed"||y.data=="error")){y.data!="unchanged"&&e.clearToken();for(var R=s.callbackList.splice(0,s.callbackList.length),A=R.length-1;A>=0;--A){var S=R[A];y.data=="error"?S.setError():S.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),i.promise}function k(){s.enable&&e.token&&setTimeout(function(){z().then(function(i){i&&k()})},s.interval*1e3)}function z(){var i=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(i);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else i.setSuccess();return i.promise}function te(){var i=v();if(s.enable||e.silentCheckSsoRedirectUri){var d=document.createElement("iframe");d.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-3p-check-iframe"),d.style.display="none",document.body.appendChild(d);var m=function(C){d.contentWindow===C.source&&(C.data!=="supported"&&C.data!=="unsupported"||(C.data==="unsupported"&&(E(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
75
75
 
76
76
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
77
77
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
78
78
 
79
- For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(d),window.removeEventListener("message",m),i.setSuccess()))};window.addEventListener("message",m,!1)}else i.setSuccess();return x(i.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(i){if(!i||i=="default")return{login:function(A){return window.location.assign(e.createLoginUrl(A)),v().promise},logout:function(A){return window.location.replace(e.createLogoutUrl(A)),v().promise},register:function(A){return window.location.assign(e.createRegisterUrl(A)),v().promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.location.href=A;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(A,S){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(i=="cordova"){s.enable=!1;var d=function(A,S,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(A,S,O):window.open(A,S,O)},m=function(A){return A&&A.cordovaOptions?Object.keys(A.cordovaOptions).reduce(function(S,O){return S[O]=A.cordovaOptions[O],S},{}):{}},C=function(A){return Object.keys(A).reduce(function(S,O){return S.push(O+"="+A[O]),S},[]).join(",")},y=function(A){var S=m(A);return S.location="no",A&&A.prompt=="none"&&(S.hidden="yes"),C(S)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(A){var S=v(),O=y(A),L=e.createLoginUrl(A),H=d(L,"_blank",O),G=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}}),H.addEventListener("loaderror",function(ue){if(!G)if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}else S.setError(),we()}),H.addEventListener("exit",function(ue){Ce||S.setError({reason:"closed_by_user"})}),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(G){G.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(G){G.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(G){H?S.setError():(e.clearToken(),S.setSuccess())}),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(),L=y(A),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(G){if(G.url.indexOf(R())==0){H.close();var Ce=T(G.url);oe(Ce,S)}}),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u"){var S=d(A,"_blank","location=no");S.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&S.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(A){return R()}}}if(i=="cordova-native")return s.enable=!1,{login:function(A){var S=v(),O=e.createLoginUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),S.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.cordova.plugins.browsertab.openUrl(A);else throw"Not supported by the OIDC server"},redirectUri:function(A){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+i}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var i=this;function d(){for(var m=new Date().getTime(),C=0;C<localStorage.length;C++){var y=localStorage.key(C);if(y&&y.indexOf("kc-callback-")==0){var R=localStorage.getItem(y);if(R)try{var A=JSON.parse(R).expires;(!A||A<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}i.get=function(m){if(m){var C="kc-callback-"+m,y=localStorage.getItem(C);return y&&(localStorage.removeItem(C),y=JSON.parse(y)),d(),y}},i.add=function(m){d();var C="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(C,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var i=this;i.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},i.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},i.removeItem=function(y){C(y,"",d(-100))};var d=function(y){var R=new Date;return R.setTime(R.getTime()+y*60*1e3),R},m=function(y){for(var R=y+"=",A=document.cookie.split(";"),S=0;S<A.length;S++){for(var O=A[S];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,A){var S=y+"="+R+"; expires="+A.toUTCString()+"; ";document.cookie=S}};function D(){try{return new se}catch{}return new be}function Ae(i){return function(){e.enableLogging&&i.apply(console,Array.prototype.slice.call(arguments))}}}async function Ul(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}function Dl(t){const e=new Cr(t),n={},o=async(a={},f)=>{if(await Ul())return a.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(a).then(async w=>{w&&await r(),f&&typeof f=="function"&&f(),document.documentElement.classList.add("app-mounted")}).catch(w=>{console.error(w),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},r=async()=>{const a=await e.loadUserInfo();n.email=a.email??"",n.emailVerified=a.email_verified===!0,n.firstName=a.given_name??"",n.lastName=a.family_name??"",n.name=a.name??"",n.sub=a.sub??"",n.username=a.preferred_username??"",n.roles=[...a.role??[]],n.groups=[...a.group??[]],n.IsInRole=f=>n.roles.includes(f),sessionStorage.setItem("name",n.name)};return{Instance:e,User:n,Init:o,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}}}const Ml=t=>Dl(t);class zn{constructor(e=null){We(this,"errors",[]);We(this,"_value",null);We(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}const gd="";function Sr(t,e){return function(){return t.apply(e,arguments)}}const{toString:$l}=Object.prototype,{getPrototypeOf:Wn}=Object,tn=(t=>e=>{const n=$l.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),De=t=>(t=t.toLowerCase(),e=>tn(e)===t),nn=t=>e=>typeof e===t,{isArray:pt}=Array,Nt=nn("undefined");function Hl(t){return t!==null&&!Nt(t)&&t.constructor!==null&&!Nt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const _r=De("ArrayBuffer");function jl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_r(t.buffer),e}const Vl=nn("string"),Ie=nn("function"),xr=nn("number"),on=t=>t!==null&&typeof t=="object",zl=t=>t===!0||t===!1,rn=t=>{if(tn(t)!=="object")return!1;const e=Wn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Wl=De("Date"),ql=De("File"),Kl=De("Blob"),Gl=De("FileList"),Jl=t=>on(t)&&Ie(t.pipe),Yl=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=tn(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},Xl=De("URLSearchParams"),Zl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ft(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),pt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let f;for(o=0;o<a;o++)f=s[o],e.call(null,t[f],f,t)}}function vr(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Tr=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Pr=t=>!Nt(t)&&t!==Tr;function qn(){const{caseless:t}=Pr(this)&&this||{},e={},n=(o,r)=>{const s=t&&vr(e,r)||r;rn(e[s])&&rn(o)?e[s]=qn(e[s],o):rn(o)?e[s]=qn({},o):pt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Ft(arguments[o],n);return e}const Ql=(t,e,n,{allOwnKeys:o}={})=>(Ft(e,(r,s)=>{n&&Ie(r)?t[s]=Sr(r,n):t[s]=r},{allOwnKeys:o}),t),eu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),tu=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},nu=(t,e,n,o)=>{let r,s,a;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!f[a]&&(e[a]=t[a],f[a]=!0);t=n!==!1&&Wn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ou=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},ru=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!xr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},su=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wn(Uint8Array)),iu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},au=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},cu=De("HTMLFormElement"),lu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Rr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),uu=De("RegExp"),Lr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Ft(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},du=t=>{Lr(t,(e,n)=>{if(Ie(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(Ie(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},hu=()=>{},pu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Kn="abcdefghijklmnopqrstuvwxyz",Or="0123456789",Ir={DIGIT:Or,ALPHA:Kn,ALPHA_DIGIT:Kn+Kn.toUpperCase()+Or},mu=(t=16,e=Ir.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function gu(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const yu=t=>{const e=new Array(10),n=(o,r)=>{if(on(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=pt(o)?[]:{};return Ft(o,(a,f)=>{const u=n(a,r+1);!Nt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},bu=De("AsyncFunction"),p={isArray:pt,isArrayBuffer:_r,isBuffer:Hl,isFormData:Yl,isArrayBufferView:jl,isString:Vl,isNumber:xr,isBoolean:zl,isObject:on,isPlainObject:rn,isUndefined:Nt,isDate:Wl,isFile:ql,isBlob:Kl,isRegExp:uu,isFunction:Ie,isStream:Jl,isURLSearchParams:Xl,isTypedArray:su,isFileList:Gl,forEach:Ft,merge:qn,extend:Ql,trim:Zl,stripBOM:eu,inherits:tu,toFlatObject:nu,kindOf:tn,kindOfTest:De,endsWith:ou,toArray:ru,forEachEntry:iu,matchAll:au,isHTMLForm:cu,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:Lr,freezeMethods:du,toObjectSet:fu,toCamelCase:lu,noop:hu,toFiniteNumber:pu,findKey:vr,global:Tr,isContextDefined:Pr,ALPHABET:Ir,generateString:mu,isSpecCompliantForm:gu,toJSONObject:yu,isAsyncFn:bu,isThenable:t=>t&&(on(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function Y(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}p.inherits(Y,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:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Br=Y.prototype,Nr={};["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(t=>{Nr[t]={value:t}}),Object.defineProperties(Y,Nr),Object.defineProperty(Br,"isAxiosError",{value:!0}),Y.from=(t,e,n,o,r,s)=>{const a=Object.create(Br);return p.toFlatObject(t,a,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),Y.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const wu=null;function Gn(t){return p.isPlainObject(t)||p.isArray(t)}function Fr(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function Ur(t,e,n){return t?t.concat(e).map(function(r,s){return r=Fr(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Eu(t){return p.isArray(t)&&!t.some(Gn)}const ku=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function sn(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,$){return!p.isUndefined($[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(p.isDate(B))return B.toISOString();if(!u&&p.isBlob(B))throw new Y("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(B)||p.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,$){let ee=B;if(B&&!$&&typeof B=="object"){if(p.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(p.isArray(B)&&Eu(B)||(p.isFileList(B)||p.endsWith(N,"[]"))&&(ee=p.toArray(B)))return N=Fr(N),ee.forEach(function(j,ye){!(p.isUndefined(j)||j===null)&&e.append(a===!0?Ur([N],ye,s):a===null?N:N+"[]",w(j))}),!1}return Gn(B)?!0:(e.append(Ur($,N,s),w(B)),!1)}const b=[],X=Object.assign(ku,{defaultVisitor:E,convertValue:w,isVisitable:Gn});function M(B,N){if(!p.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),p.forEach(B,function(ee,oe){(!(p.isUndefined(ee)||ee===null)&&r.call(e,ee,p.isString(oe)?oe.trim():oe,N,X))===!0&&M(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return M(t),e}function Dr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Jn(t,e){this._pairs=[],t&&sn(t,this,e)}const Mr=Jn.prototype;Mr.append=function(e,n){this._pairs.push([e,n])},Mr.toString=function(e){const n=e?function(o){return e.call(this,o,Dr)}:Dr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Au(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $r(t,e,n){if(!e)return t;const o=n&&n.encode||Au,r=n&&n.serialize;let s;if(r?s=r(e,n):s=p.isURLSearchParams(e)?e.toString():new Jn(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Cu{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){p.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Hr=Cu,jr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Su={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vr=typeof window<"u"&&typeof document<"u",_u=(t=>Vr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),xu=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vr,hasStandardBrowserEnv:_u,hasStandardBrowserWebWorkerEnv:xu},Symbol.toStringTag,{value:"Module"})),...Su};function vu(t,e){return sn(t,new Me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Me.isNode&&p.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Tu(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function zr(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),u=s>=n.length;return a=!a&&p.isArray(r)?r.length:a,u?(p.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!f):((!r[a]||!p.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&p.isArray(r[a])&&(r[a]=Pu(r[a])),!f)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(o,r)=>{e(Tu(o),r,n,0)}),n}return null}function Ru(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Yn={transitional:jr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=p.isObject(e);if(s&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return r&&r?JSON.stringify(zr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return vu(e,this.formSerializer).toString();if((f=p.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return sn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Ru(e)):e}],transformResponse:[function(e){const n=this.transitional||Yn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&p.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(a)throw f.name==="SyntaxError"?Y.from(f,Y.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Yn.headers[t]={}});const Xn=Yn,Lu=p.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"]),Ou=t=>{const e={};let n,o,r;return t&&t.split(`
80
- `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Lu[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Wr=Symbol("internals");function Ut(t){return t&&String(t).trim().toLowerCase()}function an(t){return t===!1||t==null?t:p.isArray(t)?t.map(an):String(t)}function Iu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Bu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zn(t,e,n,o,r){if(p.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!p.isString(e)){if(p.isString(o))return e.indexOf(o)!==-1;if(p.isRegExp(o))return o.test(e)}}function Nu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Fu(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class cn{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ut(u);if(!E)throw new Error("header name must be a non-empty string");const b=p.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=an(f))}const a=(f,u)=>p.forEach(f,(w,E)=>s(w,E,u));return p.isPlainObject(e)||e instanceof this.constructor?a(e,n):p.isString(e)&&(e=e.trim())&&!Bu(e)?a(Ou(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Iu(r);if(p.isFunction(n))return n.call(this,r,o);if(p.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Zn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Ut(a),a){const f=p.findKey(o,a);f&&(!n||Zn(o,o[f],f,n))&&(delete o[f],r=!0)}}return p.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Zn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return p.forEach(this,(r,s)=>{const a=p.findKey(o,s);if(a){n[a]=an(r),delete n[s];return}const f=e?Nu(s):String(s).trim();f!==s&&delete n[s],n[f]=an(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return p.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&p.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
81
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Wr]=this[Wr]={accessors:{}}).accessors,r=this.prototype;function s(a){const f=Ut(a);o[f]||(Fu(r,a),o[f]=!0)}return p.isArray(e)?e.forEach(s):s(e),this}}cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(cn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),p.freezeMethods(cn);const je=cn;function Qn(t,e){const n=this||Xn,o=e||n,r=je.from(o.headers);let s=o.data;return p.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function qr(t){return!!(t&&t.__CANCEL__)}function Dt(t,e,n){Y.call(this,t??"canceled",Y.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(Dt,Y,{__CANCEL__:!0});function Uu(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Du=Me.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),p.isString(o)&&a.push("path="+o),p.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $u(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Kr(t,e){return t&&!Mu(e)?$u(t,e):e}const Hu=Me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const f=p.isString(a)?r(a):a;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function ju(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Vu(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];a||(a=w),n[r]=u,o[r]=w;let b=s,X=0;for(;b!==r;)X+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-a<e)return;const M=E&&w-E;return M?Math.round(X*1e3/M):void 0}}function Gr(t,e){let n=0;const o=Vu(50,250);return r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=a;n=s;const E={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&w?(a-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const eo={http:wu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=je.from(t.headers).normalize();let{responseType:a,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(p.isFormData(r)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...$]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...$].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",$=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+$))}const X=Kr(t.baseURL,t.url);b.open(t.method.toUpperCase(),$r(X,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function M(){if(!b)return;const N=je.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Uu(function(j){n(j),w()},function(j){o(j),w()},ee),b=null}if("onloadend"in b?b.onloadend=M:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(M)},b.onabort=function(){b&&(o(new Y("Request aborted",Y.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new Y("Network Error",Y.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let $=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||jr;t.timeoutErrorMessage&&($=t.timeoutErrorMessage),o(new Y($,ee.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,t,b)),b=null},Me.hasStandardBrowserEnv&&(f&&p.isFunction(f)&&(f=f(t)),f||f!==!1&&Hu(X))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&Du.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&p.forEach(s.toJSON(),function($,ee){b.setRequestHeader(ee,$)}),p.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),a&&a!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",Gr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Gr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=N=>{b&&(o(!N||N.type?new Dt(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const B=ju(X);if(B&&Me.protocols.indexOf(B)===-1){o(new Y("Unsupported protocol "+B+":",Y.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};p.forEach(eo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jr=t=>`- ${t}`,zu=t=>p.isFunction(t)||t===null||t===!1,Yr={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!zu(n)&&(o=eo[(a=String(n)).toLowerCase()],o===void 0))throw new Y(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
82
- `+s.map(Jr).join(`
83
- `):" "+Jr(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:eo};function to(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function Xr(t){return to(t),t.headers=je.from(t.headers),t.data=Qn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yr.getAdapter(t.adapter||Xn.adapter)(t).then(function(o){return to(t),o.data=Qn.call(t,t.transformResponse,o),o.headers=je.from(o.headers),o},function(o){return qr(o)||(to(t),o&&o.response&&(o.response.data=Qn.call(t,t.transformResponse,o.response),o.response.headers=je.from(o.response.headers))),Promise.reject(o)})}const Zr=t=>t instanceof je?t.toJSON():t;function mt(t,e){e=e||{};const n={};function o(w,E,b){return p.isPlainObject(w)&&p.isPlainObject(E)?p.merge.call({caseless:b},w,E):p.isPlainObject(E)?p.merge({},E):p.isArray(E)?E.slice():E}function r(w,E,b){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!p.isUndefined(E))return o(void 0,E)}function a(w,E){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w)}else return o(void 0,E)}function f(w,E,b){if(b in e)return o(w,E);if(b in t)return o(void 0,w)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:f,headers:(w,E)=>r(Zr(w),Zr(E),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,X=b(t[E],e[E],E);p.isUndefined(X)&&b!==f||(n[E]=X)}),n}const Qr="1.6.5",no={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{no[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const es={};no.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Qr+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,f)=>{if(e===!1)throw new Y(r(a," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!es[a]&&(es[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,f):!0}};function Wu(t,e,n){if(typeof t!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const f=t[s],u=f===void 0||a(f,s,t);if(u!==!0)throw new Y("option "+s+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const oo={assertOptions:Wu,validators:no},Ge=oo.validators;class ln{constructor(e){this.defaults=e,this.interceptors={request:new Hr,response:new Hr}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&oo.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:oo.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=je.concat(a,s);const f=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let E,b=0,X;if(!u){const B=[Xr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),X=B.length,E=Promise.resolve(n);b<X;)E=E.then(B[b++],B[b++]);return E}X=f.length;let M=n;for(b=0;b<X;){const B=f[b++],N=f[b++];try{M=B(M)}catch($){N.call(this,$);break}}try{E=Xr.call(this,M)}catch(B){return Promise.reject(B)}for(b=0,X=w.length;b<X;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=mt(this.defaults,e);const n=Kr(e.baseURL,e.url);return $r(n,e.params,e.paramsSerializer)}}p.forEach(["delete","get","head","options"],function(e){ln.prototype[e]=function(n,o){return this.request(mt(o||{},{method:e,url:n,data:(o||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,f){return this.request(mt(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[e]=n(),ln.prototype[e+"Form"]=n(!0)});const un=ln;class ro{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(f=>{o.subscribe(f),s=f}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,f){o.reason||(o.reason=new Dt(s,a,f),n(o.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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ro(function(r){e=r}),cancel:e}}}const qu=ro;function Ku(t){return function(n){return t.apply(null,n)}}function Gu(t){return p.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});const Ju=so;function ts(t){const e=new un(t),n=Sr(un.prototype.request,e);return p.extend(n,un.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ts(mt(t,r))},n}const re=ts(Xn);re.Axios=un,re.CanceledError=Dt,re.CancelToken=qu,re.isCancel=qr,re.VERSION=Qr,re.toFormData=sn,re.AxiosError=Y,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Ku,re.isAxiosError=Gu,re.mergeConfig=mt,re.AxiosHeaders=je,re.formToJSON=t=>zr(p.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Yr.getAdapter,re.HttpStatusCode=Ju,re.default=re;const Yu=re;class ns{constructor(e){We(this,"keycloak");We(this,"axios");We(this,"fileName","silent-login.html");this.keycloak=e,this.axios=Yu.create(),this.axios.defaults.baseURL="https://localhost:5001/api",this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async n=>{await this.SilentLogin();const o=this.keycloak.token;return n.headers.Authorization=`Bearer ${o}`,n})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",o=typeof e.hasError=="boolean",r=typeof e.httpStatusCode=="number",s=Array.isArray(e.errors);return n&&o&&r&&s?e:null}catch{return null}}HandleThen(e){const n=new zn,o=this.ParseAppResult(e.data);return o===null?(n.value=e.data,n):o.hasError?(o.errors.forEach(r=>n.WithError(r)),n.httpStatusCode=o.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var r;const n=new zn,o=this.ParseAppResult((r=e.response)==null?void 0:r.data);return o===null?n.WithError(e.message):(n.WithErrors(o.errors),n.httpStatusCode=o.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),o=r=>{if(document.body.removeChild(n),window.removeEventListener("message",o),r.origin!==location.origin){e(!1);return}const s=r.data.action,a=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!a){e(!1);return}const w=new XMLHttpRequest;w.open("POST",this.tokenExchangeUrl,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.onreadystatechange=()=>{if(w.readyState===4){if(w.status===200){const E=JSON.parse(w.responseText);this.keycloak.setToken(E.access_token,null,E.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(a,f))};window.addEventListener("message",o)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,o=localStorage.getItem(n);if(o)return localStorage.removeItem(n),JSON.parse(o).pkceCodeVerifier}TokenExchangeParams(e,n){let o=`code=${e}&grant_type=authorization_code`;return o+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,o+=`&redirect_uri=${this.silentLoginRedirectUrl}`,o+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,o}GenerateIframe(){const e=document.createElement("iframe");return e.src=this.keycloak.createLoginUrl({prompt:"none",redirectUri:this.silentLoginRedirectUrl})??"",document.body.appendChild(e),e}get silentLoginRedirectUrl(){return`${location.origin}/${this.fileName}`}get tokenExchangeUrl(){return`${this.keycloak.authServerUrl}/realms/${this.keycloak.realm}/protocol/openid-connect/token`}get isTokenExpired(){const e=this.keycloak.tokenParsed,n=e?e.exp:null;return!e||!n?!0:n-Math.ceil(new Date().getTime()/1e3)+(this.keycloak.timeSkew??0)<10}}const Xu=t=>new ns(t);Hn.SetInitialTheme(),Q.AppResult=zn,Q.AxiosClient=ns,Q.Cor=Ht,Q.SfButton=mo,Q.SfContent=ml,Q.SfIcon=Et,Q.SfLayout=ul,Q.SfNavMenuLink=hl,Q.SfTabNavigation=kl,Q.Tamanho=rt,Q.UseAuthService=Ml,Q.UseAxiosClient=Xu,Q.UseDialogService=wr,Q.UseNavMenuService=pn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
79
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(d),window.removeEventListener("message",m),i.setSuccess()))};window.addEventListener("message",m,!1)}else i.setSuccess();return x(i.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(i){if(!i||i=="default")return{login:function(A){return window.location.assign(e.createLoginUrl(A)),v().promise},logout:function(A){return window.location.replace(e.createLogoutUrl(A)),v().promise},register:function(A){return window.location.assign(e.createRegisterUrl(A)),v().promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.location.href=A;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(A,S){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(i=="cordova"){s.enable=!1;var d=function(A,S,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(A,S,O):window.open(A,S,O)},m=function(A){return A&&A.cordovaOptions?Object.keys(A.cordovaOptions).reduce(function(S,O){return S[O]=A.cordovaOptions[O],S},{}):{}},C=function(A){return Object.keys(A).reduce(function(S,O){return S.push(O+"="+A[O]),S},[]).join(",")},y=function(A){var S=m(A);return S.location="no",A&&A.prompt=="none"&&(S.hidden="yes"),C(S)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(A){var S=v(),O=y(A),L=e.createLoginUrl(A),H=d(L,"_blank",O),G=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}}),H.addEventListener("loaderror",function(ue){if(!G)if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}else S.setError(),we()}),H.addEventListener("exit",function(ue){Ce||S.setError({reason:"closed_by_user"})}),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(G){G.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(G){G.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(G){H?S.setError():(e.clearToken(),S.setSuccess())}),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(),L=y(A),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(G){if(G.url.indexOf(R())==0){H.close();var Ce=T(G.url);oe(Ce,S)}}),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u"){var S=d(A,"_blank","location=no");S.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&S.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(A){return R()}}}if(i=="cordova-native")return s.enable=!1,{login:function(A){var S=v(),O=e.createLoginUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),S.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.cordova.plugins.browsertab.openUrl(A);else throw"Not supported by the OIDC server"},redirectUri:function(A){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+i}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var i=this;function d(){for(var m=new Date().getTime(),C=0;C<localStorage.length;C++){var y=localStorage.key(C);if(y&&y.indexOf("kc-callback-")==0){var R=localStorage.getItem(y);if(R)try{var A=JSON.parse(R).expires;(!A||A<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}i.get=function(m){if(m){var C="kc-callback-"+m,y=localStorage.getItem(C);return y&&(localStorage.removeItem(C),y=JSON.parse(y)),d(),y}},i.add=function(m){d();var C="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(C,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var i=this;i.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},i.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},i.removeItem=function(y){C(y,"",d(-100))};var d=function(y){var R=new Date;return R.setTime(R.getTime()+y*60*1e3),R},m=function(y){for(var R=y+"=",A=document.cookie.split(";"),S=0;S<A.length;S++){for(var O=A[S];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,A){var S=y+"="+R+"; expires="+A.toUTCString()+"; ";document.cookie=S}};function D(){try{return new se}catch{}return new be}function Ae(i){return function(){e.enableLogging&&i.apply(console,Array.prototype.slice.call(arguments))}}}async function Ul(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}function Dl(t){const e=new Sr(t),n={},o=async(a={},f)=>{if(await Ul())return a.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(a).then(async w=>{w&&await r(),f&&typeof f=="function"&&f(),document.documentElement.classList.add("app-mounted")}).catch(w=>{console.error(w),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},r=async()=>{const a=await e.loadUserInfo();n.email=a.email??"",n.emailVerified=a.email_verified===!0,n.firstName=a.given_name??"",n.lastName=a.family_name??"",n.name=a.name??"",n.sub=a.sub??"",n.username=a.preferred_username??"",n.roles=[...a.role??[]],n.groups=[...a.group??[]],n.IsInRole=f=>n.roles.includes(f),sessionStorage.setItem("name",n.name)};return{Instance:e,User:n,Init:o,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}}}const Ml=t=>Dl(t);class zn{constructor(e=null){We(this,"errors",[]);We(this,"_value",null);We(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}const gd="";function _r(t,e){return function(){return t.apply(e,arguments)}}const{toString:$l}=Object.prototype,{getPrototypeOf:Wn}=Object,tn=(t=>e=>{const n=$l.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),De=t=>(t=t.toLowerCase(),e=>tn(e)===t),nn=t=>e=>typeof e===t,{isArray:pt}=Array,Nt=nn("undefined");function Hl(t){return t!==null&&!Nt(t)&&t.constructor!==null&&!Nt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const xr=De("ArrayBuffer");function jl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&xr(t.buffer),e}const Vl=nn("string"),Ie=nn("function"),vr=nn("number"),on=t=>t!==null&&typeof t=="object",zl=t=>t===!0||t===!1,rn=t=>{if(tn(t)!=="object")return!1;const e=Wn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Wl=De("Date"),ql=De("File"),Kl=De("Blob"),Gl=De("FileList"),Jl=t=>on(t)&&Ie(t.pipe),Yl=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=tn(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},Xl=De("URLSearchParams"),Zl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ft(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),pt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let f;for(o=0;o<a;o++)f=s[o],e.call(null,t[f],f,t)}}function Tr(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Pr=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Rr=t=>!Nt(t)&&t!==Pr;function qn(){const{caseless:t}=Rr(this)&&this||{},e={},n=(o,r)=>{const s=t&&Tr(e,r)||r;rn(e[s])&&rn(o)?e[s]=qn(e[s],o):rn(o)?e[s]=qn({},o):pt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Ft(arguments[o],n);return e}const Ql=(t,e,n,{allOwnKeys:o}={})=>(Ft(e,(r,s)=>{n&&Ie(r)?t[s]=_r(r,n):t[s]=r},{allOwnKeys:o}),t),eu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),tu=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},nu=(t,e,n,o)=>{let r,s,a;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!f[a]&&(e[a]=t[a],f[a]=!0);t=n!==!1&&Wn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ou=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},ru=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!vr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},su=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wn(Uint8Array)),iu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},au=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},cu=De("HTMLFormElement"),lu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Lr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),uu=De("RegExp"),Or=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Ft(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},du=t=>{Or(t,(e,n)=>{if(Ie(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(Ie(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},hu=()=>{},pu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Kn="abcdefghijklmnopqrstuvwxyz",Ir="0123456789",Br={DIGIT:Ir,ALPHA:Kn,ALPHA_DIGIT:Kn+Kn.toUpperCase()+Ir},mu=(t=16,e=Br.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function gu(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const yu=t=>{const e=new Array(10),n=(o,r)=>{if(on(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=pt(o)?[]:{};return Ft(o,(a,f)=>{const u=n(a,r+1);!Nt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},bu=De("AsyncFunction"),p={isArray:pt,isArrayBuffer:xr,isBuffer:Hl,isFormData:Yl,isArrayBufferView:jl,isString:Vl,isNumber:vr,isBoolean:zl,isObject:on,isPlainObject:rn,isUndefined:Nt,isDate:Wl,isFile:ql,isBlob:Kl,isRegExp:uu,isFunction:Ie,isStream:Jl,isURLSearchParams:Xl,isTypedArray:su,isFileList:Gl,forEach:Ft,merge:qn,extend:Ql,trim:Zl,stripBOM:eu,inherits:tu,toFlatObject:nu,kindOf:tn,kindOfTest:De,endsWith:ou,toArray:ru,forEachEntry:iu,matchAll:au,isHTMLForm:cu,hasOwnProperty:Lr,hasOwnProp:Lr,reduceDescriptors:Or,freezeMethods:du,toObjectSet:fu,toCamelCase:lu,noop:hu,toFiniteNumber:pu,findKey:Tr,global:Pr,isContextDefined:Rr,ALPHABET:Br,generateString:mu,isSpecCompliantForm:gu,toJSONObject:yu,isAsyncFn:bu,isThenable:t=>t&&(on(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function Y(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}p.inherits(Y,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:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Nr=Y.prototype,Fr={};["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(t=>{Fr[t]={value:t}}),Object.defineProperties(Y,Fr),Object.defineProperty(Nr,"isAxiosError",{value:!0}),Y.from=(t,e,n,o,r,s)=>{const a=Object.create(Nr);return p.toFlatObject(t,a,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),Y.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const wu=null;function Gn(t){return p.isPlainObject(t)||p.isArray(t)}function Ur(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function Dr(t,e,n){return t?t.concat(e).map(function(r,s){return r=Ur(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Eu(t){return p.isArray(t)&&!t.some(Gn)}const ku=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function sn(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,$){return!p.isUndefined($[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(p.isDate(B))return B.toISOString();if(!u&&p.isBlob(B))throw new Y("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(B)||p.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,$){let ee=B;if(B&&!$&&typeof B=="object"){if(p.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(p.isArray(B)&&Eu(B)||(p.isFileList(B)||p.endsWith(N,"[]"))&&(ee=p.toArray(B)))return N=Ur(N),ee.forEach(function(j,ye){!(p.isUndefined(j)||j===null)&&e.append(a===!0?Dr([N],ye,s):a===null?N:N+"[]",w(j))}),!1}return Gn(B)?!0:(e.append(Dr($,N,s),w(B)),!1)}const b=[],X=Object.assign(ku,{defaultVisitor:E,convertValue:w,isVisitable:Gn});function M(B,N){if(!p.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),p.forEach(B,function(ee,oe){(!(p.isUndefined(ee)||ee===null)&&r.call(e,ee,p.isString(oe)?oe.trim():oe,N,X))===!0&&M(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return M(t),e}function Mr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Jn(t,e){this._pairs=[],t&&sn(t,this,e)}const $r=Jn.prototype;$r.append=function(e,n){this._pairs.push([e,n])},$r.toString=function(e){const n=e?function(o){return e.call(this,o,Mr)}:Mr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Au(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hr(t,e,n){if(!e)return t;const o=n&&n.encode||Au,r=n&&n.serialize;let s;if(r?s=r(e,n):s=p.isURLSearchParams(e)?e.toString():new Jn(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Cu{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){p.forEach(this.handlers,function(o){o!==null&&e(o)})}}const jr=Cu,Vr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Su={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zr=typeof window<"u"&&typeof document<"u",_u=(t=>zr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),xu=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zr,hasStandardBrowserEnv:_u,hasStandardBrowserWebWorkerEnv:xu},Symbol.toStringTag,{value:"Module"})),...Su};function vu(t,e){return sn(t,new Me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Me.isNode&&p.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Tu(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function Wr(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),u=s>=n.length;return a=!a&&p.isArray(r)?r.length:a,u?(p.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!f):((!r[a]||!p.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&p.isArray(r[a])&&(r[a]=Pu(r[a])),!f)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(o,r)=>{e(Tu(o),r,n,0)}),n}return null}function Ru(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Yn={transitional:Vr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=p.isObject(e);if(s&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return r&&r?JSON.stringify(Wr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return vu(e,this.formSerializer).toString();if((f=p.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return sn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Ru(e)):e}],transformResponse:[function(e){const n=this.transitional||Yn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&p.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(a)throw f.name==="SyntaxError"?Y.from(f,Y.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Yn.headers[t]={}});const Xn=Yn,Lu=p.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"]),Ou=t=>{const e={};let n,o,r;return t&&t.split(`
80
+ `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Lu[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},qr=Symbol("internals");function Ut(t){return t&&String(t).trim().toLowerCase()}function an(t){return t===!1||t==null?t:p.isArray(t)?t.map(an):String(t)}function Iu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Bu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zn(t,e,n,o,r){if(p.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!p.isString(e)){if(p.isString(o))return e.indexOf(o)!==-1;if(p.isRegExp(o))return o.test(e)}}function Nu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Fu(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class cn{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ut(u);if(!E)throw new Error("header name must be a non-empty string");const b=p.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=an(f))}const a=(f,u)=>p.forEach(f,(w,E)=>s(w,E,u));return p.isPlainObject(e)||e instanceof this.constructor?a(e,n):p.isString(e)&&(e=e.trim())&&!Bu(e)?a(Ou(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Iu(r);if(p.isFunction(n))return n.call(this,r,o);if(p.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Zn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Ut(a),a){const f=p.findKey(o,a);f&&(!n||Zn(o,o[f],f,n))&&(delete o[f],r=!0)}}return p.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Zn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return p.forEach(this,(r,s)=>{const a=p.findKey(o,s);if(a){n[a]=an(r),delete n[s];return}const f=e?Nu(s):String(s).trim();f!==s&&delete n[s],n[f]=an(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return p.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&p.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
81
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[qr]=this[qr]={accessors:{}}).accessors,r=this.prototype;function s(a){const f=Ut(a);o[f]||(Fu(r,a),o[f]=!0)}return p.isArray(e)?e.forEach(s):s(e),this}}cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(cn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),p.freezeMethods(cn);const je=cn;function Qn(t,e){const n=this||Xn,o=e||n,r=je.from(o.headers);let s=o.data;return p.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Kr(t){return!!(t&&t.__CANCEL__)}function Dt(t,e,n){Y.call(this,t??"canceled",Y.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(Dt,Y,{__CANCEL__:!0});function Uu(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Du=Me.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),p.isString(o)&&a.push("path="+o),p.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $u(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Gr(t,e){return t&&!Mu(e)?$u(t,e):e}const Hu=Me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const f=p.isString(a)?r(a):a;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function ju(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Vu(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];a||(a=w),n[r]=u,o[r]=w;let b=s,X=0;for(;b!==r;)X+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-a<e)return;const M=E&&w-E;return M?Math.round(X*1e3/M):void 0}}function Jr(t,e){let n=0;const o=Vu(50,250);return r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=a;n=s;const E={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&w?(a-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const eo={http:wu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=je.from(t.headers).normalize();let{responseType:a,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(p.isFormData(r)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...$]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...$].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",$=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+$))}const X=Gr(t.baseURL,t.url);b.open(t.method.toUpperCase(),Hr(X,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function M(){if(!b)return;const N=je.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Uu(function(j){n(j),w()},function(j){o(j),w()},ee),b=null}if("onloadend"in b?b.onloadend=M:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(M)},b.onabort=function(){b&&(o(new Y("Request aborted",Y.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new Y("Network Error",Y.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let $=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||Vr;t.timeoutErrorMessage&&($=t.timeoutErrorMessage),o(new Y($,ee.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,t,b)),b=null},Me.hasStandardBrowserEnv&&(f&&p.isFunction(f)&&(f=f(t)),f||f!==!1&&Hu(X))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&Du.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&p.forEach(s.toJSON(),function($,ee){b.setRequestHeader(ee,$)}),p.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),a&&a!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",Jr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Jr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=N=>{b&&(o(!N||N.type?new Dt(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const B=ju(X);if(B&&Me.protocols.indexOf(B)===-1){o(new Y("Unsupported protocol "+B+":",Y.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};p.forEach(eo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yr=t=>`- ${t}`,zu=t=>p.isFunction(t)||t===null||t===!1,Xr={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!zu(n)&&(o=eo[(a=String(n)).toLowerCase()],o===void 0))throw new Y(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
82
+ `+s.map(Yr).join(`
83
+ `):" "+Yr(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:eo};function to(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function Zr(t){return to(t),t.headers=je.from(t.headers),t.data=Qn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Xr.getAdapter(t.adapter||Xn.adapter)(t).then(function(o){return to(t),o.data=Qn.call(t,t.transformResponse,o),o.headers=je.from(o.headers),o},function(o){return Kr(o)||(to(t),o&&o.response&&(o.response.data=Qn.call(t,t.transformResponse,o.response),o.response.headers=je.from(o.response.headers))),Promise.reject(o)})}const Qr=t=>t instanceof je?t.toJSON():t;function mt(t,e){e=e||{};const n={};function o(w,E,b){return p.isPlainObject(w)&&p.isPlainObject(E)?p.merge.call({caseless:b},w,E):p.isPlainObject(E)?p.merge({},E):p.isArray(E)?E.slice():E}function r(w,E,b){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!p.isUndefined(E))return o(void 0,E)}function a(w,E){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w)}else return o(void 0,E)}function f(w,E,b){if(b in e)return o(w,E);if(b in t)return o(void 0,w)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:f,headers:(w,E)=>r(Qr(w),Qr(E),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,X=b(t[E],e[E],E);p.isUndefined(X)&&b!==f||(n[E]=X)}),n}const es="1.6.5",no={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{no[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const ts={};no.transitional=function(e,n,o){function r(s,a){return"[Axios v"+es+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,f)=>{if(e===!1)throw new Y(r(a," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!ts[a]&&(ts[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,f):!0}};function Wu(t,e,n){if(typeof t!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const f=t[s],u=f===void 0||a(f,s,t);if(u!==!0)throw new Y("option "+s+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const oo={assertOptions:Wu,validators:no},Ge=oo.validators;class ln{constructor(e){this.defaults=e,this.interceptors={request:new jr,response:new jr}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&oo.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:oo.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=je.concat(a,s);const f=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let E,b=0,X;if(!u){const B=[Zr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),X=B.length,E=Promise.resolve(n);b<X;)E=E.then(B[b++],B[b++]);return E}X=f.length;let M=n;for(b=0;b<X;){const B=f[b++],N=f[b++];try{M=B(M)}catch($){N.call(this,$);break}}try{E=Zr.call(this,M)}catch(B){return Promise.reject(B)}for(b=0,X=w.length;b<X;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=mt(this.defaults,e);const n=Gr(e.baseURL,e.url);return Hr(n,e.params,e.paramsSerializer)}}p.forEach(["delete","get","head","options"],function(e){ln.prototype[e]=function(n,o){return this.request(mt(o||{},{method:e,url:n,data:(o||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,f){return this.request(mt(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[e]=n(),ln.prototype[e+"Form"]=n(!0)});const un=ln;class ro{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(f=>{o.subscribe(f),s=f}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,f){o.reason||(o.reason=new Dt(s,a,f),n(o.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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new ro(function(r){e=r}),cancel:e}}}const qu=ro;function Ku(t){return function(n){return t.apply(null,n)}}function Gu(t){return p.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});const Ju=so;function ns(t){const e=new un(t),n=_r(un.prototype.request,e);return p.extend(n,un.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ns(mt(t,r))},n}const re=ns(Xn);re.Axios=un,re.CanceledError=Dt,re.CancelToken=qu,re.isCancel=Kr,re.VERSION=es,re.toFormData=sn,re.AxiosError=Y,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Ku,re.isAxiosError=Gu,re.mergeConfig=mt,re.AxiosHeaders=je,re.formToJSON=t=>Wr(p.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Xr.getAdapter,re.HttpStatusCode=Ju,re.default=re;const Yu=re;class os{constructor(e){We(this,"keycloak");We(this,"axios");We(this,"fileName","silent-login.html");this.keycloak=e,this.axios=Yu.create(),this.axios.defaults.baseURL="https://localhost:5001/api",this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async n=>{await this.SilentLogin();const o=this.keycloak.token;return n.headers.Authorization=`Bearer ${o}`,n})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",o=typeof e.hasError=="boolean",r=typeof e.httpStatusCode=="number",s=Array.isArray(e.errors);return n&&o&&r&&s?e:null}catch{return null}}HandleThen(e){const n=new zn,o=this.ParseAppResult(e.data);return o===null?(n.value=e.data,n):o.hasError?(o.errors.forEach(r=>n.WithError(r)),n.httpStatusCode=o.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var r;const n=new zn,o=this.ParseAppResult((r=e.response)==null?void 0:r.data);return o===null?n.WithError(e.message):(n.WithErrors(o.errors),n.httpStatusCode=o.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),o=r=>{if(document.body.removeChild(n),window.removeEventListener("message",o),r.origin!==location.origin){e(!1);return}const s=r.data.action,a=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!a){e(!1);return}const w=new XMLHttpRequest;w.open("POST",this.tokenExchangeUrl,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.onreadystatechange=()=>{if(w.readyState===4){if(w.status===200){const E=JSON.parse(w.responseText);this.keycloak.setToken(E.access_token,null,E.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(a,f))};window.addEventListener("message",o)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,o=localStorage.getItem(n);if(o)return localStorage.removeItem(n),JSON.parse(o).pkceCodeVerifier}TokenExchangeParams(e,n){let o=`code=${e}&grant_type=authorization_code`;return o+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,o+=`&redirect_uri=${this.silentLoginRedirectUrl}`,o+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,o}GenerateIframe(){const e=document.createElement("iframe");return e.src=this.keycloak.createLoginUrl({prompt:"none",redirectUri:this.silentLoginRedirectUrl})??"",document.body.appendChild(e),e}get silentLoginRedirectUrl(){return`${location.origin}/${this.fileName}`}get tokenExchangeUrl(){return`${this.keycloak.authServerUrl}/realms/${this.keycloak.realm}/protocol/openid-connect/token`}get isTokenExpired(){const e=this.keycloak.tokenParsed,n=e?e.exp:null;return!e||!n?!0:n-Math.ceil(new Date().getTime()/1e3)+(this.keycloak.timeSkew??0)<10}}const Xu=t=>new os(t);Hn.SetInitialTheme(),Q.AppResult=zn,Q.AxiosClient=os,Q.Cor=Ht,Q.SfButton=go,Q.SfContent=ml,Q.SfDrawer=mo,Q.SfIcon=Et,Q.SfLayout=ul,Q.SfNavMenuLink=hl,Q.SfTabNavigation=kl,Q.Tamanho=rt,Q.UseAuthService=Ml,Q.UseAxiosClient=Xu,Q.UseDialogService=Er,Q.UseNavMenuService=pn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
84
84
  //# sourceMappingURL=lib.umd.js.map