@utogether/utils 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pkg/formatData.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const formatItems: (items: any, status: any, span?: number) => an
|
|
|
16
16
|
* @param {*} array items
|
|
17
17
|
* @return {*} items
|
|
18
18
|
*/
|
|
19
|
-
export declare const formatGridItems: (array: any) => any;
|
|
19
|
+
export declare const formatGridItems: (array: any, favorite: any) => any;
|
|
20
20
|
/**
|
|
21
21
|
* @description: 标准化必填数据
|
|
22
22
|
* @param {*} records 数据列表
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
interface Params {
|
|
3
|
+
excludeListeners?: boolean;
|
|
4
|
+
excludeKeys?: string[];
|
|
5
|
+
}
|
|
6
|
+
type Recordable<T = any> = Record<string, T>;
|
|
7
|
+
export declare function entries<T>(obj: Recordable<T>): [string, T][];
|
|
8
|
+
export declare function useAttrs(params?: Params): Ref<Recordable> | {};
|
|
9
|
+
export {};
|
package/dist/pkg/useRender.d.ts
CHANGED
package/dist/utils.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(z,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("xe-utils"),require("vxe-table")):typeof define=="function"&&define.amd?define(["exports","vue","xe-utils","vxe-table"],e):(z=typeof globalThis<"u"?globalThis:z||self,e(z["@utogether/utils"]={},z.vue,z.xeUtils,z.VXETable))})(this,function(exports,vue,xeUtils,VXETable){"use strict";var Ut=Object.defineProperty;var kt=(z,e,t)=>e in z?Ut(z,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):z[e]=t;var G=(z,e,t)=>(kt(z,typeof e!="symbol"?e+"":e,t),t);const _interopDefaultLegacy=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},VXETable__default=_interopDefaultLegacy(VXETable);function _isSlot(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!vue.isVNode(e)}const VxetableRender=(VXETable,{serviceApi,dict,i18n})=>{VXETable.renderer.add("#SuSelect",{renderEdit(e,t){let r;const{row:n,column:o}=t,{options:s,props:c,optionProps:p={},events:d}=e,{label:h="label",value:v="value",extLabel:y}=p,{code:S,url:D,fetchField:l,extParam:E={},loading:R=!1,multiple:I,defaultValue:F}=c;F&&Object.keys(F).forEach(P=>{n[P]=n[P]||F[P]}),I&&n[o.field]&&!xeUtils.isArray(n[o.field])&&n[o.field].split(",").forEach(w=>{!s.some(U=>U[h]===w)&&s.push({[v]:w,[h]:w})});async function k(w){const P=Object.assign({},{pageSize:20,pageNum:1},E,{[l||h]:w});let U;try{s.length=0,c.loading=!0,D?U=await serviceApi.get(D,P):U=await serviceApi(S,P),U&&(U.list?s.push(...U.list):s.push(...U))}finally{c.loading=!1}}function L(w){const{fieldMap:P={}}=c;let U;if(I&&w.length)w.forEach(V=>{U=s.find(q=>V===q[v]);const j=Object.keys(P);if(j.length){const q=Object.values(P);j.forEach((K,X)=>{const Z=n[K]?n[K].toString():"";n[K]=Z&&!Z.includes(U[q[X]])?`${Z},${U[q[X]]}`:U[q[X]]})}});else if(w.length){U=s.find(j=>w===j[v]);const V=Object.keys(P);if(V.length){const j=Object.values(P);V.forEach((q,K)=>{n[q]=U[j[K]]})}}d!=null&&d.change&&d.change(t,w,U,o.field)}function f(w){d!=null&&d.input&&d.input(t,w)}function x(){d!=null&&d.clear&&d.clear({row:n,field:o.field})}function C(){!s.length&&k(""),d!=null&&d.focus&&d.focus(t,o.field)}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o.field],"onUpdate:modelValue":w=>n[o.field]=w},c,{filterable:!0,remote:!0,clearable:!0,size:"small",placeholder:"\u8BF7\u5F55\u5165\u5173\u952E\u5B57\u641C\u7D22",style:"width: 100%","remote-method":k,loading:R,onFocus:()=>C(),onChange:w=>L(w),onClear:()=>x(),onInput:w=>f(w)}),_isSlot(r=s.map(w=>vue.createVNode(vue.resolveComponent("el-option"),{key:w[v],label:w[h],value:w[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[w[y]?`${w[v]}-${w[y]}`:w[v]]),v!==h&&!w[y]?vue.createVNode("span",{class:"su-coSelect-option"},[w[h]]):null]})))?r:{default:()=>[r]})]},renderCell(renderOpts,params){const{row,column}=params,{props}=renderOpts,{textValue,multiple}=props;let val=row[column.field];return textValue&&(val=eval(`row.${textValue}`)||row[column.field]),val&&multiple&&xeUtils.isArray(val)&&(val=val&&val.join(",")),[vue.createVNode("span",null,[val])]},renderItemContent(e,t){let r;const{data:n,property:o}=t,{options:s,props:c,optionProps:p={},events:d}=e,{label:h="label",value:v="value",extLabel:y}=p,{code:S,url:D,fetchField:l,extParam:E={},loading:R=!1}=c;async function I(x){const C=Object.assign({},{pageSize:20,pageNum:1},E,{[l]:x});let w;try{s.length=0,c.loading=!0,D?w=await serviceApi.get(D,C):w=await serviceApi(S,C),w!=null&&w.list?s.push(...w.list):w&&s.push(...w)}finally{c.loading=!1}}function F(x){const{multiple:C,fieldMap:w={}}=c;let P;if(C&&x.length)x.forEach(U=>{P=s.find(j=>U===j[v]);const V=Object.keys(w);if(V.length){const j=Object.values(w);V.forEach((q,K)=>{const X=n[q]?n[q].toString():"";n[q]=X&&!X.includes(P[j[K]])?`${X},${P[j[K]]}`:P[j[K]]})}});else if(x.length){P=s.find(V=>x===V[v]);const U=Object.keys(w);if(U.length){const V=Object.values(w);U.forEach((j,q)=>{n[j]=P[V[q]]})}}d!=null&&d.change&&d.change(x,P,n,o)}function k(x){d!=null&&d.input&&d.input(t,x)}function L(){d!=null&&d.clear&&d.clear({data:n,field:o})}function f(){!s.length&&I(""),d!=null&&d.focus&&d.focus(t)}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o],"onUpdate:modelValue":x=>n[o]=x},c,{filterable:!0,remote:!0,clearable:!0,size:"small",style:"width: 100%",placeholder:"\u8BF7\u5F55\u5165\u5173\u952E\u5B57\u641C\u7D22","remote-method":I,loading:R,onFocus:()=>f(),onChange:x=>F(x),onClear:()=>L(),onInput:()=>k()}),_isSlot(r=s.map(x=>vue.createVNode(vue.resolveComponent("el-option"),{key:x[v],label:x[h],value:x[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[x[y]?`${x[v]}-${x[y]}`:x[v]]),v!==h&&!x[y]?vue.createVNode("span",{class:"su-coSelect-option"},[x[h]]):null]})))?r:{default:()=>[r]})]}}),VXETable.renderer.add("#SuDateRange",{renderItemContent(e,t){const{data:r,property:n}=t,{props:o}=e;return[vue.createVNode(vue.resolveComponent("el-date-picker"),vue.mergeProps({modelValue:r[n],"onUpdate:modelValue":s=>r[n]=s,type:(o==null?void 0:o.type)||"daterange"},o,{size:"small",style:"width: 100%","range-separator":i18n("message.to",!0),"start-placeholder":i18n("message.startDate",!0),"end-placeholder":i18n("message.endDate",!0)}),null)]}}),VXETable.renderer.add("#select",{renderEdit(e,t){let r;const{row:n,column:o}=t,{options:s,props:c,optionProps:p={},events:d}=e,{label:h="label",value:v="value",extLabel:y}=p;c.multiple&&n[o.field]&&!xeUtils.isArray(n[o.field])&&n[o.field].split(",").forEach(l=>{!s.some(R=>R[h]===l)&&s.push({[v]:l,[h]:l})});function S(l){const E=l&&s.find(R=>l===R[v]);d!=null&&d.change&&d.change(t,l,E,o.field)}function D(){d!=null&&d.clear&&d.clear({row:n,field:o.field})}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o.field],"onUpdate:modelValue":l=>n[o.field]=l,filterable:!0,clearable:!0},c,{size:"small",style:"width: 100%",onChange:l=>S(l),onClear:()=>D()}),_isSlot(r=s.map(l=>vue.createVNode(vue.resolveComponent("el-option"),{key:l[v],label:l[y]?l[v]:l[h],value:l[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[y&&l[y]?`${l[v]}-${l[y]}`:l[v]]),v!==h&&!l[y]?vue.createVNode("span",{class:"su-coSelect-option"},[l[h]]):null]})))?r:{default:()=>[r]})]},renderCell(renderOpts,params){const{row,column}=params,{props,options,optionProps}=renderOpts,{label="label",value="value",extLabel}=optionProps,{textValue}=props;let val=row[column.field];const item=options.find(e=>e[value]===val);return textValue&&(val=eval(`row.${textValue}`)||row[column.field]),item&&(val=extLabel?item[value]:item[label]),val&&(props==null?void 0:props.multiple)&&xeUtils.isArray(val)&&(val=val&&val.join(",")),[vue.createVNode("span",null,[val])]},renderItemContent(e,t){let r;const{data:n,property:o}=t,{options:s,props:c,optionProps:p={},events:d}=e,{label:h="label",value:v="value"}=p,{defaultValues:y}=c;y&&(n[o]=y);function S(l){const{fieldMap:E={}}=c,R=s.find(k=>l===k[v]),I=Object.keys(E);if(I.length){const k=Object.values(E);I.forEach((L,f)=>{n[L]=l?R[k[f]]:null})}const F={item:R,row:n,property:o};d!=null&&d.change&&d.change(F)}function D(){d!=null&&d.clear&&d.clear({data:n,field:o})}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o],"onUpdate:modelValue":l=>n[o]=l},c,{filterable:!0,clearable:!0,size:"small",style:"width: 100%",onChange:l=>S(l),onClear:()=>D()}),_isSlot(r=s.map(l=>vue.createVNode(vue.resolveComponent("el-option"),{key:l[v],label:l[h],value:l[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[l[h]]),vue.createVNode("span",{class:"su-coSelect-option"},[l[v]])]})))?r:{default:()=>[r]})]}}),VXETable.renderer.add("#lov",{renderItemContent(e,t){const{data:r,property:n}=t,{props:o,events:s}=e,{defaultValues:c,mapField:p}=o;c&&(r[n]=c);function d(v,y){const{mapField:S,field:D,displayName:l,isMulti:E}=o;if(E){if(E){const I={};r[l||D]=v.reduce((F,k)=>{for(const L in S)I[L]=F?I[L]+","+k[S[L]]:k[S[L]];return F=F?F+","+k[l||D]:k[l||D],F},""),Object.assign(r,I)}}else{const I={[l||D]:v[y||l||D]};for(const F in S)I[F]=v[S[F]];Object.assign(r,I)}const R={row:r,property:n,item:v};s!=null&&s.change&&s.change(R)}function h(){if(r[n]=null,!xeUtils.isEmpty(p))for(const v in p)r[v]=null;s!=null&&s.clear&&s.clear({data:r,field:n})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"vxe",onChange:(v,y)=>d(v,y),onClear:()=>h()}),null)]},renderEdit(e,t){const{row:r,column:n}=t,{props:o,events:s}=e;function c(d,h){const{mapField:v,field:y,displayName:S,isMulti:D}=o;if(!D){const l={[S||y]:d[h||S||y]};for(const E in v)l[E]=d[v[E]];Object.assign(r,l)}s!=null&&s.change&&s.change(t,d,r[n.field])}function p(){const{mapField:d,field:h}=o;if(r[n.field]=null,!xeUtils.isEmpty(d))for(const v in d)r[v]=null;s!=null&&s.clear&&s.clear({row:r,field:h})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"ele",onChange:(d,h)=>c(d,h),onClear:()=>p()}),null)]},renderDefault(e,t){const{row:r,column:n}=t,{props:o,events:s}=e;function c(d,h){const{mapField:v,field:y,displayName:S,isMulti:D}=o;if(!D){const l={[S||y]:d[h||S||y]};for(const E in v)l[E]=d[v[E]];Object.assign(r,l)}s!=null&&s.change&&s.change(t,d,r[n.field])}function p(){const{mapField:d,field:h}=o;if(r[n.field]=null,!xeUtils.isEmpty(d))for(const v in d)r[v]=null;s!=null&&s.clear&&s.clear({row:r,field:h})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"ele",onChange:(d,h)=>c(d,h),onClear:()=>p()}),null)]},renderCell(e,t){const{row:r,column:n}=t,o=r[n.field];return[vue.createVNode("span",null,[o])]}}),VXETable.renderer.add("#upload",{renderItemContent(e,t){const{data:r,field:n}=t,{props:o,events:s}=e;function c(){r[property]="",s!=null&&s.clear&&s.clear({data:r,field:property})}return[vue.createVNode(vue.resolveComponent("form-upload"),vue.mergeProps({record:r,field:n},o,{onClear:()=>c()}),null)]}}),VXETable.renderer.add("#tag",{renderDefault(e,t){let r;const{row:n,column:o}=t,{props:{code:s,tagMap:c}}=e;function p(){return n[o.field]?c[n[o.field]]:null}return[n[o.field]?vue.createVNode(vue.resolveComponent("el-tag"),{effect:"dark",type:p()},_isSlot(r=getValue(s,n[o.field]))?r:{default:()=>[r]}):null]}}),VXETable.renderer.add("#switch",{renderDefault(e,t){const{row:r,column:n}=t,{props:{code:o,activeValue:s,inactiveValue:c},events:p}=e;function d(h){const v={row:r,column:n,value:h};p!=null&&p.change&&p.change(v)}return[r[n.field]?vue.createVNode(vue.resolveComponent("el-switch"),vue.mergeProps({modelValue:r[n.field],"onUpdate:modelValue":h=>r[n.field]=h,"inline-prompt":!0,size:"large",style:"--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"},e.props,{"active-text":getValue(o,s),"inactive-text":getValue(o,c),onChange:h=>d(h)}),null):null]}});function getValue(e,t){var r,n,o;return!t||!e||!dict?t:(o=(n=(r=dict[e])==null?void 0:r.children)==null?void 0:n.find(s=>s.dictCode===t))==null?void 0:o.dictName}return VXETable},hasClass=(e,t)=>{var r;return!!((r=e.className)!=null&&r.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))},addClass=(e,t,r)=>{hasClass(e,t)||(e.className+=" "+t),r&&(hasClass(e,r)||(e.className+=" "+r))},removeClass=(e,t,r)=>{var n,o;if(hasClass(e,t)){const s=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=(n=e.className)==null?void 0:n.replace(s," ").trim()}if(r&&hasClass(e,r)){const s=new RegExp("(\\s|^)"+r+"(\\s|$)");e.className=(o=e.className)==null?void 0:o.replace(s," ").trim()}},toggleClass=(e,t,r)=>{const n=r||document.body;let{className:o}=n;o=o==null?void 0:o.replace(t,""),n.className=o&&e?`${o} ${t} `:o};function useRafThrottle(e){let t=!1;return function(...r){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,r),t=!1}))}}const openLink=e=>{const t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("target","_blank"),t.setAttribute("rel","noreferrer noopener"),t.setAttribute("id","external"),document.getElementById("external")&&document.body.removeChild(document.getElementById("external")),document.body.appendChild(t),t.click(),t.remove()};var MapShim=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,s){return o[0]===r?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,s=this.__entries__;o<s.length;o++){var c=s[o];r.call(n,c[1],c[0])}},t}()}(),isBrowser=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),requestAnimationFrame$1=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(global$1):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),trailingTimeout=2;function throttle(e,t){var r=!1,n=!1,o=0;function s(){r&&(r=!1,e()),n&&p()}function c(){requestAnimationFrame$1(s)}function p(){var d=Date.now();if(r){if(d-o<trailingTimeout)return;n=!0}else r=!0,n=!1,setTimeout(c,t);o=d}return p}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!isBrowser||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!isBrowser||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=transitionKeys.some(function(s){return!!~n.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),defineConfigurable=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},getWindowOf=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(e){return parseFloat(e)||0}function getBordersSize(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var s=e["border-"+o+"-width"];return n+toFloat(s)},0)}function getPaddings(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var s=o[n],c=e["padding-"+s];r[s]=toFloat(c)}return r}function getSVGContentRect(e){var t=e.getBBox();return createRectInit(0,0,t.width,t.height)}function getHTMLElementContentRect(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return emptyRect;var n=getWindowOf(e).getComputedStyle(e),o=getPaddings(n),s=o.left+o.right,c=o.top+o.bottom,p=toFloat(n.width),d=toFloat(n.height);if(n.boxSizing==="border-box"&&(Math.round(p+s)!==t&&(p-=getBordersSize(n,"left","right")+s),Math.round(d+c)!==r&&(d-=getBordersSize(n,"top","bottom")+c)),!isDocumentElement(e)){var h=Math.round(p+s)-t,v=Math.round(d+c)-r;Math.abs(h)!==1&&(p-=h),Math.abs(v)!==1&&(d-=v)}return createRectInit(o.left,o.top,p,d)}var isSVGGraphicsElement=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof getWindowOf(e).SVGGraphicsElement}:function(e){return e instanceof getWindowOf(e).SVGElement&&typeof e.getBBox=="function"}}();function isDocumentElement(e){return e===getWindowOf(e).document.documentElement}function getContentRect(e){return isBrowser?isSVGGraphicsElement(e)?getSVGContentRect(e):getHTMLElementContentRect(e):emptyRect}function createReadOnlyRect(e){var t=e.x,r=e.y,n=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(s.prototype);return defineConfigurable(c,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),c}function createRectInit(e,t,r,n){return{x:e,y:t,width:r,height:n}}var ResizeObservation=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=getContentRect(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),ResizeObserverEntry=function(){function e(t,r){var n=createReadOnlyRect(r);defineConfigurable(this,{target:t,contentRect:n})}return e}(),ResizeObserverSPI=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new MapShim,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new ResizeObservation(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;!r.has(t)||(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new ResizeObserverEntry(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ResizeObserverController.getInstance(),n=new ResizeObserverSPI(t,r,this);observers.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ResizeObserver.prototype[e]=function(){var t;return(t=observers.get(this))[e].apply(t,arguments)}});var index=function(){return typeof global$1.ResizeObserver<"u"?global$1.ResizeObserver:ResizeObserver}();const isServer=typeof window>"u",resizeHandler=e=>{for(const t of e){const r=t.target.__resizeListeners__||[];r.length&&r.forEach(n=>{n()})}},addResizeListener=(e,t)=>{isServer||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new index(resizeHandler),e.__ro__.observe(e)),e.__resizeListeners__.push(t))},removeResizeListener=(e,t)=>{!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||e.__ro__.disconnect())},domSymbol=Symbol("watermark-dom");function useWatermark(e=vue.ref(document.body)){const t=useRafThrottle(function(){const h=vue.unref(e);if(!h)return;const{clientHeight:v,clientWidth:y}=h;c({height:v,width:y})}),r=domSymbol.toString(),n=vue.shallowRef(),o=()=>{const h=vue.unref(n);n.value=void 0;const v=vue.unref(e);!v||(h&&v.removeChild(h),removeResizeListener(v,t))};function s(h,v){var E,R;const y=document.createElement("canvas"),S=260,D=180;Object.assign(y,{width:S,height:D});const l=y.getContext("2d");return l&&(l.rotate(-20*Math.PI/120),l.font=(E=v==null?void 0:v.font)!=null?E:"15px Reggae One",l.fillStyle=(R=v==null?void 0:v.fillStyle)!=null?R:"rgba(180, 180, 180, 0.75)",l.textAlign="left",l.textBaseline="middle",l.fillText(h,S/20,D)),y.toDataURL("image/png")}function c(h={}){const v=vue.unref(n);!v||(xeUtils.isUndefined(h.width)||(v.style.width=`${h.width}px`),xeUtils.isUndefined(h.height)||(v.style.height=`${h.height}px`),xeUtils.isUndefined(h.str)||(v.style.background=`url(${s(h.str,h.attr)}) left top repeat`))}const p=(h,v)=>{if(vue.unref(n))return c({str:h,attr:v}),r;const y=document.createElement("div");n.value=y,y.id=r,y.style.pointerEvents="none",y.style.top="0px",y.style.left="0px",y.style.position="absolute",y.style.zIndex="100000";const S=vue.unref(e);if(!S)return r;const{clientHeight:D,clientWidth:l}=S;return c({str:h,width:l,height:D,attr:v}),S.appendChild(y),r};function d(h,v){p(h,v),addResizeListener(document.documentElement,t),vue.getCurrentInstance()&&vue.onBeforeUnmount(()=>{o()})}return{setWatermark:d,clear:o}}const DEFAULT_EXCLUDE_KEYS=["class","style"],LISTENER_PREFIX=/^on[A-Z]/;function entries(e){return Object.keys(e).map(t=>[t,e[t]])}function useAttrs(e={}){const t=vue.getCurrentInstance();if(!t)return{};const{excludeListeners:r=!1,excludeKeys:n=[]}=e,o=vue.shallowRef({}),s=n.concat(DEFAULT_EXCLUDE_KEYS);return t.attrs=vue.reactive(t.attrs),vue.watchEffect(()=>{const c=entries(t.attrs).reduce((p,[d,h])=>(!s.includes(d)&&!(r&&LISTENER_PREFIX.test(d))&&(p[d]=h),p),{});o.value=c}),o}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var localforage$1={exports:{}};/*!
|
|
1
|
+
(function($,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("dayjs"),require("xe-utils"),require("vxe-table")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","xe-utils","vxe-table"],e):($=typeof globalThis<"u"?globalThis:$||self,e($["@utogether/utils"]={},$.vue,$.dayjs,$.xeUtils,$.VXETable))})(this,function(exports,vue,dayjs,xeUtils,VXETable){"use strict";var kt=Object.defineProperty;var Bt=($,e,t)=>e in $?kt($,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):$[e]=t;var G=($,e,t)=>(Bt($,typeof e!="symbol"?e+"":e,t),t);function _isSlot(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!vue.isVNode(e)}const VxetableRender=(VXETable,{serviceApi,dict,i18n})=>{VXETable.renderer.add("#SuSelect",{renderEdit(e,t){let r;const{row:n,column:o}=t,{options:s,props:c,optionProps:u={},events:d}=e,{label:p="label",value:v="value",extLabel:y}=u,{code:_,url:N,fetchField:f,extParam:E={},loading:C=!1,multiple:D,defaultValue:L}=c;L&&Object.keys(L).forEach(P=>{n[P]=n[P]||L[P]}),D&&n[o.field]&&!xeUtils.isArray(n[o.field])&&n[o.field].split(",").forEach(w=>{!s.some(k=>k[p]===w)&&s.push({[v]:w,[p]:w})});async function B(w){const P=Object.assign({},{pageSize:20,pageNum:1},E,{[f||p]:w});let k;try{s.length=0,c.loading=!0,N?k=await serviceApi.get(N,P):k=await serviceApi(_,P),k&&(k.list?s.push(...k.list):s.push(...k))}finally{c.loading=!1}}function F(w){const{fieldMap:P={}}=c;let k;if(D&&w.length)w.forEach(j=>{k=s.find(q=>j===q[v]);const V=Object.keys(P);if(V.length){const q=Object.values(P);V.forEach((K,J)=>{const Z=n[K]?n[K].toString():"";n[K]=Z&&!Z.includes(k[q[J]])?`${Z},${k[q[J]]}`:k[q[J]]})}});else if(w.length){k=s.find(V=>w===V[v]);const j=Object.keys(P);if(j.length){const V=Object.values(P);j.forEach((q,K)=>{n[q]=k[V[K]]})}}d!=null&&d.change&&d.change(t,w,k,o.field)}function b(w){d!=null&&d.input&&d.input(t,w)}function S(){d!=null&&d.clear&&d.clear({row:n,field:o.field})}function R(){!s.length&&B(""),d!=null&&d.focus&&d.focus(t,o.field)}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o.field],"onUpdate:modelValue":w=>n[o.field]=w},c,{filterable:!0,remote:!0,clearable:!0,size:"small",placeholder:"请录入关键字搜索",style:"width: 100%","remote-method":B,loading:C,onFocus:()=>R(),onChange:w=>F(w),onClear:()=>S(),onInput:w=>b(w)}),_isSlot(r=s.map(w=>vue.createVNode(vue.resolveComponent("el-option"),{key:w[v],label:w[p],value:w[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[w[y]?`${w[v]}-${w[y]}`:w[v]]),v!==p&&!w[y]?vue.createVNode("span",{class:"su-coSelect-option"},[w[p]]):null]})))?r:{default:()=>[r]})]},renderCell(renderOpts,params){const{row,column}=params,{props}=renderOpts,{textValue,multiple}=props;let val=row[column.field];return textValue&&(val=eval(`row.${textValue}`)||row[column.field]),val&&multiple&&xeUtils.isArray(val)&&(val=val&&val.join(",")),[vue.createVNode("span",null,[val])]},renderItemContent(e,t){let r;const{data:n,property:o}=t,{options:s,props:c,optionProps:u={},events:d}=e,{label:p="label",value:v="value",extLabel:y}=u,{code:_,url:N,fetchField:f,extParam:E={},loading:C=!1}=c;async function D(S){const R=Object.assign({},{pageSize:20,pageNum:1},E,{[f]:S});let w;try{s.length=0,c.loading=!0,N?w=await serviceApi.get(N,R):w=await serviceApi(_,R),w!=null&&w.list?s.push(...w.list):w&&s.push(...w)}finally{c.loading=!1}}function L(S){const{multiple:R,fieldMap:w={}}=c;let P;if(R&&S.length)S.forEach(k=>{P=s.find(V=>k===V[v]);const j=Object.keys(w);if(j.length){const V=Object.values(w);j.forEach((q,K)=>{const J=n[q]?n[q].toString():"";n[q]=J&&!J.includes(P[V[K]])?`${J},${P[V[K]]}`:P[V[K]]})}});else if(S.length){P=s.find(j=>S===j[v]);const k=Object.keys(w);if(k.length){const j=Object.values(w);k.forEach((V,q)=>{n[V]=P[j[q]]})}}d!=null&&d.change&&d.change(S,P,n,o)}function B(S){d!=null&&d.input&&d.input(t,S)}function F(){d!=null&&d.clear&&d.clear({data:n,field:o})}function b(){!s.length&&D(""),d!=null&&d.focus&&d.focus(t)}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o],"onUpdate:modelValue":S=>n[o]=S},c,{filterable:!0,remote:!0,clearable:!0,size:"small",style:"width: 100%",placeholder:"请录入关键字搜索","remote-method":D,loading:C,onFocus:()=>b(),onChange:S=>L(S),onClear:()=>F(),onInput:()=>B()}),_isSlot(r=s.map(S=>vue.createVNode(vue.resolveComponent("el-option"),{key:S[v],label:S[p],value:S[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[S[y]?`${S[v]}-${S[y]}`:S[v]]),v!==p&&!S[y]?vue.createVNode("span",{class:"su-coSelect-option"},[S[p]]):null]})))?r:{default:()=>[r]})]}}),VXETable.renderer.add("#SuDateRange",{renderItemContent(e,t){const{data:r,field:n}=t,{props:o}=e;o!=null&&o.defaultValue&&!r[n]&&(r[n]=o.defaultValue,o.defaultValue=o.required?o.defaultValue:null);const s=new Date,c=[{text:i18n("message.TODAY",!0),value:()=>[u(1,"day"),s]},{text:i18n("message.YESTERDAY",!0),value:()=>[u(2,"day"),u(2,"day")]},{text:i18n("message.LASTWEEK",!0),value:()=>[u(7,"day"),s]},{text:i18n("message.LASTMONTH",!0),value:()=>[u(1,"month"),s]},{text:i18n("message.THREEMONTH",!0),value:()=>[u(3,"month"),s]},{text:i18n("message.HALFYEAR",!0),value:()=>[u(6,"month"),s]},{text:i18n("message.ANNIVERSARY",!0),value:()=>[u(1,"year"),s]}],u=(d,p)=>dayjs().subtract(d,p).add("1","day").format();return[vue.createVNode(vue.resolveComponent("el-date-picker"),vue.mergeProps({modelValue:r[n],"onUpdate:modelValue":d=>r[n]=d,type:(o==null?void 0:o.type)||"daterange"},o,{shortcuts:c,size:"small",style:"width: 100%","range-separator":i18n("message.to",!0),"start-placeholder":i18n("message.startDate",!0),"end-placeholder":i18n("message.endDate",!0)}),null)]}}),VXETable.renderer.add("#select",{renderEdit(e,t){let r;const{row:n,column:o}=t,{options:s,props:c,optionProps:u={},events:d}=e,{label:p="label",value:v="value",extLabel:y}=u;c.multiple&&n[o.field]&&!xeUtils.isArray(n[o.field])&&n[o.field].split(",").forEach(f=>{!s.some(C=>C[p]===f)&&s.push({[v]:f,[p]:f})});function _(f){const E=f&&s.find(C=>f===C[v]);d!=null&&d.change&&d.change(t,f,E,o.field)}function N(){d!=null&&d.clear&&d.clear({row:n,field:o.field})}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o.field],"onUpdate:modelValue":f=>n[o.field]=f,filterable:!0,clearable:!0},c,{size:"small",style:"width: 100%",onChange:f=>_(f),onClear:()=>N()}),_isSlot(r=s.map(f=>vue.createVNode(vue.resolveComponent("el-option"),{key:f[v],label:f[y]?f[v]:f[p],value:f[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[y&&f[y]?`${f[v]}-${f[y]}`:f[v]]),v!==p&&!f[y]?vue.createVNode("span",{class:"su-coSelect-option"},[f[p]]):null]})))?r:{default:()=>[r]})]},renderCell(renderOpts,params){const{row,column}=params,{props,options,optionProps}=renderOpts,{label="label",value="value",extLabel}=optionProps,{textValue}=props;let val=row[column.field];const item=options.find(e=>e[value]===val);return textValue&&(val=eval(`row.${textValue}`)||row[column.field]),item&&(val=extLabel?item[value]:item[label]),val&&(props!=null&&props.multiple)&&xeUtils.isArray(val)&&(val=val&&val.join(",")),[vue.createVNode("span",null,[val])]},renderItemContent(e,t){let r;const{data:n,property:o}=t,{options:s,props:c,optionProps:u={},events:d}=e,{label:p="label",value:v="value"}=u,{defaultValues:y}=c;y&&(n[o]=y);function _(f){const{fieldMap:E={}}=c,C=s.find(B=>f===B[v]),D=Object.keys(E);if(D.length){const B=Object.values(E);D.forEach((F,b)=>{n[F]=f?C[B[b]]:null})}const L={item:C,row:n,property:o};d!=null&&d.change&&d.change(L)}function N(){d!=null&&d.clear&&d.clear({data:n,field:o})}return[vue.createVNode(vue.resolveComponent("el-select"),vue.mergeProps({modelValue:n[o],"onUpdate:modelValue":f=>n[o]=f},c,{filterable:!0,clearable:!0,size:"small",style:"width: 100%",onChange:f=>_(f),onClear:()=>N()}),_isSlot(r=s.map(f=>vue.createVNode(vue.resolveComponent("el-option"),{key:f[v],label:f[p],value:f[v]},{default:()=>[vue.createVNode("span",{style:"float: left"},[f[p]]),vue.createVNode("span",{class:"su-coSelect-option"},[f[v]])]})))?r:{default:()=>[r]})]}}),VXETable.renderer.add("#lov",{renderItemContent(e,t){const{data:r,property:n}=t,{props:o,events:s}=e,{defaultValues:c,mapField:u}=o;c&&(r[n]=c);function d(v,y){const{mapField:_,field:N,displayName:f,isMulti:E}=o;if(E){if(E){const D={};r[f||N]=v.reduce((L,B)=>{for(const F in _)D[F]=L?D[F]+","+B[_[F]]:B[_[F]];return L=L?L+","+B[f||N]:B[f||N],L},""),Object.assign(r,D)}}else{const D={[f||N]:v[y||f||N]};for(const L in _)D[L]=v[_[L]];Object.assign(r,D)}const C={row:r,property:n,item:v};s!=null&&s.change&&s.change(C)}function p(){if(r[n]=null,!xeUtils.isEmpty(u))for(const v in u)r[v]=null;s!=null&&s.clear&&s.clear({data:r,field:n})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"vxe",onChange:(v,y)=>d(v,y),onClear:()=>p()}),null)]},renderEdit(e,t){const{row:r,column:n}=t,{props:o,events:s}=e;function c(d,p){const{mapField:v,field:y,displayName:_,isMulti:N}=o;if(!N){const f={[_||y]:d[p||_||y]};for(const E in v)f[E]=d[v[E]];Object.assign(r,f)}s!=null&&s.change&&s.change(t,d,r[n.field])}function u(){const{mapField:d,field:p}=o;if(r[n.field]=null,!xeUtils.isEmpty(d))for(const v in d)r[v]=null;s!=null&&s.clear&&s.clear({row:r,field:p})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"ele",onChange:(d,p)=>c(d,p),onClear:()=>u()}),null)]},renderDefault(e,t){const{row:r,column:n}=t,{props:o,events:s}=e;function c(d,p){const{mapField:v,field:y,displayName:_,isMulti:N}=o;if(!N){const f={[_||y]:d[p||_||y]};for(const E in v)f[E]=d[v[E]];Object.assign(r,f)}s!=null&&s.change&&s.change(t,d,r[n.field])}function u(){const{mapField:d,field:p}=o;if(r[n.field]=null,!xeUtils.isEmpty(d))for(const v in d)r[v]=null;s!=null&&s.clear&&s.clear({row:r,field:p})}return[vue.createVNode(vue.resolveComponent("su-lov"),vue.mergeProps({record:r},o,{mode:"ele",onChange:(d,p)=>c(d,p),onClear:()=>u()}),null)]},renderCell(e,t){const{row:r,column:n}=t,o=r[n.field];return[vue.createVNode("span",null,[o])]}}),VXETable.renderer.add("#upload",{renderItemContent(e,t){const{data:r,field:n}=t,{props:o,events:s}=e;function c(){r[property]="",s!=null&&s.clear&&s.clear({data:r,field:property})}return[vue.createVNode(vue.resolveComponent("form-upload"),vue.mergeProps({record:r,field:n},o,{onClear:()=>c()}),null)]}}),VXETable.renderer.add("#tag",{renderDefault(e,t){let r;const{row:n,column:o}=t,{props:{code:s,tagMap:c}}=e;function u(){return n[o.field]?c[n[o.field]]:null}return[n[o.field]?vue.createVNode(vue.resolveComponent("el-tag"),{effect:"dark",type:u()},_isSlot(r=getValue(s,n[o.field]))?r:{default:()=>[r]}):null]}}),VXETable.renderer.add("#switch",{renderDefault(e,t){const{row:r,column:n}=t,{props:{code:o,activeValue:s,inactiveValue:c},events:u}=e;function d(p){const v={row:r,column:n,value:p};u!=null&&u.change&&u.change(v)}return[r[n.field]?vue.createVNode(vue.resolveComponent("el-switch"),vue.mergeProps({modelValue:r[n.field],"onUpdate:modelValue":p=>r[n.field]=p,"inline-prompt":!0,size:"large",style:"--el-switch-on-color: #13ce66; --el-switch-off-color: #E6A23C"},e.props,{"active-text":getValue(o,s),"inactive-text":getValue(o,c),onChange:p=>d(p)}),null):null]}});function getValue(e,t){var r,n,o;return!t||!e||!dict?t:(o=(n=(r=dict[e])==null?void 0:r.children)==null?void 0:n.find(s=>s.dictCode===t))==null?void 0:o.dictName}return VXETable},hasClass=(e,t)=>{var r;return!!((r=e.className)!=null&&r.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))},addClass=(e,t,r)=>{hasClass(e,t)||(e.className+=" "+t),r&&(hasClass(e,r)||(e.className+=" "+r))},removeClass=(e,t,r)=>{var n,o;if(hasClass(e,t)){const s=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=(n=e.className)==null?void 0:n.replace(s," ").trim()}if(r&&hasClass(e,r)){const s=new RegExp("(\\s|^)"+r+"(\\s|$)");e.className=(o=e.className)==null?void 0:o.replace(s," ").trim()}},toggleClass=(e,t,r)=>{const n=r||document.body;let{className:o}=n;o=o==null?void 0:o.replace(t,""),n.className=o&&e?`${o} ${t} `:o};function useRafThrottle(e){let t=!1;return function(...r){t||(t=!0,window.requestAnimationFrame(()=>{e.apply(this,r),t=!1}))}}const openLink=e=>{const t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("target","_blank"),t.setAttribute("rel","noreferrer noopener"),t.setAttribute("id","external"),document.getElementById("external")&&document.body.removeChild(document.getElementById("external")),document.body.appendChild(t),t.click(),t.remove()};var MapShim=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,s){return o[0]===r?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,s=this.__entries__;o<s.length;o++){var c=s[o];r.call(n,c[1],c[0])}},t}()}(),isBrowser=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),requestAnimationFrame$1=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(global$1):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),trailingTimeout=2;function throttle(e,t){var r=!1,n=!1,o=0;function s(){r&&(r=!1,e()),n&&u()}function c(){requestAnimationFrame$1(s)}function u(){var d=Date.now();if(r){if(d-o<trailingTimeout)return;n=!0}else r=!0,n=!1,setTimeout(c,t);o=d}return u}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!isBrowser||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!isBrowser||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=transitionKeys.some(function(s){return!!~n.indexOf(s)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),defineConfigurable=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},getWindowOf=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(e){return parseFloat(e)||0}function getBordersSize(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var s=e["border-"+o+"-width"];return n+toFloat(s)},0)}function getPaddings(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var s=o[n],c=e["padding-"+s];r[s]=toFloat(c)}return r}function getSVGContentRect(e){var t=e.getBBox();return createRectInit(0,0,t.width,t.height)}function getHTMLElementContentRect(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return emptyRect;var n=getWindowOf(e).getComputedStyle(e),o=getPaddings(n),s=o.left+o.right,c=o.top+o.bottom,u=toFloat(n.width),d=toFloat(n.height);if(n.boxSizing==="border-box"&&(Math.round(u+s)!==t&&(u-=getBordersSize(n,"left","right")+s),Math.round(d+c)!==r&&(d-=getBordersSize(n,"top","bottom")+c)),!isDocumentElement(e)){var p=Math.round(u+s)-t,v=Math.round(d+c)-r;Math.abs(p)!==1&&(u-=p),Math.abs(v)!==1&&(d-=v)}return createRectInit(o.left,o.top,u,d)}var isSVGGraphicsElement=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof getWindowOf(e).SVGGraphicsElement}:function(e){return e instanceof getWindowOf(e).SVGElement&&typeof e.getBBox=="function"}}();function isDocumentElement(e){return e===getWindowOf(e).document.documentElement}function getContentRect(e){return isBrowser?isSVGGraphicsElement(e)?getSVGContentRect(e):getHTMLElementContentRect(e):emptyRect}function createReadOnlyRect(e){var t=e.x,r=e.y,n=e.width,o=e.height,s=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(s.prototype);return defineConfigurable(c,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),c}function createRectInit(e,t,r,n){return{x:e,y:t,width:r,height:n}}var ResizeObservation=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=getContentRect(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),ResizeObserverEntry=function(){function e(t,r){var n=createReadOnlyRect(r);defineConfigurable(this,{target:t,contentRect:n})}return e}(),ResizeObserverSPI=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new MapShim,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new ResizeObservation(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof getWindowOf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new ResizeObserverEntry(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ResizeObserverController.getInstance(),n=new ResizeObserverSPI(t,r,this);observers.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ResizeObserver.prototype[e]=function(){var t;return(t=observers.get(this))[e].apply(t,arguments)}});var index=function(){return typeof global$1.ResizeObserver<"u"?global$1.ResizeObserver:ResizeObserver}();const isServer=typeof window>"u",resizeHandler=e=>{for(const t of e){const r=t.target.__resizeListeners__||[];r.length&&r.forEach(n=>{n()})}},addResizeListener=(e,t)=>{isServer||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new index(resizeHandler),e.__ro__.observe(e)),e.__resizeListeners__.push(t))},removeResizeListener=(e,t)=>{!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||e.__ro__.disconnect())},domSymbol=Symbol("watermark-dom");function useWatermark(e=vue.ref(document.body)){const t=useRafThrottle(function(){const p=vue.unref(e);if(!p)return;const{clientHeight:v,clientWidth:y}=p;c({height:v,width:y})}),r=domSymbol.toString(),n=vue.shallowRef(),o=()=>{const p=vue.unref(n);n.value=void 0;const v=vue.unref(e);v&&(p&&v.removeChild(p),removeResizeListener(v,t))};function s(p,v){const y=document.createElement("canvas"),_=260,N=180;Object.assign(y,{width:_,height:N});const f=y.getContext("2d");return f&&(f.rotate(-20*Math.PI/120),f.font=(v==null?void 0:v.font)??"15px Reggae One",f.fillStyle=(v==null?void 0:v.fillStyle)??"rgba(180, 180, 180, 0.75)",f.textAlign="left",f.textBaseline="middle",f.fillText(p,_/20,N)),y.toDataURL("image/png")}function c(p={}){const v=vue.unref(n);v&&(xeUtils.isUndefined(p.width)||(v.style.width=`${p.width}px`),xeUtils.isUndefined(p.height)||(v.style.height=`${p.height}px`),xeUtils.isUndefined(p.str)||(v.style.background=`url(${s(p.str,p.attr)}) left top repeat`))}const u=(p,v)=>{if(vue.unref(n))return c({str:p,attr:v}),r;const y=document.createElement("div");n.value=y,y.id=r,y.style.pointerEvents="none",y.style.top="0px",y.style.left="0px",y.style.position="absolute",y.style.zIndex="100000";const _=vue.unref(e);if(!_)return r;const{clientHeight:N,clientWidth:f}=_;return c({str:p,width:f,height:N,attr:v}),_.appendChild(y),r};function d(p,v){u(p,v),addResizeListener(document.documentElement,t),vue.getCurrentInstance()&&vue.onBeforeUnmount(()=>{o()})}return{setWatermark:d,clear:o}}const DEFAULT_EXCLUDE_KEYS=["class","style"],LISTENER_PREFIX=/^on[A-Z]/;function entries(e){return Object.keys(e).map(t=>[t,e[t]])}function useAttrs(e={}){const t=vue.getCurrentInstance();if(!t)return{};const{excludeListeners:r=!1,excludeKeys:n=[]}=e,o=vue.shallowRef({}),s=n.concat(DEFAULT_EXCLUDE_KEYS);return t.attrs=vue.reactive(t.attrs),vue.watchEffect(()=>{const c=entries(t.attrs).reduce((u,[d,p])=>(!s.includes(d)&&!(r&&LISTENER_PREFIX.test(d))&&(u[d]=p),u),{});o.value=c}),o}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var localforageExports={},localforage={get exports(){return localforageExports},set exports(e){localforageExports=e}};/*!
|
|
2
2
|
localForage -- Offline Storage, Improved
|
|
3
3
|
Version 1.10.0
|
|
4
4
|
https://localforage.github.io/localForage
|
|
5
5
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
6
|
-
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,o,s){function c(h,v){if(!o[h]){if(!n[h]){var y=typeof commonjsRequire=="function"&&commonjsRequire;if(!v&&y)return y(h,!0);if(p)return p(h,!0);var S=new Error("Cannot find module '"+h+"'");throw S.code="MODULE_NOT_FOUND",S}var D=o[h]={exports:{}};n[h][0].call(D.exports,function(l){var E=n[h][1][l];return c(E||l)},D,D.exports,r,n,o,s)}return o[h].exports}for(var p=typeof commonjsRequire=="function"&&commonjsRequire,d=0;d<s.length;d++)c(s[d]);return c}({1:[function(r,n,o){(function(s){var c=s.MutationObserver||s.WebKitMutationObserver,p;if(c){var d=0,h=new c(l),v=s.document.createTextNode("");h.observe(v,{characterData:!0}),p=function(){v.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var y=new s.MessageChannel;y.port1.onmessage=l,p=function(){y.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?p=function(){var R=s.document.createElement("script");R.onreadystatechange=function(){l(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},s.document.documentElement.appendChild(R)}:p=function(){setTimeout(l,0)};var S,D=[];function l(){S=!0;for(var R,I,F=D.length;F;){for(I=D,D=[],R=-1;++R<F;)I[R]();F=D.length}S=!1}n.exports=E;function E(R){D.push(R)===1&&!S&&p()}}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,n,o){var s=r(1);function c(){}var p={},d=["REJECTED"],h=["FULFILLED"],v=["PENDING"];n.exports=y;function y(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,f!==c&&E(this,f)}y.prototype.catch=function(f){return this.then(null,f)},y.prototype.then=function(f,x){if(typeof f!="function"&&this.state===h||typeof x!="function"&&this.state===d)return this;var C=new this.constructor(c);if(this.state!==v){var w=this.state===h?f:x;D(C,w,this.outcome)}else this.queue.push(new S(C,f,x));return C};function S(f,x,C){this.promise=f,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}S.prototype.callFulfilled=function(f){p.resolve(this.promise,f)},S.prototype.otherCallFulfilled=function(f){D(this.promise,this.onFulfilled,f)},S.prototype.callRejected=function(f){p.reject(this.promise,f)},S.prototype.otherCallRejected=function(f){D(this.promise,this.onRejected,f)};function D(f,x,C){s(function(){var w;try{w=x(C)}catch(P){return p.reject(f,P)}w===f?p.reject(f,new TypeError("Cannot resolve promise with itself")):p.resolve(f,w)})}p.resolve=function(f,x){var C=R(l,x);if(C.status==="error")return p.reject(f,C.value);var w=C.value;if(w)E(f,w);else{f.state=h,f.outcome=x;for(var P=-1,U=f.queue.length;++P<U;)f.queue[P].callFulfilled(x)}return f},p.reject=function(f,x){f.state=d,f.outcome=x;for(var C=-1,w=f.queue.length;++C<w;)f.queue[C].callRejected(x);return f};function l(f){var x=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof x=="function")return function(){x.apply(f,arguments)}}function E(f,x){var C=!1;function w(j){C||(C=!0,p.reject(f,j))}function P(j){C||(C=!0,p.resolve(f,j))}function U(){x(P,w)}var V=R(U);V.status==="error"&&w(V.value)}function R(f,x){var C={};try{C.value=f(x),C.status="success"}catch(w){C.status="error",C.value=w}return C}y.resolve=I;function I(f){return f instanceof this?f:p.resolve(new this(c),f)}y.reject=F;function F(f){var x=new this(c);return p.reject(x,f)}y.all=k;function k(f){var x=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=f.length,w=!1;if(!C)return this.resolve([]);for(var P=new Array(C),U=0,V=-1,j=new this(c);++V<C;)q(f[V],V);return j;function q(K,X){x.resolve(K).then(Z,function(Q){w||(w=!0,p.reject(j,Q))});function Z(Q){P[X]=Q,++U===C&&!w&&(w=!0,p.resolve(j,P))}}}y.race=L;function L(f){var x=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=f.length,w=!1;if(!C)return this.resolve([]);for(var P=-1,U=new this(c);++P<C;)V(f[P]);return U;function V(j){x.resolve(j).then(function(q){w||(w=!0,p.resolve(U,q))},function(q){w||(w=!0,p.reject(U,q))})}}},{1:1}],3:[function(r,n,o){(function(s){typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,n,o){var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function c(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}function p(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=p();function h(){try{if(!d||!d.open)return!1;var i=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),u=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!i||u)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(i,u){i=i||[],u=u||{};try{return new Blob(i,u)}catch(b){if(b.name!=="TypeError")throw b;for(var a=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new a,g=0;g<i.length;g+=1)m.append(i[g]);return m.getBlob(u.type)}}typeof Promise>"u"&&r(3);var y=Promise;function S(i,u){u&&i.then(function(a){u(null,a)},function(a){u(a)})}function D(i,u,a){typeof u=="function"&&i.then(u),typeof a=="function"&&i.catch(a)}function l(i){return typeof i!="string"&&(console.warn(i+" used as a key, but it is not a string."),i=String(i)),i}function E(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",I=void 0,F={},k=Object.prototype.toString,L="readonly",f="readwrite";function x(i){for(var u=i.length,a=new ArrayBuffer(u),m=new Uint8Array(a),g=0;g<u;g++)m[g]=i.charCodeAt(g);return a}function C(i){return new y(function(u){var a=i.transaction(R,f),m=v([""]);a.objectStore(R).put(m,"key"),a.onabort=function(g){g.preventDefault(),g.stopPropagation(),u(!1)},a.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),b=navigator.userAgent.match(/Edge\//);u(b||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function w(i){return typeof I=="boolean"?y.resolve(I):C(i).then(function(u){return I=u,I})}function P(i){var u=F[i.name],a={};a.promise=new y(function(m,g){a.resolve=m,a.reject=g}),u.deferredOperations.push(a),u.dbReady?u.dbReady=u.dbReady.then(function(){return a.promise}):u.dbReady=a.promise}function U(i){var u=F[i.name],a=u.deferredOperations.pop();if(a)return a.resolve(),a.promise}function V(i,u){var a=F[i.name],m=a.deferredOperations.pop();if(m)return m.reject(u),m.promise}function j(i,u){return new y(function(a,m){if(F[i.name]=F[i.name]||ve(),i.db)if(u)P(i),i.db.close();else return a(i.db);var g=[i.name];u&&g.push(i.version);var b=d.open.apply(d,g);u&&(b.onupgradeneeded=function(_){var A=b.result;try{A.createObjectStore(i.storeName),_.oldVersion<=1&&A.createObjectStore(R)}catch(O){if(O.name==="ConstraintError")console.warn('The database "'+i.name+'" has been upgraded from version '+_.oldVersion+" to version "+_.newVersion+', but the storage "'+i.storeName+'" already exists.');else throw O}}),b.onerror=function(_){_.preventDefault(),m(b.error)},b.onsuccess=function(){var _=b.result;_.onversionchange=function(A){A.target.close()},a(_),U(i)}})}function q(i){return j(i,!1)}function K(i){return j(i,!0)}function X(i,u){if(!i.db)return!0;var a=!i.db.objectStoreNames.contains(i.storeName),m=i.version<i.db.version,g=i.version>i.db.version;if(m&&(i.version!==u&&console.warn('The database "'+i.name+`" can't be downgraded from version `+i.db.version+" to version "+i.version+"."),i.version=i.db.version),g||a){if(a){var b=i.db.version+1;b>i.version&&(i.version=b)}return!0}return!1}function Z(i){return new y(function(u,a){var m=new FileReader;m.onerror=a,m.onloadend=function(g){var b=btoa(g.target.result||"");u({__local_forage_encoded_blob:!0,data:b,type:i.type})},m.readAsBinaryString(i)})}function Q(i){var u=x(atob(i.data));return v([u],{type:i.type})}function ne(i){return i&&i.__local_forage_encoded_blob}function ke(i){var u=this,a=u._initReady().then(function(){var m=F[u._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return D(a,i,i),a}function Me(i){P(i);for(var u=F[i.name],a=u.forages,m=0;m<a.length;m++){var g=a[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return i.db=null,q(i).then(function(b){return i.db=b,X(i)?K(i):b}).then(function(b){i.db=u.db=b;for(var _=0;_<a.length;_++)a[_]._dbInfo.db=b}).catch(function(b){throw V(i,b),b})}function ee(i,u,a,m){m===void 0&&(m=1);try{var g=i.db.transaction(i.storeName,u);a(null,g)}catch(b){if(m>0&&(!i.db||b.name==="InvalidStateError"||b.name==="NotFoundError"))return y.resolve().then(function(){if(!i.db||b.name==="NotFoundError"&&!i.db.objectStoreNames.contains(i.storeName)&&i.version<=i.db.version)return i.db&&(i.version=i.db.version+1),K(i)}).then(function(){return Me(i).then(function(){ee(i,u,a,m-1)})}).catch(a);a(b)}}function ve(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ve(i){var u=this,a={db:null};if(i)for(var m in i)a[m]=i[m];var g=F[a.name];g||(g=ve(),F[a.name]=g),g.forages.push(u),u._initReady||(u._initReady=u.ready,u.ready=ke);var b=[];function _(){return y.resolve()}for(var A=0;A<g.forages.length;A++){var O=g.forages[A];O!==u&&b.push(O._initReady().catch(_))}var T=g.forages.slice(0);return y.all(b).then(function(){return a.db=g.db,q(a)}).then(function(N){return a.db=N,X(a,u._defaultConfig.version)?K(a):N}).then(function(N){a.db=g.db=N,u._dbInfo=a;for(var B=0;B<T.length;B++){var M=T[B];M!==u&&(M._dbInfo.db=a.db,M._dbInfo.version=a.version)}})}function je(i,u){var a=this;i=l(i);var m=new y(function(g,b){a.ready().then(function(){ee(a._dbInfo,L,function(_,A){if(_)return b(_);try{var O=A.objectStore(a._dbInfo.storeName),T=O.get(i);T.onsuccess=function(){var N=T.result;N===void 0&&(N=null),ne(N)&&(N=Q(N)),g(N)},T.onerror=function(){b(T.error)}}catch(N){b(N)}})}).catch(b)});return S(m,u),m}function $e(i,u){var a=this,m=new y(function(g,b){a.ready().then(function(){ee(a._dbInfo,L,function(_,A){if(_)return b(_);try{var O=A.objectStore(a._dbInfo.storeName),T=O.openCursor(),N=1;T.onsuccess=function(){var B=T.result;if(B){var M=B.value;ne(M)&&(M=Q(M));var $=i(M,B.key,N++);$!==void 0?g($):B.continue()}else g()},T.onerror=function(){b(T.error)}}catch(B){b(B)}})}).catch(b)});return S(m,u),m}function ze(i,u,a){var m=this;i=l(i);var g=new y(function(b,_){var A;m.ready().then(function(){return A=m._dbInfo,k.call(u)==="[object Blob]"?w(A.db).then(function(O){return O?u:Z(u)}):u}).then(function(O){ee(m._dbInfo,f,function(T,N){if(T)return _(T);try{var B=N.objectStore(m._dbInfo.storeName);O===null&&(O=void 0);var M=B.put(O,i);N.oncomplete=function(){O===void 0&&(O=null),b(O)},N.onabort=N.onerror=function(){var $=M.error?M.error:M.transaction.error;_($)}}catch($){_($)}})}).catch(_)});return S(g,a),g}function He(i,u){var a=this;i=l(i);var m=new y(function(g,b){a.ready().then(function(){ee(a._dbInfo,f,function(_,A){if(_)return b(_);try{var O=A.objectStore(a._dbInfo.storeName),T=O.delete(i);A.oncomplete=function(){g()},A.onerror=function(){b(T.error)},A.onabort=function(){var N=T.error?T.error:T.transaction.error;b(N)}}catch(N){b(N)}})}).catch(b)});return S(m,u),m}function qe(i){var u=this,a=new y(function(m,g){u.ready().then(function(){ee(u._dbInfo,f,function(b,_){if(b)return g(b);try{var A=_.objectStore(u._dbInfo.storeName),O=A.clear();_.oncomplete=function(){m()},_.onabort=_.onerror=function(){var T=O.error?O.error:O.transaction.error;g(T)}}catch(T){g(T)}})}).catch(g)});return S(a,i),a}function We(i){var u=this,a=new y(function(m,g){u.ready().then(function(){ee(u._dbInfo,L,function(b,_){if(b)return g(b);try{var A=_.objectStore(u._dbInfo.storeName),O=A.count();O.onsuccess=function(){m(O.result)},O.onerror=function(){g(O.error)}}catch(T){g(T)}})}).catch(g)});return S(a,i),a}function Ye(i,u){var a=this,m=new y(function(g,b){if(i<0){g(null);return}a.ready().then(function(){ee(a._dbInfo,L,function(_,A){if(_)return b(_);try{var O=A.objectStore(a._dbInfo.storeName),T=!1,N=O.openKeyCursor();N.onsuccess=function(){var B=N.result;if(!B){g(null);return}i===0||T?g(B.key):(T=!0,B.advance(i))},N.onerror=function(){b(N.error)}}catch(B){b(B)}})}).catch(b)});return S(m,u),m}function Ke(i){var u=this,a=new y(function(m,g){u.ready().then(function(){ee(u._dbInfo,L,function(b,_){if(b)return g(b);try{var A=_.objectStore(u._dbInfo.storeName),O=A.openKeyCursor(),T=[];O.onsuccess=function(){var N=O.result;if(!N){m(T);return}T.push(N.key),N.continue()},O.onerror=function(){g(O.error)}}catch(N){g(N)}})}).catch(g)});return S(a,i),a}function Ge(i,u){u=E.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var m=this,g;if(!i.name)g=y.reject("Invalid arguments");else{var b=i.name===a.name&&m._dbInfo.db,_=b?y.resolve(m._dbInfo.db):q(i).then(function(A){var O=F[i.name],T=O.forages;O.db=A;for(var N=0;N<T.length;N++)T[N]._dbInfo.db=A;return A});i.storeName?g=_.then(function(A){if(!!A.objectStoreNames.contains(i.storeName)){var O=A.version+1;P(i);var T=F[i.name],N=T.forages;A.close();for(var B=0;B<N.length;B++){var M=N[B];M._dbInfo.db=null,M._dbInfo.version=O}var $=new y(function(H,Y){var W=d.open(i.name,O);W.onerror=function(J){var se=W.result;se.close(),Y(J)},W.onupgradeneeded=function(){var J=W.result;J.deleteObjectStore(i.storeName)},W.onsuccess=function(){var J=W.result;J.close(),H(J)}});return $.then(function(H){T.db=H;for(var Y=0;Y<N.length;Y++){var W=N[Y];W._dbInfo.db=H,U(W._dbInfo)}}).catch(function(H){throw(V(i,H)||y.resolve()).catch(function(){}),H})}}):g=_.then(function(A){P(i);var O=F[i.name],T=O.forages;A.close();for(var N=0;N<T.length;N++){var B=T[N];B._dbInfo.db=null}var M=new y(function($,H){var Y=d.deleteDatabase(i.name);Y.onerror=function(){var W=Y.result;W&&W.close(),H(Y.error)},Y.onblocked=function(){console.warn('dropInstance blocked for database "'+i.name+'" until all open connections are closed')},Y.onsuccess=function(){var W=Y.result;W&&W.close(),$(W)}});return M.then(function($){O.db=$;for(var H=0;H<T.length;H++){var Y=T[H];U(Y._dbInfo)}}).catch(function($){throw(V(i,$)||y.resolve()).catch(function(){}),$})})}return S(g,u),g}var Xe={_driver:"asyncStorage",_initStorage:Ve,_support:h(),iterate:$e,getItem:je,setItem:ze,removeItem:He,clear:qe,length:We,key:Ye,keys:Ke,dropInstance:Ge};function Je(){return typeof openDatabase=="function"}var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze="~~local_forage_type~",ye=/^~~local_forage_type~([^~]+)~/,ae="__lfsc__:",ue=ae.length,le="arbf",fe="blob",Ee="si08",we="ui08",_e="uic8",xe="si16",Se="si32",Ce="ur16",Ae="ui32",Re="fl32",Oe="fl64",Te=ue+le.length,De=Object.prototype.toString;function Ne(i){var u=i.length*.75,a=i.length,m,g=0,b,_,A,O;i[i.length-1]==="="&&(u--,i[i.length-2]==="="&&u--);var T=new ArrayBuffer(u),N=new Uint8Array(T);for(m=0;m<a;m+=4)b=te.indexOf(i[m]),_=te.indexOf(i[m+1]),A=te.indexOf(i[m+2]),O=te.indexOf(i[m+3]),N[g++]=b<<2|_>>4,N[g++]=(_&15)<<4|A>>2,N[g++]=(A&3)<<6|O&63;return T}function de(i){var u=new Uint8Array(i),a="",m;for(m=0;m<u.length;m+=3)a+=te[u[m]>>2],a+=te[(u[m]&3)<<4|u[m+1]>>4],a+=te[(u[m+1]&15)<<2|u[m+2]>>6],a+=te[u[m+2]&63];return u.length%3===2?a=a.substring(0,a.length-1)+"=":u.length%3===1&&(a=a.substring(0,a.length-2)+"=="),a}function Qe(i,u){var a="";if(i&&(a=De.call(i)),i&&(a==="[object ArrayBuffer]"||i.buffer&&De.call(i.buffer)==="[object ArrayBuffer]")){var m,g=ae;i instanceof ArrayBuffer?(m=i,g+=le):(m=i.buffer,a==="[object Int8Array]"?g+=Ee:a==="[object Uint8Array]"?g+=we:a==="[object Uint8ClampedArray]"?g+=_e:a==="[object Int16Array]"?g+=xe:a==="[object Uint16Array]"?g+=Ce:a==="[object Int32Array]"?g+=Se:a==="[object Uint32Array]"?g+=Ae:a==="[object Float32Array]"?g+=Re:a==="[object Float64Array]"?g+=Oe:u(new Error("Failed to get type for BinaryArray"))),u(g+de(m))}else if(a==="[object Blob]"){var b=new FileReader;b.onload=function(){var _=Ze+i.type+"~"+de(this.result);u(ae+fe+_)},b.readAsArrayBuffer(i)}else try{u(JSON.stringify(i))}catch(_){console.error("Couldn't convert value into a JSON string: ",i),u(null,_)}}function et(i){if(i.substring(0,ue)!==ae)return JSON.parse(i);var u=i.substring(Te),a=i.substring(ue,Te),m;if(a===fe&&ye.test(u)){var g=u.match(ye);m=g[1],u=u.substring(g[0].length)}var b=Ne(u);switch(a){case le:return b;case fe:return v([b],{type:m});case Ee:return new Int8Array(b);case we:return new Uint8Array(b);case _e:return new Uint8ClampedArray(b);case xe:return new Int16Array(b);case Ce:return new Uint16Array(b);case Se:return new Int32Array(b);case Ae:return new Uint32Array(b);case Re:return new Float32Array(b);case Oe:return new Float64Array(b);default:throw new Error("Unkown type: "+a)}}var be={serialize:Qe,deserialize:et,stringToBuffer:Ne,bufferToString:de};function Ie(i,u,a,m){i.executeSql("CREATE TABLE IF NOT EXISTS "+u.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function tt(i){var u=this,a={db:null};if(i)for(var m in i)a[m]=typeof i[m]!="string"?i[m].toString():i[m];var g=new y(function(b,_){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(A){return _(A)}a.db.transaction(function(A){Ie(A,a,function(){u._dbInfo=a,b()},function(O,T){_(T)})},_)});return a.serializer=be,g}function re(i,u,a,m,g,b){i.executeSql(a,m,g,function(_,A){A.code===A.SYNTAX_ERR?_.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[u.storeName],function(O,T){T.rows.length?b(O,A):Ie(O,u,function(){O.executeSql(a,m,g,b)},b)},b):b(_,A)},b)}function rt(i,u){var a=this;i=l(i);var m=new y(function(g,b){a.ready().then(function(){var _=a._dbInfo;_.db.transaction(function(A){re(A,_,"SELECT * FROM "+_.storeName+" WHERE key = ? LIMIT 1",[i],function(O,T){var N=T.rows.length?T.rows.item(0).value:null;N&&(N=_.serializer.deserialize(N)),g(N)},function(O,T){b(T)})})}).catch(b)});return S(m,u),m}function nt(i,u){var a=this,m=new y(function(g,b){a.ready().then(function(){var _=a._dbInfo;_.db.transaction(function(A){re(A,_,"SELECT * FROM "+_.storeName,[],function(O,T){for(var N=T.rows,B=N.length,M=0;M<B;M++){var $=N.item(M),H=$.value;if(H&&(H=_.serializer.deserialize(H)),H=i(H,$.key,M+1),H!==void 0){g(H);return}}g()},function(O,T){b(T)})})}).catch(b)});return S(m,u),m}function Pe(i,u,a,m){var g=this;i=l(i);var b=new y(function(_,A){g.ready().then(function(){u===void 0&&(u=null);var O=u,T=g._dbInfo;T.serializer.serialize(u,function(N,B){B?A(B):T.db.transaction(function(M){re(M,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[i,N],function(){_(O)},function($,H){A(H)})},function(M){if(M.code===M.QUOTA_ERR){if(m>0){_(Pe.apply(g,[i,O,a,m-1]));return}A(M)}})})}).catch(A)});return S(b,a),b}function ot(i,u,a){return Pe.apply(this,[i,u,a,1])}function it(i,u){var a=this;i=l(i);var m=new y(function(g,b){a.ready().then(function(){var _=a._dbInfo;_.db.transaction(function(A){re(A,_,"DELETE FROM "+_.storeName+" WHERE key = ?",[i],function(){g()},function(O,T){b(T)})})}).catch(b)});return S(m,u),m}function st(i){var u=this,a=new y(function(m,g){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(_){re(_,b,"DELETE FROM "+b.storeName,[],function(){m()},function(A,O){g(O)})})}).catch(g)});return S(a,i),a}function at(i){var u=this,a=new y(function(m,g){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(_){re(_,b,"SELECT COUNT(key) as c FROM "+b.storeName,[],function(A,O){var T=O.rows.item(0).c;m(T)},function(A,O){g(O)})})}).catch(g)});return S(a,i),a}function ct(i,u){var a=this,m=new y(function(g,b){a.ready().then(function(){var _=a._dbInfo;_.db.transaction(function(A){re(A,_,"SELECT key FROM "+_.storeName+" WHERE id = ? LIMIT 1",[i+1],function(O,T){var N=T.rows.length?T.rows.item(0).key:null;g(N)},function(O,T){b(T)})})}).catch(b)});return S(m,u),m}function ut(i){var u=this,a=new y(function(m,g){u.ready().then(function(){var b=u._dbInfo;b.db.transaction(function(_){re(_,b,"SELECT key FROM "+b.storeName,[],function(A,O){for(var T=[],N=0;N<O.rows.length;N++)T.push(O.rows.item(N).key);m(T)},function(A,O){g(O)})})}).catch(g)});return S(a,i),a}function lt(i){return new y(function(u,a){i.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,b){for(var _=[],A=0;A<b.rows.length;A++)_.push(b.rows.item(A).name);u({db:i,storeNames:_})},function(g,b){a(b)})},function(m){a(m)})})}function ft(i,u){u=E.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var m=this,g;return i.name?g=new y(function(b){var _;i.name===a.name?_=m._dbInfo.db:_=openDatabase(i.name,"","",0),i.storeName?b({db:_,storeNames:[i.storeName]}):b(lt(_))}).then(function(b){return new y(function(_,A){b.db.transaction(function(O){function T($){return new y(function(H,Y){O.executeSql("DROP TABLE IF EXISTS "+$,[],function(){H()},function(W,J){Y(J)})})}for(var N=[],B=0,M=b.storeNames.length;B<M;B++)N.push(T(b.storeNames[B]));y.all(N).then(function(){_()}).catch(function($){A($)})},function(O){A(O)})})}):g=y.reject("Invalid arguments"),S(g,u),g}var dt={_driver:"webSQLStorage",_initStorage:tt,_support:Je(),iterate:nt,getItem:rt,setItem:ot,removeItem:it,clear:st,length:at,key:ct,keys:ut,dropInstance:ft};function bt(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Fe(i,u){var a=i.name+"/";return i.storeName!==u.storeName&&(a+=i.storeName+"/"),a}function ht(){var i="_localforage_support_test";try{return localStorage.setItem(i,!0),localStorage.removeItem(i),!1}catch{return!0}}function pt(){return!ht()||localStorage.length>0}function mt(i){var u=this,a={};if(i)for(var m in i)a[m]=i[m];return a.keyPrefix=Fe(i,u._defaultConfig),pt()?(u._dbInfo=a,a.serializer=be,y.resolve()):y.reject()}function gt(i){var u=this,a=u.ready().then(function(){for(var m=u._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var b=localStorage.key(g);b.indexOf(m)===0&&localStorage.removeItem(b)}});return S(a,i),a}function vt(i,u){var a=this;i=l(i);var m=a.ready().then(function(){var g=a._dbInfo,b=localStorage.getItem(g.keyPrefix+i);return b&&(b=g.serializer.deserialize(b)),b});return S(m,u),m}function yt(i,u){var a=this,m=a.ready().then(function(){for(var g=a._dbInfo,b=g.keyPrefix,_=b.length,A=localStorage.length,O=1,T=0;T<A;T++){var N=localStorage.key(T);if(N.indexOf(b)===0){var B=localStorage.getItem(N);if(B&&(B=g.serializer.deserialize(B)),B=i(B,N.substring(_),O++),B!==void 0)return B}}});return S(m,u),m}function Et(i,u){var a=this,m=a.ready().then(function(){var g=a._dbInfo,b;try{b=localStorage.key(i)}catch{b=null}return b&&(b=b.substring(g.keyPrefix.length)),b});return S(m,u),m}function wt(i){var u=this,a=u.ready().then(function(){for(var m=u._dbInfo,g=localStorage.length,b=[],_=0;_<g;_++){var A=localStorage.key(_);A.indexOf(m.keyPrefix)===0&&b.push(A.substring(m.keyPrefix.length))}return b});return S(a,i),a}function _t(i){var u=this,a=u.keys().then(function(m){return m.length});return S(a,i),a}function xt(i,u){var a=this;i=l(i);var m=a.ready().then(function(){var g=a._dbInfo;localStorage.removeItem(g.keyPrefix+i)});return S(m,u),m}function St(i,u,a){var m=this;i=l(i);var g=m.ready().then(function(){u===void 0&&(u=null);var b=u;return new y(function(_,A){var O=m._dbInfo;O.serializer.serialize(u,function(T,N){if(N)A(N);else try{localStorage.setItem(O.keyPrefix+i,T),_(b)}catch(B){(B.name==="QuotaExceededError"||B.name==="NS_ERROR_DOM_QUOTA_REACHED")&&A(B),A(B)}})})});return S(g,a),g}function Ct(i,u){if(u=E.apply(this,arguments),i=typeof i!="function"&&i||{},!i.name){var a=this.config();i.name=i.name||a.name,i.storeName=i.storeName||a.storeName}var m=this,g;return i.name?g=new y(function(b){i.storeName?b(Fe(i,m._defaultConfig)):b(i.name+"/")}).then(function(b){for(var _=localStorage.length-1;_>=0;_--){var A=localStorage.key(_);A.indexOf(b)===0&&localStorage.removeItem(A)}}):g=y.reject("Invalid arguments"),S(g,u),g}var At={_driver:"localStorageWrapper",_initStorage:mt,_support:bt(),iterate:yt,getItem:vt,setItem:St,removeItem:xt,clear:gt,length:_t,key:Et,keys:wt,dropInstance:Ct},Rt=function(u,a){return u===a||typeof u=="number"&&typeof a=="number"&&isNaN(u)&&isNaN(a)},Ot=function(u,a){for(var m=u.length,g=0;g<m;){if(Rt(u[g],a))return!0;g++}return!1},Be=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"},ie={},Le={},oe={INDEXEDDB:Xe,WEBSQL:dt,LOCALSTORAGE:At},Tt=[oe.INDEXEDDB._driver,oe.WEBSQL._driver,oe.LOCALSTORAGE._driver],ce=["dropInstance"],he=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ce),Dt={description:"",driver:Tt.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function Nt(i,u){i[u]=function(){var a=arguments;return i.ready().then(function(){return i[u].apply(i,a)})}}function pe(){for(var i=1;i<arguments.length;i++){var u=arguments[i];if(u)for(var a in u)u.hasOwnProperty(a)&&(Be(u[a])?arguments[0][a]=u[a].slice():arguments[0][a]=u[a])}return arguments[0]}var It=function(){function i(u){c(this,i);for(var a in oe)if(oe.hasOwnProperty(a)){var m=oe[a],g=m._driver;this[a]=g,ie[g]||this.defineDriver(m)}this._defaultConfig=pe({},Dt),this._config=pe({},this._defaultConfig,u),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return i.prototype.config=function(a){if((typeof a>"u"?"undefined":s(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in a){if(m==="storeName"&&(a[m]=a[m].replace(/\W/g,"_")),m==="version"&&typeof a[m]!="number")return new Error("Database version must be a number.");this._config[m]=a[m]}return"driver"in a&&a.driver?this.setDriver(this._config.driver):!0}else return typeof a=="string"?this._config[a]:this._config},i.prototype.defineDriver=function(a,m,g){var b=new y(function(_,A){try{var O=a._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver){A(T);return}for(var N=he.concat("_initStorage"),B=0,M=N.length;B<M;B++){var $=N[B],H=!Ot(ce,$);if((H||a[$])&&typeof a[$]!="function"){A(T);return}}var Y=function(){for(var se=function(Bt){return function(){var Lt=new Error("Method "+Bt+" is not implemented by the current driver"),Ue=y.reject(Lt);return S(Ue,arguments[arguments.length-1]),Ue}},me=0,Ft=ce.length;me<Ft;me++){var ge=ce[me];a[ge]||(a[ge]=se(ge))}};Y();var W=function(se){ie[O]&&console.info("Redefining LocalForage driver: "+O),ie[O]=a,Le[O]=se,_()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(W,A):W(!!a._support):W(!0)}catch(J){A(J)}});return D(b,m,g),b},i.prototype.driver=function(){return this._driver||null},i.prototype.getDriver=function(a,m,g){var b=ie[a]?y.resolve(ie[a]):y.reject(new Error("Driver not found."));return D(b,m,g),b},i.prototype.getSerializer=function(a){var m=y.resolve(be);return D(m,a),m},i.prototype.ready=function(a){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return D(g,a,a),g},i.prototype.setDriver=function(a,m,g){var b=this;Be(a)||(a=[a]);var _=this._getSupportedDrivers(a);function A(){b._config.driver=b.driver()}function O(B){return b._extend(B),A(),b._ready=b._initStorage(b._config),b._ready}function T(B){return function(){var M=0;function $(){for(;M<B.length;){var H=B[M];return M++,b._dbInfo=null,b._ready=null,b.getDriver(H).then(O).catch($)}A();var Y=new Error("No available storage method found.");return b._driverSet=y.reject(Y),b._driverSet}return $()}}var N=this._driverSet!==null?this._driverSet.catch(function(){return y.resolve()}):y.resolve();return this._driverSet=N.then(function(){var B=_[0];return b._dbInfo=null,b._ready=null,b.getDriver(B).then(function(M){b._driver=M._driver,A(),b._wrapLibraryMethodsWithReady(),b._initDriver=T(_)})}).catch(function(){A();var B=new Error("No available storage method found.");return b._driverSet=y.reject(B),b._driverSet}),D(this._driverSet,m,g),this._driverSet},i.prototype.supports=function(a){return!!Le[a]},i.prototype._extend=function(a){pe(this,a)},i.prototype._getSupportedDrivers=function(a){for(var m=[],g=0,b=a.length;g<b;g++){var _=a[g];this.supports(_)&&m.push(_)}return m},i.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,m=he.length;a<m;a++)Nt(this,he[a])},i.prototype.createInstance=function(a){return new i(a)},i}(),Pt=new It;n.exports=Pt},{3:3}]},{},[4])(4)})})(localforage$1);const localforage=localforage$1.exports;class sessionStorageProxy{constructor(t){G(this,"storage");G(this,"prefix");G(this,"addPrefix",t=>{this.prefix=t});this.storage=t}setItem(t,r){this.storage.setItem(this.getKey(t),JSON.stringify(r))}getItem(t){return JSON.parse(this.storage.getItem(this.getKey(t)))}removeItem(t){this.storage.removeItem(this.getKey(t))}getKey(t){return this.prefix?this.prefix+"_"+t:t}clear(){this.storage.clear()}}class localStorageProxy extends sessionStorageProxy{constructor(t){super(t)}}class localforageProxy{constructor(){G(this,"storage");localforage.config({name:"uapp",storeName:"udb"}),this.storage=localforage}setItem(t,r){this.storage.setItem(t,r)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}const storageSession=new sessionStorageProxy(sessionStorage),storageLocal=new localStorageProxy(localStorage),dbstorage=new localforageProxy,useRender=()=>{const e={value:"dictCode",label:"dictName"},t=(f,x)=>{var q;const C=k(x);let w={clearable:!0,disabled:!1},P,U;xeUtils.isObject(f)?(w=Object.assign(w,f),P=f.defaultValue,U=f==null?void 0:f.code):U=f;const V=(q=storageLocal.getItem("kLov")[U])==null?void 0:q.children,j=V?V.filter(K=>K.enabled==="1"):[];return{name:"#select",optionProps:e,options:j,props:w,defaultValue:P,events:C}},r=(f,x)=>{const C=k(x);return{name:"#SuSelect",optionProps:f.optionProps,props:f.props,options:f.options||[],events:C}},n=(f,x)=>{const C={optionProps:{extLabel:"userName",value:"employeeName"},props:{attrs:{disabled:f==null?void 0:f.disabled},disabled:f==null?void 0:f.disabled,defaultValue:f==null?void 0:f.defaultValue,fieldMap:f==null?void 0:f.fieldMap,code:"SYS037",url:"/uums/employee/listEmployeeIsUser",fetchField:"employeeName"}};return r(C,x)},o=f=>{const x={optionProps:{extLabel:"userName",value:"name"},props:{code:"sys/listUsers",url:"/uums/user",fetchField:"name",fieldMap:f==null?void 0:f.fieldMap}};return r(x)},s=(f,x)=>{const C={label:"organizationName",value:(f==null?void 0:f.field)||"organizationName"},w={fieldMap:{},extParam:f==null?void 0:f.extParam,url:"/uums/cusOrganization",fetchField:"organizationName"},P={organizationId:"id",organizationCode:"organizationCode"};return Object.assign(w.fieldMap,P,(f==null?void 0:f.fieldMap)||{}),{name:"#SuSelect",props:w,optionProps:C,options:[],methods:x}},c=(f,x)=>{const C={label:"orgName",value:(f==null?void 0:f.field)||"orgName"},w={fieldMap:{},extParam:f==null?void 0:f.extParam,url:"/uums/org",fetchField:"orgName"},P={orgId:"id",orgCode:"orgCode"};return Object.assign(w.fieldMap,P,(f==null?void 0:f.fieldMap)||{}),{name:"#SuSelect",props:w,optionProps:C,options:[],methods:x}},p=(f,x)=>{const C=Object.assign({disabled:!1},f),w=C==null?void 0:C.defaultValue;return{name:"$input",props:C,defaultValue:w,events:k(x)}},d=(f,x)=>{const C=Object.assign({disabled:!1,rows:3},f),w=C==null?void 0:C.defaultValue;return{name:"$textarea",props:C,defaultValue:w,events:k(x)}},h=(f,x)=>{const C="$checkbox",{defaultValue:w,options:P,props:U}=y(f);return{name:C,defaultValue:w,options:P,props:U,events:k(x)}},v=(f,x)=>{const C="$radio",{defaultValue:w,options:P,props:U}=y(f);return{name:C,defaultValue:w,options:P,props:U,events:k(x)}},y=f=>{var V;let x={disabled:!1},C;const w=storageLocal.getItem("kLov");let P="";xeUtils.isObject(f)?(C=f.defaultValue,P=f.code,x=Object.assign(x,f||{})):xeUtils.isString(f)&&(P=f);const U=P?(V=w[P])==null?void 0:V.children.map(j=>({label:j.dictName,value:j.dictCode})):[];return{props:x,defaultValue:C,options:U}},S=(f,x)=>{const C=k(x),w=Object.assign({type:"number",clearable:!0,min:0,controls:!1},f||{});return{name:"$input",props:w,events:C}},D=(f,x)=>{const C=k(x),w="yyyy-MM-dd HH:mm:ss",P=f==null?void 0:f.defaultValue,V=Object.assign({type:"date",valueFormat:w,clearable:!0},f||{});return{name:"$input",props:V,defaultValue:P,events:C}},l=(f,x)=>{const C=k(x),w=Object.assign({},f||{});return{name:"#lov",props:w,events:C}},E=(f,x)=>{const C=k(x),w=(f==null?void 0:f.optionProps)||{},P=Object.assign({clearable:!0,disabled:!1},f||{});return{name:"#select",optionProps:w,options:(f==null?void 0:f.options)||[],props:P,events:C}},R=(f,x)=>{let C={openLabel:"\u662F",closeLabel:"\u5426",openValue:"Y",closeValue:"N"},w="Y";xeUtils.isObject(f)&&!xeUtils.isFunction(f)?(C=Object.assign(C,f||{}),w=f.defaultValue||w):!xeUtils.isEmpty(f)&&xeUtils.isString(f)&&(w=f,C=Object.assign(C,{defaultValue:w}));const P=xeUtils.isFunction(f)?k(f):k(x);return{name:"$switch",props:C,defaultValue:w,events:P}},I=(f,x)=>({name:"#tag",props:{code:f,tagMap:x}}),F=(f,x)=>{const C={openLabel:"\u542F\u7528",closeLabel:"\u7981\u7528",openValue:"1",closeValue:"0",defaultValue:"1"};!xeUtils.isFunction(f)&&xeUtils.isObject(f)&&Object.assign(C,f);const w=xeUtils.isFunction(f)?f:x;return R(C,w)},k=f=>{let x={};return xeUtils.isObject(f)&&!xeUtils.isFunction(f)?x={change:(f==null?void 0:f.onChange)||L,blur:(f==null?void 0:f.onBlur)||L,focus:(f==null?void 0:f.onFocus)||L,input:(f==null?void 0:f.onInput)||L}:f&&(x={change:f}),x};function L(){}return{renderDict:t,renderSelect:r,renderInput:p,renderTextarea:d,renderCheckBox:h,renderRadio:v,renderUser:n,renderSysUser:o,renderInvOrg:s,renderBU:c,renderNumber:S,renderLov:l,renderSelectLocal:E,renderDate:D,renderSwitch:R,renderCellTag:I,renderEnabled:F}},useGlobal=()=>{const e=vue.getCurrentInstance();if(!e)return{$global:{},$storage:{},$config:{}};const t=e.appContext.app.config.globalProperties,r=t.$storage,n=t.$config,o=t.$serviceApi,s=t.$hasAuthority,c=t.$printPlugin;return{$global:t,$storage:r,$config:n,$serviceApi:o,$hasAuthority:s,$printPlugin:c}},hexList=[];for(let e=0;e<=15;e++)hexList[e]=e.toString(16);function buildUUID(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=hexList[Math.random()*4|8]:e+=hexList[Math.random()*16|0];return e.replace(/-/g,"")}let unique=0;function buildShortUUID(e=""){const t=Date.now(),r=Math.floor(Math.random()*1e9);return unique++,e+"_"+r+unique+String(t)}const deviceDetection=()=>{const e=navigator.userAgent.toLowerCase(),t=e.match(/iphone os/i)==="iphone os",r=e.match(/midp/i)==="midp",n=e.match(/rv:1.2.3.4/i)==="rv:1.2.3.4",o=e.match(/ucweb/i)==="ucweb",s=e.match(/android/i)==="android",c=e.match(/windows ce/i)==="windows ce",p=e.match(/windows mobile/i)==="windows mobile";return t||r||n||o||s||c||p},getBrowserInfo=()=>{const e=navigator.userAgent.toLowerCase(),t=/(msie|firefox|chrome|opera|version).*?([\d.]+)/,r=e.match(t);return{browser:r[1].replace(/version/,"'safari"),version:r[2]}},showMessage=(e,t="message",r={})=>{var n,o;return t==="alert"?(n=VXETable__default.default.modal)==null?void 0:n.alert({content:e,...r}):(o=VXETable__default.default.modal)==null?void 0:o.message({content:e,...r})},successMessage=(e="\u64CD\u4F5C\u6210\u529F",t={})=>{var r;return(r=VXETable__default.default.modal)==null?void 0:r.message({content:e,...t,status:"success"})},warnMessage=(e,t={})=>{var r,n;return t.type==="alert"?(r=VXETable__default.default.modal)==null?void 0:r.alert({content:e,...t,status:"warning"}):(n=VXETable__default.default.modal)==null?void 0:n.message({content:e,duration:5e3,...t,status:"warning"})},errorMessage=(e="\u64CD\u4F5C\u5931\u8D25",t={})=>{var r,n;return t.type==="alert"?(r=VXETable__default.default.modal)==null?void 0:r.alert({content:e,...t,status:"error"}):(n=VXETable__default.default.modal)==null?void 0:n.message({content:e,...t,status:"error"})},renderHook=useRender(),i18nColums=e=>e.filter(t=>!t.isHidden).map(t=>(t.type||(t.title=t.title||`message.${t.field}`,t.field!=="operate"&&(t.width>99||t.minWidth)&&(t.showOverflow="tooltip")),t)),formatItems=(e,t,r=24)=>e.length?e.filter(n=>!n.isHidden).map(n=>{var c,p;n.title=n.title||`message.${n.field}`,n.span=n.span||r;const o=n.disabled||((p=(c=n.itemRender)==null?void 0:c.props)==null?void 0:p.disabled)||t==="detail";let s={name:"$input",props:{disabled:o}};return n.code&&!n.itemRender&&(s=renderHook.renderDict(n.code)),n.itemRender=n.itemRender||s,Object.assign(n.itemRender.props||{},{disabled:o}),n}):e,searchBtn={span:6,align:"right",collapseNode:!1,itemRender:{name:"$buttons",children:[{props:{type:"submit",content:"message.SEARCH",status:"primary",icon:"ri-search-line"}},{props:{type:"reset",content:"message.RESET",status:"info",icon:"ri-refresh-line"}}]}},formatGridItems=e=>{const t=e.filter(c=>!c.isHidden),r=t.length,n=r>2&&t.some((c,p)=>p<3&&(c.span>6||getDateRange(c))),o=n||r>3,s=t.map((c,p)=>(c.folding=n?o&&p>1:o&&p>2,c.span=getDateRange(c)?12:c.span||6,c.code&&!c.itemRender&&(c.itemRender=renderHook.renderDict(c.code)),c.itemRender=c.itemRender||{name:"$input"},c.resetValue=c.itemRender.defaultValue,c.title=c.title||`message.${c.field}`,c));if(searchBtn.collapseNode=o,o){const c=n?2:3;s.splice(c,0,searchBtn)}else s.push(searchBtn);return s},getDateRange=e=>{var t,r,n,o,s;return((t=e.itemRender)==null?void 0:t.name)==="#SuDateRange"?((n=(r=e.itemRender)==null?void 0:r.props)==null?void 0:n.type)==="daterange"||!((s=(o=e.itemRender)==null?void 0:o.props)!=null&&s.type):!1},formatRules=(e,t)=>{const r={};return e.forEach(n=>{if(n.required){const{field:o,title:s}=n;r[o]=[{required:!0,message:`${t("message.required")}${t(s||`message.${o}`)}`}]}}),r},expandedPaths=[];function extractPathList(e){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const t of e)t.children&&t.children.length>0&&extractPathList(t.children),expandedPaths.push(t.uniqueId);return expandedPaths}}function deleteTreeChildren(e,t=[]){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const[r,n]of e.entries())n.children&&n.children.length===1&&delete n.children,n.id=r,n.parentId=t.length?t[t.length-1]:null,n.pathList=[...t,n.id],n.uniqueId=n.pathList.length>1?n.pathList.join("-"):n.pathList[0],n.children&&n.children.length>0&&deleteTreeChildren(n.children,n.pathList);return e}}function buildHierarchyTree(e,t=[]){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const[r,n]of e.entries())n.id=r,n.parentId=t.length?t[t.length-1]:null,n.pathList=[...t,n.id],n.children&&n.children.length>0&&buildHierarchyTree(n.children,n.pathList);return e}}function getNodeByUniqueId(e,t){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!e||e.length===0)return;const r=e.find(o=>o.uniqueId===t);if(r)return r;const n=e.filter(o=>o.children).map(o=>o.children).flat(1);return getNodeByUniqueId(n,t)}function appendFieldByUniqueId(e,t,r){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!e||e.length===0)return{};for(const n of e){const o=n.children&&n.children.length>0;n.uniqueId===t&&Object.prototype.toString.call(r)==="[object Object]"&&Object.assign(n,r),o&&appendFieldByUniqueId(n.children,t,r)}return e}/*! typescript-cookie v1.0.4 | MIT */const encodeName=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),encodeValue=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),decodeName=decodeURIComponent,decodeValue=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function stringifyAttributes(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,r])=>r!=null&&r!==!1).map(([t,r])=>r===!0?`; ${t}`:`; ${t}=${r.split(";")[0]}`).join("")}function get(e,t,r){const n=/(?:^|; )([^=]*)=([^;]*)/g,o={};let s;for(;(s=n.exec(document.cookie))!=null;)try{const c=r(s[1]);if(o[c]=t(s[2],c),e===c)break}catch{}return e!=null?o[e]:o}const DEFAULT_CODEC=Object.freeze({decodeName,decodeValue,encodeName,encodeValue}),DEFAULT_ATTRIBUTES=Object.freeze({path:"/"});function setCookie(e,t,r=DEFAULT_ATTRIBUTES,{encodeValue:n=encodeValue,encodeName:o=encodeName}={}){return document.cookie=`${o(e)}=${n(t,e)}${stringifyAttributes(r)}`}function getCookie(e,{decodeValue:t=decodeValue,decodeName:r=decodeName}={}){return get(e,t,r)}function getCookies({decodeValue:e=decodeValue,decodeName:t=decodeName}={}){return get(void 0,e,t)}function removeCookie(e,t=DEFAULT_ATTRIBUTES){setCookie(e,"",Object.assign({},t,{expires:-1}))}function init(e,t){const r={set:function(o,s,c){return setCookie(o,s,Object.assign({},this.attributes,c),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return getCookies(this.converter.read);if(o!=null)return getCookie(o,this.converter.read)},remove:function(o,s){removeCookie(o,Object.assign({},this.attributes,s))},withAttributes:function(o){return init(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return init(Object.assign({},this.converter,o),this.attributes)}},n={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(r,n)}init({read:DEFAULT_CODEC.decodeValue,write:DEFAULT_CODEC.encodeValue},DEFAULT_ATTRIBUTES);class Cookies{constructor(){G(this,"prefix",null);G(this,"addPrefix",t=>{this.prefix=t})}set(t="default",r=""){setCookie(`${this.getKey(t)}`,r)}get(t="default"){return getCookie(`${this.getKey(t)}`)}getAll(){return getCookie("")}remove(t="default"){removeCookie(`${this.getKey(t)}`)}getKey(t){return this.prefix?this.prefix+"_"+t:t}}const cookies$1=new Cookies;function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,kindOf=(e=>t=>{const r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||toString.call(e)===t||isFunction(e.toString)&&e.toString()===t)},isURLSearchParams=kindOfTest("URLSearchParams"),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),c=s.length;let p;for(n=0;n<c;n++)p=s[n],t.call(null,e[p],p,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(n,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(n)?t[s]=merge(t[s],n):isPlainObject(n)?t[s]=merge({},n):isArray(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&forEach(arguments[n],r);return t}const extend=(e,t,r,{allOwnKeys:n}={})=>(forEach(t,(o,s)=>{r&&isFunction(o)?e[s]=bind(o,r):e[s]=o},{allOwnKeys:n}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,n)=>{let o,s,c;const p={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)c=o[s],(!n||n(c,e,t))&&!p[c]&&(t[c]=e[c],p[c]=!0);e=r!==!1&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(o,s)=>{t(o,s,e)!==!1&&(n[s]=o)}),Object.defineProperties(e,n)},freezeMethods=e=>{reduceDescriptors(e,(t,r)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(!!isFunction(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return isArray(e)?n(e):n(String(e).split(t)),r},noop=()=>{},toFiniteNumber=(e,t)=>(e=+e,Number.isFinite(e)?e:t),toJSONObject=e=>{const t=new Array(10),r=(n,o)=>{if(isObject(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const s=isArray(n)?[]:{};return forEach(n,(c,p)=>{const d=r(c,o+1);!isUndefined(d)&&(s[p]=d)}),t[o]=void 0,s}}return n};return r(e,0)},utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,toJSONObject};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}utils.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,s)=>{const c=Object.create(prototype$1);return utils.toFlatObject(e,c,function(d){return d!==Error.prototype},p=>p!=="isAxiosError"),AxiosError.call(c,e.message,t,r,n,o),c.cause=e,c.name=e.name,s&&Object.assign(c,s),c};var browser=typeof self=="object"?self.FormData:window.FormData;const FormData$2=browser;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function e(t){return/^is[A-Z]/.test(t)});function isSpecCompliant(e){return e&&utils.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function toFormData(e,t,r){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new(FormData$2||FormData),r=utils.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,R){return!utils.isUndefined(R[E])});const n=r.metaTokens,o=r.visitor||v,s=r.dots,c=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&isSpecCompliant(t);if(!utils.isFunction(o))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(utils.isDate(l))return l.toISOString();if(!d&&utils.isBlob(l))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(l)||utils.isTypedArray(l)?d&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function v(l,E,R){let I=l;if(l&&!R&&typeof l=="object"){if(utils.endsWith(E,"{}"))E=n?E:E.slice(0,-2),l=JSON.stringify(l);else if(utils.isArray(l)&&isFlatArray(l)||utils.isFileList(l)||utils.endsWith(E,"[]")&&(I=utils.toArray(l)))return E=removeBrackets(E),I.forEach(function(k,L){!(utils.isUndefined(k)||k===null)&&t.append(c===!0?renderKey([E],L,s):c===null?E:E+"[]",h(k))}),!1}return isVisitable(l)?!0:(t.append(renderKey(R,E,s),h(l)),!1)}const y=[],S=Object.assign(predicates,{defaultVisitor:v,convertValue:h,isVisitable});function D(l,E){if(!utils.isUndefined(l)){if(y.indexOf(l)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(l),utils.forEach(l,function(I,F){(!(utils.isUndefined(I)||I===null)&&o.call(t,I,utils.isString(F)?F.trim():F,E,S))===!0&&D(I,E?E.concat(F):[F])}),y.pop()}}if(!utils.isObject(e))throw new TypeError("data must be an object");return D(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])},prototype.toString=function e(t){const r=t?function(n){return t.call(this,n,encode$1)}:encode$1;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,o=r&&r.serialize;let s;if(o?s=o(t,r):s=utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),s){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils.forEach(this.handlers,function(n){n!==null&&t(n)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=FormData,isStandardBrowserEnv=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return platform.isNode&&utils.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function formDataToJSON(e){function t(r,n,o,s){let c=r[s++];const p=Number.isFinite(+c),d=s>=r.length;return c=!c&&utils.isArray(o)?o.length:c,d?(utils.hasOwnProp(o,c)?o[c]=[o[c],n]:o[c]=n,!p):((!o[c]||!utils.isObject(o[c]))&&(o[c]=[]),t(r,n,o[c],s)&&utils.isArray(o[c])&&(o[c]=arrayToObject(o[c])),!p)}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const r={};return utils.forEachEntry(e,(n,o)=>{t(parsePropPath(n),o,r,0)}),r}return null}const DEFAULT_CONTENT_TYPE={"Content-Type":void 0};function stringifySafely(e,t,r){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=utils.isObject(t);if(s&&utils.isHTMLForm(t)&&(t=new FormData(t)),utils.isFormData(t))return o&&o?JSON.stringify(formDataToJSON(t)):t;if(utils.isArrayBuffer(t)||utils.isBuffer(t)||utils.isStream(t)||utils.isFile(t)||utils.isBlob(t))return t;if(utils.isArrayBufferView(t))return t.buffer;if(utils.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((p=utils.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return toFormData(p?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function e(t){const r=this.transitional||defaults.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&utils.isString(t)&&(n&&!this.responseType||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(p){if(c)throw p.name==="SyntaxError"?AxiosError.from(p,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],function e(t){defaults.headers[t]={}}),utils.forEach(["post","put","patch"],function e(t){defaults.headers[t]=utils.merge(DEFAULT_CONTENT_TYPE)});const defaults$1=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
7
|
-
`).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim(),!(!r||t[r]&&ignoreDuplicateOf[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function matchHeaderValue(e,t,r,n){if(utils.isFunction(n))return n.call(this,t,r);if(
|
|
8
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function s(c){const p=normalizeHeader(c);n[p]||(buildAccessors(o,c),n[p]=!0)}return utils.isArray(t)?t.forEach(s):s(t),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),utils.freezeMethods(AxiosHeaders.prototype),utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(e,t){const r=this||defaults$1,n=t||r,o=AxiosHeaders$1.from(n.headers);let s=n.data;return utils.forEach(e,function(p){s=p.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e==null?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});const httpAdapter=null;function settle(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const cookies=platform.isStandardBrowserEnv?function e(){return{write:function(r,n,o,s,c,p){const d=[];d.push(r+"="+encodeURIComponent(n)),utils.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),utils.isString(s)&&d.push("path="+s),utils.isString(c)&&d.push("domain="+c),p===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function e(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t}const isURLSameOrigin=platform.isStandardBrowserEnv?function e(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(s){let c=s;return t&&(r.setAttribute("href",c),c=r.href),r.setAttribute("href",c),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(c){const p=utils.isString(c)?o(c):c;return p.protocol===n.protocol&&p.host===n.host}}():function e(){return function(){return!0}}();function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,c;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),v=n[s];c||(c=h),r[o]=d,n[o]=h;let y=s,S=0;for(;y!==o;)S+=r[y++],y=y%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),h-c<t)return;const D=v&&h-v;return D?Math.round(S*1e3/D):void 0}}function progressEventReducer(e,t){let r=0;const n=speedometer(50,250);return o=>{const s=o.loaded,c=o.lengthComputable?o.total:void 0,p=s-r,d=n(p),h=s<=c;r=s;const v={loaded:s,total:c,progress:c?s/c:void 0,bytes:p,rate:d||void 0,estimated:d&&c&&h?(c-s)/d:void 0,event:o};v[t?"download":"upload"]=!0,e(v)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(r,n){let o=e.data;const s=AxiosHeaders$1.from(e.headers).normalize(),c=e.responseType;let p;function d(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}utils.isFormData(o)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let h=new XMLHttpRequest;if(e.auth){const D=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(D+":"+l))}const v=buildFullPath(e.baseURL,e.url);h.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout;function y(){if(!h)return;const D=AxiosHeaders$1.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:D,config:e,request:h};settle(function(I){r(I),d()},function(I){n(I),d()},E),h=null}if("onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(y)},h.onabort=function(){!h||(n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let l=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||transitionalDefaults;e.timeoutErrorMessage&&(l=e.timeoutErrorMessage),n(new AxiosError(l,E.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,h)),h=null},platform.isStandardBrowserEnv){const D=(e.withCredentials||isURLSameOrigin(v))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);D&&s.set(e.xsrfHeaderName,D)}o===void 0&&s.setContentType(null),"setRequestHeader"in h&&utils.forEach(s.toJSON(),function(l,E){h.setRequestHeader(E,l)}),utils.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),c&&c!=="json"&&(h.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&h.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=D=>{!h||(n(!D||D.type?new CanceledError(null,e,h):D),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const S=parseProtocol(v);if(S&&platform.protocols.indexOf(S)===-1){n(new AxiosError("Unsupported protocol "+S+":",AxiosError.ERR_BAD_REQUEST,e));return}h.send(o||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const adapters={getAdapter:e=>{e=utils.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=utils.isString(r)?knownAdapters[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new AxiosError(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(utils.hasOwnProp(knownAdapters,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!utils.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults$1.adapter)(e).then(function(n){return throwIfCancellationRequested(e),n.data=transformData.call(e,e.transformResponse,n),n.headers=AxiosHeaders$1.from(n.headers),n},function(n){return isCancel(n)||(throwIfCancellationRequested(e),n&&n.response&&(n.response.data=transformData.call(e,e.transformResponse,n.response),n.response.headers=AxiosHeaders$1.from(n.response.headers))),Promise.reject(n)})}const headersToObject=e=>e instanceof AxiosHeaders$1?e.toJSON():e;function mergeConfig(e,t){t=t||{};const r={};function n(h,v,y){return utils.isPlainObject(h)&&utils.isPlainObject(v)?utils.merge.call({caseless:y},h,v):utils.isPlainObject(v)?utils.merge({},v):utils.isArray(v)?v.slice():v}function o(h,v,y){if(utils.isUndefined(v)){if(!utils.isUndefined(h))return n(void 0,h,y)}else return n(h,v,y)}function s(h,v){if(!utils.isUndefined(v))return n(void 0,v)}function c(h,v){if(utils.isUndefined(v)){if(!utils.isUndefined(h))return n(void 0,h)}else return n(void 0,v)}function p(h,v,y){if(y in t)return n(h,v);if(y in e)return n(void 0,h)}const d={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:p,headers:(h,v)=>o(headersToObject(h),headersToObject(v),!0)};return utils.forEach(Object.keys(e).concat(Object.keys(t)),function(v){const y=d[v]||o,S=y(e[v],t[v],v);utils.isUndefined(S)&&y!==p||(r[v]=S)}),r}const VERSION="1.2.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function o(s,c){return"[Axios v"+VERSION+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return(s,c,p)=>{if(t===!1)throw new AxiosError(o(c," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED);return r&&!deprecatedWarnings[c]&&(deprecatedWarnings[c]=!0,console.warn(o(c," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,c,p):!0}};function assertOptions(e,t,r){if(typeof e!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],c=t[s];if(c){const p=e[s],d=p===void 0||c(p,s,e);if(d!==!0)throw new AxiosError("option "+s+" must be "+d,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new AxiosError("Unknown option "+s,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios$1{constructor(t){this.defaults=t,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mergeConfig(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!==void 0&&validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c;c=s&&utils.merge(s.common,s[r.method]),c&&utils.forEach(["delete","get","head","post","put","patch","common"],l=>{delete s[l]}),r.headers=AxiosHeaders$1.concat(c,s);const p=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,p.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let v,y=0,S;if(!d){const l=[dispatchRequest.bind(this),void 0];for(l.unshift.apply(l,p),l.push.apply(l,h),S=l.length,v=Promise.resolve(r);y<S;)v=v.then(l[y++],l[y++]);return v}S=p.length;let D=r;for(y=0;y<S;){const l=p[y++],E=p[y++];try{D=l(D)}catch(R){E.call(this,R);break}}try{v=dispatchRequest.call(this,D)}catch(l){return Promise.reject(l)}for(y=0,S=h.length;y<S;)v=v.then(h[y++],h[y++]);return v}getUri(t){t=mergeConfig(this.defaults,t);const r=buildFullPath(t.baseURL,t.url);return buildURL(r,t.params,t.paramsSerializer)}}utils.forEach(["delete","get","head","options"],function e(t){Axios$1.prototype[t]=function(r,n){return this.request(mergeConfig(n||{},{method:t,url:r,data:(n||{}).data}))}}),utils.forEach(["post","put","patch"],function e(t){function r(n){return function(s,c,p){return this.request(mergeConfig(p||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}Axios$1.prototype[t]=r(),Axios$1.prototype[t+"Form"]=r(!0)});const Axios$2=Axios$1;class CancelToken{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const c=new Promise(p=>{n.subscribe(p),s=p}).then(o);return c.cancel=function(){n.unsubscribe(s)},c},t(function(s,c,p){n.reason||(n.reason=new CanceledError(s,c,p),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new CancelToken(function(o){t=o}),cancel:t}}}const CancelToken$1=CancelToken;function spread(e){return function(r){return e.apply(null,r)}}function isAxiosError(e){return utils.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});const HttpStatusCode$1=HttpStatusCode;function createInstance(e){const t=new Axios$2(e),r=bind(Axios$2.prototype.request,t);return utils.extend(r,Axios$2.prototype,t,{allOwnKeys:!0}),utils.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return createInstance(mergeConfig(e,o))},r}const axios=createInstance(defaults$1);axios.Axios=Axios$2,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function e(t){return Promise.all(t)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e),axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const Axios=axios;var nprogress={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
9
|
-
* @license MIT */(function(e,t){(function(r,n){e.exports=n()})(commonjsGlobal,function(){var r={};r.version="0.2.0";var n=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};r.configure=function(l){var E,R;for(E in l)R=l[E],R!==void 0&&l.hasOwnProperty(E)&&(n[E]=R);return this},r.status=null,r.set=function(l){var E=r.isStarted();l=o(l,n.minimum,1),r.status=l===1?null:l;var R=r.render(!E),I=R.querySelector(n.barSelector),F=n.speed,k=n.easing;return R.offsetWidth,p(function(L){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),d(I,c(l,F,k)),l===1?(d(R,{transition:"none",opacity:1}),R.offsetWidth,setTimeout(function(){d(R,{transition:"all "+F+"ms linear",opacity:0}),setTimeout(function(){r.remove(),L()},F)},F)):setTimeout(L,F)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var l=function(){setTimeout(function(){!r.status||(r.trickle(),l())},n.trickleSpeed)};return n.trickle&&l(),this},r.done=function(l){return!l&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(l){var E=r.status;return E?(typeof l!="number"&&(l=(1-E)*o(Math.random()*E,.1,.95)),E=o(E+l,0,.994),r.set(E)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var l=0,E=0;r.promise=function(R){return!R||R.state()==="resolved"?this:(E===0&&r.start(),l++,E++,R.always(function(){E--,E===0?(l=0,r.done()):r.set((l-E)/l)}),this)}}(),r.render=function(l){if(r.isRendered())return document.getElementById("nprogress");v(document.documentElement,"nprogress-busy");var E=document.createElement("div");E.id="nprogress",E.innerHTML=n.template;var R=E.querySelector(n.barSelector),I=l?"-100":s(r.status||0),F=document.querySelector(n.parent),k;return d(R,{transition:"all 0 linear",transform:"translate3d("+I+"%,0,0)"}),n.showSpinner||(k=E.querySelector(n.spinnerSelector),k&&D(k)),F!=document.body&&v(F,"nprogress-custom-parent"),F.appendChild(E),E},r.remove=function(){y(document.documentElement,"nprogress-busy"),y(document.querySelector(n.parent),"nprogress-custom-parent");var l=document.getElementById("nprogress");l&&D(l)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var l=document.body.style,E="WebkitTransform"in l?"Webkit":"MozTransform"in l?"Moz":"msTransform"in l?"ms":"OTransform"in l?"O":"";return E+"Perspective"in l?"translate3d":E+"Transform"in l?"translate":"margin"};function o(l,E,R){return l<E?E:l>R?R:l}function s(l){return(-1+l)*100}function c(l,E,R){var I;return n.positionUsing==="translate3d"?I={transform:"translate3d("+s(l)+"%,0,0)"}:n.positionUsing==="translate"?I={transform:"translate("+s(l)+"%,0)"}:I={"margin-left":s(l)+"%"},I.transition="all "+E+"ms "+R,I}var p=function(){var l=[];function E(){var R=l.shift();R&&R(E)}return function(R){l.push(R),l.length==1&&E()}}(),d=function(){var l=["Webkit","O","Moz","ms"],E={};function R(L){return L.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(f,x){return x.toUpperCase()})}function I(L){var f=document.body.style;if(L in f)return L;for(var x=l.length,C=L.charAt(0).toUpperCase()+L.slice(1),w;x--;)if(w=l[x]+C,w in f)return w;return L}function F(L){return L=R(L),E[L]||(E[L]=I(L))}function k(L,f,x){f=F(f),L.style[f]=x}return function(L,f){var x=arguments,C,w;if(x.length==2)for(C in f)w=f[C],w!==void 0&&f.hasOwnProperty(C)&&k(L,C,w);else k(L,x[1],x[2])}}();function h(l,E){var R=typeof l=="string"?l:S(l);return R.indexOf(" "+E+" ")>=0}function v(l,E){var R=S(l),I=R+E;h(R,E)||(l.className=I.substring(1))}function y(l,E){var R=S(l),I;!h(l,E)||(I=R.replace(" "+E+" "," "),l.className=I.substring(1,I.length-1))}function S(l){return(" "+(l.className||"")+" ").replace(/\s+/gi," ")}function D(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return r})})(nprogress);const NProgress=nprogress.exports;NProgress.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,minimum:.3});const kTOKENKEY="authorized-token",defaultConfig={timeout:18e4,headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}},z=class{constructor(){G(this,"router");G(this,"baseUrl",null);this.httpInterceptorsRequest(),this.httpInterceptorsResponse()}setRouter(t){this.router=t}setBaseUrl(t){this.baseUrl=t}static retryOriginalRequest(t){return new Promise(r=>{z.requests.push(n=>{t.headers.Authorization="Bearer "+n,r(t)})})}httpInterceptorsRequest(){z.axiosInstance.interceptors.request.use(t=>(NProgress.start(),typeof t.beforeRequestCallback=="function"?(t.beforeRequestCallback(t),t):z.initConfig.beforeRequestCallback?(z.initConfig.beforeRequestCallback(t),t):["/refreshToken","/login"].some(n=>t.url.indexOf(n)>-1)?t:new Promise(n=>{const o=cookies$1.get(kTOKENKEY);if(o){const s=JSON.parse(o),c=new Date().getTime();if(s.expires-c<=0){debugger;z.isRefreshing||(z.isRefreshing=!0,this.get(this.baseUrl+"/uath/refreshToken",{refreshToken:s.refreshToken}).then(d=>{this.setToken(d),t.headers.Authorization="Bearer "+d.access_token,z.requests.forEach(h=>h(d.access_token)),z.requests=[]}).finally(()=>{z.isRefreshing=!1})),n(z.retryOriginalRequest(t))}else t.headers.Authorization="Bearer "+s.accessToken,n(t)}else{const s=cookies$1.get("kCookies_token");s&&(t.headers["X-Token"]=s),n(t)}})),t=>Promise.reject(t))}setToken(t){const{access_token:r,expires_in:n,refresh_token:o}=t,s={accessToken:r,refreshToken:o,expires:Date.now()+n*1e3};cookies$1.set(kTOKENKEY,JSON.stringify(s))}httpInterceptorsResponse(){z.axiosInstance.interceptors.response.use(r=>{const n=r.config;return NProgress.done(),typeof n.beforeResponseCallback=="function"?(n.beforeResponseCallback(r),r.data):(z.initConfig.beforeResponseCallback&&z.initConfig.beforeResponseCallback(r),r.data)},r=>{const n=r;return n.isCancelRequest=Axios.isCancel(n),NProgress.done(),Promise.reject(n)})}transformConfigByMethod(t,r){const{method:n}=r,o=["get"],s=n.toLocaleLowerCase(),c=o.includes(s)?"params":"data";return{...r,[c]:t}}request(t,r,n,o){const s=this.transformConfigByMethod(n,{method:t,url:r,...o});return new Promise((c,p)=>{z.axiosInstance.request(s).then(d=>{var h;if(d&&(d==null?void 0:d.code)==="0")c(d.data);else if(d.code==="500")errorMessage(d.msg,{duration:8e3}),p(d.msg);else if((d==null?void 0:d.code)!=="-1")c(d);else{const v=(d==null?void 0:d.msg)||"\u670D\u52A1\u5F02\u5E38";errorMessage(v,{duration:8e3});const y=d.code;(y==="000001"||y==="-1"&&v.includes("\u8BF7\u91CD\u65B0\u767B\u9646"))&&(cookies$1.remove("kCookies_token"),(h=this.router)==null||h.push({path:"/login",query:{tokenExpire:"Y"}})),p(v)}}).catch(d=>{d!=null&&d.code&&errorMessage(d==null?void 0:d.message,{duration:8e3}),p(d)})})}post(t,r,n){return this.request("post",t,r,n)}delete(t,r,n){return this.request("delete",t,r,n)}put(t,r,n){return this.request("put",t,r,n)}get(t,r,n){for(const o in r)r[o]||delete r[o];return this.request("get",t,r,n)}postRouter(t){return this.request("post","route/service",t)}};let SuHttp=z;G(SuHttp,"requests",[]),G(SuHttp,"isRefreshing",!1),G(SuHttp,"initConfig",{}),G(SuHttp,"axiosInstance",Axios.create(defaultConfig));const http=new SuHttp,lunarCalendar={lunarInfo:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,92821,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,37600,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,41680,53584,62034,54560],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],Gan:["\u7532","\u4E59","\u4E19","\u4E01","\u620A","\u5DF1","\u5E9A","\u8F9B","\u58EC","\u7678"],Zhi:["\u5B50","\u4E11","\u5BC5","\u536F","\u8FB0","\u5DF3","\u5348","\u672A","\u7533","\u9149","\u620C","\u4EA5"],Animals:["\u9F20","\u725B","\u864E","\u5154","\u9F99","\u86C7","\u9A6C","\u7F8A","\u7334","\u9E21","\u72D7","\u732A"],festival:{"1-1":{title:"\u5143\u65E6\u8282"},"2-14":{title:"\u60C5\u4EBA\u8282"},"5-1":{title:"\u52B3\u52A8\u8282"},"5-4":{title:"\u9752\u5E74\u8282"},"6-1":{title:"\u513F\u7AE5\u8282"},"9-10":{title:"\u6559\u5E08\u8282"},"10-1":{title:"\u56FD\u5E86\u8282"},"12-25":{title:"\u5723\u8BDE\u8282"},"3-8":{title:"\u5987\u5973\u8282"},"3-12":{title:"\u690D\u6811\u8282"},"4-1":{title:"\u611A\u4EBA\u8282"},"5-12":{title:"\u62A4\u58EB\u8282"},"7-1":{title:"\u5EFA\u515A\u8282"},"8-1":{title:"\u5EFA\u519B\u8282"},"12-24":{title:"\u5E73\u5B89\u591C"}},lFestival:{"12-30":{title:"\u9664\u5915"},"1-1":{title:"\u6625\u8282"},"1-15":{title:"\u5143\u5BB5\u8282"},"2-2":{title:"\u9F99\u62AC\u5934"},"5-5":{title:"\u7AEF\u5348\u8282"},"7-7":{title:"\u4E03\u5915\u8282"},"7-15":{title:"\u4E2D\u5143\u8282"},"8-15":{title:"\u4E2D\u79CB\u8282"},"9-9":{title:"\u91CD\u9633\u8282"},"10-1":{title:"\u5BD2\u8863\u8282"},"10-15":{title:"\u4E0B\u5143\u8282"},"12-8":{title:"\u814A\u516B\u8282"},"12-23":{title:"\u5317\u65B9\u5C0F\u5E74"},"12-24":{title:"\u5357\u65B9\u5C0F\u5E74"}},getFestival(){return this.festival},getLunarFestival(){return this.lFestival},setFestival(e={}){this.festival=e},setLunarFestival(e={}){this.lFestival=e},solarTerm:["\u5C0F\u5BD2","\u5927\u5BD2","\u7ACB\u6625","\u96E8\u6C34","\u60CA\u86F0","\u6625\u5206","\u6E05\u660E","\u8C37\u96E8","\u7ACB\u590F","\u5C0F\u6EE1","\u8292\u79CD","\u590F\u81F3","\u5C0F\u6691","\u5927\u6691","\u7ACB\u79CB","\u5904\u6691","\u767D\u9732","\u79CB\u5206","\u5BD2\u9732","\u971C\u964D","\u7ACB\u51AC","\u5C0F\u96EA","\u5927\u96EA","\u51AC\u81F3"],sTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341"],nStr2:["\u521D","\u5341","\u5EFF","\u5345"],nStr3:["\u6B63","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u51AC","\u814A"],lYearDays:function(e){let t,r=348;for(t=32768;t>8;t>>=1)r+=this.lunarInfo[e-1900]&t?1:0;return r+this.leapDays(e)},leapMonth:function(e){return this.lunarInfo[e-1900]&15},leapDays:function(e){return this.leapMonth(e)?this.lunarInfo[e-1900]&65536?30:29:0},monthDays:function(e,t){return t>12||t<1?-1:this.lunarInfo[e-1900]&65536>>t?30:29},solarDays:function(e,t){if(t>12||t<1)return-1;const r=t-1;return r===1?e%4===0&&e%100!==0||e%400===0?29:28:this.solarMonth[r]},toGanZhiYear:function(e){let t=(e-3)%10,r=(e-3)%12;return t===0&&(t=10),r===0&&(r=12),this.Gan[t-1]+this.Zhi[r-1]},toAstro:function(e,t){const r="\u6469\u7FAF\u6C34\u74F6\u53CC\u9C7C\u767D\u7F8A\u91D1\u725B\u53CC\u5B50\u5DE8\u87F9\u72EE\u5B50\u5904\u5973\u5929\u79E4\u5929\u874E\u5C04\u624B\u6469\u7FAF",n=[20,19,21,21,21,22,23,23,23,23,22,22];return r.substr(e*2-(t<n[e-1]?2:0),2)+"\u5EA7"},toGanZhi:function(e){return this.Gan[e%10]+this.Zhi[e%12]},getTerm:function(e,t){if(e<1900||e>2100||t<1||t>24)return-1;const r=this.sTermInfo[e-1900],n=[];for(let o=0;o<r.length;o+=5){const s=parseInt("0x"+r.substr(o,5)).toString();n.push(s[0],s.substr(1,2),s[3],s.substr(4,2))}return parseInt(n[t-1])},toChinaMonth:function(e){if(e>12||e<1)return-1;let t=this.nStr3[e-1];return t+="\u6708",t},toChinaDay:function(e){let t;switch(e){case 10:t="\u521D\u5341";break;case 20:t="\u4E8C\u5341";break;case 30:t="\u4E09\u5341";break;default:t=this.nStr2[Math.floor(e/10)],t+=this.nStr1[e%10]}return t},getAnimal:function(e){return this.Animals[(e-4)%12]},solar2lunar:function(e,t,r){let n=parseInt(e),o=parseInt(t),s=parseInt(r);if(n<1900||n>2100||n===1900&&o===1&&s<31)return-1;let c;n?c=new Date(n,parseInt(o.toString())-1,s):c=new Date;let p,d=0,h=0;n=c.getFullYear(),o=c.getMonth()+1,s=c.getDate();let v=(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate())-Date.UTC(1900,0,31))/864e5;for(p=1900;p<2101&&v>0;p++)h=this.lYearDays(p),v-=h;v<0&&(v+=h,p--);const y=new Date;let S=!1;y.getFullYear()===n&&y.getMonth()+1===o&&y.getDate()===s&&(S=!0);let D=c.getDay();const l=this.nStr1[D];D===0&&(D=7);const E=p;d=this.leapMonth(p);let R=!1;for(p=1;p<13&&v>0;p++)d>0&&p===d+1&&R===!1?(--p,R=!0,h=this.leapDays(E)):h=this.monthDays(E,p),R===!0&&p===d+1&&(R=!1),v-=h;v===0&&d>0&&p===d+1&&(R?R=!1:(R=!0,--p)),v<0&&(v+=h,--p);const I=p,F=v+1,k=o-1,L=this.toGanZhiYear(E),f=this.getTerm(n,o*2-1),x=this.getTerm(n,o*2);let C=this.toGanZhi((n-1900)*12+o+11);s>=f&&(C=this.toGanZhi((n-1900)*12+o+12));let w=!1,P;f===s&&(w=!0,P=this.solarTerm[o*2-2]),x===s&&(w=!0,P=this.solarTerm[o*2-1]);const U=Date.UTC(n,k,1,0,0,0,0)/864e5+25567+10,V=this.toGanZhi(U+s-1),j=this.toAstro(o,s),q=n+"-"+o+"-"+s,K=E+"-"+I+"-"+F,X=this.festival,Z=this.lFestival,Q=o+"-"+s;let ne=I+"-"+F;return I===12&&F===29&&this.monthDays(E,I)===29&&(ne="12-30"),{date:q,lunarDate:K,festival:X[Q]?X[Q].title:null,lunarFestival:Z[ne]?Z[ne].title:null,lYear:E,lMonth:I,lDay:F,Animal:this.getAnimal(E),IMonthCn:(R?"\u95F0":"")+this.toChinaMonth(I),IDayCn:this.toChinaDay(F),cYear:n,cMonth:o,cDay:s,gzYear:L,gzMonth:C,gzDay:V,isToday:S,isLeap:R,nWeek:D,ncWeek:"\u661F\u671F"+l,isTerm:w,Term:P,astro:j}},lunar2solar:function(e,t,r,n){e=parseInt(e),t=parseInt(t),r=parseInt(r),n=!!n;const o=this.leapMonth(e);if(n&&o!==t||e===2100&&t===12&&r>1||e===1900&&t===1&&r<31)return-1;const s=this.monthDays(e,t);let c=s;if(n&&(c=this.leapDays(e)),e<1900||e>2100||r>c)return-1;let p=0,d;for(d=1900;d<e;d++)p+=this.lYearDays(d);let h=0,v=!1;for(d=1;d<t;d++)h=this.leapMonth(e),v||h<=d&&h>0&&(p+=this.leapDays(e),v=!0),p+=this.monthDays(e,d);n&&(p+=s);const y=Date.UTC(1900,1,30,0,0,0),S=new Date((p+r-31)*864e5+y),D=S.getUTCFullYear(),l=S.getUTCMonth()+1,E=S.getUTCDate();return this.solar2lunar(D,l,E)}};class Updater{constructor(t){G(this,"oldScript");G(this,"newScript");G(this,"dispatch");this.oldScript=[],this.newScript=[],this.dispatch={},this.init(),this.timing(t==null?void 0:t.timer)}async init(){const t=await this.getHtml();this.oldScript=this.parserScript(t)}async getHtml(){return await fetch("/").then(r=>r.text())}parserScript(t){const r=new RegExp(/<script(?:\s+[^>]*)?>(.*?)<\/script\s*>/gi);return t.match(r)}on(t,r){return(this.dispatch[t]||(this.dispatch[t]=[])).push(r),this}compare(t,r){var s;const n=t.length;Array.from(new Set(t.concat(r))).length===n?(s=this.dispatch["no-update"])==null||s.forEach(c=>{c()}):this.dispatch.update.forEach(c=>{c()})}timing(t=1e4){const r=setInterval(async()=>{window.clearInterval(r);const n=await this.getHtml();this.newScript=this.parserScript(n),this.compare(this.oldScript,this.newScript)},t)}}const withInstall=e=>{const t=e;return t.install=r=>{r.component(t.name,e)},e};function sleep(e=64){return new Promise(t=>{const r=setTimeout(()=>{window.clearTimeout(r),t(e)},e)})}const delay=e=>new Promise(t=>setTimeout(t,e)),useDark=()=>({isDark:vue.ref(document.documentElement.classList.contains("dark"))}),useDebounce=(e,t)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(e,t)}};function isUrl(e){return/(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(e)}const getDictName=(e,t)=>{var n,o;return!e||!t?null:(o=(n=storageLocal.getItem("kLov")[e])==null?void 0:n.children.find(s=>t===s.dictCode))==null?void 0:o.dictName};exports.NProgress=NProgress,exports.Updater=Updater,exports.VxetableRender=VxetableRender,exports.addClass=addClass,exports.addResizeListener=addResizeListener,exports.appendFieldByUniqueId=appendFieldByUniqueId,exports.buildHierarchyTree=buildHierarchyTree,exports.buildShortUUID=buildShortUUID,exports.buildUUID=buildUUID,exports.cookies=cookies$1,exports.dbstorage=dbstorage,exports.delay=delay,exports.deleteTreeChildren=deleteTreeChildren,exports.deviceDetection=deviceDetection,exports.errorMessage=errorMessage,exports.extractPathList=extractPathList,exports.formatGridItems=formatGridItems,exports.formatItems=formatItems,exports.formatRules=formatRules,exports.getBrowserInfo=getBrowserInfo,exports.getDictName=getDictName,exports.getNodeByUniqueId=getNodeByUniqueId,exports.hasClass=hasClass,exports.http=http,exports.i18nColums=i18nColums,exports.isUrl=isUrl,exports.lunarCalendar=lunarCalendar,exports.openLink=openLink,exports.removeClass=removeClass,exports.removeResizeListener=removeResizeListener,exports.showMessage=showMessage,exports.sleep=sleep,exports.storageLocal=storageLocal,exports.storageSession=storageSession,exports.successMessage=successMessage,exports.toggleClass=toggleClass,exports.useAttrs=useAttrs,exports.useDark=useDark,exports.useDebounce=useDebounce,exports.useGlobal=useGlobal,exports.useRender=useRender,exports.useWatermark=useWatermark,exports.warnMessage=warnMessage,exports.withInstall=withInstall,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
6
|
+
*/(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,o,s){function c(p,v){if(!o[p]){if(!n[p]){var y=typeof commonjsRequire=="function"&&commonjsRequire;if(!v&&y)return y(p,!0);if(u)return u(p,!0);var _=new Error("Cannot find module '"+p+"'");throw _.code="MODULE_NOT_FOUND",_}var N=o[p]={exports:{}};n[p][0].call(N.exports,function(f){var E=n[p][1][f];return c(E||f)},N,N.exports,r,n,o,s)}return o[p].exports}for(var u=typeof commonjsRequire=="function"&&commonjsRequire,d=0;d<s.length;d++)c(s[d]);return c}({1:[function(r,n,o){(function(s){var c=s.MutationObserver||s.WebKitMutationObserver,u;if(c){var d=0,p=new c(f),v=s.document.createTextNode("");p.observe(v,{characterData:!0}),u=function(){v.data=d=++d%2}}else if(!s.setImmediate&&typeof s.MessageChannel<"u"){var y=new s.MessageChannel;y.port1.onmessage=f,u=function(){y.port2.postMessage(0)}}else"document"in s&&"onreadystatechange"in s.document.createElement("script")?u=function(){var C=s.document.createElement("script");C.onreadystatechange=function(){f(),C.onreadystatechange=null,C.parentNode.removeChild(C),C=null},s.document.documentElement.appendChild(C)}:u=function(){setTimeout(f,0)};var _,N=[];function f(){_=!0;for(var C,D,L=N.length;L;){for(D=N,N=[],C=-1;++C<L;)D[C]();L=N.length}_=!1}n.exports=E;function E(C){N.push(C)===1&&!_&&u()}}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(r,n,o){var s=r(1);function c(){}var u={},d=["REJECTED"],p=["FULFILLED"],v=["PENDING"];n.exports=y;function y(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=v,this.queue=[],this.outcome=void 0,b!==c&&E(this,b)}y.prototype.catch=function(b){return this.then(null,b)},y.prototype.then=function(b,S){if(typeof b!="function"&&this.state===p||typeof S!="function"&&this.state===d)return this;var R=new this.constructor(c);if(this.state!==v){var w=this.state===p?b:S;N(R,w,this.outcome)}else this.queue.push(new _(R,b,S));return R};function _(b,S,R){this.promise=b,typeof S=="function"&&(this.onFulfilled=S,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}_.prototype.callFulfilled=function(b){u.resolve(this.promise,b)},_.prototype.otherCallFulfilled=function(b){N(this.promise,this.onFulfilled,b)},_.prototype.callRejected=function(b){u.reject(this.promise,b)},_.prototype.otherCallRejected=function(b){N(this.promise,this.onRejected,b)};function N(b,S,R){s(function(){var w;try{w=S(R)}catch(P){return u.reject(b,P)}w===b?u.reject(b,new TypeError("Cannot resolve promise with itself")):u.resolve(b,w)})}u.resolve=function(b,S){var R=C(f,S);if(R.status==="error")return u.reject(b,R.value);var w=R.value;if(w)E(b,w);else{b.state=p,b.outcome=S;for(var P=-1,k=b.queue.length;++P<k;)b.queue[P].callFulfilled(S)}return b},u.reject=function(b,S){b.state=d,b.outcome=S;for(var R=-1,w=b.queue.length;++R<w;)b.queue[R].callRejected(S);return b};function f(b){var S=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof S=="function")return function(){S.apply(b,arguments)}}function E(b,S){var R=!1;function w(V){R||(R=!0,u.reject(b,V))}function P(V){R||(R=!0,u.resolve(b,V))}function k(){S(P,w)}var j=C(k);j.status==="error"&&w(j.value)}function C(b,S){var R={};try{R.value=b(S),R.status="success"}catch(w){R.status="error",R.value=w}return R}y.resolve=D;function D(b){return b instanceof this?b:u.resolve(new this(c),b)}y.reject=L;function L(b){var S=new this(c);return u.reject(S,b)}y.all=B;function B(b){var S=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=b.length,w=!1;if(!R)return this.resolve([]);for(var P=new Array(R),k=0,j=-1,V=new this(c);++j<R;)q(b[j],j);return V;function q(K,J){S.resolve(K).then(Z,function(Q){w||(w=!0,u.reject(V,Q))});function Z(Q){P[J]=Q,++k===R&&!w&&(w=!0,u.resolve(V,P))}}}y.race=F;function F(b){var S=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=b.length,w=!1;if(!R)return this.resolve([]);for(var P=-1,k=new this(c);++P<R;)j(b[P]);return k;function j(V){S.resolve(V).then(function(q){w||(w=!0,u.resolve(k,q))},function(q){w||(w=!0,u.reject(k,q))})}}},{1:1}],3:[function(r,n,o){(function(s){typeof s.Promise!="function"&&(s.Promise=r(2))}).call(this,typeof commonjsGlobal<"u"?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(r,n,o){var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function c(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var d=u();function p(){try{if(!d||!d.open)return!1;var i=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!i||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function v(i,l){i=i||[],l=l||{};try{return new Blob(i,l)}catch(h){if(h.name!=="TypeError")throw h;for(var a=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,m=new a,g=0;g<i.length;g+=1)m.append(i[g]);return m.getBlob(l.type)}}typeof Promise>"u"&&r(3);var y=Promise;function _(i,l){l&&i.then(function(a){l(null,a)},function(a){l(a)})}function N(i,l,a){typeof l=="function"&&i.then(l),typeof a=="function"&&i.catch(a)}function f(i){return typeof i!="string"&&(console.warn(i+" used as a key, but it is not a string."),i=String(i)),i}function E(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var C="local-forage-detect-blob-support",D=void 0,L={},B=Object.prototype.toString,F="readonly",b="readwrite";function S(i){for(var l=i.length,a=new ArrayBuffer(l),m=new Uint8Array(a),g=0;g<l;g++)m[g]=i.charCodeAt(g);return a}function R(i){return new y(function(l){var a=i.transaction(C,b),m=v([""]);a.objectStore(C).put(m,"key"),a.onabort=function(g){g.preventDefault(),g.stopPropagation(),l(!1)},a.oncomplete=function(){var g=navigator.userAgent.match(/Chrome\/(\d+)/),h=navigator.userAgent.match(/Edge\//);l(h||!g||parseInt(g[1],10)>=43)}}).catch(function(){return!1})}function w(i){return typeof D=="boolean"?y.resolve(D):R(i).then(function(l){return D=l,D})}function P(i){var l=L[i.name],a={};a.promise=new y(function(m,g){a.resolve=m,a.reject=g}),l.deferredOperations.push(a),l.dbReady?l.dbReady=l.dbReady.then(function(){return a.promise}):l.dbReady=a.promise}function k(i){var l=L[i.name],a=l.deferredOperations.pop();if(a)return a.resolve(),a.promise}function j(i,l){var a=L[i.name],m=a.deferredOperations.pop();if(m)return m.reject(l),m.promise}function V(i,l){return new y(function(a,m){if(L[i.name]=L[i.name]||ve(),i.db)if(l)P(i),i.db.close();else return a(i.db);var g=[i.name];l&&g.push(i.version);var h=d.open.apply(d,g);l&&(h.onupgradeneeded=function(x){var A=h.result;try{A.createObjectStore(i.storeName),x.oldVersion<=1&&A.createObjectStore(C)}catch(O){if(O.name==="ConstraintError")console.warn('The database "'+i.name+'" has been upgraded from version '+x.oldVersion+" to version "+x.newVersion+', but the storage "'+i.storeName+'" already exists.');else throw O}}),h.onerror=function(x){x.preventDefault(),m(h.error)},h.onsuccess=function(){var x=h.result;x.onversionchange=function(A){A.target.close()},a(x),k(i)}})}function q(i){return V(i,!1)}function K(i){return V(i,!0)}function J(i,l){if(!i.db)return!0;var a=!i.db.objectStoreNames.contains(i.storeName),m=i.version<i.db.version,g=i.version>i.db.version;if(m&&(i.version!==l&&console.warn('The database "'+i.name+`" can't be downgraded from version `+i.db.version+" to version "+i.version+"."),i.version=i.db.version),g||a){if(a){var h=i.db.version+1;h>i.version&&(i.version=h)}return!0}return!1}function Z(i){return new y(function(l,a){var m=new FileReader;m.onerror=a,m.onloadend=function(g){var h=btoa(g.target.result||"");l({__local_forage_encoded_blob:!0,data:h,type:i.type})},m.readAsBinaryString(i)})}function Q(i){var l=S(atob(i.data));return v([l],{type:i.type})}function ne(i){return i&&i.__local_forage_encoded_blob}function Be(i){var l=this,a=l._initReady().then(function(){var m=L[l._dbInfo.name];if(m&&m.dbReady)return m.dbReady});return N(a,i,i),a}function Me(i){P(i);for(var l=L[i.name],a=l.forages,m=0;m<a.length;m++){var g=a[m];g._dbInfo.db&&(g._dbInfo.db.close(),g._dbInfo.db=null)}return i.db=null,q(i).then(function(h){return i.db=h,J(i)?K(i):h}).then(function(h){i.db=l.db=h;for(var x=0;x<a.length;x++)a[x]._dbInfo.db=h}).catch(function(h){throw j(i,h),h})}function ee(i,l,a,m){m===void 0&&(m=1);try{var g=i.db.transaction(i.storeName,l);a(null,g)}catch(h){if(m>0&&(!i.db||h.name==="InvalidStateError"||h.name==="NotFoundError"))return y.resolve().then(function(){if(!i.db||h.name==="NotFoundError"&&!i.db.objectStoreNames.contains(i.storeName)&&i.version<=i.db.version)return i.db&&(i.version=i.db.version+1),K(i)}).then(function(){return Me(i).then(function(){ee(i,l,a,m-1)})}).catch(a);a(h)}}function ve(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Ve(i){var l=this,a={db:null};if(i)for(var m in i)a[m]=i[m];var g=L[a.name];g||(g=ve(),L[a.name]=g),g.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=Be);var h=[];function x(){return y.resolve()}for(var A=0;A<g.forages.length;A++){var O=g.forages[A];O!==l&&h.push(O._initReady().catch(x))}var T=g.forages.slice(0);return y.all(h).then(function(){return a.db=g.db,q(a)}).then(function(I){return a.db=I,J(a,l._defaultConfig.version)?K(a):I}).then(function(I){a.db=g.db=I,l._dbInfo=a;for(var U=0;U<T.length;U++){var M=T[U];M!==l&&(M._dbInfo.db=a.db,M._dbInfo.version=a.version)}})}function je(i,l){var a=this;i=f(i);var m=new y(function(g,h){a.ready().then(function(){ee(a._dbInfo,F,function(x,A){if(x)return h(x);try{var O=A.objectStore(a._dbInfo.storeName),T=O.get(i);T.onsuccess=function(){var I=T.result;I===void 0&&(I=null),ne(I)&&(I=Q(I)),g(I)},T.onerror=function(){h(T.error)}}catch(I){h(I)}})}).catch(h)});return _(m,l),m}function $e(i,l){var a=this,m=new y(function(g,h){a.ready().then(function(){ee(a._dbInfo,F,function(x,A){if(x)return h(x);try{var O=A.objectStore(a._dbInfo.storeName),T=O.openCursor(),I=1;T.onsuccess=function(){var U=T.result;if(U){var M=U.value;ne(M)&&(M=Q(M));var z=i(M,U.key,I++);z!==void 0?g(z):U.continue()}else g()},T.onerror=function(){h(T.error)}}catch(U){h(U)}})}).catch(h)});return _(m,l),m}function ze(i,l,a){var m=this;i=f(i);var g=new y(function(h,x){var A;m.ready().then(function(){return A=m._dbInfo,B.call(l)==="[object Blob]"?w(A.db).then(function(O){return O?l:Z(l)}):l}).then(function(O){ee(m._dbInfo,b,function(T,I){if(T)return x(T);try{var U=I.objectStore(m._dbInfo.storeName);O===null&&(O=void 0);var M=U.put(O,i);I.oncomplete=function(){O===void 0&&(O=null),h(O)},I.onabort=I.onerror=function(){var z=M.error?M.error:M.transaction.error;x(z)}}catch(z){x(z)}})}).catch(x)});return _(g,a),g}function He(i,l){var a=this;i=f(i);var m=new y(function(g,h){a.ready().then(function(){ee(a._dbInfo,b,function(x,A){if(x)return h(x);try{var O=A.objectStore(a._dbInfo.storeName),T=O.delete(i);A.oncomplete=function(){g()},A.onerror=function(){h(T.error)},A.onabort=function(){var I=T.error?T.error:T.transaction.error;h(I)}}catch(I){h(I)}})}).catch(h)});return _(m,l),m}function qe(i){var l=this,a=new y(function(m,g){l.ready().then(function(){ee(l._dbInfo,b,function(h,x){if(h)return g(h);try{var A=x.objectStore(l._dbInfo.storeName),O=A.clear();x.oncomplete=function(){m()},x.onabort=x.onerror=function(){var T=O.error?O.error:O.transaction.error;g(T)}}catch(T){g(T)}})}).catch(g)});return _(a,i),a}function We(i){var l=this,a=new y(function(m,g){l.ready().then(function(){ee(l._dbInfo,F,function(h,x){if(h)return g(h);try{var A=x.objectStore(l._dbInfo.storeName),O=A.count();O.onsuccess=function(){m(O.result)},O.onerror=function(){g(O.error)}}catch(T){g(T)}})}).catch(g)});return _(a,i),a}function Ye(i,l){var a=this,m=new y(function(g,h){if(i<0){g(null);return}a.ready().then(function(){ee(a._dbInfo,F,function(x,A){if(x)return h(x);try{var O=A.objectStore(a._dbInfo.storeName),T=!1,I=O.openKeyCursor();I.onsuccess=function(){var U=I.result;if(!U){g(null);return}i===0||T?g(U.key):(T=!0,U.advance(i))},I.onerror=function(){h(I.error)}}catch(U){h(U)}})}).catch(h)});return _(m,l),m}function Ke(i){var l=this,a=new y(function(m,g){l.ready().then(function(){ee(l._dbInfo,F,function(h,x){if(h)return g(h);try{var A=x.objectStore(l._dbInfo.storeName),O=A.openKeyCursor(),T=[];O.onsuccess=function(){var I=O.result;if(!I){m(T);return}T.push(I.key),I.continue()},O.onerror=function(){g(O.error)}}catch(I){g(I)}})}).catch(g)});return _(a,i),a}function Ge(i,l){l=E.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var m=this,g;if(!i.name)g=y.reject("Invalid arguments");else{var h=i.name===a.name&&m._dbInfo.db,x=h?y.resolve(m._dbInfo.db):q(i).then(function(A){var O=L[i.name],T=O.forages;O.db=A;for(var I=0;I<T.length;I++)T[I]._dbInfo.db=A;return A});i.storeName?g=x.then(function(A){if(A.objectStoreNames.contains(i.storeName)){var O=A.version+1;P(i);var T=L[i.name],I=T.forages;A.close();for(var U=0;U<I.length;U++){var M=I[U];M._dbInfo.db=null,M._dbInfo.version=O}var z=new y(function(H,Y){var W=d.open(i.name,O);W.onerror=function(X){var ie=W.result;ie.close(),Y(X)},W.onupgradeneeded=function(){var X=W.result;X.deleteObjectStore(i.storeName)},W.onsuccess=function(){var X=W.result;X.close(),H(X)}});return z.then(function(H){T.db=H;for(var Y=0;Y<I.length;Y++){var W=I[Y];W._dbInfo.db=H,k(W._dbInfo)}}).catch(function(H){throw(j(i,H)||y.resolve()).catch(function(){}),H})}}):g=x.then(function(A){P(i);var O=L[i.name],T=O.forages;A.close();for(var I=0;I<T.length;I++){var U=T[I];U._dbInfo.db=null}var M=new y(function(z,H){var Y=d.deleteDatabase(i.name);Y.onerror=function(){var W=Y.result;W&&W.close(),H(Y.error)},Y.onblocked=function(){console.warn('dropInstance blocked for database "'+i.name+'" until all open connections are closed')},Y.onsuccess=function(){var W=Y.result;W&&W.close(),z(W)}});return M.then(function(z){O.db=z;for(var H=0;H<T.length;H++){var Y=T[H];k(Y._dbInfo)}}).catch(function(z){throw(j(i,z)||y.resolve()).catch(function(){}),z})})}return _(g,l),g}var Je={_driver:"asyncStorage",_initStorage:Ve,_support:p(),iterate:$e,getItem:je,setItem:ze,removeItem:He,clear:qe,length:We,key:Ye,keys:Ke,dropInstance:Ge};function Xe(){return typeof openDatabase=="function"}var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze="~~local_forage_type~",ye=/^~~local_forage_type~([^~]+)~/,ae="__lfsc__:",ue=ae.length,le="arbf",fe="blob",Ee="si08",we="ui08",xe="uic8",Se="si16",_e="si32",Re="ur16",Ae="ui32",Ce="fl32",Oe="fl64",Te=ue+le.length,Ne=Object.prototype.toString;function Ie(i){var l=i.length*.75,a=i.length,m,g=0,h,x,A,O;i[i.length-1]==="="&&(l--,i[i.length-2]==="="&&l--);var T=new ArrayBuffer(l),I=new Uint8Array(T);for(m=0;m<a;m+=4)h=te.indexOf(i[m]),x=te.indexOf(i[m+1]),A=te.indexOf(i[m+2]),O=te.indexOf(i[m+3]),I[g++]=h<<2|x>>4,I[g++]=(x&15)<<4|A>>2,I[g++]=(A&3)<<6|O&63;return T}function de(i){var l=new Uint8Array(i),a="",m;for(m=0;m<l.length;m+=3)a+=te[l[m]>>2],a+=te[(l[m]&3)<<4|l[m+1]>>4],a+=te[(l[m+1]&15)<<2|l[m+2]>>6],a+=te[l[m+2]&63];return l.length%3===2?a=a.substring(0,a.length-1)+"=":l.length%3===1&&(a=a.substring(0,a.length-2)+"=="),a}function Qe(i,l){var a="";if(i&&(a=Ne.call(i)),i&&(a==="[object ArrayBuffer]"||i.buffer&&Ne.call(i.buffer)==="[object ArrayBuffer]")){var m,g=ae;i instanceof ArrayBuffer?(m=i,g+=le):(m=i.buffer,a==="[object Int8Array]"?g+=Ee:a==="[object Uint8Array]"?g+=we:a==="[object Uint8ClampedArray]"?g+=xe:a==="[object Int16Array]"?g+=Se:a==="[object Uint16Array]"?g+=Re:a==="[object Int32Array]"?g+=_e:a==="[object Uint32Array]"?g+=Ae:a==="[object Float32Array]"?g+=Ce:a==="[object Float64Array]"?g+=Oe:l(new Error("Failed to get type for BinaryArray"))),l(g+de(m))}else if(a==="[object Blob]"){var h=new FileReader;h.onload=function(){var x=Ze+i.type+"~"+de(this.result);l(ae+fe+x)},h.readAsArrayBuffer(i)}else try{l(JSON.stringify(i))}catch(x){console.error("Couldn't convert value into a JSON string: ",i),l(null,x)}}function et(i){if(i.substring(0,ue)!==ae)return JSON.parse(i);var l=i.substring(Te),a=i.substring(ue,Te),m;if(a===fe&&ye.test(l)){var g=l.match(ye);m=g[1],l=l.substring(g[0].length)}var h=Ie(l);switch(a){case le:return h;case fe:return v([h],{type:m});case Ee:return new Int8Array(h);case we:return new Uint8Array(h);case xe:return new Uint8ClampedArray(h);case Se:return new Int16Array(h);case Re:return new Uint16Array(h);case _e:return new Int32Array(h);case Ae:return new Uint32Array(h);case Ce:return new Float32Array(h);case Oe:return new Float64Array(h);default:throw new Error("Unkown type: "+a)}}var be={serialize:Qe,deserialize:et,stringToBuffer:Ie,bufferToString:de};function De(i,l,a,m){i.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],a,m)}function tt(i){var l=this,a={db:null};if(i)for(var m in i)a[m]=typeof i[m]!="string"?i[m].toString():i[m];var g=new y(function(h,x){try{a.db=openDatabase(a.name,String(a.version),a.description,a.size)}catch(A){return x(A)}a.db.transaction(function(A){De(A,a,function(){l._dbInfo=a,h()},function(O,T){x(T)})},x)});return a.serializer=be,g}function re(i,l,a,m,g,h){i.executeSql(a,m,g,function(x,A){A.code===A.SYNTAX_ERR?x.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(O,T){T.rows.length?h(O,A):De(O,l,function(){O.executeSql(a,m,g,h)},h)},h):h(x,A)},h)}function rt(i,l){var a=this;i=f(i);var m=new y(function(g,h){a.ready().then(function(){var x=a._dbInfo;x.db.transaction(function(A){re(A,x,"SELECT * FROM "+x.storeName+" WHERE key = ? LIMIT 1",[i],function(O,T){var I=T.rows.length?T.rows.item(0).value:null;I&&(I=x.serializer.deserialize(I)),g(I)},function(O,T){h(T)})})}).catch(h)});return _(m,l),m}function nt(i,l){var a=this,m=new y(function(g,h){a.ready().then(function(){var x=a._dbInfo;x.db.transaction(function(A){re(A,x,"SELECT * FROM "+x.storeName,[],function(O,T){for(var I=T.rows,U=I.length,M=0;M<U;M++){var z=I.item(M),H=z.value;if(H&&(H=x.serializer.deserialize(H)),H=i(H,z.key,M+1),H!==void 0){g(H);return}}g()},function(O,T){h(T)})})}).catch(h)});return _(m,l),m}function Pe(i,l,a,m){var g=this;i=f(i);var h=new y(function(x,A){g.ready().then(function(){l===void 0&&(l=null);var O=l,T=g._dbInfo;T.serializer.serialize(l,function(I,U){U?A(U):T.db.transaction(function(M){re(M,T,"INSERT OR REPLACE INTO "+T.storeName+" (key, value) VALUES (?, ?)",[i,I],function(){x(O)},function(z,H){A(H)})},function(M){if(M.code===M.QUOTA_ERR){if(m>0){x(Pe.apply(g,[i,O,a,m-1]));return}A(M)}})})}).catch(A)});return _(h,a),h}function ot(i,l,a){return Pe.apply(this,[i,l,a,1])}function st(i,l){var a=this;i=f(i);var m=new y(function(g,h){a.ready().then(function(){var x=a._dbInfo;x.db.transaction(function(A){re(A,x,"DELETE FROM "+x.storeName+" WHERE key = ?",[i],function(){g()},function(O,T){h(T)})})}).catch(h)});return _(m,l),m}function it(i){var l=this,a=new y(function(m,g){l.ready().then(function(){var h=l._dbInfo;h.db.transaction(function(x){re(x,h,"DELETE FROM "+h.storeName,[],function(){m()},function(A,O){g(O)})})}).catch(g)});return _(a,i),a}function at(i){var l=this,a=new y(function(m,g){l.ready().then(function(){var h=l._dbInfo;h.db.transaction(function(x){re(x,h,"SELECT COUNT(key) as c FROM "+h.storeName,[],function(A,O){var T=O.rows.item(0).c;m(T)},function(A,O){g(O)})})}).catch(g)});return _(a,i),a}function ct(i,l){var a=this,m=new y(function(g,h){a.ready().then(function(){var x=a._dbInfo;x.db.transaction(function(A){re(A,x,"SELECT key FROM "+x.storeName+" WHERE id = ? LIMIT 1",[i+1],function(O,T){var I=T.rows.length?T.rows.item(0).key:null;g(I)},function(O,T){h(T)})})}).catch(h)});return _(m,l),m}function ut(i){var l=this,a=new y(function(m,g){l.ready().then(function(){var h=l._dbInfo;h.db.transaction(function(x){re(x,h,"SELECT key FROM "+h.storeName,[],function(A,O){for(var T=[],I=0;I<O.rows.length;I++)T.push(O.rows.item(I).key);m(T)},function(A,O){g(O)})})}).catch(g)});return _(a,i),a}function lt(i){return new y(function(l,a){i.transaction(function(m){m.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(g,h){for(var x=[],A=0;A<h.rows.length;A++)x.push(h.rows.item(A).name);l({db:i,storeNames:x})},function(g,h){a(h)})},function(m){a(m)})})}function ft(i,l){l=E.apply(this,arguments);var a=this.config();i=typeof i!="function"&&i||{},i.name||(i.name=i.name||a.name,i.storeName=i.storeName||a.storeName);var m=this,g;return i.name?g=new y(function(h){var x;i.name===a.name?x=m._dbInfo.db:x=openDatabase(i.name,"","",0),i.storeName?h({db:x,storeNames:[i.storeName]}):h(lt(x))}).then(function(h){return new y(function(x,A){h.db.transaction(function(O){function T(z){return new y(function(H,Y){O.executeSql("DROP TABLE IF EXISTS "+z,[],function(){H()},function(W,X){Y(X)})})}for(var I=[],U=0,M=h.storeNames.length;U<M;U++)I.push(T(h.storeNames[U]));y.all(I).then(function(){x()}).catch(function(z){A(z)})},function(O){A(O)})})}):g=y.reject("Invalid arguments"),_(g,l),g}var dt={_driver:"webSQLStorage",_initStorage:tt,_support:Xe(),iterate:nt,getItem:rt,setItem:ot,removeItem:st,clear:it,length:at,key:ct,keys:ut,dropInstance:ft};function bt(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function Le(i,l){var a=i.name+"/";return i.storeName!==l.storeName&&(a+=i.storeName+"/"),a}function ht(){var i="_localforage_support_test";try{return localStorage.setItem(i,!0),localStorage.removeItem(i),!1}catch{return!0}}function pt(){return!ht()||localStorage.length>0}function mt(i){var l=this,a={};if(i)for(var m in i)a[m]=i[m];return a.keyPrefix=Le(i,l._defaultConfig),pt()?(l._dbInfo=a,a.serializer=be,y.resolve()):y.reject()}function gt(i){var l=this,a=l.ready().then(function(){for(var m=l._dbInfo.keyPrefix,g=localStorage.length-1;g>=0;g--){var h=localStorage.key(g);h.indexOf(m)===0&&localStorage.removeItem(h)}});return _(a,i),a}function vt(i,l){var a=this;i=f(i);var m=a.ready().then(function(){var g=a._dbInfo,h=localStorage.getItem(g.keyPrefix+i);return h&&(h=g.serializer.deserialize(h)),h});return _(m,l),m}function yt(i,l){var a=this,m=a.ready().then(function(){for(var g=a._dbInfo,h=g.keyPrefix,x=h.length,A=localStorage.length,O=1,T=0;T<A;T++){var I=localStorage.key(T);if(I.indexOf(h)===0){var U=localStorage.getItem(I);if(U&&(U=g.serializer.deserialize(U)),U=i(U,I.substring(x),O++),U!==void 0)return U}}});return _(m,l),m}function Et(i,l){var a=this,m=a.ready().then(function(){var g=a._dbInfo,h;try{h=localStorage.key(i)}catch{h=null}return h&&(h=h.substring(g.keyPrefix.length)),h});return _(m,l),m}function wt(i){var l=this,a=l.ready().then(function(){for(var m=l._dbInfo,g=localStorage.length,h=[],x=0;x<g;x++){var A=localStorage.key(x);A.indexOf(m.keyPrefix)===0&&h.push(A.substring(m.keyPrefix.length))}return h});return _(a,i),a}function xt(i){var l=this,a=l.keys().then(function(m){return m.length});return _(a,i),a}function St(i,l){var a=this;i=f(i);var m=a.ready().then(function(){var g=a._dbInfo;localStorage.removeItem(g.keyPrefix+i)});return _(m,l),m}function _t(i,l,a){var m=this;i=f(i);var g=m.ready().then(function(){l===void 0&&(l=null);var h=l;return new y(function(x,A){var O=m._dbInfo;O.serializer.serialize(l,function(T,I){if(I)A(I);else try{localStorage.setItem(O.keyPrefix+i,T),x(h)}catch(U){(U.name==="QuotaExceededError"||U.name==="NS_ERROR_DOM_QUOTA_REACHED")&&A(U),A(U)}})})});return _(g,a),g}function Rt(i,l){if(l=E.apply(this,arguments),i=typeof i!="function"&&i||{},!i.name){var a=this.config();i.name=i.name||a.name,i.storeName=i.storeName||a.storeName}var m=this,g;return i.name?g=new y(function(h){i.storeName?h(Le(i,m._defaultConfig)):h(i.name+"/")}).then(function(h){for(var x=localStorage.length-1;x>=0;x--){var A=localStorage.key(x);A.indexOf(h)===0&&localStorage.removeItem(A)}}):g=y.reject("Invalid arguments"),_(g,l),g}var At={_driver:"localStorageWrapper",_initStorage:mt,_support:bt(),iterate:yt,getItem:vt,setItem:_t,removeItem:St,clear:gt,length:xt,key:Et,keys:wt,dropInstance:Rt},Ct=function(l,a){return l===a||typeof l=="number"&&typeof a=="number"&&isNaN(l)&&isNaN(a)},Ot=function(l,a){for(var m=l.length,g=0;g<m;){if(Ct(l[g],a))return!0;g++}return!1},Ue=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"},se={},Fe={},oe={INDEXEDDB:Je,WEBSQL:dt,LOCALSTORAGE:At},Tt=[oe.INDEXEDDB._driver,oe.WEBSQL._driver,oe.LOCALSTORAGE._driver],ce=["dropInstance"],he=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ce),Nt={description:"",driver:Tt.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function It(i,l){i[l]=function(){var a=arguments;return i.ready().then(function(){return i[l].apply(i,a)})}}function pe(){for(var i=1;i<arguments.length;i++){var l=arguments[i];if(l)for(var a in l)l.hasOwnProperty(a)&&(Ue(l[a])?arguments[0][a]=l[a].slice():arguments[0][a]=l[a])}return arguments[0]}var Dt=function(){function i(l){c(this,i);for(var a in oe)if(oe.hasOwnProperty(a)){var m=oe[a],g=m._driver;this[a]=g,se[g]||this.defineDriver(m)}this._defaultConfig=pe({},Nt),this._config=pe({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return i.prototype.config=function(a){if((typeof a>"u"?"undefined":s(a))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var m in a){if(m==="storeName"&&(a[m]=a[m].replace(/\W/g,"_")),m==="version"&&typeof a[m]!="number")return new Error("Database version must be a number.");this._config[m]=a[m]}return"driver"in a&&a.driver?this.setDriver(this._config.driver):!0}else return typeof a=="string"?this._config[a]:this._config},i.prototype.defineDriver=function(a,m,g){var h=new y(function(x,A){try{var O=a._driver,T=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!a._driver){A(T);return}for(var I=he.concat("_initStorage"),U=0,M=I.length;U<M;U++){var z=I[U],H=!Ot(ce,z);if((H||a[z])&&typeof a[z]!="function"){A(T);return}}var Y=function(){for(var ie=function(Ut){return function(){var Ft=new Error("Method "+Ut+" is not implemented by the current driver"),ke=y.reject(Ft);return _(ke,arguments[arguments.length-1]),ke}},me=0,Lt=ce.length;me<Lt;me++){var ge=ce[me];a[ge]||(a[ge]=ie(ge))}};Y();var W=function(ie){se[O]&&console.info("Redefining LocalForage driver: "+O),se[O]=a,Fe[O]=ie,x()};"_support"in a?a._support&&typeof a._support=="function"?a._support().then(W,A):W(!!a._support):W(!0)}catch(X){A(X)}});return N(h,m,g),h},i.prototype.driver=function(){return this._driver||null},i.prototype.getDriver=function(a,m,g){var h=se[a]?y.resolve(se[a]):y.reject(new Error("Driver not found."));return N(h,m,g),h},i.prototype.getSerializer=function(a){var m=y.resolve(be);return N(m,a),m},i.prototype.ready=function(a){var m=this,g=m._driverSet.then(function(){return m._ready===null&&(m._ready=m._initDriver()),m._ready});return N(g,a,a),g},i.prototype.setDriver=function(a,m,g){var h=this;Ue(a)||(a=[a]);var x=this._getSupportedDrivers(a);function A(){h._config.driver=h.driver()}function O(U){return h._extend(U),A(),h._ready=h._initStorage(h._config),h._ready}function T(U){return function(){var M=0;function z(){for(;M<U.length;){var H=U[M];return M++,h._dbInfo=null,h._ready=null,h.getDriver(H).then(O).catch(z)}A();var Y=new Error("No available storage method found.");return h._driverSet=y.reject(Y),h._driverSet}return z()}}var I=this._driverSet!==null?this._driverSet.catch(function(){return y.resolve()}):y.resolve();return this._driverSet=I.then(function(){var U=x[0];return h._dbInfo=null,h._ready=null,h.getDriver(U).then(function(M){h._driver=M._driver,A(),h._wrapLibraryMethodsWithReady(),h._initDriver=T(x)})}).catch(function(){A();var U=new Error("No available storage method found.");return h._driverSet=y.reject(U),h._driverSet}),N(this._driverSet,m,g),this._driverSet},i.prototype.supports=function(a){return!!Fe[a]},i.prototype._extend=function(a){pe(this,a)},i.prototype._getSupportedDrivers=function(a){for(var m=[],g=0,h=a.length;g<h;g++){var x=a[g];this.supports(x)&&m.push(x)}return m},i.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0,m=he.length;a<m;a++)It(this,he[a])},i.prototype.createInstance=function(a){return new i(a)},i}(),Pt=new Dt;n.exports=Pt},{3:3}]},{},[4])(4)})})(localforage);class sessionStorageProxy{constructor(t){G(this,"storage");G(this,"prefix");G(this,"addPrefix",t=>{this.prefix=t});this.storage=t}setItem(t,r){this.storage.setItem(this.getKey(t),JSON.stringify(r))}getItem(t){return JSON.parse(this.storage.getItem(this.getKey(t)))}removeItem(t){this.storage.removeItem(this.getKey(t))}getKey(t){return this.prefix?this.prefix+"_"+t:t}clear(){this.storage.clear()}}class localStorageProxy extends sessionStorageProxy{constructor(t){super(t)}}class localforageProxy{constructor(){G(this,"storage");localforageExports.config({name:"uapp",storeName:"udb"}),this.storage=localforageExports}setItem(t,r){this.storage.setItem(t,r)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}const storageSession=new sessionStorageProxy(sessionStorage),storageLocal=new localStorageProxy(localStorage),dbstorage=new localforageProxy,useRender=()=>{const e={value:"dictCode",label:"dictName"},t=(b,S)=>{var q;const R=B(S);let w={clearable:!0,disabled:!1},P,k;xeUtils.isObject(b)?(w=Object.assign(w,b),P=b.defaultValue,k=b==null?void 0:b.code):k=b;const j=(q=storageLocal.getItem("kLov")[k])==null?void 0:q.children,V=j?j.filter(K=>K.enabled==="1"):[];return{name:"#select",optionProps:e,options:V,props:w,defaultValue:P,events:R,dictCode:k}},r=(b,S)=>{const R=B(S);return{name:"#SuSelect",optionProps:b.optionProps,props:b.props,options:b.options||[],events:R}},n=(b,S)=>{const R={optionProps:{extLabel:"userName",value:"employeeName"},props:{attrs:{disabled:b==null?void 0:b.disabled},disabled:b==null?void 0:b.disabled,defaultValue:b==null?void 0:b.defaultValue,fieldMap:b==null?void 0:b.fieldMap,code:"SYS037",url:"/uums/employee/listEmployeeIsUser",fetchField:"employeeName"}};return r(R,S)},o=b=>{const S={optionProps:{extLabel:"userName",value:"name"},props:{code:"sys/listUsers",url:"/uums/user",fetchField:"name",fieldMap:b==null?void 0:b.fieldMap}};return r(S)},s=(b,S)=>{const R={label:"organizationName",value:(b==null?void 0:b.field)||"organizationName"},w={fieldMap:{},extParam:b==null?void 0:b.extParam,url:"/uums/cusOrganization",fetchField:"organizationName"},P={organizationId:"id",organizationCode:"organizationCode"};return Object.assign(w.fieldMap,P,(b==null?void 0:b.fieldMap)||{}),{name:"#SuSelect",props:w,optionProps:R,options:[],methods:S}},c=(b,S)=>{const R={label:"orgName",value:(b==null?void 0:b.field)||"orgName"},w={fieldMap:{},extParam:b==null?void 0:b.extParam,url:"/uums/org",fetchField:"orgName"},P={orgId:"id",orgCode:"orgCode"};return Object.assign(w.fieldMap,P,(b==null?void 0:b.fieldMap)||{}),{name:"#SuSelect",props:w,optionProps:R,options:[],methods:S}},u=(b,S)=>{const R=Object.assign({disabled:!1},b),w=R==null?void 0:R.defaultValue;return{name:"$input",props:R,defaultValue:w,events:B(S)}},d=(b,S)=>{const R=Object.assign({disabled:!1,rows:3},b),w=R==null?void 0:R.defaultValue;return{name:"$textarea",props:R,defaultValue:w,events:B(S)}},p=(b,S)=>{const R="$checkbox",{defaultValue:w,options:P,props:k}=y(b);return{name:R,defaultValue:w,options:P,props:k,events:B(S)}},v=(b,S)=>{const R="$radio",{defaultValue:w,options:P,props:k}=y(b);return{name:R,defaultValue:w,options:P,props:k,events:B(S)}},y=b=>{var j;let S={disabled:!1},R;const w=storageLocal.getItem("kLov");let P="";xeUtils.isObject(b)?(R=b.defaultValue,P=b.code,S=Object.assign(S,b||{})):xeUtils.isString(b)&&(P=b);const k=P?(j=w[P])==null?void 0:j.children.map(V=>({label:V.dictName,value:V.dictCode})):[];return{props:S,defaultValue:R,options:k}},_=(b,S)=>{const R=B(S);return{name:"$input",props:Object.assign({type:"number",clearable:!0,min:0,controls:!1},b||{}),events:R}},N=(b,S)=>{const R=B(S),w="yyyy-MM-dd HH:mm:ss",P=b==null?void 0:b.defaultValue;return{name:"$input",props:Object.assign({type:"date",valueFormat:w,clearable:!0},b||{}),defaultValue:P,events:R}},f=(b,S)=>{const R=B(S);return{name:"#lov",props:Object.assign({},b||{}),events:R}},E=(b,S)=>{const R=B(S),w=(b==null?void 0:b.optionProps)||{},P=Object.assign({clearable:!0,disabled:!1},b||{});return{name:"#select",optionProps:w,options:(b==null?void 0:b.options)||[],props:P,events:R}},C=(b,S)=>{let R={openLabel:"是",closeLabel:"否",openValue:"Y",closeValue:"N"},w="Y";xeUtils.isObject(b)&&!xeUtils.isFunction(b)?(R=Object.assign(R,b||{}),w=b.defaultValue||w):!xeUtils.isEmpty(b)&&xeUtils.isString(b)&&(w=b,R=Object.assign(R,{defaultValue:w}));const P=xeUtils.isFunction(b)?B(b):B(S);return{name:"$switch",props:R,defaultValue:w,events:P}},D=(b,S)=>({name:"#tag",props:{code:b,tagMap:S}}),L=(b,S)=>{const R={openLabel:"启用",closeLabel:"禁用",openValue:"1",closeValue:"0",defaultValue:"1"};!xeUtils.isFunction(b)&&xeUtils.isObject(b)&&Object.assign(R,b);const w=xeUtils.isFunction(b)?b:S;return C(R,w)},B=b=>{let S={};return xeUtils.isObject(b)&&!xeUtils.isFunction(b)?S={change:(b==null?void 0:b.onChange)||F,blur:(b==null?void 0:b.onBlur)||F,focus:(b==null?void 0:b.onFocus)||F,input:(b==null?void 0:b.onInput)||F}:b&&(S={change:b}),S};function F(){}return{renderDict:t,renderSelect:r,renderInput:u,renderTextarea:d,renderCheckBox:p,renderRadio:v,renderUser:n,renderSysUser:o,renderInvOrg:s,renderBU:c,renderNumber:_,renderLov:f,renderSelectLocal:E,renderDate:N,renderSwitch:C,renderCellTag:D,renderEnabled:L}},useGlobal=()=>{const e=vue.getCurrentInstance();if(!e)return{$global:{},$storage:{},$config:{}};const t=e.appContext.app.config.globalProperties,r=t.$storage,n=t.$config,o=t.$serviceApi,s=t.$hasAuthority,c=t.$printPlugin;return{$global:t,$storage:r,$config:n,$serviceApi:o,$hasAuthority:s,$printPlugin:c}},hexList=[];for(let e=0;e<=15;e++)hexList[e]=e.toString(16);function buildUUID(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=hexList[Math.random()*4|8]:e+=hexList[Math.random()*16|0];return e.replace(/-/g,"")}let unique=0;function buildShortUUID(e=""){const t=Date.now(),r=Math.floor(Math.random()*1e9);return unique++,e+"_"+r+unique+String(t)}const deviceDetection=()=>{const e=navigator.userAgent.toLowerCase(),t=e.match(/iphone os/i)==="iphone os",r=e.match(/midp/i)==="midp",n=e.match(/rv:1.2.3.4/i)==="rv:1.2.3.4",o=e.match(/ucweb/i)==="ucweb",s=e.match(/android/i)==="android",c=e.match(/windows ce/i)==="windows ce",u=e.match(/windows mobile/i)==="windows mobile";return t||r||n||o||s||c||u},getBrowserInfo=()=>{const e=navigator.userAgent.toLowerCase(),t=/(msie|firefox|chrome|opera|version).*?([\d.]+)/,r=e.match(t);return{browser:r[1].replace(/version/,"'safari"),version:r[2]}},showMessage=(e,t="message",r={})=>{var n,o;return t==="alert"?(n=VXETable.modal)==null?void 0:n.alert({content:e,...r}):(o=VXETable.modal)==null?void 0:o.message({content:e,...r})},successMessage=(e="操作成功",t={})=>{var r;return(r=VXETable.modal)==null?void 0:r.message({content:e,...t,status:"success"})},warnMessage=(e,t={})=>{var r,n;return t.type==="alert"?(r=VXETable.modal)==null?void 0:r.alert({content:e,...t,status:"warning"}):(n=VXETable.modal)==null?void 0:n.message({content:e,duration:5e3,...t,status:"warning"})},errorMessage=(e="操作失败",t={})=>{var r,n;return t.type==="alert"?(r=VXETable.modal)==null?void 0:r.alert({content:e,...t,status:"error"}):(n=VXETable.modal)==null?void 0:n.message({content:e,...t,status:"error"})},renderHook=useRender(),i18nColums=e=>e.filter(t=>!t.isHidden).map(t=>(t.type||(t.title=t.title||`message.${t.field}`,t.field!=="operate"&&(t.width>99||t.minWidth)&&(t.showOverflow="tooltip")),t)),formatItems=(e,t,r=24)=>e.length?e.filter(n=>!n.isHidden).map(n=>{var c,u;n.title=n.title||`message.${n.field}`,n.span=n.span||r;const o=n.disabled||((u=(c=n.itemRender)==null?void 0:c.props)==null?void 0:u.disabled)||t==="detail";let s={name:"$input",props:{disabled:o}};return n.code&&!n.itemRender&&(s=renderHook.renderDict(n.code)),n.itemRender=n.itemRender||s,Object.assign(n.itemRender.props||{},{disabled:o}),n}):e,searchBtn={span:6,align:"right",collapseNode:!1,itemRender:{name:"$buttons",children:[{props:{type:"submit",content:"message.SEARCH",status:"primary",icon:"ri-search-line"}},{props:{type:"reset",content:"message.RESET",status:"info",icon:"ri-refresh-line"}}]}},formatGridItems=(e,t)=>{const r=e.filter(u=>!u.isHidden),n=r.length,o=n>2&&r.some((u,d)=>d<3&&(u.span>6||getDateRange(u))),s=o||n>3,c=r.map((u,d)=>(u.folding=o?s&&d>1:s&&d>2,u.span=getDateRange(u)?12:u.span||6,u.code&&!u.itemRender&&(u.itemRender=renderHook.renderDict(u.code)),u.itemRender=u.itemRender||{name:"$input"},u.resetValue=u.itemRender.defaultValue,u.title=u.title||`message.${u.field}`,u));if(searchBtn.collapseNode=s,s){const u=o?2:3;c.splice(u,0,searchBtn)}else c.push(searchBtn);return t&&searchBtn.itemRender.children.length<3&&searchBtn.itemRender.children.push(t),c},getDateRange=e=>{var t,r,n,o,s;return((t=e.itemRender)==null?void 0:t.name)==="#SuDateRange"?((n=(r=e.itemRender)==null?void 0:r.props)==null?void 0:n.type)==="daterange"||!((s=(o=e.itemRender)==null?void 0:o.props)!=null&&s.type):!1},formatRules=(e,t)=>{const r={};return e.forEach(n=>{if(n.required){const{field:o,title:s}=n;r[o]=[{required:!0,message:`${t("message.required")}${t(s||`message.${o}`)}`}]}}),r},expandedPaths=[];function extractPathList(e){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const t of e)t.children&&t.children.length>0&&extractPathList(t.children),expandedPaths.push(t.uniqueId);return expandedPaths}}function deleteTreeChildren(e,t=[]){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const[r,n]of e.entries())n.children&&n.children.length===1&&delete n.children,n.id=r,n.parentId=t.length?t[t.length-1]:null,n.pathList=[...t,n.id],n.uniqueId=n.pathList.length>1?n.pathList.join("-"):n.pathList[0],n.children&&n.children.length>0&&deleteTreeChildren(n.children,n.pathList);return e}}function buildHierarchyTree(e,t=[]){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!(!e||e.length===0)){for(const[r,n]of e.entries())n.id=r,n.parentId=t.length?t[t.length-1]:null,n.pathList=[...t,n.id],n.children&&n.children.length>0&&buildHierarchyTree(n.children,n.pathList);return e}}function getNodeByUniqueId(e,t){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!e||e.length===0)return;const r=e.find(o=>o.uniqueId===t);if(r)return r;const n=e.filter(o=>o.children).map(o=>o.children).flat(1);return getNodeByUniqueId(n,t)}function appendFieldByUniqueId(e,t,r){if(!Array.isArray(e)){console.warn("menuTree must be an array");return}if(!e||e.length===0)return{};for(const n of e){const o=n.children&&n.children.length>0;n.uniqueId===t&&Object.prototype.toString.call(r)==="[object Object]"&&Object.assign(n,r),o&&appendFieldByUniqueId(n.children,t,r)}return e}/*! typescript-cookie v1.0.4 | MIT */const encodeName=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),encodeValue=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),decodeName=decodeURIComponent,decodeValue=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function stringifyAttributes(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,r])=>r!=null&&r!==!1).map(([t,r])=>r===!0?`; ${t}`:`; ${t}=${r.split(";")[0]}`).join("")}function get(e,t,r){const n=/(?:^|; )([^=]*)=([^;]*)/g,o={};let s;for(;(s=n.exec(document.cookie))!=null;)try{const c=r(s[1]);if(o[c]=t(s[2],c),e===c)break}catch{}return e!=null?o[e]:o}const DEFAULT_CODEC=Object.freeze({decodeName,decodeValue,encodeName,encodeValue}),DEFAULT_ATTRIBUTES=Object.freeze({path:"/"});function setCookie(e,t,r=DEFAULT_ATTRIBUTES,{encodeValue:n=encodeValue,encodeName:o=encodeName}={}){return document.cookie=`${o(e)}=${n(t,e)}${stringifyAttributes(r)}`}function getCookie(e,{decodeValue:t=decodeValue,decodeName:r=decodeName}={}){return get(e,t,r)}function getCookies({decodeValue:e=decodeValue,decodeName:t=decodeName}={}){return get(void 0,e,t)}function removeCookie(e,t=DEFAULT_ATTRIBUTES){setCookie(e,"",Object.assign({},t,{expires:-1}))}function init(e,t){const r={set:function(o,s,c){return setCookie(o,s,Object.assign({},this.attributes,c),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return getCookies(this.converter.read);if(o!=null)return getCookie(o,this.converter.read)},remove:function(o,s){removeCookie(o,Object.assign({},this.attributes,s))},withAttributes:function(o){return init(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return init(Object.assign({},this.converter,o),this.attributes)}},n={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(r,n)}init({read:DEFAULT_CODEC.decodeValue,write:DEFAULT_CODEC.encodeValue},DEFAULT_ATTRIBUTES);class Cookies{constructor(){G(this,"prefix",null);G(this,"addPrefix",t=>{this.prefix=t})}set(t="default",r=""){setCookie(`${this.getKey(t)}`,r)}get(t="default"){return getCookie(`${this.getKey(t)}`)}getAll(){return getCookie("")}remove(t="default"){removeCookie(`${this.getKey(t)}`)}getKey(t){return this.prefix?this.prefix+"_"+t:t}}const cookies$1=new Cookies;function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,kindOf=(e=>t=>{const r=toString.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||toString.call(e)===t||isFunction(e.toString)&&e.toString()===t)},isURLSearchParams=kindOfTest("URLSearchParams"),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),c=s.length;let u;for(n=0;n<c;n++)u=s[n],t.call(null,e[u],u,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const _global=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},r=(n,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(n)?t[s]=merge(t[s],n):isPlainObject(n)?t[s]=merge({},n):isArray(n)?t[s]=n.slice():t[s]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&forEach(arguments[n],r);return t}const extend=(e,t,r,{allOwnKeys:n}={})=>(forEach(t,(o,s)=>{r&&isFunction(o)?e[s]=bind(o,r):e[s]=o},{allOwnKeys:n}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject=(e,t,r,n)=>{let o,s,c;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)c=o[s],(!n||n(c,e,t))&&!u[c]&&(t[c]=e[c],u[c]=!0);e=r!==!1&&getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,(o,s)=>{t(o,s,e)!==!1&&(n[s]=o)}),Object.defineProperties(e,n)},freezeMethods=e=>{reduceDescriptors(e,(t,r)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(isFunction(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet=(e,t)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return isArray(e)?n(e):n(String(e).split(t)),r},noop=()=>{},toFiniteNumber=(e,t)=>(e=+e,Number.isFinite(e)?e:t),toJSONObject=e=>{const t=new Array(10),r=(n,o)=>{if(isObject(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const s=isArray(n)?[]:{};return forEach(n,(c,u)=>{const d=r(c,o+1);!isUndefined(d)&&(s[u]=d)}),t[o]=void 0,s}}return n};return r(e,0)},utils={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,toJSONObject};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}utils.inherits(AxiosError,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,s)=>{const c=Object.create(prototype$1);return utils.toFlatObject(e,c,function(d){return d!==Error.prototype},u=>u!=="isAxiosError"),AxiosError.call(c,e.message,t,r,n,o),c.cause=e,c.name=e.name,s&&Object.assign(c,s),c};var browser=typeof self=="object"?self.FormData:window.FormData;const FormData$2=browser;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!r&&s?"["+o+"]":o}).join(r?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,function e(t){return/^is[A-Z]/.test(t)});function isSpecCompliant(e){return e&&utils.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function toFormData(e,t,r){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new(FormData$2||FormData),r=utils.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,C){return!utils.isUndefined(C[E])});const n=r.metaTokens,o=r.visitor||v,s=r.dots,c=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&isSpecCompliant(t);if(!utils.isFunction(o))throw new TypeError("visitor must be a function");function p(f){if(f===null)return"";if(utils.isDate(f))return f.toISOString();if(!d&&utils.isBlob(f))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(f)||utils.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function v(f,E,C){let D=f;if(f&&!C&&typeof f=="object"){if(utils.endsWith(E,"{}"))E=n?E:E.slice(0,-2),f=JSON.stringify(f);else if(utils.isArray(f)&&isFlatArray(f)||utils.isFileList(f)||utils.endsWith(E,"[]")&&(D=utils.toArray(f)))return E=removeBrackets(E),D.forEach(function(B,F){!(utils.isUndefined(B)||B===null)&&t.append(c===!0?renderKey([E],F,s):c===null?E:E+"[]",p(B))}),!1}return isVisitable(f)?!0:(t.append(renderKey(C,E,s),p(f)),!1)}const y=[],_=Object.assign(predicates,{defaultVisitor:v,convertValue:p,isVisitable});function N(f,E){if(!utils.isUndefined(f)){if(y.indexOf(f)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(f),utils.forEach(f,function(D,L){(!(utils.isUndefined(D)||D===null)&&o.call(t,D,utils.isString(L)?L.trim():L,E,_))===!0&&N(D,E?E.concat(L):[L])}),y.pop()}}if(!utils.isObject(e))throw new TypeError("data must be an object");return N(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function e(t,r){this._pairs.push([t,r])},prototype.toString=function e(t){const r=t?function(n){return t.call(this,n,encode$1)}:encode$1;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode,o=r&&r.serialize;let s;if(o?s=o(t,r):s=utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),s){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils.forEach(this.handlers,function(n){n!==null&&t(n)})}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=FormData,isStandardBrowserEnv=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),isStandardBrowserWebWorkerEnv=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),platform={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob},isStandardBrowserEnv,isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,s){return platform.isNode&&utils.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}function formDataToJSON(e){function t(r,n,o,s){let c=r[s++];const u=Number.isFinite(+c),d=s>=r.length;return c=!c&&utils.isArray(o)?o.length:c,d?(utils.hasOwnProp(o,c)?o[c]=[o[c],n]:o[c]=n,!u):((!o[c]||!utils.isObject(o[c]))&&(o[c]=[]),t(r,n,o[c],s)&&utils.isArray(o[c])&&(o[c]=arrayToObject(o[c])),!u)}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const r={};return utils.forEachEntry(e,(n,o)=>{t(parsePropPath(n),o,r,0)}),r}return null}const DEFAULT_CONTENT_TYPE={"Content-Type":void 0};function stringifySafely(e,t,r){if(utils.isString(e))try{return(t||JSON.parse)(e),utils.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function e(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=utils.isObject(t);if(s&&utils.isHTMLForm(t)&&(t=new FormData(t)),utils.isFormData(t))return o&&o?JSON.stringify(formDataToJSON(t)):t;if(utils.isArrayBuffer(t)||utils.isBuffer(t)||utils.isStream(t)||utils.isFile(t)||utils.isBlob(t))return t;if(utils.isArrayBufferView(t))return t.buffer;if(utils.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((u=utils.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return toFormData(u?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function e(t){const r=this.transitional||defaults.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&utils.isString(t)&&(n&&!this.responseType||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(c)throw u.name==="SyntaxError"?AxiosError.from(u,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],function e(t){defaults.headers[t]={}}),utils.forEach(["post","put","patch"],function e(t){defaults.headers[t]=utils.merge(DEFAULT_CONTENT_TYPE)});const defaults$1=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
7
|
+
`).forEach(function(c){o=c.indexOf(":"),r=c.substring(0,o).trim().toLowerCase(),n=c.substring(o+1).trim(),!(!r||t[r]&&ignoreDuplicateOf[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function matchHeaderValue(e,t,r,n){if(utils.isFunction(n))return n.call(this,t,r);if(utils.isString(t)){if(utils.isString(n))return t.indexOf(n)!==-1;if(utils.isRegExp(n))return n.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function buildAccessors(e,t){const r=utils.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,s,c){return this[n].call(this,t,o,s,c)},configurable:!0})})}class AxiosHeaders{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function s(u,d,p){const v=normalizeHeader(d);if(!v)throw new Error("header name must be a non-empty string");const y=utils.findKey(o,v);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||d]=normalizeValue(u))}const c=(u,d)=>utils.forEach(u,(p,v)=>s(p,v,d));return utils.isPlainObject(t)||t instanceof this.constructor?c(t,r):utils.isString(t)&&(t=t.trim())&&!isValidHeaderName(t)?c(parseHeaders(t),r):t!=null&&s(r,t,n),this}get(t,r){if(t=normalizeHeader(t),t){const n=utils.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return parseTokens(o);if(utils.isFunction(r))return r.call(this,o,n);if(utils.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=normalizeHeader(t),t){const n=utils.findKey(this,t);return!!(n&&(!r||matchHeaderValue(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function s(c){if(c=normalizeHeader(c),c){const u=utils.findKey(n,c);u&&(!r||matchHeaderValue(n,n[u],u,r))&&(delete n[u],o=!0)}}return utils.isArray(t)?t.forEach(s):s(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const r=this,n={};return utils.forEach(this,(o,s)=>{const c=utils.findKey(n,s);if(c){r[c]=normalizeValue(o),delete r[s];return}const u=t?formatHeader(s):String(s).trim();u!==s&&delete r[s],r[u]=normalizeValue(o),n[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return utils.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&utils.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
8
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function s(c){const u=normalizeHeader(c);n[u]||(buildAccessors(o,c),n[u]=!0)}return utils.isArray(t)?t.forEach(s):s(t),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),utils.freezeMethods(AxiosHeaders.prototype),utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(e,t){const r=this||defaults$1,n=t||r,o=AxiosHeaders$1.from(n.headers);let s=n.data;return utils.forEach(e,function(u){s=u.call(r,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function isCancel(e){return!!(e&&e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,e??"canceled",AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});const httpAdapter=null;function settle(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const cookies=platform.isStandardBrowserEnv?function e(){return{write:function(r,n,o,s,c,u){const d=[];d.push(r+"="+encodeURIComponent(n)),utils.isNumber(o)&&d.push("expires="+new Date(o).toGMTString()),utils.isString(s)&&d.push("path="+s),utils.isString(c)&&d.push("domain="+c),u===!0&&d.push("secure"),document.cookie=d.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function e(){return{write:function(){},read:function(){return null},remove:function(){}}}();function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t}const isURLSameOrigin=platform.isStandardBrowserEnv?function e(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(s){let c=s;return t&&(r.setAttribute("href",c),c=r.href),r.setAttribute("href",c),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(c){const u=utils.isString(c)?o(c):c;return u.protocol===n.protocol&&u.host===n.host}}():function e(){return function(){return!0}}();function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,s=0,c;return t=t!==void 0?t:1e3,function(d){const p=Date.now(),v=n[s];c||(c=p),r[o]=d,n[o]=p;let y=s,_=0;for(;y!==o;)_+=r[y++],y=y%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),p-c<t)return;const N=v&&p-v;return N?Math.round(_*1e3/N):void 0}}function progressEventReducer(e,t){let r=0;const n=speedometer(50,250);return o=>{const s=o.loaded,c=o.lengthComputable?o.total:void 0,u=s-r,d=n(u),p=s<=c;r=s;const v={loaded:s,total:c,progress:c?s/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&p?(c-s)/d:void 0,event:o};v[t?"download":"upload"]=!0,e(v)}}const isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(r,n){let o=e.data;const s=AxiosHeaders$1.from(e.headers).normalize(),c=e.responseType;let u;function d(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}utils.isFormData(o)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let p=new XMLHttpRequest;if(e.auth){const N=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+f))}const v=buildFullPath(e.baseURL,e.url);p.open(e.method.toUpperCase(),buildURL(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function y(){if(!p)return;const N=AxiosHeaders$1.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:N,config:e,request:p};settle(function(D){r(D),d()},function(D){n(D),d()},E),p=null}if("onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,p)),p=null)},p.onerror=function(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||transitionalDefaults;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),n(new AxiosError(f,E.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,p)),p=null},platform.isStandardBrowserEnv){const N=(e.withCredentials||isURLSameOrigin(v))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);N&&s.set(e.xsrfHeaderName,N)}o===void 0&&s.setContentType(null),"setRequestHeader"in p&&utils.forEach(s.toJSON(),function(f,E){p.setRequestHeader(E,f)}),utils.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),c&&c!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=N=>{p&&(n(!N||N.type?new CanceledError(null,e,p):N),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const _=parseProtocol(v);if(_&&platform.protocols.indexOf(_)===-1){n(new AxiosError("Unsupported protocol "+_+":",AxiosError.ERR_BAD_REQUEST,e));return}p.send(o||null)})},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const adapters={getAdapter:e=>{e=utils.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=utils.isString(r)?knownAdapters[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new AxiosError(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(utils.hasOwnProp(knownAdapters,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!utils.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults$1.adapter)(e).then(function(n){return throwIfCancellationRequested(e),n.data=transformData.call(e,e.transformResponse,n),n.headers=AxiosHeaders$1.from(n.headers),n},function(n){return isCancel(n)||(throwIfCancellationRequested(e),n&&n.response&&(n.response.data=transformData.call(e,e.transformResponse,n.response),n.response.headers=AxiosHeaders$1.from(n.response.headers))),Promise.reject(n)})}const headersToObject=e=>e instanceof AxiosHeaders$1?e.toJSON():e;function mergeConfig(e,t){t=t||{};const r={};function n(p,v,y){return utils.isPlainObject(p)&&utils.isPlainObject(v)?utils.merge.call({caseless:y},p,v):utils.isPlainObject(v)?utils.merge({},v):utils.isArray(v)?v.slice():v}function o(p,v,y){if(utils.isUndefined(v)){if(!utils.isUndefined(p))return n(void 0,p,y)}else return n(p,v,y)}function s(p,v){if(!utils.isUndefined(v))return n(void 0,v)}function c(p,v){if(utils.isUndefined(v)){if(!utils.isUndefined(p))return n(void 0,p)}else return n(void 0,v)}function u(p,v,y){if(y in t)return n(p,v);if(y in e)return n(void 0,p)}const d={url:s,method:s,data:s,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:u,headers:(p,v)=>o(headersToObject(p),headersToObject(v),!0)};return utils.forEach(Object.keys(e).concat(Object.keys(t)),function(v){const y=d[v]||o,_=y(e[v],t[v],v);utils.isUndefined(_)&&y!==u||(r[v]=_)}),r}const VERSION="1.2.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function e(t,r,n){function o(s,c){return"[Axios v"+VERSION+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return(s,c,u)=>{if(t===!1)throw new AxiosError(o(c," has been removed"+(r?" in "+r:"")),AxiosError.ERR_DEPRECATED);return r&&!deprecatedWarnings[c]&&(deprecatedWarnings[c]=!0,console.warn(o(c," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,c,u):!0}};function assertOptions(e,t,r){if(typeof e!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],c=t[s];if(c){const u=e[s],d=u===void 0||c(u,s,e);if(d!==!0)throw new AxiosError("option "+s+" must be "+d,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new AxiosError("Unknown option "+s,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=mergeConfig(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!==void 0&&validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c;c=s&&utils.merge(s.common,s[r.method]),c&&utils.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=AxiosHeaders$1.concat(c,s);const u=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(r)===!1||(d=d&&E.synchronous,u.unshift(E.fulfilled,E.rejected))});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let v,y=0,_;if(!d){const f=[dispatchRequest.bind(this),void 0];for(f.unshift.apply(f,u),f.push.apply(f,p),_=f.length,v=Promise.resolve(r);y<_;)v=v.then(f[y++],f[y++]);return v}_=u.length;let N=r;for(y=0;y<_;){const f=u[y++],E=u[y++];try{N=f(N)}catch(C){E.call(this,C);break}}try{v=dispatchRequest.call(this,N)}catch(f){return Promise.reject(f)}for(y=0,_=p.length;y<_;)v=v.then(p[y++],p[y++]);return v}getUri(t){t=mergeConfig(this.defaults,t);const r=buildFullPath(t.baseURL,t.url);return buildURL(r,t.params,t.paramsSerializer)}};utils.forEach(["delete","get","head","options"],function e(t){Axios$1.prototype[t]=function(r,n){return this.request(mergeConfig(n||{},{method:t,url:r,data:(n||{}).data}))}}),utils.forEach(["post","put","patch"],function e(t){function r(n){return function(s,c,u){return this.request(mergeConfig(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:c}))}}Axios$1.prototype[t]=r(),Axios$1.prototype[t+"Form"]=r(!0)});const Axios$2=Axios$1;class CancelToken{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const c=new Promise(u=>{n.subscribe(u),s=u}).then(o);return c.cancel=function(){n.unsubscribe(s)},c},t(function(s,c,u){n.reason||(n.reason=new CanceledError(s,c,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new CancelToken(function(o){t=o}),cancel:t}}}const CancelToken$1=CancelToken;function spread(e){return function(r){return e.apply(null,r)}}function isAxiosError(e){return utils.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([e,t])=>{HttpStatusCode[t]=e});const HttpStatusCode$1=HttpStatusCode;function createInstance(e){const t=new Axios$2(e),r=bind(Axios$2.prototype.request,t);return utils.extend(r,Axios$2.prototype,t,{allOwnKeys:!0}),utils.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return createInstance(mergeConfig(e,o))},r}const axios=createInstance(defaults$1);axios.Axios=Axios$2,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function e(t){return Promise.all(t)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e),axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const Axios=axios;exports.NProgress={};var nprogress={get exports(){return exports.NProgress},set exports(e){exports.NProgress=e}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
9
|
+
* @license MIT */(function(e,t){(function(r,n){e.exports=n()})(commonjsGlobal,function(){var r={};r.version="0.2.0";var n=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};r.configure=function(f){var E,C;for(E in f)C=f[E],C!==void 0&&f.hasOwnProperty(E)&&(n[E]=C);return this},r.status=null,r.set=function(f){var E=r.isStarted();f=o(f,n.minimum,1),r.status=f===1?null:f;var C=r.render(!E),D=C.querySelector(n.barSelector),L=n.speed,B=n.easing;return C.offsetWidth,u(function(F){n.positionUsing===""&&(n.positionUsing=r.getPositioningCSS()),d(D,c(f,L,B)),f===1?(d(C,{transition:"none",opacity:1}),C.offsetWidth,setTimeout(function(){d(C,{transition:"all "+L+"ms linear",opacity:0}),setTimeout(function(){r.remove(),F()},L)},L)):setTimeout(F,L)}),this},r.isStarted=function(){return typeof r.status=="number"},r.start=function(){r.status||r.set(0);var f=function(){setTimeout(function(){r.status&&(r.trickle(),f())},n.trickleSpeed)};return n.trickle&&f(),this},r.done=function(f){return!f&&!r.status?this:r.inc(.3+.5*Math.random()).set(1)},r.inc=function(f){var E=r.status;return E?(typeof f!="number"&&(f=(1-E)*o(Math.random()*E,.1,.95)),E=o(E+f,0,.994),r.set(E)):r.start()},r.trickle=function(){return r.inc(Math.random()*n.trickleRate)},function(){var f=0,E=0;r.promise=function(C){return!C||C.state()==="resolved"?this:(E===0&&r.start(),f++,E++,C.always(function(){E--,E===0?(f=0,r.done()):r.set((f-E)/f)}),this)}}(),r.render=function(f){if(r.isRendered())return document.getElementById("nprogress");v(document.documentElement,"nprogress-busy");var E=document.createElement("div");E.id="nprogress",E.innerHTML=n.template;var C=E.querySelector(n.barSelector),D=f?"-100":s(r.status||0),L=document.querySelector(n.parent),B;return d(C,{transition:"all 0 linear",transform:"translate3d("+D+"%,0,0)"}),n.showSpinner||(B=E.querySelector(n.spinnerSelector),B&&N(B)),L!=document.body&&v(L,"nprogress-custom-parent"),L.appendChild(E),E},r.remove=function(){y(document.documentElement,"nprogress-busy"),y(document.querySelector(n.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&N(f)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var f=document.body.style,E="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return E+"Perspective"in f?"translate3d":E+"Transform"in f?"translate":"margin"};function o(f,E,C){return f<E?E:f>C?C:f}function s(f){return(-1+f)*100}function c(f,E,C){var D;return n.positionUsing==="translate3d"?D={transform:"translate3d("+s(f)+"%,0,0)"}:n.positionUsing==="translate"?D={transform:"translate("+s(f)+"%,0)"}:D={"margin-left":s(f)+"%"},D.transition="all "+E+"ms "+C,D}var u=function(){var f=[];function E(){var C=f.shift();C&&C(E)}return function(C){f.push(C),f.length==1&&E()}}(),d=function(){var f=["Webkit","O","Moz","ms"],E={};function C(F){return F.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(b,S){return S.toUpperCase()})}function D(F){var b=document.body.style;if(F in b)return F;for(var S=f.length,R=F.charAt(0).toUpperCase()+F.slice(1),w;S--;)if(w=f[S]+R,w in b)return w;return F}function L(F){return F=C(F),E[F]||(E[F]=D(F))}function B(F,b,S){b=L(b),F.style[b]=S}return function(F,b){var S=arguments,R,w;if(S.length==2)for(R in b)w=b[R],w!==void 0&&b.hasOwnProperty(R)&&B(F,R,w);else B(F,S[1],S[2])}}();function p(f,E){var C=typeof f=="string"?f:_(f);return C.indexOf(" "+E+" ")>=0}function v(f,E){var C=_(f),D=C+E;p(C,E)||(f.className=D.substring(1))}function y(f,E){var C=_(f),D;p(f,E)&&(D=C.replace(" "+E+" "," "),f.className=D.substring(1,D.length-1))}function _(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function N(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return r})})(nprogress);const NProgress=exports.NProgress;NProgress.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,minimum:.3});const kTOKENKEY="authorized-token",defaultConfig={timeout:18e4,headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}},$=class{constructor(){G(this,"router");G(this,"baseUrl",null);this.httpInterceptorsRequest(),this.httpInterceptorsResponse()}setRouter(t){this.router=t}setBaseUrl(t){this.baseUrl=t}static retryOriginalRequest(t){return new Promise(r=>{$.requests.push(n=>{t.headers.Authorization="Bearer "+n,r(t)})})}httpInterceptorsRequest(){$.axiosInstance.interceptors.request.use(t=>(exports.NProgress.start(),typeof t.beforeRequestCallback=="function"?(t.beforeRequestCallback(t),t):$.initConfig.beforeRequestCallback?($.initConfig.beforeRequestCallback(t),t):["/refreshToken","/login"].some(n=>t.url.indexOf(n)>-1)?t:new Promise(n=>{const o=cookies$1.get(kTOKENKEY);if(o){const s=JSON.parse(o),c=new Date().getTime();if(s.expires-c<=0){debugger;$.isRefreshing||($.isRefreshing=!0,this.get(this.baseUrl+"/uath/refreshToken",{refreshToken:s.refreshToken}).then(d=>{this.setToken(d),t.headers.Authorization="Bearer "+d.access_token,$.requests.forEach(p=>p(d.access_token)),$.requests=[]}).finally(()=>{$.isRefreshing=!1})),n($.retryOriginalRequest(t))}else t.headers.Authorization="Bearer "+s.accessToken,n(t)}else{const s=cookies$1.get("kCookies_token");s&&(t.headers["X-Token"]=s),n(t)}})),t=>Promise.reject(t))}setToken(t){const{access_token:r,expires_in:n,refresh_token:o}=t,s={accessToken:r,refreshToken:o,expires:Date.now()+n*1e3};cookies$1.set(kTOKENKEY,JSON.stringify(s))}httpInterceptorsResponse(){$.axiosInstance.interceptors.response.use(r=>{const n=r.config;return exports.NProgress.done(),typeof n.beforeResponseCallback=="function"?(n.beforeResponseCallback(r),r.data):($.initConfig.beforeResponseCallback&&$.initConfig.beforeResponseCallback(r),r.data)},r=>{const n=r;return n.isCancelRequest=Axios.isCancel(n),exports.NProgress.done(),Promise.reject(n)})}transformConfigByMethod(t,r){const{method:n}=r,o=["get"],s=n.toLocaleLowerCase(),c=o.includes(s)?"params":"data";return{...r,[c]:t}}request(t,r,n,o){const s=this.transformConfigByMethod(n,{method:t,url:r,...o});return new Promise((c,u)=>{$.axiosInstance.request(s).then(d=>{var p;if(d&&(d==null?void 0:d.code)==="0")c(d.data);else if(d.code==="500")errorMessage(d.msg,{duration:8e3}),u(d.msg);else if((d==null?void 0:d.code)!=="-1")c(d);else{const v=(d==null?void 0:d.msg)||"服务异常";errorMessage(v,{duration:8e3});const y=d.code;(y==="000001"||y==="-1"&&v.includes("请重新登陆"))&&(cookies$1.remove("kCookies_token"),(p=this.router)==null||p.push({path:"/login",query:{tokenExpire:"Y"}})),u(v)}}).catch(d=>{d!=null&&d.code&&errorMessage(d==null?void 0:d.message,{duration:8e3}),u(d)})})}post(t,r,n){return this.request("post",t,r,n)}delete(t,r,n){return this.request("delete",t,r,n)}put(t,r,n){return this.request("put",t,r,n)}get(t,r,n){for(const o in r)r[o]||delete r[o];return this.request("get",t,r,n)}postRouter(t){return this.request("post","route/service",t)}};let SuHttp=$;G(SuHttp,"requests",[]),G(SuHttp,"isRefreshing",!1),G(SuHttp,"initConfig",{}),G(SuHttp,"axiosInstance",Axios.create(defaultConfig));const http=new SuHttp,lunarCalendar={lunarInfo:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,92821,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,37600,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,41680,53584,62034,54560],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],Gan:["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],Zhi:["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],Animals:["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],festival:{"1-1":{title:"元旦节"},"2-14":{title:"情人节"},"5-1":{title:"劳动节"},"5-4":{title:"青年节"},"6-1":{title:"儿童节"},"9-10":{title:"教师节"},"10-1":{title:"国庆节"},"12-25":{title:"圣诞节"},"3-8":{title:"妇女节"},"3-12":{title:"植树节"},"4-1":{title:"愚人节"},"5-12":{title:"护士节"},"7-1":{title:"建党节"},"8-1":{title:"建军节"},"12-24":{title:"平安夜"}},lFestival:{"12-30":{title:"除夕"},"1-1":{title:"春节"},"1-15":{title:"元宵节"},"2-2":{title:"龙抬头"},"5-5":{title:"端午节"},"7-7":{title:"七夕节"},"7-15":{title:"中元节"},"8-15":{title:"中秋节"},"9-9":{title:"重阳节"},"10-1":{title:"寒衣节"},"10-15":{title:"下元节"},"12-8":{title:"腊八节"},"12-23":{title:"北方小年"},"12-24":{title:"南方小年"}},getFestival(){return this.festival},getLunarFestival(){return this.lFestival},setFestival(e={}){this.festival=e},setLunarFestival(e={}){this.lFestival=e},solarTerm:["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],sTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1:["日","一","二","三","四","五","六","七","八","九","十"],nStr2:["初","十","廿","卅"],nStr3:["正","二","三","四","五","六","七","八","九","十","冬","腊"],lYearDays:function(e){let t,r=348;for(t=32768;t>8;t>>=1)r+=this.lunarInfo[e-1900]&t?1:0;return r+this.leapDays(e)},leapMonth:function(e){return this.lunarInfo[e-1900]&15},leapDays:function(e){return this.leapMonth(e)?this.lunarInfo[e-1900]&65536?30:29:0},monthDays:function(e,t){return t>12||t<1?-1:this.lunarInfo[e-1900]&65536>>t?30:29},solarDays:function(e,t){if(t>12||t<1)return-1;const r=t-1;return r===1?e%4===0&&e%100!==0||e%400===0?29:28:this.solarMonth[r]},toGanZhiYear:function(e){let t=(e-3)%10,r=(e-3)%12;return t===0&&(t=10),r===0&&(r=12),this.Gan[t-1]+this.Zhi[r-1]},toAstro:function(e,t){const r="摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯",n=[20,19,21,21,21,22,23,23,23,23,22,22];return r.substr(e*2-(t<n[e-1]?2:0),2)+"座"},toGanZhi:function(e){return this.Gan[e%10]+this.Zhi[e%12]},getTerm:function(e,t){if(e<1900||e>2100||t<1||t>24)return-1;const r=this.sTermInfo[e-1900],n=[];for(let o=0;o<r.length;o+=5){const s=parseInt("0x"+r.substr(o,5)).toString();n.push(s[0],s.substr(1,2),s[3],s.substr(4,2))}return parseInt(n[t-1])},toChinaMonth:function(e){if(e>12||e<1)return-1;let t=this.nStr3[e-1];return t+="月",t},toChinaDay:function(e){let t;switch(e){case 10:t="初十";break;case 20:t="二十";break;case 30:t="三十";break;default:t=this.nStr2[Math.floor(e/10)],t+=this.nStr1[e%10]}return t},getAnimal:function(e){return this.Animals[(e-4)%12]},solar2lunar:function(e,t,r){let n=parseInt(e),o=parseInt(t),s=parseInt(r);if(n<1900||n>2100||n===1900&&o===1&&s<31)return-1;let c;n?c=new Date(n,parseInt(o.toString())-1,s):c=new Date;let u,d=0,p=0;n=c.getFullYear(),o=c.getMonth()+1,s=c.getDate();let v=(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate())-Date.UTC(1900,0,31))/864e5;for(u=1900;u<2101&&v>0;u++)p=this.lYearDays(u),v-=p;v<0&&(v+=p,u--);const y=new Date;let _=!1;y.getFullYear()===n&&y.getMonth()+1===o&&y.getDate()===s&&(_=!0);let N=c.getDay();const f=this.nStr1[N];N===0&&(N=7);const E=u;d=this.leapMonth(u);let C=!1;for(u=1;u<13&&v>0;u++)d>0&&u===d+1&&C===!1?(--u,C=!0,p=this.leapDays(E)):p=this.monthDays(E,u),C===!0&&u===d+1&&(C=!1),v-=p;v===0&&d>0&&u===d+1&&(C?C=!1:(C=!0,--u)),v<0&&(v+=p,--u);const D=u,L=v+1,B=o-1,F=this.toGanZhiYear(E),b=this.getTerm(n,o*2-1),S=this.getTerm(n,o*2);let R=this.toGanZhi((n-1900)*12+o+11);s>=b&&(R=this.toGanZhi((n-1900)*12+o+12));let w=!1,P;b===s&&(w=!0,P=this.solarTerm[o*2-2]),S===s&&(w=!0,P=this.solarTerm[o*2-1]);const k=Date.UTC(n,B,1,0,0,0,0)/864e5+25567+10,j=this.toGanZhi(k+s-1),V=this.toAstro(o,s),q=n+"-"+o+"-"+s,K=E+"-"+D+"-"+L,J=this.festival,Z=this.lFestival,Q=o+"-"+s;let ne=D+"-"+L;return D===12&&L===29&&this.monthDays(E,D)===29&&(ne="12-30"),{date:q,lunarDate:K,festival:J[Q]?J[Q].title:null,lunarFestival:Z[ne]?Z[ne].title:null,lYear:E,lMonth:D,lDay:L,Animal:this.getAnimal(E),IMonthCn:(C?"闰":"")+this.toChinaMonth(D),IDayCn:this.toChinaDay(L),cYear:n,cMonth:o,cDay:s,gzYear:F,gzMonth:R,gzDay:j,isToday:_,isLeap:C,nWeek:N,ncWeek:"星期"+f,isTerm:w,Term:P,astro:V}},lunar2solar:function(e,t,r,n){e=parseInt(e),t=parseInt(t),r=parseInt(r),n=!!n;const o=this.leapMonth(e);if(n&&o!==t||e===2100&&t===12&&r>1||e===1900&&t===1&&r<31)return-1;const s=this.monthDays(e,t);let c=s;if(n&&(c=this.leapDays(e)),e<1900||e>2100||r>c)return-1;let u=0,d;for(d=1900;d<e;d++)u+=this.lYearDays(d);let p=0,v=!1;for(d=1;d<t;d++)p=this.leapMonth(e),v||p<=d&&p>0&&(u+=this.leapDays(e),v=!0),u+=this.monthDays(e,d);n&&(u+=s);const y=Date.UTC(1900,1,30,0,0,0),_=new Date((u+r-31)*864e5+y),N=_.getUTCFullYear(),f=_.getUTCMonth()+1,E=_.getUTCDate();return this.solar2lunar(N,f,E)}};class Updater{constructor(t){G(this,"oldScript");G(this,"newScript");G(this,"dispatch");this.oldScript=[],this.newScript=[],this.dispatch={},this.init(),this.timing(t==null?void 0:t.timer)}async init(){const t=await this.getHtml();this.oldScript=this.parserScript(t)}async getHtml(){return await fetch("/").then(r=>r.text())}parserScript(t){const r=new RegExp(/<script(?:\s+[^>]*)?>(.*?)<\/script\s*>/gi);return t.match(r)}on(t,r){return(this.dispatch[t]||(this.dispatch[t]=[])).push(r),this}compare(t,r){var s;const n=t.length;Array.from(new Set(t.concat(r))).length===n?(s=this.dispatch["no-update"])==null||s.forEach(c=>{c()}):this.dispatch.update.forEach(c=>{c()})}timing(t=1e4){const r=setInterval(async()=>{window.clearInterval(r);const n=await this.getHtml();this.newScript=this.parserScript(n),this.compare(this.oldScript,this.newScript)},t)}}const withInstall=e=>{const t=e;return t.install=r=>{r.component(t.name,e)},e};function sleep(e=64){return new Promise(t=>{const r=setTimeout(()=>{window.clearTimeout(r),t(e)},e)})}const delay=e=>new Promise(t=>setTimeout(t,e)),useDark=()=>({isDark:vue.ref(document.documentElement.classList.contains("dark"))}),useDebounce=(e,t)=>{let r;return()=>{r&&clearTimeout(r),r=setTimeout(e,t)}};function isUrl(e){return/(((^http(s)?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(e)}const getDictName=(e,t)=>{var n,o;return!e||!t?null:(o=(n=storageLocal.getItem("kLov")[e])==null?void 0:n.children.find(s=>t===s.dictCode))==null?void 0:o.dictName};exports.Updater=Updater,exports.VxetableRender=VxetableRender,exports.addClass=addClass,exports.addResizeListener=addResizeListener,exports.appendFieldByUniqueId=appendFieldByUniqueId,exports.buildHierarchyTree=buildHierarchyTree,exports.buildShortUUID=buildShortUUID,exports.buildUUID=buildUUID,exports.cookies=cookies$1,exports.dbstorage=dbstorage,exports.delay=delay,exports.deleteTreeChildren=deleteTreeChildren,exports.deviceDetection=deviceDetection,exports.errorMessage=errorMessage,exports.extractPathList=extractPathList,exports.formatGridItems=formatGridItems,exports.formatItems=formatItems,exports.formatRules=formatRules,exports.getBrowserInfo=getBrowserInfo,exports.getDictName=getDictName,exports.getNodeByUniqueId=getNodeByUniqueId,exports.hasClass=hasClass,exports.http=http,exports.i18nColums=i18nColums,exports.isUrl=isUrl,exports.lunarCalendar=lunarCalendar,exports.openLink=openLink,exports.removeClass=removeClass,exports.removeResizeListener=removeResizeListener,exports.showMessage=showMessage,exports.sleep=sleep,exports.storageLocal=storageLocal,exports.storageSession=storageSession,exports.successMessage=successMessage,exports.toggleClass=toggleClass,exports.useAttrs=useAttrs,exports.useDark=useDark,exports.useDebounce=useDebounce,exports.useGlobal=useGlobal,exports.useRender=useRender,exports.useWatermark=useWatermark,exports.warnMessage=warnMessage,exports.withInstall=withInstall,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/dist/pkg/http/types.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2022-03-08 15:17:39
|
|
4
|
-
* @LastEditors: wei.li
|
|
5
|
-
* @LastEditTime: 2022-11-10 08:22:01
|
|
6
|
-
* @Description: SuHttp Axios 类型定义文件
|
|
7
|
-
*/
|
|
8
|
-
import { Method, AxiosError, AxiosResponse, AxiosRequestConfig } from "axios";
|
|
9
|
-
|
|
10
|
-
export type resultType = {
|
|
11
|
-
access_token: string;
|
|
12
|
-
refresh_token: string;
|
|
13
|
-
expires_in: number;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type RequestMethods = Extract<
|
|
17
|
-
Method,
|
|
18
|
-
"get" | "post" | "put" | "delete" | "patch" | "option" | "head"
|
|
19
|
-
>;
|
|
20
|
-
|
|
21
|
-
export interface SuHttpError extends AxiosError {
|
|
22
|
-
isCancelRequest?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface SuHttpResponse extends AxiosResponse {
|
|
26
|
-
config: SuHttpRequestConfig;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface SuHttpRequestConfig extends AxiosRequestConfig {
|
|
30
|
-
beforeRequestCallback?: (request: SuHttpRequestConfig) => void;
|
|
31
|
-
beforeResponseCallback?: (response: SuHttpResponse) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default class SuHttp {
|
|
35
|
-
request<T>(
|
|
36
|
-
method: RequestMethods,
|
|
37
|
-
url: string,
|
|
38
|
-
param?: AxiosRequestConfig,
|
|
39
|
-
axiosConfig?: SuHttpRequestConfig
|
|
40
|
-
): Promise<T>;
|
|
41
|
-
post<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
42
|
-
postRouter<T, P>(
|
|
43
|
-
url: string,
|
|
44
|
-
params?: T,
|
|
45
|
-
config?: SuHttpRequestConfig
|
|
46
|
-
): Promise<P>;
|
|
47
|
-
get<T, P>(url: string, params?: T, config?: SuHttpRequestConfig): Promise<P>;
|
|
48
|
-
}
|