@luizleon/sf.prefeiturasp.vuecomponents 6.0.1 → 6.0.2
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/sf.prefeiturasp.vuecomponents.js +147 -102
- package/dist/sf.prefeiturasp.vuecomponents.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs.map +1 -1
- package/dist/types/common/utilities.d.ts +17 -1
- package/dist/types/common/utilities.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -420,6 +420,6 @@ https://sweetalert2.github.io/#ajax-request`),nu(t),typeof t.title=="string"&&(t
|
|
|
420
420
|
`).join("<br />")),pc(t)}class ru{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 iu=()=>{pt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(pt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${pt.previousBodyPadding+yc()}px`)},su=()=>{pt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${pt.previousBodyPadding}px`,pt.previousBodyPadding=null)},au=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Ne(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,D(document.body,h.iosfix),cu(),lu()}},lu=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&R().scrollHeight>window.innerHeight-44&&(J().style.paddingBottom="44px")},cu=()=>{const t=J();let e;t.ontouchstart=n=>{e=uu(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},uu=t=>{const e=t.target,n=J();return du(t)||fu(t)?!1:e===n||!Kr(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Kr(_n())&&_n().contains(e))},du=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",fu=t=>t.touches&&t.touches.length>1,mu=()=>{if(Ne(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Oe(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},ni=10,pu=t=>{const e=J(),n=R();typeof t.willOpen=="function"&&t.willOpen(n);const i=window.getComputedStyle(document.body).overflowY;yu(e,n,t),setTimeout(()=>{hu(e,n)},ni),lo()&&(gu(e,t.scrollbarPadding,i),Wc()),!Cn()&&!A.previousActiveElement&&(A.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Oe(e,h["no-transition"])},oi=t=>{const e=R();if(t.target!==e)return;const n=J();e.removeEventListener(Yt,oi),n.style.overflowY="auto"},hu=(t,e)=>{Yt&&Wr(e)?(t.style.overflowY="hidden",e.addEventListener(Yt,oi)):t.style.overflowY="auto"},gu=(t,e,n)=>{au(),e&&n!=="hidden"&&iu(),setTimeout(()=>{t.scrollTop=0})},yu=(t,e,n)=>{D(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),Y(e,"grid"),setTimeout(()=>{D(e,n.showClass.popup),e.style.removeProperty("opacity")},ni),D([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&D([document.documentElement,document.body],h["height-auto"])},gt=t=>{let e=R();e||new st,e=R();const n=mt();Cn()?ee(Wt()):bu(e,t),Y(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},bu=(t,e)=>{const n=Gt(),o=mt();!e&&he(Ee())&&(e=Ee()),Y(n),e&&(ee(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),D([t,n],h.loading)},vu=(t,e)=>{e.input==="select"||e.input==="radio"?ku(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(oo(e.inputValue)||ro(e.inputValue))&&(gt(Ee()),Eu(t,e))},_u=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return wu(n);case"radio":return Su(n);case"file":return Cu(n);default:return e.inputAutoTrim?n.value.trim():n.value}},wu=t=>t.checked?1:0,Su=t=>t.checked?t.value:null,Cu=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,ku=(t,e)=>{const n=R(),o=i=>Pu[e.input](n,ho(i),e);oo(e.inputOptions)||ro(e.inputOptions)?(gt(Ee()),zt(e.inputOptions).then(i=>{t.hideLoading(),o(i)})):typeof e.inputOptions=="object"?o(e.inputOptions):nt(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Eu=(t,e)=>{const n=t.getInput();ee(n),zt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,Y(n),n.focus(),t.hideLoading()}).catch(o=>{nt(`Error in inputValue promise: ${o}`),n.value="",Y(n),n.focus(),t.hideLoading()})},Pu={select:(t,e,n)=>{const o=We(t,h.select),i=(s,c,l)=>{const a=document.createElement("option");a.value=l,Q(a,c),a.selected=ri(l,n.inputValue),s.appendChild(a)};e.forEach(s=>{const c=s[0],l=s[1];if(Array.isArray(l)){const a=document.createElement("optgroup");a.label=c,a.disabled=!1,o.appendChild(a),l.forEach(u=>i(a,u[1],u[0]))}else i(o,l,c)}),o.focus()},radio:(t,e,n)=>{const o=We(t,h.radio);e.forEach(s=>{const c=s[0],l=s[1],a=document.createElement("input"),u=document.createElement("label");a.type="radio",a.name=h.radio,a.value=c,ri(c,n.inputValue)&&(a.checked=!0);const f=document.createElement("span");Q(f,l),f.className=h.label,u.appendChild(a),u.appendChild(f),o.appendChild(u)});const i=o.querySelectorAll("input");i.length&&i[0].focus()}},ho=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let i=n;typeof i=="object"&&(i=ho(i)),e.push([o,i])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=ho(o)),e.push([n,o])}),e},ri=(t,e)=>e&&e.toString()===t.toString();function ii(){const t=x.innerParams.get(this);if(!t)return;const e=x.domCache.get(this);ee(e.loader),Cn()?t.icon&&Y(Wt()):Tu(e),Oe([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Tu=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?Y(e[0],"inline-block"):oc()&&ee(t.actions)};function Iu(t){const e=x.innerParams.get(t||this),n=x.domCache.get(t||this);return n?co(n.popup,e.input):null}const Zt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},Au=()=>he(R()),si=()=>Ee()&&Ee().click(),Ou=()=>Ke()&&Ke().click(),$u=()=>ot()&&ot().click(),ai=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Lu=(t,e,n,o)=>{ai(e),n.toast||(e.keydownHandler=i=>Bu(t,i,o),e.keydownTarget=n.keydownListenerCapture?window:R(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},go=(t,e,n)=>{const o=ao();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();R().focus()},li=["ArrowRight","ArrowDown"],xu=["ArrowLeft","ArrowUp"],Bu=(t,e,n)=>{const o=x.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Nu(t,e,o):e.key==="Tab"?Du(e,o):[...li,...xu].includes(e.key)?Mu(e.key):e.key==="Escape"&&Ru(e,o,n)))},Nu=(t,e,n)=>{if(vn(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;si(),e.preventDefault()}},Du=(t,e)=>{const n=t.target,o=ao();let i=-1;for(let s=0;s<o.length;s++)if(n===o[s]){i=s;break}t.shiftKey?go(e,i,-1):go(e,i,1),t.stopPropagation(),t.preventDefault()},Mu=t=>{const e=Ee(),n=Ke(),o=ot();if(![e,n,o].includes(document.activeElement))return;const i=li.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let c=0;c<Gt().children.length;c++){if(s=s[i],!s)return;if(he(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Ru=(t,e,n)=>{vn(e.allowEscapeKey)&&(t.preventDefault(),n(ht.esc))};function ci(t,e,n,o){Cn()?ui(t,o):(ac(n).then(()=>ui(t,o)),ai(A)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),lo()&&(su(),mu(),Qr()),Vu()}function Vu(){Oe([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function En(t){t=zu(t);const e=Zt.swalPromiseResolve.get(this),n=Hu(this);this.isAwaitingPromise()?t.isDismissed||(Jt(this),e(t)):n&&e(t)}function ju(){return!!x.awaitingPromise.get(this)}const Hu=t=>{const e=R();if(!e)return!1;const n=x.innerParams.get(t);if(!n||Ne(e,n.hideClass.popup))return!1;Oe(e,n.showClass.popup),D(e,n.hideClass.popup);const o=J();return Oe(o,n.showClass.backdrop),D(o,n.hideClass.backdrop),Uu(t,e,n),!0};function Fu(t){const e=Zt.swalPromiseReject.get(this);Jt(this),e&&e(t)}const Jt=t=>{t.isAwaitingPromise()&&(x.awaitingPromise.delete(t),x.innerParams.get(t)||t._destroy())},zu=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Uu=(t,e,n)=>{const o=J(),i=Yt&&Wr(e);typeof n.willClose=="function"&&n.willClose(e),i?Ku(t,e,o,n.returnFocus,n.didClose):ci(t,o,n.returnFocus,n.didClose)},Ku=(t,e,n,o,i)=>{A.swalCloseEventFinishedCallback=ci.bind(null,t,n,o,i),e.addEventListener(Yt,function(s){s.target===e&&(A.swalCloseEventFinishedCallback(),delete A.swalCloseEventFinishedCallback)})},ui=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function di(t,e,n){const o=x.domCache.get(t);e.forEach(i=>{o[i].disabled=n})}function fi(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let i=0;i<o.length;i++)o[i].disabled=e}else t.disabled=e}function Wu(){di(this,["confirmButton","denyButton","cancelButton"],!1)}function Gu(){di(this,["confirmButton","denyButton","cancelButton"],!0)}function qu(){return fi(this.getInput(),!1)}function Yu(){return fi(this.getInput(),!0)}function Xu(t){const e=x.domCache.get(this),n=x.innerParams.get(this);Q(e.validationMessage,t),e.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&D(e.validationMessage,n.customClass.validationMessage),Y(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),Fr(o),D(o,h.inputerror))}function Zu(){const t=x.domCache.get(this);t.validationMessage&&ee(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Oe(e,h.inputerror))}function Ju(){return x.domCache.get(this).progressSteps}function Qu(t){const e=R(),n=x.innerParams.get(this);if(!e||Ne(e,n.hideClass.popup))return ue("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=ed(t),i=Object.assign({},n,o);Jr(this,i),x.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const ed=t=>{const e={};return Object.keys(t).forEach(n=>{Dr(n)?e[n]=t[n]:ue(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
|
|
421
421
|
|
|
422
422
|
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 td(){const t=x.domCache.get(this),e=x.innerParams.get(this);if(!e){mi(this);return}t.popup&&A.swalCloseEventFinishedCallback&&(A.swalCloseEventFinishedCallback(),delete A.swalCloseEventFinishedCallback),A.deferDisposalTimer&&(clearTimeout(A.deferDisposalTimer),delete A.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),nd(this)}const nd=t=>{mi(t),delete t.params,delete A.keydownHandler,delete A.keydownTarget,delete A.currentInstance},mi=t=>{t.isAwaitingPromise()?(yo(x,t),x.awaitingPromise.set(t,!0)):(yo(Zt,t),yo(x,t))},yo=(t,e)=>{for(const n in t)t[n].delete(e)},pi=Object.freeze(Object.defineProperty({__proto__:null,_destroy:td,close:En,closeModal:En,closePopup:En,closeToast:En,disableButtons:Gu,disableInput:Yu,disableLoading:ii,enableButtons:Wu,enableInput:qu,getInput:Iu,getProgressSteps:Ju,handleAwaitingPromise:Jt,hideLoading:ii,isAwaitingPromise:ju,rejectPromise:Fu,resetValidationMessage:Zu,showValidationMessage:Xu,update:Qu},Symbol.toStringTag,{value:"Module"})),od=t=>{const e=x.innerParams.get(t);t.disableButtons(),e.input?hi(t,"confirm"):vo(t,!0)},rd=t=>{const e=x.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?hi(t,"deny"):bo(t,!1)},id=(t,e)=>{t.disableButtons(),e(ht.cancel)},hi=(t,e)=>{const n=x.innerParams.get(t);if(!n.input)return nt(`The "input" parameter is needed to be set when using returnInputValueOn${no(e)}`);const o=_u(t,n);n.inputValidator?sd(t,o,e):t.getInput().checkValidity()?e==="deny"?bo(t,o):vo(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},sd=(t,e,n)=>{const o=x.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>zt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?bo(t,e):vo(t,e)})},bo=(t,e)=>{const n=x.innerParams.get(t||void 0);n.showLoaderOnDeny&>(Ke()),n.preDeny?(x.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>zt(n.preDeny(e,n.validationMessage))).then(i=>{i===!1?(t.hideLoading(),Jt(t)):t.closePopup({isDenied:!0,value:typeof i>"u"?e:i})}).catch(i=>yi(t||void 0,i))):t.closePopup({isDenied:!0,value:e})},gi=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},yi=(t,e)=>{t.rejectPromise(e)},vo=(t,e)=>{const n=x.innerParams.get(t||void 0);n.showLoaderOnConfirm&>(),n.preConfirm?(t.resetValidationMessage(),x.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>zt(n.preConfirm(e,n.validationMessage))).then(i=>{he(wn())||i===!1?(t.hideLoading(),Jt(t)):gi(t,typeof i>"u"?e:i)}).catch(i=>yi(t||void 0,i))):gi(t,e)},ad=(t,e,n)=>{x.innerParams.get(t).toast?ld(t,e,n):(ud(e),dd(e),fd(t,e,n))},ld=(t,e,n)=>{e.popup.onclick=()=>{const o=x.innerParams.get(t);o&&(cd(o)||o.timer||o.input)||n(ht.close)}},cd=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Pn=!1;const ud=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Pn=!0)}}},dd=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Pn=!0)}}},fd=(t,e,n)=>{e.container.onclick=o=>{const i=x.innerParams.get(t);if(Pn){Pn=!1;return}o.target===e.container&&vn(i.allowOutsideClick)&&n(ht.backdrop)}},md=t=>typeof t=="object"&&t.jquery,bi=t=>t instanceof Element||md(t),pd=t=>{const e={};return typeof t[0]=="object"&&!bi(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const i=t[o];typeof i=="string"||bi(i)?e[n]=i:i!==void 0&&nt(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)}),e};function hd(...t){const e=this;return new e(...t)}function gd(t){class e extends this{_main(o,i){return super._main(o,Object.assign({},t,i))}}return e}const yd=()=>A.timeout&&A.timeout.getTimerLeft(),vi=()=>{if(A.timeout)return rc(),A.timeout.stop()},_i=()=>{if(A.timeout){const t=A.timeout.start();return uo(t),t}},bd=()=>{const t=A.timeout;return t&&(t.running?vi():_i())},vd=t=>{if(A.timeout){const e=A.timeout.increase(t);return uo(e,!0),e}},_d=()=>A.timeout&&A.timeout.isRunning();let wi=!1;const _o={};function wd(t="data-swal-template"){_o[t]=this,wi||(document.body.addEventListener("click",Sd),wi=!0)}const Sd=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in _o){const o=e.getAttribute(n);if(o){_o[n].fire({template:o});return}}},Cd=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:pd,bindClickHandler:wd,clickCancel:$u,clickConfirm:si,clickDeny:Ou,enableLoading:gt,fire:hd,getActions:Gt,getCancelButton:ot,getCloseButton:so,getConfirmButton:Ee,getContainer:J,getDenyButton:Ke,getFocusableElements:ao,getFooter:Hr,getHtmlContainer:_n,getIcon:Wt,getImage:Vr,getInputLabel:Ql,getLoader:mt,getPopup:R,getTimerLeft:yd,getTimerProgressBar:Sn,getTitle:Rr,getValidationMessage:wn,increaseTimer:vd,isDeprecatedParameter:io,isLoading:tc,isTimerRunning:_d,isUpdatableParameter:Dr,isValidParameter:Nr,isVisible:Au,mixin:gd,resumeTimer:_i,showLoading:gt,stopTimer:vi,toggleTimer:bd},Symbol.toStringTag,{value:"Module"}));let wo;class yt{constructor(...e){if(typeof window>"u")return;wo=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);x.promise.set(this,o)}_main(e,n={}){Zl(Object.assign({},n,e)),A.currentInstance&&(A.currentInstance._destroy(),lo()&&Qr()),A.currentInstance=this;const o=Ed(e,n);ou(o),Object.freeze(o),A.timeout&&(A.timeout.stop(),delete A.timeout),clearTimeout(A.restoreFocusTimeout);const i=Pd(this);return Jr(this,o),x.innerParams.set(this,o),kd(this,i,o)}then(e){return x.promise.get(this).then(e)}finally(e){return x.promise.get(this).finally(e)}}const kd=(t,e,n)=>new Promise((o,i)=>{const s=c=>{t.closePopup({isDismissed:!0,dismiss:c})};Zt.swalPromiseResolve.set(t,o),Zt.swalPromiseReject.set(t,i),e.confirmButton.onclick=()=>od(t),e.denyButton.onclick=()=>rd(t),e.cancelButton.onclick=()=>id(t,s),e.closeButton.onclick=()=>s(ht.close),ad(t,e,s),Lu(t,A,n,s),vu(t,n),pu(n),Td(A,n,s),Id(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ed=(t,e)=>{const n=Gc(t),o=Object.assign({},ft,e,n,t);return o.showClass=Object.assign({},ft.showClass,o.showClass),o.hideClass=Object.assign({},ft.hideClass,o.hideClass),o},Pd=t=>{const e={popup:R(),container:J(),actions:Gt(),confirmButton:Ee(),denyButton:Ke(),cancelButton:ot(),loader:mt(),closeButton:so(),validationMessage:wn(),progressSteps:jr()};return x.domCache.set(t,e),e},Td=(t,e,n)=>{const o=Sn();ee(o),e.timer&&(t.timeout=new ru(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(Y(o),ye(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&uo(e.timer)})))},Id=(t,e)=>{if(!e.toast){if(!vn(e.allowEnterKey))return Od();Ad(t,e)||go(e,-1,1)}},Ad=(t,e)=>e.focusDeny&&he(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&he(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&he(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Od=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(yt.prototype,pi),Object.assign(yt,Cd),Object.keys(pi).forEach(t=>{yt[t]=function(...e){if(wo)return wo[t](...e)}}),yt.DismissReason=ht,yt.version="11.4.8";const st=yt;st.default=st;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:Si,setPrototypeOf:Ci,isFrozen:$d,getPrototypeOf:Ld,getOwnPropertyDescriptor:xd}=Object;let{freeze:se,seal:be,create:ki}=Object,{apply:So,construct:Co}=typeof Reflect<"u"&&Reflect;se||(se=function(e){return e}),be||(be=function(e){return e}),So||(So=function(e,n,o){return e.apply(n,o)}),Co||(Co=function(e,n){return new e(...n)});const Tn=le(Array.prototype.forEach),Bd=le(Array.prototype.lastIndexOf),Ei=le(Array.prototype.pop),Qt=le(Array.prototype.push),Nd=le(Array.prototype.splice),In=le(String.prototype.toLowerCase),ko=le(String.prototype.toString),Pi=le(String.prototype.match),en=le(String.prototype.replace),Dd=le(String.prototype.indexOf),Md=le(String.prototype.trim),Pe=le(Object.prototype.hasOwnProperty),ae=le(RegExp.prototype.test),tn=Rd(TypeError);function le(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return So(t,e,o)}}function Rd(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Co(t,n)}}function B(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:In;Ci&&Ci(t,null);let o=e.length;for(;o--;){let i=e[o];if(typeof i=="string"){const s=n(i);s!==i&&($d(e)||(e[o]=s),i=s)}t[i]=!0}return t}function Vd(t){for(let e=0;e<t.length;e++)Pe(t,e)||(t[e]=null);return t}function De(t){const e=ki(null);for(const[n,o]of Si(t))Pe(t,n)&&(Array.isArray(o)?e[n]=Vd(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=De(o):e[n]=o);return e}function nn(t,e){for(;t!==null;){const o=xd(t,e);if(o){if(o.get)return le(o.get);if(typeof o.value=="function")return le(o.value)}t=Ld(t)}function n(){return null}return n}const Ti=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"]),Eo=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"]),Po=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"]),jd=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"]),To=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"]),Hd=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ii=se(["#text"]),Ai=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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),Io=se(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),Oi=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"]),An=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fd=be(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zd=be(/<%[\w\W]*|[\w\W]*%>/gm),Ud=be(/\$\{[\w\W]*/gm),Kd=be(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wd=be(/^aria-[\-\w]+$/),$i=be(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gd=be(/^(?:\w+script|data):/i),qd=be(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Li=be(/^html$/i),Yd=be(/^[a-z][.\w]*(-[.\w]+)+$/i);var xi=Object.freeze({__proto__:null,ARIA_ATTR:Wd,ATTR_WHITESPACE:qd,CUSTOM_ELEMENT:Yd,DATA_ATTR:Kd,DOCTYPE_NAME:Li,ERB_EXPR:zd,IS_ALLOWED_URI:$i,IS_SCRIPT_OR_DATA:Gd,MUSTACHE_EXPR:Fd,TMPLIT_EXPR:Ud});const on={element:1,text:3,progressingInstruction:7,comment:8,document:9},Xd=function(){return typeof window>"u"?null:window},Zd=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Bi=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ni(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xd();const e=P=>Ni(P);if(e.version="3.2.6",e.removed=[],!t||!t.document||t.document.nodeType!==on.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const o=n,i=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:l,Element:a,NodeFilter:u,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:p,trustedTypes:g}=t,_=a.prototype,w=nn(_,"cloneNode"),S=nn(_,"remove"),y=nn(_,"nextSibling"),I=nn(_,"childNodes"),k=nn(_,"parentNode");if(typeof c=="function"){const P=n.createElement("template");P.content&&P.content.ownerDocument&&(n=P.content.ownerDocument)}let b,E="";const{implementation:U,createNodeIterator:X,createDocumentFragment:ve,getElementsByTagName:te}=n,{importNode:_e}=o;let T=Bi();e.isSupported=typeof Si=="function"&&typeof k=="function"&&U&&U.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:j,ERB_EXPR:ne,TMPLIT_EXPR:ce,DATA_ATTR:Te,ARIA_ATTR:qe,IS_SCRIPT_OR_DATA:Me,ATTR_WHITESPACE:Re,CUSTOM_ELEMENT:Ye}=xi;let{IS_ALLOWED_URI:we}=xi,V=null;const $e=B({},[...Ti,...Eo,...Po,...To,...Ii]);let K=null;const Ve=B({},[...Ai,...Io,...Oi,...An]);let F=Object.seal(ki(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}})),Xe=null,rn=null,Ln=!0,sn=!0,xn=!1,Bn=!0,Ze=!1,vt=!0,je=!1,an=!1,ln=!1,Je=!1,_t=!1,wt=!1,Nn=!0,Dn=!1;const xo="user-content-";let cn=!0,at=!1,St={},Ct=null;const Ki=B({},["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 Wi=null;const Gi=B({},["audio","video","img","source","image","track"]);let Bo=null;const qi=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Mn="http://www.w3.org/1998/Math/MathML",Rn="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let kt=He,No=!1,Do=null;const xf=B({},[Mn,Rn,He],ko);let Vn=B({},["mi","mo","mn","ms","mtext"]),jn=B({},["annotation-xml"]);const Bf=B({},["title","style","font","a","script"]);let un=null;const Nf=["application/xhtml+xml","text/html"],Df="text/html";let G=null,Et=null;const Mf=n.createElement("form"),Yi=function(d){return d instanceof RegExp||d instanceof Function},Mo=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Et&&Et===d)){if((!d||typeof d!="object")&&(d={}),d=De(d),un=Nf.indexOf(d.PARSER_MEDIA_TYPE)===-1?Df:d.PARSER_MEDIA_TYPE,G=un==="application/xhtml+xml"?ko:In,V=Pe(d,"ALLOWED_TAGS")?B({},d.ALLOWED_TAGS,G):$e,K=Pe(d,"ALLOWED_ATTR")?B({},d.ALLOWED_ATTR,G):Ve,Do=Pe(d,"ALLOWED_NAMESPACES")?B({},d.ALLOWED_NAMESPACES,ko):xf,Bo=Pe(d,"ADD_URI_SAFE_ATTR")?B(De(qi),d.ADD_URI_SAFE_ATTR,G):qi,Wi=Pe(d,"ADD_DATA_URI_TAGS")?B(De(Gi),d.ADD_DATA_URI_TAGS,G):Gi,Ct=Pe(d,"FORBID_CONTENTS")?B({},d.FORBID_CONTENTS,G):Ki,Xe=Pe(d,"FORBID_TAGS")?B({},d.FORBID_TAGS,G):De({}),rn=Pe(d,"FORBID_ATTR")?B({},d.FORBID_ATTR,G):De({}),St=Pe(d,"USE_PROFILES")?d.USE_PROFILES:!1,Ln=d.ALLOW_ARIA_ATTR!==!1,sn=d.ALLOW_DATA_ATTR!==!1,xn=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Bn=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=d.SAFE_FOR_TEMPLATES||!1,vt=d.SAFE_FOR_XML!==!1,je=d.WHOLE_DOCUMENT||!1,Je=d.RETURN_DOM||!1,_t=d.RETURN_DOM_FRAGMENT||!1,wt=d.RETURN_TRUSTED_TYPE||!1,ln=d.FORCE_BODY||!1,Nn=d.SANITIZE_DOM!==!1,Dn=d.SANITIZE_NAMED_PROPS||!1,cn=d.KEEP_CONTENT!==!1,at=d.IN_PLACE||!1,we=d.ALLOWED_URI_REGEXP||$i,kt=d.NAMESPACE||He,Vn=d.MATHML_TEXT_INTEGRATION_POINTS||Vn,jn=d.HTML_INTEGRATION_POINTS||jn,F=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&Yi(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&Yi(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(F.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ze&&(sn=!1),_t&&(Je=!0),St&&(V=B({},Ii),K=[],St.html===!0&&(B(V,Ti),B(K,Ai)),St.svg===!0&&(B(V,Eo),B(K,Io),B(K,An)),St.svgFilters===!0&&(B(V,Po),B(K,Io),B(K,An)),St.mathMl===!0&&(B(V,To),B(K,Oi),B(K,An))),d.ADD_TAGS&&(V===$e&&(V=De(V)),B(V,d.ADD_TAGS,G)),d.ADD_ATTR&&(K===Ve&&(K=De(K)),B(K,d.ADD_ATTR,G)),d.ADD_URI_SAFE_ATTR&&B(Bo,d.ADD_URI_SAFE_ATTR,G),d.FORBID_CONTENTS&&(Ct===Ki&&(Ct=De(Ct)),B(Ct,d.FORBID_CONTENTS,G)),cn&&(V["#text"]=!0),je&&B(V,["html","head","body"]),V.table&&(B(V,["tbody"]),delete Xe.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw tn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=d.TRUSTED_TYPES_POLICY,E=b.createHTML("")}else b===void 0&&(b=Zd(g,i)),b!==null&&typeof E=="string"&&(E=b.createHTML(""));se&&se(d),Et=d}},Xi=B({},[...Eo,...Po,...jd]),Zi=B({},[...To,...Hd]),Rf=function(d){let v=k(d);(!v||!v.tagName)&&(v={namespaceURI:kt,tagName:"template"});const C=In(d.tagName),z=In(v.tagName);return Do[d.namespaceURI]?d.namespaceURI===Rn?v.namespaceURI===He?C==="svg":v.namespaceURI===Mn?C==="svg"&&(z==="annotation-xml"||Vn[z]):!!Xi[C]:d.namespaceURI===Mn?v.namespaceURI===He?C==="math":v.namespaceURI===Rn?C==="math"&&jn[z]:!!Zi[C]:d.namespaceURI===He?v.namespaceURI===Rn&&!jn[z]||v.namespaceURI===Mn&&!Vn[z]?!1:!Zi[C]&&(Bf[C]||!Xi[C]):!!(un==="application/xhtml+xml"&&Do[d.namespaceURI]):!1},Le=function(d){Qt(e.removed,{element:d});try{k(d).removeChild(d)}catch{S(d)}},Pt=function(d,v){try{Qt(e.removed,{attribute:v.getAttributeNode(d),from:v})}catch{Qt(e.removed,{attribute:null,from:v})}if(v.removeAttribute(d),d==="is")if(Je||_t)try{Le(v)}catch{}else try{v.setAttribute(d,"")}catch{}},Ji=function(d){let v=null,C=null;if(ln)d="<remove></remove>"+d;else{const W=Pi(d,/^[\r\n\t ]+/);C=W&&W[0]}un==="application/xhtml+xml"&&kt===He&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const z=b?b.createHTML(d):d;if(kt===He)try{v=new p().parseFromString(z,un)}catch{}if(!v||!v.documentElement){v=U.createDocument(kt,"template",null);try{v.documentElement.innerHTML=No?E:z}catch{}}const oe=v.body||v.documentElement;return d&&C&&oe.insertBefore(n.createTextNode(C),oe.childNodes[0]||null),kt===He?te.call(v,je?"html":"body")[0]:je?v.documentElement:oe},Qi=function(d){return X.call(d.ownerDocument||d,d,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ro=function(d){return d instanceof m&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof f)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},es=function(d){return typeof l=="function"&&d instanceof l};function Fe(P,d,v){Tn(P,C=>{C.call(e,d,v,Et)})}const ts=function(d){let v=null;if(Fe(T.beforeSanitizeElements,d,null),Ro(d))return Le(d),!0;const C=G(d.nodeName);if(Fe(T.uponSanitizeElement,d,{tagName:C,allowedTags:V}),vt&&d.hasChildNodes()&&!es(d.firstElementChild)&&ae(/<[/\w!]/g,d.innerHTML)&&ae(/<[/\w!]/g,d.textContent)||d.nodeType===on.progressingInstruction||vt&&d.nodeType===on.comment&&ae(/<[/\w]/g,d.data))return Le(d),!0;if(!V[C]||Xe[C]){if(!Xe[C]&&os(C)&&(F.tagNameCheck instanceof RegExp&&ae(F.tagNameCheck,C)||F.tagNameCheck instanceof Function&&F.tagNameCheck(C)))return!1;if(cn&&!Ct[C]){const z=k(d)||d.parentNode,oe=I(d)||d.childNodes;if(oe&&z){const W=oe.length;for(let fe=W-1;fe>=0;--fe){const ze=w(oe[fe],!0);ze.__removalCount=(d.__removalCount||0)+1,z.insertBefore(ze,y(d))}}}return Le(d),!0}return d instanceof a&&!Rf(d)||(C==="noscript"||C==="noembed"||C==="noframes")&&ae(/<\/no(script|embed|frames)/i,d.innerHTML)?(Le(d),!0):(Ze&&d.nodeType===on.text&&(v=d.textContent,Tn([j,ne,ce],z=>{v=en(v,z," ")}),d.textContent!==v&&(Qt(e.removed,{element:d.cloneNode()}),d.textContent=v)),Fe(T.afterSanitizeElements,d,null),!1)},ns=function(d,v,C){if(Nn&&(v==="id"||v==="name")&&(C in n||C in Mf))return!1;if(!(sn&&!rn[v]&&ae(Te,v))){if(!(Ln&&ae(qe,v))){if(!K[v]||rn[v]){if(!(os(d)&&(F.tagNameCheck instanceof RegExp&&ae(F.tagNameCheck,d)||F.tagNameCheck instanceof Function&&F.tagNameCheck(d))&&(F.attributeNameCheck instanceof RegExp&&ae(F.attributeNameCheck,v)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(v))||v==="is"&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&ae(F.tagNameCheck,C)||F.tagNameCheck instanceof Function&&F.tagNameCheck(C))))return!1}else if(!Bo[v]){if(!ae(we,en(C,Re,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&d!=="script"&&Dd(C,"data:")===0&&Wi[d])){if(!(xn&&!ae(Me,en(C,Re,"")))){if(C)return!1}}}}}}return!0},os=function(d){return d!=="annotation-xml"&&Pi(d,Ye)},rs=function(d){Fe(T.beforeSanitizeAttributes,d,null);const{attributes:v}=d;if(!v||Ro(d))return;const C={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let z=v.length;for(;z--;){const oe=v[z],{name:W,namespaceURI:fe,value:ze}=oe,dn=G(W),Vo=ze;let re=W==="value"?Vo:Md(Vo);if(C.attrName=dn,C.attrValue=re,C.keepAttr=!0,C.forceKeepAttr=void 0,Fe(T.uponSanitizeAttribute,d,C),re=C.attrValue,Dn&&(dn==="id"||dn==="name")&&(Pt(W,d),re=xo+re),vt&&ae(/((--!?|])>)|<\/(style|title)/i,re)){Pt(W,d);continue}if(C.forceKeepAttr)continue;if(!C.keepAttr){Pt(W,d);continue}if(!Bn&&ae(/\/>/i,re)){Pt(W,d);continue}Ze&&Tn([j,ne,ce],ss=>{re=en(re,ss," ")});const is=G(d.nodeName);if(!ns(is,dn,re)){Pt(W,d);continue}if(b&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!fe)switch(g.getAttributeType(is,dn)){case"TrustedHTML":{re=b.createHTML(re);break}case"TrustedScriptURL":{re=b.createScriptURL(re);break}}if(re!==Vo)try{fe?d.setAttributeNS(fe,W,re):d.setAttribute(W,re),Ro(d)?Le(d):Ei(e.removed)}catch{Pt(W,d)}}Fe(T.afterSanitizeAttributes,d,null)},Vf=function P(d){let v=null;const C=Qi(d);for(Fe(T.beforeSanitizeShadowDOM,d,null);v=C.nextNode();)Fe(T.uponSanitizeShadowNode,v,null),ts(v),rs(v),v.content instanceof s&&P(v.content);Fe(T.afterSanitizeShadowDOM,d,null)};return e.sanitize=function(P){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,C=null,z=null,oe=null;if(No=!P,No&&(P="<!-->"),typeof P!="string"&&!es(P))if(typeof P.toString=="function"){if(P=P.toString(),typeof P!="string")throw tn("dirty is not a string, aborting")}else throw tn("toString is not a function");if(!e.isSupported)return P;if(an||Mo(d),e.removed=[],typeof P=="string"&&(at=!1),at){if(P.nodeName){const ze=G(P.nodeName);if(!V[ze]||Xe[ze])throw tn("root node is forbidden and cannot be sanitized in-place")}}else if(P instanceof l)v=Ji("<!---->"),C=v.ownerDocument.importNode(P,!0),C.nodeType===on.element&&C.nodeName==="BODY"||C.nodeName==="HTML"?v=C:v.appendChild(C);else{if(!Je&&!Ze&&!je&&P.indexOf("<")===-1)return b&&wt?b.createHTML(P):P;if(v=Ji(P),!v)return Je?null:wt?E:""}v&&ln&&Le(v.firstChild);const W=Qi(at?P:v);for(;z=W.nextNode();)ts(z),rs(z),z.content instanceof s&&Vf(z.content);if(at)return P;if(Je){if(_t)for(oe=ve.call(v.ownerDocument);v.firstChild;)oe.appendChild(v.firstChild);else oe=v;return(K.shadowroot||K.shadowrootmode)&&(oe=_e.call(o,oe,!0)),oe}let fe=je?v.outerHTML:v.innerHTML;return je&&V["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ae(Li,v.ownerDocument.doctype.name)&&(fe="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
|
|
423
|
-
`+fe),Ze&&Tn([j,ne,ce],ze=>{fe=en(fe,ze," ")}),b&&wt?b.createHTML(fe):fe},e.setConfig=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mo(P),an=!0},e.clearConfig=function(){Et=null,an=!1},e.isValidAttribute=function(P,d,v){Et||Mo({});const C=G(P),z=G(d);return ns(C,z,v)},e.addHook=function(P,d){typeof d=="function"&&Qt(T[P],d)},e.removeHook=function(P,d){if(d!==void 0){const v=Bd(T[P],d);return v===-1?void 0:Nd(T[P],v,1)[0]}return Ei(T[P])},e.removeHooks=function(P){T[P]=[]},e.removeAllHooks=function(){T=Bi()},e}var Ao=Ni();class Di{get IsVisible(){return st.isVisible()}async CreateConfirmAsync(e){return new Promise(n=>{st.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:Ao.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Mi=()=>new Di,Jd=()=>new Di;function Qd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var On={exports:{}},ef=On.exports,Ri;function tf(){return Ri||(Ri=1,function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(ef,function(){var e=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},c=null;function l(w,S){var y=w[S];if(typeof y.bind=="function")return y.bind(w);try{return Function.prototype.bind.call(y,w)}catch{return function(){return Function.prototype.apply.apply(y,[w,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(w){return w==="debug"&&(w="log"),typeof console===n?!1:w==="trace"&&o?a:console[w]!==void 0?l(console,w):console.log!==void 0?l(console,"log"):e}function f(){for(var w=this.getLevel(),S=0;S<i.length;S++){var y=i[S];this[y]=S<w?e:this.methodFactory(y,w,this.name)}if(this.log=this.debug,typeof console===n&&w<this.levels.SILENT)return"No console available for logging"}function m(w){return function(){typeof console!==n&&(f.call(this),this[w].apply(this,arguments))}}function p(w,S,y){return u(w)||m.apply(this,arguments)}function g(w,S){var y=this,I,k,b,E="loglevel";typeof w=="string"?E+=":"+w:typeof w=="symbol"&&(E=void 0);function U(T){var j=(i[T]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=j;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+j+";"}catch{}}}function X(){var T;if(!(typeof window===n||!E)){try{T=window.localStorage[E]}catch{}if(typeof T===n)try{var j=window.document.cookie,ne=encodeURIComponent(E),ce=j.indexOf(ne+"=");ce!==-1&&(T=/^([^;]+)/.exec(j.slice(ce+ne.length+1))[1])}catch{}return y.levels[T]===void 0&&(T=void 0),T}}function ve(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function te(T){var j=T;if(typeof j=="string"&&y.levels[j.toUpperCase()]!==void 0&&(j=y.levels[j.toUpperCase()]),typeof j=="number"&&j>=0&&j<=y.levels.SILENT)return j;throw new TypeError("log.setLevel() called with invalid level: "+T)}y.name=w,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=S||p,y.getLevel=function(){return b??k??I},y.setLevel=function(T,j){return b=te(T),j!==!1&&U(b),f.call(y)},y.setDefaultLevel=function(T){k=te(T),X()||y.setLevel(T,!1)},y.resetLevel=function(){b=null,ve(),f.call(y)},y.enableAll=function(T){y.setLevel(y.levels.TRACE,T)},y.disableAll=function(T){y.setLevel(y.levels.SILENT,T)},y.rebuild=function(){if(c!==y&&(I=te(c.getLevel())),f.call(y),c===y)for(var T in s)s[T].rebuild()},I=te(c?c.getLevel():"WARN");var _e=X();_e!=null&&(b=te(_e)),f.call(y)}c=new g,c.getLogger=function(S){if(typeof S!="symbol"&&typeof S!="string"||S==="")throw new TypeError("You must supply a name when creating a logger.");var y=s[S];return y||(y=s[S]=new g(S,c.methodFactory)),y};var _=typeof window!==n?window.log:void 0;return c.noConflict=function(){return typeof window!==n&&window.log===c&&(window.log=_),c},c.getLoggers=function(){return s},c.default=c,c})}(On)),On.exports}var nf=tf();const $n=Qd(nf),of=(t,e={})=>{$n.setDefaultLevel(e.enableLogging?$n.levels.DEBUG:$n.levels.SILENT);const n=240;document.documentElement.style.setProperty("--nav-menu-width",`${n}px`);const o=r.ref(!0),i=r.ref(0),s=r.ref(!1),c=r.ref(!1),l=r.ref(""),a=r.ref(null),u=r.ref(0);t.provide(Lr,{navMenuWidth:n,isMenuOpened:o,ToggleMenu:()=>{o.value=!o.value},OpenMenu:()=>{o.value=!0},CloseMenu:()=>{o.value=!1},scrollY:i,pageTitle:l,isDarkMode:s,ToggleTheme:()=>Ft.Toggle(),EnableDarkMode:()=>Ft.EnableDarkMode(),EnableLightMode:()=>Ft.EnableLightMode(),ClearStoredTheme:()=>Ft.ClearStoredTheme(),LogoutAsync:async()=>{const m=Mi(),{oidc:p}=Hn.UseAuth();await m.ConfirmAsync("Deseja realmente sair da sua conta?")&&(Lo("Saindo..."),c.value=!0,await new Promise(_=>setTimeout(_,1e3)),p.logout({redirectUri:window.location.origin}).catch(()=>{c.value=!1,Ui()}))},Login:()=>{const{oidc:m}=Hn.UseAuth();m.login()},isLoggingOut:c,mainRef:a,mainWidth:u,isMainXs:r.computed(()=>u.value<=384),isMainSm:r.computed(()=>u.value>384),isMainMd:r.computed(()=>u.value>768),isMainLg:r.computed(()=>u.value>992),isMainXl:r.computed(()=>u.value>1280),isMain2Xl:r.computed(()=>u.value>1536),isMain3Xl:r.computed(()=>u.value>1920)}),new MutationObserver(()=>{s.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{i.value=document.documentElement.scrollTop}),Ft.SetInitialTheme()},rf=$n;class Oo extends Error{constructor(e=[]){const n=Array.isArray(e)?e:[e];super(n[0]),this.errors=n}errors=[]}class Vi{constructor(e=null){this._value=e,this._httpStatusCode=200}errors=[];_value=null;_httpStatusCode;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){if(Array.isArray(e)){e.forEach(n=>this.WithError(n));return}this.errors.push(e),this.isSuccessfulHttpStatusCode||(this._httpStatusCode=400)}get isSuccessfulHttpStatusCode(){return this._httpStatusCode>=200&&this._httpStatusCode<300}[Symbol.toPrimitive](e){if(e==="throw")throw new Oo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class ji{get IsVisible(){return st.isVisible()}async CreateAlertAsync(e){let n="info",o,i;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",i=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(s=>{st.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:i,html:`<div style="max-height: 50vh; overflow: auto">${Ao.sanitize(o)}</div>`}).then(()=>s(!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"})}}const Hi=()=>new ji,sf=()=>new ji;window.addEventListener("error",function(t){return $o(t.error)||console.error(t.error||t.message),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return $o(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const af=t=>{t.config.errorHandler=(e,n,o)=>{$o(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},$o=t=>{if(!t)return!0;try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Oo||t instanceof Vi?(Hi().AlertErrorAsync(t.errors),!0):!1},lf={class:"font-percentage"},Fi="--font-size-increment",cf="tamanho-fonte",uf=xe(r.defineComponent({__name:"FontSize",setup(t){const e=r.ref(!1),n=r.ref(0),o=()=>{n.value=Fn(),e.value=!0},i=()=>{e.value=!1},s=()=>document.documentElement,c=()=>parseInt(getComputedStyle(s()).getPropertyValue(Fi)||"1"),l=p=>{p<.5||p>1.6||(s().style.setProperty(Fi,p.toString()),m.value=p)},a=()=>{l(m.value+.1)},u=()=>{l(m.value-.1)},f=()=>{l(1)},m=r.ref(1);return r.onBeforeMount(()=>{localStorage.removeItem(cf)}),r.onMounted(()=>{m.value=c()}),(p,g)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Ie,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),e.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["border","fadein","font-size-wrapper"]),style:r.normalizeStyle({zIndex:n.value+1})},[r.createElementVNode("div",{class:"icon",onClick:u}),r.createElementVNode("span",lf,r.toDisplayString(m.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),r.createElementVNode("div",{class:"icon add",onClick:a}),r.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),r.createElementVNode("div",{class:"font-size-mask",style:r.normalizeStyle({zIndex:n.value}),onClick:i},null,4)],64)):r.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),df=r.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=Ht(),n=r.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(i,s)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),ff={class:"nav-menu-header"},mf={class:"nav-menu-inner-close"},pf={class:"main-content"},hf={class:"page-title"},gf={class:"action"},yf={id:"content"},bf={key:0,id:"logging-out"},vf={class:"info-fazenda"},_f={class:"font-bold"},wf={class:"info-endereco text-muted"},Sf={class:"footer-right"},Cf=xe(r.defineComponent({__name:"Main",props:{auth:{}},emits:["login"],setup(t,{emit:e}){const n=t,{navMenuWidth:o,isMenuOpened:i,pageTitle:s,scrollY:c,ToggleMenu:l,isDarkMode:a,ToggleTheme:u,CloseMenu:f,LogoutAsync:m,isLoggingOut:p,mainRef:g,mainWidth:_}=Ht(),w=r.ref(null),S=()=>{if(!w.value||!i.value)return!1;w.value.offsetWidth!==o&&f()};r.onMounted(()=>{if(as.useRouter().afterEach(()=>{S()}),g.value){let k=null;$r(g,b=>{r.nextTick(()=>{k&&clearTimeout(k),k=setTimeout(()=>{_.value=b[0].contentRect.width},10)}),_.value=b[0].contentRect.width}),_.value=g.value.clientWidth}});const y=e;return(I,k)=>(r.openBlock(),r.createElementBlock("main",{ref_key:"mainRef",ref:g,class:r.normalizeClass({disabled:r.unref(p),"nav-menu-visible":r.unref(i)})},[r.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:w,class:r.normalizeClass({"nav-menu-hidden":!r.unref(i)})},[r.createElementVNode("div",ff,[k[1]||(k[1]=r.createElementVNode("span",null,"Menu",-1)),r.createElementVNode("div",mf,[r.createVNode(Ie,{button:!0,icon:"close",onClick:r.unref(l)},null,8,["onClick"])])]),r.renderSlot(I.$slots,"nav-menu",{},void 0,!0)],2),r.createElementVNode("div",pf,[r.createElementVNode("div",{id:"top-bar",class:r.normalizeClass({"shadow-bottom":r.unref(c)>72})},[r.createVNode(Ie,{button:!0,icon:r.unref(i)?"menu_open":"menu",tooltip:"Menu",onClick:r.unref(l)},null,8,["icon","onClick"]),r.createElementVNode("div",hf,r.toDisplayString(r.unref(p)?"Saindo...":r.unref(s)),1),k[2]||(k[2]=r.createElementVNode("span",{class:"sep"},null,-1)),r.createElementVNode("div",gf,[r.createVNode(Ie,{button:!0,size:"sm",icon:r.unref(a)?"light_mode":"dark_mode",tooltip:r.unref(a)?"Modo claro":"Modo escuro",onClick:r.unref(u)},null,8,["icon","tooltip","onClick"]),r.createVNode(uf),n.auth?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n.auth.isAuthenticated?(r.openBlock(),r.createBlock(Ie,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:r.unref(m)},null,8,["onClick"])):(r.openBlock(),r.createBlock(Ie,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:k[0]||(k[0]=b=>y("login"))}))],64)):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",yf,[r.unref(p)?(r.openBlock(),r.createElementBlock("div",bf,[r.createVNode(Ho)])):r.renderSlot(I.$slots,"content",{key:1},void 0,!0)])]),r.createElementVNode("footer",null,[k[5]||(k[5]=r.createElementVNode("div",{class:"logo-fazenda"},null,-1)),r.createElementVNode("div",vf,[r.createElementVNode("span",_f,[r.renderSlot(I.$slots,"footer-nome-fazenda",{},()=>[k[3]||(k[3]=r.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),r.createElementVNode("span",wf,[r.renderSlot(I.$slots,"footer-endereco-fazenda",{},()=>[k[4]||(k[4]=r.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])]),r.createElementVNode("div",Sf,[r.renderSlot(I.$slots,"footer-right",{},void 0,!0)])]),r.createVNode(df)],2))}}),[["__scopeId","data-v-5108e4ac"]]),kf=r.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=Ht(),n=t;return r.watchEffect(()=>{document.title=n.title,e.value=n.title}),(o,i)=>null}}),bt=t=>{const e=t==="light"?"0, 0, 0":"198, 198, 198";return`0 1px 3px 0 rgba(${e}, 0.1), 0 1px 2px -1px rgba(${e}, 0.1);`},zi={surface:{0:"var(--surface-0-color)",50:"var(--surface-100-color)",100:"var(--surface-100-color)",200:"var(--surface-200-color)",300:"var(--surface-300-color)",400:"var(--surface-400-color)",500:"var(--surface-1000-color)",600:"var(--surface-600-color)",700:"var(--surface-700-color)",800:"var(--surface-800-color)",900:"var(--surface-900-color)",950:"var(--surface-1000-color)"},primary:{color:"var(--primary-color)",contrastColor:"var(--bg-color)",hoverColor:"var(--primary-hover-color)",activeColor:"var(--primary-color)"},highlight:{background:"var(--primary-color)",color:"var(--bg-color)"},formField:{background:"var(--surface-0-color)",disabledBackground:"var(--surface-0-color)",filledBackground:"var(--surface-100-color)",filledFocusBackground:"var(--surface-100-color)",borderColor:"var(--surface-1000-color)",hoverBorderColor:"var(--primary-color)",focusBorderColor:"var(--primary-color)",invalidBorderColor:"var(--error-color)",color:"var(--text-color)",disabledColor:"var(--disabled-color)",placeholderColor:"var(--muted-color)",floatLabelColor:"var(--secondary-color)",floatLabelFocusColor:"var(--secondary-color)",floatLabelInvalidColor:"var(--error-color)",iconColor:"var(--primary-color)"},text:{color:"var(--text-color)",hoverColor:"var(--primary-color)",mutedColor:"var(--muted-color)",hoverMutedColor:"var(--muted-color)"},mask:{background:"var(--maskbg-color)",color:"var(--surface-200-color)"},content:{background:"var(--bg-color)",color:"var(--text-color)",border:{color:"var(--surface-1000-color)",radius:"var(--border-radius)"},hover:{background:"var(--primary-hover-color)",color:"var(--primary-color)"}}},Ef={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"var(--primary-color)",100:"var(--primary-color)",200:"var(--primary-color)",300:"var(--primary-color)",400:"var(--primary-color)",500:"var(--primary-color)",600:"var(--primary-color)",700:"var(--primary-color)",800:"var(--primary-color)",900:"var(--primary-color)",950:"var(--primary-color)"},colorScheme:{light:{...zi},dark:{...zi}}},components:{blockui:{root:{borderRadius:"0px"}},button:{root:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{paddingX:"0.625rem",paddingY:"0.375rem"},lg:{paddingX:"0.875rem",paddingY:"0.575rem"},primary:{hoverBackground:"var(--primary-color) !important",hoverBorderColor:"var(--primary-color) !important"}},text:{secondary:{color:"var(--secondary-color) !important",hoverBackground:"var(--surface-200-color) !important"}}},card:{root:{borderRadius:"var(--border-radius)"},title:{fontWeight:"700",fontSize:"var(--text-md)"},body:{padding:"var(--content-gutter)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:bt("dark")}}}},checkbox:{root:{background:"var(--surface-200-color) !important",borderColor:"var(--muted-color) !important",borderRadius:"var(--border-radius) !important",checkedBackground:"var(--primary-color) !important",checkedHoverBackground:"var(--primary-color) !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"var(--border-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:bt("dark")}}}},datatable:{root:{borderColor:"var(--border-color) !important"},header:{borderColor:"var(--border-color) !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"var(--border-color) !important",hoverColor:"var(--primary-color) !important",hoverBackground:"var(--primary-hover-color) !important"},bodyCell:{borderColor:"var(--border-color) !important"},footer:{borderColor:"var(--border-color) !important"},colorScheme:{light:{header:{background:"var(--bg-color)",color:"var(--text-color)"},headerCell:{background:"var(--bg-color)"},footerCell:{background:"var(--bg-color)"},row:{background:"var(--bg-color)",stripedBackground:"var(--surface-300-color)"}},dark:{header:{background:"var(--surface-300-color)",color:"var(--text-color)"},headerCell:{background:"var(--surface-300-color)"},footerCell:{background:"var(--surface-300-color)"},row:{stripedBackground:"var(--bg-color)",background:"var(--surface-300-color)"}}}},datepicker:{today:{background:"var(--primary-hover-color) !important",color:"var(--primary-color) !important"}},dialog:{root:{background:"var(--bg-color) !important",color:"var(--text-color) !important",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important"},title:{fontSize:"var(--font-size) !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"},content:{padding:"var(--content-gutter) !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"}},inputtext:{root:{background:"var(--surface-100-color)",color:"var(--text-color)",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important",hoverBorderColor:"var(--primary-color) !important",placeholderColor:"var(--muted-color)"}},menu:{item:{focusBackground:"var(--surface-400-color)",focusColor:"var(--text-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-200-color)",shadow:bt("dark")}}}},popover:{root:{background:"var(--bg-color)",color:"var(--text-color)",borderColor:"var(--border-color)",borderRadius:"var(--border-radius)",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"var(--bg-color)",color:"var(--text-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)",disabledColor:"var(--disabled-color)"},option:{focusBackground:"var(--surface-200-color)",focusColor:"var(--primary-color)",selectedFocusColor:"var(--bg-color)",selectedFocusBackground:"var(--primary-color)"},overlay:{borderColor:"var(--border-color)"},dropdown:{color:"var(--primary-color)"},colorScheme:{light:{overlay:{background:"var(--bg-color)"}},dark:{overlay:{background:"var(--surface-100-color)"}}}},skeleton:{root:{background:"var(--surface-700-color)",animationBackground:"var(--surface-100-color)"}},textarea:{root:{background:"var(--surface-100-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"var(--text-color)",color:"var(--bg-color)",detailColor:"var(--bg-color)"}},dark:{contrast:{background:"var(--bg-color)",color:"var(--text-color)",detailColor:"var(--text-color)"}}},info:{background:"var(--info-color)",color:"var(--info-hover-color)",detailColor:"var(--text-color)"},success:{background:"var(--success-color)",color:"var(--success-hover-color)",detailColor:"var(--text-color)"},warn:{background:"var(--warn-color)",color:"var(--warn-hover-color)",detailColor:"var(--text-color)"},error:{background:"var(--error-color)",color:"var(--error-hover-color)",detailColor:"var(--text-color)"},secondary:{background:"var(--secondary-color)",color:"var(--secondary-hover-color)",detailColor:"var(--text-color)"}}}};class Ge{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const i of e)n+=`, ${i}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(i=>{const s=getComputedStyle(i).zIndex;return+s==+s?+s:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,i=e.toString();return n.replace(/#/g,()=>i[o++]||"")}static MaskCpf(e){return Ge.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return Ge.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return Ge.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e){return new Promise(n=>setTimeout(n,e))}}class Pf{sub;username;name;email;roles;groups;userinfo;department;jobTitle;idp;constructor(e){this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?Ge.MaskCpf(this.username):this.username.length===14?Ge.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){const e=this.userinfo?.identity_provider??null;return e?.toLocaleLowerCase()==="gov.br"?"govbr":e?.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){return this.userinfo?.department??null}SetJobTitle(){return this.userinfo?.jobTitle??null}}function Tf(){const t=r.ref("development");function e(a){t.value=a.toLocaleLowerCase()}const n=r.computed(()=>t.value==="development"),o=r.computed(()=>t.value==="pack"),i=r.computed(()=>t.value==="hml"),s=r.computed(()=>t.value==="production"),c=r.ref(null);function l(){c.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:i,isProd:s,user:c,$reset:l}}const If=t=>{const e=new Set;function n(o){const{name:i,children:s}=o;if(i){if(e.has(i))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${i}`].join(`
|
|
423
|
+
`+fe),Ze&&Tn([j,ne,ce],ze=>{fe=en(fe,ze," ")}),b&&wt?b.createHTML(fe):fe},e.setConfig=function(){let P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mo(P),an=!0},e.clearConfig=function(){Et=null,an=!1},e.isValidAttribute=function(P,d,v){Et||Mo({});const C=G(P),z=G(d);return ns(C,z,v)},e.addHook=function(P,d){typeof d=="function"&&Qt(T[P],d)},e.removeHook=function(P,d){if(d!==void 0){const v=Bd(T[P],d);return v===-1?void 0:Nd(T[P],v,1)[0]}return Ei(T[P])},e.removeHooks=function(P){T[P]=[]},e.removeAllHooks=function(){T=Bi()},e}var Ao=Ni();class Di{get IsVisible(){return st.isVisible()}async CreateConfirmAsync(e){return new Promise(n=>{st.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:Ao.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Mi=()=>new Di,Jd=()=>new Di;function Qd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var On={exports:{}},ef=On.exports,Ri;function tf(){return Ri||(Ri=1,function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(ef,function(){var e=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},c=null;function l(w,S){var y=w[S];if(typeof y.bind=="function")return y.bind(w);try{return Function.prototype.bind.call(y,w)}catch{return function(){return Function.prototype.apply.apply(y,[w,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(w){return w==="debug"&&(w="log"),typeof console===n?!1:w==="trace"&&o?a:console[w]!==void 0?l(console,w):console.log!==void 0?l(console,"log"):e}function f(){for(var w=this.getLevel(),S=0;S<i.length;S++){var y=i[S];this[y]=S<w?e:this.methodFactory(y,w,this.name)}if(this.log=this.debug,typeof console===n&&w<this.levels.SILENT)return"No console available for logging"}function m(w){return function(){typeof console!==n&&(f.call(this),this[w].apply(this,arguments))}}function p(w,S,y){return u(w)||m.apply(this,arguments)}function g(w,S){var y=this,I,k,b,E="loglevel";typeof w=="string"?E+=":"+w:typeof w=="symbol"&&(E=void 0);function U(T){var j=(i[T]||"silent").toUpperCase();if(!(typeof window===n||!E)){try{window.localStorage[E]=j;return}catch{}try{window.document.cookie=encodeURIComponent(E)+"="+j+";"}catch{}}}function X(){var T;if(!(typeof window===n||!E)){try{T=window.localStorage[E]}catch{}if(typeof T===n)try{var j=window.document.cookie,ne=encodeURIComponent(E),ce=j.indexOf(ne+"=");ce!==-1&&(T=/^([^;]+)/.exec(j.slice(ce+ne.length+1))[1])}catch{}return y.levels[T]===void 0&&(T=void 0),T}}function ve(){if(!(typeof window===n||!E)){try{window.localStorage.removeItem(E)}catch{}try{window.document.cookie=encodeURIComponent(E)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function te(T){var j=T;if(typeof j=="string"&&y.levels[j.toUpperCase()]!==void 0&&(j=y.levels[j.toUpperCase()]),typeof j=="number"&&j>=0&&j<=y.levels.SILENT)return j;throw new TypeError("log.setLevel() called with invalid level: "+T)}y.name=w,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=S||p,y.getLevel=function(){return b??k??I},y.setLevel=function(T,j){return b=te(T),j!==!1&&U(b),f.call(y)},y.setDefaultLevel=function(T){k=te(T),X()||y.setLevel(T,!1)},y.resetLevel=function(){b=null,ve(),f.call(y)},y.enableAll=function(T){y.setLevel(y.levels.TRACE,T)},y.disableAll=function(T){y.setLevel(y.levels.SILENT,T)},y.rebuild=function(){if(c!==y&&(I=te(c.getLevel())),f.call(y),c===y)for(var T in s)s[T].rebuild()},I=te(c?c.getLevel():"WARN");var _e=X();_e!=null&&(b=te(_e)),f.call(y)}c=new g,c.getLogger=function(S){if(typeof S!="symbol"&&typeof S!="string"||S==="")throw new TypeError("You must supply a name when creating a logger.");var y=s[S];return y||(y=s[S]=new g(S,c.methodFactory)),y};var _=typeof window!==n?window.log:void 0;return c.noConflict=function(){return typeof window!==n&&window.log===c&&(window.log=_),c},c.getLoggers=function(){return s},c.default=c,c})}(On)),On.exports}var nf=tf();const $n=Qd(nf),of=(t,e={})=>{$n.setDefaultLevel(e.enableLogging?$n.levels.DEBUG:$n.levels.SILENT);const n=240;document.documentElement.style.setProperty("--nav-menu-width",`${n}px`);const o=r.ref(!0),i=r.ref(0),s=r.ref(!1),c=r.ref(!1),l=r.ref(""),a=r.ref(null),u=r.ref(0);t.provide(Lr,{navMenuWidth:n,isMenuOpened:o,ToggleMenu:()=>{o.value=!o.value},OpenMenu:()=>{o.value=!0},CloseMenu:()=>{o.value=!1},scrollY:i,pageTitle:l,isDarkMode:s,ToggleTheme:()=>Ft.Toggle(),EnableDarkMode:()=>Ft.EnableDarkMode(),EnableLightMode:()=>Ft.EnableLightMode(),ClearStoredTheme:()=>Ft.ClearStoredTheme(),LogoutAsync:async()=>{const m=Mi(),{oidc:p}=Hn.UseAuth();await m.ConfirmAsync("Deseja realmente sair da sua conta?")&&(Lo("Saindo..."),c.value=!0,await new Promise(_=>setTimeout(_,1e3)),p.logout({redirectUri:window.location.origin}).catch(()=>{c.value=!1,Ui()}))},Login:()=>{const{oidc:m}=Hn.UseAuth();m.login()},isLoggingOut:c,mainRef:a,mainWidth:u,isMainXs:r.computed(()=>u.value<=384),isMainSm:r.computed(()=>u.value>384),isMainMd:r.computed(()=>u.value>768),isMainLg:r.computed(()=>u.value>992),isMainXl:r.computed(()=>u.value>1280),isMain2Xl:r.computed(()=>u.value>1536),isMain3Xl:r.computed(()=>u.value>1920)}),new MutationObserver(()=>{s.value=document.documentElement.classList.contains("dark")}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.addEventListener("scroll",()=>{i.value=document.documentElement.scrollTop}),Ft.SetInitialTheme()},rf=$n;class Oo extends Error{constructor(e=[]){const n=Array.isArray(e)?e:[e];super(n[0]),this.errors=n}errors=[]}class Vi{constructor(e=null){this._value=e,this._httpStatusCode=200}errors=[];_value=null;_httpStatusCode;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){if(Array.isArray(e)){e.forEach(n=>this.WithError(n));return}this.errors.push(e),this.isSuccessfulHttpStatusCode||(this._httpStatusCode=400)}get isSuccessfulHttpStatusCode(){return this._httpStatusCode>=200&&this._httpStatusCode<300}[Symbol.toPrimitive](e){if(e==="throw")throw new Oo(this.errors)}get firstError(){return this.hasSuccess?null:this.errors[0]}}class ji{get IsVisible(){return st.isVisible()}async CreateAlertAsync(e){let n="info",o,i;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",i=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(s=>{st.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:i,html:`<div style="max-height: 50vh; overflow: auto">${Ao.sanitize(o)}</div>`}).then(()=>s(!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"})}}const Hi=()=>new ji,sf=()=>new ji;window.addEventListener("error",function(t){return $o(t.error)||console.error(t.error||t.message),t.preventDefault(),!1}),window.addEventListener("unhandledrejection",function(t){return $o(t.reason)||console.error("Unhandled Rejection",t.reason),t.preventDefault(),!1});const af=t=>{t.config.errorHandler=(e,n,o)=>{$o(e)||console.error("Vue Global Error Handler: ",{err:e,vm:n,info:o})}},$o=t=>{if(!t)return!0;try{if(t.httpStatusCode===401)return!0}catch{}return t instanceof Oo||t instanceof Vi?(Hi().AlertErrorAsync(t.errors),!0):!1},lf={class:"font-percentage"},Fi="--font-size-increment",cf="tamanho-fonte",uf=xe(r.defineComponent({__name:"FontSize",setup(t){const e=r.ref(!1),n=r.ref(0),o=()=>{n.value=Fn(),e.value=!0},i=()=>{e.value=!1},s=()=>document.documentElement,c=()=>parseInt(getComputedStyle(s()).getPropertyValue(Fi)||"1"),l=p=>{p<.5||p>1.6||(s().style.setProperty(Fi,p.toString()),m.value=p)},a=()=>{l(m.value+.1)},u=()=>{l(m.value-.1)},f=()=>{l(1)},m=r.ref(1);return r.onBeforeMount(()=>{localStorage.removeItem(cf)}),r.onMounted(()=>{m.value=c()}),(p,g)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Ie,{button:!0,size:"sm",icon:"text_increase",tooltip:"Tamanho da fonte",onClick:o}),e.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createElementVNode("div",{class:r.normalizeClass(["border","fadein","font-size-wrapper"]),style:r.normalizeStyle({zIndex:n.value+1})},[r.createElementVNode("div",{class:"icon",onClick:u}),r.createElementVNode("span",lf,r.toDisplayString(m.value.toLocaleString("pt-br",{style:"percent",maximumFractionDigits:0})),1),r.createElementVNode("div",{class:"icon add",onClick:a}),r.createElementVNode("span",{class:"redefinir",onClick:f}," Redefinir ")],4),r.createElementVNode("div",{class:"font-size-mask",style:r.normalizeStyle({zIndex:n.value}),onClick:i},null,4)],64)):r.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d17f4a5f"]]),df=r.defineComponent({__name:"ScrollToTop",setup(t){const{scrollY:e}=Ht(),n=r.computed(()=>e.value>800);function o(){document.documentElement.scrollTo(0,0)}return(i,s)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":n.value}]),onClick:o},null,2))}}),ff={class:"nav-menu-header"},mf={class:"nav-menu-inner-close"},pf={class:"main-content"},hf={class:"page-title"},gf={class:"action"},yf={id:"content"},bf={key:0,id:"logging-out"},vf={class:"info-fazenda"},_f={class:"font-bold"},wf={class:"info-endereco text-muted"},Sf={class:"footer-right"},Cf=xe(r.defineComponent({__name:"Main",props:{auth:{}},emits:["login"],setup(t,{emit:e}){const n=t,{navMenuWidth:o,isMenuOpened:i,pageTitle:s,scrollY:c,ToggleMenu:l,isDarkMode:a,ToggleTheme:u,CloseMenu:f,LogoutAsync:m,isLoggingOut:p,mainRef:g,mainWidth:_}=Ht(),w=r.ref(null),S=()=>{if(!w.value||!i.value)return!1;w.value.offsetWidth!==o&&f()};r.onMounted(()=>{if(as.useRouter().afterEach(()=>{S()}),g.value){let k=null;$r(g,b=>{r.nextTick(()=>{k&&clearTimeout(k),k=setTimeout(()=>{_.value=b[0].contentRect.width},10)}),_.value=b[0].contentRect.width}),_.value=g.value.clientWidth}});const y=e;return(I,k)=>(r.openBlock(),r.createElementBlock("main",{ref_key:"mainRef",ref:g,class:r.normalizeClass({disabled:r.unref(p),"nav-menu-visible":r.unref(i)})},[r.createElementVNode("aside",{id:"nav-menu",ref_key:"navMenuRef",ref:w,class:r.normalizeClass({"nav-menu-hidden":!r.unref(i)})},[r.createElementVNode("div",ff,[k[1]||(k[1]=r.createElementVNode("span",null,"Menu",-1)),r.createElementVNode("div",mf,[r.createVNode(Ie,{button:!0,icon:"close",onClick:r.unref(l)},null,8,["onClick"])])]),r.renderSlot(I.$slots,"nav-menu",{},void 0,!0)],2),r.createElementVNode("div",pf,[r.createElementVNode("div",{id:"top-bar",class:r.normalizeClass({"shadow-bottom":r.unref(c)>72})},[r.createVNode(Ie,{button:!0,icon:r.unref(i)?"menu_open":"menu",tooltip:"Menu",onClick:r.unref(l)},null,8,["icon","onClick"]),r.createElementVNode("div",hf,r.toDisplayString(r.unref(p)?"Saindo...":r.unref(s)),1),k[2]||(k[2]=r.createElementVNode("span",{class:"sep"},null,-1)),r.createElementVNode("div",gf,[r.createVNode(Ie,{button:!0,size:"sm",icon:r.unref(a)?"light_mode":"dark_mode",tooltip:r.unref(a)?"Modo claro":"Modo escuro",onClick:r.unref(u)},null,8,["icon","tooltip","onClick"]),r.createVNode(uf),n.auth?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n.auth.isAuthenticated?(r.openBlock(),r.createBlock(Ie,{key:0,button:!0,size:"sm",icon:"logout",tooltip:"Sair",onClick:r.unref(m)},null,8,["onClick"])):(r.openBlock(),r.createBlock(Ie,{key:1,button:!0,size:"sm",icon:"login",tooltip:"Entrar",onClick:k[0]||(k[0]=b=>y("login"))}))],64)):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",yf,[r.unref(p)?(r.openBlock(),r.createElementBlock("div",bf,[r.createVNode(Ho)])):r.renderSlot(I.$slots,"content",{key:1},void 0,!0)])]),r.createElementVNode("footer",null,[k[5]||(k[5]=r.createElementVNode("div",{class:"logo-fazenda"},null,-1)),r.createElementVNode("div",vf,[r.createElementVNode("span",_f,[r.renderSlot(I.$slots,"footer-nome-fazenda",{},()=>[k[3]||(k[3]=r.createTextVNode(" SECRETARIA MUNICIPAL DA FAZENDA "))],!0)]),r.createElementVNode("span",wf,[r.renderSlot(I.$slots,"footer-endereco-fazenda",{},()=>[k[4]||(k[4]=r.createTextVNode(" Rua Líbero Badaró, 190 - Centro - São Paulo - SP - CEP 01008-000 "))],!0)])]),r.createElementVNode("div",Sf,[r.renderSlot(I.$slots,"footer-right",{},void 0,!0)])]),r.createVNode(df)],2))}}),[["__scopeId","data-v-5108e4ac"]]),kf=r.defineComponent({__name:"PageTitle",props:{title:{}},setup(t){const{pageTitle:e}=Ht(),n=t;return r.watchEffect(()=>{document.title=n.title,e.value=n.title}),(o,i)=>null}}),bt=t=>{const e=t==="light"?"0, 0, 0":"198, 198, 198";return`0 1px 3px 0 rgba(${e}, 0.1), 0 1px 2px -1px rgba(${e}, 0.1);`},zi={surface:{0:"var(--surface-0-color)",50:"var(--surface-100-color)",100:"var(--surface-100-color)",200:"var(--surface-200-color)",300:"var(--surface-300-color)",400:"var(--surface-400-color)",500:"var(--surface-1000-color)",600:"var(--surface-600-color)",700:"var(--surface-700-color)",800:"var(--surface-800-color)",900:"var(--surface-900-color)",950:"var(--surface-1000-color)"},primary:{color:"var(--primary-color)",contrastColor:"var(--bg-color)",hoverColor:"var(--primary-hover-color)",activeColor:"var(--primary-color)"},highlight:{background:"var(--primary-color)",color:"var(--bg-color)"},formField:{background:"var(--surface-0-color)",disabledBackground:"var(--surface-0-color)",filledBackground:"var(--surface-100-color)",filledFocusBackground:"var(--surface-100-color)",borderColor:"var(--surface-1000-color)",hoverBorderColor:"var(--primary-color)",focusBorderColor:"var(--primary-color)",invalidBorderColor:"var(--error-color)",color:"var(--text-color)",disabledColor:"var(--disabled-color)",placeholderColor:"var(--muted-color)",floatLabelColor:"var(--secondary-color)",floatLabelFocusColor:"var(--secondary-color)",floatLabelInvalidColor:"var(--error-color)",iconColor:"var(--primary-color)"},text:{color:"var(--text-color)",hoverColor:"var(--primary-color)",mutedColor:"var(--muted-color)",hoverMutedColor:"var(--muted-color)"},mask:{background:"var(--maskbg-color)",color:"var(--surface-200-color)"},content:{background:"var(--bg-color)",color:"var(--text-color)",border:{color:"var(--surface-1000-color)",radius:"var(--border-radius)"},hover:{background:"var(--primary-hover-color)",color:"var(--primary-color)"}}},Ef={semantic:{disabled:{opacity:"1"},transitionDuration:"0",primary:{50:"var(--primary-color)",100:"var(--primary-color)",200:"var(--primary-color)",300:"var(--primary-color)",400:"var(--primary-color)",500:"var(--primary-color)",600:"var(--primary-color)",700:"var(--primary-color)",800:"var(--primary-color)",900:"var(--primary-color)",950:"var(--primary-color)"},colorScheme:{light:{...zi},dark:{...zi}}},components:{blockui:{root:{borderRadius:"0px"}},button:{root:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{paddingX:"0.625rem",paddingY:"0.375rem"},lg:{paddingX:"0.875rem",paddingY:"0.575rem"},primary:{hoverBackground:"var(--primary-color) !important",hoverBorderColor:"var(--primary-color) !important"}},text:{secondary:{color:"var(--secondary-color) !important",hoverBackground:"var(--surface-200-color) !important"}}},card:{root:{borderRadius:"var(--border-radius)"},title:{fontWeight:"700",fontSize:"var(--text-md)"},body:{padding:"var(--content-gutter)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:bt("dark")}}}},checkbox:{root:{background:"var(--surface-200-color) !important",borderColor:"var(--muted-color) !important",borderRadius:"var(--border-radius) !important",checkedBackground:"var(--primary-color) !important",checkedHoverBackground:"var(--primary-color) !important",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}}},confirmpopup:{root:{borderColor:"var(--border-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-300-color)",shadow:bt("dark")}}}},datatable:{root:{borderColor:"var(--border-color) !important"},header:{borderColor:"var(--border-color) !important",padding:"0 0 var(--content-gutter) 0",sm:{padding:"0 0 var(--content-gutter-sm) 0"}},headerCell:{borderColor:"var(--border-color) !important",hoverColor:"var(--primary-color) !important",hoverBackground:"var(--primary-hover-color) !important"},bodyCell:{borderColor:"var(--border-color) !important"},footer:{borderColor:"var(--border-color) !important"},colorScheme:{light:{header:{background:"var(--bg-color)",color:"var(--text-color)"},headerCell:{background:"var(--bg-color)"},footerCell:{background:"var(--bg-color)"},row:{background:"var(--bg-color)",stripedBackground:"var(--surface-300-color)"}},dark:{header:{background:"var(--surface-300-color)",color:"var(--text-color)"},headerCell:{background:"var(--surface-300-color)"},footerCell:{background:"var(--surface-300-color)"},row:{stripedBackground:"var(--bg-color)",background:"var(--surface-300-color)"}}}},datepicker:{today:{background:"var(--primary-hover-color) !important",color:"var(--primary-color) !important"}},dialog:{root:{background:"var(--bg-color) !important",color:"var(--text-color) !important",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important"},title:{fontSize:"var(--font-size) !important",fontWeight:"700 !important"},header:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"},content:{padding:"var(--content-gutter) !important"},footer:{padding:"0.75rem 0.75rem 0 1rem !important",gap:"var(--content-gutter-sm) !important"}},inputtext:{root:{background:"var(--surface-100-color)",color:"var(--text-color)",borderColor:"var(--border-color) !important",borderRadius:"var(--border-radius) !important",shadow:"none !important",hoverBorderColor:"var(--primary-color) !important",placeholderColor:"var(--muted-color)"}},menu:{item:{focusBackground:"var(--surface-400-color)",focusColor:"var(--text-color)"},colorScheme:{light:{root:{background:"var(--bg-color)",shadow:bt("light")}},dark:{root:{background:"var(--surface-200-color)",shadow:bt("dark")}}}},popover:{root:{background:"var(--bg-color)",color:"var(--text-color)",borderColor:"var(--border-color)",borderRadius:"var(--border-radius)",shadow:"none",gutter:"8px",arrowOffset:"0.75rem"},content:{padding:"0"}},select:{root:{background:"var(--bg-color)",color:"var(--text-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)",disabledColor:"var(--disabled-color)"},option:{focusBackground:"var(--surface-200-color)",focusColor:"var(--primary-color)",selectedFocusColor:"var(--bg-color)",selectedFocusBackground:"var(--primary-color)"},overlay:{borderColor:"var(--border-color)"},dropdown:{color:"var(--primary-color)"},colorScheme:{light:{overlay:{background:"var(--bg-color)"}},dark:{overlay:{background:"var(--surface-100-color)"}}}},skeleton:{root:{background:"var(--surface-700-color)",animationBackground:"var(--surface-100-color)"}},textarea:{root:{background:"var(--surface-100-color)",hoverBorderColor:"var(--primary-color)",placeholderColor:"var(--muted-color)"}},toast:{root:{width:"min(90vw, 320px)"},colorScheme:{light:{contrast:{background:"var(--text-color)",color:"var(--bg-color)",detailColor:"var(--bg-color)"}},dark:{contrast:{background:"var(--bg-color)",color:"var(--text-color)",detailColor:"var(--text-color)"}}},info:{background:"var(--info-color)",color:"var(--info-hover-color)",detailColor:"var(--text-color)"},success:{background:"var(--success-color)",color:"var(--success-hover-color)",detailColor:"var(--text-color)"},warn:{background:"var(--warn-color)",color:"var(--warn-hover-color)",detailColor:"var(--text-color)"},error:{background:"var(--error-color)",color:"var(--error-hover-color)",detailColor:"var(--text-color)"},secondary:{background:"var(--secondary-color)",color:"var(--secondary-hover-color)",detailColor:"var(--text-color)"}}}};class Ge{static get IsTouch(){return window.matchMedia("(pointer: coarse)").matches}static GetMaxZindex(e=[]){let n="body > *:not(script):not(style)";for(const i of e)n+=`, ${i}`;const o=Math.max(...Array.from(document.querySelectorAll(n)).map(i=>{const s=getComputedStyle(i).zIndex;return+s==+s?+s:0}));return o>=100?o:100}static AjustarFuso(e){const n=e.getTimezoneOffset()/60;e.setHours(e.getHours()-n)}static Mask(e,n){let o=0,i=e.toString();return n.replace(/#/g,()=>i[o++]||"")}static MaskCpf(e){return Ge.Mask(e.padStart(11,"0"),"###.###.###-##")}static MaskCnpj(e){return Ge.Mask(e.padStart(14,"0"),"##.###.###/####-##")}static MaskCcm(e){return Ge.Mask(e.padStart(8,"0"),"#.###.###-#")}static async DelayAsync(e=400){return new Promise(n=>setTimeout(n,e))}static FormatNumber(e,n=0,o="pt-BR"){return e.toLocaleString(o,{minimumFractionDigits:n,maximumFractionDigits:n})}static FormatCurrency(e,n="pt-BR"){return e.toLocaleString(n,{style:"currency",currency:"BRL"})}static HasKey(e,n){return e&&n in e}static GetFilenameFromContentDisposition(e){if(!e)return null;const n=e.match(/filename\*\s*=\s*(?:UTF-8'')?([^;\r\n]+)/i);if(n)try{return decodeURIComponent(n[1].trim().replace(/^"|"$/g,""))}catch{return n[1].trim().replace(/^"|"$/g,"")}const o=e.match(/filename\s*=\s*("(.*?)"|([^;,\r\n]+))/i);return o?(o[2]||o[3]).trim().replace(/^"|"$/g,""):null}}class Pf{sub;username;name;email;roles;groups;userinfo;department;jobTitle;idp;constructor(e){this.userinfo=e,this.sub=e.sub,this.username=e.employeeID??e.cpf??"",this.name=e.name??"",this.email=e.email??null,this.roles=e.role??[],this.groups=e.group??[],this.department=this.SetDepartment(),this.jobTitle=this.SetJobTitle(),this.idp=this.SetIdp()}get firstname(){return this.name.split(" ")[0]??this.name}get maskedUsername(){return this.username?this.username.length<=11?Ge.MaskCpf(this.username):this.username.length===14?Ge.MaskCnpj(this.username):this.username:""}IsInRole(e){return this.roles.includes(e)}IsInGroup(e){return this.groups.includes(e)}SetIdp(){const e=this.userinfo?.identity_provider??null;return e?.toLocaleLowerCase()==="gov.br"?"govbr":e?.toLocaleLowerCase().startsWith("senhaweb")?"senhaweb":null}SetDepartment(){return this.userinfo?.department??null}SetJobTitle(){return this.userinfo?.jobTitle??null}}function Tf(){const t=r.ref("development");function e(a){t.value=a.toLocaleLowerCase()}const n=r.computed(()=>t.value==="development"),o=r.computed(()=>t.value==="pack"),i=r.computed(()=>t.value==="hml"),s=r.computed(()=>t.value==="production"),c=r.ref(null);function l(){c.value=null}return{environment:t,SetEnvironment:e,isDev:n,isPack:o,isHml:i,isProd:s,user:c,$reset:l}}const If=t=>{const e=new Set;function n(o){const{name:i,children:s}=o;if(i){if(e.has(i))throw new Error(["Erro na validação das rotas!",`Nome de rota duplicado: ${i}`].join(`
|
|
424
424
|
`));e.add(i)}if(s&&Array.isArray(s))for(const c of s)n(c)}for(const o of t)n(o)};Promise.prototype.TrackStateWith||(Promise.prototype.TrackStateWith=async function(t){t.value=!0;try{return await this}finally{t.value=!1}});class Af{current=null;resolve=null;async showAsync(e,n){const o={message:e,life:n??5e3};return this.Render(o)}async Render(e){return new Promise(n=>{this.resolve=n,this.current&&(this.current.style.opacity="0",setTimeout((function(){this.parentElement&&this.parentElement.removeChild(this)}).bind(this.current),500));const o=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");i.className="content",s.className="progress",i.appendChild(s),o.className="sf-toast",o.style.zIndex=Ge.GetMaxZindex().toString(),o.appendChild(i),this.current=o,document.body.appendChild(o),o.addEventListener("transitionend",a=>{const u=a.propertyName==="opacity",f=a.target.classList.contains("visible");u&&!f&&(document.body.removeChild(o),this.current===o&&(this.current=null))});const c=[];Array.isArray(e.message)?c.push(...e.message):c.push(e.message);for(const a of c){const u=document.createElement("p");u.innerHTML=Ao.sanitize(a),i.appendChild(u)}const l=document.createElement("i");if(l.classList.add("icon","material-symbols-outlined"),l.innerText="close",l.addEventListener("click",()=>{this.Close()}),i.appendChild(l),getComputedStyle(o).bottom,getComputedStyle(o).top,o.classList.add("visible"),e.life){s.style.transitionDuration=`${e.life-300}ms`,i.classList.add("animate"),setTimeout(()=>{this.current===o&&this.Close()},e.life);return}})}Close(){this.resolve&&this.resolve(),this.current&&this.current.classList.remove("visible")}}const Of=new Af,$f=()=>Of;function Ui(){document.documentElement.removeAttribute("data-app-message"),document.documentElement.classList.add("app-mounted")}function Lo(t){typeof t=="string"&&document.documentElement.setAttribute("data-app-message",t),document.documentElement.classList.remove("app-mounted")}async function Lf(){return await fetch(window.location.origin+"/api/get-environment").then(async t=>{if(!t.ok)throw Lo("Ocorreu um erro ao inicializar a aplicação."),new Error(`Erro ao obter ambiente: ${t.status} ${t.statusText}`);return await t.text()})}O.AppError=Oo,O.AppResult=Vi,O.BaseAppState=Tf,O.EnsureUniqueRouteNames=If,O.GetEnvironmentAsync=Lf,O.RemovePreloader=Ui,O.RestorePreloader=Lo,O.SfButton=zn,O.SfContent=Pl,O.SfDrawer=zo,O.SfHelpButton=El,O.SfIcon=Ie,O.SfLoadingCircle=Fo,O.SfLogin=jl,O.SfMain=Cf,O.SfMessage=Ss,O.SfNavMenu=kl,O.SfPageTitle=kf,O.SfTabNavigation=ys,O.SfTooltip=jo,O.UseAlert=Hi,O.UseAlertService=sf,O.UseAppInject=Ht,O.UseConfirm=Mi,O.UseConfirmService=Jd,O.UseSimpleToast=$f,O.User=Pf,O.Utilities=Ge,O._logger=rf,O.configSF=of,O.globalErrorHandler=af,O.themePreset=Ef,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
425
425
|
//# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.cjs.map
|