@luizleon/sf.prefeiturasp.vuecomponents 4.0.12 → 4.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(te,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(te=typeof globalThis<"u"?globalThis:te||self,l((te.sf=te.sf||{},te.sf.prefeiturasp=te.sf.prefeiturasp||{},te.sf.prefeiturasp.vuecomponents={}),te.Vue))})(this,function(te,l){"use strict";var mh=Object.defineProperty;var ph=(te,l,kt)=>l in te?mh(te,l,{enumerable:!0,configurable:!0,writable:!0,value:kt}):te[l]=kt;var Ve=(te,l,kt)=>ph(te,typeof l!="symbol"?l+"":l,kt);class kt{constructor(){Ve(this,"_visible",l.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 ga=new kt,tr=()=>ga;class st{constructor(e){Ve(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 po(t=[]){let e="body > *:not(script):not(style)";for(const r of t)e+=`, ${r}`;const n=Math.max(...Array.from(document.querySelectorAll(e)).map(r=>{const o=getComputedStyle(r).zIndex;return+o==+o?+o:0}));return n>=100?n:100}let ya=(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),"");const wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},ba={},va={class:"sf-loading-circle"},wa=[l.createElementVNode("div",null,[l.createElementVNode("svg",{viewBox:"25 25 50 50"},[l.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function _a(t,e){return l.openBlock(),l.createElementBlock("div",va,wa)}const Sa=wn(ba,[["render",_a]]),nr=l.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){Ve(this,"zIndex");Ve(this,"wrapper");Ve(this,"inner");this.zIndex=po()+1,this.Render()}Render(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("sf-tooltip-wrapper"),this.wrapper.style.zIndex=`${this.zIndex??0}`,this.inner=document.createElement("div"),this.inner.classList.add("sf-tooltip-inner"),this.wrapper.appendChild(this.inner)}Show(i){this.inner.textContent=e.text;const s=i.target;document.body.appendChild(this.wrapper),this.Position(s.getBoundingClientRect()),this.wrapper.classList.add("visible")}Hide(){this.wrapper.classList.remove("visible"),this.wrapper.remove()}Position(i){const c=i.top,a=i.bottom,u=i.left,d=i.right,m=i.width/2-15,g=this.wrapper;g.style.top=`${a+10}px`,g.style.left=`${u}px`,g.style.marginLeft=`${m}px`,this.OutOfBottom()&&(g.style.top=`${c-g.clientHeight-10}px`,g.classList.add("top")),this.OutOfRight()&&(g.style.left=`${d-g.clientWidth}px`,g.style.marginLeft=`-${m}px`,g.classList.add("left"))}OutOfBottom(){return this.wrapper.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)}OutOfRight(){return this.wrapper.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)}}const r=new n;return l.onBeforeUnmount(()=>{r.Hide()}),(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:i[0]||(i[0]=(...s)=>l.unref(r).Show&&l.unref(r).Show(...s)),onMouseleave:i[1]||(i[1]=(...s)=>l.unref(r).Hide&&l.unref(r).Hide(...s)),onMousedown:i[2]||(i[2]=(...s)=>l.unref(r).Hide&&l.unref(r).Hide(...s))},[l.renderSlot(o.$slots,"default")],32))}}),ka=["disabled","tabindex"],Ca=["data-color"],_n=wn(l.defineComponent({__name:"Icon",props:{icon:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},size:{default:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{},tooltip:{},color:{default:"inherit"}},setup(t){const e=t,n=l.computed(()=>e.tooltip?nr:"div"),r=l.computed(()=>e.tooltip?"":"display-content"),o=l.computed(()=>new st(`${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.size==="sm").AddClass("sf-icon-medium",e.size==="md").AddClass("sf-icon-large",e.size==="lg").AddClass("sf-icon-xlarge",e.size==="xl").AddClass("sf-icon-2xlarge",e.size==="2xl").AddClass("sf-icon-3xlarge",e.size==="3xl").AddClass("sf-ripple",e.button===!0).AddClass(`${e.color}-color`,!!e.color&&e.color!=="inherit").Build());return(i,s)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{text:e.tooltip,class:l.normalizeClass(r.value)},{default:l.withCtx(()=>[e.visible?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle(e.style),class:l.normalizeClass(o.value)},[l.createElementVNode("button",l.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(l.openBlock(),l.createBlock(Sa,{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.icon),1)],64))],16,ka),e.dot?(l.openBlock(),l.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ca)):l.createCommentVNode("",!0)],6)):l.createCommentVNode("",!0)]),_:1},8,["text","class"]))}}),[["__scopeId","data-v-acf8f09c"]]),Ea=["id","onClick"],Aa={class:"sf-drawer-header"},Ta={class:"sf-drawer-title"},xa={class:"sf-drawer-content"},Pa={key:0,class:"sf-drawer-footer"},ho=l.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,r=e,o=l.useSlots(),i=l.ref(n.visible),s=l.ref(!1),c=l.ref(0),a=ya();function u(){i.value=!1}function d(_){(_.key==="Escape"||_.code==="Escape")&&u()}function m(){r("open"),window.document.addEventListener("keydown",d,!0)}function g(_){c.value=po(),_.style.zIndex=`${c.value}`}function S(_){var j;r("before-close"),(j=_==null?void 0:_.parentElement)==null||j.classList.add("sf-mask-overlay-leave")}function v(){window.document.removeEventListener("keydown",d,!0),s.value=!1}function $(){return new st("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 l.watch(()=>n.visible,_=>{i.value=_}),l.watch(()=>i.value,_=>{r("update:visible",_),_&&(s.value=!0)}),(_,j)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[s.value?(l.openBlock(),l.createElementBlock("div",{key:0,id:l.unref(a),class:l.normalizeClass($()),style:l.normalizeStyle({zIndex:c.value-1}),onClick:l.withModifiers(u,["stop"])},[l.createVNode(l.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:g,onEnter:m,onBeforeLeave:S,onAfterLeave:v},{default:l.withCtx(()=>[i.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!l.unref(o).footer}]),style:l.normalizeStyle(n.style),role:"dialog",onClick:j[0]||(j[0]=l.withModifiers(A=>_.void,["stop"]))},[l.createElementVNode("div",Aa,[l.createElementVNode("span",Ta,[l.renderSlot(_.$slots,"title")]),l.createVNode(_n,{button:!0,icon:"close",onClick:l.withModifiers(u,["stop"])},null,8,["onClick"])]),l.createElementVNode("div",xa,[l.renderSlot(_.$slots,"default")]),l.unref(o).footer?(l.openBlock(),l.createElementBlock("div",Pa,[l.renderSlot(_.$slots,"footer")])):l.createCommentVNode("",!0)],6)):l.createCommentVNode("",!0)]),_:3})],14,Ea)):l.createCommentVNode("",!0)]))}}),Ia=["id","name","disabled","data-color","form","type"],Oa={class:"sf-button-label"},go=l.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:{},iconFilled:{type:Boolean}},setup(t){const e=t;function n(){return new st(`${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(r,o)=>e.visible?(l.openBlock(),l.createElementBlock("button",{key:0,id:e.id,name:e.name,class:l.normalizeClass(n()),style:l.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(l.openBlock(),l.createBlock(_n,{key:0,icon:e.icon,loading:e.loading,size:e.size,color:void 0,"button-props":{tabindex:-1},filled:e.iconFilled},null,8,["icon","loading","size","filled"])):e.loading?(l.openBlock(),l.createBlock(_n,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):l.createCommentVNode("",!0),l.createElementVNode("span",Oa,[l.renderSlot(r.$slots,"default")])],14,Ia)):l.createCommentVNode("",!0)}}),yo="SweetAlert2:",La=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},rr=t=>t.charAt(0).toUpperCase()+t.slice(1),$e=t=>Array.prototype.slice.call(t),Te=t=>{console.warn(`${yo} ${typeof t=="object"?t.join(" "):t}`)},ft=t=>{console.error(`${yo} ${t}`)},bo=[],Ra=t=>{bo.includes(t)||(bo.push(t),Te(t))},$a=(t,e)=>{Ra(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Sn=t=>typeof t=="function"?t():t,or=t=>t&&typeof t.toPromise=="function",Mt=t=>or(t)?t.toPromise():Promise.resolve(t),ir=t=>t&&Promise.resolve(t)===t,Ct={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},Na=["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"],Ba={},Da=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],vo=t=>Object.prototype.hasOwnProperty.call(Ct,t),wo=t=>Na.indexOf(t)!==-1,sr=t=>Ba[t],Fa=t=>{vo(t)||Te(`Unknown parameter "${t}"`)},Ma=t=>{Da.includes(t)&&Te(`The parameter "${t}" is incompatible with toasts`)},Ua=t=>{sr(t)&&$a(t,sr(t))},Ha=t=>{!t.backdrop&&t.allowOutsideClick&&Te('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Fa(e),t.toast&&Ma(e),Ua(e)},ja="swal2-",_o=t=>{const e={};for(const n in t)e[t[n]]=ja+t[n];return e},b=_o(["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"]),Ut=_o(["success","warning","info","question","error"]),ve=()=>document.body.querySelector(`.${b.container}`),Ht=t=>{const e=ve();return e?e.querySelector(t):null},Ue=t=>Ht(`.${t}`),ae=()=>Ue(b.popup),jt=()=>Ue(b.icon),So=()=>Ue(b.title),kn=()=>Ue(b["html-container"]),ko=()=>Ue(b.image),Co=()=>Ue(b["progress-steps"]),Cn=()=>Ue(b["validation-message"]),ze=()=>Ht(`.${b.actions} .${b.confirm}`),at=()=>Ht(`.${b.actions} .${b.deny}`),Va=()=>Ue(b["input-label"]),Et=()=>Ht(`.${b.loader}`),mt=()=>Ht(`.${b.actions} .${b.cancel}`),Vt=()=>Ue(b.actions),Eo=()=>Ue(b.footer),En=()=>Ue(b["timer-progress-bar"]),ar=()=>Ue(b.close),za=`
1
+ (function(te,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(te=typeof globalThis<"u"?globalThis:te||self,l((te.sf=te.sf||{},te.sf.prefeiturasp=te.sf.prefeiturasp||{},te.sf.prefeiturasp.vuecomponents={}),te.Vue))})(this,function(te,l){"use strict";var ph=Object.defineProperty;var hh=(te,l,kt)=>l in te?ph(te,l,{enumerable:!0,configurable:!0,writable:!0,value:kt}):te[l]=kt;var Ve=(te,l,kt)=>hh(te,typeof l!="symbol"?l+"":l,kt);class kt{constructor(){Ve(this,"_visible",l.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 ga=new kt,tr=()=>ga;class st{constructor(e){Ve(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 po(t=[]){let e="body > *:not(script):not(style)";for(const r of t)e+=`, ${r}`;const n=Math.max(...Array.from(document.querySelectorAll(e)).map(r=>{const o=getComputedStyle(r).zIndex;return+o==+o?+o:0}));return n>=100?n:100}let ya=(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),"");const wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},ba={},va={class:"sf-loading-circle"},wa=[l.createElementVNode("div",null,[l.createElementVNode("svg",{viewBox:"25 25 50 50"},[l.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function _a(t,e){return l.openBlock(),l.createElementBlock("div",va,wa)}const Sa=wn(ba,[["render",_a]]),nr=l.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){Ve(this,"zIndex");Ve(this,"wrapper");Ve(this,"inner");this.zIndex=po()+1,this.Render()}Render(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("sf-tooltip-wrapper"),this.wrapper.style.zIndex=`${this.zIndex??0}`,this.inner=document.createElement("div"),this.inner.classList.add("sf-tooltip-inner"),this.wrapper.appendChild(this.inner)}Show(i){this.inner.textContent=e.text;const s=i.target;document.body.appendChild(this.wrapper),this.Position(s.getBoundingClientRect()),this.wrapper.classList.add("visible")}Hide(){this.wrapper.classList.remove("visible"),this.wrapper.remove()}Position(i){const c=i.top,a=i.bottom,u=i.left,d=i.right,m=i.width/2-15,g=this.wrapper;g.style.top=`${a+10}px`,g.style.left=`${u}px`,g.style.marginLeft=`${m}px`,this.OutOfBottom()&&(g.style.top=`${c-g.clientHeight-10}px`,g.classList.add("top")),this.OutOfRight()&&(g.style.left=`${d-g.clientWidth}px`,g.style.marginLeft=`-${m}px`,g.classList.add("left"))}OutOfBottom(){return this.wrapper.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)}OutOfRight(){return this.wrapper.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)}}const r=new n;return l.onBeforeUnmount(()=>{r.Hide()}),(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:i[0]||(i[0]=(...s)=>l.unref(r).Show&&l.unref(r).Show(...s)),onMouseleave:i[1]||(i[1]=(...s)=>l.unref(r).Hide&&l.unref(r).Hide(...s)),onMousedown:i[2]||(i[2]=(...s)=>l.unref(r).Hide&&l.unref(r).Hide(...s))},[l.renderSlot(o.$slots,"default")],32))}}),ka=["disabled","tabindex"],Ca=["data-color"],_n=wn(l.defineComponent({__name:"Icon",props:{icon:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},size:{default:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{},tooltip:{},color:{default:"inherit"}},setup(t){const e=t,n=l.computed(()=>e.tooltip?nr:"div"),r=l.computed(()=>e.tooltip?"":"display-content"),o=l.computed(()=>new st(`${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.size==="sm").AddClass("sf-icon-medium",e.size==="md").AddClass("sf-icon-large",e.size==="lg").AddClass("sf-icon-xlarge",e.size==="xl").AddClass("sf-icon-2xlarge",e.size==="2xl").AddClass("sf-icon-3xlarge",e.size==="3xl").AddClass("sf-ripple",e.button===!0).AddClass(`${e.color}-color`,!!e.color&&e.color!=="inherit").Build());return(i,s)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{text:e.tooltip,class:l.normalizeClass(r.value)},{default:l.withCtx(()=>[e.visible?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle(e.style),class:l.normalizeClass(o.value)},[l.createElementVNode("button",l.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(l.openBlock(),l.createBlock(Sa,{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.icon),1)],64))],16,ka),e.dot?(l.openBlock(),l.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ca)):l.createCommentVNode("",!0)],6)):l.createCommentVNode("",!0)]),_:1},8,["text","class"]))}}),[["__scopeId","data-v-acf8f09c"]]),Ea=["id","onClick"],Aa={class:"sf-drawer-header"},Ta={class:"sf-drawer-title"},xa={class:"sf-drawer-content"},Pa={key:0,class:"sf-drawer-footer"},ho=l.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,r=e,o=l.useSlots(),i=l.ref(n.visible),s=l.ref(!1),c=l.ref(0),a=ya();function u(){i.value=!1}function d(_){(_.key==="Escape"||_.code==="Escape")&&u()}function m(){r("open"),window.document.addEventListener("keydown",d,!0)}function g(_){c.value=po(),_.style.zIndex=`${c.value}`}function S(_){var j;r("before-close"),(j=_==null?void 0:_.parentElement)==null||j.classList.add("sf-mask-overlay-leave")}function v(){window.document.removeEventListener("keydown",d,!0),s.value=!1}function $(){return new st("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 l.watch(()=>n.visible,_=>{i.value=_}),l.watch(()=>i.value,_=>{r("update:visible",_),_&&(s.value=!0)}),(_,j)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[s.value?(l.openBlock(),l.createElementBlock("div",{key:0,id:l.unref(a),class:l.normalizeClass($()),style:l.normalizeStyle({zIndex:c.value-1}),onClick:l.withModifiers(u,["stop"])},[l.createVNode(l.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:g,onEnter:m,onBeforeLeave:S,onAfterLeave:v},{default:l.withCtx(()=>[i.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!l.unref(o).footer}]),style:l.normalizeStyle(n.style),role:"dialog",onClick:j[0]||(j[0]=l.withModifiers(A=>_.void,["stop"]))},[l.createElementVNode("div",Aa,[l.createElementVNode("span",Ta,[l.renderSlot(_.$slots,"title")]),l.createVNode(_n,{button:!0,icon:"close",onClick:l.withModifiers(u,["stop"])},null,8,["onClick"])]),l.createElementVNode("div",xa,[l.renderSlot(_.$slots,"default")]),l.unref(o).footer?(l.openBlock(),l.createElementBlock("div",Pa,[l.renderSlot(_.$slots,"footer")])):l.createCommentVNode("",!0)],6)):l.createCommentVNode("",!0)]),_:3})],14,Ea)):l.createCommentVNode("",!0)]))}}),Ia=["id","name","disabled","data-color","form","type"],Oa={class:"sf-button-label"},go=l.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:{},iconFilled:{type:Boolean}},setup(t){const e=t;function n(){return new st(`${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(r,o)=>e.visible?(l.openBlock(),l.createElementBlock("button",{key:0,id:e.id,name:e.name,class:l.normalizeClass(n()),style:l.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(l.openBlock(),l.createBlock(_n,{key:0,icon:e.icon,loading:e.loading,size:e.size,color:void 0,"button-props":{tabindex:-1},filled:e.iconFilled},null,8,["icon","loading","size","filled"])):e.loading?(l.openBlock(),l.createBlock(_n,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):l.createCommentVNode("",!0),l.createElementVNode("span",Oa,[l.renderSlot(r.$slots,"default")])],14,Ia)):l.createCommentVNode("",!0)}}),yo="SweetAlert2:",La=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},rr=t=>t.charAt(0).toUpperCase()+t.slice(1),$e=t=>Array.prototype.slice.call(t),Te=t=>{console.warn(`${yo} ${typeof t=="object"?t.join(" "):t}`)},ft=t=>{console.error(`${yo} ${t}`)},bo=[],Ra=t=>{bo.includes(t)||(bo.push(t),Te(t))},$a=(t,e)=>{Ra(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Sn=t=>typeof t=="function"?t():t,or=t=>t&&typeof t.toPromise=="function",Mt=t=>or(t)?t.toPromise():Promise.resolve(t),ir=t=>t&&Promise.resolve(t)===t,Ct={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},Na=["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"],Ba={},Da=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],vo=t=>Object.prototype.hasOwnProperty.call(Ct,t),wo=t=>Na.indexOf(t)!==-1,sr=t=>Ba[t],Fa=t=>{vo(t)||Te(`Unknown parameter "${t}"`)},Ma=t=>{Da.includes(t)&&Te(`The parameter "${t}" is incompatible with toasts`)},Ua=t=>{sr(t)&&$a(t,sr(t))},Ha=t=>{!t.backdrop&&t.allowOutsideClick&&Te('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Fa(e),t.toast&&Ma(e),Ua(e)},ja="swal2-",_o=t=>{const e={};for(const n in t)e[t[n]]=ja+t[n];return e},b=_o(["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"]),Ut=_o(["success","warning","info","question","error"]),ve=()=>document.body.querySelector(`.${b.container}`),Ht=t=>{const e=ve();return e?e.querySelector(t):null},Ue=t=>Ht(`.${t}`),ae=()=>Ue(b.popup),jt=()=>Ue(b.icon),So=()=>Ue(b.title),kn=()=>Ue(b["html-container"]),ko=()=>Ue(b.image),Co=()=>Ue(b["progress-steps"]),Cn=()=>Ue(b["validation-message"]),ze=()=>Ht(`.${b.actions} .${b.confirm}`),at=()=>Ht(`.${b.actions} .${b.deny}`),Va=()=>Ue(b["input-label"]),Et=()=>Ht(`.${b.loader}`),mt=()=>Ht(`.${b.actions} .${b.cancel}`),Vt=()=>Ue(b.actions),Eo=()=>Ue(b.footer),En=()=>Ue(b["timer-progress-bar"]),ar=()=>Ue(b.close),za=`
2
2
  a[href],
3
3
  area[href],
4
4
  input:not([disabled]),
@@ -61,7 +61,7 @@ showLoaderOnConfirm should be used together with preConfirm, see usage example:
61
61
  https://sweetalert2.github.io/#ajax-request`),Wl(t),typeof t.title=="string"&&(t.title=t.title.split(`
62
62
  `).join("<br />")),ol(t)}class Gl{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 Jl=()=>{At.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(At.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${At.previousBodyPadding+al()}px`)},Yl=()=>{At.previousBodyPadding!==null&&(document.body.style.paddingRight=`${At.previousBodyPadding}px`,At.previousBodyPadding=null)},Xl=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!tt(document.body,b.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,re(document.body,b.iosfix),Ql(),Zl()}},Zl=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&ae().scrollHeight>window.innerHeight-44&&(ve().style.paddingBottom="44px")},Ql=()=>{const t=ve();let e;t.ontouchstart=n=>{e=ec(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},ec=t=>{const e=t.target,n=ve();return tc(t)||nc(t)?!1:e===n||!Po(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Po(kn())&&kn().contains(e))},tc=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",nc=t=>t.touches&&t.touches.length>1,rc=()=>{if(tt(document.body,b.iosfix)){const t=parseInt(document.body.style.top,10);Ze(document.body,b.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Uo=10,oc=t=>{const e=ve(),n=ae();typeof t.willOpen=="function"&&t.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;ac(e,n,t),setTimeout(()=>{ic(e,n)},Uo),cr()&&(sc(e,t.scrollbarPadding,o),Bl()),!An()&&!Y.previousActiveElement&&(Y.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Ze(e,b["no-transition"])},Ho=t=>{const e=ae();if(t.target!==e)return;const n=ve();e.removeEventListener(Kt,Ho),n.style.overflowY="auto"},ic=(t,e)=>{Kt&&Io(e)?(t.style.overflowY="hidden",e.addEventListener(Kt,Ho)):t.style.overflowY="auto"},sc=(t,e,n)=>{Xl(),e&&n!=="hidden"&&Jl(),setTimeout(()=>{t.scrollTop=0})},ac=(t,e,n)=>{re(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),ye(e,"grid"),setTimeout(()=>{re(e,n.showClass.popup),e.style.removeProperty("opacity")},Uo),re([document.documentElement,document.body],b.shown),n.heightAuto&&n.backdrop&&!n.toast&&re([document.documentElement,document.body],b["height-auto"])},xt=t=>{let e=ae();e||new It,e=ae();const n=Et();An()?_e(jt()):lc(e,t),ye(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},lc=(t,e)=>{const n=Vt(),r=Et();!e&&Ne(ze())&&(e=ze()),ye(n),e&&(_e(e),r.setAttribute("data-button-to-replace",e.className)),r.parentNode.insertBefore(r,e),re([t,n],b.loading)},cc=(t,e)=>{e.input==="select"||e.input==="radio"?pc(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(or(e.inputValue)||ir(e.inputValue))&&(xt(ze()),hc(t,e))},uc=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return dc(n);case"radio":return fc(n);case"file":return mc(n);default:return e.inputAutoTrim?n.value.trim():n.value}},dc=t=>t.checked?1:0,fc=t=>t.checked?t.value:null,mc=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,pc=(t,e)=>{const n=ae(),r=o=>gc[e.input](n,hr(o),e);or(e.inputOptions)||ir(e.inputOptions)?(xt(ze()),Mt(e.inputOptions).then(o=>{t.hideLoading(),r(o)})):typeof e.inputOptions=="object"?r(e.inputOptions):ft(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},hc=(t,e)=>{const n=t.getInput();_e(n),Mt(e.inputValue).then(r=>{n.value=e.input==="number"?parseFloat(r)||0:`${r}`,ye(n),n.focus(),t.hideLoading()}).catch(r=>{ft(`Error in inputValue promise: ${r}`),n.value="",ye(n),n.focus(),t.hideLoading()})},gc={select:(t,e,n)=>{const r=lt(t,b.select),o=(i,s,c)=>{const a=document.createElement("option");a.value=c,we(a,s),a.selected=jo(c,n.inputValue),i.appendChild(a)};e.forEach(i=>{const s=i[0],c=i[1];if(Array.isArray(c)){const a=document.createElement("optgroup");a.label=s,a.disabled=!1,r.appendChild(a),c.forEach(u=>o(a,u[1],u[0]))}else o(r,c,s)}),r.focus()},radio:(t,e,n)=>{const r=lt(t,b.radio);e.forEach(i=>{const s=i[0],c=i[1],a=document.createElement("input"),u=document.createElement("label");a.type="radio",a.name=b.radio,a.value=s,jo(s,n.inputValue)&&(a.checked=!0);const d=document.createElement("span");we(d,c),d.className=b.label,u.appendChild(a),u.appendChild(d),r.appendChild(u)});const o=r.querySelectorAll("input");o.length&&o[0].focus()}},hr=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,r)=>{let o=n;typeof o=="object"&&(o=hr(o)),e.push([r,o])}):Object.keys(t).forEach(n=>{let r=t[n];typeof r=="object"&&(r=hr(r)),e.push([n,r])}),e},jo=(t,e)=>e&&e.toString()===t.toString();function Vo(){const t=X.innerParams.get(this);if(!t)return;const e=X.domCache.get(this);_e(e.loader),An()?t.icon&&ye(jt()):yc(e),Ze([e.popup,e.actions],b.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const yc=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?ye(e[0],"inline-block"):qa()&&_e(t.actions)};function bc(t){const e=X.innerParams.get(t||this),n=X.domCache.get(t||this);return n?ur(n.popup,e.input):null}const qt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},vc=()=>Ne(ae()),zo=()=>ze()&&ze().click(),wc=()=>at()&&at().click(),_c=()=>mt()&&mt().click(),Ko=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Sc=(t,e,n,r)=>{Ko(e),n.toast||(e.keydownHandler=o=>Cc(t,o,r),e.keydownTarget=n.keydownListenerCapture?window:ae(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},gr=(t,e,n)=>{const r=lr();if(r.length)return e=e+n,e===r.length?e=0:e===-1&&(e=r.length-1),r[e].focus();ae().focus()},Wo=["ArrowRight","ArrowDown"],kc=["ArrowLeft","ArrowUp"],Cc=(t,e,n)=>{const r=X.innerParams.get(t);r&&(e.isComposing||e.keyCode===229||(r.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Ec(t,e,r):e.key==="Tab"?Ac(e,r):[...Wo,...kc].includes(e.key)?Tc(e.key):e.key==="Escape"&&xc(e,r,n)))},Ec=(t,e,n)=>{if(Sn(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;zo(),e.preventDefault()}},Ac=(t,e)=>{const n=t.target,r=lr();let o=-1;for(let i=0;i<r.length;i++)if(n===r[i]){o=i;break}t.shiftKey?gr(e,o,-1):gr(e,o,1),t.stopPropagation(),t.preventDefault()},Tc=t=>{const e=ze(),n=at(),r=mt();if(![e,n,r].includes(document.activeElement))return;const o=Wo.includes(t)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let s=0;s<Vt().children.length;s++){if(i=i[o],!i)return;if(Ne(i)&&i instanceof HTMLButtonElement)break}i instanceof HTMLButtonElement&&i.focus()},xc=(t,e,n)=>{Sn(e.allowEscapeKey)&&(t.preventDefault(),n(Tt.esc))};function qo(t,e,n,r){An()?Go(t,r):(Xa(n).then(()=>Go(t,r)),Ko(Y)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),cr()&&(Yl(),rc(),Do()),Pc()}function Pc(){Ze([document.documentElement,document.body],[b.shown,b["height-auto"],b["no-backdrop"],b["toast-shown"]])}function xn(t){t=Rc(t);const e=qt.swalPromiseResolve.get(this),n=Oc(this);this.isAwaitingPromise()?t.isDismissed||(Gt(this),e(t)):n&&e(t)}function Ic(){return!!X.awaitingPromise.get(this)}const Oc=t=>{const e=ae();if(!e)return!1;const n=X.innerParams.get(t);if(!n||tt(e,n.hideClass.popup))return!1;Ze(e,n.showClass.popup),re(e,n.hideClass.popup);const r=ve();return Ze(r,n.showClass.backdrop),re(r,n.hideClass.backdrop),$c(t,e,n),!0};function Lc(t){const e=qt.swalPromiseReject.get(this);Gt(this),e&&e(t)}const Gt=t=>{t.isAwaitingPromise()&&(X.awaitingPromise.delete(t),X.innerParams.get(t)||t._destroy())},Rc=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),$c=(t,e,n)=>{const r=ve(),o=Kt&&Io(e);typeof n.willClose=="function"&&n.willClose(e),o?Nc(t,e,r,n.returnFocus,n.didClose):qo(t,r,n.returnFocus,n.didClose)},Nc=(t,e,n,r,o)=>{Y.swalCloseEventFinishedCallback=qo.bind(null,t,n,r,o),e.addEventListener(Kt,function(i){i.target===e&&(Y.swalCloseEventFinishedCallback(),delete Y.swalCloseEventFinishedCallback)})},Go=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Jo(t,e,n){const r=X.domCache.get(t);e.forEach(o=>{r[o].disabled=n})}function Yo(t,e){if(!t)return!1;if(t.type==="radio"){const r=t.parentNode.parentNode.querySelectorAll("input");for(let o=0;o<r.length;o++)r[o].disabled=e}else t.disabled=e}function Bc(){Jo(this,["confirmButton","denyButton","cancelButton"],!1)}function Dc(){Jo(this,["confirmButton","denyButton","cancelButton"],!0)}function Fc(){return Yo(this.getInput(),!1)}function Mc(){return Yo(this.getInput(),!0)}function Uc(t){const e=X.domCache.get(this),n=X.innerParams.get(this);we(e.validationMessage,t),e.validationMessage.className=b["validation-message"],n.customClass&&n.customClass.validationMessage&&re(e.validationMessage,n.customClass.validationMessage),ye(e.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid",!0),r.setAttribute("aria-describedby",b["validation-message"]),Ao(r),re(r,b.inputerror))}function Hc(){const t=X.domCache.get(this);t.validationMessage&&_e(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Ze(e,b.inputerror))}function jc(){return X.domCache.get(this).progressSteps}function Vc(t){const e=ae(),n=X.innerParams.get(this);if(!e||tt(e,n.hideClass.popup))return Te("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 r=zc(t),o=Object.assign({},n,r);Bo(this,o),X.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const zc=t=>{const e={};return Object.keys(t).forEach(n=>{wo(n)?e[n]=t[n]:Te(`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 Kc(){const t=X.domCache.get(this),e=X.innerParams.get(this);if(!e){Xo(this);return}t.popup&&Y.swalCloseEventFinishedCallback&&(Y.swalCloseEventFinishedCallback(),delete Y.swalCloseEventFinishedCallback),Y.deferDisposalTimer&&(clearTimeout(Y.deferDisposalTimer),delete Y.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Wc(this)}const Wc=t=>{Xo(t),delete t.params,delete Y.keydownHandler,delete Y.keydownTarget,delete Y.currentInstance},Xo=t=>{t.isAwaitingPromise()?(yr(X,t),X.awaitingPromise.set(t,!0)):(yr(qt,t),yr(X,t))},yr=(t,e)=>{for(const n in t)t[n].delete(e)},Zo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Kc,close:xn,closeModal:xn,closePopup:xn,closeToast:xn,disableButtons:Dc,disableInput:Mc,disableLoading:Vo,enableButtons:Bc,enableInput:Fc,getInput:bc,getProgressSteps:jc,handleAwaitingPromise:Gt,hideLoading:Vo,isAwaitingPromise:Ic,rejectPromise:Lc,resetValidationMessage:Hc,showValidationMessage:Uc,update:Vc},Symbol.toStringTag,{value:"Module"})),qc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.input?Qo(t,"confirm"):vr(t,!0)},Gc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Qo(t,"deny"):br(t,!1)},Jc=(t,e)=>{t.disableButtons(),e(Tt.cancel)},Qo=(t,e)=>{const n=X.innerParams.get(t);if(!n.input)return ft(`The "input" parameter is needed to be set when using returnInputValueOn${rr(e)}`);const r=uc(t,n);n.inputValidator?Yc(t,r,e):t.getInput().checkValidity()?e==="deny"?br(t,r):vr(t,r):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},Yc=(t,e,n)=>{const r=X.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Mt(r.inputValidator(e,r.validationMessage))).then(i=>{t.enableButtons(),t.enableInput(),i?t.showValidationMessage(i):n==="deny"?br(t,e):vr(t,e)})},br=(t,e)=>{const n=X.innerParams.get(t||void 0);n.showLoaderOnDeny&&xt(at()),n.preDeny?(X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Mt(n.preDeny(e,n.validationMessage))).then(o=>{o===!1?(t.hideLoading(),Gt(t)):t.closePopup({isDenied:!0,value:typeof o>"u"?e:o})}).catch(o=>ti(t||void 0,o))):t.closePopup({isDenied:!0,value:e})},ei=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},ti=(t,e)=>{t.rejectPromise(e)},vr=(t,e)=>{const n=X.innerParams.get(t||void 0);n.showLoaderOnConfirm&&xt(),n.preConfirm?(t.resetValidationMessage(),X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Mt(n.preConfirm(e,n.validationMessage))).then(o=>{Ne(Cn())||o===!1?(t.hideLoading(),Gt(t)):ei(t,typeof o>"u"?e:o)}).catch(o=>ti(t||void 0,o))):ei(t,e)},Xc=(t,e,n)=>{X.innerParams.get(t).toast?Zc(t,e,n):(eu(e),tu(e),nu(t,e,n))},Zc=(t,e,n)=>{e.popup.onclick=()=>{const r=X.innerParams.get(t);r&&(Qc(r)||r.timer||r.input)||n(Tt.close)}},Qc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Pn=!1;const eu=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Pn=!0)}}},tu=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Pn=!0)}}},nu=(t,e,n)=>{e.container.onclick=r=>{const o=X.innerParams.get(t);if(Pn){Pn=!1;return}r.target===e.container&&Sn(o.allowOutsideClick)&&n(Tt.backdrop)}},ru=t=>typeof t=="object"&&t.jquery,ni=t=>t instanceof Element||ru(t),ou=t=>{const e={};return typeof t[0]=="object"&&!ni(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const o=t[r];typeof o=="string"||ni(o)?e[n]=o:o!==void 0&&ft(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof o}`)}),e};function iu(...t){const e=this;return new e(...t)}function su(t){class e extends this{_main(r,o){return super._main(r,Object.assign({},t,o))}}return e}const au=()=>Y.timeout&&Y.timeout.getTimerLeft(),ri=()=>{if(Y.timeout)return Ga(),Y.timeout.stop()},oi=()=>{if(Y.timeout){const t=Y.timeout.start();return dr(t),t}},lu=()=>{const t=Y.timeout;return t&&(t.running?ri():oi())},cu=t=>{if(Y.timeout){const e=Y.timeout.increase(t);return dr(e,!0),e}},uu=()=>Y.timeout&&Y.timeout.isRunning();let ii=!1;const wr={};function du(t="data-swal-template"){wr[t]=this,ii||(document.body.addEventListener("click",fu),ii=!0)}const fu=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in wr){const r=e.getAttribute(n);if(r){wr[n].fire({template:r});return}}},mu=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:ou,bindClickHandler:du,clickCancel:_c,clickConfirm:zo,clickDeny:wc,enableLoading:xt,fire:iu,getActions:Vt,getCancelButton:mt,getCloseButton:ar,getConfirmButton:ze,getContainer:ve,getDenyButton:at,getFocusableElements:lr,getFooter:Eo,getHtmlContainer:kn,getIcon:jt,getImage:ko,getInputLabel:Va,getLoader:Et,getPopup:ae,getTimerLeft:au,getTimerProgressBar:En,getTitle:So,getValidationMessage:Cn,increaseTimer:cu,isDeprecatedParameter:sr,isLoading:Ka,isTimerRunning:uu,isUpdatableParameter:wo,isValidParameter:vo,isVisible:vc,mixin:su,resumeTimer:oi,showLoading:xt,stopTimer:ri,toggleTimer:lu},Symbol.toStringTag,{value:"Module"}));let _r;class Pt{constructor(...e){if(typeof window>"u")return;_r=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const r=this._main(this.params);X.promise.set(this,r)}_main(e,n={}){Ha(Object.assign({},n,e)),Y.currentInstance&&(Y.currentInstance._destroy(),cr()&&Do()),Y.currentInstance=this;const r=hu(e,n);ql(r),Object.freeze(r),Y.timeout&&(Y.timeout.stop(),delete Y.timeout),clearTimeout(Y.restoreFocusTimeout);const o=gu(this);return Bo(this,r),X.innerParams.set(this,r),pu(this,o,r)}then(e){return X.promise.get(this).then(e)}finally(e){return X.promise.get(this).finally(e)}}const pu=(t,e,n)=>new Promise((r,o)=>{const i=s=>{t.closePopup({isDismissed:!0,dismiss:s})};qt.swalPromiseResolve.set(t,r),qt.swalPromiseReject.set(t,o),e.confirmButton.onclick=()=>qc(t),e.denyButton.onclick=()=>Gc(t),e.cancelButton.onclick=()=>Jc(t,i),e.closeButton.onclick=()=>i(Tt.close),Xc(t,e,i),Sc(t,Y,n,i),cc(t,n),oc(n),yu(Y,n,i),bu(e,n),setTimeout(()=>{e.container.scrollTop=0})}),hu=(t,e)=>{const n=Dl(t),r=Object.assign({},Ct,e,n,t);return r.showClass=Object.assign({},Ct.showClass,r.showClass),r.hideClass=Object.assign({},Ct.hideClass,r.hideClass),r},gu=t=>{const e={popup:ae(),container:ve(),actions:Vt(),confirmButton:ze(),denyButton:at(),cancelButton:mt(),loader:Et(),closeButton:ar(),validationMessage:Cn(),progressSteps:Co()};return X.domCache.set(t,e),e},yu=(t,e,n)=>{const r=En();_e(r),e.timer&&(t.timeout=new Gl(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(ye(r),He(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&dr(e.timer)})))},bu=(t,e)=>{if(!e.toast){if(!Sn(e.allowEnterKey))return wu();vu(t,e)||gr(e,-1,1)}},vu=(t,e)=>e.focusDeny&&Ne(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&Ne(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&Ne(t.confirmButton)?(t.confirmButton.focus(),!0):!1,wu=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(Pt.prototype,Zo),Object.assign(Pt,mu),Object.keys(Zo).forEach(t=>{Pt[t]=function(...e){if(_r)return _r[t](...e)}}),Pt.DismissReason=Tt,Pt.version="11.4.8";const It=Pt;It.default=It;/*! @license DOMPurify 3.0.9 | (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.9/LICENSE */const{entries:si,setPrototypeOf:ai,isFrozen:_u,getPrototypeOf:Su,getOwnPropertyDescriptor:ku}=Object;let{freeze:Ce,seal:Ke,create:li}=Object,{apply:Sr,construct:kr}=typeof Reflect<"u"&&Reflect;Ce||(Ce=function(e){return e}),Ke||(Ke=function(e){return e}),Sr||(Sr=function(e,n,r){return e.apply(n,r)}),kr||(kr=function(e,n){return new e(...n)});const In=De(Array.prototype.forEach),ci=De(Array.prototype.pop),Jt=De(Array.prototype.push),On=De(String.prototype.toLowerCase),Cr=De(String.prototype.toString),Cu=De(String.prototype.match),Yt=De(String.prototype.replace),Eu=De(String.prototype.indexOf),Au=De(String.prototype.trim),We=De(Object.prototype.hasOwnProperty),Be=De(RegExp.prototype.test),Xt=Tu(TypeError);function De(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Sr(t,e,r)}}function Tu(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return kr(t,n)}}function Q(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:On;ai&&ai(t,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){const i=n(o);i!==o&&(_u(e)||(e[r]=i),o=i)}t[o]=!0}return t}function xu(t){for(let e=0;e<t.length;e++)We(t,e)||(t[e]=null);return t}function gt(t){const e=li(null);for(const[n,r]of si(t))We(t,n)&&(Array.isArray(r)?e[n]=xu(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=gt(r):e[n]=r);return e}function Ln(t,e){for(;t!==null;){const r=ku(t,e);if(r){if(r.get)return De(r.get);if(typeof r.value=="function")return De(r.value)}t=Su(t)}function n(){return null}return n}const ui=Ce(["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"]),Er=Ce(["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"]),Ar=Ce(["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"]),Pu=Ce(["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"]),Tr=Ce(["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"]),Iu=Ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),di=Ce(["#text"]),fi=Ce(["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"]),xr=Ce(["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"]),mi=Ce(["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"]),Rn=Ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ou=Ke(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Lu=Ke(/<%[\w\W]*|[\w\W]*%>/gm),Ru=Ke(/\${[\w\W]*}/gm),$u=Ke(/^data-[\-\w.\u00B7-\uFFFF]/),Nu=Ke(/^aria-[\-\w]+$/),pi=Ke(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Bu=Ke(/^(?:\w+script|data):/i),Du=Ke(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hi=Ke(/^html$/i);var gi=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ou,ERB_EXPR:Lu,TMPLIT_EXPR:Ru,DATA_ATTR:$u,ARIA_ATTR:Nu,IS_ALLOWED_URI:pi,IS_SCRIPT_OR_DATA:Bu,ATTR_WHITESPACE:Du,DOCTYPE_NAME:hi});const Fu=function(){return typeof window>"u"?null:window},Mu=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function yi(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fu();const e=V=>yi(V);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:a,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:S}=t,v=a.prototype,$=Ln(v,"cloneNode"),_=Ln(v,"nextSibling"),j=Ln(v,"childNodes"),A=Ln(v,"parentNode");if(typeof s=="function"){const V=n.createElement("template");V.content&&V.content.ownerDocument&&(n=V.content.ownerDocument)}let E,G="";const{implementation:ee,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:M}=n,{importNode:I}=r;let O={};e.isSupported=typeof si=="function"&&typeof A=="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:K,TMPLIT_EXPR:x,DATA_ATTR:q,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de}=gi;let{IS_ALLOWED_URI:he}=gi,z=null;const me=Q({},[...ui,...Er,...Ar,...Tr,...di]);let f=null;const h=Q({},[...fi,...xr,...mi,...Rn]);let k=Object.seal(li(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}})),P=null,C=null,D=!0,R=!0,N=!1,U=!0,F=!1,W=!1,ne=!1,Oe=!1,Ae=!1,be=!1,et=!1,Ys=!0,Xs=!1;const oh="user-content-";let ao=!0,yn=!1,Nt={},Bt=null;const Zs=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 Qs=null;const ea=Q({},["audio","video","img","source","image","track"]);let lo=null;const ta=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qn="http://www.w3.org/1998/Math/MathML",er="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let Dt=ot,co=!1,uo=null;const ih=Q({},[Qn,er,ot],Cr);let bn=null;const sh=["application/xhtml+xml","text/html"],ah="text/html";let ge=null,Ft=null;const lh=n.createElement("form"),na=function(p){return p instanceof RegExp||p instanceof Function},fo=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ft&&Ft===p)){if((!p||typeof p!="object")&&(p={}),p=gt(p),bn=sh.indexOf(p.PARSER_MEDIA_TYPE)===-1?ah:p.PARSER_MEDIA_TYPE,ge=bn==="application/xhtml+xml"?Cr:On,z=We(p,"ALLOWED_TAGS")?Q({},p.ALLOWED_TAGS,ge):me,f=We(p,"ALLOWED_ATTR")?Q({},p.ALLOWED_ATTR,ge):h,uo=We(p,"ALLOWED_NAMESPACES")?Q({},p.ALLOWED_NAMESPACES,Cr):ih,lo=We(p,"ADD_URI_SAFE_ATTR")?Q(gt(ta),p.ADD_URI_SAFE_ATTR,ge):ta,Qs=We(p,"ADD_DATA_URI_TAGS")?Q(gt(ea),p.ADD_DATA_URI_TAGS,ge):ea,Bt=We(p,"FORBID_CONTENTS")?Q({},p.FORBID_CONTENTS,ge):Zs,P=We(p,"FORBID_TAGS")?Q({},p.FORBID_TAGS,ge):{},C=We(p,"FORBID_ATTR")?Q({},p.FORBID_ATTR,ge):{},Nt=We(p,"USE_PROFILES")?p.USE_PROFILES:!1,D=p.ALLOW_ARIA_ATTR!==!1,R=p.ALLOW_DATA_ATTR!==!1,N=p.ALLOW_UNKNOWN_PROTOCOLS||!1,U=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=p.SAFE_FOR_TEMPLATES||!1,W=p.WHOLE_DOCUMENT||!1,Ae=p.RETURN_DOM||!1,be=p.RETURN_DOM_FRAGMENT||!1,et=p.RETURN_TRUSTED_TYPE||!1,Oe=p.FORCE_BODY||!1,Ys=p.SANITIZE_DOM!==!1,Xs=p.SANITIZE_NAMED_PROPS||!1,ao=p.KEEP_CONTENT!==!1,yn=p.IN_PLACE||!1,he=p.ALLOWED_URI_REGEXP||pi,Dt=p.NAMESPACE||ot,k=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&na(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&na(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),F&&(R=!1),be&&(Ae=!0),Nt&&(z=Q({},di),f=[],Nt.html===!0&&(Q(z,ui),Q(f,fi)),Nt.svg===!0&&(Q(z,Er),Q(f,xr),Q(f,Rn)),Nt.svgFilters===!0&&(Q(z,Ar),Q(f,xr),Q(f,Rn)),Nt.mathMl===!0&&(Q(z,Tr),Q(f,mi),Q(f,Rn))),p.ADD_TAGS&&(z===me&&(z=gt(z)),Q(z,p.ADD_TAGS,ge)),p.ADD_ATTR&&(f===h&&(f=gt(f)),Q(f,p.ADD_ATTR,ge)),p.ADD_URI_SAFE_ATTR&&Q(lo,p.ADD_URI_SAFE_ATTR,ge),p.FORBID_CONTENTS&&(Bt===Zs&&(Bt=gt(Bt)),Q(Bt,p.FORBID_CONTENTS,ge)),ao&&(z["#text"]=!0),W&&Q(z,["html","head","body"]),z.table&&(Q(z,["tbody"]),delete P.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=p.TRUSTED_TYPES_POLICY,G=E.createHTML("")}else E===void 0&&(E=Mu(S,o)),E!==null&&typeof G=="string"&&(G=E.createHTML(""));Ce&&Ce(p),Ft=p}},ra=Q({},["mi","mo","mn","ms","mtext"]),oa=Q({},["foreignobject","desc","title","annotation-xml"]),ch=Q({},["title","style","font","a","script"]),ia=Q({},[...Er,...Ar,...Pu]),sa=Q({},[...Tr,...Iu]),uh=function(p){let B=A(p);(!B||!B.tagName)&&(B={namespaceURI:Dt,tagName:"template"});const H=On(p.tagName),ce=On(B.tagName);return uo[p.namespaceURI]?p.namespaceURI===er?B.namespaceURI===ot?H==="svg":B.namespaceURI===Qn?H==="svg"&&(ce==="annotation-xml"||ra[ce]):!!ia[H]:p.namespaceURI===Qn?B.namespaceURI===ot?H==="math":B.namespaceURI===er?H==="math"&&oa[ce]:!!sa[H]:p.namespaceURI===ot?B.namespaceURI===er&&!oa[ce]||B.namespaceURI===Qn&&!ra[ce]?!1:!sa[H]&&(ch[H]||!ia[H]):!!(bn==="application/xhtml+xml"&&uo[p.namespaceURI]):!1},_t=function(p){Jt(e.removed,{element:p});try{p.parentNode.removeChild(p)}catch{p.remove()}},mo=function(p,B){try{Jt(e.removed,{attribute:B.getAttributeNode(p),from:B})}catch{Jt(e.removed,{attribute:null,from:B})}if(B.removeAttribute(p),p==="is"&&!f[p])if(Ae||be)try{_t(B)}catch{}else try{B.setAttribute(p,"")}catch{}},aa=function(p){let B=null,H=null;if(Oe)p="<remove></remove>"+p;else{const ke=Cu(p,/^[\r\n\t ]+/);H=ke&&ke[0]}bn==="application/xhtml+xml"&&Dt===ot&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const ce=E?E.createHTML(p):p;if(Dt===ot)try{B=new g().parseFromString(ce,bn)}catch{}if(!B||!B.documentElement){B=ee.createDocument(Dt,"template",null);try{B.documentElement.innerHTML=co?G:ce}catch{}}const Se=B.body||B.documentElement;return p&&H&&Se.insertBefore(n.createTextNode(H),Se.childNodes[0]||null),Dt===ot?M.call(B,W?"html":"body")[0]:W?B.documentElement:Se},la=function(p){return w.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},dh=function(p){return p instanceof m&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof d)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},ca=function(p){return typeof c=="function"&&p instanceof c},it=function(p,B,H){O[p]&&In(O[p],ce=>{ce.call(e,B,H,Ft)})},ua=function(p){let B=null;if(it("beforeSanitizeElements",p,null),dh(p))return _t(p),!0;const H=ge(p.nodeName);if(it("uponSanitizeElement",p,{tagName:H,allowedTags:z}),p.hasChildNodes()&&!ca(p.firstElementChild)&&Be(/<[/\w]/g,p.innerHTML)&&Be(/<[/\w]/g,p.textContent))return _t(p),!0;if(!z[H]||P[H]){if(!P[H]&&fa(H)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,H)||k.tagNameCheck instanceof Function&&k.tagNameCheck(H)))return!1;if(ao&&!Bt[H]){const ce=A(p)||p.parentNode,Se=j(p)||p.childNodes;if(Se&&ce){const ke=Se.length;for(let Le=ke-1;Le>=0;--Le)ce.insertBefore($(Se[Le],!0),_(p))}}return _t(p),!0}return p instanceof a&&!uh(p)||(H==="noscript"||H==="noembed"||H==="noframes")&&Be(/<\/no(script|embed|frames)/i,p.innerHTML)?(_t(p),!0):(F&&p.nodeType===3&&(B=p.textContent,In([L,K,x],ce=>{B=Yt(B,ce," ")}),p.textContent!==B&&(Jt(e.removed,{element:p.cloneNode()}),p.textContent=B)),it("afterSanitizeElements",p,null),!1)},da=function(p,B,H){if(Ys&&(B==="id"||B==="name")&&(H in n||H in lh))return!1;if(!(R&&!C[B]&&Be(q,B))){if(!(D&&Be(se,B))){if(!f[B]||C[B]){if(!(fa(p)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,p)||k.tagNameCheck instanceof Function&&k.tagNameCheck(p))&&(k.attributeNameCheck instanceof RegExp&&Be(k.attributeNameCheck,B)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(B))||B==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,H)||k.tagNameCheck instanceof Function&&k.tagNameCheck(H))))return!1}else if(!lo[B]){if(!Be(he,Yt(H,de,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&p!=="script"&&Eu(H,"data:")===0&&Qs[p])){if(!(N&&!Be(fe,Yt(H,de,"")))){if(H)return!1}}}}}}return!0},fa=function(p){return p!=="annotation-xml"&&p.indexOf("-")>0},ma=function(p){it("beforeSanitizeAttributes",p,null);const{attributes:B}=p;if(!B)return;const H={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ce=B.length;for(;ce--;){const Se=B[ce],{name:ke,namespaceURI:Le,value:St}=Se,vn=ge(ke);let Re=ke==="value"?St:Au(St);if(H.attrName=vn,H.attrValue=Re,H.keepAttr=!0,H.forceKeepAttr=void 0,it("uponSanitizeAttribute",p,H),Re=H.attrValue,H.forceKeepAttr||(mo(ke,p),!H.keepAttr))continue;if(!U&&Be(/\/>/i,Re)){mo(ke,p);continue}F&&In([L,K,x],ha=>{Re=Yt(Re,ha," ")});const pa=ge(p.nodeName);if(da(pa,vn,Re)){if(Xs&&(vn==="id"||vn==="name")&&(mo(ke,p),Re=oh+Re),E&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!Le)switch(S.getAttributeType(pa,vn)){case"TrustedHTML":{Re=E.createHTML(Re);break}case"TrustedScriptURL":{Re=E.createScriptURL(Re);break}}try{Le?p.setAttributeNS(Le,ke,Re):p.setAttribute(ke,Re),ci(e.removed)}catch{}}}it("afterSanitizeAttributes",p,null)},fh=function V(p){let B=null;const H=la(p);for(it("beforeSanitizeShadowDOM",p,null);B=H.nextNode();)it("uponSanitizeShadowNode",B,null),!ua(B)&&(B.content instanceof i&&V(B.content),ma(B));it("afterSanitizeShadowDOM",p,null)};return e.sanitize=function(V){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,H=null,ce=null,Se=null;if(co=!V,co&&(V="<!-->"),typeof V!="string"&&!ca(V))if(typeof V.toString=="function"){if(V=V.toString(),typeof V!="string")throw Xt("dirty is not a string, aborting")}else throw Xt("toString is not a function");if(!e.isSupported)return V;if(ne||fo(p),e.removed=[],typeof V=="string"&&(yn=!1),yn){if(V.nodeName){const St=ge(V.nodeName);if(!z[St]||P[St])throw Xt("root node is forbidden and cannot be sanitized in-place")}}else if(V instanceof c)B=aa("<!---->"),H=B.ownerDocument.importNode(V,!0),H.nodeType===1&&H.nodeName==="BODY"||H.nodeName==="HTML"?B=H:B.appendChild(H);else{if(!Ae&&!F&&!W&&V.indexOf("<")===-1)return E&&et?E.createHTML(V):V;if(B=aa(V),!B)return Ae?null:et?G:""}B&&Oe&&_t(B.firstChild);const ke=la(yn?V:B);for(;ce=ke.nextNode();)ua(ce)||(ce.content instanceof i&&fh(ce.content),ma(ce));if(yn)return V;if(Ae){if(be)for(Se=T.call(B.ownerDocument);B.firstChild;)Se.appendChild(B.firstChild);else Se=B;return(f.shadowroot||f.shadowrootmode)&&(Se=I.call(r,Se,!0)),Se}let Le=W?B.outerHTML:B.innerHTML;return W&&z["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Be(hi,B.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
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 Kc(){const t=X.domCache.get(this),e=X.innerParams.get(this);if(!e){Xo(this);return}t.popup&&Y.swalCloseEventFinishedCallback&&(Y.swalCloseEventFinishedCallback(),delete Y.swalCloseEventFinishedCallback),Y.deferDisposalTimer&&(clearTimeout(Y.deferDisposalTimer),delete Y.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Wc(this)}const Wc=t=>{Xo(t),delete t.params,delete Y.keydownHandler,delete Y.keydownTarget,delete Y.currentInstance},Xo=t=>{t.isAwaitingPromise()?(yr(X,t),X.awaitingPromise.set(t,!0)):(yr(qt,t),yr(X,t))},yr=(t,e)=>{for(const n in t)t[n].delete(e)},Zo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Kc,close:xn,closeModal:xn,closePopup:xn,closeToast:xn,disableButtons:Dc,disableInput:Mc,disableLoading:Vo,enableButtons:Bc,enableInput:Fc,getInput:bc,getProgressSteps:jc,handleAwaitingPromise:Gt,hideLoading:Vo,isAwaitingPromise:Ic,rejectPromise:Lc,resetValidationMessage:Hc,showValidationMessage:Uc,update:Vc},Symbol.toStringTag,{value:"Module"})),qc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.input?Qo(t,"confirm"):vr(t,!0)},Gc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Qo(t,"deny"):br(t,!1)},Jc=(t,e)=>{t.disableButtons(),e(Tt.cancel)},Qo=(t,e)=>{const n=X.innerParams.get(t);if(!n.input)return ft(`The "input" parameter is needed to be set when using returnInputValueOn${rr(e)}`);const r=uc(t,n);n.inputValidator?Yc(t,r,e):t.getInput().checkValidity()?e==="deny"?br(t,r):vr(t,r):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},Yc=(t,e,n)=>{const r=X.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Mt(r.inputValidator(e,r.validationMessage))).then(i=>{t.enableButtons(),t.enableInput(),i?t.showValidationMessage(i):n==="deny"?br(t,e):vr(t,e)})},br=(t,e)=>{const n=X.innerParams.get(t||void 0);n.showLoaderOnDeny&&xt(at()),n.preDeny?(X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Mt(n.preDeny(e,n.validationMessage))).then(o=>{o===!1?(t.hideLoading(),Gt(t)):t.closePopup({isDenied:!0,value:typeof o>"u"?e:o})}).catch(o=>ti(t||void 0,o))):t.closePopup({isDenied:!0,value:e})},ei=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},ti=(t,e)=>{t.rejectPromise(e)},vr=(t,e)=>{const n=X.innerParams.get(t||void 0);n.showLoaderOnConfirm&&xt(),n.preConfirm?(t.resetValidationMessage(),X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Mt(n.preConfirm(e,n.validationMessage))).then(o=>{Ne(Cn())||o===!1?(t.hideLoading(),Gt(t)):ei(t,typeof o>"u"?e:o)}).catch(o=>ti(t||void 0,o))):ei(t,e)},Xc=(t,e,n)=>{X.innerParams.get(t).toast?Zc(t,e,n):(eu(e),tu(e),nu(t,e,n))},Zc=(t,e,n)=>{e.popup.onclick=()=>{const r=X.innerParams.get(t);r&&(Qc(r)||r.timer||r.input)||n(Tt.close)}},Qc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Pn=!1;const eu=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Pn=!0)}}},tu=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Pn=!0)}}},nu=(t,e,n)=>{e.container.onclick=r=>{const o=X.innerParams.get(t);if(Pn){Pn=!1;return}r.target===e.container&&Sn(o.allowOutsideClick)&&n(Tt.backdrop)}},ru=t=>typeof t=="object"&&t.jquery,ni=t=>t instanceof Element||ru(t),ou=t=>{const e={};return typeof t[0]=="object"&&!ni(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const o=t[r];typeof o=="string"||ni(o)?e[n]=o:o!==void 0&&ft(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof o}`)}),e};function iu(...t){const e=this;return new e(...t)}function su(t){class e extends this{_main(r,o){return super._main(r,Object.assign({},t,o))}}return e}const au=()=>Y.timeout&&Y.timeout.getTimerLeft(),ri=()=>{if(Y.timeout)return Ga(),Y.timeout.stop()},oi=()=>{if(Y.timeout){const t=Y.timeout.start();return dr(t),t}},lu=()=>{const t=Y.timeout;return t&&(t.running?ri():oi())},cu=t=>{if(Y.timeout){const e=Y.timeout.increase(t);return dr(e,!0),e}},uu=()=>Y.timeout&&Y.timeout.isRunning();let ii=!1;const wr={};function du(t="data-swal-template"){wr[t]=this,ii||(document.body.addEventListener("click",fu),ii=!0)}const fu=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in wr){const r=e.getAttribute(n);if(r){wr[n].fire({template:r});return}}},mu=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:ou,bindClickHandler:du,clickCancel:_c,clickConfirm:zo,clickDeny:wc,enableLoading:xt,fire:iu,getActions:Vt,getCancelButton:mt,getCloseButton:ar,getConfirmButton:ze,getContainer:ve,getDenyButton:at,getFocusableElements:lr,getFooter:Eo,getHtmlContainer:kn,getIcon:jt,getImage:ko,getInputLabel:Va,getLoader:Et,getPopup:ae,getTimerLeft:au,getTimerProgressBar:En,getTitle:So,getValidationMessage:Cn,increaseTimer:cu,isDeprecatedParameter:sr,isLoading:Ka,isTimerRunning:uu,isUpdatableParameter:wo,isValidParameter:vo,isVisible:vc,mixin:su,resumeTimer:oi,showLoading:xt,stopTimer:ri,toggleTimer:lu},Symbol.toStringTag,{value:"Module"}));let _r;class Pt{constructor(...e){if(typeof window>"u")return;_r=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const r=this._main(this.params);X.promise.set(this,r)}_main(e,n={}){Ha(Object.assign({},n,e)),Y.currentInstance&&(Y.currentInstance._destroy(),cr()&&Do()),Y.currentInstance=this;const r=hu(e,n);ql(r),Object.freeze(r),Y.timeout&&(Y.timeout.stop(),delete Y.timeout),clearTimeout(Y.restoreFocusTimeout);const o=gu(this);return Bo(this,r),X.innerParams.set(this,r),pu(this,o,r)}then(e){return X.promise.get(this).then(e)}finally(e){return X.promise.get(this).finally(e)}}const pu=(t,e,n)=>new Promise((r,o)=>{const i=s=>{t.closePopup({isDismissed:!0,dismiss:s})};qt.swalPromiseResolve.set(t,r),qt.swalPromiseReject.set(t,o),e.confirmButton.onclick=()=>qc(t),e.denyButton.onclick=()=>Gc(t),e.cancelButton.onclick=()=>Jc(t,i),e.closeButton.onclick=()=>i(Tt.close),Xc(t,e,i),Sc(t,Y,n,i),cc(t,n),oc(n),yu(Y,n,i),bu(e,n),setTimeout(()=>{e.container.scrollTop=0})}),hu=(t,e)=>{const n=Dl(t),r=Object.assign({},Ct,e,n,t);return r.showClass=Object.assign({},Ct.showClass,r.showClass),r.hideClass=Object.assign({},Ct.hideClass,r.hideClass),r},gu=t=>{const e={popup:ae(),container:ve(),actions:Vt(),confirmButton:ze(),denyButton:at(),cancelButton:mt(),loader:Et(),closeButton:ar(),validationMessage:Cn(),progressSteps:Co()};return X.domCache.set(t,e),e},yu=(t,e,n)=>{const r=En();_e(r),e.timer&&(t.timeout=new Gl(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(ye(r),He(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&dr(e.timer)})))},bu=(t,e)=>{if(!e.toast){if(!Sn(e.allowEnterKey))return wu();vu(t,e)||gr(e,-1,1)}},vu=(t,e)=>e.focusDeny&&Ne(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&Ne(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&Ne(t.confirmButton)?(t.confirmButton.focus(),!0):!1,wu=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(Pt.prototype,Zo),Object.assign(Pt,mu),Object.keys(Zo).forEach(t=>{Pt[t]=function(...e){if(_r)return _r[t](...e)}}),Pt.DismissReason=Tt,Pt.version="11.4.8";const It=Pt;It.default=It;/*! @license DOMPurify 3.0.9 | (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.9/LICENSE */const{entries:si,setPrototypeOf:ai,isFrozen:_u,getPrototypeOf:Su,getOwnPropertyDescriptor:ku}=Object;let{freeze:Ce,seal:Ke,create:li}=Object,{apply:Sr,construct:kr}=typeof Reflect<"u"&&Reflect;Ce||(Ce=function(e){return e}),Ke||(Ke=function(e){return e}),Sr||(Sr=function(e,n,r){return e.apply(n,r)}),kr||(kr=function(e,n){return new e(...n)});const In=De(Array.prototype.forEach),ci=De(Array.prototype.pop),Jt=De(Array.prototype.push),On=De(String.prototype.toLowerCase),Cr=De(String.prototype.toString),Cu=De(String.prototype.match),Yt=De(String.prototype.replace),Eu=De(String.prototype.indexOf),Au=De(String.prototype.trim),We=De(Object.prototype.hasOwnProperty),Be=De(RegExp.prototype.test),Xt=Tu(TypeError);function De(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Sr(t,e,r)}}function Tu(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return kr(t,n)}}function Q(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:On;ai&&ai(t,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){const i=n(o);i!==o&&(_u(e)||(e[r]=i),o=i)}t[o]=!0}return t}function xu(t){for(let e=0;e<t.length;e++)We(t,e)||(t[e]=null);return t}function gt(t){const e=li(null);for(const[n,r]of si(t))We(t,n)&&(Array.isArray(r)?e[n]=xu(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=gt(r):e[n]=r);return e}function Ln(t,e){for(;t!==null;){const r=ku(t,e);if(r){if(r.get)return De(r.get);if(typeof r.value=="function")return De(r.value)}t=Su(t)}function n(){return null}return n}const ui=Ce(["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"]),Er=Ce(["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"]),Ar=Ce(["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"]),Pu=Ce(["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"]),Tr=Ce(["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"]),Iu=Ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),di=Ce(["#text"]),fi=Ce(["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"]),xr=Ce(["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"]),mi=Ce(["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"]),Rn=Ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ou=Ke(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Lu=Ke(/<%[\w\W]*|[\w\W]*%>/gm),Ru=Ke(/\${[\w\W]*}/gm),$u=Ke(/^data-[\-\w.\u00B7-\uFFFF]/),Nu=Ke(/^aria-[\-\w]+$/),pi=Ke(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Bu=Ke(/^(?:\w+script|data):/i),Du=Ke(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hi=Ke(/^html$/i);var gi=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ou,ERB_EXPR:Lu,TMPLIT_EXPR:Ru,DATA_ATTR:$u,ARIA_ATTR:Nu,IS_ALLOWED_URI:pi,IS_SCRIPT_OR_DATA:Bu,ATTR_WHITESPACE:Du,DOCTYPE_NAME:hi});const Fu=function(){return typeof window>"u"?null:window},Mu=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function yi(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fu();const e=V=>yi(V);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:c,Element:a,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:S}=t,v=a.prototype,$=Ln(v,"cloneNode"),_=Ln(v,"nextSibling"),j=Ln(v,"childNodes"),A=Ln(v,"parentNode");if(typeof s=="function"){const V=n.createElement("template");V.content&&V.content.ownerDocument&&(n=V.content.ownerDocument)}let E,G="";const{implementation:ee,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:M}=n,{importNode:I}=r;let O={};e.isSupported=typeof si=="function"&&typeof A=="function"&&ee&&ee.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:K,TMPLIT_EXPR:x,DATA_ATTR:q,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de}=gi;let{IS_ALLOWED_URI:he}=gi,z=null;const me=Q({},[...ui,...Er,...Ar,...Tr,...di]);let f=null;const h=Q({},[...fi,...xr,...mi,...Rn]);let k=Object.seal(li(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}})),P=null,C=null,D=!0,R=!0,N=!1,U=!0,F=!1,W=!1,ne=!1,Oe=!1,Ae=!1,be=!1,et=!1,Ys=!0,Xs=!1;const ih="user-content-";let ao=!0,yn=!1,Nt={},Bt=null;const Zs=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 Qs=null;const ea=Q({},["audio","video","img","source","image","track"]);let lo=null;const ta=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qn="http://www.w3.org/1998/Math/MathML",er="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let Dt=ot,co=!1,uo=null;const sh=Q({},[Qn,er,ot],Cr);let bn=null;const ah=["application/xhtml+xml","text/html"],lh="text/html";let ge=null,Ft=null;const ch=n.createElement("form"),na=function(p){return p instanceof RegExp||p instanceof Function},fo=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ft&&Ft===p)){if((!p||typeof p!="object")&&(p={}),p=gt(p),bn=ah.indexOf(p.PARSER_MEDIA_TYPE)===-1?lh:p.PARSER_MEDIA_TYPE,ge=bn==="application/xhtml+xml"?Cr:On,z=We(p,"ALLOWED_TAGS")?Q({},p.ALLOWED_TAGS,ge):me,f=We(p,"ALLOWED_ATTR")?Q({},p.ALLOWED_ATTR,ge):h,uo=We(p,"ALLOWED_NAMESPACES")?Q({},p.ALLOWED_NAMESPACES,Cr):sh,lo=We(p,"ADD_URI_SAFE_ATTR")?Q(gt(ta),p.ADD_URI_SAFE_ATTR,ge):ta,Qs=We(p,"ADD_DATA_URI_TAGS")?Q(gt(ea),p.ADD_DATA_URI_TAGS,ge):ea,Bt=We(p,"FORBID_CONTENTS")?Q({},p.FORBID_CONTENTS,ge):Zs,P=We(p,"FORBID_TAGS")?Q({},p.FORBID_TAGS,ge):{},C=We(p,"FORBID_ATTR")?Q({},p.FORBID_ATTR,ge):{},Nt=We(p,"USE_PROFILES")?p.USE_PROFILES:!1,D=p.ALLOW_ARIA_ATTR!==!1,R=p.ALLOW_DATA_ATTR!==!1,N=p.ALLOW_UNKNOWN_PROTOCOLS||!1,U=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=p.SAFE_FOR_TEMPLATES||!1,W=p.WHOLE_DOCUMENT||!1,Ae=p.RETURN_DOM||!1,be=p.RETURN_DOM_FRAGMENT||!1,et=p.RETURN_TRUSTED_TYPE||!1,Oe=p.FORCE_BODY||!1,Ys=p.SANITIZE_DOM!==!1,Xs=p.SANITIZE_NAMED_PROPS||!1,ao=p.KEEP_CONTENT!==!1,yn=p.IN_PLACE||!1,he=p.ALLOWED_URI_REGEXP||pi,Dt=p.NAMESPACE||ot,k=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&na(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&na(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),F&&(R=!1),be&&(Ae=!0),Nt&&(z=Q({},di),f=[],Nt.html===!0&&(Q(z,ui),Q(f,fi)),Nt.svg===!0&&(Q(z,Er),Q(f,xr),Q(f,Rn)),Nt.svgFilters===!0&&(Q(z,Ar),Q(f,xr),Q(f,Rn)),Nt.mathMl===!0&&(Q(z,Tr),Q(f,mi),Q(f,Rn))),p.ADD_TAGS&&(z===me&&(z=gt(z)),Q(z,p.ADD_TAGS,ge)),p.ADD_ATTR&&(f===h&&(f=gt(f)),Q(f,p.ADD_ATTR,ge)),p.ADD_URI_SAFE_ATTR&&Q(lo,p.ADD_URI_SAFE_ATTR,ge),p.FORBID_CONTENTS&&(Bt===Zs&&(Bt=gt(Bt)),Q(Bt,p.FORBID_CONTENTS,ge)),ao&&(z["#text"]=!0),W&&Q(z,["html","head","body"]),z.table&&(Q(z,["tbody"]),delete P.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=p.TRUSTED_TYPES_POLICY,G=E.createHTML("")}else E===void 0&&(E=Mu(S,o)),E!==null&&typeof G=="string"&&(G=E.createHTML(""));Ce&&Ce(p),Ft=p}},ra=Q({},["mi","mo","mn","ms","mtext"]),oa=Q({},["foreignobject","desc","title","annotation-xml"]),uh=Q({},["title","style","font","a","script"]),ia=Q({},[...Er,...Ar,...Pu]),sa=Q({},[...Tr,...Iu]),dh=function(p){let B=A(p);(!B||!B.tagName)&&(B={namespaceURI:Dt,tagName:"template"});const H=On(p.tagName),ce=On(B.tagName);return uo[p.namespaceURI]?p.namespaceURI===er?B.namespaceURI===ot?H==="svg":B.namespaceURI===Qn?H==="svg"&&(ce==="annotation-xml"||ra[ce]):!!ia[H]:p.namespaceURI===Qn?B.namespaceURI===ot?H==="math":B.namespaceURI===er?H==="math"&&oa[ce]:!!sa[H]:p.namespaceURI===ot?B.namespaceURI===er&&!oa[ce]||B.namespaceURI===Qn&&!ra[ce]?!1:!sa[H]&&(uh[H]||!ia[H]):!!(bn==="application/xhtml+xml"&&uo[p.namespaceURI]):!1},_t=function(p){Jt(e.removed,{element:p});try{p.parentNode.removeChild(p)}catch{p.remove()}},mo=function(p,B){try{Jt(e.removed,{attribute:B.getAttributeNode(p),from:B})}catch{Jt(e.removed,{attribute:null,from:B})}if(B.removeAttribute(p),p==="is"&&!f[p])if(Ae||be)try{_t(B)}catch{}else try{B.setAttribute(p,"")}catch{}},aa=function(p){let B=null,H=null;if(Oe)p="<remove></remove>"+p;else{const ke=Cu(p,/^[\r\n\t ]+/);H=ke&&ke[0]}bn==="application/xhtml+xml"&&Dt===ot&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const ce=E?E.createHTML(p):p;if(Dt===ot)try{B=new g().parseFromString(ce,bn)}catch{}if(!B||!B.documentElement){B=ee.createDocument(Dt,"template",null);try{B.documentElement.innerHTML=co?G:ce}catch{}}const Se=B.body||B.documentElement;return p&&H&&Se.insertBefore(n.createTextNode(H),Se.childNodes[0]||null),Dt===ot?M.call(B,W?"html":"body")[0]:W?B.documentElement:Se},la=function(p){return w.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},fh=function(p){return p instanceof m&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof d)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},ca=function(p){return typeof c=="function"&&p instanceof c},it=function(p,B,H){O[p]&&In(O[p],ce=>{ce.call(e,B,H,Ft)})},ua=function(p){let B=null;if(it("beforeSanitizeElements",p,null),fh(p))return _t(p),!0;const H=ge(p.nodeName);if(it("uponSanitizeElement",p,{tagName:H,allowedTags:z}),p.hasChildNodes()&&!ca(p.firstElementChild)&&Be(/<[/\w]/g,p.innerHTML)&&Be(/<[/\w]/g,p.textContent))return _t(p),!0;if(!z[H]||P[H]){if(!P[H]&&fa(H)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,H)||k.tagNameCheck instanceof Function&&k.tagNameCheck(H)))return!1;if(ao&&!Bt[H]){const ce=A(p)||p.parentNode,Se=j(p)||p.childNodes;if(Se&&ce){const ke=Se.length;for(let Le=ke-1;Le>=0;--Le)ce.insertBefore($(Se[Le],!0),_(p))}}return _t(p),!0}return p instanceof a&&!dh(p)||(H==="noscript"||H==="noembed"||H==="noframes")&&Be(/<\/no(script|embed|frames)/i,p.innerHTML)?(_t(p),!0):(F&&p.nodeType===3&&(B=p.textContent,In([L,K,x],ce=>{B=Yt(B,ce," ")}),p.textContent!==B&&(Jt(e.removed,{element:p.cloneNode()}),p.textContent=B)),it("afterSanitizeElements",p,null),!1)},da=function(p,B,H){if(Ys&&(B==="id"||B==="name")&&(H in n||H in ch))return!1;if(!(R&&!C[B]&&Be(q,B))){if(!(D&&Be(se,B))){if(!f[B]||C[B]){if(!(fa(p)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,p)||k.tagNameCheck instanceof Function&&k.tagNameCheck(p))&&(k.attributeNameCheck instanceof RegExp&&Be(k.attributeNameCheck,B)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(B))||B==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,H)||k.tagNameCheck instanceof Function&&k.tagNameCheck(H))))return!1}else if(!lo[B]){if(!Be(he,Yt(H,de,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&p!=="script"&&Eu(H,"data:")===0&&Qs[p])){if(!(N&&!Be(fe,Yt(H,de,"")))){if(H)return!1}}}}}}return!0},fa=function(p){return p!=="annotation-xml"&&p.indexOf("-")>0},ma=function(p){it("beforeSanitizeAttributes",p,null);const{attributes:B}=p;if(!B)return;const H={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ce=B.length;for(;ce--;){const Se=B[ce],{name:ke,namespaceURI:Le,value:St}=Se,vn=ge(ke);let Re=ke==="value"?St:Au(St);if(H.attrName=vn,H.attrValue=Re,H.keepAttr=!0,H.forceKeepAttr=void 0,it("uponSanitizeAttribute",p,H),Re=H.attrValue,H.forceKeepAttr||(mo(ke,p),!H.keepAttr))continue;if(!U&&Be(/\/>/i,Re)){mo(ke,p);continue}F&&In([L,K,x],ha=>{Re=Yt(Re,ha," ")});const pa=ge(p.nodeName);if(da(pa,vn,Re)){if(Xs&&(vn==="id"||vn==="name")&&(mo(ke,p),Re=ih+Re),E&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!Le)switch(S.getAttributeType(pa,vn)){case"TrustedHTML":{Re=E.createHTML(Re);break}case"TrustedScriptURL":{Re=E.createScriptURL(Re);break}}try{Le?p.setAttributeNS(Le,ke,Re):p.setAttribute(ke,Re),ci(e.removed)}catch{}}}it("afterSanitizeAttributes",p,null)},mh=function V(p){let B=null;const H=la(p);for(it("beforeSanitizeShadowDOM",p,null);B=H.nextNode();)it("uponSanitizeShadowNode",B,null),!ua(B)&&(B.content instanceof i&&V(B.content),ma(B));it("afterSanitizeShadowDOM",p,null)};return e.sanitize=function(V){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,H=null,ce=null,Se=null;if(co=!V,co&&(V="<!-->"),typeof V!="string"&&!ca(V))if(typeof V.toString=="function"){if(V=V.toString(),typeof V!="string")throw Xt("dirty is not a string, aborting")}else throw Xt("toString is not a function");if(!e.isSupported)return V;if(ne||fo(p),e.removed=[],typeof V=="string"&&(yn=!1),yn){if(V.nodeName){const St=ge(V.nodeName);if(!z[St]||P[St])throw Xt("root node is forbidden and cannot be sanitized in-place")}}else if(V instanceof c)B=aa("<!---->"),H=B.ownerDocument.importNode(V,!0),H.nodeType===1&&H.nodeName==="BODY"||H.nodeName==="HTML"?B=H:B.appendChild(H);else{if(!Ae&&!F&&!W&&V.indexOf("<")===-1)return E&&et?E.createHTML(V):V;if(B=aa(V),!B)return Ae?null:et?G:""}B&&Oe&&_t(B.firstChild);const ke=la(yn?V:B);for(;ce=ke.nextNode();)ua(ce)||(ce.content instanceof i&&mh(ce.content),ma(ce));if(yn)return V;if(Ae){if(be)for(Se=T.call(B.ownerDocument);B.firstChild;)Se.appendChild(B.firstChild);else Se=B;return(f.shadowroot||f.shadowrootmode)&&(Se=I.call(r,Se,!0)),Se}let Le=W?B.outerHTML:B.innerHTML;return W&&z["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Be(hi,B.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
65
65
  `+Le),F&&In([L,K,x],St=>{Le=Yt(Le,St," ")}),E&&et?E.createHTML(Le):Le},e.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fo(V),ne=!0},e.clearConfig=function(){Ft=null,ne=!1},e.isValidAttribute=function(V,p,B){Ft||fo({});const H=ge(V),ce=ge(p);return da(H,ce,B)},e.addHook=function(V,p){typeof p=="function"&&(O[V]=O[V]||[],Jt(O[V],p))},e.removeHook=function(V){if(O[V])return ci(O[V])},e.removeHooks=function(V){O[V]&&(O[V]=[])},e.removeAllHooks=function(){O={}},e}var bi=yi();let vi=class{get IsVisible(){return It.isVisible()}};class Uu extends vi{constructor(){super()}async CreateAlertAsync(e){let n="info",r,o;return typeof e=="string"||Array.isArray(e)?r=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",o=e.title??"",r=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{It.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${bi.sanitize(r)}</div>`}).then(()=>i(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}class Hu extends vi{async CreateConfirmAsync(e){return new Promise(n=>{It.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:bi.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(r=>{n(r.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const ju=()=>new Uu,wi=()=>new Hu;var Vu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ku(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?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(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var $n={};$n.byteLength=Gu,$n.toByteArray=Yu,$n.fromByteArray=Qu;for(var Qe=[],je=[],Wu=typeof Uint8Array<"u"?Uint8Array:Array,Pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot=0,qu=Pr.length;Ot<qu;++Ot)Qe[Ot]=Pr[Ot],je[Pr.charCodeAt(Ot)]=Ot;je[45]=62,je[95]=63;function _i(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 r=n===e?0:4-n%4;return[n,r]}function Gu(t){var e=_i(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Ju(t,e,n){return(e+n)*3/4-n}function Yu(t){var e,n=_i(t),r=n[0],o=n[1],i=new Wu(Ju(t,r,o)),s=0,c=o>0?r-4:r,a;for(a=0;a<c;a+=4)e=je[t.charCodeAt(a)]<<18|je[t.charCodeAt(a+1)]<<12|je[t.charCodeAt(a+2)]<<6|je[t.charCodeAt(a+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=je[t.charCodeAt(a)]<<2|je[t.charCodeAt(a+1)]>>4,i[s++]=e&255),o===1&&(e=je[t.charCodeAt(a)]<<10|je[t.charCodeAt(a+1)]<<4|je[t.charCodeAt(a+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function Xu(t){return Qe[t>>18&63]+Qe[t>>12&63]+Qe[t>>6&63]+Qe[t&63]}function Zu(t,e,n){for(var r,o=[],i=e;i<n;i+=3)r=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(Xu(r));return o.join("")}function Qu(t){for(var e,n=t.length,r=n%3,o=[],i=16383,s=0,c=n-r;s<c;s+=i)o.push(Zu(t,s,s+i>c?c:s+i));return r===1?(e=t[n-1],o.push(Qe[e>>2]+Qe[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],o.push(Qe[e>>10]+Qe[e>>4&63]+Qe[e<<2&63]+"=")),o.join("")}var Si={exports:{}};const ki=Ku(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
66
66
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
67
67
  *
@@ -419,5 +419,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
419
419
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Os]=this[Os]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=gn(s);r[c]||(Dp(o,s),r[c]=!0)}return y.isArray(e)?e.forEach(i):i(e),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(Ie.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),y.freezeMethods(Ie);function Zr(t,e){const n=this||hn,r=e||n,o=Ie.from(r.headers);let i=r.data;return y.forEach(t,function(c){i=c.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Ls(t){return!!(t&&t.__CANCEL__)}function $t(t,e,n){J.call(this,t??"canceled",J.ERR_CANCELED,e,n),this.name="CanceledError"}y.inherits($t,J,{__CANCEL__:!0});function Rs(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Mp(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(a){const u=Date.now(),d=r[i];s||(s=u),n[o]=a,r[o]=u;let m=i,g=0;for(;m!==o;)g+=n[m++],m=m%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const S=d&&u-d;return S?Math.round(g*1e3/S):void 0}}function Up(t,e){let n=0,r=1e3/e,o,i;const s=(u,d=Date.now())=>{n=d,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),m=d-n;m>=r?s(u,d):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-m)))},()=>o&&s(o)]}const Yn=(t,e,n=3)=>{let r=0;const o=Mp(50,250);return Up(i=>{const s=i.loaded,c=i.lengthComputable?i.total:void 0,a=s-r,u=o(a),d=s<=c;r=s;const m={loaded:s,total:c,progress:c?s/c:void 0,bytes:a,rate:u||void 0,estimated:u&&c&&d?(c-s)/u:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(m)},n)},$s=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ns=t=>(...e)=>y.asap(()=>t(...e)),Hp=Xe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const c=y.isString(s)?o(s):s;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),jp=Xe.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];y.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),y.isString(r)&&s.push("path="+r),y.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Vp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zp(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Bs(t,e){return t&&!Vp(e)?zp(t,e):e}const Ds=t=>t instanceof Ie?{...t}:t;function vt(t,e){e=e||{};const n={};function r(u,d,m){return y.isPlainObject(u)&&y.isPlainObject(d)?y.merge.call({caseless:m},u,d):y.isPlainObject(d)?y.merge({},d):y.isArray(d)?d.slice():d}function o(u,d,m){if(y.isUndefined(d)){if(!y.isUndefined(u))return r(void 0,u,m)}else return r(u,d,m)}function i(u,d){if(!y.isUndefined(d))return r(void 0,d)}function s(u,d){if(y.isUndefined(d)){if(!y.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function c(u,d,m){if(m in e)return r(u,d);if(m in t)return r(void 0,u)}const a={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(u,d)=>o(Ds(u),Ds(d),!0)};return y.forEach(Object.keys(Object.assign({},t,e)),function(d){const m=a[d]||o,g=m(t[d],e[d],d);y.isUndefined(g)&&m!==c||(n[d]=g)}),n}const Fs=t=>{const e=vt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=e;e.headers=s=Ie.from(s),e.url=Ts(Bs(e.baseURL,e.url),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let a;if(y.isFormData(n)){if(Xe.hasStandardBrowserEnv||Xe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((a=s.getContentType())!==!1){const[u,...d]=a?a.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Xe.hasStandardBrowserEnv&&(r&&y.isFunction(r)&&(r=r(e)),r||r!==!1&&Hp(e.url))){const u=o&&i&&jp.read(i);u&&s.set(o,u)}return e},Kp=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Fs(t);let i=o.data;const s=Ie.from(o.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:u}=o,d,m,g,S,v;function $(){S&&S(),v&&v(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function j(){if(!_)return;const E=Ie.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),ee={data:!c||c==="text"||c==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:E,config:t,request:_};Rs(function(T){n(T),$()},function(T){r(T),$()},ee),_=null}"onloadend"in _?_.onloadend=j:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(j)},_.onabort=function(){_&&(r(new J("Request aborted",J.ECONNABORTED,t,_)),_=null)},_.onerror=function(){r(new J("Network Error",J.ERR_NETWORK,t,_)),_=null},_.ontimeout=function(){let G=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const ee=o.transitional||Ps;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new J(G,ee.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&y.forEach(s.toJSON(),function(G,ee){_.setRequestHeader(ee,G)}),y.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),c&&c!=="json"&&(_.responseType=o.responseType),u&&([g,v]=Yn(u,!0),_.addEventListener("progress",g)),a&&_.upload&&([m,S]=Yn(a),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",S)),(o.cancelToken||o.signal)&&(d=E=>{_&&(r(!E||E.type?new $t(null,t,_):E),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const A=Fp(o.url);if(A&&Xe.protocols.indexOf(A)===-1){r(new J("Unsupported protocol "+A+":",J.ERR_BAD_REQUEST,t));return}_.send(i||null)})},Wp=(t,e)=>{let n=new AbortController,r;const o=function(a){if(!r){r=!0,s();const u=a instanceof Error?a:this.reason;n.abort(u instanceof J?u:new $t(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{o(new J(`timeout ${e} of ms exceeded`,J.ETIMEDOUT))},e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(a=>{a&&(a.removeEventListener?a.removeEventListener("abort",o):a.unsubscribe(o))}),t=null)};t.forEach(a=>a&&a.addEventListener&&a.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=s,[c,()=>{i&&clearTimeout(i),i=null}]},qp=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},Gp=async function*(t,e,n){for await(const r of t)yield*qp(ArrayBuffer.isView(r)?r:await n(String(r)),e)},Ms=(t,e,n,r,o)=>{const i=Gp(t,e,o);let s=0,c,a=u=>{c||(c=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:m}=await i.next();if(d){a(),u.close();return}let g=m.byteLength;if(n){let S=s+=g;n(S)}u.enqueue(new Uint8Array(m))}catch(d){throw a(d),d}},cancel(u){return a(u),i.return()}},{highWaterMark:2})},Xn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Us=Xn&&typeof ReadableStream=="function",Qr=Xn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Hs=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Jp=Us&&Hs(()=>{let t=!1;const e=new Request(Xe.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),js=64*1024,eo=Us&&Hs(()=>y.isReadableStream(new Response("").body)),Zn={stream:eo&&(t=>t.body)};Xn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Zn[e]&&(Zn[e]=y.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,r)})})})(new Response);const Yp=async t=>{if(t==null)return 0;if(y.isBlob(t))return t.size;if(y.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(y.isArrayBufferView(t)||y.isArrayBuffer(t))return t.byteLength;if(y.isURLSearchParams(t)&&(t=t+""),y.isString(t))return(await Qr(t)).byteLength},Xp=async(t,e)=>{const n=y.toFiniteNumber(t.getContentLength());return n??Yp(e)},to={http:wp,xhr:Kp,fetch:Xn&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:c,onUploadProgress:a,responseType:u,headers:d,withCredentials:m="same-origin",fetchOptions:g}=Fs(t);u=u?(u+"").toLowerCase():"text";let[S,v]=o||i||s?Wp([o,i],s):[],$,_;const j=()=>{!$&&setTimeout(()=>{S&&S.unsubscribe()}),$=!0};let A;try{if(a&&Jp&&n!=="get"&&n!=="head"&&(A=await Xp(d,r))!==0){let w=new Request(e,{method:"POST",body:r,duplex:"half"}),T;if(y.isFormData(r)&&(T=w.headers.get("content-type"))&&d.setContentType(T),w.body){const[M,I]=$s(A,Yn(Ns(a)));r=Ms(w.body,js,M,I,Qr)}}y.isString(m)||(m=m?"include":"omit"),_=new Request(e,{...g,signal:S,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:m});let E=await fetch(_);const G=eo&&(u==="stream"||u==="response");if(eo&&(c||G)){const w={};["status","statusText","headers"].forEach(O=>{w[O]=E[O]});const T=y.toFiniteNumber(E.headers.get("content-length")),[M,I]=c&&$s(T,Yn(Ns(c),!0))||[];E=new Response(Ms(E.body,js,M,()=>{I&&I(),G&&j()},Qr),w)}u=u||"text";let ee=await Zn[y.findKey(Zn,u)||"text"](E,t);return!G&&j(),v&&v(),await new Promise((w,T)=>{Rs(w,T,{data:ee,headers:Ie.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:_})})}catch(E){throw j(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,t,_),{cause:E.cause||E}):J.from(E,E&&E.code,t,_)}})};y.forEach(to,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Vs=t=>`- ${t}`,Zp=t=>y.isFunction(t)||t===null||t===!1,zs={getAdapter:t=>{t=y.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){n=t[i];let s;if(r=n,!Zp(n)&&(r=to[(s=String(n)).toLowerCase()],r===void 0))throw new J(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([c,a])=>`adapter ${c} `+(a===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
420
420
  `+i.map(Vs).join(`
421
421
  `):" "+Vs(i[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:to};function no(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $t(null,t)}function Ks(t){return no(t),t.headers=Ie.from(t.headers),t.data=Zr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),zs.getAdapter(t.adapter||hn.adapter)(t).then(function(r){return no(t),r.data=Zr.call(t,t.transformResponse,r),r.headers=Ie.from(r.headers),r},function(r){return Ls(r)||(no(t),r&&r.response&&(r.response.data=Zr.call(t,t.transformResponse,r.response),r.response.headers=Ie.from(r.response.headers))),Promise.reject(r)})}const Ws="1.7.4",ro={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ro[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qs={};ro.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Ws+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,c)=>{if(e===!1)throw new J(o(s," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!qs[s]&&(qs[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,c):!0}};function Qp(t,e,n){if(typeof t!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const c=t[i],a=c===void 0||s(c,i,t);if(a!==!0)throw new J("option "+i+" must be "+a,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}}const oo={assertOptions:Qp,validators:ro},dt=oo.validators;class wt{constructor(e){this.defaults=e,this.interceptors={request:new xs,response:new xs}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
422
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=vt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&oo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),o!=null&&(y.isFunction(o)?n.paramsSerializer={serialize:o}:oo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&y.merge(i.common,i[n.method]);i&&y.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Ie.concat(s,i);const c=[];let a=!0;this.interceptors.request.forEach(function($){typeof $.runWhen=="function"&&$.runWhen(n)===!1||(a=a&&$.synchronous,c.unshift($.fulfilled,$.rejected))});const u=[];this.interceptors.response.forEach(function($){u.push($.fulfilled,$.rejected)});let d,m=0,g;if(!a){const v=[Ks.bind(this),void 0];for(v.unshift.apply(v,c),v.push.apply(v,u),g=v.length,d=Promise.resolve(n);m<g;)d=d.then(v[m++],v[m++]);return d}g=c.length;let S=n;for(m=0;m<g;){const v=c[m++],$=c[m++];try{S=v(S)}catch(_){$.call(this,_);break}}try{d=Ks.call(this,S)}catch(v){return Promise.reject(v)}for(m=0,g=u.length;m<g;)d=d.then(u[m++],u[m++]);return d}getUri(e){e=vt(this.defaults,e);const n=Bs(e.baseURL,e.url);return Ts(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){wt.prototype[e]=function(n,r){return this.request(vt(r||{},{method:e,url:n,data:(r||{}).data}))}}),y.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,c){return this.request(vt(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}wt.prototype[e]=n(),wt.prototype[e+"Form"]=n(!0)});class io{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(c=>{r.subscribe(c),i=c}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,c){r.reason||(r.reason=new $t(i,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new io(function(o){e=o}),cancel:e}}}function eh(t){return function(n){return t.apply(null,n)}}function th(t){return y.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});function Gs(t){const e=new wt(t),n=ds(wt.prototype.request,e);return y.extend(n,wt.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Gs(vt(t,o))},n}const pe=Gs(hn);pe.Axios=wt,pe.CanceledError=$t,pe.CancelToken=io,pe.isCancel=Ls,pe.VERSION=Ws,pe.toFormData=Gn,pe.AxiosError=J,pe.Cancel=pe.CanceledError,pe.all=function(e){return Promise.all(e)},pe.spread=eh,pe.isAxiosError=th,pe.mergeConfig=vt,pe.AxiosHeaders=Ie,pe.formToJSON=t=>Is(y.isHTMLForm(t)?new FormData(t):t),pe.getAdapter=zs.getAdapter,pe.HttpStatusCode=so,pe.default=pe;class Js{constructor(e,n){Ve(this,"keycloak");Ve(this,"axios");Ve(this,"fileName","silent-login.html");this.keycloak=e,this.axios=pe.create(),this.axios.defaults.baseURL=n,this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async r=>{await this.SilentLogin();const o=this.keycloak.token;return r.headers.Authorization=`Bearer ${o}`,r})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",r=typeof e.hasError=="boolean",o=typeof e.httpStatusCode=="number",i=Array.isArray(e.errors);return n&&r&&o&&i?e:null}catch{return null}}HandleThen(e){const n=new zr,r=this.ParseAppResult(e.data);return r===null?(n.value=e.data,n):r.hasError?(r.errors.forEach(o=>n.WithError(o)),n.httpStatusCode=r.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var o;const n=new zr,r=this.ParseAppResult((o=e.response)==null?void 0:o.data);return r===null?n.WithError(e.message):(n.WithErrors(r.errors),n.httpStatusCode=r.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),r=o=>{if(document.body.removeChild(n),window.removeEventListener("message",r),o.origin!==location.origin){e(!1);return}const i=o.data.action,s=o.data.code,c=o.data.state,a=o.data.error;if(i!=="silent-login-iframe-result"||a==="login_required"||!s){e(!1);return}const u=new XMLHttpRequest;u.open("POST",this.tokenExchangeUrl,!0),u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.onreadystatechange=()=>{if(u.readyState===4){if(u.status===200){const d=JSON.parse(u.responseText);this.keycloak.setToken(d.access_token,null,d.id_token,new Date().getTime()),e(!0);return}e(!1)}},u.send(this.TokenExchangeParams(s,c))};window.addEventListener("message",r)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,r=localStorage.getItem(n);if(r)return localStorage.removeItem(n),JSON.parse(r).pkceCodeVerifier}TokenExchangeParams(e,n){let r=`code=${e}&grant_type=authorization_code`;return r+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,r+=`&redirect_uri=${this.silentLoginRedirectUrl}`,r+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,r}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 nh=(t,e)=>new Js(t,e);function rh(){document.documentElement.classList.add("app-mounted")}Nn.SetInitialTheme(),te.AppResult=zr,te.AxiosClient=Js,te.RemovePreloader=rh,te.SfButton=go,te.SfContent=xd,te.SfDrawer=ho,te.SfIcon=_n,te.SfLayout=Ad,te.SfMessage=Bd,te.SfNavMenu=$m,te.SfTabNavigation=$d,te.SfTooltip=nr,te.StartAuthService=ad,te.ThemeToggleBase=Nn,te.UseAlertService=ju,te.UseAuthService=Ai,te.UseAxiosClient=nh,te.UseConfirmService=wi,te.UseNavMenuService=tr,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
422
+ `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=vt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&oo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),o!=null&&(y.isFunction(o)?n.paramsSerializer={serialize:o}:oo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&y.merge(i.common,i[n.method]);i&&y.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Ie.concat(s,i);const c=[];let a=!0;this.interceptors.request.forEach(function($){typeof $.runWhen=="function"&&$.runWhen(n)===!1||(a=a&&$.synchronous,c.unshift($.fulfilled,$.rejected))});const u=[];this.interceptors.response.forEach(function($){u.push($.fulfilled,$.rejected)});let d,m=0,g;if(!a){const v=[Ks.bind(this),void 0];for(v.unshift.apply(v,c),v.push.apply(v,u),g=v.length,d=Promise.resolve(n);m<g;)d=d.then(v[m++],v[m++]);return d}g=c.length;let S=n;for(m=0;m<g;){const v=c[m++],$=c[m++];try{S=v(S)}catch(_){$.call(this,_);break}}try{d=Ks.call(this,S)}catch(v){return Promise.reject(v)}for(m=0,g=u.length;m<g;)d=d.then(u[m++],u[m++]);return d}getUri(e){e=vt(this.defaults,e);const n=Bs(e.baseURL,e.url);return Ts(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){wt.prototype[e]=function(n,r){return this.request(vt(r||{},{method:e,url:n,data:(r||{}).data}))}}),y.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,c){return this.request(vt(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}wt.prototype[e]=n(),wt.prototype[e+"Form"]=n(!0)});class io{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(c=>{r.subscribe(c),i=c}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,c){r.reason||(r.reason=new $t(i,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new io(function(o){e=o}),cancel:e}}}function eh(t){return function(n){return t.apply(null,n)}}function th(t){return y.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});function Gs(t){const e=new wt(t),n=ds(wt.prototype.request,e);return y.extend(n,wt.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Gs(vt(t,o))},n}const pe=Gs(hn);pe.Axios=wt,pe.CanceledError=$t,pe.CancelToken=io,pe.isCancel=Ls,pe.VERSION=Ws,pe.toFormData=Gn,pe.AxiosError=J,pe.Cancel=pe.CanceledError,pe.all=function(e){return Promise.all(e)},pe.spread=eh,pe.isAxiosError=th,pe.mergeConfig=vt,pe.AxiosHeaders=Ie,pe.formToJSON=t=>Is(y.isHTMLForm(t)?new FormData(t):t),pe.getAdapter=zs.getAdapter,pe.HttpStatusCode=so,pe.default=pe;class Js{constructor(e,n){Ve(this,"keycloak");Ve(this,"axios");Ve(this,"fileName","silent-login.html");this.keycloak=e,this.axios=pe.create(),this.axios.defaults.baseURL=n,this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async r=>{await this.SilentLogin();const o=this.keycloak.token;return r.headers.Authorization=`Bearer ${o}`,r})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",r=typeof e.hasError=="boolean",o=typeof e.httpStatusCode=="number",i=Array.isArray(e.errors);return n&&r&&o&&i?e:null}catch{return null}}HandleThen(e){const n=new zr,r=this.ParseAppResult(e.data);return r===null?(n.value=e.data,n):r.hasError?(r.errors.forEach(o=>n.WithError(o)),n.httpStatusCode=r.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var o;const n=new zr,r=this.ParseAppResult((o=e.response)==null?void 0:o.data);return r===null?n.WithError(e.message):(n.WithErrors(r.errors),n.httpStatusCode=r.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),r=o=>{if(document.body.removeChild(n),window.removeEventListener("message",r),o.origin!==location.origin){e(!1);return}const i=o.data.action,s=o.data.code,c=o.data.state,a=o.data.error;if(i!=="silent-login-iframe-result"||a==="login_required"||!s){e(!1);return}const u=new XMLHttpRequest;u.open("POST",this.tokenExchangeUrl,!0),u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.onreadystatechange=()=>{if(u.readyState===4){if(u.status===200){const d=JSON.parse(u.responseText);this.keycloak.setToken(d.access_token,null,d.id_token,new Date().getTime()),e(!0);return}e(!1)}},u.send(this.TokenExchangeParams(s,c))};window.addEventListener("message",r)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,r=localStorage.getItem(n);if(r)return localStorage.removeItem(n),JSON.parse(r).pkceCodeVerifier}TokenExchangeParams(e,n){let r=`code=${e}&grant_type=authorization_code`;return r+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,r+=`&redirect_uri=${this.silentLoginRedirectUrl}`,r+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,r}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 nh=(t,e)=>new Js(t,e);function rh(){document.documentElement.classList.add("app-mounted")}function oh(){Nn.Toggle()}Nn.SetInitialTheme(),te.AppResult=zr,te.AxiosClient=Js,te.RemovePreloader=rh,te.SfButton=go,te.SfContent=xd,te.SfDrawer=ho,te.SfIcon=_n,te.SfLayout=Ad,te.SfMessage=Bd,te.SfNavMenu=$m,te.SfTabNavigation=$d,te.SfTooltip=nr,te.StartAuthService=ad,te.ToggleTheme=oh,te.UseAlertService=ju,te.UseAuthService=Ai,te.UseAxiosClient=nh,te.UseConfirmService=wi,te.UseNavMenuService=tr,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
423
423
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map