@luizleon/sf.prefeiturasp.vuecomponents 0.0.65 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axios/axiosClient.d.ts +3 -3
- package/dist/components/button/Button.d.ts +12 -12
- package/dist/components/content/Content.d.ts +8 -8
- package/dist/components/drawer/Drawer.d.ts +13 -13
- package/dist/components/icon/Icon.d.ts +21 -22
- package/dist/components/internal/HeaderAvatar.d.ts +2 -2
- package/dist/components/internal/LoadingCircle.d.ts +1 -1
- package/dist/components/internal/MenuIcon.d.ts +1 -1
- package/dist/components/internal/ScrollToTop.d.ts +1 -1
- package/dist/components/internal/ThemeToggle.d.ts +1 -1
- package/dist/components/layout/Layout.d.ts +3 -2
- package/dist/components/message/Message.d.ts +12 -12
- package/dist/components/navmenu/NavMenu.d.ts +12 -0
- package/dist/components/navmenulink/NavMenuLink.d.ts +2 -2
- package/dist/components/panelmenu/PanelMenu.d.ts +4 -4
- package/dist/components/tabnavigation/TabNavigation.d.ts +9 -9
- package/dist/components/tooltip/Tooltip.d.ts +7 -7
- package/dist/index.d.ts +18 -18
- package/dist/services/authService.d.ts +2 -2
- package/dist/services/dialogService.d.ts +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.es.js +4551 -4180
- package/dist/sf.prefeiturasp.vuecomponents.es.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.js +332 -69
- package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +12 -1
- package/package.json +6 -6
- package/src/components/button/Button.vue +1 -1
- package/src/components/icon/Icon.vue +12 -16
- package/src/components/internal/getMaxZindex.ts +3 -2
- package/src/components/layout/Layout.vue +1 -1
- package/src/components/navmenu/NavMenu.d.ts +30 -0
- package/src/components/navmenu/NavMenu.vue +105 -0
- package/src/index.ts +2 -0
- package/src/services/authService.ts +13 -4
- package/src/style/componentes.scss +5 -1
- package/src/style/src/_functions.scss +17 -2
- package/src/style/src/_mixins.scss +51 -29
- package/src/style/src/_variables.scss +11 -0
- package/src/style/src/components/_button.scss +8 -11
- package/src/style/src/components/_icon.scss +49 -47
- package/src/style/src/components/_tooltip.scss +6 -7
- package/src/types/index.ts +24 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Q,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],a):(Q=typeof globalThis<"u"?globalThis:Q||self,a((Q.sf=Q.sf||{},Q.sf.prefeiturasp=Q.sf.prefeiturasp||{},Q.sf.prefeiturasp.vuecomponents={}),Q.Vue,Q.VueRouter))})(this,function(Q,a,rt){"use strict";var rm=Object.defineProperty;var om=(Q,a,rt)=>a in Q?rm(Q,a,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Q[a]=rt;var Me=(Q,a,rt)=>(om(Q,typeof a!="symbol"?a+"":a,rt),rt);class xs{constructor(){Me(this,"_visible",a.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 Is=new xs,On=()=>Is;class Ze{constructor(e){Me(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 Kr(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const r=getComputedStyle(n).zIndex;return+r==+r?+r:0}))}let Ps=(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 Ln=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Ts={},Os={class:"sf-loading-circle"},Ls=[a.createElementVNode("div",null,[a.createElementVNode("svg",{viewBox:"25 25 50 50"},[a.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function Bs(t,e){return a.openBlock(),a.createElementBlock("div",Os,Ls)}const Fs=Ln(Ts,[["render",Bs]]),Bn=a.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){Me(this,"zIndex");Me(this,"wrapper");Me(this,"inner");this.zIndex=Kr()+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,l=i.bottom,d=i.left,f=i.right,p=i.width/2-15,v=this.wrapper;v.style.top=`${l+10}px`,v.style.left=`${d}px`,v.style.marginLeft=`${p}px`,this.OutOfBottom()&&(v.style.top=`${c-v.clientHeight-10}px`,v.classList.add("top")),this.OutOfRight()&&(v.style.left=`${f-v.clientWidth}px`,v.style.marginLeft=`-${p}px`,v.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 a.onBeforeUnmount(()=>{r.Hide()}),(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:i[0]||(i[0]=(...s)=>a.unref(r).Show&&a.unref(r).Show(...s)),onMouseleave:i[1]||(i[1]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s)),onMousedown:i[2]||(i[2]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s))},[a.renderSlot(o.$slots,"default")],32))}}),Rs=["disabled","tabindex"],$s=["data-color"],Qe=Ln(a.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:{}},setup(t){const e=t,n=a.computed(()=>e.tooltip?Bn:"div"),r=a.computed(()=>e.tooltip?"":"display-content"),o=a.computed(()=>new Ze(`${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-ripple",e.button===!0).Build());return(i,s)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{text:e.tooltip,class:a.normalizeClass(r.value)},{default:a.withCtx(()=>[e.visible?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle(e.style),class:a.normalizeClass(o.value)},[a.createElementVNode("button",a.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(a.openBlock(),a.createBlock(Fs,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(e.icon),1)],64))],16,Rs),e.dot?(a.openBlock(),a.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,$s)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)]),_:1},8,["text","class"]))}}),[["__scopeId","data-v-5de5e7b2"]]),Ns=["id","onClick"],Ds={class:"sf-drawer-header"},Ms={class:"sf-drawer-title"},Us={class:"sf-drawer-content"},Hs={key:0,class:"sf-drawer-footer"},zr=a.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=a.useSlots(),i=a.ref(n.visible),s=a.ref(!1),c=a.ref(0),l=Ps();function d(){i.value=!1}function f(C){(C.key==="Escape"||C.code==="Escape")&&d()}function p(){r("open"),window.document.addEventListener("keydown",f,!0)}function v(C){c.value=Kr(),C.style.zIndex=`${c.value}`}function w(C){var $;r("before-close"),($=C==null?void 0:C.parentElement)==null||$.classList.add("sf-mask-overlay-leave")}function A(){window.document.removeEventListener("keydown",f,!0),s.value=!1}function x(){return new Ze("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 a.watch(()=>n.visible,C=>{i.value=C}),a.watch(()=>i.value,C=>{r("update:visible",C),C&&(s.value=!0)}),(C,$)=>(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[s.value?(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(l),class:a.normalizeClass(x()),style:a.normalizeStyle({zIndex:c.value-1}),onClick:a.withModifiers(d,["stop"])},[a.createVNode(a.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:v,onEnter:p,onBeforeLeave:w,onAfterLeave:A},{default:a.withCtx(()=>[i.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!a.unref(o).footer}]),style:a.normalizeStyle(n.style),role:"dialog",onClick:$[0]||($[0]=a.withModifiers(q=>C.void,["stop"]))},[a.createElementVNode("div",Ds,[a.createElementVNode("span",Ms,[a.renderSlot(C.$slots,"title")]),a.createVNode(Qe,{button:!0,icon:"close",onClick:a.withModifiers(d,["stop"])},null,8,["onClick"])]),a.createElementVNode("div",Us,[a.renderSlot(C.$slots,"default")]),a.unref(o).footer?(a.openBlock(),a.createElementBlock("div",Hs,[a.renderSlot(C.$slots,"footer")])):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)]),_:3})],14,Ns)):a.createCommentVNode("",!0)]))}}),js=["id","name","disabled","data-color","form","type"],Vs={class:"sf-button-label"},Wr=a.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ze(`${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?(a.openBlock(),a.createElementBlock("button",{key:0,id:e.id,name:e.name,class:a.normalizeClass(n()),style:a.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(a.openBlock(),a.createBlock(Qe,{key:0,filled:e.variant==="filled",icon:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["filled","icon","loading","size"])):e.loading?(a.openBlock(),a.createBlock(Qe,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):a.createCommentVNode("",!0),a.createElementVNode("span",Vs,[a.renderSlot(r.$slots,"default")])],14,js)):a.createCommentVNode("",!0)}}),qr="SweetAlert2:",Ks=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},Fn=t=>t.charAt(0).toUpperCase()+t.slice(1),Oe=t=>Array.prototype.slice.call(t),_e=t=>{console.warn(`${qr} ${typeof t=="object"?t.join(" "):t}`)},ot=t=>{console.error(`${qr} ${t}`)},Gr=[],zs=t=>{Gr.includes(t)||(Gr.push(t),_e(t))},Ws=(t,e)=>{zs(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},nn=t=>typeof t=="function"?t():t,Rn=t=>t&&typeof t.toPromise=="function",kt=t=>Rn(t)?t.toPromise():Promise.resolve(t),$n=t=>t&&Promise.resolve(t)===t,ft={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:"×",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},qs=["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"],Gs={},Js=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Jr=t=>Object.prototype.hasOwnProperty.call(ft,t),Yr=t=>qs.indexOf(t)!==-1,Nn=t=>Gs[t],Ys=t=>{Jr(t)||_e(`Unknown parameter "${t}"`)},Xs=t=>{Js.includes(t)&&_e(`The parameter "${t}" is incompatible with toasts`)},Zs=t=>{Nn(t)&&Ws(t,Nn(t))},Qs=t=>{!t.backdrop&&t.allowOutsideClick&&_e('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ys(e),t.toast&&Xs(e),Zs(e)},ea="swal2-",Xr=t=>{const e={};for(const n in t)e[t[n]]=ea+t[n];return e},g=Xr(["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"]),xt=Xr(["success","warning","info","question","error"]),ye=()=>document.body.querySelector(`.${g.container}`),It=t=>{const e=ye();return e?e.querySelector(t):null},Re=t=>It(`.${t}`),oe=()=>Re(g.popup),Pt=()=>Re(g.icon),Zr=()=>Re(g.title),rn=()=>Re(g["html-container"]),Qr=()=>Re(g.image),eo=()=>Re(g["progress-steps"]),on=()=>Re(g["validation-message"]),Ue=()=>It(`.${g.actions} .${g.confirm}`),et=()=>It(`.${g.actions} .${g.deny}`),ta=()=>Re(g["input-label"]),pt=()=>It(`.${g.loader}`),it=()=>It(`.${g.actions} .${g.cancel}`),Tt=()=>Re(g.actions),to=()=>Re(g.footer),sn=()=>Re(g["timer-progress-bar"]),Dn=()=>Re(g.close),na=`
|
|
1
|
+
(function(te,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],a):(te=typeof globalThis<"u"?globalThis:te||self,a((te.sf=te.sf||{},te.sf.prefeiturasp=te.sf.prefeiturasp||{},te.sf.prefeiturasp.vuecomponents={}),te.Vue,te.VueRouter))})(this,function(te,a,Ct){"use strict";var _h=Object.defineProperty;var Sh=(te,a,Ct)=>a in te?_h(te,a,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):te[a]=Ct;var je=(te,a,Ct)=>Sh(te,typeof a!="symbol"?a+"":a,Ct);class ha{constructor(){je(this,"_visible",a.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 ha,_n=()=>ga;class st{constructor(e){je(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 go(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 Sn=(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=[a.createElementVNode("div",null,[a.createElementVNode("svg",{viewBox:"25 25 50 50"},[a.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function _a(t,e){return a.openBlock(),a.createElementBlock("div",va,wa)}const Sa=Sn(ba,[["render",_a]]),nr=a.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){je(this,"zIndex");je(this,"wrapper");je(this,"inner");this.zIndex=go()+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,l=i.bottom,u=i.left,d=i.right,m=i.width/2-15,g=this.wrapper;g.style.top=`${l+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 a.onBeforeUnmount(()=>{r.Hide()}),(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:i[0]||(i[0]=(...s)=>a.unref(r).Show&&a.unref(r).Show(...s)),onMouseleave:i[1]||(i[1]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s)),onMousedown:i[2]||(i[2]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s))},[a.renderSlot(o.$slots,"default")],32))}}),ka=["disabled","tabindex"],Ca=["data-color"],at=Sn(a.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=a.computed(()=>e.tooltip?nr:"div"),r=a.computed(()=>e.tooltip?"":"display-content"),o=a.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)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{text:e.tooltip,class:a.normalizeClass(r.value)},{default:a.withCtx(()=>[e.visible?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle(e.style),class:a.normalizeClass(o.value)},[a.createElementVNode("button",a.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(a.openBlock(),a.createBlock(Sa,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(e.icon),1)],64))],16,ka),e.dot?(a.openBlock(),a.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ca)):a.createCommentVNode("",!0)],6)):a.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"},yo=a.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=a.useSlots(),i=a.ref(n.visible),s=a.ref(!1),c=a.ref(0),l=ya();function u(){i.value=!1}function d(S){(S.key==="Escape"||S.code==="Escape")&&u()}function m(){r("open"),window.document.addEventListener("keydown",d,!0)}function g(S){c.value=go(),S.style.zIndex=`${c.value}`}function _(S){var H;r("before-close"),(H=S==null?void 0:S.parentElement)==null||H.classList.add("sf-mask-overlay-leave")}function w(){window.document.removeEventListener("keydown",d,!0),s.value=!1}function B(){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 a.watch(()=>n.visible,S=>{i.value=S}),a.watch(()=>i.value,S=>{r("update:visible",S),S&&(s.value=!0)}),(S,H)=>(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[s.value?(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(l),class:a.normalizeClass(B()),style:a.normalizeStyle({zIndex:c.value-1}),onClick:a.withModifiers(u,["stop"])},[a.createVNode(a.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:g,onEnter:m,onBeforeLeave:_,onAfterLeave:w},{default:a.withCtx(()=>[i.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!a.unref(o).footer}]),style:a.normalizeStyle(n.style),role:"dialog",onClick:H[0]||(H[0]=a.withModifiers(A=>S.void,["stop"]))},[a.createElementVNode("div",Aa,[a.createElementVNode("span",Ta,[a.renderSlot(S.$slots,"title")]),a.createVNode(at,{button:!0,icon:"close",onClick:a.withModifiers(u,["stop"])},null,8,["onClick"])]),a.createElementVNode("div",xa,[a.renderSlot(S.$slots,"default")]),a.unref(o).footer?(a.openBlock(),a.createElementBlock("div",Pa,[a.renderSlot(S.$slots,"footer")])):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)]),_:3})],14,Ea)):a.createCommentVNode("",!0)]))}}),Ia=["id","name","disabled","data-color","form","type"],Oa={class:"sf-button-label"},bo=a.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new 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?(a.openBlock(),a.createElementBlock("button",{key:0,id:e.id,name:e.name,class:a.normalizeClass(n()),style:a.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(a.openBlock(),a.createBlock(at,{key:0,icon:e.icon,loading:e.loading,size:e.size,color:void 0,"button-props":{tabindex:-1}},null,8,["icon","loading","size"])):e.loading?(a.openBlock(),a.createBlock(at,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):a.createCommentVNode("",!0),a.createElementVNode("span",Oa,[a.renderSlot(r.$slots,"default")])],14,Ia)):a.createCommentVNode("",!0)}}),vo="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),Re=t=>Array.prototype.slice.call(t),Te=t=>{console.warn(`${vo} ${typeof t=="object"?t.join(" "):t}`)},mt=t=>{console.error(`${vo} ${t}`)},wo=[],$a=t=>{wo.includes(t)||(wo.push(t),Te(t))},Ra=(t,e)=>{$a(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},kn=t=>typeof t=="function"?t():t,or=t=>t&&typeof t.toPromise=="function",Ut=t=>or(t)?t.toPromise():Promise.resolve(t),ir=t=>t&&Promise.resolve(t)===t,Et={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:"×",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"],_o=t=>Object.prototype.hasOwnProperty.call(Et,t),So=t=>Na.indexOf(t)!==-1,sr=t=>Ba[t],Fa=t=>{_o(t)||Te(`Unknown parameter "${t}"`)},Ma=t=>{Da.includes(t)&&Te(`The parameter "${t}" is incompatible with toasts`)},Ua=t=>{sr(t)&&Ra(t,sr(t))},Va=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)},Ha="swal2-",ko=t=>{const e={};for(const n in t)e[t[n]]=Ha+t[n];return e},b=ko(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),Vt=ko(["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),Co=()=>Ue(b.title),Cn=()=>Ue(b["html-container"]),Eo=()=>Ue(b.image),Ao=()=>Ue(b["progress-steps"]),En=()=>Ue(b["validation-message"]),ze=()=>Ht(`.${b.actions} .${b.confirm}`),lt=()=>Ht(`.${b.actions} .${b.deny}`),ja=()=>Ue(b["input-label"]),At=()=>Ht(`.${b.loader}`),pt=()=>Ht(`.${b.actions} .${b.cancel}`),zt=()=>Ue(b.actions),To=()=>Ue(b.footer),An=()=>Ue(b["timer-progress-bar"]),ar=()=>Ue(b.close),za=`
|
|
2
2
|
a[href],
|
|
3
3
|
area[href],
|
|
4
4
|
input:not([disabled]),
|
|
@@ -13,78 +13,176 @@
|
|
|
13
13
|
audio[controls],
|
|
14
14
|
video[controls],
|
|
15
15
|
summary
|
|
16
|
-
`,
|
|
17
|
-
<div aria-labelledby="${
|
|
18
|
-
<button type="button" class="${
|
|
19
|
-
<ul class="${
|
|
20
|
-
<div class="${
|
|
21
|
-
<img class="${
|
|
22
|
-
<h2 class="${
|
|
23
|
-
<div class="${
|
|
24
|
-
<input class="${
|
|
25
|
-
<input type="file" class="${
|
|
26
|
-
<div class="${
|
|
16
|
+
`,lr=()=>{const t=Re(ae().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,r)=>{const o=parseInt(n.getAttribute("tabindex")),i=parseInt(r.getAttribute("tabindex"));return o>i?1:o<i?-1:0}),e=Re(ae().querySelectorAll(za)).filter(n=>n.getAttribute("tabindex")!=="-1");return La(t.concat(e)).filter(n=>Ne(n))},cr=()=>tt(document.body,b.shown)&&!tt(document.body,b["toast-shown"])&&!tt(document.body,b["no-backdrop"]),Tn=()=>ae()&&tt(ae(),b.toast),Ka=()=>ae().hasAttribute("data-loading"),Tt={previousBodyPadding:null},we=(t,e)=>{if(t.textContent="",e){const r=new DOMParser().parseFromString(e,"text/html");Re(r.querySelector("head").childNodes).forEach(o=>{t.appendChild(o)}),Re(r.querySelector("body").childNodes).forEach(o=>{t.appendChild(o)})}},tt=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let r=0;r<n.length;r++)if(!t.classList.contains(n[r]))return!1;return!0},Wa=(t,e)=>{Re(t.classList).forEach(n=>{!Object.values(b).includes(n)&&!Object.values(Vt).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Ve=(t,e,n)=>{if(Wa(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Te(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);re(t,e.customClass[n])}},ur=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${b.popup} > .${b[e]}`);case"checkbox":return t.querySelector(`.${b.popup} > .${b.checkbox} input`);case"radio":return t.querySelector(`.${b.popup} > .${b.radio} input:checked`)||t.querySelector(`.${b.popup} > .${b.radio} input:first-child`);case"range":return t.querySelector(`.${b.popup} > .${b.range} input`);default:return t.querySelector(`.${b.popup} > .${b.input}`)}},xo=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Po=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(r=>{Array.isArray(t)?t.forEach(o=>{n?o.classList.add(r):o.classList.remove(r)}):n?t.classList.add(r):t.classList.remove(r)}))},re=(t,e)=>{Po(t,e,!0)},Ze=(t,e)=>{Po(t,e,!1)},ct=(t,e)=>{const n=Re(t.childNodes);for(let r=0;r<n.length;r++)if(tt(n[r],e))return n[r]},Kt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},ye=(t,e="flex")=>{t.style.display=e},_e=t=>{t.style.display="none"},Io=(t,e,n,r)=>{const o=t.querySelector(e);o&&(o.style[n]=r)},xn=(t,e,n)=>{e?ye(t,n):_e(t)},Ne=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),qa=()=>!Ne(ze())&&!Ne(lt())&&!Ne(pt()),Oo=t=>t.scrollHeight>t.clientHeight,Lo=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),r=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||r>0},dr=(t,e=!1)=>{const n=An();Ne(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},Ga=()=>{const t=An(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),r=e/n*100;t.style.removeProperty("transition"),t.style.width=`${r}%`},$o=()=>typeof window>"u"||typeof document>"u",Ja=100,Y={},Ya=()=>{Y.previousActiveElement&&Y.previousActiveElement.focus?(Y.previousActiveElement.focus(),Y.previousActiveElement=null):document.body&&document.body.focus()},Xa=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,r=window.scrollY;Y.restoreFocusTimeout=setTimeout(()=>{Ya(),e()},Ja),window.scrollTo(n,r)}),Za=`
|
|
17
|
+
<div aria-labelledby="${b.title}" aria-describedby="${b["html-container"]}" class="${b.popup}" tabindex="-1">
|
|
18
|
+
<button type="button" class="${b.close}"></button>
|
|
19
|
+
<ul class="${b["progress-steps"]}"></ul>
|
|
20
|
+
<div class="${b.icon}"></div>
|
|
21
|
+
<img class="${b.image}" />
|
|
22
|
+
<h2 class="${b.title}" id="${b.title}"></h2>
|
|
23
|
+
<div class="${b["html-container"]}" id="${b["html-container"]}"></div>
|
|
24
|
+
<input class="${b.input}" />
|
|
25
|
+
<input type="file" class="${b.file}" />
|
|
26
|
+
<div class="${b.range}">
|
|
27
27
|
<input type="range" />
|
|
28
28
|
<output></output>
|
|
29
29
|
</div>
|
|
30
|
-
<select class="${
|
|
31
|
-
<div class="${
|
|
32
|
-
<label for="${
|
|
30
|
+
<select class="${b.select}"></select>
|
|
31
|
+
<div class="${b.radio}"></div>
|
|
32
|
+
<label for="${b.checkbox}" class="${b.checkbox}">
|
|
33
33
|
<input type="checkbox" />
|
|
34
|
-
<span class="${
|
|
34
|
+
<span class="${b.label}"></span>
|
|
35
35
|
</label>
|
|
36
|
-
<textarea class="${
|
|
37
|
-
<div class="${
|
|
38
|
-
<div class="${
|
|
39
|
-
<div class="${
|
|
40
|
-
<button type="button" class="${
|
|
41
|
-
<button type="button" class="${
|
|
42
|
-
<button type="button" class="${
|
|
36
|
+
<textarea class="${b.textarea}"></textarea>
|
|
37
|
+
<div class="${b["validation-message"]}" id="${b["validation-message"]}"></div>
|
|
38
|
+
<div class="${b.actions}">
|
|
39
|
+
<div class="${b.loader}"></div>
|
|
40
|
+
<button type="button" class="${b.confirm}"></button>
|
|
41
|
+
<button type="button" class="${b.deny}"></button>
|
|
42
|
+
<button type="button" class="${b.cancel}"></button>
|
|
43
43
|
</div>
|
|
44
|
-
<div class="${
|
|
45
|
-
<div class="${
|
|
46
|
-
<div class="${
|
|
44
|
+
<div class="${b.footer}"></div>
|
|
45
|
+
<div class="${b["timer-progress-bar-container"]}">
|
|
46
|
+
<div class="${b["timer-progress-bar"]}"></div>
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
|
-
`.replace(/(^|\n)\s*/g,""),
|
|
49
|
+
`.replace(/(^|\n)\s*/g,""),Qa=()=>{const t=ve();return t?(t.remove(),Ze([document.documentElement,document.body],[b["no-backdrop"],b["toast-shown"],b["has-column"]]),!0):!1},ht=()=>{Y.currentInstance.resetValidationMessage()},el=()=>{const t=ae(),e=ct(t,b.input),n=ct(t,b.file),r=t.querySelector(`.${b.range} input`),o=t.querySelector(`.${b.range} output`),i=ct(t,b.select),s=t.querySelector(`.${b.checkbox} input`),c=ct(t,b.textarea);e.oninput=ht,n.onchange=ht,i.onchange=ht,s.onchange=ht,c.oninput=ht,r.oninput=()=>{ht(),o.value=r.value},r.onchange=()=>{ht(),r.nextSibling.value=r.value}},tl=t=>typeof t=="string"?document.querySelector(t):t,nl=t=>{const e=ae();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},rl=t=>{window.getComputedStyle(t).direction==="rtl"&&re(ve(),b.rtl)},ol=t=>{const e=Qa();if($o()){mt("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=b.container,e&&re(n,b["no-transition"]),we(n,Za);const r=tl(t.target);r.appendChild(n),nl(t),rl(r),el()},fr=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?il(t,e):t&&we(e,t)},il=(t,e)=>{t.jquery?sl(e,t):we(e,t.toString())},sl=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},Wt=(()=>{if($o())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),al=()=>{const t=document.createElement("div");t.className=b["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},ll=(t,e)=>{const n=zt(),r=At();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?_e(n):ye(n),Ve(n,e,"actions"),cl(n,r,e),we(r,e.loaderHtml),Ve(r,e,"loader")};function cl(t,e,n){const r=ze(),o=lt(),i=pt();mr(r,"confirm",n),mr(o,"deny",n),mr(i,"cancel",n),ul(r,o,i,n),n.reverseButtons&&(n.toast?(t.insertBefore(i,r),t.insertBefore(o,r)):(t.insertBefore(i,e),t.insertBefore(o,e),t.insertBefore(r,e)))}function ul(t,e,n,r){if(!r.buttonsStyling)return Ze([t,e,n],b.styled);re([t,e,n],b.styled),r.confirmButtonColor&&(t.style.backgroundColor=r.confirmButtonColor,re(t,b["default-outline"])),r.denyButtonColor&&(e.style.backgroundColor=r.denyButtonColor,re(e,b["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,re(n,b["default-outline"]))}function mr(t,e,n){xn(t,n[`show${rr(e)}Button`],"inline-block"),we(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=b[e],Ve(t,n,`${e}Button`),re(t,n[`${e}ButtonClass`])}function dl(t,e){typeof e=="string"?t.style.background=e:e||re([document.documentElement,document.body],b["no-backdrop"])}function fl(t,e){e in b?re(t,b[e]):(Te('The "position" parameter is not valid, defaulting to "center"'),re(t,b.center))}function ml(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in b&&re(t,b[n])}}const pl=(t,e)=>{const n=ve();n&&(dl(n,e.backdrop),fl(n,e.position),ml(n,e.grow),Ve(n,e,"container"))},X={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},hl=["input","file","range","select","radio","checkbox","textarea"],gl=(t,e)=>{const n=ae(),r=X.innerParams.get(t),o=!r||e.input!==r.input;hl.forEach(i=>{const s=b[i],c=ct(n,s);vl(i,e.inputAttributes),c.className=s,o&&_e(c)}),e.input&&(o&&yl(e),wl(e))},yl=t=>{if(!xe[t.input])return mt(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Ro(t.input),n=xe[t.input](e,t);ye(n),setTimeout(()=>{xo(n)})},bl=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},vl=(t,e)=>{const n=ur(ae(),t);if(n){bl(n);for(const r in e)n.setAttribute(r,e[r])}},wl=t=>{const e=Ro(t.input);t.customClass&&re(e,t.customClass.input)},pr=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},qt=(t,e,n)=>{if(n.inputLabel){t.id=b.input;const r=document.createElement("label"),o=b["input-label"];r.setAttribute("for",t.id),r.className=o,re(r,n.customClass.inputLabel),r.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",r)}},Ro=t=>{const e=b[t]?b[t]:b.input;return ct(ae(),e)},xe={};xe.text=xe.email=xe.password=xe.number=xe.tel=xe.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:ir(e.inputValue)||Te(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),qt(t,t,e),pr(t,e),t.type=e.input,t),xe.file=(t,e)=>(qt(t,t,e),pr(t,e),t),xe.range=(t,e)=>{const n=t.querySelector("input"),r=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,r.value=e.inputValue,qt(n,t,e),t},xe.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");we(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return qt(t,t,e),t},xe.radio=t=>(t.textContent="",t),xe.checkbox=(t,e)=>{const n=ur(ae(),"checkbox");n.value="1",n.id=b.checkbox,n.checked=!!e.inputValue;const r=t.querySelector("span");return we(r,e.inputPlaceholder),t},xe.textarea=(t,e)=>{t.value=e.inputValue,pr(t,e),qt(t,t,e);const n=r=>parseInt(window.getComputedStyle(r).marginLeft)+parseInt(window.getComputedStyle(r).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const r=parseInt(window.getComputedStyle(ae()).width),o=()=>{const i=t.offsetWidth+n(t);i>r?ae().style.width=`${i}px`:ae().style.width=null};new MutationObserver(o).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const _l=(t,e)=>{const n=Cn();Ve(n,e,"htmlContainer"),e.html?(fr(e.html,n),ye(n,"block")):e.text?(n.textContent=e.text,ye(n,"block")):_e(n),gl(t,e)},Sl=(t,e)=>{const n=To();xn(n,e.footer),e.footer&&fr(e.footer,n),Ve(n,e,"footer")},kl=(t,e)=>{const n=ar();we(n,e.closeButtonHtml),Ve(n,e,"closeButton"),xn(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Cl=(t,e)=>{const n=X.innerParams.get(t),r=jt();if(n&&e.icon===n.icon){Bo(r,e),No(r,e);return}if(!e.icon&&!e.iconHtml)return _e(r);if(e.icon&&Object.keys(Vt).indexOf(e.icon)===-1)return mt(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),_e(r);ye(r),Bo(r,e),No(r,e),re(r,e.showClass.icon)},No=(t,e)=>{for(const n in Vt)e.icon!==n&&Ze(t,Vt[n]);re(t,Vt[e.icon]),xl(t,e),El(),Ve(t,e,"icon")},El=()=>{const t=ae(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let r=0;r<n.length;r++)n[r].style.backgroundColor=e},Al=`
|
|
50
50
|
<div class="swal2-success-circular-line-left"></div>
|
|
51
51
|
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
52
52
|
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
53
53
|
<div class="swal2-success-circular-line-right"></div>
|
|
54
|
-
`,
|
|
54
|
+
`,Tl=`
|
|
55
55
|
<span class="swal2-x-mark">
|
|
56
56
|
<span class="swal2-x-mark-line-left"></span>
|
|
57
57
|
<span class="swal2-x-mark-line-right"></span>
|
|
58
58
|
</span>
|
|
59
|
-
`,
|
|
59
|
+
`,Bo=(t,e)=>{t.textContent="",e.iconHtml?we(t,Do(e.iconHtml)):e.icon==="success"?we(t,Al):e.icon==="error"?we(t,Tl):we(t,Do({question:"?",warning:"!",info:"i"}[e.icon]))},xl=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Io(t,n,"backgroundColor",e.iconColor);Io(t,".swal2-success-ring","borderColor",e.iconColor)}},Do=t=>`<div class="${b["icon-content"]}">${t}</div>`,Pl=(t,e)=>{const n=Eo();if(!e.imageUrl)return _e(n);ye(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),Kt(n,"width",e.imageWidth),Kt(n,"height",e.imageHeight),n.className=b.image,Ve(n,e,"image")},Il=t=>{const e=document.createElement("li");return re(e,b["progress-step"]),we(e,t),e},Ol=t=>{const e=document.createElement("li");return re(e,b["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Ll=(t,e)=>{const n=Ao();if(!e.progressSteps||e.progressSteps.length===0)return _e(n);ye(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Te("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((r,o)=>{const i=Il(r);if(n.appendChild(i),o===e.currentProgressStep&&re(i,b["active-progress-step"]),o!==e.progressSteps.length-1){const s=Ol(e);n.appendChild(s)}})},$l=(t,e)=>{const n=Co();xn(n,e.title||e.titleText,"block"),e.title&&fr(e.title,n),e.titleText&&(n.innerText=e.titleText),Ve(n,e,"title")},Rl=(t,e)=>{const n=ve(),r=ae();e.toast?(Kt(n,"width",e.width),r.style.width="100%",r.insertBefore(At(),jt())):Kt(r,"width",e.width),Kt(r,"padding",e.padding),e.color&&(r.style.color=e.color),e.background&&(r.style.background=e.background),_e(En()),Nl(r,e)},Nl=(t,e)=>{t.className=`${b.popup} ${Ne(t)?e.showClass.popup:""}`,e.toast?(re([document.documentElement,document.body],b["toast-shown"]),re(t,b.toast)):re(t,b.modal),Ve(t,e,"popup"),typeof e.customClass=="string"&&re(t,e.customClass),e.icon&&re(t,b[`icon-${e.icon}`])},Fo=(t,e)=>{Rl(t,e),pl(t,e),Ll(t,e),Cl(t,e),Pl(t,e),$l(t,e),kl(t,e),_l(t,e),ll(t,e),Sl(t,e),typeof e.didRender=="function"&&e.didRender(ae())},xt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Bl=()=>{Re(document.body.children).forEach(e=>{e===ve()||e.contains(ve())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Mo=()=>{Re(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Uo=["swal-title","swal-html","swal-footer"],Dl=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return zl(n),Object.assign(Fl(n),Ml(n),Ul(n),Vl(n),Hl(n),jl(n,Uo))},Fl=t=>{const e={};return Re(t.querySelectorAll("swal-param")).forEach(n=>{gt(n,["name","value"]);const r=n.getAttribute("name"),o=n.getAttribute("value");typeof Et[r]=="boolean"&&o==="false"&&(e[r]=!1),typeof Et[r]=="object"&&(e[r]=JSON.parse(o))}),e},Ml=t=>{const e={};return Re(t.querySelectorAll("swal-button")).forEach(n=>{gt(n,["type","color","aria-label"]);const r=n.getAttribute("type");e[`${r}ButtonText`]=n.innerHTML,e[`show${rr(r)}Button`]=!0,n.hasAttribute("color")&&(e[`${r}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${r}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ul=t=>{const e={},n=t.querySelector("swal-image");return n&&(gt(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Vl=t=>{const e={},n=t.querySelector("swal-icon");return n&&(gt(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Hl=t=>{const e={},n=t.querySelector("swal-input");n&&(gt(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const r=t.querySelectorAll("swal-input-option");return r.length&&(e.inputOptions={},Re(r).forEach(o=>{gt(o,["value"]);const i=o.getAttribute("value"),s=o.innerHTML;e.inputOptions[i]=s})),e},jl=(t,e)=>{const n={};for(const r in e){const o=e[r],i=t.querySelector(o);i&&(gt(i,[]),n[o.replace(/^swal-/,"")]=i.innerHTML.trim())}return n},zl=t=>{const e=Uo.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Re(t.children).forEach(n=>{const r=n.tagName.toLowerCase();e.indexOf(r)===-1&&Te(`Unrecognized element <${r}>`)})},gt=(t,e)=>{Re(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Te([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Vo={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Kl(t){t.inputValidator||Object.keys(Vo).forEach(e=>{t.input===e&&(t.inputValidator=Vo[e])})}function Wl(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Te('Target parameter is not valid, defaulting to "body"'),t.target="body")}function ql(t){Kl(t),t.showLoaderOnConfirm&&!t.preConfirm&&Te(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
60
60
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
61
|
-
https://sweetalert2.github.io/#ajax-request`),
|
|
62
|
-
`).join("<br />")),ga(t)}class sl{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 al=()=>{mt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(mt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${mt.previousBodyPadding+va()}px`)},ll=()=>{mt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${mt.previousBodyPadding}px`,mt.previousBodyPadding=null)},cl=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Ge(document.body,g.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,te(document.body,g.iosfix),dl(),ul()}},ul=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&oe().scrollHeight>window.innerHeight-44&&(ye().style.paddingBottom="44px")},dl=()=>{const t=ye();let e;t.ontouchstart=n=>{e=fl(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},fl=t=>{const e=t.target,n=ye();return pl(t)||ml(t)?!1:e===n||!io(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(io(rn())&&rn().contains(e))},pl=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",ml=t=>t.touches&&t.touches.length>1,hl=()=>{if(Ge(document.body,g.iosfix)){const t=parseInt(document.body.style.top,10);Ve(document.body,g.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},yo=10,gl=t=>{const e=ye(),n=oe();typeof t.willOpen=="function"&&t.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;vl(e,n,t),setTimeout(()=>{yl(e,n)},yo),Un()&&(bl(e,t.scrollbarPadding,o),Ga()),!an()&&!J.previousActiveElement&&(J.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Ve(e,g["no-transition"])},bo=t=>{const e=oe();if(t.target!==e)return;const n=ye();e.removeEventListener(Lt,bo),n.style.overflowY="auto"},yl=(t,e)=>{Lt&&so(e)?(t.style.overflowY="hidden",e.addEventListener(Lt,bo)):t.style.overflowY="auto"},bl=(t,e,n)=>{cl(),e&&n!=="hidden"&&al(),setTimeout(()=>{t.scrollTop=0})},vl=(t,e,n)=>{te(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),he(e,"grid"),setTimeout(()=>{te(e,n.showClass.popup),e.style.removeProperty("opacity")},yo),te([document.documentElement,document.body],g.shown),n.heightAuto&&n.backdrop&&!n.toast&&te([document.documentElement,document.body],g["height-auto"])},gt=t=>{let e=oe();e||new bt,e=oe();const n=pt();an()?ve(Pt()):wl(e,t),he(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},wl=(t,e)=>{const n=Tt(),r=pt();!e&&Le(Ue())&&(e=Ue()),he(n),e&&(ve(e),r.setAttribute("data-button-to-replace",e.className)),r.parentNode.insertBefore(r,e),te([t,n],g.loading)},El=(t,e)=>{e.input==="select"||e.input==="radio"?kl(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(Rn(e.inputValue)||$n(e.inputValue))&&(gt(Ue()),xl(t,e))},Sl=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Cl(n);case"radio":return Al(n);case"file":return _l(n);default:return e.inputAutoTrim?n.value.trim():n.value}},Cl=t=>t.checked?1:0,Al=t=>t.checked?t.value:null,_l=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,kl=(t,e)=>{const n=oe(),r=o=>Il[e.input](n,Wn(o),e);Rn(e.inputOptions)||$n(e.inputOptions)?(gt(Ue()),kt(e.inputOptions).then(o=>{t.hideLoading(),r(o)})):typeof e.inputOptions=="object"?r(e.inputOptions):ot(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},xl=(t,e)=>{const n=t.getInput();ve(n),kt(e.inputValue).then(r=>{n.value=e.input==="number"?parseFloat(r)||0:`${r}`,he(n),n.focus(),t.hideLoading()}).catch(r=>{ot(`Error in inputValue promise: ${r}`),n.value="",he(n),n.focus(),t.hideLoading()})},Il={select:(t,e,n)=>{const r=tt(t,g.select),o=(i,s,c)=>{const l=document.createElement("option");l.value=c,be(l,s),l.selected=vo(c,n.inputValue),i.appendChild(l)};e.forEach(i=>{const s=i[0],c=i[1];if(Array.isArray(c)){const l=document.createElement("optgroup");l.label=s,l.disabled=!1,r.appendChild(l),c.forEach(d=>o(l,d[1],d[0]))}else o(r,c,s)}),r.focus()},radio:(t,e,n)=>{const r=tt(t,g.radio);e.forEach(i=>{const s=i[0],c=i[1],l=document.createElement("input"),d=document.createElement("label");l.type="radio",l.name=g.radio,l.value=s,vo(s,n.inputValue)&&(l.checked=!0);const f=document.createElement("span");be(f,c),f.className=g.label,d.appendChild(l),d.appendChild(f),r.appendChild(d)});const o=r.querySelectorAll("input");o.length&&o[0].focus()}},Wn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,r)=>{let o=n;typeof o=="object"&&(o=Wn(o)),e.push([r,o])}):Object.keys(t).forEach(n=>{let r=t[n];typeof r=="object"&&(r=Wn(r)),e.push([n,r])}),e},vo=(t,e)=>e&&e.toString()===t.toString();function wo(){const t=Y.innerParams.get(this);if(!t)return;const e=Y.domCache.get(this);ve(e.loader),an()?t.icon&&he(Pt()):Pl(e),Ve([e.popup,e.actions],g.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Pl=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?he(e[0],"inline-block"):ia()&&ve(t.actions)};function Tl(t){const e=Y.innerParams.get(t||this),n=Y.domCache.get(t||this);return n?Hn(n.popup,e.input):null}const Ft={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},Ol=()=>Le(oe()),Eo=()=>Ue()&&Ue().click(),Ll=()=>et()&&et().click(),Bl=()=>it()&&it().click(),So=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Fl=(t,e,n,r)=>{So(e),n.toast||(e.keydownHandler=o=>$l(t,o,r),e.keydownTarget=n.keydownListenerCapture?window:oe(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},qn=(t,e,n)=>{const r=Mn();if(r.length)return e=e+n,e===r.length?e=0:e===-1&&(e=r.length-1),r[e].focus();oe().focus()},Co=["ArrowRight","ArrowDown"],Rl=["ArrowLeft","ArrowUp"],$l=(t,e,n)=>{const r=Y.innerParams.get(t);r&&(e.isComposing||e.keyCode===229||(r.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Nl(t,e,r):e.key==="Tab"?Dl(e,r):[...Co,...Rl].includes(e.key)?Ml(e.key):e.key==="Escape"&&Ul(e,r,n)))},Nl=(t,e,n)=>{if(nn(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Eo(),e.preventDefault()}},Dl=(t,e)=>{const n=t.target,r=Mn();let o=-1;for(let i=0;i<r.length;i++)if(n===r[i]){o=i;break}t.shiftKey?qn(e,o,-1):qn(e,o,1),t.stopPropagation(),t.preventDefault()},Ml=t=>{const e=Ue(),n=et(),r=it();if(![e,n,r].includes(document.activeElement))return;const o=Co.includes(t)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let s=0;s<Tt().children.length;s++){if(i=i[o],!i)return;if(Le(i)&&i instanceof HTMLButtonElement)break}i instanceof HTMLButtonElement&&i.focus()},Ul=(t,e,n)=>{nn(e.allowEscapeKey)&&(t.preventDefault(),n(ht.esc))};function Ao(t,e,n,r){an()?_o(t,r):(ca(n).then(()=>_o(t,r)),So(J)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Un()&&(ll(),hl(),mo()),Hl()}function Hl(){Ve([document.documentElement,document.body],[g.shown,g["height-auto"],g["no-backdrop"],g["toast-shown"]])}function cn(t){t=zl(t);const e=Ft.swalPromiseResolve.get(this),n=Vl(this);this.isAwaitingPromise()?t.isDismissed||(Rt(this),e(t)):n&&e(t)}function jl(){return!!Y.awaitingPromise.get(this)}const Vl=t=>{const e=oe();if(!e)return!1;const n=Y.innerParams.get(t);if(!n||Ge(e,n.hideClass.popup))return!1;Ve(e,n.showClass.popup),te(e,n.hideClass.popup);const r=ye();return Ve(r,n.showClass.backdrop),te(r,n.hideClass.backdrop),Wl(t,e,n),!0};function Kl(t){const e=Ft.swalPromiseReject.get(this);Rt(this),e&&e(t)}const Rt=t=>{t.isAwaitingPromise()&&(Y.awaitingPromise.delete(t),Y.innerParams.get(t)||t._destroy())},zl=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Wl=(t,e,n)=>{const r=ye(),o=Lt&&so(e);typeof n.willClose=="function"&&n.willClose(e),o?ql(t,e,r,n.returnFocus,n.didClose):Ao(t,r,n.returnFocus,n.didClose)},ql=(t,e,n,r,o)=>{J.swalCloseEventFinishedCallback=Ao.bind(null,t,n,r,o),e.addEventListener(Lt,function(i){i.target===e&&(J.swalCloseEventFinishedCallback(),delete J.swalCloseEventFinishedCallback)})},_o=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function ko(t,e,n){const r=Y.domCache.get(t);e.forEach(o=>{r[o].disabled=n})}function xo(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 Gl(){ko(this,["confirmButton","denyButton","cancelButton"],!1)}function Jl(){ko(this,["confirmButton","denyButton","cancelButton"],!0)}function Yl(){return xo(this.getInput(),!1)}function Xl(){return xo(this.getInput(),!0)}function Zl(t){const e=Y.domCache.get(this),n=Y.innerParams.get(this);be(e.validationMessage,t),e.validationMessage.className=g["validation-message"],n.customClass&&n.customClass.validationMessage&&te(e.validationMessage,n.customClass.validationMessage),he(e.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid",!0),r.setAttribute("aria-describedby",g["validation-message"]),no(r),te(r,g.inputerror))}function Ql(){const t=Y.domCache.get(this);t.validationMessage&&ve(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Ve(e,g.inputerror))}function ec(){return Y.domCache.get(this).progressSteps}function tc(t){const e=oe(),n=Y.innerParams.get(this);if(!e||Ge(e,n.hideClass.popup))return _e("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=nc(t),o=Object.assign({},n,r);po(this,o),Y.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const nc=t=>{const e={};return Object.keys(t).forEach(n=>{Yr(n)?e[n]=t[n]:_e(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
|
|
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 rc(){const t=Y.domCache.get(this),e=Y.innerParams.get(this);if(!e){Io(this);return}t.popup&&J.swalCloseEventFinishedCallback&&(J.swalCloseEventFinishedCallback(),delete J.swalCloseEventFinishedCallback),J.deferDisposalTimer&&(clearTimeout(J.deferDisposalTimer),delete J.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),oc(this)}const oc=t=>{Io(t),delete t.params,delete J.keydownHandler,delete J.keydownTarget,delete J.currentInstance},Io=t=>{t.isAwaitingPromise()?(Gn(Y,t),Y.awaitingPromise.set(t,!0)):(Gn(Ft,t),Gn(Y,t))},Gn=(t,e)=>{for(const n in t)t[n].delete(e)},Po=Object.freeze(Object.defineProperty({__proto__:null,_destroy:rc,close:cn,closeModal:cn,closePopup:cn,closeToast:cn,disableButtons:Jl,disableInput:Xl,disableLoading:wo,enableButtons:Gl,enableInput:Yl,getInput:Tl,getProgressSteps:ec,handleAwaitingPromise:Rt,hideLoading:wo,isAwaitingPromise:jl,rejectPromise:Kl,resetValidationMessage:Ql,showValidationMessage:Zl,update:tc},Symbol.toStringTag,{value:"Module"})),ic=t=>{const e=Y.innerParams.get(t);t.disableButtons(),e.input?To(t,"confirm"):Yn(t,!0)},sc=t=>{const e=Y.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?To(t,"deny"):Jn(t,!1)},ac=(t,e)=>{t.disableButtons(),e(ht.cancel)},To=(t,e)=>{const n=Y.innerParams.get(t);if(!n.input)return ot(`The "input" parameter is needed to be set when using returnInputValueOn${Fn(e)}`);const r=Sl(t,n);n.inputValidator?lc(t,r,e):t.getInput().checkValidity()?e==="deny"?Jn(t,r):Yn(t,r):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},lc=(t,e,n)=>{const r=Y.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>kt(r.inputValidator(e,r.validationMessage))).then(i=>{t.enableButtons(),t.enableInput(),i?t.showValidationMessage(i):n==="deny"?Jn(t,e):Yn(t,e)})},Jn=(t,e)=>{const n=Y.innerParams.get(t||void 0);n.showLoaderOnDeny&>(et()),n.preDeny?(Y.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>kt(n.preDeny(e,n.validationMessage))).then(o=>{o===!1?(t.hideLoading(),Rt(t)):t.closePopup({isDenied:!0,value:typeof o>"u"?e:o})}).catch(o=>Lo(t||void 0,o))):t.closePopup({isDenied:!0,value:e})},Oo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},Lo=(t,e)=>{t.rejectPromise(e)},Yn=(t,e)=>{const n=Y.innerParams.get(t||void 0);n.showLoaderOnConfirm&>(),n.preConfirm?(t.resetValidationMessage(),Y.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>kt(n.preConfirm(e,n.validationMessage))).then(o=>{Le(on())||o===!1?(t.hideLoading(),Rt(t)):Oo(t,typeof o>"u"?e:o)}).catch(o=>Lo(t||void 0,o))):Oo(t,e)},cc=(t,e,n)=>{Y.innerParams.get(t).toast?uc(t,e,n):(fc(e),pc(e),mc(t,e,n))},uc=(t,e,n)=>{e.popup.onclick=()=>{const r=Y.innerParams.get(t);r&&(dc(r)||r.timer||r.input)||n(ht.close)}},dc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let un=!1;const fc=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(un=!0)}}},pc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(un=!0)}}},mc=(t,e,n)=>{e.container.onclick=r=>{const o=Y.innerParams.get(t);if(un){un=!1;return}r.target===e.container&&nn(o.allowOutsideClick)&&n(ht.backdrop)}},hc=t=>typeof t=="object"&&t.jquery,Bo=t=>t instanceof Element||hc(t),gc=t=>{const e={};return typeof t[0]=="object"&&!Bo(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const o=t[r];typeof o=="string"||Bo(o)?e[n]=o:o!==void 0&&ot(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof o}`)}),e};function yc(...t){const e=this;return new e(...t)}function bc(t){class e extends this{_main(r,o){return super._main(r,Object.assign({},t,o))}}return e}const vc=()=>J.timeout&&J.timeout.getTimerLeft(),Fo=()=>{if(J.timeout)return sa(),J.timeout.stop()},Ro=()=>{if(J.timeout){const t=J.timeout.start();return jn(t),t}},wc=()=>{const t=J.timeout;return t&&(t.running?Fo():Ro())},Ec=t=>{if(J.timeout){const e=J.timeout.increase(t);return jn(e,!0),e}},Sc=()=>J.timeout&&J.timeout.isRunning();let $o=!1;const Xn={};function Cc(t="data-swal-template"){Xn[t]=this,$o||(document.body.addEventListener("click",Ac),$o=!0)}const Ac=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in Xn){const r=e.getAttribute(n);if(r){Xn[n].fire({template:r});return}}},_c=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:gc,bindClickHandler:Cc,clickCancel:Bl,clickConfirm:Eo,clickDeny:Ll,enableLoading:gt,fire:yc,getActions:Tt,getCancelButton:it,getCloseButton:Dn,getConfirmButton:Ue,getContainer:ye,getDenyButton:et,getFocusableElements:Mn,getFooter:to,getHtmlContainer:rn,getIcon:Pt,getImage:Qr,getInputLabel:ta,getLoader:pt,getPopup:oe,getTimerLeft:vc,getTimerProgressBar:sn,getTitle:Zr,getValidationMessage:on,increaseTimer:Ec,isDeprecatedParameter:Nn,isLoading:ra,isTimerRunning:Sc,isUpdatableParameter:Yr,isValidParameter:Jr,isVisible:Ol,mixin:bc,resumeTimer:Ro,showLoading:gt,stopTimer:Fo,toggleTimer:wc},Symbol.toStringTag,{value:"Module"}));let Zn;class yt{constructor(...e){if(typeof window>"u")return;Zn=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);Y.promise.set(this,r)}_main(e,n={}){Qs(Object.assign({},n,e)),J.currentInstance&&(J.currentInstance._destroy(),Un()&&mo()),J.currentInstance=this;const r=xc(e,n);il(r),Object.freeze(r),J.timeout&&(J.timeout.stop(),delete J.timeout),clearTimeout(J.restoreFocusTimeout);const o=Ic(this);return po(this,r),Y.innerParams.set(this,r),kc(this,o,r)}then(e){return Y.promise.get(this).then(e)}finally(e){return Y.promise.get(this).finally(e)}}const kc=(t,e,n)=>new Promise((r,o)=>{const i=s=>{t.closePopup({isDismissed:!0,dismiss:s})};Ft.swalPromiseResolve.set(t,r),Ft.swalPromiseReject.set(t,o),e.confirmButton.onclick=()=>ic(t),e.denyButton.onclick=()=>sc(t),e.cancelButton.onclick=()=>ac(t,i),e.closeButton.onclick=()=>i(ht.close),cc(t,e,i),Fl(t,J,n,i),El(t,n),gl(n),Pc(J,n,i),Tc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),xc=(t,e)=>{const n=Ja(t),r=Object.assign({},ft,e,n,t);return r.showClass=Object.assign({},ft.showClass,r.showClass),r.hideClass=Object.assign({},ft.hideClass,r.hideClass),r},Ic=t=>{const e={popup:oe(),container:ye(),actions:Tt(),confirmButton:Ue(),denyButton:et(),cancelButton:it(),loader:pt(),closeButton:Dn(),validationMessage:on(),progressSteps:eo()};return Y.domCache.set(t,e),e},Pc=(t,e,n)=>{const r=sn();ve(r),e.timer&&(t.timeout=new sl(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(he(r),$e(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&jn(e.timer)})))},Tc=(t,e)=>{if(!e.toast){if(!nn(e.allowEnterKey))return Lc();Oc(t,e)||qn(e,-1,1)}},Oc=(t,e)=>e.focusDeny&&Le(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&Le(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&Le(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Lc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(yt.prototype,Po),Object.assign(yt,_c),Object.keys(Po).forEach(t=>{yt[t]=function(...e){if(Zn)return Zn[t](...e)}}),yt.DismissReason=ht,yt.version="11.4.8";const bt=yt;bt.default=bt;/*! @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:No,setPrototypeOf:Do,isFrozen:Bc,getPrototypeOf:Fc,getOwnPropertyDescriptor:Rc}=Object;let{freeze:Se,seal:He,create:Mo}=Object,{apply:Qn,construct:er}=typeof Reflect<"u"&&Reflect;Se||(Se=function(e){return e}),He||(He=function(e){return e}),Qn||(Qn=function(e,n,r){return e.apply(n,r)}),er||(er=function(e,n){return new e(...n)});const dn=Fe(Array.prototype.forEach),Uo=Fe(Array.prototype.pop),$t=Fe(Array.prototype.push),fn=Fe(String.prototype.toLowerCase),tr=Fe(String.prototype.toString),$c=Fe(String.prototype.match),Nt=Fe(String.prototype.replace),Nc=Fe(String.prototype.indexOf),Dc=Fe(String.prototype.trim),je=Fe(Object.prototype.hasOwnProperty),Be=Fe(RegExp.prototype.test),Dt=Mc(TypeError);function Fe(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 Qn(t,e,r)}}function Mc(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return er(t,n)}}function X(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fn;Do&&Do(t,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){const i=n(o);i!==o&&(Bc(e)||(e[r]=i),o=i)}t[o]=!0}return t}function Uc(t){for(let e=0;e<t.length;e++)je(t,e)||(t[e]=null);return t}function lt(t){const e=Mo(null);for(const[n,r]of No(t))je(t,n)&&(Array.isArray(r)?e[n]=Uc(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=lt(r):e[n]=r);return e}function pn(t,e){for(;t!==null;){const r=Rc(t,e);if(r){if(r.get)return Fe(r.get);if(typeof r.value=="function")return Fe(r.value)}t=Fc(t)}function n(){return null}return n}const Ho=Se(["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"]),nr=Se(["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"]),rr=Se(["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"]),Hc=Se(["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"]),or=Se(["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"]),jc=Se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),jo=Se(["#text"]),Vo=Se(["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"]),ir=Se(["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"]),Ko=Se(["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"]),mn=Se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vc=He(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Kc=He(/<%[\w\W]*|[\w\W]*%>/gm),zc=He(/\${[\w\W]*}/gm),Wc=He(/^data-[\-\w.\u00B7-\uFFFF]/),qc=He(/^aria-[\-\w]+$/),zo=He(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gc=He(/^(?:\w+script|data):/i),Jc=He(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wo=He(/^html$/i);var qo=Object.freeze({__proto__:null,MUSTACHE_EXPR:Vc,ERB_EXPR:Kc,TMPLIT_EXPR:zc,DATA_ATTR:Wc,ARIA_ATTR:qc,IS_ALLOWED_URI:zo,IS_SCRIPT_OR_DATA:Gc,ATTR_WHITESPACE:Jc,DOCTYPE_NAME:Wo});const Yc=function(){return typeof window>"u"?null:window},Xc=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 Go(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yc();const e=H=>Go(H);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:l,NodeFilter:d,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:v,trustedTypes:w}=t,A=l.prototype,x=pn(A,"cloneNode"),C=pn(A,"nextSibling"),$=pn(A,"childNodes"),q=pn(A,"parentNode");if(typeof s=="function"){const H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let V,pe="";const{implementation:de,createNodeIterator:y,createDocumentFragment:L,getElementsByTagName:j}=n,{importNode:F}=r;let B={};e.isSupported=typeof No=="function"&&typeof q=="function"&&de&&de.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:O,ERB_EXPR:W,TMPLIT_EXPR:_,DATA_ATTR:G,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:ce,ATTR_WHITESPACE:fe}=qo;let{IS_ALLOWED_URI:Ce}=qo,K=null;const xe=X({},[...Ho,...nr,...rr,...or,...jo]);let u=null;const h=X({},[...Vo,...ir,...Ko,...mn]);let E=Object.seal(Mo(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}})),I=null,S=null,R=!0,k=!0,P=!1,M=!0,N=!1,z=!1,ee=!1,Ie=!1,Ae=!1,ge=!1,qe=!1,as=!0,ls=!1;const Gp="user-content-";let Dr=!0,Qt=!1,St={},Ct=null;const cs=X({},["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 us=null;const ds=X({},["audio","video","img","source","image","track"]);let Mr=null;const fs=X({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",Tn="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml";let At=Ye,Ur=!1,Hr=null;const Jp=X({},[Pn,Tn,Ye],tr);let en=null;const Yp=["application/xhtml+xml","text/html"],Xp="text/html";let me=null,_t=null;const Zp=n.createElement("form"),ps=function(m){return m instanceof RegExp||m instanceof Function},jr=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_t&&_t===m)){if((!m||typeof m!="object")&&(m={}),m=lt(m),en=Yp.indexOf(m.PARSER_MEDIA_TYPE)===-1?Xp:m.PARSER_MEDIA_TYPE,me=en==="application/xhtml+xml"?tr:fn,K=je(m,"ALLOWED_TAGS")?X({},m.ALLOWED_TAGS,me):xe,u=je(m,"ALLOWED_ATTR")?X({},m.ALLOWED_ATTR,me):h,Hr=je(m,"ALLOWED_NAMESPACES")?X({},m.ALLOWED_NAMESPACES,tr):Jp,Mr=je(m,"ADD_URI_SAFE_ATTR")?X(lt(fs),m.ADD_URI_SAFE_ATTR,me):fs,us=je(m,"ADD_DATA_URI_TAGS")?X(lt(ds),m.ADD_DATA_URI_TAGS,me):ds,Ct=je(m,"FORBID_CONTENTS")?X({},m.FORBID_CONTENTS,me):cs,I=je(m,"FORBID_TAGS")?X({},m.FORBID_TAGS,me):{},S=je(m,"FORBID_ATTR")?X({},m.FORBID_ATTR,me):{},St=je(m,"USE_PROFILES")?m.USE_PROFILES:!1,R=m.ALLOW_ARIA_ATTR!==!1,k=m.ALLOW_DATA_ATTR!==!1,P=m.ALLOW_UNKNOWN_PROTOCOLS||!1,M=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,N=m.SAFE_FOR_TEMPLATES||!1,z=m.WHOLE_DOCUMENT||!1,Ae=m.RETURN_DOM||!1,ge=m.RETURN_DOM_FRAGMENT||!1,qe=m.RETURN_TRUSTED_TYPE||!1,Ie=m.FORCE_BODY||!1,as=m.SANITIZE_DOM!==!1,ls=m.SANITIZE_NAMED_PROPS||!1,Dr=m.KEEP_CONTENT!==!1,Qt=m.IN_PLACE||!1,Ce=m.ALLOWED_URI_REGEXP||zo,At=m.NAMESPACE||Ye,E=m.CUSTOM_ELEMENT_HANDLING||{},m.CUSTOM_ELEMENT_HANDLING&&ps(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(E.tagNameCheck=m.CUSTOM_ELEMENT_HANDLING.tagNameCheck),m.CUSTOM_ELEMENT_HANDLING&&ps(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(E.attributeNameCheck=m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),N&&(k=!1),ge&&(Ae=!0),St&&(K=X({},jo),u=[],St.html===!0&&(X(K,Ho),X(u,Vo)),St.svg===!0&&(X(K,nr),X(u,ir),X(u,mn)),St.svgFilters===!0&&(X(K,rr),X(u,ir),X(u,mn)),St.mathMl===!0&&(X(K,or),X(u,Ko),X(u,mn))),m.ADD_TAGS&&(K===xe&&(K=lt(K)),X(K,m.ADD_TAGS,me)),m.ADD_ATTR&&(u===h&&(u=lt(u)),X(u,m.ADD_ATTR,me)),m.ADD_URI_SAFE_ATTR&&X(Mr,m.ADD_URI_SAFE_ATTR,me),m.FORBID_CONTENTS&&(Ct===cs&&(Ct=lt(Ct)),X(Ct,m.FORBID_CONTENTS,me)),Dr&&(K["#text"]=!0),z&&X(K,["html","head","body"]),K.table&&(X(K,["tbody"]),delete I.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw Dt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Dt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=m.TRUSTED_TYPES_POLICY,pe=V.createHTML("")}else V===void 0&&(V=Xc(w,o)),V!==null&&typeof pe=="string"&&(pe=V.createHTML(""));Se&&Se(m),_t=m}},ms=X({},["mi","mo","mn","ms","mtext"]),hs=X({},["foreignobject","desc","title","annotation-xml"]),Qp=X({},["title","style","font","a","script"]),gs=X({},[...nr,...rr,...Hc]),ys=X({},[...or,...jc]),em=function(m){let T=q(m);(!T||!T.tagName)&&(T={namespaceURI:At,tagName:"template"});const U=fn(m.tagName),se=fn(T.tagName);return Hr[m.namespaceURI]?m.namespaceURI===Tn?T.namespaceURI===Ye?U==="svg":T.namespaceURI===Pn?U==="svg"&&(se==="annotation-xml"||ms[se]):!!gs[U]:m.namespaceURI===Pn?T.namespaceURI===Ye?U==="math":T.namespaceURI===Tn?U==="math"&&hs[se]:!!ys[U]:m.namespaceURI===Ye?T.namespaceURI===Tn&&!hs[se]||T.namespaceURI===Pn&&!ms[se]?!1:!ys[U]&&(Qp[U]||!gs[U]):!!(en==="application/xhtml+xml"&&Hr[m.namespaceURI]):!1},ut=function(m){$t(e.removed,{element:m});try{m.parentNode.removeChild(m)}catch{m.remove()}},Vr=function(m,T){try{$t(e.removed,{attribute:T.getAttributeNode(m),from:T})}catch{$t(e.removed,{attribute:null,from:T})}if(T.removeAttribute(m),m==="is"&&!u[m])if(Ae||ge)try{ut(T)}catch{}else try{T.setAttribute(m,"")}catch{}},bs=function(m){let T=null,U=null;if(Ie)m="<remove></remove>"+m;else{const Ee=$c(m,/^[\r\n\t ]+/);U=Ee&&Ee[0]}en==="application/xhtml+xml"&&At===Ye&&(m='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+m+"</body></html>");const se=V?V.createHTML(m):m;if(At===Ye)try{T=new v().parseFromString(se,en)}catch{}if(!T||!T.documentElement){T=de.createDocument(At,"template",null);try{T.documentElement.innerHTML=Ur?pe:se}catch{}}const we=T.body||T.documentElement;return m&&U&&we.insertBefore(n.createTextNode(U),we.childNodes[0]||null),At===Ye?j.call(T,z?"html":"body")[0]:z?T.documentElement:we},vs=function(m){return y.call(m.ownerDocument||m,m,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null)},tm=function(m){return m instanceof p&&(typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||!(m.attributes instanceof f)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function")},ws=function(m){return typeof c=="function"&&m instanceof c},Xe=function(m,T,U){B[m]&&dn(B[m],se=>{se.call(e,T,U,_t)})},Es=function(m){let T=null;if(Xe("beforeSanitizeElements",m,null),tm(m))return ut(m),!0;const U=me(m.nodeName);if(Xe("uponSanitizeElement",m,{tagName:U,allowedTags:K}),m.hasChildNodes()&&!ws(m.firstElementChild)&&Be(/<[/\w]/g,m.innerHTML)&&Be(/<[/\w]/g,m.textContent))return ut(m),!0;if(!K[U]||I[U]){if(!I[U]&&Cs(U)&&(E.tagNameCheck instanceof RegExp&&Be(E.tagNameCheck,U)||E.tagNameCheck instanceof Function&&E.tagNameCheck(U)))return!1;if(Dr&&!Ct[U]){const se=q(m)||m.parentNode,we=$(m)||m.childNodes;if(we&&se){const Ee=we.length;for(let Pe=Ee-1;Pe>=0;--Pe)se.insertBefore(x(we[Pe],!0),C(m))}}return ut(m),!0}return m instanceof l&&!em(m)||(U==="noscript"||U==="noembed"||U==="noframes")&&Be(/<\/no(script|embed|frames)/i,m.innerHTML)?(ut(m),!0):(N&&m.nodeType===3&&(T=m.textContent,dn([O,W,_],se=>{T=Nt(T,se," ")}),m.textContent!==T&&($t(e.removed,{element:m.cloneNode()}),m.textContent=T)),Xe("afterSanitizeElements",m,null),!1)},Ss=function(m,T,U){if(as&&(T==="id"||T==="name")&&(U in n||U in Zp))return!1;if(!(k&&!S[T]&&Be(G,T))){if(!(R&&Be(ie,T))){if(!u[T]||S[T]){if(!(Cs(m)&&(E.tagNameCheck instanceof RegExp&&Be(E.tagNameCheck,m)||E.tagNameCheck instanceof Function&&E.tagNameCheck(m))&&(E.attributeNameCheck instanceof RegExp&&Be(E.attributeNameCheck,T)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(T))||T==="is"&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&Be(E.tagNameCheck,U)||E.tagNameCheck instanceof Function&&E.tagNameCheck(U))))return!1}else if(!Mr[T]){if(!Be(Ce,Nt(U,fe,""))){if(!((T==="src"||T==="xlink:href"||T==="href")&&m!=="script"&&Nc(U,"data:")===0&&us[m])){if(!(P&&!Be(ce,Nt(U,fe,"")))){if(U)return!1}}}}}}return!0},Cs=function(m){return m!=="annotation-xml"&&m.indexOf("-")>0},As=function(m){Xe("beforeSanitizeAttributes",m,null);const{attributes:T}=m;if(!T)return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:u};let se=T.length;for(;se--;){const we=T[se],{name:Ee,namespaceURI:Pe,value:dt}=we,tn=me(Ee);let Te=Ee==="value"?dt:Dc(dt);if(U.attrName=tn,U.attrValue=Te,U.keepAttr=!0,U.forceKeepAttr=void 0,Xe("uponSanitizeAttribute",m,U),Te=U.attrValue,U.forceKeepAttr||(Vr(Ee,m),!U.keepAttr))continue;if(!M&&Be(/\/>/i,Te)){Vr(Ee,m);continue}N&&dn([O,W,_],ks=>{Te=Nt(Te,ks," ")});const _s=me(m.nodeName);if(Ss(_s,tn,Te)){if(ls&&(tn==="id"||tn==="name")&&(Vr(Ee,m),Te=Gp+Te),V&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!Pe)switch(w.getAttributeType(_s,tn)){case"TrustedHTML":{Te=V.createHTML(Te);break}case"TrustedScriptURL":{Te=V.createScriptURL(Te);break}}try{Pe?m.setAttributeNS(Pe,Ee,Te):m.setAttribute(Ee,Te),Uo(e.removed)}catch{}}}Xe("afterSanitizeAttributes",m,null)},nm=function H(m){let T=null;const U=vs(m);for(Xe("beforeSanitizeShadowDOM",m,null);T=U.nextNode();)Xe("uponSanitizeShadowNode",T,null),!Es(T)&&(T.content instanceof i&&H(T.content),As(T));Xe("afterSanitizeShadowDOM",m,null)};return e.sanitize=function(H){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=null,U=null,se=null,we=null;if(Ur=!H,Ur&&(H="<!-->"),typeof H!="string"&&!ws(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw Dt("dirty is not a string, aborting")}else throw Dt("toString is not a function");if(!e.isSupported)return H;if(ee||jr(m),e.removed=[],typeof H=="string"&&(Qt=!1),Qt){if(H.nodeName){const dt=me(H.nodeName);if(!K[dt]||I[dt])throw Dt("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof c)T=bs("<!---->"),U=T.ownerDocument.importNode(H,!0),U.nodeType===1&&U.nodeName==="BODY"||U.nodeName==="HTML"?T=U:T.appendChild(U);else{if(!Ae&&!N&&!z&&H.indexOf("<")===-1)return V&&qe?V.createHTML(H):H;if(T=bs(H),!T)return Ae?null:qe?pe:""}T&&Ie&&ut(T.firstChild);const Ee=vs(Qt?H:T);for(;se=Ee.nextNode();)Es(se)||(se.content instanceof i&&nm(se.content),As(se));if(Qt)return H;if(Ae){if(ge)for(we=L.call(T.ownerDocument);T.firstChild;)we.appendChild(T.firstChild);else we=T;return(u.shadowroot||u.shadowrootmode)&&(we=F.call(r,we,!0)),we}let Pe=z?T.outerHTML:T.innerHTML;return z&&K["!doctype"]&&T.ownerDocument&&T.ownerDocument.doctype&&T.ownerDocument.doctype.name&&Be(Wo,T.ownerDocument.doctype.name)&&(Pe="<!DOCTYPE "+T.ownerDocument.doctype.name+`>
|
|
65
|
-
`+Pe),N&&dn([O,W,_],dt=>{Pe=Nt(Pe,dt," ")}),V&&qe?V.createHTML(Pe):Pe},e.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jr(H),ee=!0},e.clearConfig=function(){_t=null,ee=!1},e.isValidAttribute=function(H,m,T){_t||jr({});const U=me(H),se=me(m);return Ss(U,se,T)},e.addHook=function(H,m){typeof m=="function"&&(B[H]=B[H]||[],$t(B[H],m))},e.removeHook=function(H){if(B[H])return Uo(B[H])},e.removeHooks=function(H){B[H]&&(B[H]=[])},e.removeAllHooks=function(){B={}},e}var Jo=Go();class Yo{get IsVisible(){return bt.isVisible()}}class Zc extends Yo{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=>{bt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${Jo.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 Qc extends Yo{async CreateConfirmAsync(e){return new Promise(n=>{bt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:Jo.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 eu=()=>new Zc,Xo=()=>new Qc,tu=["data-cor"],nu={class:"sf-p-4"},ru=a.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=Xo(),r=a.ref("?"),o=e;async function i(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&o("logout")}function s(){const d=sessionStorage.getItem("name");let f="?";if(!d)return f;const p=d.split(" ").filter(w=>w.length>0).map(w=>w[0].toUpperCase()),v=Math.min(2,p.length);return f=p.slice(0,v).join(""),f.length>0?f:"?"}const c=a.computed(()=>{const d=r.value[0],f=d==="?"?0:(d.charCodeAt(0)-64)%19;return Math.max(f,0)}),l=a.ref(!1);return a.onMounted(()=>{r.value=s()}),(d,f)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{id:"sf-header-avatar","data-cor":c.value,onClick:f[0]||(f[0]=p=>l.value=!0)},a.toDisplayString(r.value),9,tu),a.createVNode(zr,{visible:l.value,"onUpdate:visible":f[1]||(f[1]=p=>l.value=p),position:"right"},{title:a.withCtx(()=>[a.createTextVNode("Minha conta")]),default:a.withCtx(()=>[a.createElementVNode("div",nu,[a.createVNode(Wr,{color:"error",onClick:i},{default:a.withCtx(()=>[a.createTextVNode("Sair")]),_:1})])]),_:1},8,["visible"])],64))}}),ou={},iu={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},su=[a.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function au(t,e){return a.openBlock(),a.createElementBlock("svg",iu,su)}const lu=Ln(ou,[["render",au]]);class cu{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const sr=new cu,uu=[a.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],du=a.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...r)=>a.unref(sr).Toggle&&a.unref(sr).Toggle(...r))},uu))}}),fu={id:"sf-layout"},pu=a.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),mu={class:"title"},hu={class:"sf-layout-nav-content"},gu=a.createElementVNode("div",{class:"sf-layout-nav-footer"},[a.createElementVNode("div",{class:"sf-layout-nav-footer-logo"})],-1),yu=a.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),bu={id:"sf-layout-content"},vu=a.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=On(),r=e;return a.onMounted(()=>{r("mounted")}),(o,i)=>(a.openBlock(),a.createElementBlock("div",fu,[a.createElementVNode("header",null,[a.createElementVNode("div",{class:a.normalizeClass(["sf-layout-menu-toggler",{invert:a.unref(n).IsVisible}]),onClick:i[0]||(i[0]=s=>a.unref(n).Toggle())},[pu,a.createVNode(lu)],2),a.createElementVNode("div",mu,[a.renderSlot(o.$slots,"title")]),a.renderSlot(o.$slots,"action"),a.createVNode(Bn,{text:"alternar tema"},{default:a.withCtx(()=>[a.createVNode(du)]),_:1}),a.createVNode(ru,{onLogout:i[1]||(i[1]=s=>r("logout"))})]),a.createElementVNode("nav",{class:a.normalizeClass({visible:a.unref(n).IsVisible})},[a.createElementVNode("div",hu,[a.renderSlot(o.$slots,"menu")]),gu],2),a.createElementVNode("main",{class:a.normalizeClass({"menu-visible":a.unref(n).IsVisible})},[yu,a.createElementVNode("section",bu,[a.renderSlot(o.$slots,"content")])],2)]))}}),wu=["href","data-active","onClick"],Eu={class:"sf-navmenulink-text"},Su=a.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},iconFilled:{type:Boolean},exact:{type:Boolean}},setup(t){const e=t,n=On();function r(o,i){o.preventDefault();const c=o.target.closest(".sf-layout-nav-content");i(),c&&c.clientWidth+10>document.body.clientWidth&&n.Close()}return(o,i)=>{const s=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(s,{to:e.href,custom:""},{default:a.withCtx(({href:c,navigate:l,isExactActive:d,isActive:f})=>[a.createElementVNode("a",{class:"sf-navmenulink",href:c,"data-active":e.exact?d:f,onClick:p=>r(p,l)},[e.icon?(a.openBlock(),a.createBlock(Qe,{key:0,icon:e.icon,filled:e.iconFilled,"button-props":{tabindex:-1}},null,8,["icon","filled"])):a.createCommentVNode("",!0),a.createElementVNode("span",Eu,a.toDisplayString(e.text),1)],8,wu)]),_:1},8,["to"])}}}),Cu=a.defineComponent({__name:"ScrollToTop",setup(t){const e=a.ref(!1),n=`--${+new Date}`;let r=null;function o(){r==null||r.scrollTo(0,0)}return a.onMounted(()=>{var i;r=((i=document.getElementById(n))==null?void 0:i.parentElement)??null,r&&r.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(i,s)=>(a.openBlock(),a.createElementBlock("button",{id:n,class:a.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:o},null,2))}}),Au=a.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ze("sf-content").AddClass(e.class,!!e.class).Build()}function r(){return new Ze("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function o(){return new Ze("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function i(){return new Ze("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(n()),style:a.normalizeStyle(e.style)},[a.createElementVNode("div",{class:a.normalizeClass(o())},[a.renderSlot(s.$slots,"header")],2),a.createElementVNode("div",{class:a.normalizeClass(r())},[a.renderSlot(s.$slots,"default"),a.createVNode(Cu)],2),a.createElementVNode("div",{class:a.normalizeClass(i())},[a.renderSlot(s.$slots,"footer")],2)],6))}}),_u={class:"sf-tab-navigation"},ku=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],xu=["data-active"],Iu=["href","onClick"],Pu=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],Tu=a.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=a.ref(null),r=new ResizeObserver(l=>{c()}),o=a.ref(!1),i=a.ref(!1);function s(l=!1){const d=n.value.clientWidth;n.value.scrollLeft+=l?-d:d}function c(){const l=n.value.scrollWidth-n.value.clientWidth;o.value=n.value.scrollLeft>10,i.value=n.value.scrollLeft<l-10}return a.onMounted(()=>{n.value.addEventListener("scroll",c),r.observe(n.value)}),a.onBeforeUnmount(()=>{var l;try{(l=n.value)==null||l.removeEventListener("scroll",c),r.unobserve(n.value),r.disconnect()}catch{}}),(l,d)=>{const f=a.resolveComponent("RouterLink");return a.openBlock(),a.createElementBlock("div",_u,[a.createElementVNode("div",{class:a.normalizeClass(["left-arrow",{active:o.value}]),onClick:d[0]||(d[0]=p=>s(!0))},ku,2),a.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.tabs,p=>(a.openBlock(),a.createBlock(f,{to:p.route,custom:!0},{default:a.withCtx(({navigate:v,isActive:w})=>[a.createElementVNode("li",{"data-active":w},[a.renderSlot(l.$slots,"item",{item:p,navigate:v,isActive:w},()=>[a.createElementVNode("a",{href:p.route,class:a.normalizeClass({active:w}),onClick:v},a.toDisplayString(p.text),11,Iu)])],8,xu)]),_:2},1032,["to"]))),256))],512),a.createElementVNode("div",{class:a.normalizeClass(["right-arrow",{active:i.value}]),onClick:d[1]||(d[1]=p=>s())},Pu,2)])}}}),Ou=["data-icon"],Lu=a.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{},icon:{}},setup(t){const e=t,n=a.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),r=a.computed(()=>new Ze("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(r.value),"data-icon":n.value},[a.renderSlot(o.$slots,"default")],10,Ou))}});function ar(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=cr(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(d){throw d},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}
|
|
67
|
-
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cr(t,e){if(t){if(typeof t=="string")return ur(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(t,e)}}function ur(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Du(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,d=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(f){d=!0,o=f}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return c}}function Mu(t){if(Array.isArray(t))return t}var Z={innerWidth:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}return 0},width:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}return 0},getWindowScrollTop:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth:function(e,n){if(e){var r=e.offsetWidth;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}return 0},getOuterHeight:function(e,n){if(e){var r=e.offsetHeight;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}return 0},getClientHeight:function(e,n){if(e){var r=e.clientHeight;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}return 0},getViewport:function(){var e=window,n=document,r=n.documentElement,o=n.getElementsByTagName("body")[0],i=e.innerWidth||r.clientWidth||o.clientWidth,s=e.innerHeight||r.clientHeight||o.clientHeight;return{width:i,height:s}},getOffset:function(e){if(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(e){if(e)for(var n,r=(n=this.getParentNode(e))===null||n===void 0?void 0:n.childNodes,o=0,i=0;i<r.length;i++){if(r[i]===e)return o;r[i].nodeType===1&&o++}return-1},addMultipleClasses:function(e,n){var r=this;e&&n&&[n].flat().filter(Boolean).forEach(function(o){return o.split(" ").forEach(function(i){return r.addClass(e,i)})})},removeMultipleClasses:function(e,n){var r=this;e&&n&&[n].flat().filter(Boolean).forEach(function(o){return o.split(" ").forEach(function(i){return r.removeClass(e,i)})})},addClass:function(e,n){e&&n&&!this.hasClass(e,n)&&(e.classList?e.classList.add(n):e.className+=" "+n)},removeClass:function(e,n){e&&n&&(e.classList?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(e,n){return e?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1},addStyles:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e&&Object.entries(n).forEach(function(r){var o=lr(r,2),i=o[0],s=o[1];return e.style[i]=s})},find:function(e,n){return this.isElement(e)?e.querySelectorAll(n):[]},findSingle:function(e,n){return this.isElement(e)?e.querySelector(n):null},createElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e){var r=document.createElement(e);this.setAttributes(r,n);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];return r.append.apply(r,i),r}},setAttribute:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;this.isElement(e)&&r!==null&&r!==void 0&&e.setAttribute(n,r)},setAttributes:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isElement(e)){var o=function i(s,c){var l,d,f=e!=null&&(l=e.$attrs)!==null&&l!==void 0&&l[s]?[e==null||(d=e.$attrs)===null||d===void 0?void 0:d[s]]:[];return[c].flat().reduce(function(p,v){if(v!=null){var w=Mt(v);if(w==="string"||w==="number")p.push(v);else if(w==="object"){var A=Array.isArray(v)?i(s,v):Object.entries(v).map(function(x){var C=lr(x,2),$=C[0],q=C[1];return s==="style"&&(q||q===0)?"".concat($.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(q):q?$:void 0});p=A.length?p.concat(A.filter(function(x){return!!x})):p}}return p},f)};Object.entries(r).forEach(function(i){var s=lr(i,2),c=s[0],l=s[1];if(l!=null){var d=c.match(/^on(.+)/);d?e.addEventListener(d[1].toLowerCase(),l):c==="p-bind"?n.setAttributes(e,l):(l=c==="class"?Bu(new Set(o("class",l))).join(" ").trim():c==="style"?o("style",l).join(";").trim():l,(e.$attrs=e.$attrs||{})&&(e.$attrs[c]=l),e.setAttribute(c,l))}})}},getAttribute:function(e,n){if(this.isElement(e)){var r=e.getAttribute(n);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}},isAttributeEquals:function(e,n,r){return this.isElement(e)?this.getAttribute(e,n)===r:!1},isAttributeNotEquals:function(e,n,r){return!this.isAttributeEquals(e,n,r)},getHeight:function(e){if(e){var n=e.offsetHeight,r=getComputedStyle(e);return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),n}return 0},getWidth:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),n}return 0},absolutePosition:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=o.height,s=o.width,c=n.offsetHeight,l=n.offsetWidth,d=n.getBoundingClientRect(),f=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),v=this.getViewport(),w,A,x="top";d.top+c+i>v.height?(w=d.top+f-i,x="bottom",w<0&&(w=f)):w=c+d.top+f,d.left+s>v.width?A=Math.max(0,d.left+p+l-s):A=d.left+p,e.style.top=w+"px",e.style.left=A+"px",e.style.transformOrigin=x,r&&(e.style.marginTop=x==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},relativePosition:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=n.offsetHeight,s=n.getBoundingClientRect(),c=this.getViewport(),l,d,f="top";s.top+i+o.height>c.height?(l=-1*o.height,f="bottom",s.top+l<0&&(l=-1*s.top)):l=i,o.width>c.width?d=s.left*-1:s.left+o.width>c.width?d=(s.left+o.width-c.width)*-1:d=0,e.style.top=l+"px",e.style.left=d+"px",e.style.transformOrigin=f,r&&(e.style.marginTop=f==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},nestedPosition:function(e,n){if(e){var r=e.parentElement,o=this.getOffset(r),i=this.getViewport(),s=e.offsetParent?e.offsetWidth:this.getHiddenElementOuterWidth(e),c=this.getOuterWidth(r.children[0]),l;parseInt(o.left,10)+c+s>i.width-this.calculateScrollbarWidth()?parseInt(o.left,10)<s?n%2===1?l=parseInt(o.left,10)?"-"+parseInt(o.left,10)+"px":"100%":n%2===0&&(l=i.width-s-this.calculateScrollbarWidth()+"px"):l="-100%":l="100%",e.style.top="0px",e.style.left=l}},getParentNode:function(e){var n=e==null?void 0:e.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n},getParents:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=this.getParentNode(e);return r===null?n:this.getParents(r,n.concat([r]))},getScrollableParents:function(e){var n=[];if(e){var r=this.getParents(e),o=/(auto|scroll)/,i=function(C){try{var $=window.getComputedStyle(C,null);return o.test($.getPropertyValue("overflow"))||o.test($.getPropertyValue("overflowX"))||o.test($.getPropertyValue("overflowY"))}catch{return!1}},s=ar(r),c;try{for(s.s();!(c=s.n()).done;){var l=c.value,d=l.nodeType===1&&l.dataset.scrollselectors;if(d){var f=d.split(","),p=ar(f),v;try{for(p.s();!(v=p.n()).done;){var w=v.value,A=this.findSingle(l,w);A&&i(A)&&n.push(A)}}catch(x){p.e(x)}finally{p.f()}}l.nodeType!==9&&i(l)&&n.push(l)}}catch(x){s.e(x)}finally{s.f()}}return n},getHiddenElementOuterHeight:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementOuterWidth:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementDimensions:function(e){if(e){var n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}return 0},fadeIn:function(e,n){if(e){e.style.opacity=0;var r=+new Date,o=0,i=function s(){o=+e.style.opacity+(new Date().getTime()-r)/n,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};i()}},fadeOut:function(e,n){if(e)var r=1,o=50,i=n,s=o/i,c=setInterval(function(){r-=s,r<=0&&(r=0,clearInterval(c)),e.style.opacity=r},o)},getUserAgent:function(){return navigator.userAgent},appendChild:function(e,n){if(this.isElement(n))n.appendChild(e);else if(n.el&&n.elElement)n.elElement.appendChild(e);else throw new Error("Cannot append "+n+" to "+e)},isElement:function(e){return(typeof HTMLElement>"u"?"undefined":Mt(HTMLElement))==="object"?e instanceof HTMLElement:e&&Mt(e)==="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},scrollInView:function(e,n){var r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),s=i?parseFloat(i):0,c=e.getBoundingClientRect(),l=n.getBoundingClientRect(),d=l.top+document.body.scrollTop-(c.top+document.body.scrollTop)-o-s,f=e.scrollTop,p=e.clientHeight,v=this.getOuterHeight(n);d<0?e.scrollTop=f+d:d+v>p&&(e.scrollTop=f+d-p+v)},clearSelection:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var e=document.createElement("div");this.addStyles(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var e=navigator.userAgent.toLowerCase(),n=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}},isVisible:function(e){return e&&e.offsetParent!=null},invokeElementMethod:function(e,n,r){e[n].apply(e,r)},isExist:function(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&this.getParentNode(e))},isClient:function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus:function(e,n){e&&document.activeElement!==e&&e.focus(n)},isFocusableElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.isElement(e)?e.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
61
|
+
https://sweetalert2.github.io/#ajax-request`),Wl(t),typeof t.title=="string"&&(t.title=t.title.split(`
|
|
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=()=>{Tt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(Tt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Tt.previousBodyPadding+al()}px`)},Yl=()=>{Tt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${Tt.previousBodyPadding}px`,Tt.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||!Oo(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Oo(Cn())&&Cn().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}},Ho=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)},Ho),cr()&&(sc(e,t.scrollbarPadding,o),Bl()),!Tn()&&!Y.previousActiveElement&&(Y.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Ze(e,b["no-transition"])},jo=t=>{const e=ae();if(t.target!==e)return;const n=ve();e.removeEventListener(Wt,jo),n.style.overflowY="auto"},ic=(t,e)=>{Wt&&Lo(e)?(t.style.overflowY="hidden",e.addEventListener(Wt,jo)):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")},Ho),re([document.documentElement,document.body],b.shown),n.heightAuto&&n.backdrop&&!n.toast&&re([document.documentElement,document.body],b["height-auto"])},Pt=t=>{let e=ae();e||new Ot,e=ae();const n=At();Tn()?_e(jt()):lc(e,t),ye(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},lc=(t,e)=>{const n=zt(),r=At();!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))&&(Pt(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)?(Pt(ze()),Ut(e.inputOptions).then(o=>{t.hideLoading(),r(o)})):typeof e.inputOptions=="object"?r(e.inputOptions):mt(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},hc=(t,e)=>{const n=t.getInput();_e(n),Ut(e.inputValue).then(r=>{n.value=e.input==="number"?parseFloat(r)||0:`${r}`,ye(n),n.focus(),t.hideLoading()}).catch(r=>{mt(`Error in inputValue promise: ${r}`),n.value="",ye(n),n.focus(),t.hideLoading()})},gc={select:(t,e,n)=>{const r=ct(t,b.select),o=(i,s,c)=>{const l=document.createElement("option");l.value=c,we(l,s),l.selected=zo(c,n.inputValue),i.appendChild(l)};e.forEach(i=>{const s=i[0],c=i[1];if(Array.isArray(c)){const l=document.createElement("optgroup");l.label=s,l.disabled=!1,r.appendChild(l),c.forEach(u=>o(l,u[1],u[0]))}else o(r,c,s)}),r.focus()},radio:(t,e,n)=>{const r=ct(t,b.radio);e.forEach(i=>{const s=i[0],c=i[1],l=document.createElement("input"),u=document.createElement("label");l.type="radio",l.name=b.radio,l.value=s,zo(s,n.inputValue)&&(l.checked=!0);const d=document.createElement("span");we(d,c),d.className=b.label,u.appendChild(l),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},zo=(t,e)=>e&&e.toString()===t.toString();function Ko(){const t=X.innerParams.get(this);if(!t)return;const e=X.domCache.get(this);_e(e.loader),Tn()?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 Gt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},vc=()=>Ne(ae()),Wo=()=>ze()&&ze().click(),wc=()=>lt()&<().click(),_c=()=>pt()&&pt().click(),qo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Sc=(t,e,n,r)=>{qo(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()},Go=["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):[...Go,...kc].includes(e.key)?Tc(e.key):e.key==="Escape"&&xc(e,r,n)))},Ec=(t,e,n)=>{if(kn(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Wo(),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=lt(),r=pt();if(![e,n,r].includes(document.activeElement))return;const o=Go.includes(t)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let s=0;s<zt().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)=>{kn(e.allowEscapeKey)&&(t.preventDefault(),n(xt.esc))};function Jo(t,e,n,r){Tn()?Yo(t,r):(Xa(n).then(()=>Yo(t,r)),qo(Y)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),cr()&&(Yl(),rc(),Mo()),Pc()}function Pc(){Ze([document.documentElement,document.body],[b.shown,b["height-auto"],b["no-backdrop"],b["toast-shown"]])}function Pn(t){t=$c(t);const e=Gt.swalPromiseResolve.get(this),n=Oc(this);this.isAwaitingPromise()?t.isDismissed||(Jt(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),Rc(t,e,n),!0};function Lc(t){const e=Gt.swalPromiseReject.get(this);Jt(this),e&&e(t)}const Jt=t=>{t.isAwaitingPromise()&&(X.awaitingPromise.delete(t),X.innerParams.get(t)||t._destroy())},$c=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Rc=(t,e,n)=>{const r=ve(),o=Wt&&Lo(e);typeof n.willClose=="function"&&n.willClose(e),o?Nc(t,e,r,n.returnFocus,n.didClose):Jo(t,r,n.returnFocus,n.didClose)},Nc=(t,e,n,r,o)=>{Y.swalCloseEventFinishedCallback=Jo.bind(null,t,n,r,o),e.addEventListener(Wt,function(i){i.target===e&&(Y.swalCloseEventFinishedCallback(),delete Y.swalCloseEventFinishedCallback)})},Yo=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Xo(t,e,n){const r=X.domCache.get(t);e.forEach(o=>{r[o].disabled=n})}function Zo(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(){Xo(this,["confirmButton","denyButton","cancelButton"],!1)}function Dc(){Xo(this,["confirmButton","denyButton","cancelButton"],!0)}function Fc(){return Zo(this.getInput(),!1)}function Mc(){return Zo(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"]),xo(r),re(r,b.inputerror))}function Vc(){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 Hc(){return X.domCache.get(this).progressSteps}function jc(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);Fo(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=>{So(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
|
+
|
|
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){Qo(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=>{Qo(t),delete t.params,delete Y.keydownHandler,delete Y.keydownTarget,delete Y.currentInstance},Qo=t=>{t.isAwaitingPromise()?(yr(X,t),X.awaitingPromise.set(t,!0)):(yr(Gt,t),yr(X,t))},yr=(t,e)=>{for(const n in t)t[n].delete(e)},ei=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Kc,close:Pn,closeModal:Pn,closePopup:Pn,closeToast:Pn,disableButtons:Dc,disableInput:Mc,disableLoading:Ko,enableButtons:Bc,enableInput:Fc,getInput:bc,getProgressSteps:Hc,handleAwaitingPromise:Jt,hideLoading:Ko,isAwaitingPromise:Ic,rejectPromise:Lc,resetValidationMessage:Vc,showValidationMessage:Uc,update:jc},Symbol.toStringTag,{value:"Module"})),qc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.input?ti(t,"confirm"):vr(t,!0)},Gc=t=>{const e=X.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?ti(t,"deny"):br(t,!1)},Jc=(t,e)=>{t.disableButtons(),e(xt.cancel)},ti=(t,e)=>{const n=X.innerParams.get(t);if(!n.input)return mt(`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(()=>Ut(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&&Pt(lt()),n.preDeny?(X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Ut(n.preDeny(e,n.validationMessage))).then(o=>{o===!1?(t.hideLoading(),Jt(t)):t.closePopup({isDenied:!0,value:typeof o>"u"?e:o})}).catch(o=>ri(t||void 0,o))):t.closePopup({isDenied:!0,value:e})},ni=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},ri=(t,e)=>{t.rejectPromise(e)},vr=(t,e)=>{const n=X.innerParams.get(t||void 0);n.showLoaderOnConfirm&&Pt(),n.preConfirm?(t.resetValidationMessage(),X.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Ut(n.preConfirm(e,n.validationMessage))).then(o=>{Ne(En())||o===!1?(t.hideLoading(),Jt(t)):ni(t,typeof o>"u"?e:o)}).catch(o=>ri(t||void 0,o))):ni(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(xt.close)}},Qc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let In=!1;const eu=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(In=!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))&&(In=!0)}}},nu=(t,e,n)=>{e.container.onclick=r=>{const o=X.innerParams.get(t);if(In){In=!1;return}r.target===e.container&&kn(o.allowOutsideClick)&&n(xt.backdrop)}},ru=t=>typeof t=="object"&&t.jquery,oi=t=>t instanceof Element||ru(t),ou=t=>{const e={};return typeof t[0]=="object"&&!oi(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const o=t[r];typeof o=="string"||oi(o)?e[n]=o:o!==void 0&&mt(`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(),ii=()=>{if(Y.timeout)return Ga(),Y.timeout.stop()},si=()=>{if(Y.timeout){const t=Y.timeout.start();return dr(t),t}},lu=()=>{const t=Y.timeout;return t&&(t.running?ii():si())},cu=t=>{if(Y.timeout){const e=Y.timeout.increase(t);return dr(e,!0),e}},uu=()=>Y.timeout&&Y.timeout.isRunning();let ai=!1;const wr={};function du(t="data-swal-template"){wr[t]=this,ai||(document.body.addEventListener("click",fu),ai=!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:Wo,clickDeny:wc,enableLoading:Pt,fire:iu,getActions:zt,getCancelButton:pt,getCloseButton:ar,getConfirmButton:ze,getContainer:ve,getDenyButton:lt,getFocusableElements:lr,getFooter:To,getHtmlContainer:Cn,getIcon:jt,getImage:Eo,getInputLabel:ja,getLoader:At,getPopup:ae,getTimerLeft:au,getTimerProgressBar:An,getTitle:Co,getValidationMessage:En,increaseTimer:cu,isDeprecatedParameter:sr,isLoading:Ka,isTimerRunning:uu,isUpdatableParameter:So,isValidParameter:_o,isVisible:vc,mixin:su,resumeTimer:si,showLoading:Pt,stopTimer:ii,toggleTimer:lu},Symbol.toStringTag,{value:"Module"}));let _r;class It{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={}){Va(Object.assign({},n,e)),Y.currentInstance&&(Y.currentInstance._destroy(),cr()&&Mo()),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 Fo(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})};Gt.swalPromiseResolve.set(t,r),Gt.swalPromiseReject.set(t,o),e.confirmButton.onclick=()=>qc(t),e.denyButton.onclick=()=>Gc(t),e.cancelButton.onclick=()=>Jc(t,i),e.closeButton.onclick=()=>i(xt.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({},Et,e,n,t);return r.showClass=Object.assign({},Et.showClass,r.showClass),r.hideClass=Object.assign({},Et.hideClass,r.hideClass),r},gu=t=>{const e={popup:ae(),container:ve(),actions:zt(),confirmButton:ze(),denyButton:lt(),cancelButton:pt(),loader:At(),closeButton:ar(),validationMessage:En(),progressSteps:Ao()};return X.domCache.set(t,e),e},yu=(t,e,n)=>{const r=An();_e(r),e.timer&&(t.timeout=new Gl(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(ye(r),Ve(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&dr(e.timer)})))},bu=(t,e)=>{if(!e.toast){if(!kn(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(It.prototype,ei),Object.assign(It,mu),Object.keys(ei).forEach(t=>{It[t]=function(...e){if(_r)return _r[t](...e)}}),It.DismissReason=xt,It.version="11.4.8";const Ot=It;Ot.default=Ot;/*! @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:li,setPrototypeOf:ci,isFrozen:_u,getPrototypeOf:Su,getOwnPropertyDescriptor:ku}=Object;let{freeze:Ce,seal:Ke,create:ui}=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 On=De(Array.prototype.forEach),di=De(Array.prototype.pop),Yt=De(Array.prototype.push),Ln=De(String.prototype.toLowerCase),Cr=De(String.prototype.toString),Cu=De(String.prototype.match),Xt=De(String.prototype.replace),Eu=De(String.prototype.indexOf),Au=De(String.prototype.trim),We=De(Object.prototype.hasOwnProperty),Be=De(RegExp.prototype.test),Zt=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]:Ln;ci&&ci(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 yt(t){const e=ui(null);for(const[n,r]of li(t))We(t,n)&&(Array.isArray(r)?e[n]=xu(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=yt(r):e[n]=r);return e}function $n(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 fi=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"]),mi=Ce(["#text"]),pi=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"]),hi=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),$u=Ke(/\${[\w\W]*}/gm),Ru=Ke(/^data-[\-\w.\u00B7-\uFFFF]/),Nu=Ke(/^aria-[\-\w]+$/),gi=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),yi=Ke(/^html$/i);var bi=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ou,ERB_EXPR:Lu,TMPLIT_EXPR:$u,DATA_ATTR:Ru,ARIA_ATTR:Nu,IS_ALLOWED_URI:gi,IS_SCRIPT_OR_DATA:Bu,ATTR_WHITESPACE:Du,DOCTYPE_NAME:yi});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 vi(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fu();const e=j=>vi(j);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:l,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:_}=t,w=l.prototype,B=$n(w,"cloneNode"),S=$n(w,"nextSibling"),H=$n(w,"childNodes"),A=$n(w,"parentNode");if(typeof s=="function"){const j=n.createElement("template");j.content&&j.content.ownerDocument&&(n=j.content.ownerDocument)}let E,G="";const{implementation:ee,createNodeIterator:v,createDocumentFragment:T,getElementsByTagName:M}=n,{importNode:I}=r;let O={};e.isSupported=typeof li=="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}=bi;let{IS_ALLOWED_URI:he}=bi,z=null;const me=Q({},[...fi,...Er,...Ar,...Tr,...mi]);let f=null;const h=Q({},[...pi,...xr,...hi,...Rn]);let k=Object.seal(ui(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,$=!0,R=!1,U=!0,F=!1,W=!1,ne=!1,Oe=!1,Ae=!1,be=!1,et=!1,Js=!0,Ys=!1;const fh="user-content-";let co=!0,bn=!1,Bt={},Dt=null;const Xs=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 Zs=null;const Qs=Q({},["audio","video","img","source","image","track"]);let uo=null;const ea=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),er="http://www.w3.org/1998/Math/MathML",tr="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let Ft=ot,fo=!1,mo=null;const mh=Q({},[er,tr,ot],Cr);let vn=null;const ph=["application/xhtml+xml","text/html"],hh="text/html";let ge=null,Mt=null;const gh=n.createElement("form"),ta=function(p){return p instanceof RegExp||p instanceof Function},po=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Mt&&Mt===p)){if((!p||typeof p!="object")&&(p={}),p=yt(p),vn=ph.indexOf(p.PARSER_MEDIA_TYPE)===-1?hh:p.PARSER_MEDIA_TYPE,ge=vn==="application/xhtml+xml"?Cr:Ln,z=We(p,"ALLOWED_TAGS")?Q({},p.ALLOWED_TAGS,ge):me,f=We(p,"ALLOWED_ATTR")?Q({},p.ALLOWED_ATTR,ge):h,mo=We(p,"ALLOWED_NAMESPACES")?Q({},p.ALLOWED_NAMESPACES,Cr):mh,uo=We(p,"ADD_URI_SAFE_ATTR")?Q(yt(ea),p.ADD_URI_SAFE_ATTR,ge):ea,Zs=We(p,"ADD_DATA_URI_TAGS")?Q(yt(Qs),p.ADD_DATA_URI_TAGS,ge):Qs,Dt=We(p,"FORBID_CONTENTS")?Q({},p.FORBID_CONTENTS,ge):Xs,P=We(p,"FORBID_TAGS")?Q({},p.FORBID_TAGS,ge):{},C=We(p,"FORBID_ATTR")?Q({},p.FORBID_ATTR,ge):{},Bt=We(p,"USE_PROFILES")?p.USE_PROFILES:!1,D=p.ALLOW_ARIA_ATTR!==!1,$=p.ALLOW_DATA_ATTR!==!1,R=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,Js=p.SANITIZE_DOM!==!1,Ys=p.SANITIZE_NAMED_PROPS||!1,co=p.KEEP_CONTENT!==!1,bn=p.IN_PLACE||!1,he=p.ALLOWED_URI_REGEXP||gi,Ft=p.NAMESPACE||ot,k=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&ta(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&ta(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&&($=!1),be&&(Ae=!0),Bt&&(z=Q({},mi),f=[],Bt.html===!0&&(Q(z,fi),Q(f,pi)),Bt.svg===!0&&(Q(z,Er),Q(f,xr),Q(f,Rn)),Bt.svgFilters===!0&&(Q(z,Ar),Q(f,xr),Q(f,Rn)),Bt.mathMl===!0&&(Q(z,Tr),Q(f,hi),Q(f,Rn))),p.ADD_TAGS&&(z===me&&(z=yt(z)),Q(z,p.ADD_TAGS,ge)),p.ADD_ATTR&&(f===h&&(f=yt(f)),Q(f,p.ADD_ATTR,ge)),p.ADD_URI_SAFE_ATTR&&Q(uo,p.ADD_URI_SAFE_ATTR,ge),p.FORBID_CONTENTS&&(Dt===Xs&&(Dt=yt(Dt)),Q(Dt,p.FORBID_CONTENTS,ge)),co&&(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 Zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=p.TRUSTED_TYPES_POLICY,G=E.createHTML("")}else E===void 0&&(E=Mu(_,o)),E!==null&&typeof G=="string"&&(G=E.createHTML(""));Ce&&Ce(p),Mt=p}},na=Q({},["mi","mo","mn","ms","mtext"]),ra=Q({},["foreignobject","desc","title","annotation-xml"]),yh=Q({},["title","style","font","a","script"]),oa=Q({},[...Er,...Ar,...Pu]),ia=Q({},[...Tr,...Iu]),bh=function(p){let N=A(p);(!N||!N.tagName)&&(N={namespaceURI:Ft,tagName:"template"});const V=Ln(p.tagName),ce=Ln(N.tagName);return mo[p.namespaceURI]?p.namespaceURI===tr?N.namespaceURI===ot?V==="svg":N.namespaceURI===er?V==="svg"&&(ce==="annotation-xml"||na[ce]):!!oa[V]:p.namespaceURI===er?N.namespaceURI===ot?V==="math":N.namespaceURI===tr?V==="math"&&ra[ce]:!!ia[V]:p.namespaceURI===ot?N.namespaceURI===tr&&!ra[ce]||N.namespaceURI===er&&!na[ce]?!1:!ia[V]&&(yh[V]||!oa[V]):!!(vn==="application/xhtml+xml"&&mo[p.namespaceURI]):!1},St=function(p){Yt(e.removed,{element:p});try{p.parentNode.removeChild(p)}catch{p.remove()}},ho=function(p,N){try{Yt(e.removed,{attribute:N.getAttributeNode(p),from:N})}catch{Yt(e.removed,{attribute:null,from:N})}if(N.removeAttribute(p),p==="is"&&!f[p])if(Ae||be)try{St(N)}catch{}else try{N.setAttribute(p,"")}catch{}},sa=function(p){let N=null,V=null;if(Oe)p="<remove></remove>"+p;else{const ke=Cu(p,/^[\r\n\t ]+/);V=ke&&ke[0]}vn==="application/xhtml+xml"&&Ft===ot&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const ce=E?E.createHTML(p):p;if(Ft===ot)try{N=new g().parseFromString(ce,vn)}catch{}if(!N||!N.documentElement){N=ee.createDocument(Ft,"template",null);try{N.documentElement.innerHTML=fo?G:ce}catch{}}const Se=N.body||N.documentElement;return p&&V&&Se.insertBefore(n.createTextNode(V),Se.childNodes[0]||null),Ft===ot?M.call(N,W?"html":"body")[0]:W?N.documentElement:Se},aa=function(p){return v.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},vh=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")},la=function(p){return typeof c=="function"&&p instanceof c},it=function(p,N,V){O[p]&&On(O[p],ce=>{ce.call(e,N,V,Mt)})},ca=function(p){let N=null;if(it("beforeSanitizeElements",p,null),vh(p))return St(p),!0;const V=ge(p.nodeName);if(it("uponSanitizeElement",p,{tagName:V,allowedTags:z}),p.hasChildNodes()&&!la(p.firstElementChild)&&Be(/<[/\w]/g,p.innerHTML)&&Be(/<[/\w]/g,p.textContent))return St(p),!0;if(!z[V]||P[V]){if(!P[V]&&da(V)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,V)||k.tagNameCheck instanceof Function&&k.tagNameCheck(V)))return!1;if(co&&!Dt[V]){const ce=A(p)||p.parentNode,Se=H(p)||p.childNodes;if(Se&&ce){const ke=Se.length;for(let Le=ke-1;Le>=0;--Le)ce.insertBefore(B(Se[Le],!0),S(p))}}return St(p),!0}return p instanceof l&&!bh(p)||(V==="noscript"||V==="noembed"||V==="noframes")&&Be(/<\/no(script|embed|frames)/i,p.innerHTML)?(St(p),!0):(F&&p.nodeType===3&&(N=p.textContent,On([L,K,x],ce=>{N=Xt(N,ce," ")}),p.textContent!==N&&(Yt(e.removed,{element:p.cloneNode()}),p.textContent=N)),it("afterSanitizeElements",p,null),!1)},ua=function(p,N,V){if(Js&&(N==="id"||N==="name")&&(V in n||V in gh))return!1;if(!($&&!C[N]&&Be(q,N))){if(!(D&&Be(se,N))){if(!f[N]||C[N]){if(!(da(p)&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,p)||k.tagNameCheck instanceof Function&&k.tagNameCheck(p))&&(k.attributeNameCheck instanceof RegExp&&Be(k.attributeNameCheck,N)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(N))||N==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&Be(k.tagNameCheck,V)||k.tagNameCheck instanceof Function&&k.tagNameCheck(V))))return!1}else if(!uo[N]){if(!Be(he,Xt(V,de,""))){if(!((N==="src"||N==="xlink:href"||N==="href")&&p!=="script"&&Eu(V,"data:")===0&&Zs[p])){if(!(R&&!Be(fe,Xt(V,de,"")))){if(V)return!1}}}}}}return!0},da=function(p){return p!=="annotation-xml"&&p.indexOf("-")>0},fa=function(p){it("beforeSanitizeAttributes",p,null);const{attributes:N}=p;if(!N)return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:f};let ce=N.length;for(;ce--;){const Se=N[ce],{name:ke,namespaceURI:Le,value:kt}=Se,wn=ge(ke);let $e=ke==="value"?kt:Au(kt);if(V.attrName=wn,V.attrValue=$e,V.keepAttr=!0,V.forceKeepAttr=void 0,it("uponSanitizeAttribute",p,V),$e=V.attrValue,V.forceKeepAttr||(ho(ke,p),!V.keepAttr))continue;if(!U&&Be(/\/>/i,$e)){ho(ke,p);continue}F&&On([L,K,x],pa=>{$e=Xt($e,pa," ")});const ma=ge(p.nodeName);if(ua(ma,wn,$e)){if(Ys&&(wn==="id"||wn==="name")&&(ho(ke,p),$e=fh+$e),E&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!Le)switch(_.getAttributeType(ma,wn)){case"TrustedHTML":{$e=E.createHTML($e);break}case"TrustedScriptURL":{$e=E.createScriptURL($e);break}}try{Le?p.setAttributeNS(Le,ke,$e):p.setAttribute(ke,$e),di(e.removed)}catch{}}}it("afterSanitizeAttributes",p,null)},wh=function j(p){let N=null;const V=aa(p);for(it("beforeSanitizeShadowDOM",p,null);N=V.nextNode();)it("uponSanitizeShadowNode",N,null),!ca(N)&&(N.content instanceof i&&j(N.content),fa(N));it("afterSanitizeShadowDOM",p,null)};return e.sanitize=function(j){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=null,V=null,ce=null,Se=null;if(fo=!j,fo&&(j="<!-->"),typeof j!="string"&&!la(j))if(typeof j.toString=="function"){if(j=j.toString(),typeof j!="string")throw Zt("dirty is not a string, aborting")}else throw Zt("toString is not a function");if(!e.isSupported)return j;if(ne||po(p),e.removed=[],typeof j=="string"&&(bn=!1),bn){if(j.nodeName){const kt=ge(j.nodeName);if(!z[kt]||P[kt])throw Zt("root node is forbidden and cannot be sanitized in-place")}}else if(j instanceof c)N=sa("<!---->"),V=N.ownerDocument.importNode(j,!0),V.nodeType===1&&V.nodeName==="BODY"||V.nodeName==="HTML"?N=V:N.appendChild(V);else{if(!Ae&&!F&&!W&&j.indexOf("<")===-1)return E&&et?E.createHTML(j):j;if(N=sa(j),!N)return Ae?null:et?G:""}N&&Oe&&St(N.firstChild);const ke=aa(bn?j:N);for(;ce=ke.nextNode();)ca(ce)||(ce.content instanceof i&&wh(ce.content),fa(ce));if(bn)return j;if(Ae){if(be)for(Se=T.call(N.ownerDocument);N.firstChild;)Se.appendChild(N.firstChild);else Se=N;return(f.shadowroot||f.shadowrootmode)&&(Se=I.call(r,Se,!0)),Se}let Le=W?N.outerHTML:N.innerHTML;return W&&z["!doctype"]&&N.ownerDocument&&N.ownerDocument.doctype&&N.ownerDocument.doctype.name&&Be(yi,N.ownerDocument.doctype.name)&&(Le="<!DOCTYPE "+N.ownerDocument.doctype.name+`>
|
|
65
|
+
`+Le),F&&On([L,K,x],kt=>{Le=Xt(Le,kt," ")}),E&&et?E.createHTML(Le):Le},e.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};po(j),ne=!0},e.clearConfig=function(){Mt=null,ne=!1},e.isValidAttribute=function(j,p,N){Mt||po({});const V=ge(j),ce=ge(p);return ua(V,ce,N)},e.addHook=function(j,p){typeof p=="function"&&(O[j]=O[j]||[],Yt(O[j],p))},e.removeHook=function(j){if(O[j])return di(O[j])},e.removeHooks=function(j){O[j]&&(O[j]=[])},e.removeAllHooks=function(){O={}},e}var wi=vi();let _i=class{get IsVisible(){return Ot.isVisible()}};class Uu extends _i{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=>{Ot.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${wi.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 Vu extends _i{async CreateConfirmAsync(e){return new Promise(n=>{Ot.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:wi.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 Hu=()=>new Uu,Si=()=>new Vu,ju=["data-cor"],zu={class:"sf-p-4"},Ku=a.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=Si(),r=a.ref("?"),o=e;async function i(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&o("logout")}function s(){const u=sessionStorage.getItem("name");let d="?";if(!u)return d;const m=u.split(" ").filter(_=>_.length>0).map(_=>_[0].toUpperCase()),g=Math.min(2,m.length);return d=m.slice(0,g).join(""),d.length>0?d:"?"}const c=a.computed(()=>{const u=r.value[0],d=u==="?"?0:(u.charCodeAt(0)-64)%19;return Math.max(d,0)}),l=a.ref(!1);return a.onMounted(()=>{r.value=s()}),(u,d)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{id:"sf-header-avatar","data-cor":c.value,onClick:d[0]||(d[0]=m=>l.value=!0)},a.toDisplayString(r.value),9,ju),a.createVNode(yo,{visible:l.value,"onUpdate:visible":d[1]||(d[1]=m=>l.value=m),position:"right"},{title:a.withCtx(()=>[a.createTextVNode("Minha conta")]),default:a.withCtx(()=>[a.createElementVNode("div",zu,[a.createVNode(bo,{color:"error",onClick:i},{default:a.withCtx(()=>[a.createTextVNode("Sair")]),_:1})])]),_:1},8,["visible"])],64))}}),Wu={},qu={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},Gu=[a.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function Ju(t,e){return a.openBlock(),a.createElementBlock("svg",qu,Gu)}const Yu=Sn(Wu,[["render",Ju]]);class Xu{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const Pr=new Xu,Zu=[a.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],Qu=a.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...r)=>a.unref(Pr).Toggle&&a.unref(Pr).Toggle(...r))},Zu))}}),ed={id:"sf-layout"},td=a.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),nd={class:"title"},rd={class:"sf-layout-nav-content"},od=a.createElementVNode("div",{class:"sf-layout-nav-footer"},[a.createElementVNode("div",{class:"sf-layout-nav-footer-logo"})],-1),id=a.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),sd={id:"sf-layout-content"},ad=a.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=_n(),r=e;return a.onMounted(()=>{r("mounted")}),(o,i)=>(a.openBlock(),a.createElementBlock("div",ed,[a.createElementVNode("header",null,[a.createElementVNode("div",{class:a.normalizeClass(["sf-layout-menu-toggler",{invert:a.unref(n).IsVisible}]),onClick:i[0]||(i[0]=s=>a.unref(n).Toggle())},[td,a.createVNode(Yu)],2),a.createElementVNode("div",nd,[a.renderSlot(o.$slots,"title")]),a.renderSlot(o.$slots,"action"),a.createVNode(nr,{text:"Tema"},{default:a.withCtx(()=>[a.createVNode(Qu)]),_:1}),a.createVNode(Ku,{onLogout:i[1]||(i[1]=s=>r("logout"))})]),a.createElementVNode("nav",{class:a.normalizeClass({visible:a.unref(n).IsVisible})},[a.createElementVNode("div",rd,[a.renderSlot(o.$slots,"menu")]),od],2),a.createElementVNode("main",{class:a.normalizeClass({"menu-visible":a.unref(n).IsVisible})},[id,a.createElementVNode("section",sd,[a.renderSlot(o.$slots,"content")])],2)]))}}),ld=["href","data-active","onClick"],cd={class:"sf-navmenulink-text"},ud=a.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},iconFilled:{type:Boolean},exact:{type:Boolean}},setup(t){const e=t,n=_n();function r(o,i){o.preventDefault();const c=o.target.closest(".sf-layout-nav-content");i(),c&&c.clientWidth+10>document.body.clientWidth&&n.Close()}return(o,i)=>{const s=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(s,{to:e.href,custom:""},{default:a.withCtx(({href:c,navigate:l,isExactActive:u,isActive:d})=>[a.createElementVNode("a",{class:"sf-navmenulink",href:c,"data-active":e.exact?u:d,onClick:m=>r(m,l)},[e.icon?(a.openBlock(),a.createBlock(at,{key:0,icon:e.icon,filled:e.iconFilled,"button-props":{tabindex:-1}},null,8,["icon","filled"])):a.createCommentVNode("",!0),a.createElementVNode("span",cd,a.toDisplayString(e.text),1)],8,ld)]),_:1},8,["to"])}}}),dd=a.defineComponent({__name:"ScrollToTop",setup(t){const e=a.ref(!1),n=`--${+new Date}`;let r=null;function o(){r==null||r.scrollTo(0,0)}return a.onMounted(()=>{var i;r=((i=document.getElementById(n))==null?void 0:i.parentElement)??null,r&&r.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(i,s)=>(a.openBlock(),a.createElementBlock("button",{id:n,class:a.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:o},null,2))}}),fd=a.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new st("sf-content").AddClass(e.class,!!e.class).Build()}function r(){return new st("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function o(){return new st("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function i(){return new st("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(n()),style:a.normalizeStyle(e.style)},[a.createElementVNode("div",{class:a.normalizeClass(o())},[a.renderSlot(s.$slots,"header")],2),a.createElementVNode("div",{class:a.normalizeClass(r())},[a.renderSlot(s.$slots,"default"),a.createVNode(dd)],2),a.createElementVNode("div",{class:a.normalizeClass(i())},[a.renderSlot(s.$slots,"footer")],2)],6))}}),md={class:"sf-tab-navigation"},pd=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],hd=["data-active"],gd=["href","onClick"],yd=[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],bd=a.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=a.ref(null),r=new ResizeObserver(l=>{c()}),o=a.ref(!1),i=a.ref(!1);function s(l=!1){const u=n.value.clientWidth;n.value.scrollLeft+=l?-u:u}function c(){const l=n.value.scrollWidth-n.value.clientWidth;o.value=n.value.scrollLeft>10,i.value=n.value.scrollLeft<l-10}return a.onMounted(()=>{n.value.addEventListener("scroll",c),r.observe(n.value)}),a.onBeforeUnmount(()=>{var l;try{(l=n.value)==null||l.removeEventListener("scroll",c),r.unobserve(n.value),r.disconnect()}catch{}}),(l,u)=>{const d=a.resolveComponent("RouterLink");return a.openBlock(),a.createElementBlock("div",md,[a.createElementVNode("div",{class:a.normalizeClass(["left-arrow",{active:o.value}]),onClick:u[0]||(u[0]=m=>s(!0))},pd,2),a.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.tabs,m=>(a.openBlock(),a.createBlock(d,{to:m.route,custom:!0},{default:a.withCtx(({navigate:g,isActive:_})=>[a.createElementVNode("li",{"data-active":_},[a.renderSlot(l.$slots,"item",{item:m,navigate:g,isActive:_},()=>[a.createElementVNode("a",{href:m.route,class:a.normalizeClass({active:_}),onClick:g},a.toDisplayString(m.text),11,gd)])],8,hd)]),_:2},1032,["to"]))),256))],512),a.createElementVNode("div",{class:a.normalizeClass(["right-arrow",{active:i.value}]),onClick:u[1]||(u[1]=m=>s())},yd,2)])}}}),vd=["data-icon"],wd=a.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{},icon:{}},setup(t){const e=t,n=a.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),r=a.computed(()=>new st("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(r.value),"data-icon":n.value},[a.renderSlot(o.$slots,"default")],10,vd))}});function _d(t,e){return t?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}function Sd(t,e){if(t&&e){const n=r=>{_d(t,r)||(t.classList?t.classList.add(r):t.className+=" "+r)};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function Ir(t,e){if(t&&e){const n=r=>{t.classList?t.classList.remove(r):t.className=t.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function kd(t,e){return t instanceof HTMLElement?t.offsetWidth:0}function Nn(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}function Bn(t,e={}){if(Nn(t)){const n=(r,o)=>{var i,s;const c=(i=t==null?void 0:t.$attrs)!=null&&i[r]?[(s=t==null?void 0:t.$attrs)==null?void 0:s[r]]:[];return[o].flat().reduce((l,u)=>{if(u!=null){const d=typeof u;if(d==="string"||d==="number")l.push(u);else if(d==="object"){const m=Array.isArray(u)?n(r,u):Object.entries(u).map(([g,_])=>r==="style"&&(_||_===0)?`${g.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${_}`:_?g:void 0);l=m.length?l.concat(m.filter(g=>!!g)):l}}return l},c)};Object.entries(e).forEach(([r,o])=>{if(o!=null){const i=r.match(/^on(.+)/);i?t.addEventListener(i[1].toLowerCase(),o):r==="p-bind"?Bn(t,o):(o=r==="class"?[...new Set(n("class",o))].join(" ").trim():r==="style"?n("style",o).join(";").trim():o,(t.$attrs=t.$attrs||{})&&(t.$attrs[r]=o),t.setAttribute(r,o))}})}}function Cd(t,e={},...n){{const r=document.createElement(t);return Bn(r,e),r.append(...n),r}}function qe(t,e){return Nn(t)?t.matches(e)?t:t.querySelector(e):null}function Qt(t,e){t&&document.activeElement!==t&&t.focus(e)}function en(t,e){if(Nn(t)){const n=t.getAttribute(e);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function ki(t){if(t){let e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),e}return 0}function Ed(t){if(t){let e=t.parentNode;return e&&e instanceof ShadowRoot&&e.host&&(e=e.host),e}return null}function Ad(t){if(t){let e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}function Td(t,e){return t?t.offsetHeight:0}function xd(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&Ed(t))}function Ci(t){if(t){let e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),e}return 0}function Pd(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Id(t,e="",n){Nn(t)&&n!==null&&n!==void 0&&t.setAttribute(e,n)}function Ei(){const t=new Map;return{on(e,n){let r=t.get(e);return r?r.push(n):r=[n],t.set(e,r),this},off(e,n){let r=t.get(e);return r&&r.splice(r.indexOf(n)>>>0,1),this},emit(e,n){let r=t.get(e);r&&r.slice().map(o=>{o(n)})},clear(){t.clear()}}}function bt(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function Or(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){var n=Array.isArray(t),r=Array.isArray(e),o,i,s;if(n&&r){if(i=t.length,i!=e.length)return!1;for(o=i;o--!==0;)if(!Or(t[o],e[o]))return!1;return!0}if(n!=r)return!1;var c=t instanceof Date,l=e instanceof Date;if(c!=l)return!1;if(c&&l)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var m=Object.keys(t);if(i=m.length,i!==Object.keys(e).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,m[o]))return!1;for(o=i;o--!==0;)if(s=m[o],!Or(t[s],e[s]))return!1;return!0}return t!==t&&e!==e}function Lr(t){return!!(t&&t.constructor&&t.call&&t.apply)}function le(t){return!bt(t)}function Lt(t,e,n){return Or(t,e)}function Ai(t,e){let n;if(le(t))try{n=t.findLast(e)}catch{n=[...t].reverse().find(e)}return n}function ut(t,e=!0){return t instanceof Object&&t.constructor===Object&&(e||Object.keys(t).length!==0)}function Fe(t,...e){return Lr(t)?t(...e):t}function Pe(t,e=!0){return typeof t=="string"&&(e||t!=="")}function Ge(t){return Pe(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function $r(t,e="",n={}){const r=Ge(e).split("."),o=r.shift();return o?ut(t)?$r(Fe(t[Object.keys(t).find(i=>Ge(i)===o)||""],n),r.join("."),n):void 0:Fe(t,n)}function Rr(t,e=!0){return Array.isArray(t)&&(e||t.length!==0)}function Ti(t){return le(t)&&!isNaN(t)}function Od(t=""){return le(t)&&t.length===1&&!!t.match(/\S| /)}function nt(t,e){if(e){const n=e.test(t);return e.lastIndex=0,n}return!1}function tn(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function Ld(t){return Pe(t,!1)?t[0].toUpperCase()+t.slice(1):t}function xi(t){return Pe(t)?t.replace(/(_)/g,"-").replace(/[A-Z]/g,(e,n)=>n===0?e:"-"+e.toLowerCase()).toLowerCase():t}function Pi(t){return Pe(t)?t.replace(/[A-Z]/g,(e,n)=>n===0?e:"."+e.toLowerCase()).toLowerCase():t}var Dn={};function $d(t="pui_id_"){return Dn.hasOwnProperty(t)||(Dn[t]=0),Dn[t]++,`${t}${Dn[t]}`}function Fn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pv_id_";return $d(t)}var Rd=Object.defineProperty,Nd=Object.defineProperties,Bd=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,Ii=Object.prototype.hasOwnProperty,Oi=Object.prototype.propertyIsEnumerable,Li=(t,e,n)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nn=(t,e)=>{for(var n in e||(e={}))Ii.call(e,n)&&Li(t,n,e[n]);if(Mn)for(var n of Mn(e))Oi.call(e,n)&&Li(t,n,e[n]);return t},Nr=(t,e)=>Nd(t,Bd(e)),rn=(t,e)=>{var n={};for(var r in t)Ii.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Mn)for(var r of Mn(t))e.indexOf(r)<0&&Oi.call(t,r)&&(n[r]=t[r]);return n},Dd=Ei(),rt=Dd;function $i(t,e){Rr(t)?t.push(...e||[]):ut(t)&&Object.assign(t,e)}function Fd(t){return ut(t)&&t.hasOwnProperty("value")&&t.hasOwnProperty("type")?t.value:t}function Ri(t,e=""){return["opacity","z-index","line-height","font-weight","flex","flex-grow","flex-shrink","order"].some(r=>e.endsWith(r))?t:`${t}`.trim().split(" ").map(i=>Ti(i)?`${i}px`:i).join(" ")}function Md(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function Br(t="",e=""){return Md(`${Pe(t,!1)&&Pe(e,!1)?`${t}-`:t}${e}`)}function Ni(t="",e=""){return`--${Br(t,e)}`}function Bi(t,e="",n="",r=[],o){if(Pe(t)){const i=/{([^}]*)}/g,s=t.trim();if(nt(s,i)){const c=s.replaceAll(i,d=>{const g=d.replace(/{|}/g,"").split(".").filter(_=>!r.some(w=>nt(_,w)));return`var(${Ni(n,xi(g.join("-")))}${le(o)?`, ${o}`:""})`}),l=/(\d+\s+[\+\-\*\/]\s+\d+)/g,u=/var\([^)]+\)/g;return nt(c.replace(u,"0"),l)?`calc(${c})`:c}return Ri(s,e)}else if(Ti(t))return Ri(t,e)}function Ud(t,e,n){Pe(e,!1)&&t.push(`${e}:${n};`)}function on(t,e){return t?`${t}{${e}}`:""}var Dr=(...t)=>Vd(ue.getTheme(),...t),Vd=(t={},e,n,r="variable")=>{if(e){const{variable:o,options:i}=ue.defaults||{},{prefix:s,transform:c}=(t==null?void 0:t.options)||i||{},u=nt(e,/{([^}]*)}/g)?e:`{${e}}`;return r==="value"||c==="strict"?ue.getTokenValue(e):Bi(u,void 0,s,[o.excludedKeyRegex],n)}return""};function Hd(t,e={}){const n=ue.defaults.variable,{prefix:r=n.prefix,selector:o=n.selector,excludedKeyRegex:i=n.excludedKeyRegex}=e,s=(u,d="")=>Object.entries(u).reduce((m,[g,_])=>{const w=nt(g,i)?Br(d):Br(d,xi(g)),B=Fd(_);if(ut(B)){const{variables:S,tokens:H}=s(B,w);$i(m.tokens,H),$i(m.variables,S)}else m.tokens.push((r?w.replace(`${r}-`,""):w).replaceAll("-",".")),Ud(m.variables,Ni(w),Bi(B,w,r,[i]));return m},{variables:[],tokens:[]}),{variables:c,tokens:l}=s(t,r);return{value:c,tokens:l,declarations:c.join(""),css:on(o,c.join(""))}}var Je={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:`${t}{:root{[CSS]}}`,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){const e=Object.keys(this.rules).filter(n=>n!=="custom").map(n=>this.rules[n]);return[t].flat().map(n=>{var r;return(r=e.map(o=>o.resolve(n)).find(o=>o.matched))!=null?r:this.rules.custom.resolve(n)})}},_toVariables(t,e){return Hd(t,{prefix:e==null?void 0:e.prefix})},getCommon({name:t="",theme:e={},params:n,set:r,defaults:o}){var i,s,c,l;const{preset:u,options:d}=e;let m,g,_,w;if(le(u)){const{primitive:B,semantic:S}=u,H=S||{},{colorScheme:A}=H,E=rn(H,["colorScheme"]),G=A||{},{dark:ee}=G,v=rn(G,["dark"]),T=le(B)?this._toVariables({primitive:B},d):{},M=le(E)?this._toVariables({semantic:E},d):{},I=le(v)?this._toVariables({light:v},d):{},O=le(ee)?this._toVariables({dark:ee},d):{},[L,K]=[(i=T.declarations)!=null?i:"",T.tokens],[x,q]=[(s=M.declarations)!=null?s:"",M.tokens||[]],[se,fe]=[(c=I.declarations)!=null?c:"",I.tokens||[]],[de,he]=[(l=O.declarations)!=null?l:"",O.tokens||[]];m=this.transformCSS(t,L,"light","variable",d,r,o),g=K;const z=this.transformCSS(t,`${x}${se}color-scheme:light`,"light","variable",d,r,o),me=this.transformCSS(t,`${de}color-scheme:dark`,"dark","variable",d,r,o);_=`${z}${me}`,w=[...new Set([...q,...fe,...he])]}return{primitive:{css:m,tokens:g},semantic:{css:_,tokens:w}}},getPreset({name:t="",preset:e={},options:n,params:r,set:o,defaults:i,selector:s}){var c,l,u;const d=t.replace("-directive",""),m=e,{colorScheme:g}=m,_=rn(m,["colorScheme"]),w=g||{},{dark:B}=w,S=rn(w,["dark"]),H=le(_)?this._toVariables({[d]:_},n):{},A=le(S)?this._toVariables({[d]:S},n):{},E=le(B)?this._toVariables({[d]:B},n):{},[G,ee]=[(c=H.declarations)!=null?c:"",H.tokens||[]],[v,T]=[(l=A.declarations)!=null?l:"",A.tokens||[]],[M,I]=[(u=E.declarations)!=null?u:"",E.tokens||[]],O=[...new Set([...ee,...T,...I])],L=this.transformCSS(d,`${G}${v}`,"light","variable",n,o,i,s),K=this.transformCSS(d,M,"dark","variable",n,o,i,s);return{css:`${L}${K}`,tokens:O}},getPresetC({name:t="",theme:e={},params:n,set:r,defaults:o}){var i;const{preset:s,options:c}=e,l=(i=s==null?void 0:s.components)==null?void 0:i[t];return this.getPreset({name:t,preset:l,options:c,params:n,set:r,defaults:o})},getPresetD({name:t="",theme:e={},params:n,set:r,defaults:o}){var i;const s=t.replace("-directive",""),{preset:c,options:l}=e,u=(i=c==null?void 0:c.directives)==null?void 0:i[s];return this.getPreset({name:s,preset:u,options:l,params:n,set:r,defaults:o})},getColorSchemeOption(t,e){var n;return this.regex.resolve((n=t.darkModeSelector)!=null?n:e.options.darkModeSelector)},getLayerOrder(t,e={},n,r){const{cssLayer:o}=e;return o?`@layer ${Fe(o.order||"primeui",n)}`:""},getCommonStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){const s=this.getCommon({name:t,theme:e,params:n,set:o,defaults:i}),c=Object.entries(r).reduce((l,[u,d])=>l.push(`${u}="${d}"`)&&l,[]).join(" ");return Object.entries(s||{}).reduce((l,[u,d])=>{if(d!=null&&d.css){const m=tn(d==null?void 0:d.css),g=`${u}-variables`;l.push(`<style type="text/css" data-primevue-style-id="${g}" ${c}>${m}</style>`)}return l},[]).join("")},getStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){var s;const c={name:t,theme:e,params:n,set:o,defaults:i},l=(s=t.includes("-directive")?this.getPresetD(c):this.getPresetC(c))==null?void 0:s.css,u=Object.entries(r).reduce((d,[m,g])=>d.push(`${m}="${g}"`)&&d,[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${t}-variables" ${u}>${tn(l)}</style>`:""},createTokens(t={},e,n="",r="",o={}){return Object.entries(t).forEach(([i,s])=>{const c=nt(i,e.variable.excludedKeyRegex)?n:n?`${n}.${Pi(i)}`:Pi(i),l=r?`${r}.${i}`:i;ut(s)?this.createTokens(s,e,c,l,o):(o[c]||(o[c]={paths:[],computed(u,d={}){if(u){const m=this.paths.find(g=>g.scheme===u)||this.paths.find(g=>g.scheme==="none");return m==null?void 0:m.computed(u,d.binding)}return this.paths.map(m=>m.computed(m.scheme,d[m.scheme]))}}),o[c].paths.push({path:l,value:s,scheme:l.includes("colorScheme.light")?"light":l.includes("colorScheme.dark")?"dark":"none",computed(u,d={}){const m=/{([^}]*)}/g;let g=s;if(d.name=this.path,d.binding||(d.binding={}),nt(s,m)){const w=s.trim().replaceAll(m,H=>{var A,E;const G=H.replace(/{|}/g,"");return(E=(A=o[G])==null?void 0:A.computed(u,d))==null?void 0:E.value}),B=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,S=/var\([^)]+\)/g;g=nt(w.replace(S,"0"),B)?`calc(${w})`:w}return bt(d.binding)&&delete d.binding,{colorScheme:u,path:this.path,paths:d,value:g.includes("undefined")?void 0:g}}}))}),o},getTokenValue(t,e,n){var r;const i=(l=>l.split(".").filter(d=>!nt(d.toLowerCase(),n.variable.excludedKeyRegex)).join("."))(e),s=e.includes("colorScheme.light")?"light":e.includes("colorScheme.dark")?"dark":void 0,c=[(r=t[i])==null?void 0:r.computed(s)].flat().filter(l=>l);return c.length===1?c[0].value:c.reduce((l={},u)=>{const d=u,{colorScheme:m}=d,g=rn(d,["colorScheme"]);return l[m]=g,l},void 0)},transformCSS(t,e,n,r,o={},i,s,c){if(le(e)){const{cssLayer:l}=o;if(r!=="style"){const u=this.getColorSchemeOption(o,s),d=c?on(c,e):e;e=n==="dark"?u.reduce((m,{selector:g})=>(le(g)&&(m+=g.includes("[CSS]")?g.replace("[CSS]",d):on(g,d)),m),""):on(c??":root",e)}if(l){const u={name:"primeui",order:"primeui"};ut(l)&&(u.name=Fe(l.name,{name:t,type:r})),le(u.name)&&(e=on(`@layer ${u.name}`,e),i==null||i.layerNames(u.name))}return e}return""}},ue={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){const{theme:e}=t;e&&(this._theme=Nr(nn({},e),{options:nn(nn({},this.defaults.options),e.options)}),this._tokens=Je.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),rt.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Nr(nn({},this.theme),{preset:t}),this._tokens=Je.createTokens(t,this.defaults),this.clearLoadedStyleNames(),rt.emit("preset:change",t),rt.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Nr(nn({},this.theme),{options:t}),this.clearLoadedStyleNames(),rt.emit("options:change",t),rt.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return Je.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",e){return Je.getCommon({name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",e){const n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Je.getPresetC(n)},getDirective(t="",e){const n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Je.getPresetD(n)},getCustomPreset(t="",e,n,r){const o={name:t,preset:e,options:this.options,selector:n,params:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Je.getPreset(o)},getLayerOrderCSS(t=""){return Je.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",e,n="style",r){return Je.transformCSS(t,e,r,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",e,n={}){return Je.getCommonStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,e,n={}){return Je.getStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:e}){this._loadingStyles.size&&(this._loadingStyles.delete(e),rt.emit(`theme:${e}:load`,t),!this._loadingStyles.size&&rt.emit("theme:load"))}},dt={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}};function sn(t){"@babel/helpers - typeof";return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(t)}function Di(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Fi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Di(Object(n),!0).forEach(function(r){jd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jd(t,e,n){return(e=zd(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zd(t){var e=Kd(t,"string");return sn(e)=="symbol"?e:e+""}function Kd(t,e){if(sn(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(sn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wd(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a.getCurrentInstance()?a.onMounted(t):e?t():a.nextTick(t)}var qd=0;function Gd(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.ref(!1),r=a.ref(t),o=a.ref(null),i=Pd()?window.document:void 0,s=e.document,c=s===void 0?i:s,l=e.immediate,u=l===void 0?!0:l,d=e.manual,m=d===void 0?!1:d,g=e.name,_=g===void 0?"style_".concat(++qd):g,w=e.id,B=w===void 0?void 0:w,S=e.media,H=S===void 0?void 0:S,A=e.nonce,E=A===void 0?void 0:A,G=e.first,ee=G===void 0?!1:G,v=e.onMounted,T=v===void 0?void 0:v,M=e.onUpdated,I=M===void 0?void 0:M,O=e.onLoad,L=O===void 0?void 0:O,K=e.props,x=K===void 0?{}:K,q=function(){},se=function(he){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(c){var me=Fi(Fi({},x),z),f=me.name||_,h=me.id||B,k=me.nonce||E;o.value=c.querySelector('style[data-primevue-style-id="'.concat(f,'"]'))||c.getElementById(h)||c.createElement("style"),o.value.isConnected||(r.value=he||t,Bn(o.value,{type:"text/css",id:h,media:H,nonce:k}),ee?c.head.prepend(o.value):c.head.appendChild(o.value),Id(o.value,"data-primevue-style-id",f),Bn(o.value,me),o.value.onload=function(P){return L==null?void 0:L(P,{name:f})},T==null||T(f)),!n.value&&(q=a.watch(r,function(P){o.value.textContent=P,I==null||I(f)},{immediate:!0}),n.value=!0)}},fe=function(){!c||!n.value||(q(),xd(o.value)&&c.head.removeChild(o.value),n.value=!1)};return u&&!m&&Wd(se),{id:B,name:_,el:o,css:r,unload:fe,load:se,isLoaded:a.readonly(n)}}function an(t){"@babel/helpers - typeof";return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}function Mi(t,e){return Zd(t)||Xd(t,e)||Yd(t,e)||Jd()}function Jd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yd(t,e){if(t){if(typeof t=="string")return Ui(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ui(t,e):void 0}}function Ui(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Xd(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(d){u=!0,o=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return c}}function Zd(t){if(Array.isArray(t))return t}function Vi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vi(Object(n),!0).forEach(function(r){Qd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Qd(t,e,n){return(e=ef(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ef(t){var e=tf(t,"string");return an(e)=="symbol"?e:e+""}function tf(t,e){if(an(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(an(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var nf=function(e){var n=e.dt;return`
|
|
67
|
+
* {
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Non vue overlay animations */
|
|
72
|
+
.p-connected-overlay {
|
|
73
|
+
opacity: 0;
|
|
74
|
+
transform: scaleY(0.8);
|
|
75
|
+
transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
|
|
76
|
+
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.p-connected-overlay-visible {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
transform: scaleY(1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.p-connected-overlay-hidden {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: scaleY(1);
|
|
87
|
+
transition: opacity 0.1s linear;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Vue based overlay animations */
|
|
91
|
+
.p-connected-overlay-enter-from {
|
|
92
|
+
opacity: 0;
|
|
93
|
+
transform: scaleY(0.8);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.p-connected-overlay-leave-to {
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.p-connected-overlay-enter-active {
|
|
101
|
+
transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
|
|
102
|
+
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-connected-overlay-leave-active {
|
|
106
|
+
transition: opacity 0.1s linear;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Toggleable Content */
|
|
110
|
+
.p-toggleable-content-enter-from,
|
|
111
|
+
.p-toggleable-content-leave-to {
|
|
112
|
+
max-height: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.p-toggleable-content-enter-to,
|
|
116
|
+
.p-toggleable-content-leave-from {
|
|
117
|
+
max-height: 1000px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.p-toggleable-content-leave-active {
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.p-toggleable-content-enter-active {
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
transition: max-height 1s ease-in-out;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-disabled,
|
|
131
|
+
.p-disabled * {
|
|
132
|
+
cursor: default;
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
user-select: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.p-disabled,
|
|
138
|
+
.p-component:disabled {
|
|
139
|
+
opacity: `.concat(n("disabled.opacity"),`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.pi {
|
|
143
|
+
font-size: `).concat(n("icon.size"),`;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.p-icon {
|
|
147
|
+
width: `).concat(n("icon.size"),`;
|
|
148
|
+
height: `).concat(n("icon.size"),`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.p-overlay-mask {
|
|
152
|
+
background: `).concat(n("mask.background"),`;
|
|
153
|
+
color: `).concat(n("mask.color"),`;
|
|
154
|
+
position: fixed;
|
|
155
|
+
top: 0;
|
|
156
|
+
left: 0;
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.p-overlay-mask-enter {
|
|
162
|
+
animation: p-overlay-mask-enter-animation `).concat(n("mask.transition.duration"),` forwards;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.p-overlay-mask-leave {
|
|
166
|
+
animation: p-overlay-mask-leave-animation `).concat(n("mask.transition.duration"),` forwards;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes p-overlay-mask-enter-animation {
|
|
170
|
+
from {
|
|
171
|
+
background: transparent;
|
|
172
|
+
}
|
|
173
|
+
to {
|
|
174
|
+
background: `).concat(n("mask.background"),`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
@keyframes p-overlay-mask-leave-animation {
|
|
178
|
+
from {
|
|
179
|
+
background: `).concat(n("mask.background"),`;
|
|
180
|
+
}
|
|
181
|
+
to {
|
|
182
|
+
background: transparent;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
`)},rf=function(e){var n=e.dt;return`
|
|
88
186
|
.p-hidden-accessible {
|
|
89
187
|
border: 0;
|
|
90
188
|
clip: rect(0 0 0 0);
|
|
@@ -103,12 +201,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
103
201
|
|
|
104
202
|
.p-overflow-hidden {
|
|
105
203
|
overflow: hidden;
|
|
106
|
-
padding-right:
|
|
204
|
+
padding-right: `.concat(n("scrollbar.width"),`;
|
|
107
205
|
}
|
|
108
|
-
|
|
109
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ci(t,e){if(t){if(typeof t=="string")return ui(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ui(t,e)}}function ui(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function md(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,d=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(f){d=!0,o=f}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return c}}function di(t){if(Array.isArray(t))return t}function fi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ae(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fi(Object(n),!0).forEach(function(r){gn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gn(t,e,n){return e=hd(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hd(t){var e=gd(t,"string");return Kt(e)=="symbol"?e:String(e)}function gd(t,e){if(Kt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yn={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(e){if(!e){var n,r;hr.loadStyle({nonce:(n=this.$config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce}),this.$options.style&&this.$style.loadStyle({nonce:(r=this.$config)===null||r===void 0||(r=r.csp)===null||r===void 0?void 0:r.nonce})}}}},beforeCreate:function(){var e,n,r,o,i,s,c,l,d,f,p,v=(e=this.pt)===null||e===void 0?void 0:e._usept,w=v?(n=this.pt)===null||n===void 0||(n=n.originalValue)===null||n===void 0?void 0:n[this.$.type.name]:void 0,A=v?(r=this.pt)===null||r===void 0||(r=r.value)===null||r===void 0?void 0:r[this.$.type.name]:this.pt;(o=A||w)===null||o===void 0||(o=o.hooks)===null||o===void 0||(i=o.onBeforeCreate)===null||i===void 0||i.call(o);var x=(s=this.$config)===null||s===void 0||(s=s.pt)===null||s===void 0?void 0:s._usept,C=x?(c=this.$primevue)===null||c===void 0||(c=c.config)===null||c===void 0||(c=c.pt)===null||c===void 0?void 0:c.originalValue:void 0,$=x?(l=this.$primevue)===null||l===void 0||(l=l.config)===null||l===void 0||(l=l.pt)===null||l===void 0?void 0:l.value:(d=this.$primevue)===null||d===void 0||(d=d.config)===null||d===void 0?void 0:d.pt;(f=$||C)===null||f===void 0||(f=f[this.$.type.name])===null||f===void 0||(f=f.hooks)===null||f===void 0||(p=f.onBeforeCreate)===null||p===void 0||p.call(f)},created:function(){this._hook("onCreated")},beforeMount:function(){var e;ct.loadStyle({nonce:(e=this.$config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce}),this._loadGlobalStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._hook("onUnmounted")},methods:{_hook:function(e){if(!this.$options.hostName){var n=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(e)),r=this._useDefaultPT(this._getOptionValue,"hooks.".concat(e));n==null||n(),r==null||r()}},_mergeProps: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 D.isFunction(e)?e.apply(void 0,r):a.mergeProps.apply(void 0,r)},_loadGlobalStyles:function(){var e,n=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);D.isNotEmpty(n)&&hr.loadGlobalStyle(n,{nonce:(e=this.$config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce})},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var n;return this[e]||((n=this._getHostInstance(this))===null||n===void 0?void 0:n[e])},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=D.toFlatCase(n).split("."),i=o.shift();return i?D.isObject(e)?this._getOptionValue(D.getItemValue(e[Object.keys(e).find(function(s){return D.toFlatCase(s)===i})||""],r),o.join("."),r):void 0:D.getItemValue(e,r)},_getPTValue:function(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=/./g.test(r)&&!!o[r.split(".")[0]],c=this._getPropValue("ptOptions")||((e=this.$config)===null||e===void 0?void 0:e.ptOptions)||{},l=c.mergeSections,d=l===void 0?!0:l,f=c.mergeProps,p=f===void 0?!1:f,v=i?s?this._useGlobalPT(this._getPTClassValue,r,o):this._useDefaultPT(this._getPTClassValue,r,o):void 0,w=s?void 0:this._getPTSelf(n,this._getPTClassValue,r,ae(ae({},o),{},{global:v||{}})),A=this._getPTDatasets(r);return d||!d&&w?p?this._mergeProps(p,v,w,A):ae(ae(ae({},v),w),A):ae(ae({},w),A)},_getPTSelf:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a.mergeProps(this._usePT.apply(this,[this._getPT(e,this.$name)].concat(r)),this._usePT.apply(this,[this.$_attrsPT].concat(r)))},_getPTDatasets:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o="data-pc-",i=r==="root"&&D.isNotEmpty((e=this.pt)===null||e===void 0?void 0:e["data-pc-section"]);return r!=="transition"&&ae(ae({},r==="root"&&ae(gn({},"".concat(o,"name"),D.toFlatCase(i?(n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]:this.$.type.name)),i&&gn({},"".concat(o,"extend"),D.toFlatCase(this.$.type.name)))),{},gn({},"".concat(o,"section"),D.toFlatCase(r)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return D.isString(e)||D.isArray(e)?{class:e}:e},_getPT:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,i=function(c){var l,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=o?o(c):c,p=D.toFlatCase(r),v=D.toFlatCase(n.$name);return(l=d?p!==v?f==null?void 0:f[p]:void 0:f==null?void 0:f[p])!==null&&l!==void 0?l:f};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,n,r,o){var i=function(x){return n(x,r,o)};if(e!=null&&e.hasOwnProperty("_usept")){var s,c=e._usept||((s=this.$config)===null||s===void 0?void 0:s.ptOptions)||{},l=c.mergeSections,d=l===void 0?!0:l,f=c.mergeProps,p=f===void 0?!1:f,v=i(e.originalValue),w=i(e.value);return v===void 0&&w===void 0?void 0:D.isString(w)?w:D.isString(v)?v:d||!d&&w?p?this._mergeProps(p,v,w):ae(ae({},v),w):w}return i(e)},_useGlobalPT:function(e,n,r){return this._usePT(this.globalPT,e,n,r)},_useDefaultPT:function(e,n,r){return this._usePT(this.defaultPT,e,n,r)},ptm:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,e,ae(ae({},this.$params),n))},ptmi:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.mergeProps(this.$_attrsNoPT,this.ptm(e,n))},ptmo:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(e,n,ae({instance:this},r),!1)},cx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,ae(ae({},this.$params),n))},sx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n){var o=this._getOptionValue(this.$style.inlineStyles,e,ae(ae({},this.$params),r)),i=this._getOptionValue(hr.inlineStyles,e,ae(ae({},this.$params),r));return[i,o]}}},computed:{globalPT:function(){var e,n=this;return this._getPT((e=this.$config)===null||e===void 0?void 0:e.pt,void 0,function(r){return D.getItemValue(r,{instance:n})})},defaultPT:function(){var e,n=this;return this._getPT((e=this.$config)===null||e===void 0?void 0:e.pt,void 0,function(r){return n._getOptionValue(r,n.$name,ae({},n.$params))||D.getItemValue(r,ae({},n.$params))})},isUnstyled:function(){var e;return this.unstyled!==void 0?this.unstyled:(e=this.$config)===null||e===void 0?void 0:e.unstyled},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:e==null?void 0:e.$props,state:e==null?void 0:e.$data,attrs:e==null?void 0:e.$attrs},parentInstance:e}},$style:function(){return ae(ae({classes:void 0,inlineStyles:void 0,loadStyle:function(){},loadCustomStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$config:function(){var e;return(e=this.$primevue)===null||e===void 0?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=hn(e,1),r=n[0];return r==null?void 0:r.startsWith("pt:")}).reduce(function(e,n){var r=hn(n,2),o=r[0],i=r[1],s=o.split(":"),c=fd(s),l=c.slice(1);return l==null||l.reduce(function(d,f,p,v){return!d[f]&&(d[f]=p===v.length-1?i:{}),d[f]},e),e},{})},$_attrsNoPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=hn(e,1),r=n[0];return!(r!=null&&r.startsWith("pt:"))}).reduce(function(e,n){var r=hn(n,2),o=r[0],i=r[1];return e[o]=i,e},{})}}},yd=`
|
|
206
|
+
`)},of={},sf={},Ee={name:"base",css:rf,theme:nf,classes:of,inlineStyles:sf,load:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(i){return i},o=r(Fe(e,{dt:Dr}));return o?Gd(tn(o),Fr({name:this.name},n)):{}},loadCSS:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,e)},loadTheme:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.theme,n,function(r){return ue.transformCSS(n.name||e.name,r)})},getCommonTheme:function(e){return ue.getCommon(this.name,e)},getComponentTheme:function(e){return ue.getComponent(this.name,e)},getDirectiveTheme:function(e){return ue.getDirective(this.name,e)},getPresetTheme:function(e,n,r){return ue.getCustomPreset(this.name,e,n,r)},getLayerOrderThemeCSS:function(){return ue.getLayerOrderCSS(this.name)},getStyleSheet:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var r=Fe(this.css,{dt:Dr}),o=tn("".concat(r).concat(e)),i=Object.entries(n).reduce(function(s,c){var l=Mi(c,2),u=l[0],d=l[1];return s.push("".concat(u,'="').concat(d,'"'))&&s},[]).join(" ");return'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(i,">").concat(o,"</style>")}return""},getCommonThemeStyleSheet:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ue.getCommonStyleSheet(this.name,e,n)},getThemeStyleSheet:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[ue.getStyleSheet(this.name,e,n)];if(this.theme){var o=this.name==="base"?"global-style":"".concat(this.name,"-style"),i=Fe(this.theme,{dt:Dr}),s=tn(ue.transformCSS(o,i)),c=Object.entries(n).reduce(function(l,u){var d=Mi(u,2),m=d[0],g=d[1];return l.push("".concat(m,'="').concat(g,'"'))&&l},[]).join(" ");r.push('<style type="text/css" data-primevue-style-id="'.concat(o,'" ').concat(c,">").concat(s,"</style>"))}return r.join("")},extend:function(e){return Fr(Fr({},this),{},{css:void 0,theme:void 0},e)}},Hi=Ee.extend({name:"common"});function ln(t){"@babel/helpers - typeof";return ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(t)}function af(t){return Wi(t)||lf(t)||zi(t)||ji()}function lf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Un(t,e){return Wi(t)||cf(t,e)||zi(t,e)||ji()}function ji(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
207
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zi(t,e){if(t){if(typeof t=="string")return Ki(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ki(t,e):void 0}}function Ki(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function cf(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(d){u=!0,o=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return c}}function Wi(t){if(Array.isArray(t))return t}function qi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qi(Object(n),!0).forEach(function(r){Vn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vn(t,e,n){return(e=uf(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uf(t){var e=df(t,"string");return ln(e)=="symbol"?e:e+""}function df(t,e){if(ln(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ln(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hn={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0},dt:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(e){e||(this._loadCoreStyles(),this._themeChangeListener(this._loadCoreStyles))}},dt:{immediate:!0,handler:function(e){var n=this;e?(this._loadScopedThemeStyles(e),this._themeChangeListener(function(){return n._loadScopedThemeStyles(e)})):this._unloadScopedThemeStyles()}}},scopedStyleEl:void 0,rootEl:void 0,beforeCreate:function(){var e,n,r,o,i,s,c,l,u,d,m,g=(e=this.pt)===null||e===void 0?void 0:e._usept,_=g?(n=this.pt)===null||n===void 0||(n=n.originalValue)===null||n===void 0?void 0:n[this.$.type.name]:void 0,w=g?(r=this.pt)===null||r===void 0||(r=r.value)===null||r===void 0?void 0:r[this.$.type.name]:this.pt;(o=w||_)===null||o===void 0||(o=o.hooks)===null||o===void 0||(i=o.onBeforeCreate)===null||i===void 0||i.call(o);var B=(s=this.$primevueConfig)===null||s===void 0||(s=s.pt)===null||s===void 0?void 0:s._usept,S=B?(c=this.$primevue)===null||c===void 0||(c=c.config)===null||c===void 0||(c=c.pt)===null||c===void 0?void 0:c.originalValue:void 0,H=B?(l=this.$primevue)===null||l===void 0||(l=l.config)===null||l===void 0||(l=l.pt)===null||l===void 0?void 0:l.value:(u=this.$primevue)===null||u===void 0||(u=u.config)===null||u===void 0?void 0:u.pt;(d=H||S)===null||d===void 0||(d=d[this.$.type.name])===null||d===void 0||(d=d.hooks)===null||d===void 0||(m=d.onBeforeCreate)===null||m===void 0||m.call(d)},created:function(){this._hook("onCreated")},beforeMount:function(){this._loadStyles(),this._hook("onBeforeMount")},mounted:function(){this.rootEl=qe(this.$el,'[data-pc-name="'.concat(Ge(this.$.type.name),'"]')),this.rootEl&&(this.rootEl.setAttribute(this.$attrSelector,""),this.rootEl.$pc=oe({name:this.$.type.name},this.$params)),this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._unloadScopedThemeStyles(),this._hook("onUnmounted")},methods:{_hook:function(e){if(!this.$options.hostName){var n=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(e)),r=this._useDefaultPT(this._getOptionValue,"hooks.".concat(e));n==null||n(),r==null||r()}},_mergeProps: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 Lr(e)?e.apply(void 0,r):a.mergeProps.apply(void 0,r)},_loadStyles:function(){var e=this,n=function(){dt.isStyleNameLoaded("base")||(Ee.loadCSS(e.$styleOptions),e._loadGlobalStyles(),dt.setLoadedStyleName("base")),e._loadThemeStyles()};n(),this._themeChangeListener(n)},_loadCoreStyles:function(){var e,n;!dt.isStyleNameLoaded((e=this.$style)===null||e===void 0?void 0:e.name)&&(n=this.$style)!==null&&n!==void 0&&n.name&&(Hi.loadCSS(this.$styleOptions),this.$options.style&&this.$style.loadCSS(this.$styleOptions),dt.setLoadedStyleName(this.$style.name))},_loadGlobalStyles:function(){var e=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);le(e)&&Ee.load(e,oe({name:"global"},this.$styleOptions))},_loadThemeStyles:function(){var e,n;if(!this.isUnstyled){if(!ue.isStyleNameLoaded("common")){var r,o,i=((r=this.$style)===null||r===void 0||(o=r.getCommonTheme)===null||o===void 0?void 0:o.call(r))||{},s=i.primitive,c=i.semantic;Ee.load(s==null?void 0:s.css,oe({name:"primitive-variables"},this.$styleOptions)),Ee.load(c==null?void 0:c.css,oe({name:"semantic-variables"},this.$styleOptions)),Ee.loadTheme(oe({name:"global-style"},this.$styleOptions)),ue.setLoadedStyleName("common")}if(!ue.isStyleNameLoaded((e=this.$style)===null||e===void 0?void 0:e.name)&&(n=this.$style)!==null&&n!==void 0&&n.name){var l,u,d,m,g=((l=this.$style)===null||l===void 0||(u=l.getComponentTheme)===null||u===void 0?void 0:u.call(l))||{},_=g.css;(d=this.$style)===null||d===void 0||d.load(_,oe({name:"".concat(this.$style.name,"-variables")},this.$styleOptions)),(m=this.$style)===null||m===void 0||m.loadTheme(oe({name:"".concat(this.$style.name,"-style")},this.$styleOptions)),ue.setLoadedStyleName(this.$style.name)}if(!ue.isStyleNameLoaded("layer-order")){var w,B,S=(w=this.$style)===null||w===void 0||(B=w.getLayerOrderThemeCSS)===null||B===void 0?void 0:B.call(w);Ee.load(S,oe({name:"layer-order",first:!0},this.$styleOptions)),ue.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(e){var n,r,o,i=((n=this.$style)===null||n===void 0||(r=n.getPresetTheme)===null||r===void 0?void 0:r.call(n,e,"[".concat(this.$attrSelector,"]")))||{},s=i.css,c=(o=this.$style)===null||o===void 0?void 0:o.load(s,oe({name:"".concat(this.$attrSelector,"-").concat(this.$style.name)},this.$styleOptions));this.scopedStyleEl=c.el},_unloadScopedThemeStyles:function(){var e;(e=this.scopedStyleEl)===null||e===void 0||(e=e.value)===null||e===void 0||e.remove()},_themeChangeListener:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};dt.clearLoadedStyleNames(),rt.on("theme:change",e)},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var n;return this[e]||((n=this._getHostInstance(this))===null||n===void 0?void 0:n[e])},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return $r(e,n,r)},_getPTValue:function(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=/./g.test(r)&&!!o[r.split(".")[0]],c=this._getPropValue("ptOptions")||((e=this.$primevueConfig)===null||e===void 0?void 0:e.ptOptions)||{},l=c.mergeSections,u=l===void 0?!0:l,d=c.mergeProps,m=d===void 0?!1:d,g=i?s?this._useGlobalPT(this._getPTClassValue,r,o):this._useDefaultPT(this._getPTClassValue,r,o):void 0,_=s?void 0:this._getPTSelf(n,this._getPTClassValue,r,oe(oe({},o),{},{global:g||{}})),w=this._getPTDatasets(r);return u||!u&&_?m?this._mergeProps(m,g,_,w):oe(oe(oe({},g),_),w):oe(oe({},_),w)},_getPTSelf:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a.mergeProps(this._usePT.apply(this,[this._getPT(e,this.$name)].concat(r)),this._usePT.apply(this,[this.$_attrsPT].concat(r)))},_getPTDatasets:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o="data-pc-",i=r==="root"&&le((e=this.pt)===null||e===void 0?void 0:e["data-pc-section"]);return r!=="transition"&&oe(oe({},r==="root"&&oe(Vn({},"".concat(o,"name"),Ge(i?(n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]:this.$.type.name)),i&&Vn({},"".concat(o,"extend"),Ge(this.$.type.name)))),{},Vn({},"".concat(o,"section"),Ge(r)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return Pe(e)||Rr(e)?{class:e}:e},_getPT:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,i=function(c){var l,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=o?o(c):c,m=Ge(r),g=Ge(n.$name);return(l=u?m!==g?d==null?void 0:d[m]:void 0:d==null?void 0:d[m])!==null&&l!==void 0?l:d};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,n,r,o){var i=function(B){return n(B,r,o)};if(e!=null&&e.hasOwnProperty("_usept")){var s,c=e._usept||((s=this.$primevueConfig)===null||s===void 0?void 0:s.ptOptions)||{},l=c.mergeSections,u=l===void 0?!0:l,d=c.mergeProps,m=d===void 0?!1:d,g=i(e.originalValue),_=i(e.value);return g===void 0&&_===void 0?void 0:Pe(_)?_:Pe(g)?g:u||!u&&_?m?this._mergeProps(m,g,_):oe(oe({},g),_):_}return i(e)},_useGlobalPT:function(e,n,r){return this._usePT(this.globalPT,e,n,r)},_useDefaultPT:function(e,n,r){return this._usePT(this.defaultPT,e,n,r)},ptm:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,e,oe(oe({},this.$params),n))},ptmi:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.mergeProps(this.$_attrsWithoutPT,this.ptm(e,n))},ptmo:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(e,n,oe({instance:this},r),!1)},cx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,oe(oe({},this.$params),n))},sx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n){var o=this._getOptionValue(this.$style.inlineStyles,e,oe(oe({},this.$params),r)),i=this._getOptionValue(Hi.inlineStyles,e,oe(oe({},this.$params),r));return[i,o]}}},computed:{globalPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(r){return Fe(r,{instance:n})})},defaultPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(r){return n._getOptionValue(r,n.$name,oe({},n.$params))||Fe(r,oe({},n.$params))})},isUnstyled:function(){var e;return this.unstyled!==void 0?this.unstyled:(e=this.$primevueConfig)===null||e===void 0?void 0:e.unstyled},$theme:function(){var e;return(e=this.$primevueConfig)===null||e===void 0?void 0:e.theme},$style:function(){return oe(oe({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var e;return{nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce}},$primevueConfig:function(){var e;return(e=this.$primevue)===null||e===void 0?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:e==null?void 0:e.$props,state:e==null?void 0:e.$data,attrs:e==null?void 0:e.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=Un(e,1),r=n[0];return r==null?void 0:r.startsWith("pt:")}).reduce(function(e,n){var r=Un(n,2),o=r[0],i=r[1],s=o.split(":"),c=af(s),l=c.slice(1);return l==null||l.reduce(function(u,d,m,g){return!u[d]&&(u[d]=m===g.length-1?i:{}),u[d]},e),e},{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=Un(e,1),r=n[0];return!(r!=null&&r.startsWith("pt:"))}).reduce(function(e,n){var r=Un(n,2),o=r[0],i=r[1];return e[o]=i,e},{})},$attrSelector:function(){return Fn("pc")}}},ff=`
|
|
110
208
|
.p-icon {
|
|
111
209
|
display: inline-block;
|
|
210
|
+
vertical-align: baseline;
|
|
112
211
|
}
|
|
113
212
|
|
|
114
213
|
.p-icon-spin {
|
|
@@ -137,24 +236,188 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
137
236
|
transform: rotate(359deg);
|
|
138
237
|
}
|
|
139
238
|
}
|
|
140
|
-
`,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qd(t,e){if(t){if(typeof t=="string")return wi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wi(t,e)}}function wi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ef(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,d=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(f){d=!0,o=f}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw o}}return c}}function tf(t){if(Array.isArray(t))return t}var Ei={name:"PanelMenuList",hostName:"PanelMenu",extends:yn,emits:["item-toggle","header-focus"],props:{panelId:{type:String,default:null},items:{type:Array,default:null},templates:{type:Object,default:null},expandedKeys:{type:Object,default:null}},searchTimeout:null,searchValue:null,data:function(){return{focused:!1,focusedItem:null,activeItemPath:[]}},watch:{expandedKeys:function(e){this.autoUpdateActiveItemPath(e)}},mounted:function(){this.autoUpdateActiveItemPath(this.expandedKeys)},methods:{getItemProp:function(e,n){return e&&e.item?D.getItemValue(e.item[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.parentKey})},isItemGroup:function(e){return D.isNotEmpty(e.items)},onFocus:function(e){this.focused=!0,this.focusedItem=this.focusedItem||(this.isElementInPanel(e,e.relatedTarget)?this.findFirstItem():this.findLastItem())},onBlur:function(){this.focused=!1,this.focusedItem=null,this.searchValue=""},onKeyDown:function(e){var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&D.isPrintableCharacter(e.key)&&this.searchItems(e,e.key);break}},onArrowDownKey:function(e){var n=D.isNotEmpty(this.focusedItem)?this.findNextItem(this.focusedItem):this.findFirstItem();this.changeFocusedItem({originalEvent:e,processedItem:n,focusOnNext:!0}),e.preventDefault()},onArrowUpKey:function(e){var n=D.isNotEmpty(this.focusedItem)?this.findPrevItem(this.focusedItem):this.findLastItem();this.changeFocusedItem({originalEvent:e,processedItem:n,selfCheck:!0}),e.preventDefault()},onArrowLeftKey:function(e){var n=this;if(D.isNotEmpty(this.focusedItem)){var r=this.activeItemPath.some(function(o){return o.key===n.focusedItem.key});r?this.activeItemPath=this.activeItemPath.filter(function(o){return o.key!==n.focusedItem.key}):this.focusedItem=D.isNotEmpty(this.focusedItem.parent)?this.focusedItem.parent:this.focusedItem,e.preventDefault()}},onArrowRightKey:function(e){var n=this;if(D.isNotEmpty(this.focusedItem)){var r=this.isItemGroup(this.focusedItem);if(r){var o=this.activeItemPath.some(function(i){return i.key===n.focusedItem.key});o?this.onArrowDownKey(e):(this.activeItemPath=this.activeItemPath.filter(function(i){return i.parentKey!==n.focusedItem.parentKey}),this.activeItemPath.push(this.focusedItem))}e.preventDefault()}},onHomeKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),e.preventDefault()},onEndKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),e.preventDefault()},onEnterKey:function(e){if(D.isNotEmpty(this.focusedItem)){var n=Z.findSingle(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]')),r=n&&(Z.findSingle(n,'[data-pc-section="action"]')||Z.findSingle(n,"a,button"));r?r.click():n&&n.click()}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onItemToggle:function(e){var n=e.processedItem,r=e.expanded;this.expandedKeys?this.$emit("item-toggle",{item:n.item,expanded:r}):(this.activeItemPath=this.activeItemPath.filter(function(o){return o.parentKey!==n.parentKey}),r&&this.activeItemPath.push(n)),this.focusedItem=n,Z.focus(this.$el)},onItemMouseMove:function(e){this.focused&&(this.focusedItem=e.processedItem)},isElementInPanel:function(e,n){var r=e.currentTarget.closest('[data-pc-section="panel"]');return r&&r.contains(n)},isItemMatched:function(e){var n;return this.isValidItem(e)&&((n=this.getItemLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)))},isVisibleItem:function(e){return!!e&&(e.level===0||this.isItemActive(e))&&this.isItemVisible(e)},isValidItem:function(e){return!!e&&!this.isItemDisabled(e)&&!this.getItemProp(e,"separator")},findFirstItem:function(){var e=this;return this.visibleItems.find(function(n){return e.isValidItem(n)})},findLastItem:function(){var e=this;return D.findLast(this.visibleItems,function(n){return e.isValidItem(n)})},findNextItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r<this.visibleItems.length-1?this.visibleItems.slice(r+1).find(function(i){return n.isValidItem(i)}):void 0;return o||e},findPrevItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r>0?D.findLast(this.visibleItems.slice(0,r),function(i){return n.isValidItem(i)}):void 0;return o||e},searchItems:function(e,n){var r=this;this.searchValue=(this.searchValue||"")+n;var o=null,i=!1;if(D.isNotEmpty(this.focusedItem)){var s=this.visibleItems.findIndex(function(c){return c.key===r.focusedItem.key});o=this.visibleItems.slice(s).find(function(c){return r.isItemMatched(c)}),o=D.isEmpty(o)?this.visibleItems.slice(0,s).find(function(c){return r.isItemMatched(c)}):o}else o=this.visibleItems.find(function(c){return r.isItemMatched(c)});return D.isNotEmpty(o)&&(i=!0),D.isEmpty(o)&&D.isEmpty(this.focusedItem)&&(o=this.findFirstItem()),D.isNotEmpty(o)&&this.changeFocusedItem({originalEvent:e,processedItem:o,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){r.searchValue="",r.searchTimeout=null},500),i},changeFocusedItem:function(e){var n=e.originalEvent,r=e.processedItem,o=e.focusOnNext,i=e.selfCheck,s=e.allowHeaderFocus,c=s===void 0?!0:s;D.isNotEmpty(this.focusedItem)&&this.focusedItem.key!==r.key?(this.focusedItem=r,this.scrollInView()):c&&this.$emit("header-focus",{originalEvent:n,focusOnNext:o,selfCheck:i})},scrollInView:function(){var e=Z.findSingle(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]'));e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateActiveItemPath:function(e){var n=this;this.activeItemPath=Object.entries(e||{}).reduce(function(r,o){var i=Xd(o,2),s=i[0],c=i[1];if(c){var l=n.findProcessedItemByItemKey(s);l&&r.push(l)}return r},[])},findProcessedItemByItemKey:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n=n||r===0&&this.processedItems,!n)return null;for(var o=0;o<n.length;o++){var i=n[o];if(this.getItemProp(i,"key")===e)return i;var s=this.findProcessedItemByItemKey(e,i.items,r+1);if(s)return s}},createProcessedItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",s=[];return e&&e.forEach(function(c,l){var d=(i!==""?i+"_":"")+l,f={item:c,index:l,level:r,key:d,parent:o,parentKey:i};f.items=n.createProcessedItems(c.items,r+1,f,d),s.push(f)}),s},flatItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&e.forEach(function(o){n.isVisibleItem(o)&&(r.push(o),n.flatItems(o.items,r))}),r}},computed:{processedItems:function(){return this.createProcessedItems(this.items||[])},visibleItems:function(){return this.flatItems(this.processedItems)},focusedItemId:function(){return D.isNotEmpty(this.focusedItem)?"".concat(this.panelId,"_").concat(this.focusedItem.key):null}},components:{PanelMenuSub:vi}};function nf(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuSub");return a.openBlock(),a.createBlock(s,a.mergeProps({id:n.panelId+"_list",class:t.cx("menu"),role:"tree",tabindex:-1,"aria-activedescendant":o.focused?i.focusedItemId:void 0,panelId:n.panelId,focusedItemId:o.focused?i.focusedItemId:void 0,items:i.processedItems,templates:n.templates,activeItemPath:o.activeItemPath,onFocus:i.onFocus,onBlur:i.onBlur,onKeydown:i.onKeyDown,onItemToggle:i.onItemToggle,onItemMousemove:i.onItemMouseMove,pt:t.pt,unstyled:t.unstyled},t.ptm("menu")),null,16,["id","class","aria-activedescendant","panelId","focusedItemId","items","templates","activeItemPath","onFocus","onBlur","onKeydown","onItemToggle","onItemMousemove","pt","unstyled"])}Ei.render=nf;function qt(t){"@babel/helpers - typeof";return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(t)}function Si(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function rf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Si(Object(n),!0).forEach(function(r){of(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Si(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function of(t,e,n){return e=sf(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sf(t){var e=af(t,"string");return qt(e)=="symbol"?e:String(e)}function af(t,e){if(qt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(qt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ci={name:"PanelMenu",extends:zd,inheritAttrs:!1,emits:["update:expandedKeys","panel-open","panel-close"],data:function(){return{id:this.$attrs.id,activeItem:null,activeItems:[]}},watch:{"$attrs.id":function(e){this.id=e||ti()}},mounted:function(){this.id=this.id||ti()},methods:{getItemProp:function(e,n){return e?D.getItemValue(e[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,n,r){return this.ptm(e,{context:{index:r,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(e){return this.expandedKeys?this.expandedKeys[this.getItemProp(e,"key")]:this.multiple?this.activeItems.some(function(n){return D.equals(e,n)}):D.equals(e,this.activeItem)},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return D.equals(e,this.activeItem)},getPanelId:function(e){return"".concat(this.id,"_").concat(e)},getPanelKey:function(e){return this.getPanelId(e)},getHeaderId:function(e){return"".concat(this.getPanelId(e),"_header")},getContentId:function(e){return"".concat(this.getPanelId(e),"_content")},onHeaderClick:function(e,n){if(this.isItemDisabled(n)){e.preventDefault();return}n.command&&n.command({originalEvent:e,item:n}),this.changeActiveItem(e,n),Z.focus(e.currentTarget)},onHeaderKeyDown:function(e,n){switch(e.code){case"ArrowDown":this.onHeaderArrowDownKey(e);break;case"ArrowUp":this.onHeaderArrowUpKey(e);break;case"Home":this.onHeaderHomeKey(e);break;case"End":this.onHeaderEndKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onHeaderEnterKey(e,n);break}},onHeaderArrowDownKey:function(e){var n=Z.getAttribute(e.currentTarget,"data-p-highlight")===!0?Z.findSingle(e.currentTarget.nextElementSibling,'[data-pc-section="menu"]'):null;n?Z.focus(n):this.updateFocusedHeader({originalEvent:e,focusOnNext:!0}),e.preventDefault()},onHeaderArrowUpKey:function(e){var n=this.findPrevHeader(e.currentTarget.parentElement)||this.findLastHeader(),r=Z.getAttribute(n,"data-p-highlight")===!0?Z.findSingle(n.nextElementSibling,'[data-pc-section="menu"]'):null;r?Z.focus(r):this.updateFocusedHeader({originalEvent:e,focusOnNext:!1}),e.preventDefault()},onHeaderHomeKey:function(e){this.changeFocusedHeader(e,this.findFirstHeader()),e.preventDefault()},onHeaderEndKey:function(e){this.changeFocusedHeader(e,this.findLastHeader()),e.preventDefault()},onHeaderEnterKey:function(e,n){var r=Z.findSingle(e.currentTarget,'[data-pc-section="headeraction"]');r?r.click():this.onHeaderClick(e,n),e.preventDefault()},findNextHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.nextElementSibling,o=Z.findSingle(r,'[data-pc-section="header"]');return o?Z.getAttribute(o,"data-p-disabled")?this.findNextHeader(o.parentElement):o:null},findPrevHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.previousElementSibling,o=Z.findSingle(r,'[data-pc-section="header"]');return o?Z.getAttribute(o,"data-p-disabled")?this.findPrevHeader(o.parentElement):o:null},findFirstHeader:function(){return this.findNextHeader(this.$el.firstElementChild,!0)},findLastHeader:function(){return this.findPrevHeader(this.$el.lastElementChild,!0)},updateFocusedHeader:function(e){var n=e.originalEvent,r=e.focusOnNext,o=e.selfCheck,i=n.currentTarget.closest('[data-pc-section="panel"]'),s=o?Z.findSingle(i,'[data-pc-section="header"]'):r?this.findNextHeader(i):this.findPrevHeader(i);s?this.changeFocusedHeader(n,s):r?this.onHeaderHomeKey(n):this.onHeaderEndKey(n)},changeActiveItem:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!this.isItemDisabled(n)){var o=this.isItemActive(n),i=o?"panel-close":"panel-open";this.activeItem=r?n:this.activeItem&&D.equals(n,this.activeItem)?null:n,this.multiple&&(this.activeItems.some(function(s){return D.equals(n,s)})?this.activeItems=this.activeItems.filter(function(s){return!D.equals(n,s)}):this.activeItems.push(n)),this.changeExpandedKeys({item:n,expanded:!o}),this.$emit(i,{originalEvent:e,item:n})}},changeExpandedKeys:function(e){var n=e.item,r=e.expanded,o=r===void 0?!1:r;if(this.expandedKeys){var i=rf({},this.expandedKeys);o?i[n.key]=!0:delete i[n.key],this.$emit("update:expandedKeys",i)}},changeFocusedHeader:function(e,n){n&&Z.focus(n)},getMenuItemProps:function(e,n){return{icon:a.mergeProps({class:[this.cx("headerIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("headerIcon",e,n)),label:a.mergeProps({class:this.cx("headerLabel")},this.getPTOptions("headerLabel",e,n))}}},components:{PanelMenuList:Ei,ChevronRightIcon:yr,ChevronDownIcon:gr}},lf=["id"],cf=["id","tabindex","aria-label","aria-expanded","aria-controls","aria-disabled","onClick","onKeydown","data-p-highlight","data-p-disabled"],uf=["href"],df=["id","aria-labelledby"];function ff(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuList");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:o.id,class:t.cx("root")},t.ptmi("root")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.model,function(c,l){return a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getPanelKey(l)},[i.isItemVisible(c)?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,style:i.getItemProp(c,"style"),class:[t.cx("panel"),i.getItemProp(c,"class")]},t.ptm("panel")),[a.createElementVNode("div",a.mergeProps({id:i.getHeaderId(l),class:[t.cx("header",{item:c}),i.getItemProp(c,"headerClass")],tabindex:i.isItemDisabled(c)?-1:t.tabindex,role:"button","aria-label":i.getItemLabel(c),"aria-expanded":i.isItemActive(c),"aria-controls":i.getContentId(l),"aria-disabled":i.isItemDisabled(c),onClick:function(f){return i.onHeaderClick(f,c)},onKeydown:function(f){return i.onHeaderKeyDown(f,c)}},i.getPTOptions("header",c,l),{"data-p-highlight":i.isItemActive(c),"data-p-disabled":i.isItemDisabled(c)}),[a.createElementVNode("div",a.mergeProps({class:t.cx("headerContent")},i.getPTOptions("headerContent",c,l)),[t.$slots.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.item),{key:1,item:c,root:!0,active:i.isItemActive(c),hasSubmenu:i.getItemProp(c,"items"),label:i.getItemLabel(c),props:i.getMenuItemProps(c,l)},null,8,["item","active","hasSubmenu","label","props"])):(a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:i.getItemProp(c,"url"),class:t.cx("headerAction"),tabindex:-1},i.getPTOptions("headerAction",c,l)),[i.getItemProp(c,"items")?a.renderSlot(t.$slots,"submenuicon",{key:0,active:i.isItemActive(c)},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.isItemActive(c)?"ChevronDownIcon":"ChevronRightIcon"),a.mergeProps({class:t.cx("submenuIcon")},i.getPTOptions("submenuIcon",c,l)),null,16,["class"]))]}):a.createCommentVNode("",!0),t.$slots.headericon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.headericon),{key:1,item:c,class:a.normalizeClass([t.cx("headerIcon"),i.getItemProp(c,"icon")])},null,8,["item","class"])):i.getItemProp(c,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:2,class:[t.cx("headerIcon"),i.getItemProp(c,"icon")]},i.getPTOptions("headerIcon",c,l)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:t.cx("headerLabel")},i.getPTOptions("headerLabel",c,l)),a.toDisplayString(i.getItemLabel(c)),17)],16,uf))],16)],16,cf),a.createVNode(a.Transition,a.mergeProps({name:"p-toggleable-content"},t.ptm("transition")),{default:a.withCtx(function(){return[a.withDirectives(a.createElementVNode("div",a.mergeProps({id:i.getContentId(l),class:t.cx("toggleableContent"),role:"region","aria-labelledby":i.getHeaderId(l)},t.ptm("toggleableContent")),[i.getItemProp(c,"items")?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("menuContent")},t.ptm("menuContent")),[a.createVNode(s,{panelId:i.getPanelId(l),items:i.getItemProp(c,"items"),templates:t.$slots,expandedKeys:t.expandedKeys,onItemToggle:i.changeExpandedKeys,onHeaderFocus:i.updateFocusedHeader,pt:t.pt,unstyled:t.unstyled},null,8,["panelId","items","templates","expandedKeys","onItemToggle","onHeaderFocus","pt","unstyled"])],16)):a.createCommentVNode("",!0)],16,df),[[a.vShow,i.isItemActive(c)]])]}),_:2},1040)],16)):a.createCommentVNode("",!0)],64)}),128))],16,lf)}Ci.render=ff;const pf=["data-active","href","onClick"],mf={class:"sf-ml-2"},hf=["href","target"],gf={class:"sf-ml-2"},yf=a.createElementVNode("div",{class:"sf-flex-grow-1"},null,-1),bf=a.defineComponent({__name:"PanelMenu",props:{items:{}},setup(t){const e=t,n=rt.useRoute(),r=a.computed(()=>e.items);o(r.value);function o(c,l=void 0){c.forEach(d=>{l&&(d.parentKey=l),d.items&&o(d.items,d.key)})}const i=a.ref({});function s(c,l,d=void 0){c.forEach(f=>{f.routeName&&f.routeName===l&&d&&(i.value[d]=d===f.parentKey),f.items&&s(f.items,l,f.key)})}return a.watch(()=>n.name,c=>{c&&s(r.value,c.toString())}),(c,l)=>{const d=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(a.unref(Ci),{model:r.value,expandedKeys:i.value,"onUpdate:expandedKeys":l[0]||(l[0]=f=>i.value=f),multiple:!0,class:a.normalizeClass("sf-p-2")},{item:a.withCtx(({item:f,active:p})=>[f.routeName?(a.openBlock(),a.createBlock(d,{key:0,to:{name:f.routeName},custom:""},{default:a.withCtx(({href:v,navigate:w,isActive:A})=>[a.createElementVNode("a",{class:"sf-flex sf-align-items-center sf-px-3 sf-py-2 sf-ripple","data-active":A,href:v,onClick:w},[a.createVNode(Qe,{icon:f.icon??"chevron_right"},null,8,["icon"]),a.createElementVNode("span",mf,a.toDisplayString(f.label),1)],8,pf)]),_:2},1032,["to"])):(a.openBlock(),a.createElementBlock("a",{key:1,class:"sf-flex sf-align-items-center sf-pl-3 sf-py-2",href:f.url,target:f.target},[f.icon?(a.openBlock(),a.createBlock(Qe,{key:0,icon:f.icon},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",gf,a.toDisplayString(f.label),1),yf,a.createVNode(Qe,{icon:p?"expand_less":"expand_more"},null,8,["icon"])],8,hf))]),_:1},8,["model","expandedKeys"])}}});var vf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ef(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 bn={};bn.byteLength=Af,bn.toByteArray=kf,bn.fromByteArray=Pf;for(var Ke=[],Ne=[],Sf=typeof Uint8Array<"u"?Uint8Array:Array,wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt=0,Cf=wr.length;vt<Cf;++vt)Ke[vt]=wr[vt],Ne[wr.charCodeAt(vt)]=vt;Ne[45]=62,Ne[95]=63;function Ai(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 Af(t){var e=Ai(t),n=e[0],r=e[1];return(n+r)*3/4-r}function _f(t,e,n){return(e+n)*3/4-n}function kf(t){var e,n=Ai(t),r=n[0],o=n[1],i=new Sf(_f(t,r,o)),s=0,c=o>0?r-4:r,l;for(l=0;l<c;l+=4)e=Ne[t.charCodeAt(l)]<<18|Ne[t.charCodeAt(l+1)]<<12|Ne[t.charCodeAt(l+2)]<<6|Ne[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=Ne[t.charCodeAt(l)]<<2|Ne[t.charCodeAt(l+1)]>>4,i[s++]=e&255),o===1&&(e=Ne[t.charCodeAt(l)]<<10|Ne[t.charCodeAt(l+1)]<<4|Ne[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function xf(t){return Ke[t>>18&63]+Ke[t>>12&63]+Ke[t>>6&63]+Ke[t&63]}function If(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(xf(r));return o.join("")}function Pf(t){for(var e,n=t.length,r=n%3,o=[],i=16383,s=0,c=n-r;s<c;s+=i)o.push(If(t,s,s+i>c?c:s+i));return r===1?(e=t[n-1],o.push(Ke[e>>2]+Ke[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],o.push(Ke[e>>10]+Ke[e>>4&63]+Ke[e<<2&63]+"=")),o.join("")}var _i={exports:{}};const ki=Ef(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
|
|
239
|
+
`,mf=Ee.extend({name:"baseicon",css:ff});function cn(t){"@babel/helpers - typeof";return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(t)}function Gi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ji(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gi(Object(n),!0).forEach(function(r){pf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function pf(t,e,n){return(e=hf(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hf(t){var e=gf(t,"string");return cn(e)=="symbol"?e:e+""}function gf(t,e){if(cn(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(cn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Yi={name:"BaseIcon",extends:Hn,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:mf,provide:function(){return{$pcIcon:this,$parentInstance:this}},methods:{pti:function(){var e=bt(this.label);return Ji(Ji({},!this.isUnstyled&&{class:["p-icon",{"p-icon-spin":this.spin}]}),{},{role:e?void 0:"img","aria-label":e?void 0:this.label,"aria-hidden":e})}}},Mr={name:"ChevronDownIcon",extends:Yi},yf=a.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1),bf=[yf];function vf(t,e,n,r,o,i){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),bf,16)}Mr.render=vf;var Ur={name:"ChevronRightIcon",extends:Yi},wf=a.createElementVNode("path",{d:"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z",fill:"currentColor"},null,-1),_f=[wf];function Sf(t,e,n,r,o,i){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),_f,16)}Ur.render=Sf;var kf=function(e){var n=e.dt;return`
|
|
240
|
+
.p-panelmenu {
|
|
241
|
+
display: flex;
|
|
242
|
+
flex-direction: column;
|
|
243
|
+
gap: `.concat(n("panelmenu.gap"),`;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.p-panelmenu-panel {
|
|
247
|
+
background: `).concat(n("panelmenu.panel.background"),`;
|
|
248
|
+
border-width: `).concat(n("panelmenu.panel.border.width"),`;
|
|
249
|
+
border-style: solid;
|
|
250
|
+
border-color: `).concat(n("panelmenu.panel.border.color"),`;
|
|
251
|
+
color: `).concat(n("panelmenu.panel.color"),`;
|
|
252
|
+
border-radius: `).concat(n("panelmenu.panel.border.radius"),`;
|
|
253
|
+
padding: `).concat(n("panelmenu.panel.padding"),`;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.p-panelmenu-panel:first-child {
|
|
257
|
+
border-width: `).concat(n("panelmenu.panel.first.border.width"),`;
|
|
258
|
+
border-top-left-radius: `).concat(n("panelmenu.panel.first.top.border.radius"),`;
|
|
259
|
+
border-top-right-radius: `).concat(n("panelmenu.panel.first.top.border.radius"),`;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.p-panelmenu-panel:last-child {
|
|
263
|
+
border-width: `).concat(n("panelmenu.panel.last.border.width"),`;
|
|
264
|
+
border-bottom-left-radius: `).concat(n("panelmenu.panel.last.bottom.border.radius"),`;
|
|
265
|
+
border-bottom-right-radius: `).concat(n("panelmenu.panel.last.bottom.border.radius"),`;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.p-panelmenu-header {
|
|
269
|
+
outline: 0 none;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.p-panelmenu-header-content {
|
|
273
|
+
border-radius: `).concat(n("panelmenu.item.border.radius"),`;
|
|
274
|
+
transition: background `).concat(n("panelmenu.transition.duration"),", color ").concat(n("panelmenu.transition.duration"),", outline-color ").concat(n("panelmenu.transition.duration"),", box-shadow ").concat(n("panelmenu.transition.duration"),`;
|
|
275
|
+
outline-color: transparent;
|
|
276
|
+
color: `).concat(n("panelmenu.item.color"),`;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.p-panelmenu-header-link {
|
|
280
|
+
display: flex;
|
|
281
|
+
gap: `).concat(n("panelmenu.item.gap"),`;
|
|
282
|
+
padding: `).concat(n("panelmenu.item.padding"),`;
|
|
283
|
+
align-items: center;
|
|
284
|
+
user-select: none;
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
position: relative;
|
|
287
|
+
text-decoration: none;
|
|
288
|
+
color: inherit;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.p-panelmenu-header-icon,
|
|
292
|
+
.p-panelmenu-item-icon {
|
|
293
|
+
color: `).concat(n("panelmenu.item.icon.color"),`;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.p-panelmenu-submenu-icon {
|
|
297
|
+
color: `).concat(n("panelmenu.submenu.icon.color"),`;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content {
|
|
301
|
+
background: `).concat(n("panelmenu.item.focus.background"),`;
|
|
302
|
+
color: `).concat(n("panelmenu.item.focus.color"),`;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-header-icon {
|
|
306
|
+
color: `).concat(n("panelmenu.item.icon.focus.color"),`;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.p-panelmenu-header:not(.p-disabled):focus-visible .p-panelmenu-header-content .p-panelmenu-submenu-icon {
|
|
310
|
+
color: `).concat(n("panelmenu.submenu.icon.focus.color"),`;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover {
|
|
314
|
+
background: `).concat(n("panelmenu.item.focus.background"),`;
|
|
315
|
+
color: `).concat(n("panelmenu.item.focus.color"),`;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-header-icon {
|
|
319
|
+
color: `).concat(n("panelmenu.item.icon.focus.color"),`;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.p-panelmenu-header:not(.p-disabled) .p-panelmenu-header-content:hover .p-panelmenu-submenu-icon {
|
|
323
|
+
color: `).concat(n("panelmenu.submenu.icon.focus.color"),`;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.p-panelmenu-submenu {
|
|
327
|
+
margin: 0;
|
|
328
|
+
padding: 0 0 0 `).concat(n("panelmenu.submenu.indent"),`;
|
|
329
|
+
outline: 0;
|
|
330
|
+
list-style: none;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.p-panelmenu-item-link {
|
|
334
|
+
display: flex;
|
|
335
|
+
gap: `).concat(n("panelmenu.item.gap"),`;
|
|
336
|
+
padding: `).concat(n("panelmenu.item.padding"),`;
|
|
337
|
+
align-items: center;
|
|
338
|
+
user-select: none;
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
text-decoration: none;
|
|
341
|
+
color: inherit;
|
|
342
|
+
position: relative;
|
|
343
|
+
overflow: hidden;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.p-panelmenu-item-label {
|
|
347
|
+
line-height: 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.p-panelmenu-item-content {
|
|
351
|
+
border-radius: `).concat(n("panelmenu.item.border.radius"),`;
|
|
352
|
+
transition: background `).concat(n("panelmenu.transition.duration"),", color ").concat(n("panelmenu.transition.duration"),", outline-color ").concat(n("panelmenu.transition.duration"),", box-shadow ").concat(n("panelmenu.transition.duration"),`;
|
|
353
|
+
color: `).concat(n("panelmenu.item.color"),`;
|
|
354
|
+
outline-color: transparent;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.p-panelmenu-item.p-focus > .p-panelmenu-item-content {
|
|
358
|
+
background: `).concat(n("panelmenu.item.focus.background"),`;
|
|
359
|
+
color: `).concat(n("panelmenu.item.focus.color"),`;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-item-icon {
|
|
363
|
+
color: `).concat(n("panelmenu.item.focus.color"),`;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.p-panelmenu-item.p-focus > .p-panelmenu-item-content .p-panelmenu-submenu-icon {
|
|
367
|
+
color: `).concat(n("panelmenu.submenu.icon.focus.color"),`;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover {
|
|
371
|
+
background: `).concat(n("panelmenu.item.focus.background"),`;
|
|
372
|
+
color: `).concat(n("panelmenu.item.focus.color"),`;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-item-icon {
|
|
376
|
+
color: `).concat(n("panelmenu.item.icon.focus.color"),`;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.p-panelmenu-item:not(.p-disabled) > .p-panelmenu-item-content:hover .p-panelmenu-submenu-icon {
|
|
380
|
+
color: `).concat(n("panelmenu.submenu.icon.focus.color"),`;
|
|
381
|
+
}
|
|
382
|
+
`)},Cf={root:"p-panelmenu p-component",panel:"p-panelmenu-panel",header:function(e){var n=e.instance,r=e.item;return["p-panelmenu-header",{"p-panelmenu-header-active":n.isItemActive(r)&&!!r.items,"p-disabled":n.isItemDisabled(r)}]},headerContent:"p-panelmenu-header-content",headerLink:"p-panelmenu-header-link",headerIcon:"p-panelmenu-header-icon",headerLabel:"p-panelmenu-header-label",contentContainer:"p-panelmenu-content-container",content:"p-panelmenu-content",rootList:"p-panelmenu-root-list",item:function(e){var n=e.instance,r=e.processedItem;return["p-panelmenu-item",{"p-focus":n.isItemFocused(r),"p-disabled":n.isItemDisabled(r)}]},itemContent:"p-panelmenu-item-content",itemLink:"p-panelmenu-item-link",itemIcon:"p-panelmenu-item-icon",itemLabel:"p-panelmenu-item-label",submenuIcon:"p-panelmenu-submenu-icon",submenu:"p-panelmenu-submenu",separator:"p-menuitem-separator"},Ef=Ee.extend({name:"panelmenu",theme:kf,classes:Cf}),Xi=Ei();function un(t){"@babel/helpers - typeof";return un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(t)}function Zi(t,e){return Pf(t)||xf(t,e)||Tf(t,e)||Af()}function Af(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
383
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tf(t,e){if(t){if(typeof t=="string")return Qi(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qi(t,e):void 0}}function Qi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xf(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(d){u=!0,o=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return c}}function Pf(t){if(Array.isArray(t))return t}function es(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?es(Object(n),!0).forEach(function(r){Vr(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):es(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Vr(t,e,n){return(e=If(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function If(t){var e=Of(t,"string");return un(e)=="symbol"?e:e+""}function Of(t,e){if(un(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(un(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Z={_getMeta:function(){return[ut(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],Fe(ut(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(e,n){var r,o,i;return(r=(e==null||(o=e.instance)===null||o===void 0?void 0:o.$primevue)||(n==null||(i=n.ctx)===null||i===void 0||(i=i.appContext)===null||i===void 0||(i=i.config)===null||i===void 0||(i=i.globalProperties)===null||i===void 0?void 0:i.$primevue))===null||r===void 0?void 0:r.config},_getOptionValue:$r,_getPTValue:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=function(){var A=Z._getOptionValue.apply(Z,arguments);return Pe(A)||Rr(A)?{class:A}:A},u=((e=r.binding)===null||e===void 0||(e=e.value)===null||e===void 0?void 0:e.ptOptions)||((n=r.$primevueConfig)===null||n===void 0?void 0:n.ptOptions)||{},d=u.mergeSections,m=d===void 0?!0:d,g=u.mergeProps,_=g===void 0?!1:g,w=c?Z._useDefaultPT(r,r.defaultPT(),l,i,s):void 0,B=Z._usePT(r,Z._getPT(o,r.$name),l,i,ie(ie({},s),{},{global:w||{}})),S=Z._getPTDatasets(r,i);return m||!m&&B?_?Z._mergeProps(r,_,w,B,S):ie(ie(ie({},w),B),S):ie(ie({},B),S)},_getPTDatasets:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r="data-pc-";return ie(ie({},n==="root"&&Vr({},"".concat(r,"name"),Ge(e.$name))),{},Vr({},"".concat(r,"section"),Ge(n)))},_getPT:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=function(s){var c,l=r?r(s):s,u=Ge(n);return(c=l==null?void 0:l[u])!==null&&c!==void 0?c:l};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:o(e.originalValue),value:o(e.value)}:o(e)},_usePT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,s=function(S){return r(S,o,i)};if(n!=null&&n.hasOwnProperty("_usept")){var c,l=n._usept||((c=e.$primevueConfig)===null||c===void 0?void 0:c.ptOptions)||{},u=l.mergeSections,d=u===void 0?!0:u,m=l.mergeProps,g=m===void 0?!1:m,_=s(n.originalValue),w=s(n.value);return _===void 0&&w===void 0?void 0:Pe(w)?w:Pe(_)?_:d||!d&&w?g?Z._mergeProps(e,g,_,w):ie(ie({},_),w):w}return s(n)},_useDefaultPT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return Z._usePT(e,n,r,o,i)},_loadStyles:function(e,n,r){var o,i=Z._getConfig(n,r),s={nonce:i==null||(o=i.csp)===null||o===void 0?void 0:o.nonce};Z._loadCoreStyles(e.$instance,s),Z._loadThemeStyles(e.$instance,s),Z._loadScopedThemeStyles(e.$instance,s),Z._themeChangeListener(function(){return Z._loadThemeStyles(e.$instance,s)})},_loadCoreStyles:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(!dt.isStyleNameLoaded((e=r.$style)===null||e===void 0?void 0:e.name)&&(n=r.$style)!==null&&n!==void 0&&n.name){var i;Ee.loadCSS(o),r.isUnstyled()&&((i=r.$style)===null||i===void 0||i.loadCSS(o)),dt.setLoadedStyleName(r.$style.name)}},_loadThemeStyles:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(!(r!=null&&r.isUnstyled())){if(!ue.isStyleNameLoaded("common")){var i,s,c=((i=r.$style)===null||i===void 0||(s=i.getCommonTheme)===null||s===void 0?void 0:s.call(i))||{},l=c.primitive,u=c.semantic;Ee.load(l==null?void 0:l.css,ie({name:"primitive-variables"},o)),Ee.load(u==null?void 0:u.css,ie({name:"semantic-variables"},o)),Ee.loadTheme(ie({name:"global-style"},o)),ue.setLoadedStyleName("common")}if(!ue.isStyleNameLoaded((e=r.$style)===null||e===void 0?void 0:e.name)&&(n=r.$style)!==null&&n!==void 0&&n.name){var d,m,g,_,w=((d=r.$style)===null||d===void 0||(m=d.getDirectiveTheme)===null||m===void 0?void 0:m.call(d))||{},B=w.css;(g=r.$style)===null||g===void 0||g.load(B,ie({name:"".concat(r.$style.name,"-variables")},o)),(_=r.$style)===null||_===void 0||_.loadTheme(ie({name:"".concat(r.$style.name,"-style")},o)),ue.setLoadedStyleName(r.$style.name)}if(!ue.isStyleNameLoaded("layer-order")){var S,H,A=(S=r.$style)===null||S===void 0||(H=S.getLayerOrderThemeCSS)===null||H===void 0?void 0:H.call(S);Ee.load(A,ie({name:"layer-order",first:!0},o)),ue.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e.preset();if(r&&e.$attrSelector){var o,i,s,c=((o=e.$style)===null||o===void 0||(i=o.getPresetTheme)===null||i===void 0?void 0:i.call(o,r,"[".concat(e.$attrSelector,"]")))||{},l=c.css,u=(s=e.$style)===null||s===void 0?void 0:s.load(l,ie({name:"".concat(e.$attrSelector,"-").concat(e.$style.name)},n));e.scopedStyleEl=u.el}},_themeChangeListener:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};dt.clearLoadedStyleNames(),rt.on("theme:change",e)},_hook:function(e,n,r,o,i,s){var c,l,u="on".concat(Ld(n)),d=Z._getConfig(o,i),m=r==null?void 0:r.$instance,g=Z._usePT(m,Z._getPT(o==null||(c=o.value)===null||c===void 0?void 0:c.pt,e),Z._getOptionValue,"hooks.".concat(u)),_=Z._useDefaultPT(m,d==null||(l=d.pt)===null||l===void 0||(l=l.directives)===null||l===void 0?void 0:l[e],Z._getOptionValue,"hooks.".concat(u)),w={el:r,binding:o,vnode:i,prevVnode:s};g==null||g(m,w),_==null||_(m,w)},_mergeProps:function(){for(var e=arguments.length>1?arguments[1]:void 0,n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Lr(e)?e.apply(void 0,r):a.mergeProps.apply(void 0,r)},_extend:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=function(s,c,l,u,d){var m,g,_;c._$instances=c._$instances||{};var w=Z._getConfig(l,u),B=c._$instances[e]||{},S=bt(B)?ie(ie({},n),n==null?void 0:n.methods):{};c._$instances[e]=ie(ie({},B),{},{$name:e,$host:c,$binding:l,$modifiers:l==null?void 0:l.modifiers,$value:l==null?void 0:l.value,$el:B.$el||c||void 0,$style:ie({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},n==null?void 0:n.style),$primevueConfig:w,$attrSelector:c.$attrSelector,defaultPT:function(){return Z._getPT(w==null?void 0:w.pt,void 0,function(A){var E;return A==null||(E=A.directives)===null||E===void 0?void 0:E[e]})},isUnstyled:function(){var A,E;return((A=c.$instance)===null||A===void 0||(A=A.$binding)===null||A===void 0||(A=A.value)===null||A===void 0?void 0:A.unstyled)!==void 0?(E=c.$instance)===null||E===void 0||(E=E.$binding)===null||E===void 0||(E=E.value)===null||E===void 0?void 0:E.unstyled:w==null?void 0:w.unstyled},theme:function(){var A;return(A=c.$instance)===null||A===void 0||(A=A.$primevueConfig)===null||A===void 0?void 0:A.theme},preset:function(){var A;return(A=c.$instance)===null||A===void 0||(A=A.$binding)===null||A===void 0||(A=A.value)===null||A===void 0?void 0:A.dt},ptm:function(){var A,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Z._getPTValue(c.$instance,(A=c.$instance)===null||A===void 0||(A=A.$binding)===null||A===void 0||(A=A.value)===null||A===void 0?void 0:A.pt,E,ie({},G))},ptmo:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Z._getPTValue(c.$instance,A,E,G,!1)},cx:function(){var A,E,G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(A=c.$instance)!==null&&A!==void 0&&A.isUnstyled()?void 0:Z._getOptionValue((E=c.$instance)===null||E===void 0||(E=E.$style)===null||E===void 0?void 0:E.classes,G,ie({},ee))},sx:function(){var A,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return G?Z._getOptionValue((A=c.$instance)===null||A===void 0||(A=A.$style)===null||A===void 0?void 0:A.inlineStyles,E,ie({},ee)):void 0}},S),c.$instance=c._$instances[e],(m=(g=c.$instance)[s])===null||m===void 0||m.call(g,c,l,u,d),c["$".concat(e)]=c.$instance,Z._hook(e,s,c,l,u,d),c.$pd||(c.$pd={}),c.$pd[e]=ie(ie({},(_=c.$pd)===null||_===void 0?void 0:_[e]),{},{name:e,instance:c.$instance})},o=function(s){var c,l,u,d,m,g=(c=s.$instance)===null||c===void 0?void 0:c.watch;g==null||(l=g.config)===null||l===void 0||l.call(s.$instance,(u=s.$instance)===null||u===void 0?void 0:u.$primevueConfig),Xi.on("config:change",function(_){var w,B=_.newValue,S=_.oldValue;return g==null||(w=g.config)===null||w===void 0?void 0:w.call(s.$instance,B,S)}),g==null||(d=g["config.ripple"])===null||d===void 0||d.call(s.$instance,(m=s.$instance)===null||m===void 0||(m=m.$primevueConfig)===null||m===void 0?void 0:m.ripple),Xi.on("config:ripple:change",function(_){var w,B=_.newValue,S=_.oldValue;return g==null||(w=g["config.ripple"])===null||w===void 0?void 0:w.call(s.$instance,B,S)})};return{created:function(s,c,l,u){r("created",s,c,l,u)},beforeMount:function(s,c,l,u){s.$attrSelector=Fn("pd"),Z._loadStyles(s,c,l),r("beforeMount",s,c,l,u),o(s)},mounted:function(s,c,l,u){Z._loadStyles(s,c,l),r("mounted",s,c,l,u)},beforeUpdate:function(s,c,l,u){r("beforeUpdate",s,c,l,u)},updated:function(s,c,l,u){Z._loadStyles(s,c,l),r("updated",s,c,l,u)},beforeUnmount:function(s,c,l,u){r("beforeUnmount",s,c,l,u)},unmounted:function(s,c,l,u){var d;(d=s.$instance)===null||d===void 0||(d=d.scopedStyleEl)===null||d===void 0||(d=d.value)===null||d===void 0||d.remove(),r("unmounted",s,c,l,u)}}},extend:function(){var e=Z._getMeta.apply(Z,arguments),n=Zi(e,2),r=n[0],o=n[1];return ie({extend:function(){var s=Z._getMeta.apply(Z,arguments),c=Zi(s,2),l=c[0],u=c[1];return Z.extend(l,ie(ie(ie({},o),o==null?void 0:o.methods),u))}},Z._extend(r,o))}},Lf=function(e){var n=e.dt;return`
|
|
384
|
+
.p-ink {
|
|
385
|
+
display: block;
|
|
386
|
+
position: absolute;
|
|
387
|
+
background: `.concat(n("ripple.background"),`;
|
|
388
|
+
border-radius: 100%;
|
|
389
|
+
transform: scale(0);
|
|
390
|
+
pointer-events: none;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.p-ink-active {
|
|
394
|
+
animation: ripple 0.4s linear;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@keyframes ripple {
|
|
398
|
+
100% {
|
|
399
|
+
opacity: 0;
|
|
400
|
+
transform: scale(2.5);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
`)},$f={root:"p-ink"},Rf=Ee.extend({name:"ripple-directive",theme:Lf,classes:$f}),Nf=Z.extend({style:Rf});function dn(t){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(t)}function Bf(t){return Uf(t)||Mf(t)||Ff(t)||Df()}function Df(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
404
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ff(t,e){if(t){if(typeof t=="string")return Hr(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hr(t,e):void 0}}function Mf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Uf(t){if(Array.isArray(t))return Hr(t)}function Hr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ts(t,e,n){return(e=Vf(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vf(t){var e=Hf(t,"string");return dn(e)=="symbol"?e:e+""}function Hf(t,e){if(dn(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(dn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jf=Nf.extend("ripple",{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute("data-pd-ripple",!0),this.$host.style.overflow="hidden",this.$host.style.position="relative"):(this.remove(this.$host),this.$host.removeAttribute("data-pd-ripple"))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener("mousedown",this.onMouseDown.bind(this))},createRipple:function(e){var n=Cd("span",ts(ts({role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,""),"p-bind",this.ptm("root")));e.appendChild(n),this.$el=n},remove:function(e){var n=this.getInk(e);n&&(this.$host.style.overflow="",this.$host.style.position="",this.unbindEvents(e),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(e){var n=this,r=e.currentTarget,o=this.getInk(r);if(!(!o||getComputedStyle(o,null).display==="none")){if(!this.isUnstyled()&&Ir(o,"p-ink-active"),o.setAttribute("data-p-ink-active","false"),!ki(o)&&!Ci(o)){var i=Math.max(kd(r),Td(r));o.style.height=i+"px",o.style.width=i+"px"}var s=Ad(r),c=e.pageX-s.left+document.body.scrollTop-Ci(o)/2,l=e.pageY-s.top+document.body.scrollLeft-ki(o)/2;o.style.top=l+"px",o.style.left=c+"px",!this.isUnstyled()&&Sd(o,"p-ink-active"),o.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){o&&(!n.isUnstyled()&&Ir(o,"p-ink-active"),o.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&Ir(e.currentTarget,"p-ink-active"),e.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(e){return e&&e.children?Bf(e.children).find(function(n){return en(n,"data-pc-name")==="ripple"}):void 0}}}),zf={name:"BasePanelMenu",extends:Hn,props:{model:{type:Array,default:null},expandedKeys:{type:Object,default:null},multiple:{type:Boolean,default:!1},tabindex:{type:Number,default:0}},style:Ef,provide:function(){return{$pcPanelMenu:this,$parentInstance:this}}},ns={name:"PanelMenuSub",hostName:"PanelMenu",extends:Hn,emits:["item-toggle","item-mousemove"],props:{panelId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:-1}},methods:{getItemId:function(e){return"".concat(this.panelId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,n,r){return e&&e.item?Fe(e.item[n],r):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,n,r){return this.ptm(e,{context:{item:n,index:r,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return le(e.items)},onItemClick:function(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.$emit("item-toggle",{processedItem:n,expanded:!this.isItemActive(n)})},onItemToggle:function(e){this.$emit("item-toggle",e)},onItemMouseMove:function(e,n){this.$emit("item-mousemove",{originalEvent:e,processedItem:n})},getAriaSetSize:function(){var e=this;return this.items.filter(function(n){return e.isItemVisible(n)&&!e.getItemProp(n,"separator")}).length},getAriaPosInset:function(e){var n=this;return e-this.items.slice(0,e).filter(function(r){return n.isItemVisible(r)&&n.getItemProp(r,"separator")}).length+1},getMenuItemProps:function(e,n){return{action:a.mergeProps({class:this.cx("itemLink"),tabindex:-1,"aria-hidden":!0},this.getPTOptions("itemLink",e,n)),icon:a.mergeProps({class:[this.cx("itemIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("itemIcon",e,n)),label:a.mergeProps({class:this.cx("itemLabel")},this.getPTOptions("itemLabel",e,n)),submenuicon:a.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,n))}}},components:{ChevronRightIcon:Ur,ChevronDownIcon:Mr},directives:{ripple:jf}},Kf=["tabindex"],Wf=["id","aria-label","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-focused","data-p-disabled"],qf=["onClick","onMousemove"],Gf=["href","target"];function Jf(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuSub",!0),c=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(t.cx("submenu")),tabindex:n.tabindex},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.items,function(l,u){return a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getItemKey(l)},[i.isItemVisible(l)&&!i.getItemProp(l,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:0,id:i.getItemId(l),class:[t.cx("item",{processedItem:l}),i.getItemProp(l,"class")],style:i.getItemProp(l,"style"),role:"treeitem","aria-label":i.getItemLabel(l),"aria-expanded":i.isItemGroup(l)?i.isItemActive(l):void 0,"aria-level":n.level+1,"aria-setsize":i.getAriaSetSize(),"aria-posinset":i.getAriaPosInset(u),ref_for:!0},i.getPTOptions("item",l,u),{"data-p-focused":i.isItemFocused(l),"data-p-disabled":i.isItemDisabled(l)}),[a.createElementVNode("div",a.mergeProps({class:t.cx("itemContent"),onClick:function(m){return i.onItemClick(m,l)},onMousemove:function(m){return i.onItemMouseMove(m,l)},ref_for:!0},i.getPTOptions("itemContent",l,u)),[n.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.item),{key:1,item:l.item,root:!1,active:i.isItemActive(l),hasSubmenu:i.isItemGroup(l),label:i.getItemLabel(l),props:i.getMenuItemProps(l,u)},null,8,["item","active","hasSubmenu","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:i.getItemProp(l,"url"),class:t.cx("itemLink"),target:i.getItemProp(l,"target"),tabindex:"-1","aria-hidden":"true",ref_for:!0},i.getPTOptions("itemLink",l,u)),[i.isItemGroup(l)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.templates.submenuicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.submenuicon),a.mergeProps({key:0,class:t.cx("submenuIcon"),active:i.isItemActive(l),ref_for:!0},i.getPTOptions("submenuIcon",l,u)),null,16,["class","active"])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.isItemActive(l)?"ChevronDownIcon":"ChevronRightIcon"),a.mergeProps({key:1,class:t.cx("submenuIcon"),ref_for:!0},i.getPTOptions("submenuIcon",l,u)),null,16,["class"]))],64)):a.createCommentVNode("",!0),n.templates.itemicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.itemicon),{key:1,item:l.item,class:a.normalizeClass(t.cx("itemIcon"))},null,8,["item","class"])):i.getItemProp(l,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:2,class:[t.cx("itemIcon"),i.getItemProp(l,"icon")],ref_for:!0},i.getPTOptions("itemIcon",l,u)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:t.cx("itemLabel"),ref_for:!0},i.getPTOptions("itemLabel",l,u)),a.toDisplayString(i.getItemLabel(l)),17)],16,Gf)),[[c]])],16,qf),a.createVNode(a.Transition,a.mergeProps({name:"p-toggleable-content",ref_for:!0},t.ptm("transition")),{default:a.withCtx(function(){return[a.withDirectives(a.createElementVNode("div",a.mergeProps({class:t.cx("contentContainer"),ref_for:!0},t.ptm("contentContainer")),[i.isItemVisible(l)&&i.isItemGroup(l)?(a.openBlock(),a.createBlock(s,a.mergeProps({key:0,id:i.getItemId(l)+"_list",role:"group",panelId:n.panelId,focusedItemId:n.focusedItemId,items:l.items,level:n.level+1,templates:n.templates,activeItemPath:n.activeItemPath,onItemToggle:i.onItemToggle,onItemMousemove:e[0]||(e[0]=function(d){return t.$emit("item-mousemove",d)}),pt:t.pt,unstyled:t.unstyled,ref_for:!0},t.ptm("submenu")),null,16,["id","panelId","focusedItemId","items","level","templates","activeItemPath","onItemToggle","pt","unstyled"])):a.createCommentVNode("",!0)],16),[[a.vShow,i.isItemActive(l)]])]}),_:2},1040)],16,Wf)):a.createCommentVNode("",!0),i.isItemVisible(l)&&i.getItemProp(l,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:1,style:i.getItemProp(l,"style"),class:[t.cx("separator"),i.getItemProp(l,"class")],role:"separator",ref_for:!0},t.ptm("separator")),null,16)):a.createCommentVNode("",!0)],64)}),128))],10,Kf)}ns.render=Jf;function Yf(t,e){return em(t)||Qf(t,e)||Zf(t,e)||Xf()}function Xf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
405
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zf(t,e){if(t){if(typeof t=="string")return rs(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rs(t,e):void 0}}function rs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qf(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,c=[],l=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);l=!0);}catch(d){u=!0,o=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return c}}function em(t){if(Array.isArray(t))return t}var os={name:"PanelMenuList",hostName:"PanelMenu",extends:Hn,emits:["item-toggle","header-focus"],props:{panelId:{type:String,default:null},items:{type:Array,default:null},templates:{type:Object,default:null},expandedKeys:{type:Object,default:null}},searchTimeout:null,searchValue:null,data:function(){return{focused:!1,focusedItem:null,activeItemPath:[]}},watch:{expandedKeys:function(e){this.autoUpdateActiveItemPath(e)}},mounted:function(){this.autoUpdateActiveItemPath(this.expandedKeys)},methods:{getItemProp:function(e,n){return e&&e.item?Fe(e.item[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.parentKey})},isItemGroup:function(e){return le(e.items)},onFocus:function(e){this.focused=!0,this.focusedItem=this.focusedItem||(this.isElementInPanel(e,e.relatedTarget)?this.findFirstItem():this.findLastItem())},onBlur:function(){this.focused=!1,this.focusedItem=null,this.searchValue=""},onKeyDown:function(e){var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&Od(e.key)&&this.searchItems(e,e.key);break}},onArrowDownKey:function(e){var n=le(this.focusedItem)?this.findNextItem(this.focusedItem):this.findFirstItem();this.changeFocusedItem({originalEvent:e,processedItem:n,focusOnNext:!0}),e.preventDefault()},onArrowUpKey:function(e){var n=le(this.focusedItem)?this.findPrevItem(this.focusedItem):this.findLastItem();this.changeFocusedItem({originalEvent:e,processedItem:n,selfCheck:!0}),e.preventDefault()},onArrowLeftKey:function(e){var n=this;if(le(this.focusedItem)){var r=this.activeItemPath.some(function(o){return o.key===n.focusedItem.key});r?this.activeItemPath=this.activeItemPath.filter(function(o){return o.key!==n.focusedItem.key}):this.focusedItem=le(this.focusedItem.parent)?this.focusedItem.parent:this.focusedItem,e.preventDefault()}},onArrowRightKey:function(e){var n=this;if(le(this.focusedItem)){var r=this.isItemGroup(this.focusedItem);if(r){var o=this.activeItemPath.some(function(i){return i.key===n.focusedItem.key});o?this.onArrowDownKey(e):(this.activeItemPath=this.activeItemPath.filter(function(i){return i.parentKey!==n.focusedItem.parentKey}),this.activeItemPath.push(this.focusedItem))}e.preventDefault()}},onHomeKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),e.preventDefault()},onEndKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),e.preventDefault()},onEnterKey:function(e){if(le(this.focusedItem)){var n=qe(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]')),r=n&&(qe(n,'[data-pc-section="itemlink"]')||qe(n,"a,button"));r?r.click():n&&n.click()}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onItemToggle:function(e){var n=e.processedItem,r=e.expanded;this.expandedKeys?this.$emit("item-toggle",{item:n.item,expanded:r}):(this.activeItemPath=this.activeItemPath.filter(function(o){return o.parentKey!==n.parentKey}),r&&this.activeItemPath.push(n)),this.focusedItem=n,Qt(this.$el)},onItemMouseMove:function(e){this.focused&&(this.focusedItem=e.processedItem)},isElementInPanel:function(e,n){var r=e.currentTarget.closest('[data-pc-section="panel"]');return r&&r.contains(n)},isItemMatched:function(e){var n;return this.isValidItem(e)&&((n=this.getItemLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)))},isVisibleItem:function(e){return!!e&&(e.level===0||this.isItemActive(e))&&this.isItemVisible(e)},isValidItem:function(e){return!!e&&!this.isItemDisabled(e)&&!this.getItemProp(e,"separator")},findFirstItem:function(){var e=this;return this.visibleItems.find(function(n){return e.isValidItem(n)})},findLastItem:function(){var e=this;return Ai(this.visibleItems,function(n){return e.isValidItem(n)})},findNextItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r<this.visibleItems.length-1?this.visibleItems.slice(r+1).find(function(i){return n.isValidItem(i)}):void 0;return o||e},findPrevItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r>0?Ai(this.visibleItems.slice(0,r),function(i){return n.isValidItem(i)}):void 0;return o||e},searchItems:function(e,n){var r=this;this.searchValue=(this.searchValue||"")+n;var o=null,i=!1;if(le(this.focusedItem)){var s=this.visibleItems.findIndex(function(c){return c.key===r.focusedItem.key});o=this.visibleItems.slice(s).find(function(c){return r.isItemMatched(c)}),o=bt(o)?this.visibleItems.slice(0,s).find(function(c){return r.isItemMatched(c)}):o}else o=this.visibleItems.find(function(c){return r.isItemMatched(c)});return le(o)&&(i=!0),bt(o)&&bt(this.focusedItem)&&(o=this.findFirstItem()),le(o)&&this.changeFocusedItem({originalEvent:e,processedItem:o,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){r.searchValue="",r.searchTimeout=null},500),i},changeFocusedItem:function(e){var n=e.originalEvent,r=e.processedItem,o=e.focusOnNext,i=e.selfCheck,s=e.allowHeaderFocus,c=s===void 0?!0:s;le(this.focusedItem)&&this.focusedItem.key!==r.key?(this.focusedItem=r,this.scrollInView()):c&&this.$emit("header-focus",{originalEvent:n,focusOnNext:o,selfCheck:i})},scrollInView:function(){var e=qe(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]'));e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateActiveItemPath:function(e){var n=this;this.activeItemPath=Object.entries(e||{}).reduce(function(r,o){var i=Yf(o,2),s=i[0],c=i[1];if(c){var l=n.findProcessedItemByItemKey(s);l&&r.push(l)}return r},[])},findProcessedItemByItemKey:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n=n||r===0&&this.processedItems,!n)return null;for(var o=0;o<n.length;o++){var i=n[o];if(this.getItemProp(i,"key")===e)return i;var s=this.findProcessedItemByItemKey(e,i.items,r+1);if(s)return s}},createProcessedItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",s=[];return e&&e.forEach(function(c,l){var u=(i!==""?i+"_":"")+l,d={item:c,index:l,level:r,key:u,parent:o,parentKey:i};d.items=n.createProcessedItems(c.items,r+1,d,u),s.push(d)}),s},flatItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&e.forEach(function(o){n.isVisibleItem(o)&&(r.push(o),n.flatItems(o.items,r))}),r}},computed:{processedItems:function(){return this.createProcessedItems(this.items||[])},visibleItems:function(){return this.flatItems(this.processedItems)},focusedItemId:function(){return le(this.focusedItem)?"".concat(this.panelId,"_").concat(this.focusedItem.key):null}},components:{PanelMenuSub:ns}};function tm(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuSub");return a.openBlock(),a.createBlock(s,a.mergeProps({id:n.panelId+"_list",class:t.cx("rootList"),role:"tree",tabindex:-1,"aria-activedescendant":o.focused?i.focusedItemId:void 0,panelId:n.panelId,focusedItemId:o.focused?i.focusedItemId:void 0,items:i.processedItems,templates:n.templates,activeItemPath:o.activeItemPath,onFocus:i.onFocus,onBlur:i.onBlur,onKeydown:i.onKeyDown,onItemToggle:i.onItemToggle,onItemMousemove:i.onItemMouseMove,pt:t.pt,unstyled:t.unstyled},t.ptm("rootList")),null,16,["id","class","aria-activedescendant","panelId","focusedItemId","items","templates","activeItemPath","onFocus","onBlur","onKeydown","onItemToggle","onItemMousemove","pt","unstyled"])}os.render=tm;function fn(t){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(t)}function is(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function nm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?is(Object(n),!0).forEach(function(r){rm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):is(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rm(t,e,n){return(e=om(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function om(t){var e=im(t,"string");return fn(e)=="symbol"?e:e+""}function im(t,e){if(fn(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(fn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jr={name:"PanelMenu",extends:zf,inheritAttrs:!1,emits:["update:expandedKeys","panel-open","panel-close"],data:function(){return{id:this.$attrs.id,activeItem:null,activeItems:[]}},watch:{"$attrs.id":function(e){this.id=e||Fn()}},mounted:function(){this.id=this.id||Fn()},methods:{getItemProp:function(e,n){return e?Fe(e[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,n,r){return this.ptm(e,{context:{index:r,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(e){return this.expandedKeys?this.expandedKeys[this.getItemProp(e,"key")]:this.multiple?this.activeItems.some(function(n){return Lt(e,n)}):Lt(e,this.activeItem)},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return Lt(e,this.activeItem)},getPanelId:function(e){return"".concat(this.id,"_").concat(e)},getPanelKey:function(e){return this.getPanelId(e)},getHeaderId:function(e){return"".concat(this.getPanelId(e),"_header")},getContentId:function(e){return"".concat(this.getPanelId(e),"_content")},onHeaderClick:function(e,n){if(this.isItemDisabled(n)){e.preventDefault();return}n.command&&n.command({originalEvent:e,item:n}),this.changeActiveItem(e,n),Qt(e.currentTarget)},onHeaderKeyDown:function(e,n){switch(e.code){case"ArrowDown":this.onHeaderArrowDownKey(e);break;case"ArrowUp":this.onHeaderArrowUpKey(e);break;case"Home":this.onHeaderHomeKey(e);break;case"End":this.onHeaderEndKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onHeaderEnterKey(e,n);break}},onHeaderArrowDownKey:function(e){var n=en(e.currentTarget,"data-p-active")===!0?qe(e.currentTarget.nextElementSibling,'[data-pc-section="rootlist"]'):null;n?Qt(n):this.updateFocusedHeader({originalEvent:e,focusOnNext:!0}),e.preventDefault()},onHeaderArrowUpKey:function(e){var n=this.findPrevHeader(e.currentTarget.parentElement)||this.findLastHeader(),r=en(n,"data-p-active")===!0?qe(n.nextElementSibling,'[data-pc-section="rootlist"]'):null;r?Qt(r):this.updateFocusedHeader({originalEvent:e,focusOnNext:!1}),e.preventDefault()},onHeaderHomeKey:function(e){this.changeFocusedHeader(e,this.findFirstHeader()),e.preventDefault()},onHeaderEndKey:function(e){this.changeFocusedHeader(e,this.findLastHeader()),e.preventDefault()},onHeaderEnterKey:function(e,n){var r=qe(e.currentTarget,'[data-pc-section="headerlink"]');r?r.click():this.onHeaderClick(e,n),e.preventDefault()},findNextHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.nextElementSibling,o=qe(r,'[data-pc-section="header"]');return o?en(o,"data-p-disabled")?this.findNextHeader(o.parentElement):o:null},findPrevHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.previousElementSibling,o=qe(r,'[data-pc-section="header"]');return o?en(o,"data-p-disabled")?this.findPrevHeader(o.parentElement):o:null},findFirstHeader:function(){return this.findNextHeader(this.$el.firstElementChild,!0)},findLastHeader:function(){return this.findPrevHeader(this.$el.lastElementChild,!0)},updateFocusedHeader:function(e){var n=e.originalEvent,r=e.focusOnNext,o=e.selfCheck,i=n.currentTarget.closest('[data-pc-section="panel"]'),s=o?qe(i,'[data-pc-section="header"]'):r?this.findNextHeader(i):this.findPrevHeader(i);s?this.changeFocusedHeader(n,s):r?this.onHeaderHomeKey(n):this.onHeaderEndKey(n)},changeActiveItem:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!this.isItemDisabled(n)){var o=this.isItemActive(n),i=o?"panel-close":"panel-open";this.activeItem=r?n:this.activeItem&&Lt(n,this.activeItem)?null:n,this.multiple&&(this.activeItems.some(function(s){return Lt(n,s)})?this.activeItems=this.activeItems.filter(function(s){return!Lt(n,s)}):this.activeItems.push(n)),this.changeExpandedKeys({item:n,expanded:!o}),this.$emit(i,{originalEvent:e,item:n})}},changeExpandedKeys:function(e){var n=e.item,r=e.expanded,o=r===void 0?!1:r;if(this.expandedKeys){var i=nm({},this.expandedKeys);o?i[n.key]=!0:delete i[n.key],this.$emit("update:expandedKeys",i)}},changeFocusedHeader:function(e,n){n&&Qt(n)},getMenuItemProps:function(e,n){return{icon:a.mergeProps({class:[this.cx("headerIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("headerIcon",e,n)),label:a.mergeProps({class:this.cx("headerLabel")},this.getPTOptions("headerLabel",e,n))}}},components:{PanelMenuList:os,ChevronRightIcon:Ur,ChevronDownIcon:Mr}},sm=["id"],am=["id","tabindex","aria-label","aria-expanded","aria-controls","aria-disabled","onClick","onKeydown","data-p-active","data-p-disabled"],lm=["href"],cm=["id","aria-labelledby"];function um(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuList");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:o.id,class:t.cx("root")},t.ptmi("root")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.model,function(c,l){return a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getPanelKey(l)},[i.isItemVisible(c)?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,style:i.getItemProp(c,"style"),class:[t.cx("panel"),i.getItemProp(c,"class")],ref_for:!0},t.ptm("panel")),[a.createElementVNode("div",a.mergeProps({id:i.getHeaderId(l),class:[t.cx("header",{item:c}),i.getItemProp(c,"headerClass")],tabindex:i.isItemDisabled(c)?-1:t.tabindex,role:"button","aria-label":i.getItemLabel(c),"aria-expanded":i.isItemActive(c),"aria-controls":i.getContentId(l),"aria-disabled":i.isItemDisabled(c),onClick:function(d){return i.onHeaderClick(d,c)},onKeydown:function(d){return i.onHeaderKeyDown(d,c)},ref_for:!0},i.getPTOptions("header",c,l),{"data-p-active":i.isItemActive(c),"data-p-disabled":i.isItemDisabled(c)}),[a.createElementVNode("div",a.mergeProps({class:t.cx("headerContent"),ref_for:!0},i.getPTOptions("headerContent",c,l)),[t.$slots.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.item),{key:1,item:c,root:!0,active:i.isItemActive(c),hasSubmenu:i.getItemProp(c,"items"),label:i.getItemLabel(c),props:i.getMenuItemProps(c,l)},null,8,["item","active","hasSubmenu","label","props"])):(a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:i.getItemProp(c,"url"),class:t.cx("headerLink"),tabindex:-1,ref_for:!0},i.getPTOptions("headerLink",c,l)),[i.getItemProp(c,"items")?a.renderSlot(t.$slots,"submenuicon",{key:0,active:i.isItemActive(c)},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.isItemActive(c)?"ChevronDownIcon":"ChevronRightIcon"),a.mergeProps({class:t.cx("submenuIcon"),ref_for:!0},i.getPTOptions("submenuIcon",c,l)),null,16,["class"]))]}):a.createCommentVNode("",!0),t.$slots.headericon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.headericon),{key:1,item:c,class:a.normalizeClass([t.cx("headerIcon"),i.getItemProp(c,"icon")])},null,8,["item","class"])):i.getItemProp(c,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:2,class:[t.cx("headerIcon"),i.getItemProp(c,"icon")],ref_for:!0},i.getPTOptions("headerIcon",c,l)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:t.cx("headerLabel"),ref_for:!0},i.getPTOptions("headerLabel",c,l)),a.toDisplayString(i.getItemLabel(c)),17)],16,lm))],16)],16,am),a.createVNode(a.Transition,a.mergeProps({name:"p-toggleable-content",ref_for:!0},t.ptm("transition")),{default:a.withCtx(function(){return[a.withDirectives(a.createElementVNode("div",a.mergeProps({id:i.getContentId(l),class:t.cx("contentContainer"),role:"region","aria-labelledby":i.getHeaderId(l),ref_for:!0},t.ptm("contentContainer")),[i.getItemProp(c,"items")?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("content"),ref_for:!0},t.ptm("content")),[a.createVNode(s,{panelId:i.getPanelId(l),items:i.getItemProp(c,"items"),templates:t.$slots,expandedKeys:t.expandedKeys,onItemToggle:i.changeExpandedKeys,onHeaderFocus:i.updateFocusedHeader,pt:t.pt,unstyled:t.unstyled},null,8,["panelId","items","templates","expandedKeys","onItemToggle","onHeaderFocus","pt","unstyled"])],16)):a.createCommentVNode("",!0)],16,cm),[[a.vShow,i.isItemActive(c)]])]}),_:2},1040)],16)):a.createCommentVNode("",!0)],64)}),128))],16,sm)}jr.render=um;const dm=["data-active","href","onClick"],fm={class:"sf-ml-2"},mm=["href","target"],pm={class:"sf-ml-2"},hm=a.createElementVNode("div",{class:"sf-flex-grow-1"},null,-1),gm=a.defineComponent({__name:"PanelMenu",props:{items:{}},setup(t){const e=t,n=Ct.useRoute(),r=a.computed(()=>e.items);o(r.value);function o(c,l=void 0){c.forEach(u=>{l&&(u.parentKey=l),u.items&&o(u.items,u.key)})}const i=a.ref({});function s(c,l,u=void 0){c.forEach(d=>{d.routeName&&d.routeName===l&&u&&(i.value[u]=u===d.parentKey),d.items&&s(d.items,l,d.key)})}return a.watch(()=>n.name,c=>{c&&s(r.value,c.toString())}),(c,l)=>{const u=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(a.unref(jr),{model:r.value,expandedKeys:i.value,"onUpdate:expandedKeys":l[0]||(l[0]=d=>i.value=d),multiple:!0,class:a.normalizeClass("sf-p-2")},{item:a.withCtx(({item:d,active:m})=>[d.routeName?(a.openBlock(),a.createBlock(u,{key:0,to:{name:d.routeName},custom:""},{default:a.withCtx(({href:g,navigate:_,isActive:w})=>[a.createElementVNode("a",{class:"sf-flex sf-align-items-center sf-px-3 sf-py-2 sf-ripple","data-active":w,href:g,onClick:_},[a.createVNode(at,{icon:d.icon??"chevron_right"},null,8,["icon"]),a.createElementVNode("span",fm,a.toDisplayString(d.label),1)],8,dm)]),_:2},1032,["to"])):(a.openBlock(),a.createElementBlock("a",{key:1,class:"sf-flex sf-align-items-center sf-pl-3 sf-py-2",href:d.url,target:d.target},[d.icon?(a.openBlock(),a.createBlock(at,{key:0,icon:d.icon},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",pm,a.toDisplayString(d.label),1),hm,a.createVNode(at,{icon:m?"expand_less":"expand_more"},null,8,["icon"])],8,mm))]),_:1},8,["model","expandedKeys"])}}}),ym=t=>(a.pushScopeId("data-v-dc5c4c88"),t=t(),a.popScopeId(),t),bm={class:"panel-menu-wrapper"},vm=["data-active","href","onClick"],wm={class:"material-symbols-outlined sf-mr-3"},_m={key:1,class:"item-menu sf-ripple"},Sm={key:0,class:"material-symbols-outlined sf-mr-3"},km=ym(()=>a.createElementVNode("div",{class:"sf-flex-grow-1"},null,-1)),Cm=Sn(a.defineComponent({__name:"NavMenu",props:{items:{}},setup(t){const e=t,n=_n();function r(o,i){o.preventDefault();const c=o.target.closest(".panel-menu-wrapper");c&&c.clientWidth+10>document.body.clientWidth&&n.Close(),i()}return(o,i)=>{const s=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",bm,[a.createVNode(a.unref(jr),{model:e.items,unstyled:!0},{item:a.withCtx(({item:c,active:l})=>[c.href?(a.openBlock(),a.createBlock(s,{key:0,to:{path:c.href,params:c.params??{},query:c.query??{}},custom:""},{default:a.withCtx(({navigate:u,isActive:d})=>[a.createElementVNode("a",{class:"item-menu sf-ripple","data-active":d,href:c.href,onClick:m=>r(m,u)},[a.createElementVNode("span",wm,a.toDisplayString(c.icon??"chevron_right"),1),a.createElementVNode("span",null,a.toDisplayString(c.text),1)],8,vm)]),_:2},1032,["to"])):(a.openBlock(),a.createElementBlock("a",_m,[c.icon?(a.openBlock(),a.createElementBlock("span",Sm,a.toDisplayString(c.icon),1)):a.createCommentVNode("",!0),a.createElementVNode("span",null,a.toDisplayString(c.text),1),km,a.createElementVNode("span",{class:a.normalizeClass(["material-symbols-outlined arrow",{"--expand":l}])}," chevron_right ",2)]))]),_:1},8,["model"])])}}}),[["__scopeId","data-v-dc5c4c88"]]);var Em=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Am(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Tm(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 jn={};jn.byteLength=Im,jn.toByteArray=Lm,jn.fromByteArray=Nm;for(var Qe=[],He=[],xm=typeof Uint8Array<"u"?Uint8Array:Array,zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$t=0,Pm=zr.length;$t<Pm;++$t)Qe[$t]=zr[$t],He[zr.charCodeAt($t)]=$t;He[45]=62,He[95]=63;function ss(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 Im(t){var e=ss(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Om(t,e,n){return(e+n)*3/4-n}function Lm(t){var e,n=ss(t),r=n[0],o=n[1],i=new xm(Om(t,r,o)),s=0,c=o>0?r-4:r,l;for(l=0;l<c;l+=4)e=He[t.charCodeAt(l)]<<18|He[t.charCodeAt(l+1)]<<12|He[t.charCodeAt(l+2)]<<6|He[t.charCodeAt(l+3)],i[s++]=e>>16&255,i[s++]=e>>8&255,i[s++]=e&255;return o===2&&(e=He[t.charCodeAt(l)]<<2|He[t.charCodeAt(l+1)]>>4,i[s++]=e&255),o===1&&(e=He[t.charCodeAt(l)]<<10|He[t.charCodeAt(l+1)]<<4|He[t.charCodeAt(l+2)]>>2,i[s++]=e>>8&255,i[s++]=e&255),i}function $m(t){return Qe[t>>18&63]+Qe[t>>12&63]+Qe[t>>6&63]+Qe[t&63]}function Rm(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($m(r));return o.join("")}function Nm(t){for(var e,n=t.length,r=n%3,o=[],i=16383,s=0,c=n-r;s<c;s+=i)o.push(Rm(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 as={exports:{}};const ls=Tm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
|
|
144
406
|
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
145
407
|
*
|
|
146
408
|
* @version 0.10.1
|
|
147
409
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
148
410
|
* @copyright Chen, Yi-Cyuan 2014-2023
|
|
149
411
|
* @license MIT
|
|
150
|
-
*/(function(t){(function(){var e="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",i=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;i?r=vf:o&&(r=self);var s=!r.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,c=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),d=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],v=["hex","array","digest","arrayBuffer"],w=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(y){return Object.prototype.toString.call(y)==="[object Array]"}),c&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(y){return typeof y=="object"&&y.buffer&&y.buffer.constructor===ArrayBuffer});var A=function(y,L){return function(j){return new V(L,!0).update(j)[y]()}},x=function(y){var L=A("hex",y);i&&(L=C(L,y)),L.create=function(){return new V(y)},L.update=function(B){return L.create().update(B)};for(var j=0;j<v.length;++j){var F=v[j];L[F]=A(F,y)}return L},C=function(y,L){var j=ki,F=ki.Buffer,B=L?"sha224":"sha256",O;F.from&&!r.JS_SHA256_NO_BUFFER_FROM?O=F.from:O=function(_){return new F(_)};var W=function(_){if(typeof _=="string")return j.createHash(B).update(_,"utf8").digest("hex");if(_==null)throw new Error(e);return _.constructor===ArrayBuffer&&(_=new Uint8Array(_)),Array.isArray(_)||ArrayBuffer.isView(_)||_.constructor===F?j.createHash(B).update(O(_)).digest("hex"):y(_)};return W},$=function(y,L){return function(j,F){return new pe(j,L,!0).update(F)[y]()}},q=function(y){var L=$("hex",y);L.create=function(B){return new pe(B,y)},L.update=function(B,O){return L.create(B).update(O)};for(var j=0;j<v.length;++j){var F=v[j];L[F]=$(F,y)}return L};function V(y,L){L?(w[0]=w[16]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=0,this.blocks=w):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=y}V.prototype.update=function(y){if(!this.finalized){var L,j=typeof y;if(j!=="string"){if(j==="object"){if(y===null)throw new Error(e);if(c&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!c||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);L=!0}for(var F,B=0,O,W=y.length,_=this.blocks;B<W;){if(this.hashed&&(this.hashed=!1,_[0]=this.block,_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0),L)for(O=this.start;B<W&&O<64;++B)_[O>>2]|=y[B]<<f[O++&3];else for(O=this.start;B<W&&O<64;++B)F=y.charCodeAt(B),F<128?_[O>>2]|=F<<f[O++&3]:F<2048?(_[O>>2]|=(192|F>>6)<<f[O++&3],_[O>>2]|=(128|F&63)<<f[O++&3]):F<55296||F>=57344?(_[O>>2]|=(224|F>>12)<<f[O++&3],_[O>>2]|=(128|F>>6&63)<<f[O++&3],_[O>>2]|=(128|F&63)<<f[O++&3]):(F=65536+((F&1023)<<10|y.charCodeAt(++B)&1023),_[O>>2]|=(240|F>>18)<<f[O++&3],_[O>>2]|=(128|F>>12&63)<<f[O++&3],_[O>>2]|=(128|F>>6&63)<<f[O++&3],_[O>>2]|=(128|F&63)<<f[O++&3]);this.lastByteIndex=O,this.bytes+=O-this.start,O>=64?(this.block=_[16],this.start=O-64,this.hash(),this.hashed=!0):this.start=O}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},V.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var y=this.blocks,L=this.lastByteIndex;y[16]=this.block,y[L>>2]|=d[L&3],this.block=y[16],L>=56&&(this.hashed||this.hash(),y[0]=this.block,y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0),y[14]=this.hBytes<<3|this.bytes>>>29,y[15]=this.bytes<<3,this.hash()}},V.prototype.hash=function(){var y=this.h0,L=this.h1,j=this.h2,F=this.h3,B=this.h4,O=this.h5,W=this.h6,_=this.h7,G=this.blocks,ie,ce,fe,Ce,K,xe,u,h,E,I,S;for(ie=16;ie<64;++ie)K=G[ie-15],ce=(K>>>7|K<<25)^(K>>>18|K<<14)^K>>>3,K=G[ie-2],fe=(K>>>17|K<<15)^(K>>>19|K<<13)^K>>>10,G[ie]=G[ie-16]+ce+G[ie-7]+fe<<0;for(S=L&j,ie=0;ie<64;ie+=4)this.first?(this.is224?(h=300032,K=G[0]-1413257819,_=K-150054599<<0,F=K+24177077<<0):(h=704751109,K=G[0]-210244248,_=K-1521486534<<0,F=K+143694565<<0),this.first=!1):(ce=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),fe=(B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7),h=y&L,Ce=h^y&j^S,u=B&O^~B&W,K=_+fe+u+p[ie]+G[ie],xe=ce+Ce,_=F+K<<0,F=K+xe<<0),ce=(F>>>2|F<<30)^(F>>>13|F<<19)^(F>>>22|F<<10),fe=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),E=F&y,Ce=E^F&L^h,u=_&B^~_&O,K=W+fe+u+p[ie+1]+G[ie+1],xe=ce+Ce,W=j+K<<0,j=K+xe<<0,ce=(j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10),fe=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),I=j&F,Ce=I^j&y^E,u=W&_^~W&B,K=O+fe+u+p[ie+2]+G[ie+2],xe=ce+Ce,O=L+K<<0,L=K+xe<<0,ce=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),fe=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),S=L&j,Ce=S^L&F^I,u=O&W^~O&_,K=B+fe+u+p[ie+3]+G[ie+3],xe=ce+Ce,B=y+K<<0,y=K+xe<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+y<<0,this.h1=this.h1+L<<0,this.h2=this.h2+j<<0,this.h3=this.h3+F<<0,this.h4=this.h4+B<<0,this.h5=this.h5+O<<0,this.h6=this.h6+W<<0,this.h7=this.h7+_<<0},V.prototype.hex=function(){this.finalize();var y=this.h0,L=this.h1,j=this.h2,F=this.h3,B=this.h4,O=this.h5,W=this.h6,_=this.h7,G=l[y>>28&15]+l[y>>24&15]+l[y>>20&15]+l[y>>16&15]+l[y>>12&15]+l[y>>8&15]+l[y>>4&15]+l[y&15]+l[L>>28&15]+l[L>>24&15]+l[L>>20&15]+l[L>>16&15]+l[L>>12&15]+l[L>>8&15]+l[L>>4&15]+l[L&15]+l[j>>28&15]+l[j>>24&15]+l[j>>20&15]+l[j>>16&15]+l[j>>12&15]+l[j>>8&15]+l[j>>4&15]+l[j&15]+l[F>>28&15]+l[F>>24&15]+l[F>>20&15]+l[F>>16&15]+l[F>>12&15]+l[F>>8&15]+l[F>>4&15]+l[F&15]+l[B>>28&15]+l[B>>24&15]+l[B>>20&15]+l[B>>16&15]+l[B>>12&15]+l[B>>8&15]+l[B>>4&15]+l[B&15]+l[O>>28&15]+l[O>>24&15]+l[O>>20&15]+l[O>>16&15]+l[O>>12&15]+l[O>>8&15]+l[O>>4&15]+l[O&15]+l[W>>28&15]+l[W>>24&15]+l[W>>20&15]+l[W>>16&15]+l[W>>12&15]+l[W>>8&15]+l[W>>4&15]+l[W&15];return this.is224||(G+=l[_>>28&15]+l[_>>24&15]+l[_>>20&15]+l[_>>16&15]+l[_>>12&15]+l[_>>8&15]+l[_>>4&15]+l[_&15]),G},V.prototype.toString=V.prototype.hex,V.prototype.digest=function(){this.finalize();var y=this.h0,L=this.h1,j=this.h2,F=this.h3,B=this.h4,O=this.h5,W=this.h6,_=this.h7,G=[y>>24&255,y>>16&255,y>>8&255,y&255,L>>24&255,L>>16&255,L>>8&255,L&255,j>>24&255,j>>16&255,j>>8&255,j&255,F>>24&255,F>>16&255,F>>8&255,F&255,B>>24&255,B>>16&255,B>>8&255,B&255,O>>24&255,O>>16&255,O>>8&255,O&255,W>>24&255,W>>16&255,W>>8&255,W&255];return this.is224||G.push(_>>24&255,_>>16&255,_>>8&255,_&255),G},V.prototype.array=V.prototype.digest,V.prototype.arrayBuffer=function(){this.finalize();var y=new ArrayBuffer(this.is224?28:32),L=new DataView(y);return L.setUint32(0,this.h0),L.setUint32(4,this.h1),L.setUint32(8,this.h2),L.setUint32(12,this.h3),L.setUint32(16,this.h4),L.setUint32(20,this.h5),L.setUint32(24,this.h6),this.is224||L.setUint32(28,this.h7),y};function pe(y,L,j){var F,B=typeof y;if(B==="string"){var O=[],W=y.length,_=0,G;for(F=0;F<W;++F)G=y.charCodeAt(F),G<128?O[_++]=G:G<2048?(O[_++]=192|G>>6,O[_++]=128|G&63):G<55296||G>=57344?(O[_++]=224|G>>12,O[_++]=128|G>>6&63,O[_++]=128|G&63):(G=65536+((G&1023)<<10|y.charCodeAt(++F)&1023),O[_++]=240|G>>18,O[_++]=128|G>>12&63,O[_++]=128|G>>6&63,O[_++]=128|G&63);y=O}else if(B==="object"){if(y===null)throw new Error(e);if(c&&y.constructor===ArrayBuffer)y=new Uint8Array(y);else if(!Array.isArray(y)&&(!c||!ArrayBuffer.isView(y)))throw new Error(e)}else throw new Error(e);y.length>64&&(y=new V(L,!0).update(y).array());var ie=[],ce=[];for(F=0;F<64;++F){var fe=y[F]||0;ie[F]=92^fe,ce[F]=54^fe}V.call(this,L,j),this.update(ce),this.oKeyPad=ie,this.inner=!0,this.sharedMemory=j}pe.prototype=new V,pe.prototype.finalize=function(){if(V.prototype.finalize.call(this),this.inner){this.inner=!1;var y=this.array();V.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(y),V.prototype.finalize.call(this)}};var de=x();de.sha256=de,de.sha224=x(!0),de.sha256.hmac=q(),de.sha224.hmac=q(!0),s?t.exports=de:(r.sha256=de.sha256,r.sha224=de.sha224)})()})(_i);var Tf=_i.exports;const Of=wf(Tf);class Gt extends Error{}Gt.prototype.name="InvalidTokenError";function Lf(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Bf(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Lf(e)}catch{return atob(e)}}function Er(t,e){if(typeof t!="string")throw new Gt("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new Gt(`Invalid token specified: missing part #${n+1}`);let o;try{o=Bf(r)}catch(i){throw new Gt(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(o)}catch(i){throw new Gt(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function xi(t){if(!(this instanceof xi))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,r=[],o,i={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),c=0;c<s.length;c++)(s[c].src.indexOf("keycloak.js")!==-1||s[c].src.indexOf("keycloak.min.js")!==-1)&&s[c].src.indexOf("version=")!==-1&&(e.iframeVersion=s[c].src.substring(s[c].src.indexOf("version=")+8).split("&")[0]);var l=!0,d=xe(console.info),f=xe(console.warn);e.init=function(u){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,o=K();var h=["default","cordova","cordova-native"];if(u&&h.indexOf(u.adapter)>-1?n=ce(u.adapter):u&&typeof u.adapter=="object"?n=u.adapter:window.Cordova||window.cordova?n=ce("cordova"):n=ce(),u){if(typeof u.useNonce<"u"&&(l=u.useNonce),typeof u.checkLoginIframe<"u"&&(i.enable=u.checkLoginIframe),u.checkLoginIframeInterval&&(i.interval=u.checkLoginIframeInterval),u.onLoad==="login-required"&&(e.loginRequired=!0),u.responseMode)if(u.responseMode==="query"||u.responseMode==="fragment")e.responseMode=u.responseMode;else throw"Invalid value for responseMode";if(u.flow){switch(u.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=u.flow}if(u.timeSkew!=null&&(e.timeSkew=u.timeSkew),u.redirectUri&&(e.redirectUri=u.redirectUri),u.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=u.silentCheckSsoRedirectUri),typeof u.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=u.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,u.pkceMethod){if(u.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=u.pkceMethod}typeof u.enableLogging=="boolean"?e.enableLogging=u.enableLogging:e.enableLogging=!1,typeof u.scope=="string"&&(e.scope=u.scope),typeof u.acrValues=="string"&&(e.acrValues=u.acrValues),typeof u.messageReceiveTimeout=="number"&&u.messageReceiveTimeout>0?e.messageReceiveTimeout=u.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var E=B(),I=B();I.promise.then(function(){e.onReady&&e.onReady(e.authenticated),E.setSuccess(e.authenticated)}).catch(function(M){E.setError(M)});var S=V();function R(){var M=function(ee){ee||(z.prompt="none"),u&&u.locale&&(z.locale=u.locale),e.login(z).then(function(){I.setSuccess()}).catch(function(Ie){I.setError(Ie)})},N=function(){var ee=document.createElement("iframe"),Ie=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});ee.setAttribute("src",Ie),ee.setAttribute("sandbox","allow-scripts allow-same-origin"),ee.setAttribute("title","keycloak-silent-check-sso"),ee.style.display="none",document.body.appendChild(ee);var Ae=function(ge){if(!(ge.origin!==window.location.origin||ee.contentWindow!==ge.source)){var qe=L(ge.data);q(qe,I),document.body.removeChild(ee),window.removeEventListener("message",Ae)}};window.addEventListener("message",Ae)},z={};switch(u.onLoad){case"check-sso":i.enable?W().then(function(){G().then(function(ee){ee?I.setSuccess():e.silentCheckSsoRedirectUri?N():M(!1)}).catch(function(ee){I.setError(ee)})}):e.silentCheckSsoRedirectUri?N():M(!1);break;case"login-required":M(!0);break;default:throw"Invalid value for onLoad"}}function k(){var M=L(window.location.href);if(M&&window.history.replaceState(window.history.state,null,M.newUrl),M&&M.valid)return W().then(function(){q(M,I)}).catch(function(N){I.setError(N)});u?u.token&&u.refreshToken?(de(u.token,u.refreshToken,u.idToken),i.enable?W().then(function(){G().then(function(N){N?(e.onAuthSuccess&&e.onAuthSuccess(),I.setSuccess(),_()):I.setSuccess()}).catch(function(N){I.setError(N)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),I.setSuccess()}).catch(function(N){e.onAuthError&&e.onAuthError(),u.onLoad?R():I.setError(N)})):u.onLoad?R():I.setSuccess():I.setSuccess()}function P(){var M=B(),N=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",N),M.setSuccess())};return document.addEventListener("readystatechange",N),N(),M.promise}return S.then(function(){P().then(ie).then(k).catch(function(M){E.setError(M)})}),S.catch(function(M){E.setError(M)}),E.promise},e.login=function(u){return n.login(u)};function p(u){var h=null,E=window.crypto||window.msCrypto;if(E&&E.getRandomValues&&window.Uint8Array)return h=new Uint8Array(u),E.getRandomValues(h),h;h=new Array(u);for(var I=0;I<h.length;I++)h[I]=Math.floor(256*Math.random());return h}function v(u){return w(u,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function w(u,h){for(var E=p(u),I=new Array(u),S=0;S<u;S++)I[S]=h.charCodeAt(E[S]%h.length);return String.fromCharCode.apply(null,I)}function A(u,h){switch(u){case"S256":var E=new Uint8Array(Of.arrayBuffer(h)),I=bn.fromByteArray(E).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return I;default:throw"Invalid value for pkceMethod"}}function x(u){var h={id_token:{acr:u}};return JSON.stringify(h)}e.createLoginUrl=function(u){var h=y(),E=y(),I=n.redirectUri(u),S={state:h,nonce:E,redirectUri:encodeURIComponent(I)};u&&u.prompt&&(S.prompt=u.prompt);var R;u&&u.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var k=u&&u.scope||e.scope;k?k.indexOf("openid")===-1&&(k="openid "+k):k="openid";var P=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(I)+"&state="+encodeURIComponent(h)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(k);if(l&&(P=P+"&nonce="+encodeURIComponent(E)),u&&u.prompt&&(P+="&prompt="+encodeURIComponent(u.prompt)),u&&u.maxAge&&(P+="&max_age="+encodeURIComponent(u.maxAge)),u&&u.loginHint&&(P+="&login_hint="+encodeURIComponent(u.loginHint)),u&&u.idpHint&&(P+="&kc_idp_hint="+encodeURIComponent(u.idpHint)),u&&u.action&&u.action!="register"&&(P+="&kc_action="+encodeURIComponent(u.action)),u&&u.locale&&(P+="&ui_locales="+encodeURIComponent(u.locale)),u&&u.acr){var M=x(u.acr);P+="&claims="+encodeURIComponent(M)}if((u&&u.acrValues||e.acrValues)&&(P+="&acr_values="+encodeURIComponent(u.acrValues||e.acrValues)),e.pkceMethod){var N=v(96);S.pkceCodeVerifier=N;var z=A(e.pkceMethod,N);P+="&code_challenge="+z,P+="&code_challenge_method="+e.pkceMethod}return o.add(S),P},e.logout=function(u){return n.logout(u)},e.createLogoutUrl=function(u){var h=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(u,!1));return e.idToken&&(h+="&id_token_hint="+encodeURIComponent(e.idToken)),h},e.register=function(u){return n.register(u)},e.createRegisterUrl=function(u){return u||(u={}),u.action="register",e.createLoginUrl(u)},e.createAccountUrl=function(u){var h=C(),E=void 0;return typeof h<"u"&&(E=h+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(u))),E},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(u){var h=e.realmAccess;return!!h&&h.roles.indexOf(u)>=0},e.hasResourceRole=function(u,h){if(!e.resourceAccess)return!1;var E=e.resourceAccess[h||e.clientId];return!!E&&E.roles.indexOf(u)>=0},e.loadUserProfile=function(){var u=C()+"/account",h=new XMLHttpRequest;h.open("GET",u,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var E=B();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.profile=JSON.parse(h.responseText),E.setSuccess(e.profile)):E.setError())},h.send(),E.promise},e.loadUserInfo=function(){var u=e.endpoints.userinfo(),h=new XMLHttpRequest;h.open("GET",u,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var E=B();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.userInfo=JSON.parse(h.responseText),E.setSuccess(e.userInfo)):E.setError())},h.send(),E.promise},e.isTokenExpired=function(u){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return d("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var h=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(u){if(isNaN(u))throw"Invalid minValidity";h-=u}return h<0},e.updateToken=function(u){var h=B();if(!e.refreshToken)return h.setError(),h.promise;u=u||5;var E=function(){var S=!1;if(u==-1?(S=!0,d("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(u))&&(S=!0,d("[KEYCLOAK] Refreshing token: token expired")),!S)h.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,k=e.endpoints.token();if(r.push(h),r.length==1){var P=new XMLHttpRequest;P.open("POST",k,!0),P.setRequestHeader("Content-type","application/x-www-form-urlencoded"),P.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var M=new Date().getTime();P.onreadystatechange=function(){if(P.readyState==4)if(P.status==200){d("[KEYCLOAK] Token refreshed"),M=(M+new Date().getTime())/2;var N=JSON.parse(P.responseText);de(N.access_token,N.refresh_token,N.id_token,M),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var z=r.pop();z!=null;z=r.pop())z.setSuccess(!0)}else{f("[KEYCLOAK] Failed to refresh token"),P.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var z=r.pop();z!=null;z=r.pop())z.setError(!0)}},P.send(R)}}};if(i.enable){var I=G();I.then(function(){E()}).catch(function(S){h.setError(S)})}else E();return h.promise},e.clearToken=function(){e.token&&(de(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=de;function C(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function $(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function q(u,h){var E=u.code,I=u.error,S=u.prompt,R=new Date().getTime();if(u.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(u.kc_action_status),I){if(S!="none"){var k={error:I,error_description:u.error_description};e.onAuthError&&e.onAuthError(k),h&&h.setError(k)}else h&&h.setSuccess();return}else e.flow!="standard"&&(u.access_token||u.id_token)&&z(u.access_token,null,u.id_token,!0);if(e.flow!="implicit"&&E){var P="code="+E+"&grant_type=authorization_code",M=e.endpoints.token(),N=new XMLHttpRequest;N.open("POST",M,!0),N.setRequestHeader("Content-type","application/x-www-form-urlencoded"),P+="&client_id="+encodeURIComponent(e.clientId),P+="&redirect_uri="+u.redirectUri,u.pkceCodeVerifier&&(P+="&code_verifier="+u.pkceCodeVerifier),N.withCredentials=!0,N.onreadystatechange=function(){if(N.readyState==4)if(N.status==200){var ee=JSON.parse(N.responseText);z(ee.access_token,ee.refresh_token,ee.id_token,e.flow==="standard"),_()}else e.onAuthError&&e.onAuthError(),h&&h.setError()},N.send(P)}function z(ee,Ie,Ae,ge){R=(R+new Date().getTime())/2,de(ee,Ie,Ae,R),l&&(e.tokenParsed&&e.tokenParsed.nonce!=u.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=u.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=u.storedNonce)?(d("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),h&&h.setError()):ge&&(e.onAuthSuccess&&e.onAuthSuccess(),h&&h.setSuccess())}}function V(u){var h=B(),E;t?typeof t=="string"&&(E=t):E=location.origin+"/keycloak.json";function I(N){N?e.endpoints={authorize:function(){return N.authorization_endpoint},token:function(){return N.token_endpoint},logout:function(){if(!N.end_session_endpoint)throw"Not supported by the OIDC server";return N.end_session_endpoint},checkSessionIframe:function(){if(!N.check_session_iframe)throw"Not supported by the OIDC server";return N.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!N.userinfo_endpoint)throw"Not supported by the OIDC server";return N.userinfo_endpoint}}:e.endpoints={authorize:function(){return C()+"/protocol/openid-connect/auth"},token:function(){return C()+"/protocol/openid-connect/token"},logout:function(){return C()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var z=C()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(z=z+"?version="+e.iframeVersion),z},thirdPartyCookiesIframe:function(){var z=C()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(z=z+"?version="+e.iframeVersion),z},register:function(){return C()+"/protocol/openid-connect/registrations"},userinfo:function(){return C()+"/protocol/openid-connect/userinfo"}}}if(E){var S=new XMLHttpRequest;S.open("GET",E,!0),S.setRequestHeader("Accept","application/json"),S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200||pe(S)){var N=JSON.parse(S.responseText);e.authServerUrl=N["auth-server-url"],e.realm=N.realm,e.clientId=N.resource,I(null),h.setSuccess()}else h.setError()},S.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var M;R.charAt(R.length-1)=="/"?M=R+".well-known/openid-configuration":M=R+"/.well-known/openid-configuration";var S=new XMLHttpRequest;S.open("GET",M,!0),S.setRequestHeader("Accept","application/json"),S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200||pe(S)){var z=JSON.parse(S.responseText);I(z),h.setSuccess()}else h.setError()},S.send()}else I(R),h.setSuccess();else{if(!t.url){for(var k=document.getElementsByTagName("script"),P=0;P<k.length;P++)if(k[P].src.match(/.*keycloak\.js/)){t.url=k[P].src.substr(0,k[P].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,I(null),h.setSuccess()}}return h.promise}function pe(u){return u.status==0&&u.responseText&&u.responseURL.startsWith("file:")}function de(u,h,E,I){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),h?(e.refreshToken=h,e.refreshTokenParsed=Er(h)):(delete e.refreshToken,delete e.refreshTokenParsed),E?(e.idToken=E,e.idTokenParsed=Er(E)):(delete e.idToken,delete e.idTokenParsed),u){if(e.token=u,e.tokenParsed=Er(u),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,I&&(e.timeSkew=Math.floor(I/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(d("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var S=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;d("[KEYCLOAK] Token expires in "+Math.round(S/1e3)+" s"),S<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,S)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function y(){var u="0123456789abcdef",h=w(36,u).split("");h[14]="4",h[19]=u.substr(h[19]&3|8,1),h[8]=h[13]=h[18]=h[23]="-";var E=h.join("");return E}function L(u){var h=j(u);if(h){var E=o.get(h.state);return E&&(h.valid=!0,h.redirectUri=E.redirectUri,h.storedNonce=E.nonce,h.prompt=E.prompt,h.pkceCodeVerifier=E.pkceCodeVerifier),h}}function j(u){var h;switch(e.flow){case"standard":h=["code","state","session_state","kc_action_status","iss"];break;case"implicit":h=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":h=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}h.push("error"),h.push("error_description"),h.push("error_uri");var E=u.indexOf("?"),I=u.indexOf("#"),S,R;if(e.responseMode==="query"&&E!==-1?(S=u.substring(0,E),R=F(u.substring(E+1,I!==-1?I:u.length),h),R.paramsString!==""&&(S+="?"+R.paramsString),I!==-1&&(S+=u.substring(I))):e.responseMode==="fragment"&&I!==-1&&(S=u.substring(0,I),R=F(u.substring(I+1),h),R.paramsString!==""&&(S+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=S,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=S,R.oauthParams}}function F(u,h){for(var E=u.split("&"),I={paramsString:"",oauthParams:{}},S=0;S<E.length;S++){var R=E[S].indexOf("="),k=E[S].slice(0,R);h.indexOf(k)!==-1?I.oauthParams[k]=E[S].slice(R+1):(I.paramsString!==""&&(I.paramsString+="&"),I.paramsString+=E[S])}return I}function B(){var u={setSuccess:function(h){u.resolve(h)},setError:function(h){u.reject(h)}};return u.promise=new Promise(function(h,E){u.resolve=h,u.reject=E}),u}function O(u,h,E){var I=null,S=new Promise(function(R,k){I=setTimeout(function(){k({error:E||"Promise is not settled within timeout of "+h+"ms"})},h)});return Promise.race([u,S]).finally(function(){clearTimeout(I)})}function W(){var u=B();if(!i.enable||i.iframe)return u.setSuccess(),u.promise;var h=document.createElement("iframe");i.iframe=h,h.onload=function(){var S=e.endpoints.authorize();S.charAt(0)==="/"?i.iframeOrigin=$():i.iframeOrigin=S.substring(0,S.indexOf("/",8)),u.setSuccess()};var E=e.endpoints.checkSessionIframe();h.setAttribute("src",E),h.setAttribute("sandbox","allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-session-iframe"),h.style.display="none",document.body.appendChild(h);var I=function(S){if(!(S.origin!==i.iframeOrigin||i.iframe.contentWindow!==S.source)&&(S.data=="unchanged"||S.data=="changed"||S.data=="error")){S.data!="unchanged"&&e.clearToken();for(var R=i.callbackList.splice(0,i.callbackList.length),k=R.length-1;k>=0;--k){var P=R[k];S.data=="error"?P.setError():P.setSuccess(S.data=="unchanged")}}};return window.addEventListener("message",I,!1),u.promise}function _(){i.enable&&e.token&&setTimeout(function(){G().then(function(u){u&&_()})},i.interval*1e3)}function G(){var u=B();if(i.iframe&&i.iframeOrigin){var h=e.clientId+" "+(e.sessionId?e.sessionId:"");i.callbackList.push(u);var E=i.iframeOrigin;i.callbackList.length==1&&i.iframe.contentWindow.postMessage(h,E)}else u.setSuccess();return u.promise}function ie(){var u=B();if(i.enable||e.silentCheckSsoRedirectUri){var h=document.createElement("iframe");h.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),h.setAttribute("sandbox","allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-3p-check-iframe"),h.style.display="none",document.body.appendChild(h);var E=function(I){h.contentWindow===I.source&&(I.data!=="supported"&&I.data!=="unsupported"||(I.data==="unsupported"&&(f(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
412
|
+
*/(function(t){(function(){var e="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",i=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;i?r=Em:o&&(r=self);var s=!r.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,c=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),u=[-2147483648,8388608,32768,128],d=[24,16,8,0],m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=["hex","array","digest","arrayBuffer"],_=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(v){return Object.prototype.toString.call(v)==="[object Array]"}),c&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(v){return typeof v=="object"&&v.buffer&&v.buffer.constructor===ArrayBuffer});var w=function(v,T){return function(M){return new E(T,!0).update(M)[v]()}},B=function(v){var T=w("hex",v);i&&(T=S(T,v)),T.create=function(){return new E(v)},T.update=function(O){return T.create().update(O)};for(var M=0;M<g.length;++M){var I=g[M];T[I]=w(I,v)}return T},S=function(v,T){var M=ls,I=ls.Buffer,O=T?"sha224":"sha256",L;I.from&&!r.JS_SHA256_NO_BUFFER_FROM?L=I.from:L=function(x){return new I(x)};var K=function(x){if(typeof x=="string")return M.createHash(O).update(x,"utf8").digest("hex");if(x==null)throw new Error(e);return x.constructor===ArrayBuffer&&(x=new Uint8Array(x)),Array.isArray(x)||ArrayBuffer.isView(x)||x.constructor===I?M.createHash(O).update(L(x)).digest("hex"):v(x)};return K},H=function(v,T){return function(M,I){return new G(M,T,!0).update(I)[v]()}},A=function(v){var T=H("hex",v);T.create=function(O){return new G(O,v)},T.update=function(O,L){return T.create(O).update(L)};for(var M=0;M<g.length;++M){var I=g[M];T[I]=H(I,v)}return T};function E(v,T){T?(_[0]=_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0,this.blocks=_):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=v}E.prototype.update=function(v){if(!this.finalized){var T,M=typeof v;if(M!=="string"){if(M==="object"){if(v===null)throw new Error(e);if(c&&v.constructor===ArrayBuffer)v=new Uint8Array(v);else if(!Array.isArray(v)&&(!c||!ArrayBuffer.isView(v)))throw new Error(e)}else throw new Error(e);T=!0}for(var I,O=0,L,K=v.length,x=this.blocks;O<K;){if(this.hashed&&(this.hashed=!1,x[0]=this.block,x[16]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=x[8]=x[9]=x[10]=x[11]=x[12]=x[13]=x[14]=x[15]=0),T)for(L=this.start;O<K&&L<64;++O)x[L>>2]|=v[O]<<d[L++&3];else for(L=this.start;O<K&&L<64;++O)I=v.charCodeAt(O),I<128?x[L>>2]|=I<<d[L++&3]:I<2048?(x[L>>2]|=(192|I>>6)<<d[L++&3],x[L>>2]|=(128|I&63)<<d[L++&3]):I<55296||I>=57344?(x[L>>2]|=(224|I>>12)<<d[L++&3],x[L>>2]|=(128|I>>6&63)<<d[L++&3],x[L>>2]|=(128|I&63)<<d[L++&3]):(I=65536+((I&1023)<<10|v.charCodeAt(++O)&1023),x[L>>2]|=(240|I>>18)<<d[L++&3],x[L>>2]|=(128|I>>12&63)<<d[L++&3],x[L>>2]|=(128|I>>6&63)<<d[L++&3],x[L>>2]|=(128|I&63)<<d[L++&3]);this.lastByteIndex=L,this.bytes+=L-this.start,L>=64?(this.block=x[16],this.start=L-64,this.hash(),this.hashed=!0):this.start=L}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var v=this.blocks,T=this.lastByteIndex;v[16]=this.block,v[T>>2]|=u[T&3],this.block=v[16],T>=56&&(this.hashed||this.hash(),v[0]=this.block,v[16]=v[1]=v[2]=v[3]=v[4]=v[5]=v[6]=v[7]=v[8]=v[9]=v[10]=v[11]=v[12]=v[13]=v[14]=v[15]=0),v[14]=this.hBytes<<3|this.bytes>>>29,v[15]=this.bytes<<3,this.hash()}},E.prototype.hash=function(){var v=this.h0,T=this.h1,M=this.h2,I=this.h3,O=this.h4,L=this.h5,K=this.h6,x=this.h7,q=this.blocks,se,fe,de,he,z,me,f,h,k,P,C;for(se=16;se<64;++se)z=q[se-15],fe=(z>>>7|z<<25)^(z>>>18|z<<14)^z>>>3,z=q[se-2],de=(z>>>17|z<<15)^(z>>>19|z<<13)^z>>>10,q[se]=q[se-16]+fe+q[se-7]+de<<0;for(C=T&M,se=0;se<64;se+=4)this.first?(this.is224?(h=300032,z=q[0]-1413257819,x=z-150054599<<0,I=z+24177077<<0):(h=704751109,z=q[0]-210244248,x=z-1521486534<<0,I=z+143694565<<0),this.first=!1):(fe=(v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10),de=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),h=v&T,he=h^v&M^C,f=O&L^~O&K,z=x+de+f+m[se]+q[se],me=fe+he,x=I+z<<0,I=z+me<<0),fe=(I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10),de=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),k=I&v,he=k^I&T^h,f=x&O^~x&L,z=K+de+f+m[se+1]+q[se+1],me=fe+he,K=M+z<<0,M=z+me<<0,fe=(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10),de=(K>>>6|K<<26)^(K>>>11|K<<21)^(K>>>25|K<<7),P=M&I,he=P^M&v^k,f=K&x^~K&O,z=L+de+f+m[se+2]+q[se+2],me=fe+he,L=T+z<<0,T=z+me<<0,fe=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),de=(L>>>6|L<<26)^(L>>>11|L<<21)^(L>>>25|L<<7),C=T&M,he=C^T&I^P,f=L&K^~L&x,z=O+de+f+m[se+3]+q[se+3],me=fe+he,O=v+z<<0,v=z+me<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+v<<0,this.h1=this.h1+T<<0,this.h2=this.h2+M<<0,this.h3=this.h3+I<<0,this.h4=this.h4+O<<0,this.h5=this.h5+L<<0,this.h6=this.h6+K<<0,this.h7=this.h7+x<<0},E.prototype.hex=function(){this.finalize();var v=this.h0,T=this.h1,M=this.h2,I=this.h3,O=this.h4,L=this.h5,K=this.h6,x=this.h7,q=l[v>>28&15]+l[v>>24&15]+l[v>>20&15]+l[v>>16&15]+l[v>>12&15]+l[v>>8&15]+l[v>>4&15]+l[v&15]+l[T>>28&15]+l[T>>24&15]+l[T>>20&15]+l[T>>16&15]+l[T>>12&15]+l[T>>8&15]+l[T>>4&15]+l[T&15]+l[M>>28&15]+l[M>>24&15]+l[M>>20&15]+l[M>>16&15]+l[M>>12&15]+l[M>>8&15]+l[M>>4&15]+l[M&15]+l[I>>28&15]+l[I>>24&15]+l[I>>20&15]+l[I>>16&15]+l[I>>12&15]+l[I>>8&15]+l[I>>4&15]+l[I&15]+l[O>>28&15]+l[O>>24&15]+l[O>>20&15]+l[O>>16&15]+l[O>>12&15]+l[O>>8&15]+l[O>>4&15]+l[O&15]+l[L>>28&15]+l[L>>24&15]+l[L>>20&15]+l[L>>16&15]+l[L>>12&15]+l[L>>8&15]+l[L>>4&15]+l[L&15]+l[K>>28&15]+l[K>>24&15]+l[K>>20&15]+l[K>>16&15]+l[K>>12&15]+l[K>>8&15]+l[K>>4&15]+l[K&15];return this.is224||(q+=l[x>>28&15]+l[x>>24&15]+l[x>>20&15]+l[x>>16&15]+l[x>>12&15]+l[x>>8&15]+l[x>>4&15]+l[x&15]),q},E.prototype.toString=E.prototype.hex,E.prototype.digest=function(){this.finalize();var v=this.h0,T=this.h1,M=this.h2,I=this.h3,O=this.h4,L=this.h5,K=this.h6,x=this.h7,q=[v>>24&255,v>>16&255,v>>8&255,v&255,T>>24&255,T>>16&255,T>>8&255,T&255,M>>24&255,M>>16&255,M>>8&255,M&255,I>>24&255,I>>16&255,I>>8&255,I&255,O>>24&255,O>>16&255,O>>8&255,O&255,L>>24&255,L>>16&255,L>>8&255,L&255,K>>24&255,K>>16&255,K>>8&255,K&255];return this.is224||q.push(x>>24&255,x>>16&255,x>>8&255,x&255),q},E.prototype.array=E.prototype.digest,E.prototype.arrayBuffer=function(){this.finalize();var v=new ArrayBuffer(this.is224?28:32),T=new DataView(v);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),v};function G(v,T,M){var I,O=typeof v;if(O==="string"){var L=[],K=v.length,x=0,q;for(I=0;I<K;++I)q=v.charCodeAt(I),q<128?L[x++]=q:q<2048?(L[x++]=192|q>>6,L[x++]=128|q&63):q<55296||q>=57344?(L[x++]=224|q>>12,L[x++]=128|q>>6&63,L[x++]=128|q&63):(q=65536+((q&1023)<<10|v.charCodeAt(++I)&1023),L[x++]=240|q>>18,L[x++]=128|q>>12&63,L[x++]=128|q>>6&63,L[x++]=128|q&63);v=L}else if(O==="object"){if(v===null)throw new Error(e);if(c&&v.constructor===ArrayBuffer)v=new Uint8Array(v);else if(!Array.isArray(v)&&(!c||!ArrayBuffer.isView(v)))throw new Error(e)}else throw new Error(e);v.length>64&&(v=new E(T,!0).update(v).array());var se=[],fe=[];for(I=0;I<64;++I){var de=v[I]||0;se[I]=92^de,fe[I]=54^de}E.call(this,T,M),this.update(fe),this.oKeyPad=se,this.inner=!0,this.sharedMemory=M}G.prototype=new E,G.prototype.finalize=function(){if(E.prototype.finalize.call(this),this.inner){this.inner=!1;var v=this.array();E.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(v),E.prototype.finalize.call(this)}};var ee=B();ee.sha256=ee,ee.sha224=B(!0),ee.sha256.hmac=A(),ee.sha224.hmac=A(!0),s?t.exports=ee:(r.sha256=ee.sha256,r.sha224=ee.sha224)})()})(as);var Bm=as.exports;const Dm=Am(Bm);class mn extends Error{}mn.prototype.name="InvalidTokenError";function Fm(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Mm(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Fm(e)}catch{return atob(e)}}function Kr(t,e){if(typeof t!="string")throw new mn("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new mn(`Invalid token specified: missing part #${n+1}`);let o;try{o=Mm(r)}catch(i){throw new mn(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(o)}catch(i){throw new mn(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function cs(t){if(!(this instanceof cs))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,r=[],o,i={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),c=0;c<s.length;c++)(s[c].src.indexOf("keycloak.js")!==-1||s[c].src.indexOf("keycloak.min.js")!==-1)&&s[c].src.indexOf("version=")!==-1&&(e.iframeVersion=s[c].src.substring(s[c].src.indexOf("version=")+8).split("&")[0]);var l=!0,u=me(console.info),d=me(console.warn);e.init=function(f){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,o=z();var h=["default","cordova","cordova-native"];if(f&&h.indexOf(f.adapter)>-1?n=fe(f.adapter):f&&typeof f.adapter=="object"?n=f.adapter:window.Cordova||window.cordova?n=fe("cordova"):n=fe(),f){if(typeof f.useNonce<"u"&&(l=f.useNonce),typeof f.checkLoginIframe<"u"&&(i.enable=f.checkLoginIframe),f.checkLoginIframeInterval&&(i.interval=f.checkLoginIframeInterval),f.onLoad==="login-required"&&(e.loginRequired=!0),f.responseMode)if(f.responseMode==="query"||f.responseMode==="fragment")e.responseMode=f.responseMode;else throw"Invalid value for responseMode";if(f.flow){switch(f.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=f.flow}if(f.timeSkew!=null&&(e.timeSkew=f.timeSkew),f.redirectUri&&(e.redirectUri=f.redirectUri),f.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=f.silentCheckSsoRedirectUri),typeof f.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=f.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,f.pkceMethod){if(f.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=f.pkceMethod}typeof f.enableLogging=="boolean"?e.enableLogging=f.enableLogging:e.enableLogging=!1,typeof f.scope=="string"&&(e.scope=f.scope),typeof f.acrValues=="string"&&(e.acrValues=f.acrValues),typeof f.messageReceiveTimeout=="number"&&f.messageReceiveTimeout>0?e.messageReceiveTimeout=f.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var k=O(),P=O();P.promise.then(function(){e.onReady&&e.onReady(e.authenticated),k.setSuccess(e.authenticated)}).catch(function(U){k.setError(U)});var C=E();function D(){var U=function(ne){ne||(W.prompt="none"),f&&f.locale&&(W.locale=f.locale),e.login(W).then(function(){P.setSuccess()}).catch(function(Oe){P.setError(Oe)})},F=function(){var ne=document.createElement("iframe"),Oe=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});ne.setAttribute("src",Oe),ne.setAttribute("sandbox","allow-scripts allow-same-origin"),ne.setAttribute("title","keycloak-silent-check-sso"),ne.style.display="none",document.body.appendChild(ne);var Ae=function(be){if(!(be.origin!==window.location.origin||ne.contentWindow!==be.source)){var et=T(be.data);A(et,P),document.body.removeChild(ne),window.removeEventListener("message",Ae)}};window.addEventListener("message",Ae)},W={};switch(f.onLoad){case"check-sso":i.enable?K().then(function(){q().then(function(ne){ne?P.setSuccess():e.silentCheckSsoRedirectUri?F():U(!1)}).catch(function(ne){P.setError(ne)})}):e.silentCheckSsoRedirectUri?F():U(!1);break;case"login-required":U(!0);break;default:throw"Invalid value for onLoad"}}function $(){var U=T(window.location.href);if(U&&window.history.replaceState(window.history.state,null,U.newUrl),U&&U.valid)return K().then(function(){A(U,P)}).catch(function(F){P.setError(F)});f?f.token&&f.refreshToken?(ee(f.token,f.refreshToken,f.idToken),i.enable?K().then(function(){q().then(function(F){F?(e.onAuthSuccess&&e.onAuthSuccess(),P.setSuccess(),x()):P.setSuccess()}).catch(function(F){P.setError(F)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),P.setSuccess()}).catch(function(F){e.onAuthError&&e.onAuthError(),f.onLoad?D():P.setError(F)})):f.onLoad?D():P.setSuccess():P.setSuccess()}function R(){var U=O(),F=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",F),U.setSuccess())};return document.addEventListener("readystatechange",F),F(),U.promise}return C.then(function(){R().then(se).then($).catch(function(U){k.setError(U)})}),C.catch(function(U){k.setError(U)}),k.promise},e.login=function(f){return n.login(f)};function m(f){var h=null,k=window.crypto||window.msCrypto;if(k&&k.getRandomValues&&window.Uint8Array)return h=new Uint8Array(f),k.getRandomValues(h),h;h=new Array(f);for(var P=0;P<h.length;P++)h[P]=Math.floor(256*Math.random());return h}function g(f){return _(f,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function _(f,h){for(var k=m(f),P=new Array(f),C=0;C<f;C++)P[C]=h.charCodeAt(k[C]%h.length);return String.fromCharCode.apply(null,P)}function w(f,h){switch(f){case"S256":var k=new Uint8Array(Dm.arrayBuffer(h)),P=jn.fromByteArray(k).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return P;default:throw"Invalid value for pkceMethod"}}function B(f){var h={id_token:{acr:f}};return JSON.stringify(h)}e.createLoginUrl=function(f){var h=v(),k=v(),P=n.redirectUri(f),C={state:h,nonce:k,redirectUri:encodeURIComponent(P)};f&&f.prompt&&(C.prompt=f.prompt);var D;f&&f.action=="register"?D=e.endpoints.register():D=e.endpoints.authorize();var $=f&&f.scope||e.scope;$?$.indexOf("openid")===-1&&($="openid "+$):$="openid";var R=D+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(P)+"&state="+encodeURIComponent(h)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent($);if(l&&(R=R+"&nonce="+encodeURIComponent(k)),f&&f.prompt&&(R+="&prompt="+encodeURIComponent(f.prompt)),f&&f.maxAge&&(R+="&max_age="+encodeURIComponent(f.maxAge)),f&&f.loginHint&&(R+="&login_hint="+encodeURIComponent(f.loginHint)),f&&f.idpHint&&(R+="&kc_idp_hint="+encodeURIComponent(f.idpHint)),f&&f.action&&f.action!="register"&&(R+="&kc_action="+encodeURIComponent(f.action)),f&&f.locale&&(R+="&ui_locales="+encodeURIComponent(f.locale)),f&&f.acr){var U=B(f.acr);R+="&claims="+encodeURIComponent(U)}if((f&&f.acrValues||e.acrValues)&&(R+="&acr_values="+encodeURIComponent(f.acrValues||e.acrValues)),e.pkceMethod){var F=g(96);C.pkceCodeVerifier=F;var W=w(e.pkceMethod,F);R+="&code_challenge="+W,R+="&code_challenge_method="+e.pkceMethod}return o.add(C),R},e.logout=function(f){return n.logout(f)},e.createLogoutUrl=function(f){var h=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(f,!1));return e.idToken&&(h+="&id_token_hint="+encodeURIComponent(e.idToken)),h},e.register=function(f){return n.register(f)},e.createRegisterUrl=function(f){return f||(f={}),f.action="register",e.createLoginUrl(f)},e.createAccountUrl=function(f){var h=S(),k=void 0;return typeof h<"u"&&(k=h+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(f))),k},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(f){var h=e.realmAccess;return!!h&&h.roles.indexOf(f)>=0},e.hasResourceRole=function(f,h){if(!e.resourceAccess)return!1;var k=e.resourceAccess[h||e.clientId];return!!k&&k.roles.indexOf(f)>=0},e.loadUserProfile=function(){var f=S()+"/account",h=new XMLHttpRequest;h.open("GET",f,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var k=O();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.profile=JSON.parse(h.responseText),k.setSuccess(e.profile)):k.setError())},h.send(),k.promise},e.loadUserInfo=function(){var f=e.endpoints.userinfo(),h=new XMLHttpRequest;h.open("GET",f,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var k=O();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.userInfo=JSON.parse(h.responseText),k.setSuccess(e.userInfo)):k.setError())},h.send(),k.promise},e.isTokenExpired=function(f){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return u("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var h=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(f){if(isNaN(f))throw"Invalid minValidity";h-=f}return h<0},e.updateToken=function(f){var h=O();if(!e.refreshToken)return h.setError(),h.promise;f=f||5;var k=function(){var C=!1;if(f==-1?(C=!0,u("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(f))&&(C=!0,u("[KEYCLOAK] Refreshing token: token expired")),!C)h.setSuccess(!1);else{var D="grant_type=refresh_token&refresh_token="+e.refreshToken,$=e.endpoints.token();if(r.push(h),r.length==1){var R=new XMLHttpRequest;R.open("POST",$,!0),R.setRequestHeader("Content-type","application/x-www-form-urlencoded"),R.withCredentials=!0,D+="&client_id="+encodeURIComponent(e.clientId);var U=new Date().getTime();R.onreadystatechange=function(){if(R.readyState==4)if(R.status==200){u("[KEYCLOAK] Token refreshed"),U=(U+new Date().getTime())/2;var F=JSON.parse(R.responseText);ee(F.access_token,F.refresh_token,F.id_token,U),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var W=r.pop();W!=null;W=r.pop())W.setSuccess(!0)}else{d("[KEYCLOAK] Failed to refresh token"),R.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var W=r.pop();W!=null;W=r.pop())W.setError(!0)}},R.send(D)}}};if(i.enable){var P=q();P.then(function(){k()}).catch(function(C){h.setError(C)})}else k();return h.promise},e.clearToken=function(){e.token&&(ee(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ee;function S(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function H(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function A(f,h){var k=f.code,P=f.error,C=f.prompt,D=new Date().getTime();if(f.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(f.kc_action_status),P){if(C!="none"){var $={error:P,error_description:f.error_description};e.onAuthError&&e.onAuthError($),h&&h.setError($)}else h&&h.setSuccess();return}else e.flow!="standard"&&(f.access_token||f.id_token)&&W(f.access_token,null,f.id_token,!0);if(e.flow!="implicit"&&k){var R="code="+k+"&grant_type=authorization_code",U=e.endpoints.token(),F=new XMLHttpRequest;F.open("POST",U,!0),F.setRequestHeader("Content-type","application/x-www-form-urlencoded"),R+="&client_id="+encodeURIComponent(e.clientId),R+="&redirect_uri="+f.redirectUri,f.pkceCodeVerifier&&(R+="&code_verifier="+f.pkceCodeVerifier),F.withCredentials=!0,F.onreadystatechange=function(){if(F.readyState==4)if(F.status==200){var ne=JSON.parse(F.responseText);W(ne.access_token,ne.refresh_token,ne.id_token,e.flow==="standard"),x()}else e.onAuthError&&e.onAuthError(),h&&h.setError()},F.send(R)}function W(ne,Oe,Ae,be){D=(D+new Date().getTime())/2,ee(ne,Oe,Ae,D),l&&(e.tokenParsed&&e.tokenParsed.nonce!=f.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=f.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=f.storedNonce)?(u("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),h&&h.setError()):be&&(e.onAuthSuccess&&e.onAuthSuccess(),h&&h.setSuccess())}}function E(f){var h=O(),k;t?typeof t=="string"&&(k=t):k=location.origin+"/keycloak.json";function P(F){F?e.endpoints={authorize:function(){return F.authorization_endpoint},token:function(){return F.token_endpoint},logout:function(){if(!F.end_session_endpoint)throw"Not supported by the OIDC server";return F.end_session_endpoint},checkSessionIframe:function(){if(!F.check_session_iframe)throw"Not supported by the OIDC server";return F.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!F.userinfo_endpoint)throw"Not supported by the OIDC server";return F.userinfo_endpoint}}:e.endpoints={authorize:function(){return S()+"/protocol/openid-connect/auth"},token:function(){return S()+"/protocol/openid-connect/token"},logout:function(){return S()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var W=S()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(W=W+"?version="+e.iframeVersion),W},thirdPartyCookiesIframe:function(){var W=S()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(W=W+"?version="+e.iframeVersion),W},register:function(){return S()+"/protocol/openid-connect/registrations"},userinfo:function(){return S()+"/protocol/openid-connect/userinfo"}}}if(k){var C=new XMLHttpRequest;C.open("GET",k,!0),C.setRequestHeader("Accept","application/json"),C.onreadystatechange=function(){if(C.readyState==4)if(C.status==200||G(C)){var F=JSON.parse(C.responseText);e.authServerUrl=F["auth-server-url"],e.realm=F.realm,e.clientId=F.resource,P(null),h.setSuccess()}else h.setError()},C.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var D=t.oidcProvider;if(D)if(typeof D=="string"){var U;D.charAt(D.length-1)=="/"?U=D+".well-known/openid-configuration":U=D+"/.well-known/openid-configuration";var C=new XMLHttpRequest;C.open("GET",U,!0),C.setRequestHeader("Accept","application/json"),C.onreadystatechange=function(){if(C.readyState==4)if(C.status==200||G(C)){var W=JSON.parse(C.responseText);P(W),h.setSuccess()}else h.setError()},C.send()}else P(D),h.setSuccess();else{if(!t.url){for(var $=document.getElementsByTagName("script"),R=0;R<$.length;R++)if($[R].src.match(/.*keycloak\.js/)){t.url=$[R].src.substr(0,$[R].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,P(null),h.setSuccess()}}return h.promise}function G(f){return f.status==0&&f.responseText&&f.responseURL.startsWith("file:")}function ee(f,h,k,P){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),h?(e.refreshToken=h,e.refreshTokenParsed=Kr(h)):(delete e.refreshToken,delete e.refreshTokenParsed),k?(e.idToken=k,e.idTokenParsed=Kr(k)):(delete e.idToken,delete e.idTokenParsed),f){if(e.token=f,e.tokenParsed=Kr(f),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,P&&(e.timeSkew=Math.floor(P/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(u("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var C=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;u("[KEYCLOAK] Token expires in "+Math.round(C/1e3)+" s"),C<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,C)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function v(){var f="0123456789abcdef",h=_(36,f).split("");h[14]="4",h[19]=f.substr(h[19]&3|8,1),h[8]=h[13]=h[18]=h[23]="-";var k=h.join("");return k}function T(f){var h=M(f);if(h){var k=o.get(h.state);return k&&(h.valid=!0,h.redirectUri=k.redirectUri,h.storedNonce=k.nonce,h.prompt=k.prompt,h.pkceCodeVerifier=k.pkceCodeVerifier),h}}function M(f){var h;switch(e.flow){case"standard":h=["code","state","session_state","kc_action_status","iss"];break;case"implicit":h=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":h=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}h.push("error"),h.push("error_description"),h.push("error_uri");var k=f.indexOf("?"),P=f.indexOf("#"),C,D;if(e.responseMode==="query"&&k!==-1?(C=f.substring(0,k),D=I(f.substring(k+1,P!==-1?P:f.length),h),D.paramsString!==""&&(C+="?"+D.paramsString),P!==-1&&(C+=f.substring(P))):e.responseMode==="fragment"&&P!==-1&&(C=f.substring(0,P),D=I(f.substring(P+1),h),D.paramsString!==""&&(C+="#"+D.paramsString)),D&&D.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((D.oauthParams.code||D.oauthParams.error)&&D.oauthParams.state)return D.oauthParams.newUrl=C,D.oauthParams}else if(e.flow==="implicit"&&(D.oauthParams.access_token||D.oauthParams.error)&&D.oauthParams.state)return D.oauthParams.newUrl=C,D.oauthParams}}function I(f,h){for(var k=f.split("&"),P={paramsString:"",oauthParams:{}},C=0;C<k.length;C++){var D=k[C].indexOf("="),$=k[C].slice(0,D);h.indexOf($)!==-1?P.oauthParams[$]=k[C].slice(D+1):(P.paramsString!==""&&(P.paramsString+="&"),P.paramsString+=k[C])}return P}function O(){var f={setSuccess:function(h){f.resolve(h)},setError:function(h){f.reject(h)}};return f.promise=new Promise(function(h,k){f.resolve=h,f.reject=k}),f}function L(f,h,k){var P=null,C=new Promise(function(D,$){P=setTimeout(function(){$({error:k})},h)});return Promise.race([f,C]).finally(function(){clearTimeout(P)})}function K(){var f=O();if(!i.enable||i.iframe)return f.setSuccess(),f.promise;var h=document.createElement("iframe");i.iframe=h,h.onload=function(){var C=e.endpoints.authorize();C.charAt(0)==="/"?i.iframeOrigin=H():i.iframeOrigin=C.substring(0,C.indexOf("/",8)),f.setSuccess()};var k=e.endpoints.checkSessionIframe();h.setAttribute("src",k),h.setAttribute("sandbox","allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-session-iframe"),h.style.display="none",document.body.appendChild(h);var P=function(C){if(!(C.origin!==i.iframeOrigin||i.iframe.contentWindow!==C.source)&&(C.data=="unchanged"||C.data=="changed"||C.data=="error")){C.data!="unchanged"&&e.clearToken();for(var D=i.callbackList.splice(0,i.callbackList.length),$=D.length-1;$>=0;--$){var R=D[$];C.data=="error"?R.setError():R.setSuccess(C.data=="unchanged")}}};return window.addEventListener("message",P,!1),f.promise}function x(){i.enable&&e.token&&setTimeout(function(){q().then(function(f){f&&x()})},i.interval*1e3)}function q(){var f=O();if(i.iframe&&i.iframeOrigin){var h=e.clientId+" "+(e.sessionId?e.sessionId:"");i.callbackList.push(f);var k=i.iframeOrigin;i.callbackList.length==1&&i.iframe.contentWindow.postMessage(h,k)}else f.setSuccess();return f.promise}function se(){var f=O();if(i.enable||e.silentCheckSsoRedirectUri){var h=document.createElement("iframe");h.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),h.setAttribute("sandbox","allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-3p-check-iframe"),h.style.display="none",document.body.appendChild(h);var k=function(P){h.contentWindow===P.source&&(P.data!=="supported"&&P.data!=="unsupported"||(P.data==="unsupported"&&(d(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
151
413
|
|
|
152
414
|
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
153
415
|
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
154
416
|
|
|
155
|
-
For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",E),u.setSuccess()))};window.addEventListener("message",E,!1)}else u.setSuccess();return O(u.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ce(u){if(!u||u=="default")return{login:function(k){return window.location.assign(e.createLoginUrl(k)),B().promise},logout:function(k){return window.location.replace(e.createLogoutUrl(k)),B().promise},register:function(k){return window.location.assign(e.createRegisterUrl(k)),B().promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.location.href=k;else throw"Not supported by the OIDC server";return B().promise},redirectUri:function(k,P){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(u=="cordova"){i.enable=!1;var h=function(k,P,M){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(k,P,M):window.open(k,P,M)},E=function(k){return k&&k.cordovaOptions?Object.keys(k.cordovaOptions).reduce(function(P,M){return P[M]=k.cordovaOptions[M],P},{}):{}},I=function(k){return Object.keys(k).reduce(function(P,M){return P.push(M+"="+k[M]),P},[]).join(",")},S=function(k){var P=E(k);return P.location="no",k&&k.prompt=="none"&&(P.hidden="yes"),I(P)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(k){var P=B(),M=S(k),N=e.createLoginUrl(k),z=h(N,"_blank",M),ee=!1,Ie=!1,Ae=function(){Ie=!0,z.close()};return z.addEventListener("loadstart",function(ge){if(ge.url.indexOf(R())==0){var qe=L(ge.url);q(qe,P),Ae(),ee=!0}}),z.addEventListener("loaderror",function(ge){if(!ee)if(ge.url.indexOf(R())==0){var qe=L(ge.url);q(qe,P),Ae(),ee=!0}else P.setError(),Ae()}),z.addEventListener("exit",function(ge){Ie||P.setError({reason:"closed_by_user"})}),P.promise},logout:function(k){var P=B(),M=e.createLogoutUrl(k),N=h(M,"_blank","location=no,hidden=yes,clearcache=yes"),z;return N.addEventListener("loadstart",function(ee){ee.url.indexOf(R())==0&&N.close()}),N.addEventListener("loaderror",function(ee){ee.url.indexOf(R())==0||(z=!0),N.close()}),N.addEventListener("exit",function(ee){z?P.setError():(e.clearToken(),P.setSuccess())}),P.promise},register:function(k){var P=B(),M=e.createRegisterUrl(),N=S(k),z=h(M,"_blank",N);return z.addEventListener("loadstart",function(ee){if(ee.url.indexOf(R())==0){z.close();var Ie=L(ee.url);q(Ie,P)}}),P.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u"){var P=h(k,"_blank","location=no");P.addEventListener("loadstart",function(M){M.url.indexOf(R())==0&&P.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(k){return R()}}}if(u=="cordova-native")return i.enable=!1,{login:function(k){var P=B(),M=e.createLoginUrl(k);return universalLinks.subscribe("keycloak",function(N){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var z=L(N.url);q(z,P)}),window.cordova.plugins.browsertab.openUrl(M),P.promise},logout:function(k){var P=B(),M=e.createLogoutUrl(k);return universalLinks.subscribe("keycloak",function(N){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),P.setSuccess()}),window.cordova.plugins.browsertab.openUrl(M),P.promise},register:function(k){var P=B(),M=e.createRegisterUrl(k);return universalLinks.subscribe("keycloak",function(N){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var z=L(N.url);q(z,P)}),window.cordova.plugins.browsertab.openUrl(M),P.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.cordova.plugins.browsertab.openUrl(k);else throw"Not supported by the OIDC server"},redirectUri:function(k){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+u}var fe=function(){if(!(this instanceof fe))return new fe;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var u=this;function h(){for(var E=new Date().getTime(),I=0;I<localStorage.length;I++){var S=localStorage.key(I);if(S&&S.indexOf("kc-callback-")==0){var R=localStorage.getItem(S);if(R)try{var k=JSON.parse(R).expires;(!k||k<E)&&localStorage.removeItem(S)}catch{localStorage.removeItem(S)}}}}u.get=function(E){if(E){var I="kc-callback-"+E,S=localStorage.getItem(I);return S&&(localStorage.removeItem(I),S=JSON.parse(S)),h(),S}},u.add=function(E){h();var I="kc-callback-"+E.state;E.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(I,JSON.stringify(E))}},Ce=function(){if(!(this instanceof Ce))return new Ce;var u=this;u.get=function(S){if(S){var R=E("kc-callback-"+S);if(I("kc-callback-"+S,"",h(-100)),R)return JSON.parse(R)}},u.add=function(S){I("kc-callback-"+S.state,JSON.stringify(S),h(60))},u.removeItem=function(S){I(S,"",h(-100))};var h=function(S){var R=new Date;return R.setTime(R.getTime()+S*60*1e3),R},E=function(S){for(var R=S+"=",k=document.cookie.split(";"),P=0;P<k.length;P++){for(var M=k[P];M.charAt(0)==" ";)M=M.substring(1);if(M.indexOf(R)==0)return M.substring(R.length,M.length)}return""},I=function(S,R,k){var P=S+"="+R+"; expires="+k.toUTCString()+"; ";document.cookie=P}};function K(){try{return new fe}catch{}return new Ce}function xe(u){return function(){e.enableLogging&&u.apply(console,Array.prototype.slice.call(arguments))}}}async function Ff(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}let vn;function Rf(t){if(!t)return vn;const e=new xi(t),n={},r=async(s={},c)=>{if(await Ff())return s.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(s).then(async d=>{d&&await o(),c&&typeof c=="function"&&c(),document.documentElement.classList.add("app-mounted")}).catch(d=>{console.error(d),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},o=async()=>{const s=await e.loadUserInfo();n.email=s.email??"",n.emailVerified=s.email_verified===!0,n.firstName=s.given_name??"",n.lastName=s.family_name??"",n.name=s.name??"",n.sub=s.sub??"",n.username=s.preferred_username??"",n.roles=[...s.role??[]],n.groups=[...s.group??[]],n.IsInRole=c=>n.roles.includes(c),sessionStorage.setItem("name",n.name)};return vn={Instance:e,User:n,Init:r,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}},vn}const $f=()=>vn,Nf=t=>Rf(t);class Sr{constructor(e=null){Me(this,"errors",[]);Me(this,"_value",null);Me(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}function Ii(t,e){return function(){return t.apply(e,arguments)}}const{toString:Df}=Object.prototype,{getPrototypeOf:Cr}=Object,wn=(t=>e=>{const n=Df.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ze=t=>(t=t.toLowerCase(),e=>wn(e)===t),En=t=>e=>typeof e===t,{isArray:wt}=Array,Jt=En("undefined");function Mf(t){return t!==null&&!Jt(t)&&t.constructor!==null&&!Jt(t.constructor)&&De(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Pi=ze("ArrayBuffer");function Uf(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Pi(t.buffer),e}const Hf=En("string"),De=En("function"),Ti=En("number"),Sn=t=>t!==null&&typeof t=="object",jf=t=>t===!0||t===!1,Cn=t=>{if(wn(t)!=="object")return!1;const e=Cr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Vf=ze("Date"),Kf=ze("File"),zf=ze("Blob"),Wf=ze("FileList"),qf=t=>Sn(t)&&De(t.pipe),Gf=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||De(t.append)&&((e=wn(t))==="formdata"||e==="object"&&De(t.toString)&&t.toString()==="[object FormData]"))},Jf=ze("URLSearchParams"),Yf=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),wt(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let c;for(r=0;r<s;r++)c=i[r],e.call(null,t[c],c,t)}}function Oi(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const Li=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bi=t=>!Jt(t)&&t!==Li;function Ar(){const{caseless:t}=Bi(this)&&this||{},e={},n=(r,o)=>{const i=t&&Oi(e,o)||o;Cn(e[i])&&Cn(r)?e[i]=Ar(e[i],r):Cn(r)?e[i]=Ar({},r):wt(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Yt(arguments[r],n);return e}const Xf=(t,e,n,{allOwnKeys:r}={})=>(Yt(e,(o,i)=>{n&&De(o)?t[i]=Ii(o,n):t[i]=o},{allOwnKeys:r}),t),Zf=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Qf=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ep=(t,e,n,r)=>{let o,i,s;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!c[s]&&(e[s]=t[s],c[s]=!0);t=n!==!1&&Cr(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},tp=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},np=t=>{if(!t)return null;if(wt(t))return t;let e=t.length;if(!Ti(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},rp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Cr(Uint8Array)),op=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},ip=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},sp=ze("HTMLFormElement"),ap=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Fi=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lp=ze("RegExp"),Ri=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Yt(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},cp=t=>{Ri(t,(e,n)=>{if(De(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(De(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},up=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return wt(t)?r(t):r(String(t).split(e)),n},dp=()=>{},fp=(t,e)=>(t=+t,Number.isFinite(t)?t:e),_r="abcdefghijklmnopqrstuvwxyz",$i="0123456789",Ni={DIGIT:$i,ALPHA:_r,ALPHA_DIGIT:_r+_r.toUpperCase()+$i},pp=(t=16,e=Ni.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function mp(t){return!!(t&&De(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const hp=t=>{const e=new Array(10),n=(r,o)=>{if(Sn(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=wt(r)?[]:{};return Yt(r,(s,c)=>{const l=n(s,o+1);!Jt(l)&&(i[c]=l)}),e[o]=void 0,i}}return r};return n(t,0)},gp=ze("AsyncFunction"),b={isArray:wt,isArrayBuffer:Pi,isBuffer:Mf,isFormData:Gf,isArrayBufferView:Uf,isString:Hf,isNumber:Ti,isBoolean:jf,isObject:Sn,isPlainObject:Cn,isUndefined:Jt,isDate:Vf,isFile:Kf,isBlob:zf,isRegExp:lp,isFunction:De,isStream:qf,isURLSearchParams:Jf,isTypedArray:rp,isFileList:Wf,forEach:Yt,merge:Ar,extend:Xf,trim:Yf,stripBOM:Zf,inherits:Qf,toFlatObject:ep,kindOf:wn,kindOfTest:ze,endsWith:tp,toArray:np,forEachEntry:op,matchAll:ip,isHTMLForm:sp,hasOwnProperty:Fi,hasOwnProp:Fi,reduceDescriptors:Ri,freezeMethods:cp,toObjectSet:up,toCamelCase:ap,noop:dp,toFiniteNumber:fp,findKey:Oi,global:Li,isContextDefined:Bi,ALPHABET:Ni,generateString:pp,isSpecCompliantForm:mp,toJSONObject:hp,isAsyncFn:gp,isThenable:t=>t&&(Sn(t)||De(t))&&De(t.then)&&De(t.catch)};function ne(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}b.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Di=ne.prototype,Mi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Mi[t]={value:t}}),Object.defineProperties(ne,Mi),Object.defineProperty(Di,"isAxiosError",{value:!0}),ne.from=(t,e,n,r,o,i)=>{const s=Object.create(Di);return b.toFlatObject(t,s,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),ne.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const yp=null;function kr(t){return b.isPlainObject(t)||b.isArray(t)}function Ui(t){return b.endsWith(t,"[]")?t.slice(0,-2):t}function Hi(t,e,n){return t?t.concat(e).map(function(o,i){return o=Ui(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function bp(t){return b.isArray(t)&&!t.some(kr)}const vp=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function An(t,e,n){if(!b.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,C){return!b.isUndefined(C[x])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(o))throw new TypeError("visitor must be a function");function d(A){if(A===null)return"";if(b.isDate(A))return A.toISOString();if(!l&&b.isBlob(A))throw new ne("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(A)||b.isTypedArray(A)?l&&typeof Blob=="function"?new Blob([A]):Buffer.from(A):A}function f(A,x,C){let $=A;if(A&&!C&&typeof A=="object"){if(b.endsWith(x,"{}"))x=r?x:x.slice(0,-2),A=JSON.stringify(A);else if(b.isArray(A)&&bp(A)||(b.isFileList(A)||b.endsWith(x,"[]"))&&($=b.toArray(A)))return x=Ui(x),$.forEach(function(V,pe){!(b.isUndefined(V)||V===null)&&e.append(s===!0?Hi([x],pe,i):s===null?x:x+"[]",d(V))}),!1}return kr(A)?!0:(e.append(Hi(C,x,i),d(A)),!1)}const p=[],v=Object.assign(vp,{defaultVisitor:f,convertValue:d,isVisitable:kr});function w(A,x){if(!b.isUndefined(A)){if(p.indexOf(A)!==-1)throw Error("Circular reference detected in "+x.join("."));p.push(A),b.forEach(A,function($,q){(!(b.isUndefined($)||$===null)&&o.call(e,$,b.isString(q)?q.trim():q,x,v))===!0&&w($,x?x.concat(q):[q])}),p.pop()}}if(!b.isObject(t))throw new TypeError("data must be an object");return w(t),e}function ji(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function xr(t,e){this._pairs=[],t&&An(t,this,e)}const Vi=xr.prototype;Vi.append=function(e,n){this._pairs.push([e,n])},Vi.toString=function(e){const n=e?function(r){return e.call(this,r,ji)}:ji;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function wp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ki(t,e,n){if(!e)return t;const r=n&&n.encode||wp,o=n&&n.serialize;let i;if(o?i=o(e,n):i=b.isURLSearchParams(e)?e.toString():new xr(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class zi{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Wi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ep={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:xr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qi=typeof window<"u"&&typeof document<"u",Sp=(t=>qi&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Cp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",We={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qi,hasStandardBrowserEnv:Sp,hasStandardBrowserWebWorkerEnv:Cp},Symbol.toStringTag,{value:"Module"})),...Ep};function Ap(t,e){return An(t,new We.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return We.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _p(t){return b.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function kp(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Gi(t){function e(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),l=i>=n.length;return s=!s&&b.isArray(o)?o.length:s,l?(b.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!c):((!o[s]||!b.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&b.isArray(o[s])&&(o[s]=kp(o[s])),!c)}if(b.isFormData(t)&&b.isFunction(t.entries)){const n={};return b.forEachEntry(t,(r,o)=>{e(_p(r),o,n,0)}),n}return null}function xp(t,e,n){if(b.isString(t))try{return(e||JSON.parse)(t),b.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ir={transitional:Wi,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=b.isObject(e);if(i&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return o&&o?JSON.stringify(Gi(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ap(e,this.formSerializer).toString();if((c=b.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return An(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),xp(e)):e}],transformResponse:[function(e){const n=this.transitional||Ir.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&b.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(c){if(s)throw c.name==="SyntaxError"?ne.from(c,ne.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],t=>{Ir.headers[t]={}});const Pr=Ir,Ip=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pp=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
156
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&
|
|
157
|
-
`)}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[Ji]=this[Ji]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=Xt(s);r[c]||(Bp(o,s),r[c]=!0)}return b.isArray(e)?e.forEach(i):i(e),this}}kn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(kn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),b.freezeMethods(kn);const Je=kn;function Or(t,e){const n=this||Pr,r=e||n,o=Je.from(r.headers);let i=r.data;return b.forEach(t,function(c){i=c.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Yi(t){return!!(t&&t.__CANCEL__)}function Zt(t,e,n){ne.call(this,t??"canceled",ne.ERR_CANCELED,e,n),this.name="CanceledError"}b.inherits(Zt,ne,{__CANCEL__:!0});function Fp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Rp=We.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];b.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),b.isString(r)&&s.push("path="+r),b.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 $p(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Np(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xi(t,e){return t&&!$p(e)?Np(t,e):e}const Dp=We.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=b.isString(s)?o(s):s;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function Mp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Up(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(l){const d=Date.now(),f=r[i];s||(s=d),n[o]=l,r[o]=d;let p=i,v=0;for(;p!==o;)v+=n[p++],p=p%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),d-s<e)return;const w=f&&d-f;return w?Math.round(v*1e3/w):void 0}}function Zi(t,e){let n=0;const r=Up(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-n,l=r(c),d=i<=s;n=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&d?(s-i)/l:void 0,event:o};f[e?"download":"upload"]=!0,t(f)}}const Lr={http:yp,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){let o=t.data;const i=Je.from(t.headers).normalize();let{responseType:s,withXSRFToken:c}=t,l;function d(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let f;if(b.isFormData(o)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[x,...C]=f?f.split(";").map($=>$.trim()).filter(Boolean):[];i.setContentType([x||"multipart/form-data",...C].join("; "))}}let p=new XMLHttpRequest;if(t.auth){const x=t.auth.username||"",C=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(x+":"+C))}const v=Xi(t.baseURL,t.url);p.open(t.method.toUpperCase(),Ki(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout;function w(){if(!p)return;const x=Je.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),$={data:!s||s==="text"||s==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:t,request:p};Fp(function(V){n(V),d()},function(V){r(V),d()},$),p=null}if("onloadend"in p?p.onloadend=w:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(w)},p.onabort=function(){p&&(r(new ne("Request aborted",ne.ECONNABORTED,t,p)),p=null)},p.onerror=function(){r(new ne("Network Error",ne.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let C=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const $=t.transitional||Wi;t.timeoutErrorMessage&&(C=t.timeoutErrorMessage),r(new ne(C,$.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,t,p)),p=null},We.hasStandardBrowserEnv&&(c&&b.isFunction(c)&&(c=c(t)),c||c!==!1&&Dp(v))){const x=t.xsrfHeaderName&&t.xsrfCookieName&&Rp.read(t.xsrfCookieName);x&&i.set(t.xsrfHeaderName,x)}o===void 0&&i.setContentType(null),"setRequestHeader"in p&&b.forEach(i.toJSON(),function(C,$){p.setRequestHeader($,C)}),b.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),s&&s!=="json"&&(p.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&p.addEventListener("progress",Zi(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",Zi(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=x=>{p&&(r(!x||x.type?new Zt(null,t,p):x),p.abort(),p=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const A=Mp(v);if(A&&We.protocols.indexOf(A)===-1){r(new ne("Unsupported protocol "+A+":",ne.ERR_BAD_REQUEST,t));return}p.send(o||null)})}};b.forEach(Lr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Qi=t=>`- ${t}`,Hp=t=>b.isFunction(t)||t===null||t===!1,es={getAdapter:t=>{t=b.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,!Hp(n)&&(r=Lr[(s=String(n)).toLowerCase()],r===void 0))throw new ne(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
|
|
158
|
-
`+i.map(
|
|
159
|
-
`):" "+Qi(i[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Lr};function Br(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Zt(null,t)}function ts(t){return Br(t),t.headers=Je.from(t.headers),t.data=Or.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),es.getAdapter(t.adapter||Pr.adapter)(t).then(function(r){return Br(t),r.data=Or.call(t,t.transformResponse,r),r.headers=Je.from(r.headers),r},function(r){return Yi(r)||(Br(t),r&&r.response&&(r.response.data=Or.call(t,t.transformResponse,r.response),r.response.headers=Je.from(r.response.headers))),Promise.reject(r)})}const ns=t=>t instanceof Je?t.toJSON():t;function Et(t,e){e=e||{};const n={};function r(d,f,p){return b.isPlainObject(d)&&b.isPlainObject(f)?b.merge.call({caseless:p},d,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function o(d,f,p){if(b.isUndefined(f)){if(!b.isUndefined(d))return r(void 0,d,p)}else return r(d,f,p)}function i(d,f){if(!b.isUndefined(f))return r(void 0,f)}function s(d,f){if(b.isUndefined(f)){if(!b.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function c(d,f,p){if(p in e)return r(d,f);if(p in t)return r(void 0,d)}const l={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:(d,f)=>o(ns(d),ns(f),!0)};return b.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=l[f]||o,v=p(t[f],e[f],f);b.isUndefined(v)&&p!==c||(n[f]=v)}),n}const rs="1.6.5",Fr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fr[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const os={};Fr.transitional=function(e,n,r){function o(i,s){return"[Axios v"+rs+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,c)=>{if(e===!1)throw new ne(o(s," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!os[s]&&(os[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 jp(t,e,n){if(typeof t!="object")throw new ne("options must be an object",ne.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],l=c===void 0||s(c,i,t);if(l!==!0)throw new ne("option "+i+" must be "+l,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+i,ne.ERR_BAD_OPTION)}}const Rr={assertOptions:jp,validators:Fr},nt=Rr.validators;class xn{constructor(e){this.defaults=e,this.interceptors={request:new zi,response:new zi}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Et(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Rr.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:Rr.assertOptions(o,{encode:nt.function,serialize:nt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&b.merge(i.common,i[n.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],A=>{delete i[A]}),n.headers=Je.concat(s,i);const c=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let f,p=0,v;if(!l){const A=[ts.bind(this),void 0];for(A.unshift.apply(A,c),A.push.apply(A,d),v=A.length,f=Promise.resolve(n);p<v;)f=f.then(A[p++],A[p++]);return f}v=c.length;let w=n;for(p=0;p<v;){const A=c[p++],x=c[p++];try{w=A(w)}catch(C){x.call(this,C);break}}try{f=ts.call(this,w)}catch(A){return Promise.reject(A)}for(p=0,v=d.length;p<v;)f=f.then(d[p++],d[p++]);return f}getUri(e){e=Et(this.defaults,e);const n=Xi(e.baseURL,e.url);return Ki(n,e.params,e.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(e){xn.prototype[e]=function(n,r){return this.request(Et(r||{},{method:e,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,c){return this.request(Et(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}xn.prototype[e]=n(),xn.prototype[e+"Form"]=n(!0)});const In=xn;class $r{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 Zt(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 $r(function(o){e=o}),cancel:e}}}const Vp=$r;function Kp(t){return function(n){return t.apply(null,n)}}function zp(t){return b.isObject(t)&&t.isAxiosError===!0}const Nr={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(Nr).forEach(([t,e])=>{Nr[e]=t});const Wp=Nr;function is(t){const e=new In(t),n=Ii(In.prototype.request,e);return b.extend(n,In.prototype,e,{allOwnKeys:!0}),b.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return is(Et(t,o))},n}const ue=is(Pr);ue.Axios=In,ue.CanceledError=Zt,ue.CancelToken=Vp,ue.isCancel=Yi,ue.VERSION=rs,ue.toFormData=An,ue.AxiosError=ne,ue.Cancel=ue.CanceledError,ue.all=function(e){return Promise.all(e)},ue.spread=Kp,ue.isAxiosError=zp,ue.mergeConfig=Et,ue.AxiosHeaders=Je,ue.formToJSON=t=>Gi(b.isHTMLForm(t)?new FormData(t):t),ue.getAdapter=es.getAdapter,ue.HttpStatusCode=Wp,ue.default=ue;class ss{constructor(e,n){Me(this,"keycloak");Me(this,"axios");Me(this,"fileName","silent-login.html");this.keycloak=e,this.axios=ue.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 Sr,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 Sr,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,l=o.data.error;if(i!=="silent-login-iframe-result"||l==="login_required"||!s){e(!1);return}const d=new XMLHttpRequest;d.open("POST",this.tokenExchangeUrl,!0),d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status===200){const f=JSON.parse(d.responseText);this.keycloak.setToken(f.access_token,null,f.id_token,new Date().getTime()),e(!0);return}e(!1)}},d.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 qp=(t,e)=>new ss(t,e);sr.SetInitialTheme(),Q.AppResult=Sr,Q.AxiosClient=ss,Q.SfButton=Wr,Q.SfContent=Au,Q.SfDrawer=zr,Q.SfIcon=Qe,Q.SfLayout=vu,Q.SfMessage=Lu,Q.SfNavMenuLink=Su,Q.SfPanelMenu=bf,Q.SfTabNavigation=Tu,Q.SfTooltip=Bn,Q.StartAuthService=Nf,Q.UseAlertService=eu,Q.UseAuthService=$f,Q.UseAxiosClient=qp,Q.UseConfirmService=Xo,Q.UseNavMenuService=On,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
417
|
+
For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",k),f.setSuccess()))};window.addEventListener("message",k,!1)}else f.setSuccess();return L(f.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function fe(f){if(!f||f=="default")return{login:function($){return window.location.assign(e.createLoginUrl($)),O().promise},logout:function($){return window.location.replace(e.createLogoutUrl($)),O().promise},register:function($){return window.location.assign(e.createRegisterUrl($)),O().promise},accountManagement:function(){var $=e.createAccountUrl();if(typeof $<"u")window.location.href=$;else throw"Not supported by the OIDC server";return O().promise},redirectUri:function($,R){return $&&$.redirectUri?$.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(f=="cordova"){i.enable=!1;var h=function($,R,U){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open($,R,U):window.open($,R,U)},k=function($){return $&&$.cordovaOptions?Object.keys($.cordovaOptions).reduce(function(R,U){return R[U]=$.cordovaOptions[U],R},{}):{}},P=function($){return Object.keys($).reduce(function(R,U){return R.push(U+"="+$[U]),R},[]).join(",")},C=function($){var R=k($);return R.location="no",$&&$.prompt=="none"&&(R.hidden="yes"),P(R)},D=function(){return e.redirectUri||"http://localhost"};return{login:function($){var R=O(),U=C($),F=e.createLoginUrl($),W=h(F,"_blank",U),ne=!1,Oe=!1,Ae=function(){Oe=!0,W.close()};return W.addEventListener("loadstart",function(be){if(be.url.indexOf(D())==0){var et=T(be.url);A(et,R),Ae(),ne=!0}}),W.addEventListener("loaderror",function(be){if(!ne)if(be.url.indexOf(D())==0){var et=T(be.url);A(et,R),Ae(),ne=!0}else R.setError(),Ae()}),W.addEventListener("exit",function(be){Oe||R.setError({reason:"closed_by_user"})}),R.promise},logout:function($){var R=O(),U=e.createLogoutUrl($),F=h(U,"_blank","location=no,hidden=yes,clearcache=yes"),W;return F.addEventListener("loadstart",function(ne){ne.url.indexOf(D())==0&&F.close()}),F.addEventListener("loaderror",function(ne){ne.url.indexOf(D())==0||(W=!0),F.close()}),F.addEventListener("exit",function(ne){W?R.setError():(e.clearToken(),R.setSuccess())}),R.promise},register:function($){var R=O(),U=e.createRegisterUrl(),F=C($),W=h(U,"_blank",F);return W.addEventListener("loadstart",function(ne){if(ne.url.indexOf(D())==0){W.close();var Oe=T(ne.url);A(Oe,R)}}),R.promise},accountManagement:function(){var $=e.createAccountUrl();if(typeof $<"u"){var R=h($,"_blank","location=no");R.addEventListener("loadstart",function(U){U.url.indexOf(D())==0&&R.close()})}else throw"Not supported by the OIDC server"},redirectUri:function($){return D()}}}if(f=="cordova-native")return i.enable=!1,{login:function($){var R=O(),U=e.createLoginUrl($);return universalLinks.subscribe("keycloak",function(F){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var W=T(F.url);A(W,R)}),window.cordova.plugins.browsertab.openUrl(U),R.promise},logout:function($){var R=O(),U=e.createLogoutUrl($);return universalLinks.subscribe("keycloak",function(F){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),R.setSuccess()}),window.cordova.plugins.browsertab.openUrl(U),R.promise},register:function($){var R=O(),U=e.createRegisterUrl($);return universalLinks.subscribe("keycloak",function(F){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var W=T(F.url);A(W,R)}),window.cordova.plugins.browsertab.openUrl(U),R.promise},accountManagement:function(){var $=e.createAccountUrl();if(typeof $<"u")window.cordova.plugins.browsertab.openUrl($);else throw"Not supported by the OIDC server"},redirectUri:function($){return $&&$.redirectUri?$.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+f}var de=function(){if(!(this instanceof de))return new de;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var f=this;function h(){for(var k=new Date().getTime(),P=0;P<localStorage.length;P++){var C=localStorage.key(P);if(C&&C.indexOf("kc-callback-")==0){var D=localStorage.getItem(C);if(D)try{var $=JSON.parse(D).expires;(!$||$<k)&&localStorage.removeItem(C)}catch{localStorage.removeItem(C)}}}}f.get=function(k){if(k){var P="kc-callback-"+k,C=localStorage.getItem(P);return C&&(localStorage.removeItem(P),C=JSON.parse(C)),h(),C}},f.add=function(k){h();var P="kc-callback-"+k.state;k.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(P,JSON.stringify(k))}},he=function(){if(!(this instanceof he))return new he;var f=this;f.get=function(C){if(C){var D=k("kc-callback-"+C);if(P("kc-callback-"+C,"",h(-100)),D)return JSON.parse(D)}},f.add=function(C){P("kc-callback-"+C.state,JSON.stringify(C),h(60))},f.removeItem=function(C){P(C,"",h(-100))};var h=function(C){var D=new Date;return D.setTime(D.getTime()+C*60*1e3),D},k=function(C){for(var D=C+"=",$=document.cookie.split(";"),R=0;R<$.length;R++){for(var U=$[R];U.charAt(0)==" ";)U=U.substring(1);if(U.indexOf(D)==0)return U.substring(D.length,U.length)}return""},P=function(C,D,$){var R=C+"="+D+"; expires="+$.toUTCString()+"; ";document.cookie=R}};function z(){try{return new de}catch{}return new he}function me(f){return function(){e.enableLogging&&f.apply(console,Array.prototype.slice.call(arguments))}}}async function Um(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}let zn;function Vm(t){if(!t)return zn;const e=new cs(t),n={},r=async(s={},c)=>{if(await Um())return s.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(s).then(async u=>{if(u&&await o(),c&&typeof c=="function")try{c(),document.documentElement.classList.add("app-mounted")}catch(d){console.error(d),document.documentElement.setAttribute("data-app-message","Ocorreu um erro na inicialização. Verifique o console para mais detalhes.")}}).catch(u=>{document.documentElement.setAttribute("data-app-message","Ocorreu na comunicação com o servidor de autenticação.")})},o=async()=>{const s=await e.loadUserInfo();n.email=s.email??"",n.emailVerified=s.email_verified===!0,n.firstName=s.given_name??"",n.lastName=s.family_name??"",n.name=s.name??"",n.sub=s.sub??"",n.username=s.preferred_username??"",n.roles=[...s.role??[]],n.groups=[...s.group??[]],n.IsInRole=c=>n.roles.includes(c),sessionStorage.setItem("name",n.name)};return zn={Instance:e,User:n,Init:r,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}},zn}const Hm=()=>zn,jm=t=>Vm(t);class Wr{constructor(e=null){je(this,"errors",[]);je(this,"_value",null);je(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}function us(t,e){return function(){return t.apply(e,arguments)}}const{toString:zm}=Object.prototype,{getPrototypeOf:qr}=Object,Kn=(t=>e=>{const n=zm.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ye=t=>(t=t.toLowerCase(),e=>Kn(e)===t),Wn=t=>e=>typeof e===t,{isArray:Rt}=Array,pn=Wn("undefined");function Km(t){return t!==null&&!pn(t)&&t.constructor!==null&&!pn(t.constructor)&&Me(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ds=Ye("ArrayBuffer");function Wm(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ds(t.buffer),e}const qm=Wn("string"),Me=Wn("function"),fs=Wn("number"),qn=t=>t!==null&&typeof t=="object",Gm=t=>t===!0||t===!1,Gn=t=>{if(Kn(t)!=="object")return!1;const e=qr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Jm=Ye("Date"),Ym=Ye("File"),Xm=Ye("Blob"),Zm=Ye("FileList"),Qm=t=>qn(t)&&Me(t.pipe),ep=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Me(t.append)&&((e=Kn(t))==="formdata"||e==="object"&&Me(t.toString)&&t.toString()==="[object FormData]"))},tp=Ye("URLSearchParams"),[np,rp,op,ip]=["ReadableStream","Request","Response","Headers"].map(Ye),sp=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function hn(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Rt(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let c;for(r=0;r<s;r++)c=i[r],e.call(null,t[c],c,t)}}function ms(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const vt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ps=t=>!pn(t)&&t!==vt;function Gr(){const{caseless:t}=ps(this)&&this||{},e={},n=(r,o)=>{const i=t&&ms(e,o)||o;Gn(e[i])&&Gn(r)?e[i]=Gr(e[i],r):Gn(r)?e[i]=Gr({},r):Rt(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&hn(arguments[r],n);return e}const ap=(t,e,n,{allOwnKeys:r}={})=>(hn(e,(o,i)=>{n&&Me(o)?t[i]=us(o,n):t[i]=o},{allOwnKeys:r}),t),lp=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cp=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},up=(t,e,n,r)=>{let o,i,s;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!c[s]&&(e[s]=t[s],c[s]=!0);t=n!==!1&&qr(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},dp=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},fp=t=>{if(!t)return null;if(Rt(t))return t;let e=t.length;if(!fs(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},mp=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qr(Uint8Array)),pp=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},hp=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},gp=Ye("HTMLFormElement"),yp=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hs=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),bp=Ye("RegExp"),gs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};hn(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},vp=t=>{gs(t,(e,n)=>{if(Me(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Me(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wp=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Rt(t)?r(t):r(String(t).split(e)),n},_p=()=>{},Sp=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Jr="abcdefghijklmnopqrstuvwxyz",ys="0123456789",bs={DIGIT:ys,ALPHA:Jr,ALPHA_DIGIT:Jr+Jr.toUpperCase()+ys},kp=(t=16,e=bs.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Cp(t){return!!(t&&Me(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Ep=t=>{const e=new Array(10),n=(r,o)=>{if(qn(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=Rt(r)?[]:{};return hn(r,(s,c)=>{const l=n(s,o+1);!pn(l)&&(i[c]=l)}),e[o]=void 0,i}}return r};return n(t,0)},Ap=Ye("AsyncFunction"),Tp=t=>t&&(qn(t)||Me(t))&&Me(t.then)&&Me(t.catch),vs=((t,e)=>t?setImmediate:e?((n,r)=>(vt.addEventListener("message",({source:o,data:i})=>{o===vt&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),vt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Me(vt.postMessage)),xp=typeof queueMicrotask<"u"?queueMicrotask.bind(vt):typeof process<"u"&&process.nextTick||vs,y={isArray:Rt,isArrayBuffer:ds,isBuffer:Km,isFormData:ep,isArrayBufferView:Wm,isString:qm,isNumber:fs,isBoolean:Gm,isObject:qn,isPlainObject:Gn,isReadableStream:np,isRequest:rp,isResponse:op,isHeaders:ip,isUndefined:pn,isDate:Jm,isFile:Ym,isBlob:Xm,isRegExp:bp,isFunction:Me,isStream:Qm,isURLSearchParams:tp,isTypedArray:mp,isFileList:Zm,forEach:hn,merge:Gr,extend:ap,trim:sp,stripBOM:lp,inherits:cp,toFlatObject:up,kindOf:Kn,kindOfTest:Ye,endsWith:dp,toArray:fp,forEachEntry:pp,matchAll:hp,isHTMLForm:gp,hasOwnProperty:hs,hasOwnProp:hs,reduceDescriptors:gs,freezeMethods:vp,toObjectSet:wp,toCamelCase:yp,noop:_p,toFiniteNumber:Sp,findKey:ms,global:vt,isContextDefined:ps,ALPHABET:bs,generateString:kp,isSpecCompliantForm:Cp,toJSONObject:Ep,isAsyncFn:Ap,isThenable:Tp,setImmediate:vs,asap:xp};function J(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}y.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ws=J.prototype,_s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{_s[t]={value:t}}),Object.defineProperties(J,_s),Object.defineProperty(ws,"isAxiosError",{value:!0}),J.from=(t,e,n,r,o,i)=>{const s=Object.create(ws);return y.toFlatObject(t,s,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),J.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Pp=null;function Yr(t){return y.isPlainObject(t)||y.isArray(t)}function Ss(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function ks(t,e,n){return t?t.concat(e).map(function(o,i){return o=Ss(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function Ip(t){return y.isArray(t)&&!t.some(Yr)}const Op=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function Jn(t,e,n){if(!y.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(B,S){return!y.isUndefined(S[B])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(e);if(!y.isFunction(o))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(y.isDate(w))return w.toISOString();if(!l&&y.isBlob(w))throw new J("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(w)||y.isTypedArray(w)?l&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function d(w,B,S){let H=w;if(w&&!S&&typeof w=="object"){if(y.endsWith(B,"{}"))B=r?B:B.slice(0,-2),w=JSON.stringify(w);else if(y.isArray(w)&&Ip(w)||(y.isFileList(w)||y.endsWith(B,"[]"))&&(H=y.toArray(w)))return B=Ss(B),H.forEach(function(E,G){!(y.isUndefined(E)||E===null)&&e.append(s===!0?ks([B],G,i):s===null?B:B+"[]",u(E))}),!1}return Yr(w)?!0:(e.append(ks(S,B,i),u(w)),!1)}const m=[],g=Object.assign(Op,{defaultVisitor:d,convertValue:u,isVisitable:Yr});function _(w,B){if(!y.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+B.join("."));m.push(w),y.forEach(w,function(H,A){(!(y.isUndefined(H)||H===null)&&o.call(e,H,y.isString(A)?A.trim():A,B,g))===!0&&_(H,B?B.concat(A):[A])}),m.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return _(t),e}function Cs(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Xr(t,e){this._pairs=[],t&&Jn(t,this,e)}const Es=Xr.prototype;Es.append=function(e,n){this._pairs.push([e,n])},Es.toString=function(e){const n=e?function(r){return e.call(this,r,Cs)}:Cs;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Lp(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function As(t,e,n){if(!e)return t;const r=n&&n.encode||Lp,o=n&&n.serialize;let i;if(o?i=o(e,n):i=y.isURLSearchParams(e)?e.toString():new Xr(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ts{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(r){r!==null&&e(r)})}}const xs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$p={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Xr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Zr=typeof window<"u"&&typeof document<"u",Rp=(t=>Zr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Np=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bp=Zr&&window.location.href||"http://localhost",Xe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zr,hasStandardBrowserEnv:Rp,hasStandardBrowserWebWorkerEnv:Np,origin:Bp},Symbol.toStringTag,{value:"Module"})),...$p};function Dp(t,e){return Jn(t,new Xe.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Xe.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Fp(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Mp(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Ps(t){function e(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),l=i>=n.length;return s=!s&&y.isArray(o)?o.length:s,l?(y.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!c):((!o[s]||!y.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&y.isArray(o[s])&&(o[s]=Mp(o[s])),!c)}if(y.isFormData(t)&&y.isFunction(t.entries)){const n={};return y.forEachEntry(t,(r,o)=>{e(Fp(r),o,n,0)}),n}return null}function Up(t,e,n){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const gn={transitional:xs,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=y.isObject(e);if(i&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return o?JSON.stringify(Ps(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Dp(e,this.formSerializer).toString();if((c=y.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Jn(c?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),Up(e)):e}],transformResponse:[function(e){const n=this.transitional||gn.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(c){if(s)throw c.name==="SyntaxError"?J.from(c,J.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Xe.classes.FormData,Blob:Xe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],t=>{gn.headers[t]={}});const Vp=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hp=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
418
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&Vp[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Is=Symbol("internals");function yn(t){return t&&String(t).trim().toLowerCase()}function Yn(t){return t===!1||t==null?t:y.isArray(t)?t.map(Yn):String(t)}function jp(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const zp=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qr(t,e,n,r,o){if(y.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!y.isString(e)){if(y.isString(r))return e.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(e)}}function Kp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Wp(t,e){const n=y.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}class Ie{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(c,l,u){const d=yn(l);if(!d)throw new Error("header name must be a non-empty string");const m=y.findKey(o,d);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||l]=Yn(c))}const s=(c,l)=>y.forEach(c,(u,d)=>i(u,d,l));if(y.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(y.isString(e)&&(e=e.trim())&&!zp(e))s(Hp(e),n);else if(y.isHeaders(e))for(const[c,l]of e.entries())i(l,c,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=yn(e),e){const r=y.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return jp(o);if(y.isFunction(n))return n.call(this,o,r);if(y.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=yn(e),e){const r=y.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Qr(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=yn(s),s){const c=y.findKey(r,s);c&&(!n||Qr(r,r[c],c,n))&&(delete r[c],o=!0)}}return y.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||Qr(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return y.forEach(this,(o,i)=>{const s=y.findKey(r,i);if(s){n[s]=Yn(o),delete n[i];return}const c=e?Kp(i):String(i).trim();c!==i&&delete n[i],n[c]=Yn(o),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return y.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
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[Is]=this[Is]={accessors:{}}).accessors,o=this.prototype;function i(s){const c=yn(s);r[c]||(Wp(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 eo(t,e){const n=this||gn,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 Os(t){return!!(t&&t.__CANCEL__)}function Nt(t,e,n){J.call(this,t??"canceled",J.ERR_CANCELED,e,n),this.name="CanceledError"}y.inherits(Nt,J,{__CANCEL__:!0});function Ls(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 qp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Gp(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(l){const u=Date.now(),d=r[i];s||(s=u),n[o]=l,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 _=d&&u-d;return _?Math.round(g*1e3/_):void 0}}function Jp(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 Xn=(t,e,n=3)=>{let r=0;const o=Gp(50,250);return Jp(i=>{const s=i.loaded,c=i.lengthComputable?i.total:void 0,l=s-r,u=o(l),d=s<=c;r=s;const m={loaded:s,total:c,progress:c?s/c:void 0,bytes:l,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]]},Rs=t=>(...e)=>y.asap(()=>t(...e)),Yp=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}}(),Xp=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 Zp(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Qp(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ns(t,e){return t&&!Zp(e)?Qp(t,e):e}const Bs=t=>t instanceof Ie?{...t}:t;function wt(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 l={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(Bs(u),Bs(d),!0)};return y.forEach(Object.keys(Object.assign({},t,e)),function(d){const m=l[d]||o,g=m(t[d],e[d],d);y.isUndefined(g)&&m!==c||(n[d]=g)}),n}const Ds=t=>{const e=wt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=e;e.headers=s=Ie.from(s),e.url=As(Ns(e.baseURL,e.url),t.params,t.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(y.isFormData(n)){if(Xe.hasStandardBrowserEnv||Xe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...d]=l?l.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&&Yp(e.url))){const u=o&&i&&Xp.read(i);u&&s.set(o,u)}return e},eh=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Ds(t);let i=o.data;const s=Ie.from(o.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=o,d,m,g,_,w;function B(){_&&_(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function H(){if(!S)return;const E=Ie.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),ee={data:!c||c==="text"||c==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:E,config:t,request:S};Ls(function(T){n(T),B()},function(T){r(T),B()},ee),S=null}"onloadend"in S?S.onloadend=H:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(H)},S.onabort=function(){S&&(r(new J("Request aborted",J.ECONNABORTED,t,S)),S=null)},S.onerror=function(){r(new J("Network Error",J.ERR_NETWORK,t,S)),S=null},S.ontimeout=function(){let G=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const ee=o.transitional||xs;o.timeoutErrorMessage&&(G=o.timeoutErrorMessage),r(new J(G,ee.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,S)),S=null},i===void 0&&s.setContentType(null),"setRequestHeader"in S&&y.forEach(s.toJSON(),function(G,ee){S.setRequestHeader(ee,G)}),y.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),c&&c!=="json"&&(S.responseType=o.responseType),u&&([g,w]=Xn(u,!0),S.addEventListener("progress",g)),l&&S.upload&&([m,_]=Xn(l),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",_)),(o.cancelToken||o.signal)&&(d=E=>{S&&(r(!E||E.type?new Nt(null,t,S):E),S.abort(),S=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const A=qp(o.url);if(A&&Xe.protocols.indexOf(A)===-1){r(new J("Unsupported protocol "+A+":",J.ERR_BAD_REQUEST,t));return}S.send(i||null)})},th=(t,e)=>{let n=new AbortController,r;const o=function(l){if(!r){r=!0,s();const u=l instanceof Error?l:this.reason;n.abort(u instanceof J?u:new Nt(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(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",o):l.unsubscribe(o))}),t=null)};t.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=s,[c,()=>{i&&clearTimeout(i),i=null}]},nh=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},rh=async function*(t,e,n){for await(const r of t)yield*nh(ArrayBuffer.isView(r)?r:await n(String(r)),e)},Fs=(t,e,n,r,o)=>{const i=rh(t,e,o);let s=0,c,l=u=>{c||(c=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:m}=await i.next();if(d){l(),u.close();return}let g=m.byteLength;if(n){let _=s+=g;n(_)}u.enqueue(new Uint8Array(m))}catch(d){throw l(d),d}},cancel(u){return l(u),i.return()}},{highWaterMark:2})},Zn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ms=Zn&&typeof ReadableStream=="function",to=Zn&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Us=(t,...e)=>{try{return!!t(...e)}catch{return!1}},oh=Ms&&Us(()=>{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}),Vs=64*1024,no=Ms&&Us(()=>y.isReadableStream(new Response("").body)),Qn={stream:no&&(t=>t.body)};Zn&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Qn[e]&&(Qn[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 ih=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 to(t)).byteLength},sh=async(t,e)=>{const n=y.toFiniteNumber(t.getContentLength());return n??ih(e)},ro={http:Pp,xhr:eh,fetch:Zn&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:m="same-origin",fetchOptions:g}=Ds(t);u=u?(u+"").toLowerCase():"text";let[_,w]=o||i||s?th([o,i],s):[],B,S;const H=()=>{!B&&setTimeout(()=>{_&&_.unsubscribe()}),B=!0};let A;try{if(l&&oh&&n!=="get"&&n!=="head"&&(A=await sh(d,r))!==0){let v=new Request(e,{method:"POST",body:r,duplex:"half"}),T;if(y.isFormData(r)&&(T=v.headers.get("content-type"))&&d.setContentType(T),v.body){const[M,I]=$s(A,Xn(Rs(l)));r=Fs(v.body,Vs,M,I,to)}}y.isString(m)||(m=m?"include":"omit"),S=new Request(e,{...g,signal:_,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:m});let E=await fetch(S);const G=no&&(u==="stream"||u==="response");if(no&&(c||G)){const v={};["status","statusText","headers"].forEach(O=>{v[O]=E[O]});const T=y.toFiniteNumber(E.headers.get("content-length")),[M,I]=c&&$s(T,Xn(Rs(c),!0))||[];E=new Response(Fs(E.body,Vs,M,()=>{I&&I(),G&&H()},to),v)}u=u||"text";let ee=await Qn[y.findKey(Qn,u)||"text"](E,t);return!G&&H(),w&&w(),await new Promise((v,T)=>{Ls(v,T,{data:ee,headers:Ie.from(E.headers),status:E.status,statusText:E.statusText,config:t,request:S})})}catch(E){throw H(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,t,S),{cause:E.cause||E}):J.from(E,E&&E.code,t,S)}})};y.forEach(ro,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Hs=t=>`- ${t}`,ah=t=>y.isFunction(t)||t===null||t===!1,js={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,!ah(n)&&(r=ro[(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,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
|
|
420
|
+
`+i.map(Hs).join(`
|
|
421
|
+
`):" "+Hs(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:ro};function oo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Nt(null,t)}function zs(t){return oo(t),t.headers=Ie.from(t.headers),t.data=eo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),js.getAdapter(t.adapter||gn.adapter)(t).then(function(r){return oo(t),r.data=eo.call(t,t.transformResponse,r),r.headers=Ie.from(r.headers),r},function(r){return Os(r)||(oo(t),r&&r.response&&(r.response.data=eo.call(t,t.transformResponse,r.response),r.response.headers=Ie.from(r.response.headers))),Promise.reject(r)})}const Ks="1.7.4",io={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{io[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ws={};io.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Ks+"] 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&&!Ws[s]&&(Ws[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 lh(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],l=c===void 0||s(c,i,t);if(l!==!0)throw new J("option "+i+" must be "+l,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}}const so={assertOptions:lh,validators:io},ft=so.validators;class _t{constructor(e){this.defaults=e,this.interceptors={request:new Ts,response:new Ts}}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=wt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&so.assertOptions(r,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),o!=null&&(y.isFunction(o)?n.paramsSerializer={serialize:o}:so.assertOptions(o,{encode:ft.function,serialize:ft.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"],w=>{delete i[w]}),n.headers=Ie.concat(s,i);const c=[];let l=!0;this.interceptors.request.forEach(function(B){typeof B.runWhen=="function"&&B.runWhen(n)===!1||(l=l&&B.synchronous,c.unshift(B.fulfilled,B.rejected))});const u=[];this.interceptors.response.forEach(function(B){u.push(B.fulfilled,B.rejected)});let d,m=0,g;if(!l){const w=[zs.bind(this),void 0];for(w.unshift.apply(w,c),w.push.apply(w,u),g=w.length,d=Promise.resolve(n);m<g;)d=d.then(w[m++],w[m++]);return d}g=c.length;let _=n;for(m=0;m<g;){const w=c[m++],B=c[m++];try{_=w(_)}catch(S){B.call(this,S);break}}try{d=zs.call(this,_)}catch(w){return Promise.reject(w)}for(m=0,g=u.length;m<g;)d=d.then(u[m++],u[m++]);return d}getUri(e){e=wt(this.defaults,e);const n=Ns(e.baseURL,e.url);return As(n,e.params,e.paramsSerializer)}}y.forEach(["delete","get","head","options"],function(e){_t.prototype[e]=function(n,r){return this.request(wt(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(wt(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}_t.prototype[e]=n(),_t.prototype[e+"Form"]=n(!0)});class ao{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 Nt(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 ao(function(o){e=o}),cancel:e}}}function ch(t){return function(n){return t.apply(null,n)}}function uh(t){return y.isObject(t)&&t.isAxiosError===!0}const lo={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(lo).forEach(([t,e])=>{lo[e]=t});function qs(t){const e=new _t(t),n=us(_t.prototype.request,e);return y.extend(n,_t.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return qs(wt(t,o))},n}const pe=qs(gn);pe.Axios=_t,pe.CanceledError=Nt,pe.CancelToken=ao,pe.isCancel=Os,pe.VERSION=Ks,pe.toFormData=Jn,pe.AxiosError=J,pe.Cancel=pe.CanceledError,pe.all=function(e){return Promise.all(e)},pe.spread=ch,pe.isAxiosError=uh,pe.mergeConfig=wt,pe.AxiosHeaders=Ie,pe.formToJSON=t=>Ps(y.isHTMLForm(t)?new FormData(t):t),pe.getAdapter=js.getAdapter,pe.HttpStatusCode=lo,pe.default=pe;class Gs{constructor(e,n){je(this,"keycloak");je(this,"axios");je(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 Wr,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 Wr,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,l=o.data.error;if(i!=="silent-login-iframe-result"||l==="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 dh=(t,e)=>new Gs(t,e);Pr.SetInitialTheme(),te.AppResult=Wr,te.AxiosClient=Gs,te.SfButton=bo,te.SfContent=fd,te.SfDrawer=yo,te.SfIcon=at,te.SfLayout=ad,te.SfMessage=wd,te.SfNavMenu=Cm,te.SfNavMenuLink=ud,te.SfPanelMenu=gm,te.SfTabNavigation=bd,te.SfTooltip=nr,te.StartAuthService=jm,te.UseAlertService=Hu,te.UseAuthService=Hm,te.UseAxiosClient=dh,te.UseConfirmService=Si,te.UseNavMenuService=_n,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
|
|
160
423
|
//# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.js.map
|