mooho-base-admin-plus 2.10.29 → 2.10.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/history.md CHANGED
@@ -200,3 +200,5 @@ mooho-base-admin-plus@2.10.26 - 解决视图默认筛选条件和筛选项冲突
200
200
  mooho-base-admin-plus@2.10.27 - 修复上一版本的bug
201
201
  mooho-base-admin-plus@2.10.28 - 选中行也出发变更事件
202
202
  mooho-base-admin-plus@2.10.29 - 解析表达式时,如果结果为null,解析结果用null表示,避免判断错误
203
+ mooho-base-admin-plus@2.10.30 - 允许通过特殊标记`r;表示表单内容红色显示
204
+ mooho-base-admin-plus@2.10.31 - 静态内容导出允许自定义视图格式
@@ -7624,7 +7624,7 @@ const showFormat = {}, mixinPage = {
7624
7624
  }
7625
7625
  return f;
7626
7626
  } else
7627
- return this.tParam(this.showMultiLine(d));
7627
+ return d.toString().startsWith("`r;") ? '<font color="red">' + this.tParam(this.showMultiLine(d.substr(3))) + "</font>" : this.tParam(this.showMultiLine(d));
7628
7628
  else
7629
7629
  return d;
7630
7630
  }
@@ -12497,7 +12497,7 @@ const lodop = {
12497
12497
  data: {
12498
12498
  data: r,
12499
12499
  returnType: 1,
12500
- viewCode: a.code,
12500
+ viewCode: (a.exportDataViewCode || "").trim() ? a.exportDataViewCode : a.code,
12501
12501
  viewColumns: o
12502
12502
  }
12503
12503
  }), l = new Blob([s], {
@@ -12513,7 +12513,7 @@ const lodop = {
12513
12513
  data: {
12514
12514
  data: r,
12515
12515
  returnType: 3,
12516
- viewCode: a.code,
12516
+ viewCode: (a.exportDataViewCode || "").trim() ? a.exportDataViewCode : a.code,
12517
12517
  viewColumns: o
12518
12518
  }
12519
12519
  }), l = new Blob([s], { type: "application/pdf" });
@@ -12526,7 +12526,7 @@ const lodop = {
12526
12526
  data: {
12527
12527
  data: r,
12528
12528
  returnType: 2,
12529
- viewCode: a.code,
12529
+ viewCode: (a.exportDataViewCode || "").trim() ? a.exportDataViewCode : a.code,
12530
12530
  viewColumns: o
12531
12531
  }
12532
12532
  });
@@ -100,7 +100,7 @@ function print() { __p += __j.call(arguments, '') }
100
100
  `):setInnerHtml(a,iconContent({question:"?",warning:"!",info:"i"}[r.icon]))},iconContent=a=>`<div class="${swalClasses["icon-content"]}">${a}</div>`,renderImage=(a,r)=>{const o=getImage();if(!r.imageUrl)return hide(o);show(o,""),o.setAttribute("src",r.imageUrl),o.setAttribute("alt",r.imageAlt),applyNumericalStyle(o,"width",r.imageWidth),applyNumericalStyle(o,"height",r.imageHeight),o.className=swalClasses.image,applyCustomClass(o,r,"image")};let currentSteps=[];const queue=function(a){const r=this;currentSteps=a;const o=(l,u)=>{currentSteps=[],l(u)},s=[];return new Promise(l=>{(function u(c,d){c<currentSteps.length?(document.body.setAttribute("data-swal2-queue-step",c),r.fire(currentSteps[c]).then(f=>{typeof f.value<"u"?(s.push(f.value),u(c+1)):o(l,{dismiss:f.dismiss})})):o(l,{value:s})})(0)})},getQueueStep=()=>getContainer()&&getContainer().getAttribute("data-queue-step"),insertQueueStep=(a,r)=>r&&r<currentSteps.length?currentSteps.splice(r,0,a):currentSteps.push(a),deleteQueueStep=a=>{typeof currentSteps[a]<"u"&&currentSteps.splice(a,1)},createStepElement=a=>{const r=document.createElement("li");return addClass(r,swalClasses["progress-step"]),setInnerHtml(r,a),r},createLineElement=a=>{const r=document.createElement("li");return addClass(r,swalClasses["progress-step-line"]),a.progressStepsDistance&&(r.style.width=a.progressStepsDistance),r},renderProgressSteps=(a,r)=>{const o=getProgressSteps$1();if(!r.progressSteps||r.progressSteps.length===0)return hide(o);show(o),o.textContent="";const s=parseInt(r.currentProgressStep===void 0?getQueueStep():r.currentProgressStep);s>=r.progressSteps.length&&warn$4("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.progressSteps.forEach((l,u)=>{const c=createStepElement(l);if(o.appendChild(c),u===s&&addClass(c,swalClasses["active-progress-step"]),u!==r.progressSteps.length-1){const d=createLineElement(r);o.appendChild(d)}})},renderTitle=(a,r)=>{const o=getTitle();toggle(o,r.title||r.titleText),r.title&&parseHtmlToContainer(r.title,o),r.titleText&&(o.innerText=r.titleText),applyCustomClass(o,r,"title")},renderHeader=(a,r)=>{const o=getHeader();applyCustomClass(o,r,"header"),renderProgressSteps(a,r),renderIcon(a,r),renderImage(a,r),renderTitle(a,r),renderCloseButton(a,r)},renderPopup=(a,r)=>{const o=getPopup();applyNumericalStyle(o,"width",r.width),applyNumericalStyle(o,"padding",r.padding),r.background&&(o.style.background=r.background),addClasses$1(o,r)},addClasses$1=(a,r)=>{a.className=`${swalClasses.popup} ${isVisible$1(a)?r.showClass.popup:""}`,r.toast?(addClass([document.documentElement,document.body],swalClasses["toast-shown"]),addClass(a,swalClasses.toast)):addClass(a,swalClasses.modal),applyCustomClass(a,r,"popup"),typeof r.customClass=="string"&&addClass(a,r.customClass),r.icon&&addClass(a,swalClasses[`icon-${r.icon}`])},render$1=(a,r)=>{renderPopup(a,r),renderContainer(a,r),renderHeader(a,r),renderContent(a,r),renderActions(a,r),renderFooter(a,r),typeof r.onRender=="function"&&r.onRender(getPopup())},isVisible=()=>isVisible$1(getPopup()),clickConfirm=()=>getConfirmButton()&&getConfirmButton().click(),clickCancel=()=>getCancelButton()&&getCancelButton().click();function fire(...a){const r=this;return new r(...a)}function mixin$2(a){class r extends this{_main(s){return super._main(Object.assign({},a,s))}}return r}const showLoading=()=>{let a=getPopup();a||Swal.fire(),a=getPopup();const r=getActions(),o=getConfirmButton();show(r),show(o,"inline-block"),addClass([a,r],swalClasses.loading),o.disabled=!0,a.setAttribute("data-loading",!0),a.setAttribute("aria-busy",!0),a.focus()},RESTORE_FOCUS_TIMEOUT=100,globalState={},focusPreviousActiveElement=()=>{globalState.previousActiveElement&&globalState.previousActiveElement.focus?(globalState.previousActiveElement.focus(),globalState.previousActiveElement=null):document.body&&document.body.focus()},restoreActiveElement=()=>new Promise(a=>{const r=window.scrollX,o=window.scrollY;globalState.restoreFocusTimeout=setTimeout(()=>{focusPreviousActiveElement(),a()},RESTORE_FOCUS_TIMEOUT),typeof r<"u"&&typeof o<"u"&&window.scrollTo(r,o)}),getTimerLeft=()=>globalState.timeout&&globalState.timeout.getTimerLeft(),stopTimer=()=>{if(globalState.timeout)return stopTimerProgressBar(),globalState.timeout.stop()},resumeTimer=()=>{if(globalState.timeout){const a=globalState.timeout.start();return animateTimerProgressBar(a),a}},toggleTimer=()=>{const a=globalState.timeout;return a&&(a.running?stopTimer():resumeTimer())},increaseTimer=a=>{if(globalState.timeout){const r=globalState.timeout.increase(a);return animateTimerProgressBar(r,!0),r}},isTimerRunning=()=>globalState.timeout&&globalState.timeout.isRunning(),defaultParams={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,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:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!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:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},updatableParams=["allowEscapeKey","allowOutsideClick","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","footer","hideClass","html","icon","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","text","title","titleText"],deprecatedParams={animation:'showClass" and "hideClass'},toastIncompatibleParams=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],isValidParameter=a=>Object.prototype.hasOwnProperty.call(defaultParams,a),isUpdatableParameter=a=>updatableParams.indexOf(a)!==-1,isDeprecatedParameter=a=>deprecatedParams[a],checkIfParamIsValid=a=>{isValidParameter(a)||warn$4(`Unknown parameter "${a}"`)},checkIfToastParamIsValid=a=>{toastIncompatibleParams.includes(a)&&warn$4(`The parameter "${a}" is incompatible with toasts`)},checkIfParamIsDeprecated=a=>{isDeprecatedParameter(a)&&warnAboutDepreation(a,isDeprecatedParameter(a))},showWarningsForParams=a=>{for(const r in a)checkIfParamIsValid(r),a.toast&&checkIfToastParamIsValid(r),checkIfParamIsDeprecated(r)},staticMethods=Object.freeze(Object.defineProperty({__proto__:null,argsToParams,clickCancel,clickConfirm,deleteQueueStep,enableLoading:showLoading,fire,getActions,getCancelButton,getCloseButton,getConfirmButton,getContainer,getContent,getFocusableElements,getFooter,getHeader,getHtmlContainer,getIcon,getIcons,getImage,getPopup,getQueueStep,getTimerLeft,getTimerProgressBar,getTitle,getValidationMessage,increaseTimer,insertQueueStep,isDeprecatedParameter,isLoading,isTimerRunning,isUpdatableParameter,isValidParameter,isVisible,mixin:mixin$2,queue,resumeTimer,showLoading,stopTimer,toggleTimer},Symbol.toStringTag,{value:"Module"}));function hideLoading(){const a=privateProps.innerParams.get(this);if(!a)return;const r=privateProps.domCache.get(this);a.showConfirmButton||(hide(r.confirmButton),a.showCancelButton||hide(r.actions)),removeClass([r.popup,r.actions],swalClasses.loading),r.popup.removeAttribute("aria-busy"),r.popup.removeAttribute("data-loading"),r.confirmButton.disabled=!1,r.cancelButton.disabled=!1}function getInput(a){const r=privateProps.innerParams.get(a||this),o=privateProps.domCache.get(a||this);return o?getInput$1(o.content,r.input):null}const fixScrollbar=()=>{states.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(states.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${states.previousBodyPadding+measureScrollbar()}px`)},undoScrollbar=()=>{states.previousBodyPadding!==null&&(document.body.style.paddingRight=`${states.previousBodyPadding}px`,states.previousBodyPadding=null)},iOSfix=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!hasClass(document.body,swalClasses.iosfix)){const r=document.body.scrollTop;document.body.style.top=`${r*-1}px`,addClass(document.body,swalClasses.iosfix),lockBodyScroll(),addBottomPaddingForTallPopups()}},addBottomPaddingForTallPopups=()=>{!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)&&getPopup().scrollHeight>window.innerHeight-44&&(getContainer().style.paddingBottom="44px")},lockBodyScroll=()=>{const a=getContainer();let r;a.ontouchstart=o=>{r=shouldPreventTouchMove(o.target)},a.ontouchmove=o=>{r&&(o.preventDefault(),o.stopPropagation())}},shouldPreventTouchMove=a=>{const r=getContainer();return a===r||!isScrollable(r)&&a.tagName!=="INPUT"&&!(isScrollable(getContent())&&getContent().contains(a))},undoIOSfix=()=>{if(hasClass(document.body,swalClasses.iosfix)){const a=parseInt(document.body.style.top,10);removeClass(document.body,swalClasses.iosfix),document.body.style.top="",document.body.scrollTop=a*-1}},isIE11=()=>!!window.MSInputMethodContext&&!!document.documentMode,fixVerticalPositionIE=()=>{const a=getContainer(),r=getPopup();a.style.removeProperty("align-items"),r.offsetTop<0&&(a.style.alignItems="flex-start")},IEfix=()=>{typeof window<"u"&&isIE11()&&(fixVerticalPositionIE(),window.addEventListener("resize",fixVerticalPositionIE))},undoIEfix=()=>{typeof window<"u"&&isIE11()&&window.removeEventListener("resize",fixVerticalPositionIE)},setAriaHidden=()=>{toArray$1(document.body.children).forEach(r=>{r===getContainer()||contains(r,getContainer())||(r.hasAttribute("aria-hidden")&&r.setAttribute("data-previous-aria-hidden",r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))})},unsetAriaHidden=()=>{toArray$1(document.body.children).forEach(r=>{r.hasAttribute("data-previous-aria-hidden")?(r.setAttribute("aria-hidden",r.getAttribute("data-previous-aria-hidden")),r.removeAttribute("data-previous-aria-hidden")):r.removeAttribute("aria-hidden")})},privateMethods={swalPromiseResolve:new WeakMap};function removePopupAndResetState(a,r,o,s){o?triggerOnAfterCloseAndDispose(a,s):(restoreActiveElement().then(()=>triggerOnAfterCloseAndDispose(a,s)),globalState.keydownTarget.removeEventListener("keydown",globalState.keydownHandler,{capture:globalState.keydownListenerCapture}),globalState.keydownHandlerAdded=!1),r.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&r.parentNode.removeChild(r),isModal()&&(undoScrollbar(),undoIOSfix(),undoIEfix(),unsetAriaHidden()),removeBodyClasses()}function removeBodyClasses(){removeClass([document.documentElement,document.body],[swalClasses.shown,swalClasses["height-auto"],swalClasses["no-backdrop"],swalClasses["toast-shown"],swalClasses["toast-column"]])}function close(a){const r=getPopup();if(!r)return;const o=privateProps.innerParams.get(this);if(!o||hasClass(r,o.hideClass.popup))return;const s=privateMethods.swalPromiseResolve.get(this);removeClass(r,o.showClass.popup),addClass(r,o.hideClass.popup);const l=getContainer();removeClass(l,o.showClass.backdrop),addClass(l,o.hideClass.backdrop),handlePopupAnimation(this,r,o),typeof a<"u"?(a.isDismissed=typeof a.dismiss<"u",a.isConfirmed=typeof a.dismiss>"u"):a={isDismissed:!0,isConfirmed:!1},s(a||{})}const handlePopupAnimation=(a,r,o)=>{const s=getContainer(),l=animationEndEvent&&hasCssAnimation(r),{onClose:u,onAfterClose:c}=o;u!==null&&typeof u=="function"&&u(r),l?animatePopup(a,r,s,c):removePopupAndResetState(a,s,isToast(),c)},animatePopup=(a,r,o,s)=>{globalState.swalCloseEventFinishedCallback=removePopupAndResetState.bind(null,a,o,isToast(),s),r.addEventListener(animationEndEvent,function(l){l.target===r&&(globalState.swalCloseEventFinishedCallback(),delete globalState.swalCloseEventFinishedCallback)})},triggerOnAfterCloseAndDispose=(a,r)=>{setTimeout(()=>{typeof r=="function"&&r(),a._destroy()})};function setButtonsDisabled(a,r,o){const s=privateProps.domCache.get(a);r.forEach(l=>{s[l].disabled=o})}function setInputDisabled(a,r){if(!a)return!1;if(a.type==="radio"){const s=a.parentNode.parentNode.querySelectorAll("input");for(let l=0;l<s.length;l++)s[l].disabled=r}else a.disabled=r}function enableButtons(){setButtonsDisabled(this,["confirmButton","cancelButton"],!1)}function disableButtons(){setButtonsDisabled(this,["confirmButton","cancelButton"],!0)}function enableInput(){return setInputDisabled(this.getInput(),!1)}function disableInput(){return setInputDisabled(this.getInput(),!0)}function showValidationMessage(a){const r=privateProps.domCache.get(this);setInnerHtml(r.validationMessage,a);const o=window.getComputedStyle(r.popup);r.validationMessage.style.marginLeft=`-${o.getPropertyValue("padding-left")}`,r.validationMessage.style.marginRight=`-${o.getPropertyValue("padding-right")}`,show(r.validationMessage);const s=this.getInput();s&&(s.setAttribute("aria-invalid",!0),s.setAttribute("aria-describedBy",swalClasses["validation-message"]),focusInput(s),addClass(s,swalClasses.inputerror))}function resetValidationMessage(){const a=privateProps.domCache.get(this);a.validationMessage&&hide(a.validationMessage);const r=this.getInput();r&&(r.removeAttribute("aria-invalid"),r.removeAttribute("aria-describedBy"),removeClass(r,swalClasses.inputerror))}function getProgressSteps(){return privateProps.domCache.get(this).progressSteps}class Timer{constructor(r,o){this.callback=r,this.remaining=o,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}increase(r){const o=this.running;return o&&this.stop(),this.remaining+=r,o&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const defaultInputValidators={email:(a,r)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(a)?Promise.resolve():Promise.resolve(r||"Invalid email address"),url:(a,r)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(a)?Promise.resolve():Promise.resolve(r||"Invalid URL")};function setDefaultInputValidators(a){a.inputValidator||Object.keys(defaultInputValidators).forEach(r=>{a.input===r&&(a.inputValidator=defaultInputValidators[r])})}function validateCustomTargetElement(a){(!a.target||typeof a.target=="string"&&!document.querySelector(a.target)||typeof a.target!="string"&&!a.target.appendChild)&&(warn$4('Target parameter is not valid, defaulting to "body"'),a.target="body")}function setParameters(a){setDefaultInputValidators(a),a.showLoaderOnConfirm&&!a.preConfirm&&warn$4(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
101
101
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
102
102
  https://sweetalert2.github.io/#ajax-request`),a.animation=callIfFunction(a.animation),validateCustomTargetElement(a),typeof a.title=="string"&&(a.title=a.title.split(`
103
- `).join("<br />")),init$3(a)}const openPopup=a=>{const r=getContainer(),o=getPopup();typeof a.onBeforeOpen=="function"&&a.onBeforeOpen(o);const l=window.getComputedStyle(document.body).overflowY;addClasses(r,o,a),setScrollingVisibility(r,o),isModal()&&(fixScrollContainer(r,a.scrollbarPadding,l),setAriaHidden()),!isToast()&&!globalState.previousActiveElement&&(globalState.previousActiveElement=document.activeElement),typeof a.onOpen=="function"&&setTimeout(()=>a.onOpen(o)),removeClass(r,swalClasses["no-transition"])};function swalOpenAnimationFinished(a){const r=getPopup();if(a.target!==r)return;const o=getContainer();r.removeEventListener(animationEndEvent,swalOpenAnimationFinished),o.style.overflowY="auto"}const setScrollingVisibility=(a,r)=>{animationEndEvent&&hasCssAnimation(r)?(a.style.overflowY="hidden",r.addEventListener(animationEndEvent,swalOpenAnimationFinished)):a.style.overflowY="auto"},fixScrollContainer=(a,r,o)=>{iOSfix(),IEfix(),r&&o!=="hidden"&&fixScrollbar(),setTimeout(()=>{a.scrollTop=0})},addClasses=(a,r,o)=>{addClass(a,o.showClass.backdrop),show(r),addClass(r,o.showClass.popup),addClass([document.documentElement,document.body],swalClasses.shown),o.heightAuto&&o.backdrop&&!o.toast&&addClass([document.documentElement,document.body],swalClasses["height-auto"])},handleInputOptionsAndValue=(a,r)=>{r.input==="select"||r.input==="radio"?handleInputOptions(a,r):["text","email","number","tel","textarea"].includes(r.input)&&(hasToPromiseFn(r.inputValue)||isPromise$2(r.inputValue))&&handleInputValue(a,r)},getInputValue=(a,r)=>{const o=a.getInput();if(!o)return null;switch(r.input){case"checkbox":return getCheckboxValue(o);case"radio":return getRadioValue(o);case"file":return getFileValue(o);default:return r.inputAutoTrim?o.value.trim():o.value}},getCheckboxValue=a=>a.checked?1:0,getRadioValue=a=>a.checked?a.value:null,getFileValue=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,handleInputOptions=(a,r)=>{const o=getContent(),s=l=>populateInputOptions[r.input](o,formatInputOptions(l),r);hasToPromiseFn(r.inputOptions)||isPromise$2(r.inputOptions)?(showLoading(),asPromise(r.inputOptions).then(l=>{a.hideLoading(),s(l)})):typeof r.inputOptions=="object"?s(r.inputOptions):error$1(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof r.inputOptions}`)},handleInputValue=(a,r)=>{const o=a.getInput();hide(o),asPromise(r.inputValue).then(s=>{o.value=r.input==="number"?parseFloat(s)||0:`${s}`,show(o),o.focus(),a.hideLoading()}).catch(s=>{error$1(`Error in inputValue promise: ${s}`),o.value="",show(o),o.focus(),a.hideLoading()})},populateInputOptions={select:(a,r,o)=>{const s=getChildByClass(a,swalClasses.select),l=(u,c,d)=>{const f=document.createElement("option");f.value=d,setInnerHtml(f,c),o.inputValue.toString()===d.toString()&&(f.selected=!0),u.appendChild(f)};r.forEach(u=>{const c=u[0],d=u[1];if(Array.isArray(d)){const f=document.createElement("optgroup");f.label=c,f.disabled=!1,s.appendChild(f),d.forEach(h=>l(f,h[1],h[0]))}else l(s,d,c)}),s.focus()},radio:(a,r,o)=>{const s=getChildByClass(a,swalClasses.radio);r.forEach(u=>{const c=u[0],d=u[1],f=document.createElement("input"),h=document.createElement("label");f.type="radio",f.name=swalClasses.radio,f.value=c,o.inputValue.toString()===c.toString()&&(f.checked=!0);const p=document.createElement("span");setInnerHtml(p,d),p.className=swalClasses.label,h.appendChild(f),h.appendChild(p),s.appendChild(h)});const l=s.querySelectorAll("input");l.length&&l[0].focus()}},formatInputOptions=a=>{const r=[];return typeof Map<"u"&&a instanceof Map?a.forEach((o,s)=>{let l=o;typeof l=="object"&&(l=formatInputOptions(l)),r.push([s,l])}):Object.keys(a).forEach(o=>{let s=a[o];typeof s=="object"&&(s=formatInputOptions(s)),r.push([o,s])}),r},handleConfirmButtonClick=(a,r)=>{a.disableButtons(),r.input?handleConfirmWithInput(a,r):confirm(a,r,!0)},handleCancelButtonClick=(a,r)=>{a.disableButtons(),r(DismissReason.cancel)},handleConfirmWithInput=(a,r)=>{const o=getInputValue(a,r);r.inputValidator?(a.disableInput(),Promise.resolve().then(()=>asPromise(r.inputValidator(o,r.validationMessage))).then(l=>{a.enableButtons(),a.enableInput(),l?a.showValidationMessage(l):confirm(a,r,o)})):a.getInput().checkValidity()?confirm(a,r,o):(a.enableButtons(),a.showValidationMessage(r.validationMessage))},succeedWith=(a,r)=>{a.closePopup({value:r})},confirm=(a,r,o)=>{r.showLoaderOnConfirm&&showLoading(),r.preConfirm?(a.resetValidationMessage(),Promise.resolve().then(()=>asPromise(r.preConfirm(o,r.validationMessage))).then(l=>{isVisible$1(getValidationMessage())||l===!1?a.hideLoading():succeedWith(a,typeof l>"u"?o:l)})):succeedWith(a,o)},addKeydownHandler=(a,r,o,s)=>{r.keydownTarget&&r.keydownHandlerAdded&&(r.keydownTarget.removeEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!1),o.toast||(r.keydownHandler=l=>keydownHandler(a,l,s),r.keydownTarget=o.keydownListenerCapture?window:getPopup(),r.keydownListenerCapture=o.keydownListenerCapture,r.keydownTarget.addEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!0)},setFocus=(a,r,o)=>{const s=getFocusableElements();for(let l=0;l<s.length;l++)return r=r+o,r===s.length?r=0:r===-1&&(r=s.length-1),s[r].focus();getPopup().focus()},arrowKeys=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],escKeys=["Escape","Esc"],keydownHandler=(a,r,o)=>{const s=privateProps.innerParams.get(a);s.stopKeydownPropagation&&r.stopPropagation(),r.key==="Enter"?handleEnter(a,r,s):r.key==="Tab"?handleTab(r,s):arrowKeys.includes(r.key)?handleArrows():escKeys.includes(r.key)&&handleEsc(r,s,o)},handleEnter=(a,r,o)=>{if(!r.isComposing&&r.target&&a.getInput()&&r.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;clickConfirm(),r.preventDefault()}},handleTab=(a,r)=>{const o=a.target,s=getFocusableElements();let l=-1;for(let u=0;u<s.length;u++)if(o===s[u]){l=u;break}a.shiftKey?setFocus(r,l,-1):setFocus(r,l,1),a.stopPropagation(),a.preventDefault()},handleArrows=()=>{const a=getConfirmButton(),r=getCancelButton();document.activeElement===a&&isVisible$1(r)?r.focus():document.activeElement===r&&isVisible$1(a)&&a.focus()},handleEsc=(a,r,o)=>{callIfFunction(r.allowEscapeKey)&&(a.preventDefault(),o(DismissReason.esc))},handlePopupClick=(a,r,o)=>{privateProps.innerParams.get(a).toast?handleToastClick(a,r,o):(handleModalMousedown(r),handleContainerMousedown(r),handleModalClick(a,r,o))},handleToastClick=(a,r,o)=>{r.popup.onclick=()=>{const s=privateProps.innerParams.get(a);s.showConfirmButton||s.showCancelButton||s.showCloseButton||s.input||o(DismissReason.close)}};let ignoreOutsideClick=!1;const handleModalMousedown=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(r){a.container.onmouseup=void 0,r.target===a.container&&(ignoreOutsideClick=!0)}}},handleContainerMousedown=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(r){a.popup.onmouseup=void 0,(r.target===a.popup||a.popup.contains(r.target))&&(ignoreOutsideClick=!0)}}},handleModalClick=(a,r,o)=>{r.container.onclick=s=>{const l=privateProps.innerParams.get(a);if(ignoreOutsideClick){ignoreOutsideClick=!1;return}s.target===r.container&&callIfFunction(l.allowOutsideClick)&&o(DismissReason.backdrop)}};function _main(a){showWarningsForParams(a),globalState.currentInstance&&globalState.currentInstance._destroy(),globalState.currentInstance=this;const r=prepareParams(a);setParameters(r),Object.freeze(r),globalState.timeout&&(globalState.timeout.stop(),delete globalState.timeout),clearTimeout(globalState.restoreFocusTimeout);const o=populateDomCache(this);return render$1(this,r),privateProps.innerParams.set(this,r),swalPromise(this,o,r)}const prepareParams=a=>{const r=Object.assign({},defaultParams.showClass,a.showClass),o=Object.assign({},defaultParams.hideClass,a.hideClass),s=Object.assign({},defaultParams,a);return s.showClass=r,s.hideClass=o,a.animation===!1&&(s.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},s.hideClass={}),s},swalPromise=(a,r,o)=>new Promise(s=>{const l=u=>{a.closePopup({dismiss:u})};privateMethods.swalPromiseResolve.set(a,s),r.confirmButton.onclick=()=>handleConfirmButtonClick(a,o),r.cancelButton.onclick=()=>handleCancelButtonClick(a,l),r.closeButton.onclick=()=>l(DismissReason.close),handlePopupClick(a,r,l),addKeydownHandler(a,globalState,o,l),o.toast&&(o.input||o.footer||o.showCloseButton)?addClass(document.body,swalClasses["toast-column"]):removeClass(document.body,swalClasses["toast-column"]),handleInputOptionsAndValue(a,o),openPopup(o),setupTimer(globalState,o,l),initFocus(r,o),setTimeout(()=>{r.container.scrollTop=0})}),populateDomCache=a=>{const r={popup:getPopup(),container:getContainer(),content:getContent(),actions:getActions(),confirmButton:getConfirmButton(),cancelButton:getCancelButton(),closeButton:getCloseButton(),validationMessage:getValidationMessage(),progressSteps:getProgressSteps$1()};return privateProps.domCache.set(a,r),r},setupTimer=(a,r,o)=>{const s=getTimerProgressBar();hide(s),r.timer&&(a.timeout=new Timer(()=>{o("timer"),delete a.timeout},r.timer),r.timerProgressBar&&(show(s),setTimeout(()=>{a.timeout.running&&animateTimerProgressBar(r.timer)})))},initFocus=(a,r)=>{if(!r.toast){if(!callIfFunction(r.allowEnterKey))return blurActiveElement();if(r.focusCancel&&isVisible$1(a.cancelButton))return a.cancelButton.focus();if(r.focusConfirm&&isVisible$1(a.confirmButton))return a.confirmButton.focus();setFocus(r,-1,1)}},blurActiveElement=()=>{document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};function update(a){const r=getPopup(),o=privateProps.innerParams.get(this);if(!r||hasClass(r,o.hideClass.popup))return warn$4("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s={};Object.keys(a).forEach(u=>{Swal.isUpdatableParameter(u)?s[u]=a[u]:warn$4(`Invalid parameter to update: "${u}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js`)});const l=Object.assign({},o,s);render$1(this,l),privateProps.innerParams.set(this,l),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}function _destroy(){const a=privateProps.domCache.get(this),r=privateProps.innerParams.get(this);r&&(a.popup&&globalState.swalCloseEventFinishedCallback&&(globalState.swalCloseEventFinishedCallback(),delete globalState.swalCloseEventFinishedCallback),globalState.deferDisposalTimer&&(clearTimeout(globalState.deferDisposalTimer),delete globalState.deferDisposalTimer),typeof r.onDestroy=="function"&&r.onDestroy(),disposeSwal(this))}const disposeSwal=a=>{delete a.params,delete globalState.keydownHandler,delete globalState.keydownTarget,unsetWeakMaps(privateProps),unsetWeakMaps(privateMethods)},unsetWeakMaps=a=>{for(const r in a)a[r]=new WeakMap},instanceMethods=Object.freeze(Object.defineProperty({__proto__:null,_destroy,_main,close,closeModal:close,closePopup:close,closeToast:close,disableButtons,disableInput,disableLoading:hideLoading,enableButtons,enableInput,getInput,getProgressSteps,hideLoading,resetValidationMessage,showValidationMessage,update},Symbol.toStringTag,{value:"Module"}));let currentInstance;class SweetAlert{constructor(...r){if(typeof window>"u")return;typeof Promise>"u"&&error$1("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),currentInstance=this;const o=Object.freeze(this.constructor.argsToParams(r));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const s=this._main(this.params);privateProps.promise.set(this,s)}then(r){return privateProps.promise.get(this).then(r)}finally(r){return privateProps.promise.get(this).finally(r)}}if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,r=localStorage.getItem("swal-initiation");r?(a.getTime()-Date.parse(r))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const o=document.createElement("audio");o.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",o.loop=!0,document.body.appendChild(o),setTimeout(()=>{o.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(SweetAlert.prototype,instanceMethods),Object.assign(SweetAlert,staticMethods),Object.keys(instanceMethods).forEach(a=>{SweetAlert[a]=function(...r){if(currentInstance)return currentInstance[a](...r)}}),SweetAlert.DismissReason=DismissReason,SweetAlert.version="9.17.2";const Swal=SweetAlert;Swal.default=Swal;const showFormat={},mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return"admin".trim()?"/admin/static/":"/static/"},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){return{Authorization:"Bearer "+util$2.cookies.get("token")}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodashExports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=this.$router.currentRoute.value.fullPath.substr(1).split("?")[0];if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(showFormat.customFormat){let f=showFormat.customFormat(a,r);if(f!=null)return f}if(s==="DateTime")return(l||"").trim()?format$4(new Date(d),l):format$4(new Date(d),"yyyy-MM-dd");if(s==="Integer")if((l||"").trim()){let f=null;try{f=format$4(new Date(d*1e3),l)}catch(h){console.log(h,d)}return f}else return d;else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let f="";try{f=JSON.parse(d).join(", ")}catch(h){console.log(h,d)}return f}else if((l||"").trim()){let f=null;try{f=format$4(new Date(parseInt(d)*1e3),l)}catch(h){console.log(h,d)}return f}else return this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" ","&nbsp;").replaceAll(`
103
+ `).join("<br />")),init$3(a)}const openPopup=a=>{const r=getContainer(),o=getPopup();typeof a.onBeforeOpen=="function"&&a.onBeforeOpen(o);const l=window.getComputedStyle(document.body).overflowY;addClasses(r,o,a),setScrollingVisibility(r,o),isModal()&&(fixScrollContainer(r,a.scrollbarPadding,l),setAriaHidden()),!isToast()&&!globalState.previousActiveElement&&(globalState.previousActiveElement=document.activeElement),typeof a.onOpen=="function"&&setTimeout(()=>a.onOpen(o)),removeClass(r,swalClasses["no-transition"])};function swalOpenAnimationFinished(a){const r=getPopup();if(a.target!==r)return;const o=getContainer();r.removeEventListener(animationEndEvent,swalOpenAnimationFinished),o.style.overflowY="auto"}const setScrollingVisibility=(a,r)=>{animationEndEvent&&hasCssAnimation(r)?(a.style.overflowY="hidden",r.addEventListener(animationEndEvent,swalOpenAnimationFinished)):a.style.overflowY="auto"},fixScrollContainer=(a,r,o)=>{iOSfix(),IEfix(),r&&o!=="hidden"&&fixScrollbar(),setTimeout(()=>{a.scrollTop=0})},addClasses=(a,r,o)=>{addClass(a,o.showClass.backdrop),show(r),addClass(r,o.showClass.popup),addClass([document.documentElement,document.body],swalClasses.shown),o.heightAuto&&o.backdrop&&!o.toast&&addClass([document.documentElement,document.body],swalClasses["height-auto"])},handleInputOptionsAndValue=(a,r)=>{r.input==="select"||r.input==="radio"?handleInputOptions(a,r):["text","email","number","tel","textarea"].includes(r.input)&&(hasToPromiseFn(r.inputValue)||isPromise$2(r.inputValue))&&handleInputValue(a,r)},getInputValue=(a,r)=>{const o=a.getInput();if(!o)return null;switch(r.input){case"checkbox":return getCheckboxValue(o);case"radio":return getRadioValue(o);case"file":return getFileValue(o);default:return r.inputAutoTrim?o.value.trim():o.value}},getCheckboxValue=a=>a.checked?1:0,getRadioValue=a=>a.checked?a.value:null,getFileValue=a=>a.files.length?a.getAttribute("multiple")!==null?a.files:a.files[0]:null,handleInputOptions=(a,r)=>{const o=getContent(),s=l=>populateInputOptions[r.input](o,formatInputOptions(l),r);hasToPromiseFn(r.inputOptions)||isPromise$2(r.inputOptions)?(showLoading(),asPromise(r.inputOptions).then(l=>{a.hideLoading(),s(l)})):typeof r.inputOptions=="object"?s(r.inputOptions):error$1(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof r.inputOptions}`)},handleInputValue=(a,r)=>{const o=a.getInput();hide(o),asPromise(r.inputValue).then(s=>{o.value=r.input==="number"?parseFloat(s)||0:`${s}`,show(o),o.focus(),a.hideLoading()}).catch(s=>{error$1(`Error in inputValue promise: ${s}`),o.value="",show(o),o.focus(),a.hideLoading()})},populateInputOptions={select:(a,r,o)=>{const s=getChildByClass(a,swalClasses.select),l=(u,c,d)=>{const f=document.createElement("option");f.value=d,setInnerHtml(f,c),o.inputValue.toString()===d.toString()&&(f.selected=!0),u.appendChild(f)};r.forEach(u=>{const c=u[0],d=u[1];if(Array.isArray(d)){const f=document.createElement("optgroup");f.label=c,f.disabled=!1,s.appendChild(f),d.forEach(h=>l(f,h[1],h[0]))}else l(s,d,c)}),s.focus()},radio:(a,r,o)=>{const s=getChildByClass(a,swalClasses.radio);r.forEach(u=>{const c=u[0],d=u[1],f=document.createElement("input"),h=document.createElement("label");f.type="radio",f.name=swalClasses.radio,f.value=c,o.inputValue.toString()===c.toString()&&(f.checked=!0);const p=document.createElement("span");setInnerHtml(p,d),p.className=swalClasses.label,h.appendChild(f),h.appendChild(p),s.appendChild(h)});const l=s.querySelectorAll("input");l.length&&l[0].focus()}},formatInputOptions=a=>{const r=[];return typeof Map<"u"&&a instanceof Map?a.forEach((o,s)=>{let l=o;typeof l=="object"&&(l=formatInputOptions(l)),r.push([s,l])}):Object.keys(a).forEach(o=>{let s=a[o];typeof s=="object"&&(s=formatInputOptions(s)),r.push([o,s])}),r},handleConfirmButtonClick=(a,r)=>{a.disableButtons(),r.input?handleConfirmWithInput(a,r):confirm(a,r,!0)},handleCancelButtonClick=(a,r)=>{a.disableButtons(),r(DismissReason.cancel)},handleConfirmWithInput=(a,r)=>{const o=getInputValue(a,r);r.inputValidator?(a.disableInput(),Promise.resolve().then(()=>asPromise(r.inputValidator(o,r.validationMessage))).then(l=>{a.enableButtons(),a.enableInput(),l?a.showValidationMessage(l):confirm(a,r,o)})):a.getInput().checkValidity()?confirm(a,r,o):(a.enableButtons(),a.showValidationMessage(r.validationMessage))},succeedWith=(a,r)=>{a.closePopup({value:r})},confirm=(a,r,o)=>{r.showLoaderOnConfirm&&showLoading(),r.preConfirm?(a.resetValidationMessage(),Promise.resolve().then(()=>asPromise(r.preConfirm(o,r.validationMessage))).then(l=>{isVisible$1(getValidationMessage())||l===!1?a.hideLoading():succeedWith(a,typeof l>"u"?o:l)})):succeedWith(a,o)},addKeydownHandler=(a,r,o,s)=>{r.keydownTarget&&r.keydownHandlerAdded&&(r.keydownTarget.removeEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!1),o.toast||(r.keydownHandler=l=>keydownHandler(a,l,s),r.keydownTarget=o.keydownListenerCapture?window:getPopup(),r.keydownListenerCapture=o.keydownListenerCapture,r.keydownTarget.addEventListener("keydown",r.keydownHandler,{capture:r.keydownListenerCapture}),r.keydownHandlerAdded=!0)},setFocus=(a,r,o)=>{const s=getFocusableElements();for(let l=0;l<s.length;l++)return r=r+o,r===s.length?r=0:r===-1&&(r=s.length-1),s[r].focus();getPopup().focus()},arrowKeys=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],escKeys=["Escape","Esc"],keydownHandler=(a,r,o)=>{const s=privateProps.innerParams.get(a);s.stopKeydownPropagation&&r.stopPropagation(),r.key==="Enter"?handleEnter(a,r,s):r.key==="Tab"?handleTab(r,s):arrowKeys.includes(r.key)?handleArrows():escKeys.includes(r.key)&&handleEsc(r,s,o)},handleEnter=(a,r,o)=>{if(!r.isComposing&&r.target&&a.getInput()&&r.target.outerHTML===a.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;clickConfirm(),r.preventDefault()}},handleTab=(a,r)=>{const o=a.target,s=getFocusableElements();let l=-1;for(let u=0;u<s.length;u++)if(o===s[u]){l=u;break}a.shiftKey?setFocus(r,l,-1):setFocus(r,l,1),a.stopPropagation(),a.preventDefault()},handleArrows=()=>{const a=getConfirmButton(),r=getCancelButton();document.activeElement===a&&isVisible$1(r)?r.focus():document.activeElement===r&&isVisible$1(a)&&a.focus()},handleEsc=(a,r,o)=>{callIfFunction(r.allowEscapeKey)&&(a.preventDefault(),o(DismissReason.esc))},handlePopupClick=(a,r,o)=>{privateProps.innerParams.get(a).toast?handleToastClick(a,r,o):(handleModalMousedown(r),handleContainerMousedown(r),handleModalClick(a,r,o))},handleToastClick=(a,r,o)=>{r.popup.onclick=()=>{const s=privateProps.innerParams.get(a);s.showConfirmButton||s.showCancelButton||s.showCloseButton||s.input||o(DismissReason.close)}};let ignoreOutsideClick=!1;const handleModalMousedown=a=>{a.popup.onmousedown=()=>{a.container.onmouseup=function(r){a.container.onmouseup=void 0,r.target===a.container&&(ignoreOutsideClick=!0)}}},handleContainerMousedown=a=>{a.container.onmousedown=()=>{a.popup.onmouseup=function(r){a.popup.onmouseup=void 0,(r.target===a.popup||a.popup.contains(r.target))&&(ignoreOutsideClick=!0)}}},handleModalClick=(a,r,o)=>{r.container.onclick=s=>{const l=privateProps.innerParams.get(a);if(ignoreOutsideClick){ignoreOutsideClick=!1;return}s.target===r.container&&callIfFunction(l.allowOutsideClick)&&o(DismissReason.backdrop)}};function _main(a){showWarningsForParams(a),globalState.currentInstance&&globalState.currentInstance._destroy(),globalState.currentInstance=this;const r=prepareParams(a);setParameters(r),Object.freeze(r),globalState.timeout&&(globalState.timeout.stop(),delete globalState.timeout),clearTimeout(globalState.restoreFocusTimeout);const o=populateDomCache(this);return render$1(this,r),privateProps.innerParams.set(this,r),swalPromise(this,o,r)}const prepareParams=a=>{const r=Object.assign({},defaultParams.showClass,a.showClass),o=Object.assign({},defaultParams.hideClass,a.hideClass),s=Object.assign({},defaultParams,a);return s.showClass=r,s.hideClass=o,a.animation===!1&&(s.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},s.hideClass={}),s},swalPromise=(a,r,o)=>new Promise(s=>{const l=u=>{a.closePopup({dismiss:u})};privateMethods.swalPromiseResolve.set(a,s),r.confirmButton.onclick=()=>handleConfirmButtonClick(a,o),r.cancelButton.onclick=()=>handleCancelButtonClick(a,l),r.closeButton.onclick=()=>l(DismissReason.close),handlePopupClick(a,r,l),addKeydownHandler(a,globalState,o,l),o.toast&&(o.input||o.footer||o.showCloseButton)?addClass(document.body,swalClasses["toast-column"]):removeClass(document.body,swalClasses["toast-column"]),handleInputOptionsAndValue(a,o),openPopup(o),setupTimer(globalState,o,l),initFocus(r,o),setTimeout(()=>{r.container.scrollTop=0})}),populateDomCache=a=>{const r={popup:getPopup(),container:getContainer(),content:getContent(),actions:getActions(),confirmButton:getConfirmButton(),cancelButton:getCancelButton(),closeButton:getCloseButton(),validationMessage:getValidationMessage(),progressSteps:getProgressSteps$1()};return privateProps.domCache.set(a,r),r},setupTimer=(a,r,o)=>{const s=getTimerProgressBar();hide(s),r.timer&&(a.timeout=new Timer(()=>{o("timer"),delete a.timeout},r.timer),r.timerProgressBar&&(show(s),setTimeout(()=>{a.timeout.running&&animateTimerProgressBar(r.timer)})))},initFocus=(a,r)=>{if(!r.toast){if(!callIfFunction(r.allowEnterKey))return blurActiveElement();if(r.focusCancel&&isVisible$1(a.cancelButton))return a.cancelButton.focus();if(r.focusConfirm&&isVisible$1(a.confirmButton))return a.confirmButton.focus();setFocus(r,-1,1)}},blurActiveElement=()=>{document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};function update(a){const r=getPopup(),o=privateProps.innerParams.get(this);if(!r||hasClass(r,o.hideClass.popup))return warn$4("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s={};Object.keys(a).forEach(u=>{Swal.isUpdatableParameter(u)?s[u]=a[u]:warn$4(`Invalid parameter to update: "${u}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js`)});const l=Object.assign({},o,s);render$1(this,l),privateProps.innerParams.set(this,l),Object.defineProperties(this,{params:{value:Object.assign({},this.params,a),writable:!1,enumerable:!0}})}function _destroy(){const a=privateProps.domCache.get(this),r=privateProps.innerParams.get(this);r&&(a.popup&&globalState.swalCloseEventFinishedCallback&&(globalState.swalCloseEventFinishedCallback(),delete globalState.swalCloseEventFinishedCallback),globalState.deferDisposalTimer&&(clearTimeout(globalState.deferDisposalTimer),delete globalState.deferDisposalTimer),typeof r.onDestroy=="function"&&r.onDestroy(),disposeSwal(this))}const disposeSwal=a=>{delete a.params,delete globalState.keydownHandler,delete globalState.keydownTarget,unsetWeakMaps(privateProps),unsetWeakMaps(privateMethods)},unsetWeakMaps=a=>{for(const r in a)a[r]=new WeakMap},instanceMethods=Object.freeze(Object.defineProperty({__proto__:null,_destroy,_main,close,closeModal:close,closePopup:close,closeToast:close,disableButtons,disableInput,disableLoading:hideLoading,enableButtons,enableInput,getInput,getProgressSteps,hideLoading,resetValidationMessage,showValidationMessage,update},Symbol.toStringTag,{value:"Module"}));let currentInstance;class SweetAlert{constructor(...r){if(typeof window>"u")return;typeof Promise>"u"&&error$1("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),currentInstance=this;const o=Object.freeze(this.constructor.argsToParams(r));Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}});const s=this._main(this.params);privateProps.promise.set(this,s)}then(r){return privateProps.promise.get(this).then(r)}finally(r){return privateProps.promise.get(this).finally(r)}}if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const a=new Date,r=localStorage.getItem("swal-initiation");r?(a.getTime()-Date.parse(r))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const o=document.createElement("audio");o.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",o.loop=!0,document.body.appendChild(o),setTimeout(()=>{o.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${a}`)}Object.assign(SweetAlert.prototype,instanceMethods),Object.assign(SweetAlert,staticMethods),Object.keys(instanceMethods).forEach(a=>{SweetAlert[a]=function(...r){if(currentInstance)return currentInstance[a](...r)}}),SweetAlert.DismissReason=DismissReason,SweetAlert.version="9.17.2";const Swal=SweetAlert;Swal.default=Swal;const showFormat={},mixinPage={data(){return{grid4:{xxl:4,xl:4,lg:4,md:6,sm:12,xs:24},grid6:{xxl:6,xl:6,lg:8,md:12,sm:12,xs:24},grid8:{xxl:8,xl:8,lg:8,md:12,sm:24,xs:24},grid12:{xxl:12,xl:12,lg:12,md:12,sm:24,xs:24},grid16:{xxl:16,xl:16,lg:16,md:24,sm:24,xs:24},grid18:{xxl:18,xl:18,lg:18,md:24,sm:24,xs:24},grid24:{xxl:24,xl:24,lg:24,md:24,sm:24,xs:24}}},computed:{...mapState("admin/user",["info"]),...mapState("admin/cache",["userNames","enums","dicts","caches"]),...mapState("admin/menu",["userPermissions"]),rootPath(){return"admin".trim()?"/admin/static/":"/static/"},sysInfo(){return Setting.info},layout(){return Setting.layout},apiBaseURL(){return window.$mode==="development"?Setting.apiBaseURL.dev:Setting.apiBaseURL.prd},uploadURL(){return this.apiBaseURL+"api/Attachment/add"},uploadHeaders(){return{Authorization:"Bearer "+util$2.cookies.get("token")}}},methods:{...mapActions("admin/cache",["loadEnum","loadDict","loadUserName","loadCache"]),...mapMutations("admin/loader",{enableLoader:"enable"}),...mapMutations("admin/loader",{disableLoader:"disable"}),copy(a){return lodashExports.cloneDeep(a)},allow(a){if(a.startsWith("permission/"))return this.userPermissions[a];{let r=this.$router.currentRoute.value.fullPath.substr(1).split("?")[0];if(this.userPermissions[r+"$"+a]==!0)return!0;let o=Object.keys(this.userPermissions).filter(s=>s.startsWith(r+"$")).length;return this.userPermissions[r]==!0&&o==0}},getCache(a,r){return this.loadCache(a),this.caches[a].find(o=>o.id==r)},getCacheList(a){return this.loadCache(a),this.caches[a]},getEnum(a,r){return this.loadEnum(a),r==null?null:this.layout.showI18n?this.$t("Enum_"+a+"_"+r):this.enums[a][r]},getEnumList(a){return this.loadEnum(a),Object.keys(this.enums[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Enum_"+a+"_"+r)}:{id:r,name:this.enums[a][r]})},getDict(a,r){return this.loadDict(a),r==null?null:this.layout.showI18n?this.$t("Dict_"+a+"_"+r):this.dicts[a][r]},getDictList(a){return this.loadDict(a),Object.keys(this.dicts[a]).map(r=>this.layout.showI18n?{id:r,name:this.$t("Dict_"+a+"_"+r)}:{id:r,name:this.dicts[a][r]})},getUserName(a){return this.loadUserName(a),this.userNames[a]},getAttachmentUrl(a,r){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/get?file="+encodeURIComponent(a)+"&name="+encodeURIComponent(r):null},fileDownload(a,r){let o=this.getAttachmentUrl(a,r);o&&(window.location.href=o)},getImgUrl(a){return a?a.startsWith("http")?a:this.apiBaseURL+"api/Attachment/getImage?file="+encodeURIComponent(a):this.rootPath+"images/no-image.png"},showData(a,r){let o=r.code,s=r.dataType,l=r.displayFormat,u=r.digit,c=r.fixedDigit;if(!s)return null;if(s.startsWith("Enum:"))return this.getEnum(s.replace("Enum:",""),this.parseData(a,o));if(s==="BigInteger"&&l=="User")return this.getUserName(this.parseData(a,o));let d=this.parseData(a,o);if(d==null)return null;if(showFormat.customFormat){let f=showFormat.customFormat(a,r);if(f!=null)return f}if(s==="DateTime")return(l||"").trim()?format$4(new Date(d),l):format$4(new Date(d),"yyyy-MM-dd");if(s==="Integer")if((l||"").trim()){let f=null;try{f=format$4(new Date(d*1e3),l)}catch(h){console.log(h,d)}return f}else return d;else{if(s==="Decimal"||s==="Float"||s==="Double")return d=parseFloat(d),l==="Money"?this.formatThousand(d.toFixed(2)):l==="Thousand"?this.formatThousand(this.keepDecimal(d,u,c)):l==="Percent"?this.keepDecimal(d,u,c)+"%":this.keepDecimal(d,u,c);if(s==="Boolean")return l==="Y"?d?'<i class="fa fa-check info"></i>':"":l==="YN"?d?'<i class="fa fa-check"></i>':'<i class="fa fa-times"></i>':l==="Disabled"?d?'<i class="fa fa-ban error"></i>':"":l==="Valid"?d?'<i class="fa fa-check success"></i>':"":l==="Attention"?d?'<i class="fa fa-exclamation error"></i>':"":d?'<i class="fa fa-check info"></i>':"";if(s==="String")if(l==="Array"){let f="";try{f=JSON.parse(d).join(", ")}catch(h){console.log(h,d)}return f}else if((l||"").trim()){let f=null;try{f=format$4(new Date(parseInt(d)*1e3),l)}catch(h){console.log(h,d)}return f}else return d.toString().startsWith("`r;")?'<font color="red">'+this.tParam(this.showMultiLine(d.substr(3)))+"</font>":this.tParam(this.showMultiLine(d));else return d}},showMultiLine(a){return typeof a=="string"?a.replaceAll(" ","&nbsp;").replaceAll(`
104
104
  `,"<br/>"):a},getDateFormat(a,r){return format$4(new Date(a),r)},parseData(a,r){return lodashExports.get(a,r)},setData(a,r,o){lodashExports.set(a,r,o)},parseDateTimeData(a,r){let o=this.parseData(a,r);return o??""},parseArrayData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s)),o},setArrayData(a,r,o){let s="";o!=null&&(s=JSON.stringify(o)),this.setData(a,r,s)},parseDateRangeData(a,r){let o=[],s=this.parseData(a,r);return this.isJSON(s)&&(o=JSON.parse(s),o[0]=new Date(o[0]),o[1]=new Date(o[1])),o},getTriggers(a){let r=[],o="";for(let s=0;s<a.length;s++)a[s]==" "||a[s]=="+"||a[s]=="-"||a[s]=="*"||a[s]=="/"||a[s]=="("||a[s]==")"||a[s]==">"||a[s]=="<"||a[s]=="!"||a[s]=="&"||a[s]=="|"||a[s]=="="?(o||"").trim()&&(r.push(o),o=""):o+=a[s];return(o||"").trim()&&(o.indexOf(".")>=0?r.push(o.split(".")[0]+"ID"):r.push(o)),r},calculate(text,model){if(text==null)return null;text=text.toString();let result="",expression="";for(let a=0;a<text.length;a++){const r=text[a]==" "||text[a]=="+"||text[a]=="-"||text[a]=="*"||text[a]=="/"||text[a]=="("||text[a]==")"||text[a]==">"||text[a]=="<"||text[a]=="!"||text[a]=="|"||text[a]=="&"||text[a]=="=";if(r||a==text.length-1){if(r||(expression+=text[a]),(expression||"").trim()){if(!isNaN(expression)||expression.substr(0,1)=="'"||expression.substr(0,1)=='"'||expression=="null")result+=expression;else{let o=this.parseData(model,expression);o==null?result+="null":typeof o=="object"?result+=expression:isNaN(o)||o.toString().length>16?result+="'"+String(o)+"'":result+=String(o)}expression=""}r&&(result+=text[a])}else expression+=text[a]}let data=null;try{console.log("expression",text,result),data=eval(result),(data!="NaN"&&String(data)=="NaN"||typeof data=="number"&&(String(data)=="Infinity"||String(data)=="-Infinity"))&&(data=null)}catch(a){}return data},judgeCondition(a,r){if(!a)return!1;if(a.type=="Condition"){for(let o=0;o<a.condition.length;o++){let s=this.parseData(r,a.condition[o].code);s==null&&(s="null");let l=a.condition[o].value;l==null&&(l="");let u=a.condition[o].operator,c=!1;if(u=="Equal"?c=l.split(",").some(d=>String(s)==d):u=="Contains"?c=l.split(",").some(d=>String(s).indexOf(d)!=-1):u=="GreaterThan"?c=s>l:u=="LessThan"?c=s<l:u=="GreaterThanOrEqual"?c=s>=l:u=="LessThanOrEqual"?c=s<=l:u=="NotEqual"&&(c=l.split(",").every(d=>String(s)!=d)),!c)return!1}return!0}else if(a.type=="Expression")return this.calculate(a.expression,r)==!0},confirm(a,r){let o=Swal.fire({title:this.tParam(a),icon:"question",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),showCancelButton:!0});return o.then(s=>{s.value&&typeof r=="function"&&r()}),o},confirmInput(a,r,o,s){let l=Swal.fire({title:this.tParam(a),input:"text",confirmButtonText:this.$t("Front_Btn_OK"),cancelButtonText:this.$t("Front_Btn_Cancel"),inputPlaceholder:r,icon:"question",showCancelButton:!0,preConfirm:s});return l.then(u=>{u.value&&typeof o=="function"&&o()}),l},success(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.success({content:this.tParam(a)}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.success({title:this.tParam(a)}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"success",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},warning(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.warning({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.warning({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"warning",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},error(a,r){if(Setting.layout.alertStyle=="Message")this.$Message.error({content:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else if(Setting.layout.alertStyle=="Notice")this.$Notice.error({title:this.tParam(a),duration:5,closable:!0}),typeof r=="function"&&r();else{var o=Swal.fire({title:this.tParam(a),icon:"error",confirmButtonText:this.$t("Front_Btn_OK")});return o.then(()=>{typeof r=="function"&&r()}),o}},getTemplateReplace(a,r){let o=r;for(;o.indexOf("{")>=0;){let s=o.indexOf("{"),l=o.indexOf("}"),u=o.substring(s+1,l),c=this.parseData(a,u);c==null&&(c=""),o=o.substring(0,s)+c+o.substring(l+1)}return o},keepDecimal(a,r,o){if(r==null)return a;let s=parseFloat(a);return isNaN(s)||isNaN(r)?null:o?s.toFixed(r):Math.round(a*Math.pow(10,r))/Math.pow(10,r)},formatThousand(a){if(a==null)return a;let o=Math.trunc(a).toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"),s=a.toString().split(".");return s.length===2?o+"."+s[1].toString():o},resetNotice(){let a=this.getNotice(this);a&&a.init()},getNotice(a){return a.$refs.notice!=null?a.$refs.notice:a.$parent!=null?this.getNotice(a.$parent):null},isJSON(a){if(typeof a=="string"&&(a||"").trim())try{var r=JSON.parse(a);return!!(typeof r=="object"&&r)}catch{return!1}else return!1},tParam(a){if(a==null)return null;let o=a.toString().split("|"),s=o[0];return o.shift(),this.$t(s,o)}}},_export_sfc=(a,r)=>{const o=a.__vccOpts||a;for(const[s,l]of r)o[s]=l;return o},_sfc_main$1u={mixins:[mixinPage],components:{},data(){return{username:"",password:"",autoLogin:!0}},created(){},computed:{},methods:{...mapActions("admin/account",["login"]),async submit(a){if(a){var r=window.event?a.keyCode:a.which;if(!r||r!==0&&r!==1&&r!==13)return}this.username&&this.password&&(await this.login({username:this.username,password:this.password}),setTimeout(()=>{this.$router.replace(this.$route.query.redirect||"/home")}))},close(){this.confirm("Front_Sure_To_Exit",()=>{window.location.href="about:blank",window.close()})}}},_hoisted_1$1a={class:"signIn"},_hoisted_2$H={class:"box cf"},_hoisted_3$B={class:"right"},_hoisted_4$p={class:"logo cf"},_hoisted_5$f=["src"],_hoisted_6$a=["placeholder"],_hoisted_7$9=["placeholder"],_hoisted_8$9={class:"cpt"};function _sfc_render$1u(a,r,o,s,l,u){return require$$0$1.openBlock(),require$$0$1.createElementBlock("div",_hoisted_1$1a,[require$$0$1.createElementVNode("div",_hoisted_2$H,[require$$0$1.createElementVNode("div",{class:"left",style:require$$0$1.normalizeStyle({background:"url("+a.rootPath+"images/login/signIn-img.png) center center no-repeat","background-size":"cover"})},[require$$0$1.createElementVNode("h3",null,require$$0$1.toDisplayString(a.sysInfo.banner),1),require$$0$1.createElementVNode("p",null,require$$0$1.toDisplayString(a.sysInfo.subBanner),1)],4),require$$0$1.createElementVNode("div",_hoisted_3$B,[require$$0$1.createElementVNode("div",_hoisted_4$p,[require$$0$1.createElementVNode("img",{src:a.rootPath+"images/login/logo.png"},null,8,_hoisted_5$f),require$$0$1.createElementVNode("h2",null,require$$0$1.toDisplayString(a.layout.showI18n?a.$t("Front_Label_Setting_Info_Title"):a.sysInfo.title),1),r[6]||(r[6]=require$$0$1.createElementVNode("small",null,null,-1))]),require$$0$1.withDirectives(require$$0$1.createElementVNode("input",{type:"text","onUpdate:modelValue":r[0]||(r[0]=c=>l.username=c),onKeyup:r[1]||(r[1]=(...c)=>u.submit&&u.submit(...c)),class:"username",autofocus:"",placeholder:a.$t("Front_Msg_Please_Input_Account")},null,40,_hoisted_6$a),[[require$$0$1.vModelText,l.username]]),require$$0$1.withDirectives(require$$0$1.createElementVNode("input",{type:"password","onUpdate:modelValue":r[2]||(r[2]=c=>l.password=c),onKeyup:r[3]||(r[3]=(...c)=>u.submit&&u.submit(...c)),class:"password",placeholder:a.$t("Front_Msg_Please_Input_Password")},null,40,_hoisted_7$9),[[require$$0$1.vModelText,l.password]]),require$$0$1.createElementVNode("button",{type:"button",onClick:r[4]||(r[4]=c=>u.submit()),class:"sign-in"},require$$0$1.toDisplayString(a.$t("Front_Btn_Login")),1),require$$0$1.createElementVNode("button",{type:"button",onClick:r[5]||(r[5]=(...c)=>u.close&&u.close(...c)),class:"exit"},require$$0$1.toDisplayString(a.$t("Front_Btn_Exit")),1)])]),require$$0$1.createElementVNode("div",_hoisted_8$9,require$$0$1.toDisplayString(a.sysInfo.copyright),1)])}const login=_export_sfc(_sfc_main$1u,[["render",_sfc_render$1u],["__scopeId","data-v-96b2c272"]]),__vite_glob_0_0$2=Object.freeze(Object.defineProperty({__proto__:null,default:login},Symbol.toStringTag,{value:"Module"}));/*!
105
105
  * vue-router v4.5.1
106
106
  * (c) 2025 Eduardo San Martin Morote
@@ -157,7 +157,7 @@ version: 2.9.0
157
157
  `;return o+=r.wordwrap(this.getPrivateBaseKeyB64())+`
158
158
  `,o+="-----END RSA PRIVATE KEY-----",o},r.prototype.getPublicKey=function(){var o=`-----BEGIN PUBLIC KEY-----
159
159
  `;return o+=r.wordwrap(this.getPublicBaseKeyB64())+`
160
- `,o+="-----END PUBLIC KEY-----",o},r.hasPublicKeyProperty=function(o){return o=o||{},o.hasOwnProperty("n")&&o.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(o){return o=o||{},o.hasOwnProperty("n")&&o.hasOwnProperty("e")&&o.hasOwnProperty("d")&&o.hasOwnProperty("p")&&o.hasOwnProperty("q")&&o.hasOwnProperty("dmp1")&&o.hasOwnProperty("dmq1")&&o.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(o){this.n=o.n,this.e=o.e,o.hasOwnProperty("d")&&(this.d=o.d,this.p=o.p,this.q=o.q,this.dmp1=o.dmp1,this.dmq1=o.dmq1,this.coeff=o.coeff)},r}(RSAKey),_a$1,version$3=typeof process<"u"?(_a$1=process.env)===null||_a$1===void 0?void 0:_a$1.npm_package_version:void 0,JSEncrypt=function(){function a(r){r===void 0&&(r={}),r=r||{},this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=null}return a.prototype.setKey=function(r){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(r)},a.prototype.setPrivateKey=function(r){this.setKey(r)},a.prototype.setPublicKey=function(r){this.setKey(r)},a.prototype.decrypt=function(r){try{return this.getKey().decrypt(b64tohex(r))}catch{return!1}},a.prototype.encrypt=function(r){try{return hex2b64(this.getKey().encrypt(r))}catch{return!1}},a.prototype.sign=function(r,o,s){try{return hex2b64(this.getKey().sign(r,o,s))}catch{return!1}},a.prototype.verify=function(r,o,s){try{return this.getKey().verify(r,b64tohex(o),s)}catch{return!1}},a.prototype.getKey=function(r){if(!this.key){if(this.key=new JSEncryptRSAKey,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},a.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},a.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},a.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},a.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},a.version=version$3,a}();const encryptor=new JSEncrypt;encryptor.setPublicKey(Setting.encrypt.publicKey);const encrypt=a=>encryptor.encrypt(a),res$o="User",userlApi={get(a){return service({url:`api/${res$o}/get`,method:"get",params:{id:a}})},login(a){return a.password=encrypt(a.password),service({url:`api/${res$o}/login`,method:"post",data:a})},resetPassword(a){return service({url:`api/${res$o}/resetPassword`,method:"post",data:{id:a}})},updatePassword(a){return a.oldPassword=encrypt(a.oldPassword),a.newPassword=encrypt(a.newPassword),service({url:`api/${res$o}/updatePassword`,method:"post",data:a})},updateUser(a){return service({url:`api/${res$o}/updateUserInfo`,method:"put",data:a})}},account={namespaced:!0,state:{openPassword:!1},actions:{async login({dispatch:a},{username:r="",password:o=""}={}){const s=await userlApi.login({account:r,password:o});await a("admin/account/saveLoginData",s,{root:!0})},async saveLoginData({state:a,dispatch:r},{user:o,token:s,data:l,passwordExpire:u}={}){util$2.cookies.set("uuid",o.id),util$2.cookies.set("token",s),await r("admin/user/set",o,{root:!0}),await r("admin/user/setData",l,{root:!0}),await r("admin/menu/getMenuList",!0,{root:!0}),await r("load",{loadOpenedTabs:Setting.page.loadOpenedTabs}),u<0&&Swal.fire({title:window.$app.$t("Front_Msg_Password_Expire"),icon:"warning",confirmButtonText:window.$app.$t("Front_Btn_OK")}).then(()=>{a.openPassword=!0})},logout({dispatch:a},{confirm:r=!1}={}){async function o(){await a("admin/user/set",{},{root:!0}),util$2.cookies.remove("token"),util$2.cookies.remove("uuid"),router.currentRoute.value.path!="/login"&&router.push("/login?redirect="+router.options.history.location)}r?Swal.fire({title:window.$app.$t("Front_Msg_Sure_To_Logout"),icon:"question",showCancelButton:!0,confirmButtonText:window.$app.$t("Front_Btn_OK"),cancelButtonText:window.$app.$t("Front_Btn_Cancel")}).then(s=>{s.value&&o()}):o()},authFailed({dispatch:a}){a("logout")},async load({dispatch:a},{loadOpenedTabs:r=!0}={}){await a("admin/user/load",null,{root:!0}),await a("admin/page/openedLoad",{loadOpenedTabs:r},{root:!0})}}},__vite_glob_0_0$1=Object.freeze(Object.defineProperty({__proto__:null,default:account},Symbol.toStringTag,{value:"Module"})),res$n="Enum",enumApi={query(a){return service({url:`api/${res$n}/queryEnumItem`,method:"get",params:{enumType:a}})}},getLodop=()=>{try{const a=getCLodop();return a.SET_LICENSES(Setting.lodop.name,Setting.lodop.key,Setting.lodop.name2,Setting.lodop.key2),a.SET_LICENSES("THIRD LICENSE","",Setting.lodop.name3,Setting.lodop.key3),a}catch(a){alert(window.$app.$t("Front_Msg_Check_Print_Driver")+a.message);return}};var head=document.head||document.getElementsByTagName("head")[0]||document.documentElement,oscript=document.createElement("script");oscript.src="http://localhost:8000/CLodopfuncs.js?priority=1",head.insertBefore(oscript,head.firstChild);const lodop={getLodop},modelApi={add(a,r){return service({url:`api/${a}/add`,method:"post",data:r})},update(a,r){return service({url:`api/${a}/update`,method:"put",data:r})},remove(a,r){return service({url:`api/${a}/remove`,method:"delete",params:{id:r}})},submit(a,r){return service({url:`api/${a}/submit`,method:"post",data:r})},save(a,r){return service({url:`api/${a}/save`,method:"post",data:r})},batchSave(a,r){return service({url:"api/Model/batchSave",method:"post",data:{modelName:a,data:r}})},get(a,r){return service({url:`api/${a}/get`,method:"get",params:{id:r}})},query(a,r,o,s,l,u){(l==null||l=="")&&(l="query"),(u==null||u=="")&&(u="post");let c={...r,columns:o,viewCode:s?s.code:null};return r.isGroupBy?(c.modelName=a,service({url:"api/Model/group",method:"post",data:c})):service({url:`api/${a}/${l}`,method:u,data:c})},async exportExcel(a,r){let o="query",s="post";a.functionName!=null&&a.functionName!=""&&(o=a.functionName),a.functionType!=null&&a.functionType!=""&&(s=a.functionType);let l={...r,per:a.maxExportCount==null?1e6:a.maxExportCount,returnType:1,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),l.modelName=a.model,u=await service({url:"api/Model/group",method:"post",responseType:"blob",data:l})):u=await service({url:`api/${a.model}/${o}`,method:s,responseType:"blob",data:l});const c=new Blob([u],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(c,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r){let o="query",s="post";a.functionName!=null&&a.functionName!=""&&(o=a.functionName),a.functionType!=null&&a.functionType!=""&&(s=a.functionType);let l={...r,per:1e4,returnType:3,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),l.modelName=a.model,u=await service({url:"api/Model/group",method:"post",responseType:"blob",data:l})):u=await service({url:`api/${a.model}/${o}`,method:s,responseType:"blob",data:l});const c=new Blob([u],{type:"application/pdf"});saveAs(c,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o=!0){let s="query",l="post";a.functionName!=null&&a.functionName!=""&&(s=a.functionName),a.functionType!=null&&a.functionType!=""&&(l=a.functionType),a.isGroupBy&&(r.isGroupBy=!0,r.groupColumn=JSON.parse(a.groupColumn),r.groupMethod=JSON.parse(a.groupMethod));const u=lodop.getLodop();let c={...r,per:1e3,returnType:2,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},d;a.isGroupBy?(c.groupColumn=JSON.parse(a.groupColumn),c.groupMethod=JSON.parse(a.groupMethod),c.modelName=a.model,d=await service({url:"api/Model/group",method:"post",data:c})):d=await service({url:`api/${a.model}/${s}`,method:l,data:c}),u.PRINT_INIT("Print"),o?(u.ADD_PRINT_TABLE("4%","3%","94%","90%",d),u.SET_PRINT_PAGESIZE(2,0,0,"A4")):(u.ADD_PRINT_TABLE("4%","3%","94%","90%",d),u.SET_PRINT_PAGESIZE(1,0,0,"A4")),u.PRINTA()}},cache$1={namespaced:!0,state:{caches:{},dicts:{},enums:{},userNames:{}},getters:{},actions:{async loadCache({state:a},r){if(!(r in a.caches)){a.caches[r]=[];try{let o=await modelApi.query(r,{});a.caches[r]=o.data}catch(o){throw delete a.caches[r],o}}},async loadDict({state:a},r){if(!(r in a.dicts)){a.dicts[r]={};try{(await modelApi.query("Dict",{type:r})).data.forEach(s=>{a.dicts[r][s.id]=s.displayName})}catch(o){throw delete a.dicts[r],o}}},async loadEnum({state:a},r){if(!(r in a.enums)){a.enums[r]={};try{(await enumApi.query(r)).forEach(s=>{a.enums[r][s.id]=s.name})}catch(o){throw delete a.enums[r],o}}},async loadUserName({state:a},r){if(r&&!(r in a.userNames)){a.userNames[r]="-";try{let o=await userlApi.get(r);o&&(a.userNames[r]=o.name)}catch(o){throw delete a.userNames[r],o}}}}},__vite_glob_0_1$2=Object.freeze(Object.defineProperty({__proto__:null,default:cache$1},Symbol.toStringTag,{value:"Module"})),res$m="DataView",dataViewApi={getByCode(a){return service({url:`api/${res$m}/getByCode`,method:"get",params:{code:a}})},save(a,r){return service({url:`api/${res$m}/saveDataView`,method:"post",data:{code:a,viewColumns:r}})},copy(a,r){return service({url:`api/${res$m}/copyDataView`,method:"post",data:{id:a,newCode:r}})},saveSetting(a){return service({url:`api/${res$m}/saveSetting`,method:"post",data:a})},saveUserView(a,r){return service({url:`api/${res$m}/saveUserView`,method:"post",data:{code:a,viewColumns:r}})},saveFilterColumn(a,r){return service({url:`api/${res$m}/saveFilterColumn`,method:"post",data:{code:a,filterColumns:r}})},reset(a){return service({url:`api/${res$m}/removeUserView`,method:"post",data:{code:a}})},queryColumnByModel(a){return service({url:`api/${res$m}/queryColumnByModel`,method:"get",params:{model:a}})},queryColumnByView(a){return service({url:`api/${res$m}/queryColumnByView`,method:"get",params:{view:a}})},queryColumnByDataSource(a){return service({url:`api/${res$m}/queryColumnByDataSource`,method:"get",params:{dataSource:a}})},queryFilterByDataSource(a){return service({url:`api/${res$m}/queryFilterByDataSource`,method:"get",params:{dataSource:a}})},getSchemaByModel(a){return service({url:`api/${res$m}/getSchemaByModel`,method:"get",params:{model:a}})},async exportFile(a){const r=await service({url:`api/${res$m}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"View-"+format$4(new Date,"yyyyMMddHHmmss")+".view")},async exportExcel(a,r,o){const s=await service({url:`api/${res$m}/export`,method:"post",responseType:"blob",data:{data:r,returnType:1,viewCode:a.code,viewColumns:o}}),l=new Blob([s],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(l,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r,o){const s=await service({url:`api/${res$m}/export`,method:"post",responseType:"blob",data:{data:r,returnType:3,viewCode:a.code,viewColumns:o}}),l=new Blob([s],{type:"application/pdf"});saveAs(l,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o,s=!0){const l=lodop.getLodop(),u=await service({url:`api/${res$m}/export`,method:"post",data:{data:r,returnType:2,viewCode:a.code,viewColumns:o}});l.PRINT_INIT("Print"),s?(l.ADD_PRINT_TABLE("4%","3%","94%","90%",u),l.SET_PRINT_PAGESIZE(2,0,0,"A4")):(l.ADD_PRINT_TABLE("4%","3%","94%","90%",u),l.SET_PRINT_PAGESIZE(1,0,0,"A4")),l.PRINTA()}},dataView={namespaced:!0,state:{dataViews:{},schemas:{}},getters:{get:a=>r=>a.dataViews[r],getSchema:a=>r=>a.schemas[r]},actions:{async load({state:a},r){if(r in a.dataViews)return a.dataViews[r];{let o=await dataViewApi.getByCode(r);return o!=null&&o.isExist&&(a.dataViews[r]=o),o}},async loadSchema({state:a},r){if(r in a.schemas)return a.schemas[r];{let o=await dataViewApi.getSchemaByModel(r);return a.schemas[r]=o,o}},async reset({state:a},r){let o=await dataViewApi.reset(r);return a.dataViews[r]=o,o},async save({state:a},{code:r,columns:o}){let s=await dataViewApi.save(r,o);return a.dataViews[r]=s,s},async saveUserView({state:a},{code:r,columns:o}){let s=await dataViewApi.saveUserView(r,o);return a.dataViews[r]=s,s},async saveFilterColumn({state:a},{code:r,columns:o}){let s=await dataViewApi.saveFilterColumn(r,o);return a.dataViews[r]=s,s},async saveSetting({state:a},r){let o=await dataViewApi.saveSetting(r);return a.dataViews[r.code]=o,o}}},__vite_glob_0_2$1=Object.freeze(Object.defineProperty({__proto__:null,default:dataView},Symbol.toStringTag,{value:"Module"}));function pathInit({dbName:a="database",path:r="",user:o=!0,validator:s=()=>!0,defaultValue:l=""}){const u=util$2.cookies.get("uuid")||"ghost-uuid",c=`${a}.${o?`user.${u}`:"public"}${r?`.${r}`:""}`,d=util$2.db.get(c).value();return d!==void 0&&s(d)||util$2.db.set(c,l).write(),c}const db={namespaced:!0,actions:{set(a,{dbName:r="database",path:o="",value:s="",user:l=!1}){util$2.db.set(pathInit({dbName:r,path:o,user:l}),s).write()},get(a,{dbName:r="database",path:o="",defaultValue:s="",user:l=!1}){return new Promise(u=>{u(lodashExports.cloneDeep(util$2.db.get(pathInit({dbName:r,path:o,user:l,defaultValue:s})).value()))})},database(a,{user:r=!1}={}){return new Promise(o=>{o(util$2.db.get(pathInit({dbName:"database",path:"",user:r,defaultValue:{}})))})},databaseClear(a,{user:r=!1}={}){return new Promise(o=>{o(util$2.db.get(pathInit({dbName:"database",path:"",user:r,validator:()=>!1,defaultValue:{}})))})},databasePage(a,{basis:r="fullPath",user:o=!1}={}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}`,user:o,defaultValue:{}})))})},databasePageClear(a,{basis:r="fullPath",user:o=!1}={}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}`,user:o,validator:()=>!1,defaultValue:{}})))})},pageSet(a,{instance:r,basis:o="fullPath",user:s=!1}){return new Promise(l=>{l(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[o]}.$data`,user:s,validator:()=>!1,defaultValue:lodashExports.cloneDeep(r.$data)})))})},pageGet(a,{instance:r,basis:o="fullPath",user:s=!1}){return new Promise(l=>{l(lodashExports.cloneDeep(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[o]}.$data`,user:s,defaultValue:lodashExports.cloneDeep(r.$data)})).value()))})},pageClear(a,{basis:r="fullPath",user:o=!1}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}.$data`,user:o,validator:()=>!1,defaultValue:{}})))})}}},__vite_glob_0_3$1=Object.freeze(Object.defineProperty({__proto__:null,default:db,pathInit},Symbol.toStringTag,{value:"Module"})),e$1=typeof window<"u";function n(a){e$1&&typeof window.viewuiplus<"u"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[a.i.locale]=a)}const t$1={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};n(t$1);const __vite_glob_0_0=Object.freeze(Object.defineProperty({__proto__:null,default:t$1},Symbol.toStringTag,{value:"Module"})),t={i:{locale:"zh-CN",select:{placeholder:"请选择",noMatch:"无匹配数据",loading:"加载中"},table:{noDataText:"暂无数据",noFilteredDataText:"暂无筛选结果",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},datepicker:{selectDate:"选择日期",selectTime:"选择时间",startTime:"开始时间",endTime:"结束时间",clear:"清空",ok:"确定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"源列表",target:"目的列表"},filterPlaceholder:"请输入搜索内容",notFoundText:"列表为空"},modal:{okText:"确定",cancelText:"取消"},poptip:{okText:"确定",cancelText:"取消"},page:{prev:"上一页",next:"下一页",total:"共",item:"条",items:"条",prev5:"向前 5 页",next5:"向后 5 页",page:"条/页",goto:"跳至",p:"页"},rate:{star:"星",stars:"星"},time:{before:"前",after:"后",just:"刚刚",seconds:"秒",minutes:"分钟",hours:"小时",days:"天"},tree:{emptyText:"暂无数据"}}};n(t);const __vite_glob_0_1$1=Object.freeze(Object.defineProperty({__proto__:null,default:t},Symbol.toStringTag,{value:"Module"}));var vueI18n={};/*!
160
+ `,o+="-----END PUBLIC KEY-----",o},r.hasPublicKeyProperty=function(o){return o=o||{},o.hasOwnProperty("n")&&o.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(o){return o=o||{},o.hasOwnProperty("n")&&o.hasOwnProperty("e")&&o.hasOwnProperty("d")&&o.hasOwnProperty("p")&&o.hasOwnProperty("q")&&o.hasOwnProperty("dmp1")&&o.hasOwnProperty("dmq1")&&o.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(o){this.n=o.n,this.e=o.e,o.hasOwnProperty("d")&&(this.d=o.d,this.p=o.p,this.q=o.q,this.dmp1=o.dmp1,this.dmq1=o.dmq1,this.coeff=o.coeff)},r}(RSAKey),_a$1,version$3=typeof process<"u"?(_a$1=process.env)===null||_a$1===void 0?void 0:_a$1.npm_package_version:void 0,JSEncrypt=function(){function a(r){r===void 0&&(r={}),r=r||{},this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=null}return a.prototype.setKey=function(r){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(r)},a.prototype.setPrivateKey=function(r){this.setKey(r)},a.prototype.setPublicKey=function(r){this.setKey(r)},a.prototype.decrypt=function(r){try{return this.getKey().decrypt(b64tohex(r))}catch{return!1}},a.prototype.encrypt=function(r){try{return hex2b64(this.getKey().encrypt(r))}catch{return!1}},a.prototype.sign=function(r,o,s){try{return hex2b64(this.getKey().sign(r,o,s))}catch{return!1}},a.prototype.verify=function(r,o,s){try{return this.getKey().verify(r,b64tohex(o),s)}catch{return!1}},a.prototype.getKey=function(r){if(!this.key){if(this.key=new JSEncryptRSAKey,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},a.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},a.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},a.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},a.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},a.version=version$3,a}();const encryptor=new JSEncrypt;encryptor.setPublicKey(Setting.encrypt.publicKey);const encrypt=a=>encryptor.encrypt(a),res$o="User",userlApi={get(a){return service({url:`api/${res$o}/get`,method:"get",params:{id:a}})},login(a){return a.password=encrypt(a.password),service({url:`api/${res$o}/login`,method:"post",data:a})},resetPassword(a){return service({url:`api/${res$o}/resetPassword`,method:"post",data:{id:a}})},updatePassword(a){return a.oldPassword=encrypt(a.oldPassword),a.newPassword=encrypt(a.newPassword),service({url:`api/${res$o}/updatePassword`,method:"post",data:a})},updateUser(a){return service({url:`api/${res$o}/updateUserInfo`,method:"put",data:a})}},account={namespaced:!0,state:{openPassword:!1},actions:{async login({dispatch:a},{username:r="",password:o=""}={}){const s=await userlApi.login({account:r,password:o});await a("admin/account/saveLoginData",s,{root:!0})},async saveLoginData({state:a,dispatch:r},{user:o,token:s,data:l,passwordExpire:u}={}){util$2.cookies.set("uuid",o.id),util$2.cookies.set("token",s),await r("admin/user/set",o,{root:!0}),await r("admin/user/setData",l,{root:!0}),await r("admin/menu/getMenuList",!0,{root:!0}),await r("load",{loadOpenedTabs:Setting.page.loadOpenedTabs}),u<0&&Swal.fire({title:window.$app.$t("Front_Msg_Password_Expire"),icon:"warning",confirmButtonText:window.$app.$t("Front_Btn_OK")}).then(()=>{a.openPassword=!0})},logout({dispatch:a},{confirm:r=!1}={}){async function o(){await a("admin/user/set",{},{root:!0}),util$2.cookies.remove("token"),util$2.cookies.remove("uuid"),router.currentRoute.value.path!="/login"&&router.push("/login?redirect="+router.options.history.location)}r?Swal.fire({title:window.$app.$t("Front_Msg_Sure_To_Logout"),icon:"question",showCancelButton:!0,confirmButtonText:window.$app.$t("Front_Btn_OK"),cancelButtonText:window.$app.$t("Front_Btn_Cancel")}).then(s=>{s.value&&o()}):o()},authFailed({dispatch:a}){a("logout")},async load({dispatch:a},{loadOpenedTabs:r=!0}={}){await a("admin/user/load",null,{root:!0}),await a("admin/page/openedLoad",{loadOpenedTabs:r},{root:!0})}}},__vite_glob_0_0$1=Object.freeze(Object.defineProperty({__proto__:null,default:account},Symbol.toStringTag,{value:"Module"})),res$n="Enum",enumApi={query(a){return service({url:`api/${res$n}/queryEnumItem`,method:"get",params:{enumType:a}})}},getLodop=()=>{try{const a=getCLodop();return a.SET_LICENSES(Setting.lodop.name,Setting.lodop.key,Setting.lodop.name2,Setting.lodop.key2),a.SET_LICENSES("THIRD LICENSE","",Setting.lodop.name3,Setting.lodop.key3),a}catch(a){alert(window.$app.$t("Front_Msg_Check_Print_Driver")+a.message);return}};var head=document.head||document.getElementsByTagName("head")[0]||document.documentElement,oscript=document.createElement("script");oscript.src="http://localhost:8000/CLodopfuncs.js?priority=1",head.insertBefore(oscript,head.firstChild);const lodop={getLodop},modelApi={add(a,r){return service({url:`api/${a}/add`,method:"post",data:r})},update(a,r){return service({url:`api/${a}/update`,method:"put",data:r})},remove(a,r){return service({url:`api/${a}/remove`,method:"delete",params:{id:r}})},submit(a,r){return service({url:`api/${a}/submit`,method:"post",data:r})},save(a,r){return service({url:`api/${a}/save`,method:"post",data:r})},batchSave(a,r){return service({url:"api/Model/batchSave",method:"post",data:{modelName:a,data:r}})},get(a,r){return service({url:`api/${a}/get`,method:"get",params:{id:r}})},query(a,r,o,s,l,u){(l==null||l=="")&&(l="query"),(u==null||u=="")&&(u="post");let c={...r,columns:o,viewCode:s?s.code:null};return r.isGroupBy?(c.modelName=a,service({url:"api/Model/group",method:"post",data:c})):service({url:`api/${a}/${l}`,method:u,data:c})},async exportExcel(a,r){let o="query",s="post";a.functionName!=null&&a.functionName!=""&&(o=a.functionName),a.functionType!=null&&a.functionType!=""&&(s=a.functionType);let l={...r,per:a.maxExportCount==null?1e6:a.maxExportCount,returnType:1,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),l.modelName=a.model,u=await service({url:"api/Model/group",method:"post",responseType:"blob",data:l})):u=await service({url:`api/${a.model}/${o}`,method:s,responseType:"blob",data:l});const c=new Blob([u],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(c,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r){let o="query",s="post";a.functionName!=null&&a.functionName!=""&&(o=a.functionName),a.functionType!=null&&a.functionType!=""&&(s=a.functionType);let l={...r,per:1e4,returnType:3,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},u;a.isGroupBy?(l.groupColumn=JSON.parse(a.groupColumn),l.groupMethod=JSON.parse(a.groupMethod),l.modelName=a.model,u=await service({url:"api/Model/group",method:"post",responseType:"blob",data:l})):u=await service({url:`api/${a.model}/${o}`,method:s,responseType:"blob",data:l});const c=new Blob([u],{type:"application/pdf"});saveAs(c,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o=!0){let s="query",l="post";a.functionName!=null&&a.functionName!=""&&(s=a.functionName),a.functionType!=null&&a.functionType!=""&&(l=a.functionType),a.isGroupBy&&(r.isGroupBy=!0,r.groupColumn=JSON.parse(a.groupColumn),r.groupMethod=JSON.parse(a.groupMethod));const u=lodop.getLodop();let c={...r,per:1e3,returnType:2,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code},d;a.isGroupBy?(c.groupColumn=JSON.parse(a.groupColumn),c.groupMethod=JSON.parse(a.groupMethod),c.modelName=a.model,d=await service({url:"api/Model/group",method:"post",data:c})):d=await service({url:`api/${a.model}/${s}`,method:l,data:c}),u.PRINT_INIT("Print"),o?(u.ADD_PRINT_TABLE("4%","3%","94%","90%",d),u.SET_PRINT_PAGESIZE(2,0,0,"A4")):(u.ADD_PRINT_TABLE("4%","3%","94%","90%",d),u.SET_PRINT_PAGESIZE(1,0,0,"A4")),u.PRINTA()}},cache$1={namespaced:!0,state:{caches:{},dicts:{},enums:{},userNames:{}},getters:{},actions:{async loadCache({state:a},r){if(!(r in a.caches)){a.caches[r]=[];try{let o=await modelApi.query(r,{});a.caches[r]=o.data}catch(o){throw delete a.caches[r],o}}},async loadDict({state:a},r){if(!(r in a.dicts)){a.dicts[r]={};try{(await modelApi.query("Dict",{type:r})).data.forEach(s=>{a.dicts[r][s.id]=s.displayName})}catch(o){throw delete a.dicts[r],o}}},async loadEnum({state:a},r){if(!(r in a.enums)){a.enums[r]={};try{(await enumApi.query(r)).forEach(s=>{a.enums[r][s.id]=s.name})}catch(o){throw delete a.enums[r],o}}},async loadUserName({state:a},r){if(r&&!(r in a.userNames)){a.userNames[r]="-";try{let o=await userlApi.get(r);o&&(a.userNames[r]=o.name)}catch(o){throw delete a.userNames[r],o}}}}},__vite_glob_0_1$2=Object.freeze(Object.defineProperty({__proto__:null,default:cache$1},Symbol.toStringTag,{value:"Module"})),res$m="DataView",dataViewApi={getByCode(a){return service({url:`api/${res$m}/getByCode`,method:"get",params:{code:a}})},save(a,r){return service({url:`api/${res$m}/saveDataView`,method:"post",data:{code:a,viewColumns:r}})},copy(a,r){return service({url:`api/${res$m}/copyDataView`,method:"post",data:{id:a,newCode:r}})},saveSetting(a){return service({url:`api/${res$m}/saveSetting`,method:"post",data:a})},saveUserView(a,r){return service({url:`api/${res$m}/saveUserView`,method:"post",data:{code:a,viewColumns:r}})},saveFilterColumn(a,r){return service({url:`api/${res$m}/saveFilterColumn`,method:"post",data:{code:a,filterColumns:r}})},reset(a){return service({url:`api/${res$m}/removeUserView`,method:"post",data:{code:a}})},queryColumnByModel(a){return service({url:`api/${res$m}/queryColumnByModel`,method:"get",params:{model:a}})},queryColumnByView(a){return service({url:`api/${res$m}/queryColumnByView`,method:"get",params:{view:a}})},queryColumnByDataSource(a){return service({url:`api/${res$m}/queryColumnByDataSource`,method:"get",params:{dataSource:a}})},queryFilterByDataSource(a){return service({url:`api/${res$m}/queryFilterByDataSource`,method:"get",params:{dataSource:a}})},getSchemaByModel(a){return service({url:`api/${res$m}/getSchemaByModel`,method:"get",params:{model:a}})},async exportFile(a){const r=await service({url:`api/${res$m}/exportFile`,method:"post",responseType:"blob",data:{ids:a}}),o=new Blob([r],{type:"application/octet-stream"});saveAs(o,"View-"+format$4(new Date,"yyyyMMddHHmmss")+".view")},async exportExcel(a,r,o){const s=await service({url:`api/${res$m}/export`,method:"post",responseType:"blob",data:{data:r,returnType:1,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code,viewColumns:o}}),l=new Blob([s],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});saveAs(l,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".xlsx")},async exportPdf(a,r,o){const s=await service({url:`api/${res$m}/export`,method:"post",responseType:"blob",data:{data:r,returnType:3,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code,viewColumns:o}}),l=new Blob([s],{type:"application/pdf"});saveAs(l,a.name+"-"+format$4(new Date,"yyyyMMddHHmmss")+".pdf")},async printList(a,r,o,s=!0){const l=lodop.getLodop(),u=await service({url:`api/${res$m}/export`,method:"post",data:{data:r,returnType:2,viewCode:(a.exportDataViewCode||"").trim()?a.exportDataViewCode:a.code,viewColumns:o}});l.PRINT_INIT("Print"),s?(l.ADD_PRINT_TABLE("4%","3%","94%","90%",u),l.SET_PRINT_PAGESIZE(2,0,0,"A4")):(l.ADD_PRINT_TABLE("4%","3%","94%","90%",u),l.SET_PRINT_PAGESIZE(1,0,0,"A4")),l.PRINTA()}},dataView={namespaced:!0,state:{dataViews:{},schemas:{}},getters:{get:a=>r=>a.dataViews[r],getSchema:a=>r=>a.schemas[r]},actions:{async load({state:a},r){if(r in a.dataViews)return a.dataViews[r];{let o=await dataViewApi.getByCode(r);return o!=null&&o.isExist&&(a.dataViews[r]=o),o}},async loadSchema({state:a},r){if(r in a.schemas)return a.schemas[r];{let o=await dataViewApi.getSchemaByModel(r);return a.schemas[r]=o,o}},async reset({state:a},r){let o=await dataViewApi.reset(r);return a.dataViews[r]=o,o},async save({state:a},{code:r,columns:o}){let s=await dataViewApi.save(r,o);return a.dataViews[r]=s,s},async saveUserView({state:a},{code:r,columns:o}){let s=await dataViewApi.saveUserView(r,o);return a.dataViews[r]=s,s},async saveFilterColumn({state:a},{code:r,columns:o}){let s=await dataViewApi.saveFilterColumn(r,o);return a.dataViews[r]=s,s},async saveSetting({state:a},r){let o=await dataViewApi.saveSetting(r);return a.dataViews[r.code]=o,o}}},__vite_glob_0_2$1=Object.freeze(Object.defineProperty({__proto__:null,default:dataView},Symbol.toStringTag,{value:"Module"}));function pathInit({dbName:a="database",path:r="",user:o=!0,validator:s=()=>!0,defaultValue:l=""}){const u=util$2.cookies.get("uuid")||"ghost-uuid",c=`${a}.${o?`user.${u}`:"public"}${r?`.${r}`:""}`,d=util$2.db.get(c).value();return d!==void 0&&s(d)||util$2.db.set(c,l).write(),c}const db={namespaced:!0,actions:{set(a,{dbName:r="database",path:o="",value:s="",user:l=!1}){util$2.db.set(pathInit({dbName:r,path:o,user:l}),s).write()},get(a,{dbName:r="database",path:o="",defaultValue:s="",user:l=!1}){return new Promise(u=>{u(lodashExports.cloneDeep(util$2.db.get(pathInit({dbName:r,path:o,user:l,defaultValue:s})).value()))})},database(a,{user:r=!1}={}){return new Promise(o=>{o(util$2.db.get(pathInit({dbName:"database",path:"",user:r,defaultValue:{}})))})},databaseClear(a,{user:r=!1}={}){return new Promise(o=>{o(util$2.db.get(pathInit({dbName:"database",path:"",user:r,validator:()=>!1,defaultValue:{}})))})},databasePage(a,{basis:r="fullPath",user:o=!1}={}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}`,user:o,defaultValue:{}})))})},databasePageClear(a,{basis:r="fullPath",user:o=!1}={}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}`,user:o,validator:()=>!1,defaultValue:{}})))})},pageSet(a,{instance:r,basis:o="fullPath",user:s=!1}){return new Promise(l=>{l(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[o]}.$data`,user:s,validator:()=>!1,defaultValue:lodashExports.cloneDeep(r.$data)})))})},pageGet(a,{instance:r,basis:o="fullPath",user:s=!1}){return new Promise(l=>{l(lodashExports.cloneDeep(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[o]}.$data`,user:s,defaultValue:lodashExports.cloneDeep(r.$data)})).value()))})},pageClear(a,{basis:r="fullPath",user:o=!1}){return new Promise(s=>{s(util$2.db.get(pathInit({dbName:"database",path:`$page.${router.app.$route[r]}.$data`,user:o,validator:()=>!1,defaultValue:{}})))})}}},__vite_glob_0_3$1=Object.freeze(Object.defineProperty({__proto__:null,default:db,pathInit},Symbol.toStringTag,{value:"Module"})),e$1=typeof window<"u";function n(a){e$1&&typeof window.viewuiplus<"u"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[a.i.locale]=a)}const t$1={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};n(t$1);const __vite_glob_0_0=Object.freeze(Object.defineProperty({__proto__:null,default:t$1},Symbol.toStringTag,{value:"Module"})),t={i:{locale:"zh-CN",select:{placeholder:"请选择",noMatch:"无匹配数据",loading:"加载中"},table:{noDataText:"暂无数据",noFilteredDataText:"暂无筛选结果",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},datepicker:{selectDate:"选择日期",selectTime:"选择时间",startTime:"开始时间",endTime:"结束时间",clear:"清空",ok:"确定",datePanelLabel:"[yyyy年] [m月]",month:"月",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",year:"年",weekStartDay:"0",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},months:{m1:"1月",m2:"2月",m3:"3月",m4:"4月",m5:"5月",m6:"6月",m7:"7月",m8:"8月",m9:"9月",m10:"10月",m11:"11月",m12:"12月"}},transfer:{titles:{source:"源列表",target:"目的列表"},filterPlaceholder:"请输入搜索内容",notFoundText:"列表为空"},modal:{okText:"确定",cancelText:"取消"},poptip:{okText:"确定",cancelText:"取消"},page:{prev:"上一页",next:"下一页",total:"共",item:"条",items:"条",prev5:"向前 5 页",next5:"向后 5 页",page:"条/页",goto:"跳至",p:"页"},rate:{star:"星",stars:"星"},time:{before:"前",after:"后",just:"刚刚",seconds:"秒",minutes:"分钟",hours:"小时",days:"天"},tree:{emptyText:"暂无数据"}}};n(t);const __vite_glob_0_1$1=Object.freeze(Object.defineProperty({__proto__:null,default:t},Symbol.toStringTag,{value:"Module"}));var vueI18n={};/*!
161
161
  * shared v9.14.4
162
162
  * (c) 2025 kazuya kawaguchi
163
163
  * Released under the MIT License.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "2.10.29",
4
+ "version": "2.10.31",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -139,7 +139,7 @@ export default {
139
139
  data: {
140
140
  data,
141
141
  returnType: 1,
142
- viewCode: tableView.code,
142
+ viewCode: !!(tableView.exportDataViewCode || '').trim() ? tableView.exportDataViewCode : tableView.code,
143
143
  viewColumns
144
144
  }
145
145
  });
@@ -157,7 +157,7 @@ export default {
157
157
  data: {
158
158
  data,
159
159
  returnType: 3,
160
- viewCode: tableView.code,
160
+ viewCode: !!(tableView.exportDataViewCode || '').trim() ? tableView.exportDataViewCode : tableView.code,
161
161
  viewColumns
162
162
  }
163
163
  });
@@ -174,7 +174,7 @@ export default {
174
174
  data: {
175
175
  data,
176
176
  returnType: 2,
177
- viewCode: tableView.code,
177
+ viewCode: !!(tableView.exportDataViewCode || '').trim() ? tableView.exportDataViewCode : tableView.code,
178
178
  viewColumns
179
179
  }
180
180
  });
@@ -337,7 +337,12 @@ export default {
337
337
  return result;
338
338
  } else {
339
339
  //if (this.layout.showI18n) {
340
- return this.tParam(this.showMultiLine(value));
340
+ if (value.toString().startsWith('`r;')) {
341
+ return '<font color="red">' + this.tParam(this.showMultiLine(value.substr(3))) + '</font>';
342
+ } else {
343
+ return this.tParam(this.showMultiLine(value));
344
+ }
345
+
341
346
  //} else {
342
347
  // return value;
343
348
  //}