dolphin-components 3.1.15-beta.1 → 3.1.15-beta.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.
@@ -246,4 +246,4 @@ EOD`}return{to_workbook:r,to_sheet:n,from_sheet:o}})(),GW=(function(){function e
246
246
  `:t.icon&&(r=_t({question:`?`,warning:`!`,info:`i`}[t.icon])),n.trim()!==r.trim()&&se(e,r)},gt=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(let n of[`.swal2-success-line-tip`,`.swal2-success-line-long`,`.swal2-x-mark-line-left`,`.swal2-x-mark-line-right`])be(e,n,`background-color`,t.iconColor);be(e,`.swal2-success-ring`,`border-color`,t.iconColor)}},_t=e=>`<div class="${l[`icon-content`]}">${e}</div>`,vt=(e,t)=>{let n=j();if(n){if(!t.imageUrl){ve(n);return}_e(n,``),n.setAttribute(`src`,t.imageUrl),n.setAttribute(`alt`,t.imageAlt||``),ge(n,`width`,t.imageWidth),ge(n,`height`,t.imageHeight),n.className=l.image,le(n,t,`image`)}},yt=!1,bt=0,xt=0,St=0,Ct=0,wt=e=>{e.addEventListener(`mousedown`,Et),document.body.addEventListener(`mousemove`,Dt),e.addEventListener(`mouseup`,Ot),e.addEventListener(`touchstart`,Et),document.body.addEventListener(`touchmove`,Dt),e.addEventListener(`touchend`,Ot)},Tt=e=>{e.removeEventListener(`mousedown`,Et),document.body.removeEventListener(`mousemove`,Dt),e.removeEventListener(`mouseup`,Ot),e.removeEventListener(`touchstart`,Et),document.body.removeEventListener(`touchmove`,Dt),e.removeEventListener(`touchend`,Ot)},Et=e=>{let t=E();if(!t)return;let n=D();if(e.target===t||n&&n.contains(e.target)){yt=!0;let n=kt(e);bt=n.clientX,xt=n.clientY,St=parseInt(t.style.insetInlineStart)||0,Ct=parseInt(t.style.insetBlockStart)||0,pe(t,`swal2-dragging`)}},Dt=e=>{let t=E();if(t&&yt){let{clientX:n,clientY:r}=kt(e),i=n-bt;t.style.insetInlineStart=`${St+(a.isRTL?-i:i)}px`,t.style.insetBlockStart=`${Ct+(r-xt)}px`}},Ot=()=>{let e=E();yt=!1,me(e,`swal2-dragging`)},kt=e=>{let t=e.type.startsWith(`touch`)?e.touches[0]:e;return{clientX:t.clientX,clientY:t.clientY}},At=(e,t)=>{let n=C(),r=E();if(!(!n||!r)){if(t.toast){ge(n,`width`,t.width),r.style.width=`100%`;let e=ne();e&&r.insertBefore(e,D())}else ge(r,`width`,t.width);ge(r,`padding`,t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),ve(N()),jt(r,t),t.draggable&&!t.toast?(pe(r,l.draggable),wt(r)):(me(r,l.draggable),Tt(r))}},jt=(e,t)=>{let n=t.showClass||{};e.className=`${l.popup} ${Se(e)?n.popup:``}`,t.toast?(pe([document.documentElement,document.body],l[`toast-shown`]),pe(e,l.toast)):pe(e,l.modal),le(e,t,`popup`),typeof t.customClass==`string`&&pe(e,t.customClass),t.icon&&pe(e,l[`icon-${t.icon}`])},Mt=(e,t)=>{let n=M();if(!n)return;let{progressSteps:r,currentProgressStep:i}=t;if(!r||r.length===0||i===void 0){ve(n);return}_e(n),n.textContent=``,i>=r.length&&p(`Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)`),r.forEach((e,a)=>{let o=Nt(e);if(n.appendChild(o),a===i&&pe(o,l[`active-progress-step`]),a!==r.length-1){let e=Pt(t);n.appendChild(e)}})},Nt=e=>{let t=document.createElement(`li`);return pe(t,l[`progress-step`]),se(t,e),t},Pt=e=>{let t=document.createElement(`li`);return pe(t,l[`progress-step-line`]),e.progressStepsDistance&&ge(t,`width`,e.progressStepsDistance),t},Ft=(e,t)=>{let n=k();n&&(ye(n),xe(n,!!(t.title||t.titleText),`block`),t.title&&Re(t.title,n),t.titleText&&(n.innerText=t.titleText),le(n,t,`title`))},It=(e,t)=>{var n;At(e,t),qe(e,t),Mt(e,t),dt(e,t),vt(e,t),Ft(e,t),Ke(e,t),lt(e,t),Ve(e,t),ut(e,t);let r=E();typeof t.didRender==`function`&&r&&t.didRender(r),(n=a.eventEmitter)==null||n.emit(`didRender`,r)},Lt=()=>Se(E()),Rt=()=>P()?.click(),zt=()=>F()?.click(),Bt=()=>ee()?.click(),Vt=Object.freeze({cancel:`cancel`,backdrop:`backdrop`,close:`close`,esc:`esc`,timer:`timer`}),Ht=e=>{if(e.keydownTarget&&e.keydownHandlerAdded&&e.keydownHandler){let t=e.keydownHandler;e.keydownTarget.removeEventListener(`keydown`,t,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1}},Ut=(e,t,n)=>{if(Ht(e),!t.toast){let r=e=>qt(t,e,n);e.keydownHandler=r;let i=t.keydownListenerCapture?window:E();if(i){e.keydownTarget=i,e.keydownListenerCapture=t.keydownListenerCapture;let n=r;e.keydownTarget.addEventListener(`keydown`,n,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0}}},Wt=(e,t)=>{var n;let r=ae();return r.length?(e+=t,e===-2&&(e=r.length-1),e===r.length?e=0:e===-1&&(e=r.length-1),r[e].focus(),!(S()&&r[e]instanceof HTMLIFrameElement)):((n=E())==null||n.focus(),!0)},Gt=[`ArrowRight`,`ArrowDown`],Kt=[`ArrowLeft`,`ArrowUp`],qt=(e,t,n)=>{e&&(t.isComposing||t.keyCode===229||(e.stopKeydownPropagation&&t.stopPropagation(),t.key===`Enter`?Jt(t,e):t.key===`Tab`?Yt(t):[...Gt,...Kt].includes(t.key)?Xt(t.key):t.key===`Escape`&&Zt(t,e,n)))},Jt=(e,t)=>{if(!v(t.allowEnterKey))return;let n=E();if(!n||!t.input)return;let r=ue(n,t.input);if(e.target&&r&&e.target instanceof HTMLElement&&e.target.outerHTML===r.outerHTML){if([`textarea`,`file`].includes(t.input))return;Rt(),e.preventDefault()}},Yt=e=>{let t=e.target,n=ae(),r=-1;for(let e=0;e<n.length;e++)if(t===n[e]){r=e;break}let i=!0;i=e.shiftKey?Wt(r,-1):Wt(r,1),e.stopPropagation(),i&&e.preventDefault()},Xt=e=>{let t=I(),n=P(),r=F(),i=ee();if(!t||!n||!r||!i)return;let a=[n,r,i];if(document.activeElement instanceof HTMLElement&&!a.includes(document.activeElement))return;let o=Gt.includes(e)?`nextElementSibling`:`previousElementSibling`,s=document.activeElement;if(s){for(let e=0;e<t.children.length;e++){if(s=s[o],!s)return;if(s instanceof HTMLButtonElement&&Se(s))break}s instanceof HTMLButtonElement&&s.focus()}},Zt=(e,t,n)=>{e.preventDefault(),v(t.allowEscapeKey)&&n(Vt.esc)};var Qt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};let $t=()=>{let e=C();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute(`aria-hidden`)&&t.setAttribute(`data-previous-aria-hidden`,t.getAttribute(`aria-hidden`)||``),t.setAttribute(`aria-hidden`,`true`))})},en=()=>{Array.from(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`)})},tn=typeof window<`u`&&!!window.GestureEvent,nn=tn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rn=()=>{if(tn&&!ce(document.body,l.iosfix)){let e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,pe(document.body,l.iosfix),an()}},an=()=>{let e=C();if(!e)return;let t;e.ontouchstart=e=>{t=on(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},on=e=>{let t=e.target,n=C(),r=A();return!n||!r||sn(e)||cn(e)?!1:t===n||!we(n)&&t instanceof HTMLElement&&!Te(t,r)&&t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!(we(r)&&r.contains(t))},sn=e=>!!(e.touches&&e.touches.length&&e.touches[0].touchType===`stylus`),cn=e=>e.touches&&e.touches.length>1,ln=()=>{if(ce(document.body,l.iosfix)){let e=parseInt(document.body.style.top,10);me(document.body,l.iosfix),document.body.style.top=``,document.body.scrollTop=e*-1}},un=()=>{let e=document.createElement(`div`);e.className=l[`scrollbar-measure`],document.body.appendChild(e);let t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},dn=null,fn=e=>{dn===null&&(document.body.scrollHeight>window.innerHeight||e===`scroll`)&&(dn=parseInt(window.getComputedStyle(document.body).getPropertyValue(`padding-right`)),document.body.style.paddingRight=`${dn+un()}px`)},pn=()=>{dn!==null&&(document.body.style.paddingRight=`${dn}px`,dn=null)};function mn(e,t,n,r){z()?Cn(e,r):(s(n).then(()=>Cn(e,r)),Ht(a)),tn?(t.setAttribute(`style`,`display:none !important`),t.removeAttribute(`class`),t.innerHTML=``):t.remove(),R()&&(pn(),ln(),en()),hn()}function hn(){me([document.documentElement,document.body],[l.shown,l[`height-auto`],l[`no-backdrop`],l[`toast-shown`]])}function gn(e){e=bn(e);let t=Qt.swalPromiseResolve.get(this),n=_n(this);this.isAwaitingPromise?e.isDismissed||(yn(this),t(e)):n&&t(e)}let _n=e=>{let t=E();if(!t)return!1;let n=Ze.innerParams.get(e);if(!n||ce(t,n.hideClass.popup))return!1;me(t,n.showClass.popup),pe(t,n.hideClass.popup);let r=C();return me(r,n.showClass.backdrop),pe(r,n.hideClass.backdrop),xn(e,t,n),!0};function vn(e){let t=Qt.swalPromiseReject.get(this);yn(this),t&&t(e)}let yn=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,Ze.innerParams.get(e)||e._destroy())},bn=e=>e===void 0?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),xn=(e,t,n)=>{var r;let i=C(),o=Ee(t);typeof n.willClose==`function`&&n.willClose(t),(r=a.eventEmitter)==null||r.emit(`willClose`,t),o&&i?Sn(e,t,i,!!n.returnFocus,n.didClose):i&&mn(e,i,!!n.returnFocus,n.didClose)},Sn=(e,t,n,r,i)=>{a.swalCloseEventFinishedCallback=mn.bind(null,e,n,r,i);let o=function(e){if(e.target===t){var n;(n=a.swalCloseEventFinishedCallback)==null||n.call(a),delete a.swalCloseEventFinishedCallback,t.removeEventListener(`animationend`,o),t.removeEventListener(`transitionend`,o)}};t.addEventListener(`animationend`,o),t.addEventListener(`transitionend`,o)},Cn=(e,t)=>{setTimeout(()=>{var n;typeof t==`function`&&t.bind(e.params)(),(n=a.eventEmitter)==null||n.emit(`didClose`),e._destroy&&e._destroy()})},wn=e=>{let t=E();if(t||new xi,t=E(),!t)return;let n=ne();z()?ve(D()):Tn(t,e),_e(n),t.setAttribute(`data-loading`,`true`),t.setAttribute(`aria-busy`,`true`),t.focus()},Tn=(e,t)=>{let n=I(),r=ne();!n||!r||(!t&&Se(P())&&(t=P()),_e(n),t&&(ve(t),r.setAttribute(`data-button-to-replace`,t.className),n.insertBefore(r,t)),pe([e,n],l.loading))},En=(e,t)=>{t.input===`select`||t.input===`radio`?jn(e,t):[`text`,`email`,`number`,`tel`,`textarea`].some(e=>e===t.input)&&(y(t.inputValue)||x(t.inputValue))&&(wn(P()),Mn(e,t))},Dn=(e,t)=>{let n=e.getInput();if(!n)return null;switch(t.input){case`checkbox`:return On(n);case`radio`:return kn(n);case`file`:return An(n);default:return t.inputAutoTrim?n.value.trim():n.value}},On=e=>+!!e.checked,kn=e=>e.checked?e.value:null,An=e=>e.files&&e.files.length?e.getAttribute(`multiple`)===null?e.files[0]:e.files:null,jn=(e,t)=>{let n=E();if(!n)return;let r=e=>{t.input===`select`?Nn(n,Fn(e),t):t.input===`radio`&&Pn(n,Fn(e),t)};y(t.inputOptions)||x(t.inputOptions)?(wn(P()),b(t.inputOptions).then(t=>{e.hideLoading(),r(t)})):typeof t.inputOptions==`object`?r(t.inputOptions):m(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`)},Mn=(e,t)=>{let n=e.getInput();n&&(ve(n),b(t.inputValue).then(r=>{n.value=t.input===`number`?`${parseFloat(r)||0}`:`${r}`,_e(n),n.focus(),e.hideLoading()}).catch(t=>{m(`Error in inputValue promise: ${t}`),n.value=``,_e(n),n.focus(),e.hideLoading()}))};function Nn(e,t,n){let r=he(e,l.select);if(!r)return;let i=(e,t,r)=>{let i=document.createElement(`option`);i.value=r,se(i,t),i.selected=In(r,n.inputValue),e.appendChild(i)};t.forEach(e=>{let t=e[0],n=e[1];if(Array.isArray(n)){let e=document.createElement(`optgroup`);e.label=t,e.disabled=!1,r.appendChild(e),n.forEach(t=>i(e,t[1],t[0]))}else i(r,n,t)}),r.focus()}function Pn(e,t,n){let r=he(e,l.radio);if(!r)return;t.forEach(e=>{let t=e[0],i=e[1],a=document.createElement(`input`),o=document.createElement(`label`);a.type=`radio`,a.name=l.radio,a.value=t,In(t,n.inputValue)&&(a.checked=!0);let s=document.createElement(`span`);se(s,i),s.className=l.label,o.appendChild(a),o.appendChild(s),r.appendChild(o)});let i=r.querySelectorAll(`input`);i.length&&i[0].focus()}let Fn=e=>(e instanceof Map?Array.from(e):Object.entries(e)).map(([e,t])=>[e,typeof t==`object`?Fn(t):t]),In=(e,t)=>!!t&&t!=null&&t.toString()===e.toString(),Ln=e=>{let t=Ze.innerParams.get(e);e.disableButtons(),t.input?Bn(e,`confirm`):Gn(e,!0)},Rn=e=>{let t=Ze.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Bn(e,`deny`):Hn(e,!1)},zn=(e,t)=>{e.disableButtons(),t(Vt.cancel)},Bn=(e,t)=>{let n=Ze.innerParams.get(e);if(!n.input){m(`The "input" parameter is needed to be set when using returnInputValueOn${f(t)}`);return}let r=e.getInput(),i=Dn(e,n);n.inputValidator?Vn(e,i,t):r&&!r.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||r.validationMessage)):t===`deny`?Hn(e,i):Gn(e,i)},Vn=(e,t,n)=>{let r=Ze.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>b(r.inputValidator(t,r.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):n===`deny`?Hn(e,t):Gn(e,t)})},Hn=(e,t)=>{let n=Ze.innerParams.get(e);n.showLoaderOnDeny&&wn(F()),n.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>b(n.preDeny(t,n.validationMessage))).then(n=>{n===!1?(e.hideLoading(),yn(e)):e.close({isDenied:!0,value:n===void 0?t:n})}).catch(t=>Wn(e,t))):e.close({isDenied:!0,value:t})},Un=(e,t)=>{e.close({isConfirmed:!0,value:t})},Wn=(e,t)=>{e.rejectPromise(t)},Gn=(e,t)=>{let n=Ze.innerParams.get(e);n.showLoaderOnConfirm&&wn(),n.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>b(n.preConfirm(t,n.validationMessage))).then(n=>{Se(N())||n===!1?(e.hideLoading(),yn(e)):Un(e,n===void 0?t:n)}).catch(t=>Wn(e,t))):Un(e,t)};function Kn(){let e=Ze.innerParams.get(this);if(!e)return;let t=Ze.domCache.get(this);ve(t.loader),z()?e.icon&&_e(D()):qn(t),me([t.popup,t.actions],l.loading),t.popup.removeAttribute(`aria-busy`),t.popup.removeAttribute(`data-loading`),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1;let n=Ze.focusedElement.get(this);n instanceof HTMLElement&&document.activeElement===document.body&&n.focus(),Ze.focusedElement.delete(this)}let qn=e=>{let t=e.loader.getAttribute(`data-button-to-replace`),n=t?e.popup.getElementsByClassName(t):[];n.length?_e(n[0],`inline-block`):Ce()&&ve(e.actions)};function Jn(){let e=Ze.innerParams.get(this),t=Ze.domCache.get(this);return t?ue(t.popup,e.input):null}function Yn(e,t,n){let r=Ze.domCache.get(e);t.forEach(e=>{r[e].disabled=n})}function Xn(e,t){let n=E();if(!(!n||!e))if(e.type===`radio`){let e=n.querySelectorAll(`[name="${l.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function Zn(){Yn(this,[`confirmButton`,`denyButton`,`cancelButton`],!1);let e=Ze.focusedElement.get(this);e instanceof HTMLElement&&document.activeElement===document.body&&e.focus(),Ze.focusedElement.delete(this)}function Qn(){Ze.focusedElement.set(this,document.activeElement),Yn(this,[`confirmButton`,`denyButton`,`cancelButton`],!0)}function $n(){Xn(this.getInput(),!1)}function er(){Xn(this.getInput(),!0)}function tr(e){let t=Ze.domCache.get(this),n=Ze.innerParams.get(this);se(t.validationMessage,e),t.validationMessage.className=l[`validation-message`],n.customClass&&n.customClass.validationMessage&&pe(t.validationMessage,n.customClass.validationMessage),_e(t.validationMessage);let r=this.getInput();r&&(r.setAttribute(`aria-invalid`,`true`),r.setAttribute(`aria-describedby`,l[`validation-message`]),de(r),pe(r,l.inputerror))}function nr(){let e=Ze.domCache.get(this);e.validationMessage&&ve(e.validationMessage);let t=this.getInput();t&&(t.removeAttribute(`aria-invalid`),t.removeAttribute(`aria-describedby`),me(t,l.inputerror))}let rr={title:``,titleText:``,text:``,html:``,footer:``,icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:`light`,showClass:{popup:`swal2-show`,backdrop:`swal2-backdrop-show`,icon:`swal2-icon-show`},hideClass:{popup:`swal2-hide`,backdrop:`swal2-backdrop-hide`,icon:`swal2-icon-hide`},customClass:{},target:`body`,color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:`OK`,confirmButtonAriaLabel:``,confirmButtonColor:void 0,denyButtonText:`No`,denyButtonAriaLabel:``,denyButtonColor:void 0,cancelButtonText:`Cancel`,cancelButtonAriaLabel:``,cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:`&times;`,closeButtonAriaLabel:`Close this dialog`,loaderHtml:``,showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:``,timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:``,inputLabel:``,inputValue:``,inputOptions:{},inputAutoFocus:!0,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,topLayer:!1},ir=`allowEscapeKey.allowOutsideClick.background.buttonsStyling.cancelButtonAriaLabel.cancelButtonColor.cancelButtonText.closeButtonAriaLabel.closeButtonHtml.color.confirmButtonAriaLabel.confirmButtonColor.confirmButtonText.currentProgressStep.customClass.denyButtonAriaLabel.denyButtonColor.denyButtonText.didClose.didDestroy.draggable.footer.hideClass.html.icon.iconColor.iconHtml.imageAlt.imageHeight.imageUrl.imageWidth.preConfirm.preDeny.progressSteps.returnFocus.reverseButtons.showCancelButton.showCloseButton.showConfirmButton.showDenyButton.text.title.titleText.theme.willClose`.split(`.`),ar={allowEnterKey:void 0},or=[`allowOutsideClick`,`allowEnterKey`,`backdrop`,`draggable`,`focusConfirm`,`focusDeny`,`focusCancel`,`returnFocus`,`heightAuto`,`keydownListenerCapture`],sr=e=>Object.prototype.hasOwnProperty.call(rr,e),cr=e=>ir.indexOf(e)!==-1,lr=e=>ar[e],ur=e=>{sr(e)||p(`Unknown parameter "${e}"`)},dr=e=>{or.includes(e)&&p(`The parameter "${e}" is incompatible with toasts`)},fr=e=>{let t=lr(e);t&&_(e,t)},pr=e=>{e.backdrop===!1&&e.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&![`light`,`dark`,`auto`,`minimal`,`borderless`,`bootstrap-4`,`bootstrap-4-light`,`bootstrap-4-dark`,`bootstrap-5`,`bootstrap-5-light`,`bootstrap-5-dark`,`material-ui`,`material-ui-light`,`material-ui-dark`,`embed-iframe`,`bulma`,`bulma-light`,`bulma-dark`].includes(e.theme)&&p(`Invalid theme "${e.theme}"`);for(let t in e)ur(t),e.toast&&dr(t),fr(t)};function mr(e){let t=C(),n=E(),r=Ze.innerParams.get(this);if(!n||ce(n,r.hideClass.popup)){p(`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.`);return}let i=hr(e),a=Object.assign({},r,i);pr(a),t&&(t.dataset.swal2Theme=a.theme),It(this,a),Ze.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}let hr=e=>{let t={};return Object.keys(e).forEach(n=>{cr(n)?t[n]=e[n]:p(`Invalid parameter to update: ${n}`)}),t};function gr(){var e;let t=Ze.domCache.get(this),n=Ze.innerParams.get(this);if(!n){vr(this);return}t.popup&&a.swalCloseEventFinishedCallback&&(a.swalCloseEventFinishedCallback(),delete a.swalCloseEventFinishedCallback),typeof n.didDestroy==`function`&&n.didDestroy(),(e=a.eventEmitter)==null||e.emit(`didDestroy`),_r(this)}let _r=e=>{vr(e),delete e.params,delete a.keydownHandler,delete a.keydownTarget,delete a.currentInstance},vr=e=>{e.isAwaitingPromise?(V(Ze,e),e.isAwaitingPromise=!0):(V(Qt,e),V(Ze,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},V=(e,t)=>{for(let n in e)e[n].delete(t)};var yr=Object.freeze({__proto__:null,_destroy:gr,close:gn,closeModal:gn,closePopup:gn,closeToast:gn,disableButtons:Qn,disableInput:er,disableLoading:Kn,enableButtons:Zn,enableInput:$n,getInput:Jn,handleAwaitingPromise:yn,hideLoading:Kn,rejectPromise:vn,resetValidationMessage:nr,showValidationMessage:tr,update:mr});let br=(e,t,n)=>{e.toast?xr(e,t,n):(wr(t),Tr(t),Er(e,t,n))},xr=(e,t,n)=>{t.popup.onclick=()=>{e&&(Sr(e)||e.timer||e.input)||n(Vt.close)}},Sr=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton),Cr=!1,wr=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(Cr=!0)}}},Tr=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(Cr=!0)}}},Er=(e,t,n)=>{t.container.onclick=r=>{if(Cr){Cr=!1;return}r.target===t.container&&v(e.allowOutsideClick)&&n(Vt.backdrop)}},Dr=e=>typeof e==`object`&&!!e&&`jquery`in e,Or=e=>e instanceof Element||Dr(e),kr=e=>{let t={};return typeof e[0]==`object`&&!Or(e[0])?Object.assign(t,e[0]):[`title`,`html`,`icon`].forEach((n,r)=>{let i=e[r];typeof i==`string`||Or(i)?t[n]=i:i!==void 0&&m(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)}),t};function Ar(...e){return new this(...e)}function jr(e){class t extends this{_main(t,n){return super._main(t,Object.assign({},e,n))}}return t}let Mr=()=>a.timeout&&a.timeout.getTimerLeft(),Nr=()=>{if(a.timeout)return Oe(),a.timeout.stop()},Pr=()=>{if(a.timeout){let e=a.timeout.start();return De(e),e}},Fr=()=>{let e=a.timeout;return e&&(e.running?Nr():Pr())},Ir=e=>{if(a.timeout){let t=a.timeout.increase(e);return De(t,!0),t}},Lr=()=>!!(a.timeout&&a.timeout.isRunning()),Rr=!1,zr={};function Br(e=`data-swal-template`){zr[e]=this,Rr||=(document.body.addEventListener(`click`,Vr),!0)}let Vr=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(let e in zr){let n=t.getAttribute&&t.getAttribute(e);if(n){zr[e].fire({template:n});return}}};class Hr{constructor(){this.events={}}_getHandlersByEventName(e){return this.events[e]===void 0&&(this.events[e]=[]),this.events[e]}on(e,t){let n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){let n=(...r)=>{this.removeListener(e,n),t.apply(this,r)};this.on(e,n)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){let n=this._getHandlersByEventName(e),r=n.indexOf(t);r>-1&&n.splice(r,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}}a.eventEmitter=new Hr;var Ur=Object.freeze({__proto__:null,argsToParams:kr,bindClickHandler:Br,clickCancel:Bt,clickConfirm:Rt,clickDeny:zt,enableLoading:wn,fire:Ar,getActions:I,getCancelButton:ee,getCloseButton:ie,getConfirmButton:P,getContainer:C,getDenyButton:F,getFocusableElements:ae,getFooter:L,getHtmlContainer:A,getIcon:D,getIconContent:O,getImage:j,getInputLabel:te,getLoader:ne,getPopup:E,getProgressSteps:M,getTimerLeft:Mr,getTimerProgressBar:re,getTitle:k,getValidationMessage:N,increaseTimer:Ir,isDeprecatedParameter:lr,isLoading:oe,isTimerRunning:Lr,isUpdatableParameter:cr,isValidParameter:sr,isVisible:Lt,mixin:jr,off:(e,t)=>{if(a.eventEmitter){if(!e){a.eventEmitter.reset();return}t?a.eventEmitter.removeListener(e,t):a.eventEmitter.removeAllListeners(e)}},on:(e,t)=>{a.eventEmitter&&a.eventEmitter.on(e,t)},once:(e,t)=>{a.eventEmitter&&a.eventEmitter.once(e,t)},resumeTimer:Pr,showLoading:wn,stopTimer:Nr,toggleTimer:Fr});class Wr{constructor(e,t){this.callback=e,this.remaining=t,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.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){let t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}let Gr=[`swal-title`,`swal-html`,`swal-footer`],Kr=e=>{let t=typeof e.template==`string`?document.querySelector(e.template):e.template;if(!t)return{};let n=t.content;return ei(n),Object.assign(qr(n),Jr(n),Yr(n),Xr(n),Zr(n),Qr(n),$r(n,Gr))},qr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-param`)).forEach(e=>{ti(e,[`name`,`value`]);let n=e.getAttribute(`name`),r=e.getAttribute(`value`);!n||!r||(n in rr&&typeof rr[n]==`boolean`?t[n]=r!==`false`:n in rr&&typeof rr[n]==`object`?t[n]=JSON.parse(r):t[n]=r)}),t},Jr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-function-param`)).forEach(e=>{let n=e.getAttribute(`name`),r=e.getAttribute(`value`);!n||!r||(t[n]=Function(`return ${r}`)())}),t},Yr=e=>{let t={};return Array.from(e.querySelectorAll(`swal-button`)).forEach(e=>{ti(e,[`type`,`color`,`aria-label`]);let n=e.getAttribute(`type`);if(!n||![`confirm`,`cancel`,`deny`].includes(n))return;t[`${n}ButtonText`]=e.innerHTML,t[`show${f(n)}Button`]=!0;let r=e.getAttribute(`color`);r!==null&&(t[`${n}ButtonColor`]=r);let i=e.getAttribute(`aria-label`);i!==null&&(t[`${n}ButtonAriaLabel`]=i)}),t},Xr=e=>{let t={},n=e.querySelector(`swal-image`);if(n){ti(n,[`src`,`width`,`height`,`alt`]);let e=n.getAttribute(`src`);e!==null&&(t.imageUrl=e||void 0);let r=n.getAttribute(`width`);r!==null&&(t.imageWidth=r||void 0);let i=n.getAttribute(`height`);i!==null&&(t.imageHeight=i||void 0);let a=n.getAttribute(`alt`);a!==null&&(t.imageAlt=a||void 0)}return t},Zr=e=>{let t={},n=e.querySelector(`swal-icon`);return n&&(ti(n,[`type`,`color`]),n.hasAttribute(`type`)&&(t.icon=n.getAttribute(`type`)),n.hasAttribute(`color`)&&(t.iconColor=n.getAttribute(`color`)),t.iconHtml=n.innerHTML),t},Qr=e=>{let t={},n=e.querySelector(`swal-input`);n&&(ti(n,[`type`,`label`,`placeholder`,`value`]),t.input=n.getAttribute(`type`)||`text`,n.hasAttribute(`label`)&&(t.inputLabel=n.getAttribute(`label`)),n.hasAttribute(`placeholder`)&&(t.inputPlaceholder=n.getAttribute(`placeholder`)),n.hasAttribute(`value`)&&(t.inputValue=n.getAttribute(`value`)));let r=Array.from(e.querySelectorAll(`swal-input-option`));return r.length&&(t.inputOptions={},r.forEach(e=>{ti(e,[`value`]);let n=e.getAttribute(`value`);if(!n)return;let r=e.innerHTML;t.inputOptions[n]=r})),t},$r=(e,t)=>{let n={};for(let r in t){let i=t[r],a=e.querySelector(i);a&&(ti(a,[]),n[i.replace(/^swal-/,``)]=a.innerHTML.trim())}return n},ei=e=>{let t=Gr.concat([`swal-param`,`swal-function-param`,`swal-button`,`swal-image`,`swal-icon`,`swal-input`,`swal-input-option`]);Array.from(e.children).forEach(e=>{let n=e.tagName.toLowerCase();t.includes(n)||p(`Unrecognized element <${n}>`)})},ti=(e,t)=>{Array.from(e.attributes).forEach(n=>{t.indexOf(n.name)===-1&&p([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,`${t.length?`Allowed attributes are: ${t.join(`, `)}`:`To set the value, use HTML within the element.`}`])})},ni=e=>{var t,n;let r=C(),i=E();if(!r||!i)return;typeof e.willOpen==`function`&&e.willOpen(i),(t=a.eventEmitter)==null||t.emit(`willOpen`,i);let o=window.getComputedStyle(document.body).overflowY;if(oi(r,i,e),setTimeout(()=>{ii(r,i)},10),R()&&(ai(r,e.scrollbarPadding===void 0?!1:e.scrollbarPadding,o),$t()),nn&&e.backdrop===!1&&i.scrollHeight>r.clientHeight&&(r.style.pointerEvents=`auto`),!z()&&!a.previousActiveElement&&(a.previousActiveElement=document.activeElement),typeof e.didOpen==`function`){let t=e.didOpen;setTimeout(()=>t(i))}(n=a.eventEmitter)==null||n.emit(`didOpen`,i)},ri=e=>{let t=E();if(!t||e.target!==t)return;let n=C();n&&(t.removeEventListener(`animationend`,ri),t.removeEventListener(`transitionend`,ri),n.style.overflowY=`auto`,me(n,l[`no-transition`]))},ii=(e,t)=>{Ee(t)?(e.style.overflowY=`hidden`,t.addEventListener(`animationend`,ri),t.addEventListener(`transitionend`,ri)):e.style.overflowY=`auto`},ai=(e,t,n)=>{rn(),t&&n!==`hidden`&&fn(n),setTimeout(()=>{e.scrollTop=0})},oi=(e,t,n)=>{var r;(r=n.showClass)!=null&&r.backdrop&&pe(e,n.showClass.backdrop),n.animation?(t.style.setProperty(`opacity`,`0`,`important`),_e(t,`grid`),setTimeout(()=>{var e;(e=n.showClass)!=null&&e.popup&&pe(t,n.showClass.popup),t.style.removeProperty(`opacity`)},10)):_e(t,`grid`),pe([document.documentElement,document.body],l.shown),n.heightAuto&&n.backdrop&&!n.toast&&pe([document.documentElement,document.body],l[`height-auto`])};var si={email:(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||`Invalid email address`),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||`Invalid URL`)};function ci(e){e.inputValidator||(e.input===`email`&&(e.inputValidator=si.email),e.input===`url`&&(e.inputValidator=si.url))}function li(e){(!e.target||typeof e.target==`string`&&!document.querySelector(e.target)||typeof e.target!=`string`&&!e.target.appendChild)&&(p(`Target parameter is not valid, defaulting to "body"`),e.target=`body`)}function ui(e){ci(e),e.showLoaderOnConfirm&&!e.preConfirm&&p(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
247
247
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
248
248
  https://sweetalert2.github.io/#ajax-request`),li(e),typeof e.title==`string`&&(e.title=e.title.split(`
249
- `).join(`<br />`)),Le(e)}let di;var fi=new WeakMap;class pi{constructor(...e){if(r(this,fi,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),typeof window>`u`)return;di=this;let t=Object.freeze(this.constructor.argsToParams(e));this.params=t,this.isAwaitingPromise=!1,i(fi,this,this._main(di.params))}_main(e,t={}){if(pr(Object.assign({},t,e)),a.currentInstance){let e=Qt.swalPromiseResolve.get(a.currentInstance),{isAwaitingPromise:t}=a.currentInstance;a.currentInstance._destroy(),t||e({isDismissed:!0}),R()&&en()}a.currentInstance=di;let n=hi(e,t);ui(n),Object.freeze(n),a.timeout&&(a.timeout.stop(),delete a.timeout),clearTimeout(a.restoreFocusTimeout);let r=gi(di);return It(di,n),Ze.innerParams.set(di,n),mi(di,r,n)}then(e){return n(fi,this).then(e)}finally(e){return n(fi,this).finally(e)}}let mi=(e,t,n)=>new Promise((r,i)=>{let o=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};Qt.swalPromiseResolve.set(e,r),Qt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{Ln(e)},t.denyButton.onclick=()=>{Rn(e)},t.cancelButton.onclick=()=>{zn(e,o)},t.closeButton.onclick=()=>{o(Vt.close)},br(n,t,o),Ut(a,n,o),En(e,n),ni(n),_i(a,n,o),vi(t,n),setTimeout(()=>{t.container.scrollTop=0})}),hi=(e,t)=>{let n=Kr(e),r=Object.assign({},rr,t,n,e);return r.showClass=Object.assign({},rr.showClass,r.showClass),r.hideClass=Object.assign({},rr.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:`swal2-noanimation`},r.hideClass={}),r},gi=e=>{let t={popup:E(),container:C(),actions:I(),confirmButton:P(),denyButton:F(),cancelButton:ee(),loader:ne(),closeButton:ie(),validationMessage:N(),progressSteps:M()};return Ze.domCache.set(e,t),t},_i=(e,t,n)=>{let r=re();ve(r),t.timer&&(e.timeout=new Wr(()=>{n(`timer`),delete e.timeout},t.timer),t.timerProgressBar&&r&&(_e(r),le(r,t,`timerProgressBar`),setTimeout(()=>{e.timeout&&e.timeout.running&&De(t.timer)})))},vi=(e,t)=>{if(!t.toast){if(!v(t.allowEnterKey)){_(`allowEnterKey`,`preConfirm: () => false`),e.popup.focus();return}yi(e)||bi(e,t)||Wt(-1,1)}},yi=e=>{let t=Array.from(e.popup.querySelectorAll(`[autofocus]`));for(let e of t)if(e instanceof HTMLElement&&Se(e))return e.focus(),!0;return!1},bi=(e,t)=>t.focusDeny&&Se(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Se(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&Se(e.confirmButton)?(e.confirmButton.focus(),!0):!1;pi.prototype.disableButtons=Qn,pi.prototype.enableButtons=Zn,pi.prototype.getInput=Jn,pi.prototype.disableInput=er,pi.prototype.enableInput=$n,pi.prototype.hideLoading=Kn,pi.prototype.disableLoading=Kn,pi.prototype.showValidationMessage=tr,pi.prototype.resetValidationMessage=nr,pi.prototype.close=gn,pi.prototype.closePopup=gn,pi.prototype.closeModal=gn,pi.prototype.closeToast=gn,pi.prototype.rejectPromise=vn,pi.prototype.update=mr,pi.prototype._destroy=gr,Object.assign(pi,Ur),Object.keys(yr).forEach(e=>{pi[e]=function(...t){if(di&&di[e])return di[e](...t)}}),pi.DismissReason=Vt,pi.version=`11.26.24`;let xi=pi;return xi.default=xi,xi})),e!==void 0&&e.Sweetalert2&&(e.swal=e.sweetAlert=e.Swal=e.SweetAlert=e.Sweetalert2),typeof document<`u`&&function(e,t){var n=e.createElement(`style`);if(e.getElementsByTagName(`head`)[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch{n.innerText=t}}(document,`:root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}`)}))(),1),E7=e=>T7.default.mixin({toast:!0,position:`top-end`,showConfirmButton:!1,timer:e||3e3,timerProgressBar:!0,didOpen:e=>{e.onmouseenter=T7.default.stopTimer,e.onmouseleave=T7.default.resumeTimer,e.onclick=()=>{T7.default.close()}}}),D7={error(e,t){E7(t).fire({icon:`error`,title:e})},warn(e,t){E7(t).fire({icon:`warning`,title:e})},success(e,t){E7(t).fire({icon:`success`,title:e})},info(e,t){E7(t).fire({icon:`info`,title:e})}},O7={install(e){e.config.globalProperties.$toast=D7}},k7={key:0,class:`border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-gray-400 transition-colors h-[300px] flex select-none`},A7={class:`space-y-4 m-auto`},j7={class:`text-sm text-gray-500 mt-2`},M7={key:1,class:`select-none`},N7=[`src`],P7=[`onMousedown`],F7={key:1,class:`absolute inset-0 pointer-events-none`},I7=(0,u.defineComponent)({__name:`UploadImage`,props:{show:{type:Boolean,default:!1},uploadSize:{default:2}},setup(e,{emit:t}){let n=e,r=(0,u.ref)([{name:`Upload Image`,link:`#`}]),i=t,a=(0,u.ref)([{title:`Close`,emit:`onClose`}]),o=(0,u.ref)(),s=(0,u.ref)(``),c=(0,u.ref)(!1),l=(0,u.ref)(``),d=(0,u.ref)(570),f=(0,u.ref)(300),p=(0,u.ref)(null),m=(0,u.ref)({width:0,height:0,scaleX:1,scaleY:1}),h=(0,u.ref)({x:0,y:0,height:0,width:0}),g=(0,u.ref)(!1),_=(0,u.ref)({x:0,y:0}),v=(0,u.ref)(!1),y=(0,u.ref)(``),b=(0,u.ref)(1),x=(0,u.ref)(!1),S=(0,u.ref)({x:0,y:0}),C=()=>{o.value&&o.value.click()},w=(0,u.computed)(()=>h.value?[{position:`nw`,class:`cursor-nw-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{left:`-6px`,top:`-6px`}},{position:`ne`,class:`cursor-ne-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{right:`-6px`,top:`-6px`}},{position:`sw`,class:`cursor-sw-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{left:`-6px`,bottom:`-6px`}},{position:`se`,class:`cursor-se-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{right:`-6px`,bottom:`-6px`}}]:[]),T=()=>{let e=b.value,t=S.value,n=m.value.width/m.value.height,r=d.value/f.value,i,a;n>r?(i=d.value*e,a=d.value/n*e):(a=f.value*e,i=f.value*n*e);let o=(d.value-i)/2+t.x,s=(f.value-a)/2+t.y;return{left:o,top:s,right:o+i,bottom:s+a,width:i,height:a}},E=e=>{let t=n.uploadSize,r=e.target.files[0];if(r&&r.type.startsWith(`image/`)&&o.value){if(r.size/(1024*1024)>t){D7.error(`Upload size mute be below ${n.uploadSize} MB.`),o.value.value=``;return}let e=new FileReader;e.onload=e=>{s.value=e.target.result,c.value=!0,l.value=``},e.readAsDataURL(r),a.value=[{title:`Cancel`,emit:`onCancel`,class:`btn btn-danger`},{title:`Reset`,emit:`onReset`,class:`btn btn-outline-danger`},{title:`Crop`,emit:`onCrop`}]}},D=()=>{if(!p.value)return;let e=p.value,t=e.naturalWidth,n=e.naturalHeight;m.value={width:t,height:n,scaleX:t/d.value,scaleY:n/f.value},b.value=1,S.value={x:0,y:0},h.value={x:(d.value-200)/2,y:(f.value-200)/2,width:200,height:200}},k=e=>{g.value=!0,_.value={x:e.clientX-h.value.x,y:e.clientY-h.value.y},e.preventDefault()},A=(e,t)=>{v.value=!0,y.value=e,_.value={x:t.clientX,y:t.clientY,cropX:h.value.x,cropY:h.value.y,cropWidth:h.value.width,cropHeight:h.value.height},t.preventDefault()},j=()=>{g.value=!1,v.value=!1,x.value=!1,y.value=``},M=e=>{if(g.value){let t=T(),n=e.clientX-_.value.x,r=e.clientY-_.value.y,i=Math.max(0,t.left),a=Math.max(0,t.top),o=Math.min(d.value-h.value.width,t.right-h.value.width),s=Math.min(f.value-h.value.height,t.bottom-h.value.height);h.value={...h.value,x:Math.min(Math.max(n,i),o),y:Math.min(Math.max(r,a),s)}}else if(v.value){let t=e.clientX-_.value.x,n=e.clientY-_.value.y,r=T(),i={...h.value};switch(y.value){case`nw`:i.x=Math.max(Math.max(0,r.left),Math.min(_.value.cropX+t,_.value.cropX+_.value.cropWidth-50)),i.y=Math.max(Math.max(0,r.top),Math.min(_.value.cropY+n,_.value.cropY+_.value.cropHeight-50)),i.width=_.value.cropWidth-(i.x-_.value.cropX),i.height=_.value.cropHeight-(i.y-_.value.cropY);break;case`ne`:i.y=Math.max(Math.max(0,r.top),Math.min(_.value.cropY+n,_.value.cropY+_.value.cropHeight-50)),i.height=_.value.cropHeight-(i.y-_.value.cropY),i.width=Math.min(Math.min(d.value-i.x,r.right-i.x),Math.max(50,_.value.cropWidth+t));break;case`sw`:i.x=Math.max(Math.max(0,r.left),Math.min(_.value.cropX+t,_.value.cropX+_.value.cropWidth-50)),i.width=_.value.cropWidth-(i.x-_.value.cropX),i.height=Math.min(Math.min(f.value-i.y,r.bottom-i.y),Math.max(50,_.value.cropHeight+n));break;case`se`:i.width=Math.min(Math.min(d.value-i.x,r.right-i.x),Math.max(50,_.value.cropWidth+t)),i.height=Math.min(Math.min(f.value-i.y,r.bottom-i.y),Math.max(50,_.value.cropHeight+n));break}h.value=i}},N=e=>{let t=h.value,n=e.currentTarget.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;r>=t.x&&r<=t.x+t.width&&i>=t.y&&i<=t.y+t.height||(x.value=!0,_.value={x:e.clientX-S.value.x,y:e.clientY-S.value.y},e.preventDefault())},P=()=>{if(!h.value||!p.value)return;let e=p.value,t=m.value.width,n=m.value.height,r=b.value,a=S.value.x,o=S.value.y,s=d.value,c=f.value,u=t/n,g=s/c,_,v;u>g?(_=s*r,v=s/u*r):(v=c*r,_=c*u*r);let y=(s-_)/2+a,x=(c-v)/2+o,C=h.value.x-y,w=h.value.y-x,T=t/_,E=n/v,D=C*T,O=w*E,k=h.value.width*T,A=h.value.height*E,j=Math.max(0,D),M=Math.max(0,O),N=Math.max(1,Math.min(t-j,k)),P=Math.max(1,Math.min(n-M,A)),F=document.createElement(`canvas`);F.width=N,F.height=P;let te=F.getContext(`2d`);te&&(te.drawImage(e,j,M,N,P,0,0,N,P),l.value=F.toDataURL(`image/png`),i(`onImageCrop`,l.value),ee())},ee=()=>{c.value=!1,s.value=``,h.value={},l.value=``,S.value={x:0,y:0},b.value=1,o.value&&(o.value.value=``),a.value=[{title:`Close`,emit:`onClose`}]};return(0,u.onMounted)(()=>{document.addEventListener(`mousemove`,M),document.addEventListener(`mouseup`,j)}),(0,u.onUnmounted)(()=>{document.removeEventListener(`mousemove`,M),document.removeEventListener(`mouseup`,j)}),(t,n)=>((0,u.openBlock)(),(0,u.createBlock)(O,{title:r.value,actions:a.value,show:e.show,onOnClose:n[0]||=e=>i(`onClose`),onOnCrop:P,onOnReset:ee,onOnCancel:n[1]||=e=>{ee(),i(`onClose`)}},{default:(0,u.withCtx)(()=>[c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,M7,[(0,u.createElementVNode)(`div`,{ref:`cropperContainer`,class:`relative mx-auto shadow-sm overflow-hidden`,style:(0,u.normalizeStyle)({width:d.value+`px`,height:f.value+`px`,backgroundImage:`url(${(0,u.unref)(w7)})`}),onMousedown:N},[(0,u.createElementVNode)(`img`,{ref_key:`cropperImage`,ref:p,src:s.value,class:`w-full h-full object-contain`,style:(0,u.normalizeStyle)({transform:`scale(${b.value}) translate(${S.value.x}px, ${S.value.y}px)`}),onLoad:D},null,44,N7),h.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,class:`absolute border-2 border-primary border-dashed cursor-move`,style:(0,u.normalizeStyle)({left:h.value.x+`px`,top:h.value.y+`px`,width:h.value.width+`px`,height:h.value.height+`px`}),onMousedown:k},[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(w.value,e=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:e.position,class:(0,u.normalizeClass)(e.class),style:(0,u.normalizeStyle)(e.style),onMousedown:(0,u.withModifiers)(t=>A(e.position,t),[`stop`])},null,46,P7))),128))],36)):(0,u.createCommentVNode)(``,!0),h.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,F7,[(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:`0px`,width:`100%`,height:h.value.y+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:h.value.y+h.value.height+`px`,width:`100%`,height:f.value-h.value.y-h.value.height+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:h.value.y+`px`,width:h.value.x+`px`,height:h.value.height+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:h.value.x+h.value.width+`px`,top:h.value.y+`px`,width:d.value-h.value.x-h.value.width+`px`,height:h.value.height+`px`})},null,4)])):(0,u.createCommentVNode)(``,!0)],36)])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,k7,[(0,u.createElementVNode)(`input`,{ref_key:`fileInput`,ref:o,type:`file`,class:`hidden`,onChange:E,accept:`image/png, image/jpeg, image/jpg, image/webp`},null,544),(0,u.createElementVNode)(`div`,A7,[n[2]||=(0,u.createElementVNode)(`div`,{class:`mx-auto w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center`},[(0,u.createElementVNode)(`svg`,{class:`w-8 h-8 text-gray-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z`})])],-1),(0,u.createElementVNode)(`div`,null,[(0,u.createElementVNode)(`button`,{class:`btn btn-primary`,onClick:C},`Choose Image`),(0,u.createElementVNode)(`p`,j7,`PNG, JPG up to `+(0,u.toDisplayString)(e.uploadSize)+` MB`,1)])])]))]),_:1},8,[`title`,`actions`,`show`]))}}),L7={class:`relative min-h-[400px] flex flex-col items-center justify-center bg-gray-50 rounded-lg overflow-hidden border border-gray-100`},R7={class:`absolute left-2 bg-white h-[31px] rounded-default`},z7=[`disabled`],B7={class:`absolute right-2 bg-white h-[31px] rounded-default`},V7=[`disabled`],H7={key:0,class:`w-full h-full flex items-center justify-center p-4`},U7=[`src`,`alt`],W7=[`src`],G7={key:2,class:`text-center p-8 bg-white rounded-xl shadow-sm border border-gray-100`},K7={class:`text-lg font-semibold text-gray-900 mb-2`},q7=[`href`],J7={key:1,class:`text-gray-500`},Y7={class:`absolute bottom-4 left-0 right-0 text-center pointer-events-none`},X7={key:0,class:`bg-black/75 text-white px-3 py-1 rounded-full text-xs font-medium backdrop-blur-md`},Z7=(0,u.defineComponent)({__name:`FilePreview`,props:{show:{type:Boolean,default:!1},files:{default:()=>[]},initialIndex:{default:0}},emits:[`update:show`,`close`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(n.initialIndex),a=(0,u.ref)([]),o=(e,t)=>{let n=e.split(`.`).pop()?.toLowerCase();return t?.startsWith(`image/`)||[`jpg`,`jpeg`,`png`,`gif`,`webp`,`svg`,`bmp`].includes(n||``)?`image`:t===`application/pdf`||n===`pdf`?`pdf`:`other`},s=()=>{a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)});let e=[];Array.isArray(n.files)?e=n.files.flat():n.files&&(e=[n.files]),a.value=e.map(e=>{if(e instanceof File)return{url:URL.createObjectURL(e),name:e.name,type:o(e.name,e.type),isBlob:!0};if(typeof e==`object`&&e&&`url`in e){let t=e;return{url:t.url,name:t.name||t.url.split(`/`).pop()||`Unknown File`,type:t.type||o(t.name||t.url),isBlob:t.isBlob||!1}}else if(typeof e==`string`){let t=e.split(`/`).pop()||`Unknown File`;return{url:e,name:t,type:o(t),isBlob:!1}}else return{url:``,name:`Invalid File`,type:`other`,isBlob:!1}}),i.value>=a.value.length&&(i.value=0)};(0,u.onUnmounted)(()=>{window.removeEventListener(`keydown`,h),a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)})}),(0,u.watch)(()=>n.files,()=>{n.show&&s()},{deep:!0}),(0,u.watch)(()=>n.initialIndex,e=>i.value=e),(0,u.watch)(()=>n.show,()=>{n.show?(s(),window.addEventListener(`keydown`,h)):(window.removeEventListener(`keydown`,h),a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)}))});let c=(0,u.computed)(()=>a.value[i.value]),l=(0,u.computed)(()=>a.value.length>1),d=(0,u.computed)(()=>[{name:`Preview`,link:`#`},{name:c.value?.name||`FileDetails`}]),f=(0,u.ref)([{title:`Close`,emit:`onClose`,class:`btn btn-outline-primary`}]),p=()=>{i.value<a.value.length-1&&i.value++},m=()=>{i.value>0&&i.value--},h=e=>{n.show&&(e.key===`ArrowRight`&&p(),e.key===`ArrowLeft`&&m(),e.key===`Escape`&&g())},g=()=>{r(`update:show`,!1),r(`close`)};return(t,n)=>((0,u.openBlock)(),(0,u.createBlock)(O,{title:d.value,actions:f.value,show:e.show,width:`900px`,onOnClose:g},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,L7,[(0,u.createElementVNode)(`div`,R7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`button`,{key:0,onClick:m,class:`btn btn-primary btn-icon`,disabled:i.value===0},[...n[0]||=[(0,u.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,u.createElementVNode)(`path`,{d:`m15 18-6-6 6-6`})],-1)]],8,z7)):(0,u.createCommentVNode)(``,!0)]),(0,u.createElementVNode)(`div`,B7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`button`,{key:0,onClick:p,class:`btn btn-primary btn-icon`,disabled:i.value===a.value.length-1},[...n[1]||=[(0,u.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,u.createElementVNode)(`path`,{d:`m9 18 6-6-6-6`})],-1)]],8,V7)):(0,u.createCommentVNode)(``,!0)]),c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,H7,[c.value.type===`image`?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:c.value.url,alt:c.value.name,class:`max-h-[600px] max-w-full object-contain rounded-md shadow-sm`},null,8,U7)):c.value.type===`pdf`?((0,u.openBlock)(),(0,u.createElementBlock)(`iframe`,{key:1,src:c.value.url,class:`w-full h-[600px] rounded-md shadow-sm bg-white`,frameborder:`0`},null,8,W7)):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,G7,[n[2]||=(0,u.createElementVNode)(`div`,{class:`mb-4 text-gray-400`},[(0,u.createElementVNode)(`svg`,{class:`mx-auto w-16 h-16`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})])],-1),(0,u.createElementVNode)(`h3`,K7,(0,u.toDisplayString)(c.value.name),1),n[3]||=(0,u.createElementVNode)(`p`,{class:`text-gray-500 mb-4`},`This file type cannot be previewed directly.`,-1),(0,u.createElementVNode)(`a`,{href:c.value.url,target:`_blank`,class:`inline-flex items-center px-4 py-2 bg-primary text-white text-sm font-medium rounded-md hover:bg-primary/90 transition-colors shadow-sm`},` Preview in Browser `,8,q7)]))])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,J7,`No file selected`)),(0,u.createElementVNode)(`div`,Y7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,X7,(0,u.toDisplayString)(i.value+1)+` / `+(0,u.toDisplayString)(a.value.length),1)):(0,u.createCommentVNode)(``,!0)])])]),_:1},8,[`title`,`actions`,`show`]))}}),Q7={class:`w-full`},$7=[`accept`,`multiple`],e9={key:0},t9={key:0,class:`group`},n9={key:0,class:`text-xs text-gray-400 mt-1`},r9={key:1,class:`relative group border rounded-default flex items-center gap-[15px] bg-white hover:border-primary transition-colors`},i9={class:`w-12 h-12 flex-shrink-0 bg-gray-100 rounded-md flex items-center justify-center overflow-hidden`},a9=[`src`],o9={key:1,class:`w-6 h-6 text-gray-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},s9={class:`flex-1 min-w-0 pr-[50px]`},c9={class:`text-sm font-medium text-gray-900 truncate`},l9={class:`text-xs text-gray-500`},u9={key:1},d9=[`onClick`],f9={class:`w-12 h-12 flex-shrink-0 bg-gray-100 rounded-md flex items-center justify-center overflow-hidden`},p9=[`src`],m9={key:1,class:`w-6 h-6 text-gray-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},h9={class:`flex-1 min-w-0`},g9={class:`text-sm font-medium text-gray-900 truncate`},_9={class:`text-xs text-gray-500`},v9=[`onClick`],y9=(0,u.defineComponent)({__name:`FileUpload`,props:{modelValue:{default:null},accept:{default:`*`},multiple:{type:Boolean,default:!1},maxFiles:{default:-1},dragAndDrop:{type:Boolean,default:!0},columns:{default:2}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(null),a=(0,u.ref)(!1),o=(0,u.ref)(!1),s=(0,u.ref)(0),c=(0,u.computed)(()=>n.multiple?n.maxFiles===-1?!0:(Array.isArray(n.modelValue)?n.modelValue.length:+!!n.modelValue)<n.maxFiles:!1),l=(0,u.computed)(()=>Array.isArray(n.modelValue)?n.modelValue:n.modelValue?[n.modelValue]:[]),d=()=>{i.value?.click()},f=e=>{let t=e.target;t.files&&g(Array.from(t.files)),t.value=``},p=()=>{n.dragAndDrop&&(a.value=!0)},m=()=>{a.value=!1},h=e=>{a.value=!1,!(!n.dragAndDrop||!e.dataTransfer?.files)&&g(Array.from(e.dataTransfer.files))},g=e=>{if(!n.multiple)r(`update:modelValue`,e[0]);else{let t=Array.isArray(n.modelValue)?[...n.modelValue]:[],i=n.maxFiles===-1?1/0:n.maxFiles-t.length,a=e.slice(0,i);r(`update:modelValue`,[...t,...a])}},_=e=>{if(!n.multiple)r(`update:modelValue`,null);else{let t=Array.isArray(n.modelValue)?[...n.modelValue]:[];t.splice(e,1),r(`update:modelValue`,t)}},v=e=>{s.value=e,o.value=!0},y=e=>e.type.startsWith(`image/`),b=e=>URL.createObjectURL(e),x=e=>{if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(1))+` `+n[r]};return(t,n)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,Q7,[(0,u.createElementVNode)(`input`,{ref_key:`fileInput`,ref:i,type:`file`,accept:e.accept,multiple:e.multiple,class:`hidden`,onChange:f},null,40,$7),e.dragAndDrop?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,class:(0,u.normalizeClass)([`relative rounded-lg transition-all duration-200`,{"ring-2 ring-primary ring-offset-2 bg-primary/5":a.value}]),onDragover:(0,u.withModifiers)(p,[`prevent`]),onDragleave:(0,u.withModifiers)(m,[`prevent`]),onDrop:(0,u.withModifiers)(h,[`prevent`])},[e.multiple?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,u9,[(0,u.createElementVNode)(`div`,{class:`grid gap-[15px]`,style:(0,u.normalizeStyle)(`grid-template-columns: repeat(${e.columns}, minmax(0, 1fr));`)},[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(e.modelValue,(e,t)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:t,class:`relative group border rounded-default flex items-center gap-[15px] bg-white hover:border-primary transition-colors`},[(0,u.createElementVNode)(`div`,{class:`flex-1 min-w-0 flex gap-[15px] py-[15px] pl-[15px] pr-[50px] cursor-pointer items-center`,onClick:e=>v(t)},[(0,u.createElementVNode)(`div`,f9,[y(e)?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:b(e),class:`w-full h-full object-cover`},null,8,p9)):((0,u.openBlock)(),(0,u.createElementBlock)(`svg`,m9,[...n[9]||=[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},null,-1)]]))]),(0,u.createElementVNode)(`div`,h9,[(0,u.createElementVNode)(`p`,g9,(0,u.toDisplayString)(e.name),1),(0,u.createElementVNode)(`p`,_9,(0,u.toDisplayString)(x(e.size)),1)])],8,d9),(0,u.createElementVNode)(`button`,{onClick:e=>_(t),class:`p-1.5 text-gray-400 hover:text-red-500 transition-colors cursor-pointer absolute right-[15px]`,title:`Remove`},[...n[10]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,v9)]))),128)),c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,onClick:d,class:`border-2 border-dashed border-gray-300 rounded-default flex flex-col items-center justify-center cursor-pointer hover:border-primary hover:bg-gray-50 transition-colors group h-[75px]`},[...n[11]||=[(0,u.createElementVNode)(`svg`,{class:`w-8 h-8 text-gray-300 group-hover:text-primary transition-colors mb-2`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),(0,u.createElementVNode)(`span`,{class:`text-xs text-gray-500 font-medium`},`Add File`,-1)]])):(0,u.createCommentVNode)(``,!0)],4)])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,e9,[e.modelValue?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,r9,[(0,u.createElementVNode)(`div`,{class:`flex-1 flex gap-[15px] py-[15px] pl-[15px] pr-[75px] cursor-pointer items-center`,onClick:n[0]||=e=>v(0)},[(0,u.createElementVNode)(`div`,i9,[y(e.modelValue)?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:b(e.modelValue),class:`w-full h-full object-cover`},null,8,a9)):((0,u.openBlock)(),(0,u.createElementBlock)(`svg`,o9,[...n[6]||=[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},null,-1)]]))]),(0,u.createElementVNode)(`div`,s9,[(0,u.createElementVNode)(`p`,c9,(0,u.toDisplayString)(e.modelValue.name),1),(0,u.createElementVNode)(`p`,l9,(0,u.toDisplayString)(x(e.modelValue.size)),1)])]),(0,u.createElementVNode)(`button`,{onClick:d,class:`p-1.5 text-gray-400 hover:text-primary transition-colors cursor-pointer absolute right-[45px]`,title:`Replace`},[...n[7]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15`})],-1)]]),(0,u.createElementVNode)(`button`,{onClick:n[1]||=e=>_(0),class:`p-1.5 text-gray-400 hover:text-red-500 transition-colors cursor-pointer absolute right-[15px]`,title:`Remove`},[...n[8]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,t9,[(0,u.createElementVNode)(`div`,{onClick:d,class:`border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center cursor-pointer hover:border-primary hover:bg-gray-50 transition-colors h-[150px]`},[n[4]||=(0,u.createElementVNode)(`div`,{class:`mb-2 p-2 rounded-full bg-gray-100 group-hover:bg-primary/10 transition-colors`},[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6 text-gray-400 group-hover:text-primary`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12`})])],-1),n[5]||=(0,u.createElementVNode)(`p`,{class:`text-sm text-gray-600 font-medium`},`Click to upload`,-1),e.dragAndDrop?((0,u.openBlock)(),(0,u.createElementBlock)(`p`,n9,`or drag and drop`)):(0,u.createCommentVNode)(``,!0)])]))])),(0,u.createVNode)(Z7,{show:o.value,"onUpdate:show":n[2]||=e=>o.value=e,files:l.value,initialIndex:s.value,onClose:n[3]||=e=>o.value=!1},null,8,[`show`,`files`,`initialIndex`])],34)):(0,u.createCommentVNode)(``,!0)]))}}),b9={mounted:(e,t)=>{if(t.value){let n=e.querySelector(`input`),r=document.createElement(`span`);r.classList.add(`field-error`,`error-message`),n?.classList.add(`input-error`),r.textContent=t.value,e.appendChild(r)}},updated:(e,t)=>{let n=e.querySelector(`input`),r=e.querySelector(`.error-message`);if(!r&&t.value){let r=document.createElement(`span`);r.classList.add(`field-error`,`error-message`),r.textContent=t.value,n?.classList.add(`input-error`),e.appendChild(r)}else t.value?(e.classList.add(`input-error`),n?.classList.add(`input-error`),r&&(r.textContent=t.value)):(n?.classList.remove(`input-error`),r&&r.remove())}},x9=new WeakMap,S9={mounted(e,t){let n=null,r=0;e.classList.add(`hide-scrollbar`);let i=()=>{e.classList.remove(`hide-scrollbar`)},a=()=>{e.classList.add(`hide-scrollbar`),r=Date.now()},o=()=>{Date.now()-r>=100&&i(),n&&clearTimeout(n),n=setTimeout(a,1e3)};e.addEventListener(`scroll`,o),x9.set(e,o)},unmounted(e){let t=x9.get(e);t&&(e.removeEventListener(`scroll`,t),x9.delete(e))}},C9=new WeakMap,w9={mounted(e){(0,u.nextTick)(()=>{let t=()=>{typeof e.select==`function`&&e.select()};e.addEventListener(`focus`,t),C9.set(e,t)})},unmounted(e){let t=C9.get(e);t&&(e.removeEventListener(`focus`,t),C9.delete(e))}},T9=(e,t,n=`RS.`,r=`usa`,i=`nepali`)=>{let a=parseFloat(e);if(isNaN(a))return``;let o=r===`euro`,s=o?`,`:`.`,c=o?`.`:`,`,l=a.toFixed(2).split(`.`),u=l[0],d=l[1];if(i===`nepali`){let e=u.slice(-3),t=u.slice(0,-3),n=t.replace(/\B(?=(\d{2})+(?!\d))/g,c);u=t?n+c+e:e}else u=u.replace(/\B(?=(\d{3})+(?!\d))/g,c);return t&&n?`${n}${u}${s}${d}`:`${u}${s}${d}`},E9=(e,t,n=`RS.`,r=`usa`)=>{if(!e)return 0;let i=r===`euro`,a=i?`,`:`.`,o=i?`.`:`,`,s=e.trim();t&&n&&s.startsWith(n)&&(s=s.slice(n.length).trim());let c=RegExp(`\\${o}(?=\\d{2,3})`,`g`);s=s.replace(c,``);let l=s.lastIndexOf(a);l!==-1&&a!==`.`&&(s=s.slice(0,l)+`.`+s.slice(l+1));let u=parseFloat(s);return isNaN(u)?0:u},D9={install(e){e.config.globalProperties.$currencyFormatter=T9,e.config.globalProperties.$currencyUnformatter=E9}},O9=(e,t,n=!0)=>{n?e.value=T9(e.value,!1,``,t.format,t.structure):e.value=E9(e.value,!1,``,t.format).toString()},k9={mounted(e,t){let n={format:t.modifiers.euro?`euro`:`usa`,structure:t.arg===`foreign`?`foreign`:`nepali`};(0,u.nextTick)(()=>{e.value&&O9(e,n)});let r=()=>{O9(e,n),e.removeEventListener(`blur`,r),e.removeEventListener(`keydown`,a)},i=()=>{O9(e,n,!1),e.addEventListener(`blur`,r),e.addEventListener(`keydown`,a)},a=t=>{let n=/^\d$/.test(t.key),r=t.key===`.`,i=t.ctrlKey||t.metaKey,a=t.key===`Enter`||t.key===`Tab`||t.key===`Backspace`,o=e.value.includes(`.`);if(r&&o){t.preventDefault();return}n||r&&!o||i||a||t.preventDefault()};e.addEventListener(`focus`,i),e.eventCleanUp=()=>{e.removeEventListener(`focus`,i),e.removeEventListener(`blur`,r),e.removeEventListener(`keydown`,a)}},updated(e,t){let n={format:t.modifiers.euro?`euro`:`usa`,structure:t.arg===`foreign`?`foreign`:`nepali`};document.activeElement!=e&&O9(e,n)}},A9={mounted(e){let t=e.closest(`.sidebar-dropdown`);if(!t)return;let n=()=>{let t=e.scrollHeight,n=t*1e3/700;e.style.overflow=`hidden`,e.style.transition=`height ${n}ms linear`,e.style.height=`${t}px`,clearTimeout(e._timeout),e._timeout=window.setTimeout(()=>{e.style.height=``,e.style.transition=``,e.style.overflow=``},n)},r=()=>{let t=e.scrollHeight,n=t*1e3/700;e.style.transition=`height ${n}ms linear`,e.style.overflow=`hidden`,e.style.height=`${t}px`,e.offsetHeight,e.style.height=`0px`,clearTimeout(e._timeout),e._timeout=window.setTimeout(()=>{e.style.transition=``,e.style.overflow=``},n)},i=new MutationObserver(()=>{t.classList.contains(`sidebar-item-open`)?n():r()});i.observe(t,{attributes:!0,attributeFilter:[`class`]}),e._observer=i,t.classList.contains(`sidebar-item-open`)?e.style.height=`auto`:(e.style.height=`0px`,e.style.overflow=`hidden`)},unmounted(e){e._observer&&e._observer.disconnect(),clearTimeout(e._timeout)}},j9=[`innerHTML`],M9={key:1},N9=f4((0,u.defineComponent)({__name:`Tooltip`,props:{content:{},raw:{type:Boolean}},setup(e,{expose:t}){let n=(0,u.ref)(!1);(0,u.onMounted)(()=>{requestAnimationFrame(()=>{n.value=!0})});function r(){n.value=!1}return t({hide:r}),(t,r)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{class:(0,u.normalizeClass)([`tooltip-content`,{visible:n.value}])},[e.raw?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,innerHTML:e.content},null,8,j9)):((0,u.openBlock)(),(0,u.createElementBlock)(`span`,M9,(0,u.toDisplayString)(e.content),1))],2))}}),[[`__scopeId`,`data-v-3e0dd3fc`]]),P9={mounted(e,t){let n=null,r=null,i=null,a=t;function o(e,t,n){let r=window.innerWidth,i=window.innerHeight;switch(e){case`top`:return t.top>=n.height;case`bottom`:return i-t.bottom>=n.height;case`left`:return t.left>=n.width;case`right`:return r-t.right>=n.width;default:return!1}}let s=async()=>{if(!a.value||!a.value.content)return;let{content:t,raw:i=!1,preferredPosition:s=`top`}=a.value;if(n&&r&&(n.unmount(),r.remove()),r=document.createElement(`div`),r.style.position=`absolute`,r.style.zIndex=`9999`,document.body.appendChild(r),n=(0,u.createApp)(N9,{content:t,raw:i}),n.mount(r),await(0,u.nextTick)(),!r)return;let c=e.getBoundingClientRect(),l=r.getBoundingClientRect(),d=[s,...[`top`,`bottom`,`left`,`right`].filter(e=>e!==s)].find(e=>o(e,c,l))||`bottom`,f=0,p=0;switch(d){case`top`:f=c.top-l.height+window.scrollY,p=c.left+(c.width-l.width)/2+window.scrollX;break;case`bottom`:f=c.bottom+window.scrollY,p=c.left+(c.width-l.width)/2+window.scrollX;break;case`left`:f=c.top+(c.height-l.height)/2+window.scrollY,p=c.left-l.width+window.scrollX;break;case`right`:f=c.top+(c.height-l.height)/2+window.scrollY,p=c.right+window.scrollX;break}p=Math.max(0,Math.min(p,window.innerWidth-l.width)),f=Math.max(0,Math.min(f,window.innerHeight-l.height)),r.style.top=`${f}px`,r.style.left=`${p}px`},c=async()=>{i&&=(clearTimeout(i),null),await s()},l=()=>{i&&=(clearTimeout(i),null),n&&r&&(n.unmount(),r.remove(),n=null,r=null)},d=()=>{i||=window.setTimeout(()=>{c(),i=null},200)};e.__tooltipHandlers={showTooltip:d,hideTooltip:l,clearShowTimeout:()=>{i&&=(clearTimeout(i),null)},createTooltip:s,updateBinding:e=>{a=e}},e.addEventListener(`mouseenter`,d),e.addEventListener(`mouseleave`,l)},updated(e,t){e.__tooltipHandlers&&(e.__tooltipHandlers.updateBinding(t),e.matches(`:hover`)&&e.__tooltipHandlers.createTooltip())},unmounted(e){e.__tooltipHandlers&&(e.__tooltipHandlers.hideTooltip(),e.removeEventListener(`mouseenter`,e.__tooltipHandlers.showTooltip),e.removeEventListener(`mouseleave`,e.__tooltipHandlers.hideTooltip),e.__tooltipHandlers.clearShowTimeout(),delete e.__tooltipHandlers)}},F9=class{socket=null;url=``;isConnected=!1;initPromise=null;setURL(e){this.url=e}init(e=()=>{}){return this.url===``?(console.log(`❗WebSocket url not set!`),Promise.resolve(this)):this.socket&&this.socket.readyState===WebSocket.OPEN?(console.log(`❗WebSocket is already initialized and OPEN`),Promise.resolve(this)):this.socket&&this.socket.readyState===WebSocket.CONNECTING&&this.initPromise?(console.log(`⏳ WebSocket is currently connecting...`),this.initPromise):(this.initPromise=new Promise((t,n)=>{try{this.socket=new WebSocket(this.url),this.socket.onopen=()=>{this.isConnected=!0,console.log(`✅ WebSocket connected`),this.initPromise=null,t(this)},this.socket.onclose=e=>{let t=!this.isConnected;this.isConnected=!1,console.log(`❌ WebSocket connection closed:`,e.reason||`No reason provided`),t&&this.initPromise&&(this.initPromise=null,n(Error(`WebSocket closed during initialization`)))},this.socket.onerror=t=>{this.close(),console.error(`⛔ WebSocket error occurred:`,t),e?.(t),this.initPromise&&(this.initPromise=null,n(t))}}catch(e){console.error(`⛔ Error creating WebSocket:`,e),this.initPromise=null,n(e)}}),this.initPromise)}onMessage(e){return this.socket?(this.socket.onmessage=t=>{e&&t.data&&e(t.data)},Promise.resolve(this)):(console.error(`❗ WebSocket is not initialized`),Promise.resolve(this))}sendMessage(e){return new Promise((t,n)=>{if(this.socket&&this.isConnected)try{this.socket.send(e),t()}catch(e){console.error(`❗ Error sending message:`,e),n(e)}else{let e=`❗ WebSocket is not connected`;console.error(e),n(Error(e))}})}close(){this.socket&&(this.socket.close(),this.socket=null,this.isConnected=!1,console.log(`❗ WebSocket connection closing!`))}getConnectionStatus(){return this.isConnected}},I9=(e,t)=>{let n=e.toLowerCase().split(`+`).map(e=>e.trim()),r={ctrl:n.includes(`ctrl`),alt:n.includes(`alt`),shift:n.includes(`shift`),meta:n.includes(`meta`)},i=n.filter(e=>![`ctrl`,`alt`,`shift`,`meta`].includes(e));if(i.length===0)throw Error(`No main keys specified in shortcut.`);let a=new Set,o=e=>{a.add(e.key.toLowerCase());let n=e.ctrlKey===r.ctrl&&e.altKey===r.alt&&e.shiftKey===r.shift&&e.metaKey===r.meta,o=i.every(e=>a.has(e));n&&o&&(e.preventDefault(),t(e))},s=e=>{a.delete(e.key.toLowerCase())};return window.addEventListener(`keydown`,o),window.addEventListener(`keyup`,s),{destroy(){window.removeEventListener(`keydown`,o),window.removeEventListener(`keyup`,s)}}},L9=(e,t)=>{let n=null;return{run:r=>{n&&clearTimeout(n),n=setTimeout(()=>{e(r),n=null},t)},cancel:()=>{n&&=(clearTimeout(n),null)}}},R9=(e,t)=>{let n;if(t&&(t.$refs?n=t.$refs[e]:t.refs&&(n=t.refs[e]),n&&typeof n.activate==`function`)){n.activate();return}let r=document.getElementById(e);if(!r)return;let i=r.tagName;(i===`INPUT`||i===`TEXTAREA`||i===`BUTTON`)&&r.focus()},z9={install(e){e.config.globalProperties.$focusNext=function(e){R9(e,this)}}},B9=(e,t=!1,n=!0)=>{if(e==null||e===``)return``;let r=[``,`एक`,`दुई`,`तीन`,`चार`,`पाँच`,`छ`,`सात`,`आठ`,`नौ`,`दश`,`एघार`,`बाह्र`,`तेह्र`,`चौध`,`पन्ध्र`,`सोह्र`,`सत्र`,`अठार`,`उन्नाइस`],i=`..बीस.एक्काइस.बाइस.तेइस.चौबीस.पच्चीस.छब्बीस.सत्ताइस.अठ्ठाइस.उनन्तिस.तीस.एकतीस.बत्तीस.तेत्तीस.चौँतीस.पैंतीस.छत्तीस.सैतीस.अठतीस.उनन्चालीस.चालीस.एकचालीस.बयालीस.त्रियालीस.चवालीस.पैंतालीस.छयालीस.सतचालीस.अठचालीस.उनन्चास.पचास.एकाउन्न.बाउन्न.त्रिपन्न.चवन्न.पचपन्न.छपन्न.सन्ताउन्न.अन्ठाउन्न.उनन्साठी.साठी.एकसठ्ठी.बयसठ्ठी.त्रिसठ्ठी.चौंसठ्ठी.पैंसठ्ठी.छयसठ्ठी.सतसठ्ठी.अठसठ्ठी.उनन्सत्तरी.सत्तरी.एकहत्तर.बहत्तर.त्रिहत्तर.चौहत्तर.पचहत्तर.छयहत्तर.सतहत्तर.अठहत्तर.उनासी.असी.एकासी.बयासी.त्रियासी.चौरासी.पचासी.छयासी.सतासी.अठासी.उनान्नब्बे.नब्बे.एकानब्बे.बयानब्बे.त्रियानब्बे.चौरानब्बे.पन्चानब्बे.छयानब्बे.सन्तानब्बे.अन्ठानब्बे.उनान्सय`.split(`.`),a=[``,`One`,`Two`,`Three`,`Four`,`Five`,`Six`,`Seven`,`Eight`,`Nine`,`Ten`,`Eleven`,`Twelve`,`Thirteen`,`Fourteen`,`Fifteen`,`Sixteen`,`Seventeen`,`Eighteen`,`Nineteen`],o=[``,``,`Twenty`,`Thirty`,`Forty`,`Fifty`,`Sixty`,`Seventy`,`Eighty`,`Ninety`],s=t?[`खर्ब`,`अर्ब`,`करोड`,`लाख`,`हजार`,`सय`]:[`Kharaab`,`Arab`,`Crore`,`Lakh`,`Thousand`,`Hundred`],c=t?`ऋण`:`Negative`,l=t?`रुपैयाँ`:`Rupees`,u=t?`पैसा`:`Paisa`,d=t?`शून्य`:`Zero`,f=t?`दश`:`Point`,p=String(e).trim(),m=!1;p.startsWith(`-`)&&(m=!0,p=p.slice(1));let[h,g]=p.split(`.`),_=parseInt(h,10);if(isNaN(_))return``;if(_===0&&!g)return d;function v(e){if(t)return e<20?r[e]:i[e];{if(e<20)return a[e];let t=Math.floor(e/10),n=e%10;return o[t]+(n?` `+a[n]:``)}}function y(e){if(e===0)return``;let n=e,i=e=>{let t=n%e;return n=Math.floor(n/e),t},o=i(1e3),c=i(100),l=i(100),u=i(100),d=i(100),f=[{value:i(100),label:s[0]},{value:d,label:s[1]},{value:u,label:s[2]},{value:l,label:s[3]},{value:c,label:s[4]},{value:Math.floor(o/100),label:s[5],suffix:!0}],p=[],m=o%100;for(let e of f)e.value&&(e.suffix?p.push(t?r[e.value]:a[e.value],e.label):p.push(v(e.value),e.label));return m&&p.push(v(m)),p.filter(Boolean).join(` `)}let b=y(_);if(b&&n&&(b+=` `+l),g)if(n){let e=parseInt(g.substring(0,2).padEnd(2,`0`),10);if(e>0){let t=v(e);b+=` `+t+` `+u}}else{let e=g.split(``).map(e=>t?r[parseInt(e,10)]||``:a[parseInt(e,10)]||``).join(` `);b+=` `+f+` `+e}return m&&(b=c+` `+b),b.trim().replace(/\s+/g,` `)},V9={install(e){e.config.globalProperties.$numberToWords=B9}};exports.ContentLayout=v,exports.CreateDebounce=L9,exports.CreateShortCutKey=I9,exports.CurrencyFormatterPlugin=D9,exports.DateRange=h7,exports.DateSelector=U5,exports.FilePreview=Z7,exports.FileUpload=y9,exports.FocusNextPlugin=z9,exports.Icons=$P,exports.InputCurrency=k9,exports.InputError=b9,exports.InputSelect=w9,exports.Loader=C7,exports.Modal=O,exports.NumbertoWordPlugin=V9,exports.ScrollbarAnimateDropdown=A9,exports.ScrollbarScroll=S9,exports.Switch=A,exports.Tabulator=$2,exports.ToastPlugin=O7,exports.Toggle=n4,exports.Tooltip=P9,exports.Towser=p4,exports.UploadImage=I7,exports.WebSocketWrapper=F9,exports.Wizard=x7,exports.currencyFormatter=T9,exports.currencyUnformatter=E9,exports.numberToWords=B9,exports.toast=D7;
249
+ `).join(`<br />`)),Le(e)}let di;var fi=new WeakMap;class pi{constructor(...e){if(r(this,fi,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),typeof window>`u`)return;di=this;let t=Object.freeze(this.constructor.argsToParams(e));this.params=t,this.isAwaitingPromise=!1,i(fi,this,this._main(di.params))}_main(e,t={}){if(pr(Object.assign({},t,e)),a.currentInstance){let e=Qt.swalPromiseResolve.get(a.currentInstance),{isAwaitingPromise:t}=a.currentInstance;a.currentInstance._destroy(),t||e({isDismissed:!0}),R()&&en()}a.currentInstance=di;let n=hi(e,t);ui(n),Object.freeze(n),a.timeout&&(a.timeout.stop(),delete a.timeout),clearTimeout(a.restoreFocusTimeout);let r=gi(di);return It(di,n),Ze.innerParams.set(di,n),mi(di,r,n)}then(e){return n(fi,this).then(e)}finally(e){return n(fi,this).finally(e)}}let mi=(e,t,n)=>new Promise((r,i)=>{let o=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};Qt.swalPromiseResolve.set(e,r),Qt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{Ln(e)},t.denyButton.onclick=()=>{Rn(e)},t.cancelButton.onclick=()=>{zn(e,o)},t.closeButton.onclick=()=>{o(Vt.close)},br(n,t,o),Ut(a,n,o),En(e,n),ni(n),_i(a,n,o),vi(t,n),setTimeout(()=>{t.container.scrollTop=0})}),hi=(e,t)=>{let n=Kr(e),r=Object.assign({},rr,t,n,e);return r.showClass=Object.assign({},rr.showClass,r.showClass),r.hideClass=Object.assign({},rr.hideClass,r.hideClass),r.animation===!1&&(r.showClass={backdrop:`swal2-noanimation`},r.hideClass={}),r},gi=e=>{let t={popup:E(),container:C(),actions:I(),confirmButton:P(),denyButton:F(),cancelButton:ee(),loader:ne(),closeButton:ie(),validationMessage:N(),progressSteps:M()};return Ze.domCache.set(e,t),t},_i=(e,t,n)=>{let r=re();ve(r),t.timer&&(e.timeout=new Wr(()=>{n(`timer`),delete e.timeout},t.timer),t.timerProgressBar&&r&&(_e(r),le(r,t,`timerProgressBar`),setTimeout(()=>{e.timeout&&e.timeout.running&&De(t.timer)})))},vi=(e,t)=>{if(!t.toast){if(!v(t.allowEnterKey)){_(`allowEnterKey`,`preConfirm: () => false`),e.popup.focus();return}yi(e)||bi(e,t)||Wt(-1,1)}},yi=e=>{let t=Array.from(e.popup.querySelectorAll(`[autofocus]`));for(let e of t)if(e instanceof HTMLElement&&Se(e))return e.focus(),!0;return!1},bi=(e,t)=>t.focusDeny&&Se(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&Se(e.cancelButton)?(e.cancelButton.focus(),!0):t.focusConfirm&&Se(e.confirmButton)?(e.confirmButton.focus(),!0):!1;pi.prototype.disableButtons=Qn,pi.prototype.enableButtons=Zn,pi.prototype.getInput=Jn,pi.prototype.disableInput=er,pi.prototype.enableInput=$n,pi.prototype.hideLoading=Kn,pi.prototype.disableLoading=Kn,pi.prototype.showValidationMessage=tr,pi.prototype.resetValidationMessage=nr,pi.prototype.close=gn,pi.prototype.closePopup=gn,pi.prototype.closeModal=gn,pi.prototype.closeToast=gn,pi.prototype.rejectPromise=vn,pi.prototype.update=mr,pi.prototype._destroy=gr,Object.assign(pi,Ur),Object.keys(yr).forEach(e=>{pi[e]=function(...t){if(di&&di[e])return di[e](...t)}}),pi.DismissReason=Vt,pi.version=`11.26.24`;let xi=pi;return xi.default=xi,xi})),e!==void 0&&e.Sweetalert2&&(e.swal=e.sweetAlert=e.Swal=e.SweetAlert=e.Sweetalert2),typeof document<`u`&&function(e,t){var n=e.createElement(`style`);if(e.getElementsByTagName(`head`)[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch{n.innerText=t}}(document,`:root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}`)}))(),1),E7=e=>T7.default.mixin({toast:!0,position:`top-end`,showConfirmButton:!1,timer:e||3e3,timerProgressBar:!0,didOpen:e=>{e.onmouseenter=T7.default.stopTimer,e.onmouseleave=T7.default.resumeTimer,e.onclick=()=>{T7.default.close()}}}),D7={error(e,t){E7(t).fire({icon:`error`,title:e})},warn(e,t){E7(t).fire({icon:`warning`,title:e})},success(e,t){E7(t).fire({icon:`success`,title:e})},info(e,t){E7(t).fire({icon:`info`,title:e})}},O7={install(e){e.config.globalProperties.$toast=D7}},k7={key:0,class:`border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-gray-400 transition-colors h-[300px] flex select-none`},A7={class:`space-y-4 m-auto`},j7={class:`text-sm text-gray-500 mt-2`},M7={key:1,class:`select-none`},N7=[`src`],P7=[`onMousedown`],F7={key:1,class:`absolute inset-0 pointer-events-none`},I7=(0,u.defineComponent)({__name:`UploadImage`,props:{show:{type:Boolean,default:!1},uploadSize:{default:2}},setup(e,{emit:t}){let n=e,r=(0,u.ref)([{name:`Upload Image`,link:`#`}]),i=t,a=(0,u.ref)([{title:`Close`,emit:`onClose`}]),o=(0,u.ref)(),s=(0,u.ref)(``),c=(0,u.ref)(!1),l=(0,u.ref)(``),d=(0,u.ref)(570),f=(0,u.ref)(300),p=(0,u.ref)(null),m=(0,u.ref)({width:0,height:0,scaleX:1,scaleY:1}),h=(0,u.ref)({x:0,y:0,height:0,width:0}),g=(0,u.ref)(!1),_=(0,u.ref)({x:0,y:0}),v=(0,u.ref)(!1),y=(0,u.ref)(``),b=(0,u.ref)(1),x=(0,u.ref)(!1),S=(0,u.ref)({x:0,y:0}),C=()=>{o.value&&o.value.click()},w=(0,u.computed)(()=>h.value?[{position:`nw`,class:`cursor-nw-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{left:`-6px`,top:`-6px`}},{position:`ne`,class:`cursor-ne-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{right:`-6px`,top:`-6px`}},{position:`sw`,class:`cursor-sw-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{left:`-6px`,bottom:`-6px`}},{position:`se`,class:`cursor-se-resize absolute w-3 h-3 bg-blue-500 border border-white cursor-pointer`,style:{right:`-6px`,bottom:`-6px`}}]:[]),T=()=>{let e=b.value,t=S.value,n=m.value.width/m.value.height,r=d.value/f.value,i,a;n>r?(i=d.value*e,a=d.value/n*e):(a=f.value*e,i=f.value*n*e);let o=(d.value-i)/2+t.x,s=(f.value-a)/2+t.y;return{left:o,top:s,right:o+i,bottom:s+a,width:i,height:a}},E=e=>{let t=n.uploadSize,r=e.target.files[0];if(r&&r.type.startsWith(`image/`)&&o.value){if(r.size/(1024*1024)>t){D7.error(`Upload size mute be below ${n.uploadSize} MB.`),o.value.value=``;return}let e=new FileReader;e.onload=e=>{s.value=e.target.result,c.value=!0,l.value=``},e.readAsDataURL(r),a.value=[{title:`Cancel`,emit:`onCancel`,class:`btn btn-danger`},{title:`Reset`,emit:`onReset`,class:`btn btn-outline-danger`},{title:`Crop`,emit:`onCrop`}]}},D=()=>{if(!p.value)return;let e=p.value,t=e.naturalWidth,n=e.naturalHeight;m.value={width:t,height:n,scaleX:t/d.value,scaleY:n/f.value},b.value=1,S.value={x:0,y:0},h.value={x:(d.value-200)/2,y:(f.value-200)/2,width:200,height:200}},k=e=>{g.value=!0,_.value={x:e.clientX-h.value.x,y:e.clientY-h.value.y},e.preventDefault()},A=(e,t)=>{v.value=!0,y.value=e,_.value={x:t.clientX,y:t.clientY,cropX:h.value.x,cropY:h.value.y,cropWidth:h.value.width,cropHeight:h.value.height},t.preventDefault()},j=()=>{g.value=!1,v.value=!1,x.value=!1,y.value=``},M=e=>{if(g.value){let t=T(),n=e.clientX-_.value.x,r=e.clientY-_.value.y,i=Math.max(0,t.left),a=Math.max(0,t.top),o=Math.min(d.value-h.value.width,t.right-h.value.width),s=Math.min(f.value-h.value.height,t.bottom-h.value.height);h.value={...h.value,x:Math.min(Math.max(n,i),o),y:Math.min(Math.max(r,a),s)}}else if(v.value){let t=e.clientX-_.value.x,n=e.clientY-_.value.y,r=T(),i={...h.value};switch(y.value){case`nw`:i.x=Math.max(Math.max(0,r.left),Math.min(_.value.cropX+t,_.value.cropX+_.value.cropWidth-50)),i.y=Math.max(Math.max(0,r.top),Math.min(_.value.cropY+n,_.value.cropY+_.value.cropHeight-50)),i.width=_.value.cropWidth-(i.x-_.value.cropX),i.height=_.value.cropHeight-(i.y-_.value.cropY);break;case`ne`:i.y=Math.max(Math.max(0,r.top),Math.min(_.value.cropY+n,_.value.cropY+_.value.cropHeight-50)),i.height=_.value.cropHeight-(i.y-_.value.cropY),i.width=Math.min(Math.min(d.value-i.x,r.right-i.x),Math.max(50,_.value.cropWidth+t));break;case`sw`:i.x=Math.max(Math.max(0,r.left),Math.min(_.value.cropX+t,_.value.cropX+_.value.cropWidth-50)),i.width=_.value.cropWidth-(i.x-_.value.cropX),i.height=Math.min(Math.min(f.value-i.y,r.bottom-i.y),Math.max(50,_.value.cropHeight+n));break;case`se`:i.width=Math.min(Math.min(d.value-i.x,r.right-i.x),Math.max(50,_.value.cropWidth+t)),i.height=Math.min(Math.min(f.value-i.y,r.bottom-i.y),Math.max(50,_.value.cropHeight+n));break}h.value=i}},N=e=>{let t=h.value,n=e.currentTarget.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top;r>=t.x&&r<=t.x+t.width&&i>=t.y&&i<=t.y+t.height||(x.value=!0,_.value={x:e.clientX-S.value.x,y:e.clientY-S.value.y},e.preventDefault())},P=()=>{if(!h.value||!p.value)return;let e=p.value,t=m.value.width,n=m.value.height,r=b.value,a=S.value.x,o=S.value.y,s=d.value,c=f.value,u=t/n,g=s/c,_,v;u>g?(_=s*r,v=s/u*r):(v=c*r,_=c*u*r);let y=(s-_)/2+a,x=(c-v)/2+o,C=h.value.x-y,w=h.value.y-x,T=t/_,E=n/v,D=C*T,O=w*E,k=h.value.width*T,A=h.value.height*E,j=Math.max(0,D),M=Math.max(0,O),N=Math.max(1,Math.min(t-j,k)),P=Math.max(1,Math.min(n-M,A)),F=document.createElement(`canvas`);F.width=N,F.height=P;let te=F.getContext(`2d`);te&&(te.drawImage(e,j,M,N,P,0,0,N,P),l.value=F.toDataURL(`image/png`),i(`onImageCrop`,l.value),ee())},ee=()=>{c.value=!1,s.value=``,h.value={},l.value=``,S.value={x:0,y:0},b.value=1,o.value&&(o.value.value=``),a.value=[{title:`Close`,emit:`onClose`}]};return(0,u.onMounted)(()=>{document.addEventListener(`mousemove`,M),document.addEventListener(`mouseup`,j)}),(0,u.onUnmounted)(()=>{document.removeEventListener(`mousemove`,M),document.removeEventListener(`mouseup`,j)}),(t,n)=>((0,u.openBlock)(),(0,u.createBlock)(O,{title:r.value,actions:a.value,show:e.show,onOnClose:n[0]||=e=>i(`onClose`),onOnCrop:P,onOnReset:ee,onOnCancel:n[1]||=e=>{ee(),i(`onClose`)}},{default:(0,u.withCtx)(()=>[c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,M7,[(0,u.createElementVNode)(`div`,{ref:`cropperContainer`,class:`relative mx-auto shadow-sm overflow-hidden`,style:(0,u.normalizeStyle)({width:d.value+`px`,height:f.value+`px`,backgroundImage:`url(${(0,u.unref)(w7)})`}),onMousedown:N},[(0,u.createElementVNode)(`img`,{ref_key:`cropperImage`,ref:p,src:s.value,class:`w-full h-full object-contain`,style:(0,u.normalizeStyle)({transform:`scale(${b.value}) translate(${S.value.x}px, ${S.value.y}px)`}),onLoad:D},null,44,N7),h.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,class:`absolute border-2 border-primary border-dashed cursor-move`,style:(0,u.normalizeStyle)({left:h.value.x+`px`,top:h.value.y+`px`,width:h.value.width+`px`,height:h.value.height+`px`}),onMousedown:k},[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(w.value,e=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:e.position,class:(0,u.normalizeClass)(e.class),style:(0,u.normalizeStyle)(e.style),onMousedown:(0,u.withModifiers)(t=>A(e.position,t),[`stop`])},null,46,P7))),128))],36)):(0,u.createCommentVNode)(``,!0),h.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,F7,[(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:`0px`,width:`100%`,height:h.value.y+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:h.value.y+h.value.height+`px`,width:`100%`,height:f.value-h.value.y-h.value.height+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:`0px`,top:h.value.y+`px`,width:h.value.x+`px`,height:h.value.height+`px`})},null,4),(0,u.createElementVNode)(`div`,{class:`absolute bg-black/20`,style:(0,u.normalizeStyle)({left:h.value.x+h.value.width+`px`,top:h.value.y+`px`,width:d.value-h.value.x-h.value.width+`px`,height:h.value.height+`px`})},null,4)])):(0,u.createCommentVNode)(``,!0)],36)])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,k7,[(0,u.createElementVNode)(`input`,{ref_key:`fileInput`,ref:o,type:`file`,class:`hidden`,onChange:E,accept:`image/png, image/jpeg, image/jpg, image/webp`},null,544),(0,u.createElementVNode)(`div`,A7,[n[2]||=(0,u.createElementVNode)(`div`,{class:`mx-auto w-16 h-16 bg-gray-100 rounded-full flex items-center justify-center`},[(0,u.createElementVNode)(`svg`,{class:`w-8 h-8 text-gray-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z`})])],-1),(0,u.createElementVNode)(`div`,null,[(0,u.createElementVNode)(`button`,{class:`btn btn-primary`,onClick:C},`Choose Image`),(0,u.createElementVNode)(`p`,j7,`PNG, JPG up to `+(0,u.toDisplayString)(e.uploadSize)+` MB`,1)])])]))]),_:1},8,[`title`,`actions`,`show`]))}}),L7={class:`relative min-h-[400px] flex flex-col items-center justify-center bg-gray-50 rounded-lg overflow-hidden border border-gray-100`},R7={class:`absolute left-2 bg-white h-[31px] rounded-default`},z7=[`disabled`],B7={class:`absolute right-2 bg-white h-[31px] rounded-default`},V7=[`disabled`],H7={key:0,class:`w-full h-full flex items-center justify-center p-4`},U7=[`src`,`alt`],W7=[`src`],G7={key:2,class:`text-center p-8 bg-white rounded-xl shadow-sm border border-gray-100`},K7={class:`text-lg font-semibold text-gray-900 mb-2`},q7=[`href`],J7={key:1,class:`text-gray-500`},Y7={class:`absolute bottom-4 left-0 right-0 text-center pointer-events-none`},X7={key:0,class:`bg-black/75 text-white px-3 py-1 rounded-full text-xs font-medium backdrop-blur-md`},Z7=(0,u.defineComponent)({__name:`FilePreview`,props:{show:{type:Boolean,default:!1},files:{default:()=>[]},initialIndex:{default:0}},emits:[`update:show`,`close`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(n.initialIndex),a=(0,u.ref)([]),o=(e,t)=>{let n=e.split(`.`).pop()?.toLowerCase();return t?.startsWith(`image/`)||[`jpg`,`jpeg`,`png`,`gif`,`webp`,`svg`,`bmp`].includes(n||``)?`image`:t===`application/pdf`||n===`pdf`?`pdf`:`other`},s=()=>{a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)});let e=[];Array.isArray(n.files)?e=n.files.flat():n.files&&(e=[n.files]),a.value=e.map(e=>{if(e instanceof File)return{url:URL.createObjectURL(e),name:e.name,type:o(e.name,e.type),isBlob:!0};if(typeof e==`object`&&e&&`url`in e){let t=e;return{url:t.url,name:t.name||t.url.split(`/`).pop()||`Unknown File`,type:t.type||o(t.name||t.url),isBlob:t.isBlob||!1}}else if(typeof e==`string`){let t=e.split(`/`).pop()||`Unknown File`;return{url:e,name:t,type:o(t),isBlob:!1}}else return{url:``,name:`Invalid File`,type:`other`,isBlob:!1}}),i.value>=a.value.length&&(i.value=0)};(0,u.onUnmounted)(()=>{window.removeEventListener(`keydown`,h),a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)})}),(0,u.watch)(()=>n.files,()=>{n.show&&s()},{deep:!0}),(0,u.watch)(()=>n.initialIndex,e=>i.value=e),(0,u.watch)(()=>n.show,()=>{n.show?(s(),window.addEventListener(`keydown`,h)):(window.removeEventListener(`keydown`,h),a.value.forEach(e=>{e.isBlob&&URL.revokeObjectURL(e.url)}))});let c=(0,u.computed)(()=>a.value[i.value]),l=(0,u.computed)(()=>a.value.length>1),d=(0,u.computed)(()=>[{name:`Preview`,link:`#`},{name:c.value?.name||`FileDetails`}]),f=(0,u.ref)([{title:`Close`,emit:`onClose`,class:`btn btn-outline-primary`}]),p=()=>{i.value<a.value.length-1&&i.value++},m=()=>{i.value>0&&i.value--},h=e=>{n.show&&(e.key===`ArrowRight`&&p(),e.key===`ArrowLeft`&&m(),e.key===`Escape`&&g())},g=()=>{r(`update:show`,!1),r(`close`)};return(t,n)=>((0,u.openBlock)(),(0,u.createBlock)(O,{title:d.value,actions:f.value,show:e.show,width:`900px`,onOnClose:g},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,L7,[(0,u.createElementVNode)(`div`,R7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`button`,{key:0,onClick:m,class:`btn btn-primary btn-icon`,disabled:i.value===0},[...n[0]||=[(0,u.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,u.createElementVNode)(`path`,{d:`m15 18-6-6 6-6`})],-1)]],8,z7)):(0,u.createCommentVNode)(``,!0)]),(0,u.createElementVNode)(`div`,B7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`button`,{key:0,onClick:p,class:`btn btn-primary btn-icon`,disabled:i.value===a.value.length-1},[...n[1]||=[(0,u.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,u.createElementVNode)(`path`,{d:`m9 18 6-6-6-6`})],-1)]],8,V7)):(0,u.createCommentVNode)(``,!0)]),c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,H7,[c.value.type===`image`?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:c.value.url,alt:c.value.name,class:`max-h-[600px] max-w-full object-contain rounded-md shadow-sm`},null,8,U7)):c.value.type===`pdf`?((0,u.openBlock)(),(0,u.createElementBlock)(`iframe`,{key:1,src:c.value.url,class:`w-full h-[600px] rounded-md shadow-sm bg-white`,frameborder:`0`},null,8,W7)):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,G7,[n[2]||=(0,u.createElementVNode)(`div`,{class:`mb-4 text-gray-400`},[(0,u.createElementVNode)(`svg`,{class:`mx-auto w-16 h-16`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})])],-1),(0,u.createElementVNode)(`h3`,K7,(0,u.toDisplayString)(c.value.name),1),n[3]||=(0,u.createElementVNode)(`p`,{class:`text-gray-500 mb-4`},`This file type cannot be previewed directly.`,-1),(0,u.createElementVNode)(`a`,{href:c.value.url,target:`_blank`,class:`inline-flex items-center px-4 py-2 bg-primary text-white text-sm font-medium rounded-md hover:bg-primary/90 transition-colors shadow-sm`},` Preview in Browser `,8,q7)]))])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,J7,`No file selected`)),(0,u.createElementVNode)(`div`,Y7,[l.value?((0,u.openBlock)(),(0,u.createElementBlock)(`span`,X7,(0,u.toDisplayString)(i.value+1)+` / `+(0,u.toDisplayString)(a.value.length),1)):(0,u.createCommentVNode)(``,!0)])])]),_:1},8,[`title`,`actions`,`show`]))}}),Q7={class:`w-full`},$7=[`accept`,`multiple`],e9={key:0},t9={key:0,class:`group`},n9={key:0,class:`text-xs text-gray-400 mt-1`},r9={key:1,class:`relative group border rounded-default flex items-center gap-[15px] bg-white hover:border-primary transition-colors`},i9={class:`w-12 h-12 flex-shrink-0 bg-gray-100 rounded-md flex items-center justify-center overflow-hidden`},a9=[`src`],o9={key:1,class:`w-6 h-6 text-gray-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},s9={class:`flex-1 min-w-0 pr-[50px]`},c9={class:`text-sm font-medium text-gray-900 truncate`},l9={class:`text-xs text-gray-500`},u9={key:1},d9=[`onClick`],f9={class:`w-12 h-12 flex-shrink-0 bg-gray-100 rounded-md flex items-center justify-center overflow-hidden`},p9=[`src`],m9={key:1,class:`w-6 h-6 text-gray-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},h9={class:`flex-1 min-w-0`},g9={class:`text-sm font-medium text-gray-900 truncate`},_9={class:`text-xs text-gray-500`},v9=[`onClick`],y9=(0,u.defineComponent)({__name:`FileUpload`,props:{modelValue:{default:null},accept:{default:`*`},multiple:{type:Boolean,default:!1},maxFiles:{default:-1},dragAndDrop:{type:Boolean,default:!0},columns:{default:2}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=(0,u.ref)(null),a=(0,u.ref)(!1),o=(0,u.ref)(!1),s=(0,u.ref)(0),c=(0,u.computed)(()=>n.multiple?n.maxFiles===-1?!0:(Array.isArray(n.modelValue)?n.modelValue.length:+!!n.modelValue)<n.maxFiles:!1),l=(0,u.computed)(()=>Array.isArray(n.modelValue)?n.modelValue:n.modelValue?[n.modelValue]:[]),d=()=>{i.value?.click()},f=e=>{let t=e.target;t.files&&g(Array.from(t.files)),t.value=``},p=()=>{n.dragAndDrop&&(a.value=!0)},m=()=>{a.value=!1},h=e=>{a.value=!1,!(!n.dragAndDrop||!e.dataTransfer?.files)&&g(Array.from(e.dataTransfer.files))},g=e=>{if(!n.multiple)r(`update:modelValue`,e[0]);else{let t=Array.isArray(n.modelValue)?[...n.modelValue]:[],i=n.maxFiles===-1?1/0:n.maxFiles-t.length,a=e.slice(0,i);r(`update:modelValue`,[...t,...a])}},_=e=>{if(!n.multiple)r(`update:modelValue`,null);else{let t=Array.isArray(n.modelValue)?[...n.modelValue]:[];t.splice(e,1),r(`update:modelValue`,t)}},v=e=>{s.value=e,o.value=!0},y=e=>e.type.startsWith(`image/`),b=e=>URL.createObjectURL(e),x=e=>{if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(1))+` `+n[r]};return(t,n)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,Q7,[(0,u.createElementVNode)(`input`,{ref_key:`fileInput`,ref:i,type:`file`,accept:e.accept,multiple:e.multiple,class:`hidden`,onChange:f},null,40,$7),e.dragAndDrop?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,class:(0,u.normalizeClass)([`relative rounded-lg transition-all duration-200`,{"ring-2 ring-primary ring-offset-2 bg-primary/5":a.value}]),onDragover:(0,u.withModifiers)(p,[`prevent`]),onDragleave:(0,u.withModifiers)(m,[`prevent`]),onDrop:(0,u.withModifiers)(h,[`prevent`])},[e.multiple?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,u9,[(0,u.createElementVNode)(`div`,{class:`grid gap-[15px]`,style:(0,u.normalizeStyle)(`grid-template-columns: repeat(${e.columns}, minmax(0, 1fr));`)},[((0,u.openBlock)(!0),(0,u.createElementBlock)(u.Fragment,null,(0,u.renderList)(e.modelValue,(e,t)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:t,class:`relative group border rounded-default flex items-center gap-[15px] bg-white hover:border-primary transition-colors`},[(0,u.createElementVNode)(`div`,{class:`flex-1 min-w-0 flex gap-[15px] py-[15px] pl-[15px] pr-[50px] cursor-pointer items-center`,onClick:e=>v(t)},[(0,u.createElementVNode)(`div`,f9,[y(e)?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:b(e),class:`w-full h-full object-cover`},null,8,p9)):((0,u.openBlock)(),(0,u.createElementBlock)(`svg`,m9,[...n[9]||=[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},null,-1)]]))]),(0,u.createElementVNode)(`div`,h9,[(0,u.createElementVNode)(`p`,g9,(0,u.toDisplayString)(e.name),1),(0,u.createElementVNode)(`p`,_9,(0,u.toDisplayString)(x(e.size)),1)])],8,d9),(0,u.createElementVNode)(`button`,{onClick:e=>_(t),class:`p-1.5 text-gray-400 hover:text-red-500 transition-colors cursor-pointer absolute right-[15px]`,title:`Remove`},[...n[10]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,v9)]))),128)),c.value?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,onClick:d,class:`border-2 border-dashed border-gray-300 rounded-default flex flex-col items-center justify-center cursor-pointer hover:border-primary hover:bg-gray-50 transition-colors group h-[75px]`},[...n[11]||=[(0,u.createElementVNode)(`svg`,{class:`w-8 h-8 text-gray-300 group-hover:text-primary transition-colors mb-2`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),(0,u.createElementVNode)(`span`,{class:`text-xs text-gray-500 font-medium`},`Add File`,-1)]])):(0,u.createCommentVNode)(``,!0)],4)])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,e9,[e.modelValue?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,r9,[(0,u.createElementVNode)(`div`,{class:`flex-1 flex gap-[15px] py-[15px] pl-[15px] pr-[75px] cursor-pointer items-center`,onClick:n[0]||=e=>v(0)},[(0,u.createElementVNode)(`div`,i9,[y(e.modelValue)?((0,u.openBlock)(),(0,u.createElementBlock)(`img`,{key:0,src:b(e.modelValue),class:`w-full h-full object-cover`},null,8,a9)):((0,u.openBlock)(),(0,u.createElementBlock)(`svg`,o9,[...n[6]||=[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`},null,-1)]]))]),(0,u.createElementVNode)(`div`,s9,[(0,u.createElementVNode)(`p`,c9,(0,u.toDisplayString)(e.modelValue.name),1),(0,u.createElementVNode)(`p`,l9,(0,u.toDisplayString)(x(e.modelValue.size)),1)])]),(0,u.createElementVNode)(`button`,{onClick:d,class:`p-1.5 text-gray-400 hover:text-primary transition-colors cursor-pointer absolute right-[45px]`,title:`Replace`},[...n[7]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15`})],-1)]]),(0,u.createElementVNode)(`button`,{onClick:n[1]||=e=>_(0),class:`p-1.5 text-gray-400 hover:text-red-500 transition-colors cursor-pointer absolute right-[15px]`,title:`Remove`},[...n[8]||=[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])])):((0,u.openBlock)(),(0,u.createElementBlock)(`div`,t9,[(0,u.createElementVNode)(`div`,{onClick:d,class:`border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center cursor-pointer hover:border-primary hover:bg-gray-50 transition-colors h-[150px]`},[n[4]||=(0,u.createElementVNode)(`div`,{class:`mb-2 p-2 rounded-full bg-gray-100 group-hover:bg-primary/10 transition-colors`},[(0,u.createElementVNode)(`svg`,{class:`w-6 h-6 text-gray-400 group-hover:text-primary`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[(0,u.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12`})])],-1),n[5]||=(0,u.createElementVNode)(`p`,{class:`text-sm text-gray-600 font-medium`},`Click to upload`,-1),e.dragAndDrop?((0,u.openBlock)(),(0,u.createElementBlock)(`p`,n9,`or drag and drop`)):(0,u.createCommentVNode)(``,!0)])]))])),(0,u.createVNode)(Z7,{show:o.value,"onUpdate:show":n[2]||=e=>o.value=e,files:l.value,initialIndex:s.value,onClose:n[3]||=e=>o.value=!1},null,8,[`show`,`files`,`initialIndex`])],34)):(0,u.createCommentVNode)(``,!0)]))}}),b9=e=>{let t=[],n=e.querySelector(`input`);n&&t.push(n);let r=e.querySelector(`.multiselect__tags`);return r&&t.push(r),t},x9=(e,t)=>{b9(e).forEach(e=>e.classList.add(`input-error`));let n=document.createElement(`span`);n.classList.add(`field-error`,`error-message`),n.textContent=t,e.appendChild(n)},S9=e=>{b9(e).forEach(e=>e.classList.remove(`input-error`)),e.querySelector(`.error-message`)?.remove()},C9={mounted:(e,t)=>{t.value&&x9(e,t.value)},updated:(e,t)=>{let n=e.querySelector(`.error-message`);t.value?n?(n.textContent=t.value,b9(e).forEach(e=>e.classList.add(`input-error`))):x9(e,t.value):S9(e)}},w9=new WeakMap,T9={mounted(e,t){let n=null,r=0;e.classList.add(`hide-scrollbar`);let i=()=>{e.classList.remove(`hide-scrollbar`)},a=()=>{e.classList.add(`hide-scrollbar`),r=Date.now()},o=()=>{Date.now()-r>=100&&i(),n&&clearTimeout(n),n=setTimeout(a,1e3)};e.addEventListener(`scroll`,o),w9.set(e,o)},unmounted(e){let t=w9.get(e);t&&(e.removeEventListener(`scroll`,t),w9.delete(e))}},E9=new WeakMap,D9={mounted(e){(0,u.nextTick)(()=>{let t=()=>{typeof e.select==`function`&&e.select()};e.addEventListener(`focus`,t),E9.set(e,t)})},unmounted(e){let t=E9.get(e);t&&(e.removeEventListener(`focus`,t),E9.delete(e))}},O9=(e,t,n=`RS.`,r=`usa`,i=`nepali`)=>{let a=parseFloat(e);if(isNaN(a))return``;let o=r===`euro`,s=o?`,`:`.`,c=o?`.`:`,`,l=a.toFixed(2).split(`.`),u=l[0],d=l[1];if(i===`nepali`){let e=u.slice(-3),t=u.slice(0,-3),n=t.replace(/\B(?=(\d{2})+(?!\d))/g,c);u=t?n+c+e:e}else u=u.replace(/\B(?=(\d{3})+(?!\d))/g,c);return t&&n?`${n}${u}${s}${d}`:`${u}${s}${d}`},k9=(e,t,n=`RS.`,r=`usa`)=>{if(!e)return 0;let i=r===`euro`,a=i?`,`:`.`,o=i?`.`:`,`,s=e.trim();t&&n&&s.startsWith(n)&&(s=s.slice(n.length).trim());let c=RegExp(`\\${o}(?=\\d{2,3})`,`g`);s=s.replace(c,``);let l=s.lastIndexOf(a);l!==-1&&a!==`.`&&(s=s.slice(0,l)+`.`+s.slice(l+1));let u=parseFloat(s);return isNaN(u)?0:u},A9={install(e){e.config.globalProperties.$currencyFormatter=O9,e.config.globalProperties.$currencyUnformatter=k9}},j9=(e,t,n=!0)=>{n?e.value=O9(e.value,!1,``,t.format,t.structure):e.value=k9(e.value,!1,``,t.format).toString()},M9={mounted(e,t){let n={format:t.modifiers.euro?`euro`:`usa`,structure:t.arg===`foreign`?`foreign`:`nepali`};(0,u.nextTick)(()=>{e.value&&j9(e,n)});let r=()=>{j9(e,n),e.removeEventListener(`blur`,r),e.removeEventListener(`keydown`,a)},i=()=>{j9(e,n,!1),e.addEventListener(`blur`,r),e.addEventListener(`keydown`,a)},a=t=>{let n=/^\d$/.test(t.key),r=t.key===`.`,i=t.ctrlKey||t.metaKey,a=t.key===`Enter`||t.key===`Tab`||t.key===`Backspace`,o=e.value.includes(`.`);if(r&&o){t.preventDefault();return}n||r&&!o||i||a||t.preventDefault()};e.addEventListener(`focus`,i),e.eventCleanUp=()=>{e.removeEventListener(`focus`,i),e.removeEventListener(`blur`,r),e.removeEventListener(`keydown`,a)}},updated(e,t){let n={format:t.modifiers.euro?`euro`:`usa`,structure:t.arg===`foreign`?`foreign`:`nepali`};document.activeElement!=e&&j9(e,n)}},N9={mounted(e){let t=e.closest(`.sidebar-dropdown`);if(!t)return;let n=()=>{let t=e.scrollHeight,n=t*1e3/700;e.style.overflow=`hidden`,e.style.transition=`height ${n}ms linear`,e.style.height=`${t}px`,clearTimeout(e._timeout),e._timeout=window.setTimeout(()=>{e.style.height=``,e.style.transition=``,e.style.overflow=``},n)},r=()=>{let t=e.scrollHeight,n=t*1e3/700;e.style.transition=`height ${n}ms linear`,e.style.overflow=`hidden`,e.style.height=`${t}px`,e.offsetHeight,e.style.height=`0px`,clearTimeout(e._timeout),e._timeout=window.setTimeout(()=>{e.style.transition=``,e.style.overflow=``},n)},i=new MutationObserver(()=>{t.classList.contains(`sidebar-item-open`)?n():r()});i.observe(t,{attributes:!0,attributeFilter:[`class`]}),e._observer=i,t.classList.contains(`sidebar-item-open`)?e.style.height=`auto`:(e.style.height=`0px`,e.style.overflow=`hidden`)},unmounted(e){e._observer&&e._observer.disconnect(),clearTimeout(e._timeout)}},P9=[`innerHTML`],F9={key:1},I9=f4((0,u.defineComponent)({__name:`Tooltip`,props:{content:{},raw:{type:Boolean}},setup(e,{expose:t}){let n=(0,u.ref)(!1);(0,u.onMounted)(()=>{requestAnimationFrame(()=>{n.value=!0})});function r(){n.value=!1}return t({hide:r}),(t,r)=>((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{class:(0,u.normalizeClass)([`tooltip-content`,{visible:n.value}])},[e.raw?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,innerHTML:e.content},null,8,P9)):((0,u.openBlock)(),(0,u.createElementBlock)(`span`,F9,(0,u.toDisplayString)(e.content),1))],2))}}),[[`__scopeId`,`data-v-3e0dd3fc`]]),L9={mounted(e,t){let n=null,r=null,i=null,a=t;function o(e,t,n){let r=window.innerWidth,i=window.innerHeight;switch(e){case`top`:return t.top>=n.height;case`bottom`:return i-t.bottom>=n.height;case`left`:return t.left>=n.width;case`right`:return r-t.right>=n.width;default:return!1}}let s=async()=>{if(!a.value||!a.value.content)return;let{content:t,raw:i=!1,preferredPosition:s=`top`}=a.value;if(n&&r&&(n.unmount(),r.remove()),r=document.createElement(`div`),r.style.position=`absolute`,r.style.zIndex=`9999`,document.body.appendChild(r),n=(0,u.createApp)(I9,{content:t,raw:i}),n.mount(r),await(0,u.nextTick)(),!r)return;let c=e.getBoundingClientRect(),l=r.getBoundingClientRect(),d=[s,...[`top`,`bottom`,`left`,`right`].filter(e=>e!==s)].find(e=>o(e,c,l))||`bottom`,f=0,p=0;switch(d){case`top`:f=c.top-l.height+window.scrollY,p=c.left+(c.width-l.width)/2+window.scrollX;break;case`bottom`:f=c.bottom+window.scrollY,p=c.left+(c.width-l.width)/2+window.scrollX;break;case`left`:f=c.top+(c.height-l.height)/2+window.scrollY,p=c.left-l.width+window.scrollX;break;case`right`:f=c.top+(c.height-l.height)/2+window.scrollY,p=c.right+window.scrollX;break}p=Math.max(0,Math.min(p,window.innerWidth-l.width)),f=Math.max(0,Math.min(f,window.innerHeight-l.height)),r.style.top=`${f}px`,r.style.left=`${p}px`},c=async()=>{i&&=(clearTimeout(i),null),await s()},l=()=>{i&&=(clearTimeout(i),null),n&&r&&(n.unmount(),r.remove(),n=null,r=null)},d=()=>{i||=window.setTimeout(()=>{c(),i=null},200)};e.__tooltipHandlers={showTooltip:d,hideTooltip:l,clearShowTimeout:()=>{i&&=(clearTimeout(i),null)},createTooltip:s,updateBinding:e=>{a=e}},e.addEventListener(`mouseenter`,d),e.addEventListener(`mouseleave`,l)},updated(e,t){e.__tooltipHandlers&&(e.__tooltipHandlers.updateBinding(t),e.matches(`:hover`)&&e.__tooltipHandlers.createTooltip())},unmounted(e){e.__tooltipHandlers&&(e.__tooltipHandlers.hideTooltip(),e.removeEventListener(`mouseenter`,e.__tooltipHandlers.showTooltip),e.removeEventListener(`mouseleave`,e.__tooltipHandlers.hideTooltip),e.__tooltipHandlers.clearShowTimeout(),delete e.__tooltipHandlers)}},R9=class{socket=null;url=``;isConnected=!1;initPromise=null;setURL(e){this.url=e}init(e=()=>{}){return this.url===``?(console.log(`❗WebSocket url not set!`),Promise.resolve(this)):this.socket&&this.socket.readyState===WebSocket.OPEN?(console.log(`❗WebSocket is already initialized and OPEN`),Promise.resolve(this)):this.socket&&this.socket.readyState===WebSocket.CONNECTING&&this.initPromise?(console.log(`⏳ WebSocket is currently connecting...`),this.initPromise):(this.initPromise=new Promise((t,n)=>{try{this.socket=new WebSocket(this.url),this.socket.onopen=()=>{this.isConnected=!0,console.log(`✅ WebSocket connected`),this.initPromise=null,t(this)},this.socket.onclose=e=>{let t=!this.isConnected;this.isConnected=!1,console.log(`❌ WebSocket connection closed:`,e.reason||`No reason provided`),t&&this.initPromise&&(this.initPromise=null,n(Error(`WebSocket closed during initialization`)))},this.socket.onerror=t=>{this.close(),console.error(`⛔ WebSocket error occurred:`,t),e?.(t),this.initPromise&&(this.initPromise=null,n(t))}}catch(e){console.error(`⛔ Error creating WebSocket:`,e),this.initPromise=null,n(e)}}),this.initPromise)}onMessage(e){return this.socket?(this.socket.onmessage=t=>{e&&t.data&&e(t.data)},Promise.resolve(this)):(console.error(`❗ WebSocket is not initialized`),Promise.resolve(this))}sendMessage(e){return new Promise((t,n)=>{if(this.socket&&this.isConnected)try{this.socket.send(e),t()}catch(e){console.error(`❗ Error sending message:`,e),n(e)}else{let e=`❗ WebSocket is not connected`;console.error(e),n(Error(e))}})}close(){this.socket&&(this.socket.close(),this.socket=null,this.isConnected=!1,console.log(`❗ WebSocket connection closing!`))}getConnectionStatus(){return this.isConnected}},z9=(e,t)=>{let n=e.toLowerCase().split(`+`).map(e=>e.trim()),r={ctrl:n.includes(`ctrl`),alt:n.includes(`alt`),shift:n.includes(`shift`),meta:n.includes(`meta`)},i=n.filter(e=>![`ctrl`,`alt`,`shift`,`meta`].includes(e));if(i.length===0)throw Error(`No main keys specified in shortcut.`);let a=new Set,o=e=>{a.add(e.key.toLowerCase());let n=e.ctrlKey===r.ctrl&&e.altKey===r.alt&&e.shiftKey===r.shift&&e.metaKey===r.meta,o=i.every(e=>a.has(e));n&&o&&(e.preventDefault(),t(e))},s=e=>{a.delete(e.key.toLowerCase())};return window.addEventListener(`keydown`,o),window.addEventListener(`keyup`,s),{destroy(){window.removeEventListener(`keydown`,o),window.removeEventListener(`keyup`,s)}}},B9=(e,t)=>{let n=null;return{run:r=>{n&&clearTimeout(n),n=setTimeout(()=>{e(r),n=null},t)},cancel:()=>{n&&=(clearTimeout(n),null)}}},V9=(e,t)=>{let n;if(t&&(t.$refs?n=t.$refs[e]:t.refs&&(n=t.refs[e]),n&&typeof n.activate==`function`)){n.activate();return}let r=document.getElementById(e);if(!r)return;let i=r.tagName;(i===`INPUT`||i===`TEXTAREA`||i===`BUTTON`)&&r.focus()},H9={install(e){e.config.globalProperties.$focusNext=function(e){V9(e,this)}}},U9=(e,t=!1,n=!0)=>{if(e==null||e===``)return``;let r=[``,`एक`,`दुई`,`तीन`,`चार`,`पाँच`,`छ`,`सात`,`आठ`,`नौ`,`दश`,`एघार`,`बाह्र`,`तेह्र`,`चौध`,`पन्ध्र`,`सोह्र`,`सत्र`,`अठार`,`उन्नाइस`],i=`..बीस.एक्काइस.बाइस.तेइस.चौबीस.पच्चीस.छब्बीस.सत्ताइस.अठ्ठाइस.उनन्तिस.तीस.एकतीस.बत्तीस.तेत्तीस.चौँतीस.पैंतीस.छत्तीस.सैतीस.अठतीस.उनन्चालीस.चालीस.एकचालीस.बयालीस.त्रियालीस.चवालीस.पैंतालीस.छयालीस.सतचालीस.अठचालीस.उनन्चास.पचास.एकाउन्न.बाउन्न.त्रिपन्न.चवन्न.पचपन्न.छपन्न.सन्ताउन्न.अन्ठाउन्न.उनन्साठी.साठी.एकसठ्ठी.बयसठ्ठी.त्रिसठ्ठी.चौंसठ्ठी.पैंसठ्ठी.छयसठ्ठी.सतसठ्ठी.अठसठ्ठी.उनन्सत्तरी.सत्तरी.एकहत्तर.बहत्तर.त्रिहत्तर.चौहत्तर.पचहत्तर.छयहत्तर.सतहत्तर.अठहत्तर.उनासी.असी.एकासी.बयासी.त्रियासी.चौरासी.पचासी.छयासी.सतासी.अठासी.उनान्नब्बे.नब्बे.एकानब्बे.बयानब्बे.त्रियानब्बे.चौरानब्बे.पन्चानब्बे.छयानब्बे.सन्तानब्बे.अन्ठानब्बे.उनान्सय`.split(`.`),a=[``,`One`,`Two`,`Three`,`Four`,`Five`,`Six`,`Seven`,`Eight`,`Nine`,`Ten`,`Eleven`,`Twelve`,`Thirteen`,`Fourteen`,`Fifteen`,`Sixteen`,`Seventeen`,`Eighteen`,`Nineteen`],o=[``,``,`Twenty`,`Thirty`,`Forty`,`Fifty`,`Sixty`,`Seventy`,`Eighty`,`Ninety`],s=t?[`खर्ब`,`अर्ब`,`करोड`,`लाख`,`हजार`,`सय`]:[`Kharaab`,`Arab`,`Crore`,`Lakh`,`Thousand`,`Hundred`],c=t?`ऋण`:`Negative`,l=t?`रुपैयाँ`:`Rupees`,u=t?`पैसा`:`Paisa`,d=t?`शून्य`:`Zero`,f=t?`दश`:`Point`,p=String(e).trim(),m=!1;p.startsWith(`-`)&&(m=!0,p=p.slice(1));let[h,g]=p.split(`.`),_=parseInt(h,10);if(isNaN(_))return``;if(_===0&&!g)return d;function v(e){if(t)return e<20?r[e]:i[e];{if(e<20)return a[e];let t=Math.floor(e/10),n=e%10;return o[t]+(n?` `+a[n]:``)}}function y(e){if(e===0)return``;let n=e,i=e=>{let t=n%e;return n=Math.floor(n/e),t},o=i(1e3),c=i(100),l=i(100),u=i(100),d=i(100),f=[{value:i(100),label:s[0]},{value:d,label:s[1]},{value:u,label:s[2]},{value:l,label:s[3]},{value:c,label:s[4]},{value:Math.floor(o/100),label:s[5],suffix:!0}],p=[],m=o%100;for(let e of f)e.value&&(e.suffix?p.push(t?r[e.value]:a[e.value],e.label):p.push(v(e.value),e.label));return m&&p.push(v(m)),p.filter(Boolean).join(` `)}let b=y(_);if(b&&n&&(b+=` `+l),g)if(n){let e=parseInt(g.substring(0,2).padEnd(2,`0`),10);if(e>0){let t=v(e);b+=` `+t+` `+u}}else{let e=g.split(``).map(e=>t?r[parseInt(e,10)]||``:a[parseInt(e,10)]||``).join(` `);b+=` `+f+` `+e}return m&&(b=c+` `+b),b.trim().replace(/\s+/g,` `)},W9={install(e){e.config.globalProperties.$numberToWords=U9}};exports.ContentLayout=v,exports.CreateDebounce=B9,exports.CreateShortCutKey=z9,exports.CurrencyFormatterPlugin=A9,exports.DateRange=h7,exports.DateSelector=U5,exports.FilePreview=Z7,exports.FileUpload=y9,exports.FocusNextPlugin=H9,exports.Icons=$P,exports.InputCurrency=M9,exports.InputError=C9,exports.InputSelect=D9,exports.Loader=C7,exports.Modal=O,exports.NumbertoWordPlugin=W9,exports.ScrollbarAnimateDropdown=N9,exports.ScrollbarScroll=T9,exports.Switch=A,exports.Tabulator=$2,exports.ToastPlugin=O7,exports.Toggle=n4,exports.Tooltip=L9,exports.Towser=p4,exports.UploadImage=I7,exports.WebSocketWrapper=R9,exports.Wizard=x7,exports.currencyFormatter=O9,exports.currencyUnformatter=k9,exports.numberToWords=U9,exports.toast=D7;