yxuse 3.0.20 → 3.0.22
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/lib/api.cjs.js +1 -1
- package/lib/api.es.js +8 -6
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +14 -11
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +2 -2
- package/lib/hooks.cjs.js +1 -0
- package/lib/hooks.es.js +5 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs2.js +40 -1
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -3
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs6.js +3 -40
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +1 -0
- package/lib/index.cjs8.js +1 -0
- package/lib/index.es.js +15 -13
- package/lib/index.es2.js +8103 -34
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +117 -1653
- package/lib/index.es4.js +38 -20
- package/lib/index.es5.js +310 -132
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +1557 -7784
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +13 -0
- package/lib/index.es8.js +24 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +12 -11
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +2 -2
- package/lib/yxIcon.cjs.js +1 -0
- package/lib/yxIcon.es.js +43 -0
- package/package.json +13 -7
- package/types/api/index.d.ts +2 -1
- package/types/api/modules/assets/index.d.ts +3 -0
- package/types/components/YxFormV2/index.d.ts +3 -0
- package/types/components/YxFormV2/index.vue.d.ts +46 -0
- package/types/components/YxFormV2/type.d.ts +54 -0
- package/types/components/YxUpload/index.d.ts +3 -0
- package/types/components/YxUpload/index.vue.d.ts +16 -0
- package/types/components/YxUpload/type.d.ts +6 -0
- package/types/components/index.d.ts +2 -0
- package/types/components/type.d.ts +1 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/useTime/index.d.ts +3 -0
- package/types/index.d.ts +6 -3
- package/types/translate/index.d.ts +1 -0
- package/types/yxIcon/index.d.ts +5 -0
- package/types/yxi18n/index.d.ts +4 -0
- package/lib/data.cjs.js +0 -1
- package/lib/data.cjs.js.gz +0 -0
- package/lib/data.es.js +0 -75
- package/lib/data.es.js.gz +0 -0
- package/lib/icons.cjs.js +0 -1
- package/lib/icons.es.js +0 -7
- package/lib/index.cjs3.js.gz +0 -0
- package/lib/index.es3.js.gz +0 -0
package/lib/index.cjs3.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
"use strict";var nt=Object.defineProperty;var we=Object.getOwnPropertySymbols;var rt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var Y=(e,t,n)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||(t={}))rt.call(t,n)&&Y(e,n,t[n]);if(we)for(var n of we(t))st.call(t,n)&&Y(e,n,t[n]);return e};var Se=(e,t,n)=>(Y(e,typeof t!="symbol"?t+"":t,n),n);var j=(e,t,n)=>new Promise((r,s)=>{var i=l=>{try{c(n.next(l))}catch(u){s(u)}},o=l=>{try{c(n.throw(l))}catch(u){s(u)}},c=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,o);c((n=n.apply(e,t)).next())});const S=require("element-plus");function Ue(e,t){return function(){return e.apply(t,arguments)}}const{toString:_e}=Object.prototype,{getPrototypeOf:ce}=Object,ue=(e=>t=>{const n=_e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>ue(t)===e),V=e=>t=>typeof t===e,{isArray:x}=Array,_=V("undefined");function ot(e){return e!==null&&!_(e)&&e.constructor!==null&&!_(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Be=A("ArrayBuffer");function it(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Be(e.buffer),t}const at=V("string"),N=V("function"),Fe=V("number"),le=e=>e!==null&&typeof e=="object",ct=e=>e===!0||e===!1,M=e=>{if(ue(e)!=="object")return!1;const t=ce(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ut=A("Date"),lt=A("File"),ft=A("Blob"),dt=A("FileList"),pt=e=>le(e)&&N(e.pipe),ht=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||_e.call(e)===t||N(e.toString)&&e.toString()===t)},mt=A("URLSearchParams"),Et=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function B(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),x(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function De(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ke=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ie=e=>!_(e)&&e!==ke;function re(){const{caseless:e}=Ie(this)&&this||{},t={},n=(r,s)=>{const i=e&&De(t,s)||s;M(t[i])&&M(r)?t[i]=re(t[i],r):M(r)?t[i]=re({},r):x(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&B(arguments[r],n);return t}const yt=(e,t,n,{allOwnKeys:r}={})=>(B(t,(s,i)=>{n&&N(s)?e[i]=Ue(s,n):e[i]=s},{allOwnKeys:r}),e),wt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),St=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},bt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&ce(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ot=e=>{if(!e)return null;if(x(e))return e;let t=e.length;if(!Fe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Rt=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&ce(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Tt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nt=A("HTMLFormElement"),Pt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),be=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ct=A("RegExp"),je=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};B(n,(s,i)=>{t(s,i,e)!==!1&&(r[i]=s)}),Object.defineProperties(e,r)},xt=e=>{je(e,(t,n)=>{if(N(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(N(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Lt=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return x(e)?r(e):r(String(e).split(t)),n},Ut=()=>{},_t=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Z="abcdefghijklmnopqrstuvwxyz",ge="0123456789",Me={DIGIT:ge,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+ge},Bt=(e=16,t=Me.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ft(e){return!!(e&&N(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Dt=e=>{const t=new Array(10),n=(r,s)=>{if(le(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=x(r)?[]:{};return B(r,(o,c)=>{const l=n(o,s+1);!_(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},a={isArray:x,isArrayBuffer:Be,isBuffer:ot,isFormData:ht,isArrayBufferView:it,isString:at,isNumber:Fe,isBoolean:ct,isObject:le,isPlainObject:M,isUndefined:_,isDate:ut,isFile:lt,isBlob:ft,isRegExp:Ct,isFunction:N,isStream:pt,isURLSearchParams:mt,isTypedArray:Rt,isFileList:dt,forEach:B,merge:re,extend:yt,trim:Et,stripBOM:wt,inherits:St,toFlatObject:bt,kindOf:ue,kindOfTest:A,endsWith:gt,toArray:Ot,forEachEntry:At,matchAll:Tt,isHTMLForm:Nt,hasOwnProperty:be,hasOwnProp:be,reduceDescriptors:je,freezeMethods:xt,toObjectSet:Lt,toCamelCase:Pt,noop:Ut,toFiniteNumber:_t,findKey:De,global:ke,isContextDefined:Ie,ALPHABET:Me,generateString:Bt,isSpecCompliantForm:Ft,toJSONObject:Dt};function m(e,t,n,r,s){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),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const He=m.prototype,qe={};["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=>{qe[e]={value:e}});Object.defineProperties(m,qe);Object.defineProperty(He,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,i)=>{const o=Object.create(He);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),m.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const kt=null;function se(e){return a.isPlainObject(e)||a.isArray(e)}function Je(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,n){return e?e.concat(t).map(function(s,i){return s=Je(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function It(e){return a.isArray(e)&&!e.some(se)}const jt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function G(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,O){return!a.isUndefined(O[h])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!l&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?l&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,h,O){let b=d;if(d&&!O&&typeof d=="object"){if(a.endsWith(h,"{}"))h=r?h:h.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&It(d)||(a.isFileList(d)||a.endsWith(h,"[]"))&&(b=a.toArray(d)))return h=Je(h),b.forEach(function(k,tt){!(a.isUndefined(k)||k===null)&&t.append(o===!0?Oe([h],tt,i):o===null?h:h+"[]",u(k))}),!1}return se(d)?!0:(t.append(Oe(O,h,i),u(d)),!1)}const p=[],w=Object.assign(jt,{defaultVisitor:f,convertValue:u,isVisitable:se});function E(d,h){if(!a.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(d),a.forEach(d,function(b,P){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(P)?P.trim():P,h,w))===!0&&E(b,h?h.concat(P):[P])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function fe(e,t){this._pairs=[],e&&G(e,this,t)}const ze=fe.prototype;ze.append=function(t,n){this._pairs.push([t,n])};ze.toString=function(t){const n=t?function(r){return t.call(this,r,Re)}:Re;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Mt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ve(e,t,n){if(!t)return e;const r=n&&n.encode||Mt,s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ae{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ht=typeof URLSearchParams!="undefined"?URLSearchParams:fe,qt=typeof FormData!="undefined"?FormData:null,Jt=(()=>{let e;return typeof navigator!="undefined"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"})(),zt=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",g={isBrowser:!0,classes:{URLSearchParams:Ht,FormData:qt,Blob},isStandardBrowserEnv:Jt,isStandardBrowserWebWorkerEnv:zt,protocols:["http","https","file","blob","url","data"]};function Vt(e,t){return G(e,new g.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return g.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Gt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $t(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function $e(e){function t(n,r,s,i){let o=n[i++];const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=$t(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Gt(r),s,n,0)}),n}return null}const vt={"Content-Type":void 0};function Kt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $={transitional:Ge,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify($e(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return G(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Kt(t)):t}],transformResponse:[function(t){const n=this.transitional||$.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:g.classes.FormData,Blob:g.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){$.headers[t]={}});a.forEach(["post","put","patch"],function(t){$.headers[t]=a.merge(vt)});const de=$,Wt=a.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"]),Xt=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Wt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Te=Symbol("internals");function L(e){return e&&String(e).trim().toLowerCase()}function H(e){return e===!1||e==null?e:a.isArray(e)?e.map(H):String(e)}function Qt(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function Yt(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function ee(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Zt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function en(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class v{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,l,u){const f=L(l);if(!f)throw new Error("header name must be a non-empty string");const p=a.findKey(s,f);(!p||s[p]===void 0||u===!0||u===void 0&&s[p]!==!1)&&(s[p||l]=H(c))}const o=(c,l)=>a.forEach(c,(u,f)=>i(u,f,l));return a.isPlainObject(t)||t instanceof this.constructor?o(t,n):a.isString(t)&&(t=t.trim())&&!Yt(t)?o(Xt(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=L(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Qt(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=L(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ee(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=L(o),o){const c=a.findKey(r,o);c&&(!n||ee(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ee(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=H(s),delete n[i];return}const c=t?Zt(i):String(i).trim();c!==i&&delete n[i],n[c]=H(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Te]=this[Te]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=L(o);r[c]||(en(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}}v.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.freezeMethods(v.prototype);a.freezeMethods(v);const R=v;function te(e,t){const n=this||de,r=t||n,s=R.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ve(e){return!!(e&&e.__CANCEL__)}function F(e,t,n){m.call(this,e==null?"canceled":e,m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(F,m,{__CANCEL__:!0});function tn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const nn=g.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,c){const l=[];l.push(n+"="+encodeURIComponent(r)),a.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),a.isString(i)&&l.push("path="+i),a.isString(o)&&l.push("domain="+o),c===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function rn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ke(e,t){return e&&!rn(t)?sn(e,t):t}const on=g.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const c=a.isString(o)?s(o):o;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function an(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=r[i];o||(o=u),n[s]=l,r[s]=u;let p=i,w=0;for(;p!==s;)w+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const E=f&&u-f;return E?Math.round(w*1e3/E):void 0}}function Ne(e,t){let n=0;const r=cn(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,c=i-n,l=r(c),u=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const un=typeof XMLHttpRequest!="undefined",ln=un&&function(e){return new Promise(function(n,r){let s=e.data;const i=R.from(e.headers).normalize(),o=e.responseType;let c;function l(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}a.isFormData(s)&&(g.isStandardBrowserEnv||g.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const E=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(E+":"+d))}const f=Ke(e.baseURL,e.url);u.open(e.method.toUpperCase(),Ve(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function p(){if(!u)return;const E=R.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),h={data:!o||o==="text"||o==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:E,config:e,request:u};tn(function(b){n(b),l()},function(b){r(b),l()},h),u=null}if("onloadend"in u?u.onloadend=p:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(p)},u.onabort=function(){u&&(r(new m("Request aborted",m.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let d=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const h=e.transitional||Ge;e.timeoutErrorMessage&&(d=e.timeoutErrorMessage),r(new m(d,h.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,u)),u=null},g.isStandardBrowserEnv){const E=(e.withCredentials||on(f))&&e.xsrfCookieName&&nn.read(e.xsrfCookieName);E&&i.set(e.xsrfHeaderName,E)}s===void 0&&i.setContentType(null),"setRequestHeader"in u&&a.forEach(i.toJSON(),function(d,h){u.setRequestHeader(h,d)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&o!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Ne(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Ne(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=E=>{u&&(r(!E||E.type?new F(null,e,u):E),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const w=an(f);if(w&&g.protocols.indexOf(w)===-1){r(new m("Unsupported protocol "+w+":",m.ERR_BAD_REQUEST,e));return}u.send(s||null)})},q={http:kt,xhr:ln};a.forEach(q,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const fn={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let s=0;s<t&&(n=e[s],!(r=a.isString(n)?q[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new m(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(q,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:q};function ne(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new F(null,e)}function Pe(e){return ne(e),e.headers=R.from(e.headers),e.data=te.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fn.getAdapter(e.adapter||de.adapter)(e).then(function(r){return ne(e),r.data=te.call(e,e.transformResponse,r),r.headers=R.from(r.headers),r},function(r){return ve(r)||(ne(e),r&&r.response&&(r.response.data=te.call(e,e.transformResponse,r.response),r.response.headers=R.from(r.response.headers))),Promise.reject(r)})}const Ce=e=>e instanceof R?e.toJSON():e;function C(e,t){t=t||{};const n={};function r(u,f,p){return a.isPlainObject(u)&&a.isPlainObject(f)?a.merge.call({caseless:p},u,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function s(u,f,p){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u,p)}else return r(u,f,p)}function i(u,f){if(!a.isUndefined(f))return r(void 0,f)}function o(u,f){if(a.isUndefined(f)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function c(u,f,p){if(p in t)return r(u,f);if(p in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(u,f)=>s(Ce(u),Ce(f),!0)};return a.forEach(Object.keys(e).concat(Object.keys(t)),function(f){const p=l[f]||s,w=p(e[f],t[f],f);a.isUndefined(w)&&p!==c||(n[f]=w)}),n}const We="1.3.3",pe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xe={};pe.transitional=function(t,n,r){function s(i,o){return"[Axios v"+We+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new m(s(o," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!xe[o]&&(xe[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};function dn(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],l=c===void 0||o(c,i,e);if(l!==!0)throw new m("option "+i+" must be "+l,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const oe={assertOptions:dn,validators:pe},T=oe.validators;class z{constructor(t){this.defaults=t,this.interceptors={request:new Ae,response:new Ae}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=C(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&oe.assertOptions(r,{silentJSONParsing:T.transitional(T.boolean),forcedJSONParsing:T.transitional(T.boolean),clarifyTimeoutError:T.transitional(T.boolean)},!1),s!==void 0&&oe.assertOptions(s,{encode:T.function,serialize:T.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&a.merge(i.common,i[n.method]),o&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=R.concat(o,i);const c=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let f,p=0,w;if(!l){const d=[Pe.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,u),w=d.length,f=Promise.resolve(n);p<w;)f=f.then(d[p++],d[p++]);return f}w=c.length;let E=n;for(p=0;p<w;){const d=c[p++],h=c[p++];try{E=d(E)}catch(O){h.call(this,O);break}}try{f=Pe.call(this,E)}catch(d){return Promise.reject(d)}for(p=0,w=u.length;p<w;)f=f.then(u[p++],u[p++]);return f}getUri(t){t=C(this.defaults,t);const n=Ke(t.baseURL,t.url);return Ve(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){z.prototype[t]=function(n,r){return this.request(C(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(C(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}z.prototype[t]=n(),z.prototype[t+"Form"]=n(!0)});const J=z;class he{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new F(i,o,c),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new he(function(s){t=s}),cancel:t}}}const pn=he;function hn(e){return function(n){return e.apply(null,n)}}function mn(e){return a.isObject(e)&&e.isAxiosError===!0}const ie={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(ie).forEach(([e,t])=>{ie[t]=e});const En=ie;function Xe(e){const t=new J(e),n=Ue(J.prototype.request,t);return a.extend(n,J.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Xe(C(e,s))},n}const y=Xe(de);y.Axios=J;y.CanceledError=F;y.CancelToken=pn;y.isCancel=ve;y.VERSION=We;y.toFormData=G;y.AxiosError=m;y.Cancel=y.CanceledError;y.all=function(t){return Promise.all(t)};y.spread=hn;y.isAxiosError=mn;y.mergeConfig=C;y.AxiosHeaders=R;y.formToJSON=e=>$e(a.isHTMLForm(e)?new FormData(e):e);y.HttpStatusCode=En;y.default=y;const yn={LOGIN_URL:`${window.location.origin}/ttc/cloud/#/login`,HOME_URL:`${window.location.origin}/ttc/cloud/#/cloud`,INTEGRATED_BASE_URL:"/gateway/integrated-management/api/v1"},me={ttc:yn},wn=(e="ttc")=>Q.get(`${me[e].INTEGRATED_BASE_URL}/account/auth/route/list`),Sn=(e="ttc")=>Q.get(`${me[e].INTEGRATED_BASE_URL}/account/home/menu`),Ee=(e="ttc")=>{X({token:""})},K=(e="ttc")=>{var s;const t=`${e}GlobalState`,n=(s=localStorage.getItem(t))!=null?s:"{}";return JSON.parse(n)?JSON.parse(n).token:null},Qe=(r,...s)=>j(exports,[r,...s],function*({userName:e,password:t},n="ttc"){const i=D("loginApiUrl"),{data:o}=yield Q.post(i,{userName:e,password:t});o.tokenValue&&S.ElMessage.success("登录成功"),X({token:o.tokenValue,userInfo:o})}),bn=(e="ttc")=>{var s;const t=`${e}GlobalState`,n=(s=localStorage.getItem(t))!=null?s:"{}";return JSON.parse(n)?JSON.parse(n).userInfo:null},gn=()=>j(exports,null,function*(){return K()?yield Sn():[]}),W=()=>{if(Ye())Ee(),window.location.replace(ye());else{console.log("开发环境!!!");const e=window.prompt("当前系统处于开发环境,当前登录过期,请输入登录账号","");if(e!==null){const t=window.prompt("请输入登录密码","");(t===null||t=="")&&window.prompt("请输入登录密码",""),Qe({userName:e,password:t})}}},On=()=>{window.location.replace(ye())},ye=()=>D("homeUrl"),X=e=>{var r;const t=(r=localStorage.getItem("ttcGlobalState"))!=null?r:"{}",n=I(I({},JSON.parse(t)),e);localStorage.setItem("ttcGlobalState",JSON.stringify(n))},D=e=>{var n,r;return(r=JSON.parse((n=localStorage.getItem("ttcGlobalState"))!=null?n:"{}")[e])!=null?r:""},Ye=()=>D("environment")==="production",Rn=(e,t=!0,n)=>j(exports,null,function*(){if(!K()&&t)return W();try{const{data:r}=yield wn(n),s=r.filter(c=>c.routeTag.includes(e)),i=s.filter(c=>c.routeType==="VIEW"),o=s.filter(c=>c.routeType==="BTN");return sessionStorage.setItem("ttcUserBtnList",JSON.stringify(o.map(c=>c.routeTag))),{userMenuList:i,userBtnList:o}}catch(r){}}),An=(e,t,n)=>{let r=[];return e.forEach(s=>{const i=`/src/views${s.routeView}/config.ts`,o=`/src/views${s.routeView}/index.vue`;if(t[o]&&n[i]){const c=n[i],l={path:s.routeView,name:s.routeView.split("/")[1],meta:{title:c.title,icon:c.icon},component:t[o]};r.push(l)}}),r},Ze=e=>{var n;if(!e)return!1;const t=(n=sessionStorage.getItem("ttcUserBtnList"))!=null?n:"[]";return JSON.parse(t).includes(e)},Tn=Object.freeze(Object.defineProperty({__proto__:null,autoLogin:Qe,getHomeUrl:ye,getSystemConfig:D,getToken:K,getUserInfo:bn,getUserIsHaveBtnPower:Ze,getUserPermissions:Rn,getUserRouteList:gn,getUserRouter:An,isProduction:Ye,jumpToHome:On,jumpToLogin:W,removeToken:Ee,setSystemConfig:X},Symbol.toStringTag,{value:"Module"}));let et;const Nn={lock:!0,text:"加载中...",fullscreen:!0,background:"rgba(0, 0, 0, 0.6)"},Pn=()=>{et=S.ElLoading.service(Nn)},Cn=()=>{et.close()};let U=0;const xn=()=>{U===0&&Pn(),U++},Le=()=>{U<=0||(U--,U===0&&Cn())};var ae=(e=>(e[e.SUCCESS=200]="SUCCESS",e[e.ERROR=500]="ERROR",e[e.OVERDUE=401]="OVERDUE",e[e.TIMEOUT=3e4]="TIMEOUT",e))(ae||{});const Ln={timeout:3e4,withCredentials:!0},Un=(e,t)=>{switch(e){case 400:S.ElMessage.error(t||"请求失败!请您稍后重试");break;case 401:S.ElMessage.error(t||"登录失效!请您重新登录"),W();break;case 403:S.ElMessage.error(t||"当前账号无权限访问!");break;case 404:S.ElMessage.error("你所访问的资源不存在!");break;case 405:S.ElMessage.error(t||"请求方式错误!请您稍后重试");break;case 408:S.ElMessage.error(t||"请求超时!请您稍后重试");break;case 500:S.ElMessage.error(t||"服务异常!");break;case 502:S.ElMessage.error("网关错误!");break;case 503:S.ElMessage.error("服务不可用!");break;case 504:S.ElMessage.error("网关超时!");break;default:S.ElMessage.error("请求失败!")}};class _n{constructor(t){Se(this,"service");this.service=y.create(t),this.setupInterceptors()}setupInterceptors(){this.service.interceptors.request.use(t=>{var n;return(n=t.headers)!=null&&n.noLoading||xn(),t.headers.token=K(),t},t=>Promise.reject(t)),this.service.interceptors.response.use(t=>{const{data:n}=t;return Le(),n.code==ae.OVERDUE?this.handleOverdueResponse(n):n.code!==ae.SUCCESS&&this.handleErrorResponse(n),n},t=>(Le(),t.message.includes("timeout")?S.ElMessage.error("请求超时!请稍后重试"):t.message.includes("Network Error")&&S.ElMessage.error("网络错误!请稍后重试"),t.response&&Un(t.response.status),window.navigator.onLine||S.ElNotification({title:"提示",message:"当前网络似乎开小差了",type:"warning",duration:5e3}),Promise.reject(t)))}handleOverdueResponse(t){return Ee(),W(),S.ElNotification({title:"登录过期提醒",message:t.resultMsg||"当前登录失效",type:"warning",duration:5e3}),Promise.reject(t)}handleErrorResponse(t){return S.ElMessage.error(t.resultMsg),Promise.reject(t)}get(t,n,r={}){return this.service.get(t,I({params:n},r))}post(t,n,r={}){return this.service.post(t,n,r)}put(t,n,r={}){return this.service.put(t,n,r)}delete(t,n,r={}){return this.service.delete(t,n,r)}}const Q=new _n(Ln);exports.URL=me;exports.axios=y;exports.getSystemConfig=D;exports.getUserIsHaveBtnPower=Ze;exports.http=Q;exports.index=Tn;exports.setSystemConfig=X;
|
|
1
|
+
"use strict";var _=Object.defineProperty;var T=(t,s,e)=>s in t?_(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var m=(t,s,e)=>(T(t,typeof s!="symbol"?s+"":s,e),e);const v=require("./index.cjs6.js"),S=t=>{new BroadcastChannel("YXUSE_BC").postMessage(t)},y=t=>{const s=new BroadcastChannel("YXUSE_BC");s.onmessage=()=>{t()}},$=(t,s,e,i)=>Array.isArray(t)?t.map(a=>({label:a==null?void 0:a[s],value:i?+a[e]:a[e]})):[],w=t=>{const s=[];for(const e in t)isNaN(Number(e))&&s.push({label:e,value:t[e]});return s},B=t=>{const e=(u=>{let f=0,C=0,I=0,d=1;if(u.startsWith("#"))if(u=u.slice(1),u.length===3)f=parseInt(u[0]+u[0],16),C=parseInt(u[1]+u[1],16),I=parseInt(u[2]+u[2],16);else if(u.length===6)f=parseInt(u.slice(0,2),16),C=parseInt(u.slice(2,4),16),I=parseInt(u.slice(4,6),16);else return null;else if(u.startsWith("rgb")){const g=u.match(/(\d+(\.\d+)?)/g);if(g)f=parseFloat(g[0]),C=parseFloat(g[1]),I=parseFloat(g[2]),g.length>3&&(d=parseFloat(g[3]));else return null}else return null;return[f,C,I,d]})(t);if(!e)return null;const[i,a,r,o]=e,n=i/255,l=a/255,b=r/255,c=Math.max(n,l,b),h=Math.min(n,l,b);return(c+h)/2<.5},F=(t,s,e=100)=>{const i=n=>{let l,b,c,h=1;if(n.startsWith("#"))if(n=n.slice(1),n.length===3)l=parseInt(n[0]+n[0],16),b=parseInt(n[1]+n[1],16),c=parseInt(n[2]+n[2],16);else if(n.length===6)l=parseInt(n.slice(0,2),16),b=parseInt(n.slice(2,4),16),c=parseInt(n.slice(4,6),16);else return null;else if(n.startsWith("rgb")){const p=n.match(/(\d+(\.\d+)?)/g);l=parseFloat(p[0]),b=parseFloat(p[1]),c=parseFloat(p[2]),p.length>3&&(h=parseFloat(p[3]))}else return null;return[l,b,c,h]},a=i(t),r=i(s);return!a||!r?!1:Math.sqrt(Math.pow(a[0]-r[0],2)+Math.pow(a[1]-r[1],2)+Math.pow(a[2]-r[2],2)+Math.pow(a[3]-r[3],2))<=e},x=(t,s)=>{function e(r){if(r.toLowerCase().startsWith("rgba"))return r.toLowerCase();if(r.toLowerCase().startsWith("rgb"))return r.replace("rgb","rgba").replace(")",", 1)");if(r.length===7){const o=parseInt(r.substring(1,3),16),n=parseInt(r.substring(3,5),16),l=parseInt(r.substring(5,7),16);return`rgba(${o}, ${n}, ${l}, 1)`}else if(r.length===9&&r.toLowerCase().startsWith("rrggbbaa")){const o=parseInt(r.substring(1,3),16),n=parseInt(r.substring(3,5),16),l=parseInt(r.substring(5,7),16),b=Math.round(parseInt(r.substring(7,9),16)/255*100)/100;return`rgba(${o}, ${n}, ${l}, ${b})`}else return null}const i=e(M(t)),a=e(M(s));return!i||!a?!1:i===a},M=t=>{if(t.length===4&&t[0]==="#"){const s=t[1],e=t[2],i=t[3];return`#${s}${s}${e}${e}${i}${i}`}else return t};class A{constructor(){m(this,"subscribers");this.subscribers={}}subscribe(s,e){this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(e)}unsubscribe(s,e){const i=this.subscribers[s];if(!e)return this.subscribers[s]=[];if(i){const a=i.indexOf(e);a!==-1&&i.splice(a,1)}}publish(s){const e=this.subscribers[s.type];e&&e.forEach(i=>{i(s.data)})}}const W=new A,E=Object.freeze(Object.defineProperty({__proto__:null,areColorsSimilar:F,enumToArray:w,getSelectOptions:$,http:v.http,isColorEqual:x,isDarkColor:B,notifyMessageToSystems:S,receiveMessage:y,yxSubscribe:W},Symbol.toStringTag,{value:"Module"}));exports.areColorsSimilar=F;exports.enumToArray=w;exports.getSelectOptions=$;exports.isColorEqual=x;exports.isDarkColor=B;exports.notifyMessageToSystems=S;exports.receiveMessage=y;exports.utils2=E;exports.yxSubscribe=W;
|
package/lib/index.cjs4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var n=(t,c,s)=>new Promise((g,o)=>{var L=a=>{try{i(s.next(a))}catch(r){o(r)}},E=a=>{try{i(s.throw(a))}catch(r){o(r)}},i=a=>a.done?g(a.value):Promise.resolve(a.value).then(L,E);i((s=s.apply(t,c)).next())});const e=require("./index.cjs6.js"),R=require("./index.cjs7.js"),l=(t="ttc")=>n(exports,null,function*(){return yield e.http.get(`${e.URL[t].INTEGRATED_BASE_URL}/basic/data/satellite/select`)}),d=(t="ttc")=>n(exports,null,function*(){return yield e.http.get(`${e.URL[t].INTEGRATED_BASE_URL}/basic/data/ante/select`)}),U=(t="ttc")=>n(exports,null,function*(){return yield e.http.get(`${e.URL[t].INTEGRATED_BASE_URL}/theme/list`)}),u=(t="ttc")=>n(exports,null,function*(){return yield e.http.get(`${e.URL[t].INTEGRATED_BASE_URL}/workorder/comment/untreated/count`)}),S=Object.freeze(Object.defineProperty({__proto__:null,assets:R.index,auth:e.index,getCommentUntreatedCount:u,getUserSelectAnteList:d,getUserSelectSatelliteList:l,getUserThemeList:U},Symbol.toStringTag,{value:"Module"}));exports.api2=S;exports.getCommentUntreatedCount=u;exports.getUserSelectAnteList=d;exports.getUserSelectSatelliteList=l;exports.getUserThemeList=U;
|
package/lib/index.cjs5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";const et=require("vue");var q=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function G(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var B={exports:{}};(function(y,it){(function(A,k){y.exports=k()})(q,function(){var A=1e3,k=6e4,U=36e5,F="millisecond",w="second",b="minute",_="hour",M="day",x="week",m="month",z="quarter",v="year",O="date",J="Invalid Date",K=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,X={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},I=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},tt={s:I,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+I(r,2,"0")+":"+I(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,m),i=t-e<0,u=n.clone().add(r+(i?-1:1),m);return+(-(r+(t-e)/(i?e-u:u-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:v,w:x,d:M,D:O,h:_,m:b,s:w,ms:F,Q:z}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},Y="en",p={};p[Y]=X;var Z="$isDayjsObject",E=function(s){return s instanceof L||!(!s||!s[Z])},C=function s(n,t,r){var e;if(!n)return Y;if(typeof n=="string"){var i=n.toLowerCase();p[i]&&(e=i),t&&(p[i]=t,e=i);var u=n.split("-");if(!e&&u.length>1)return s(u[0])}else{var o=n.name;p[o]=n,e=o}return!r&&e&&(Y=e),e||!r&&Y},f=function(s,n){if(E(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new L(t)},a=tt;a.l=C,a.i=E,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var L=function(){function s(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(K);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==J},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<f(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!a.u(r)||r,u=a.p(t),o=function(S,l){var g=a.w(e.$u?Date.UTC(e.$y,l,S):new Date(e.$y,l,S),e);return i?g:g.endOf(M)},c=function(S,l){return a.w(e.toDate()[S].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(l)),e)},h=this.$W,d=this.$M,$=this.$D,T="set"+(this.$u?"UTC":"");switch(u){case v:return i?o(1,0):o(31,11);case m:return i?o(1,d):o(0,d+1);case x:var D=this.$locale().weekStart||0,H=(h<D?h+7:h)-D;return o(i?$-H:$+(6-H),d);case M:case O:return c(T+"Hours",0);case _:return c(T+"Minutes",1);case b:return c(T+"Seconds",2);case w:return c(T+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=a.p(t),u="set"+(this.$u?"UTC":""),o=(e={},e[M]=u+"Date",e[O]=u+"Date",e[m]=u+"Month",e[v]=u+"FullYear",e[_]=u+"Hours",e[b]=u+"Minutes",e[w]=u+"Seconds",e[F]=u+"Milliseconds",e)[i],c=i===M?this.$D+(r-this.$W):r;if(i===m||i===v){var h=this.clone().set(O,1);h.$d[o](c),h.init(),this.$d=h.set(O,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var u=a.p(r),o=function(d){var $=f(i);return a.w($.date($.date()+Math.round(d*t)),i)};if(u===m)return this.set(m,this.$M+t);if(u===v)return this.set(v,this.$y+t);if(u===M)return o(1);if(u===x)return o(7);var c=(e={},e[b]=k,e[_]=U,e[w]=A,e)[u]||1,h=this.$d.getTime()+t*c;return a.w(h,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||J;var i=t||"YYYY-MM-DDTHH:mm:ssZ",u=a.z(this),o=this.$H,c=this.$m,h=this.$M,d=e.weekdays,$=e.months,T=e.meridiem,D=function(l,g,j,W){return l&&(l[g]||l(r,i))||j[g].slice(0,W)},H=function(l){return a.s(o%12||12,l,"0")},S=T||function(l,g,j){var W=l<12?"AM":"PM";return j?W.toLowerCase():W};return i.replace(R,function(l,g){return g||function(j){switch(j){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return h+1;case"MM":return a.s(h+1,2,"0");case"MMM":return D(e.monthsShort,h,$,3);case"MMMM":return D($,h);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return D(e.weekdaysMin,r.$W,d,2);case"ddd":return D(e.weekdaysShort,r.$W,d,3);case"dddd":return d[r.$W];case"H":return String(o);case"HH":return a.s(o,2,"0");case"h":return H(1);case"hh":return H(2);case"a":return S(o,c,!0);case"A":return S(o,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return u}return null}(l)||u.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,u=this,o=a.p(r),c=f(t),h=(c.utcOffset()-this.utcOffset())*k,d=this-c,$=function(){return a.m(u,c)};switch(o){case v:i=$()/12;break;case m:i=$();break;case z:i=$()/3;break;case x:i=(d-h)/6048e5;break;case M:i=(d-h)/864e5;break;case _:i=d/U;break;case b:i=d/k;break;case w:i=d/A;break;default:i=d}return e?i:a.a(i)},n.daysInMonth=function(){return this.endOf(m).$D},n.$locale=function(){return p[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=C(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s}(),P=L.prototype;return f.prototype=P,[["$ms",F],["$s",w],["$m",b],["$H",_],["$W",M],["$M",m],["$y",v],["$D",O]].forEach(function(s){P[s[1]]=function(n){return this.$g(n,s[0],s[1])}}),f.extend=function(s,n){return s.$i||(s(n,L,f),s.$i=!0),f},f.locale=C,f.isDayjs=E,f.unix=function(s){return f(1e3*s)},f.en=p[Y],f.Ls=p,f.p={},f})})(B);var nt=B.exports;const rt=G(nt),V=et.ref("");let N;const Q=()=>{const y=()=>{N=setTimeout(()=>{V.value=rt().format("YYYY-MM-DD HH:mm:ss"),N&&clearTimeout(N),y()},1e3)};return y(),{time:V}},st=Object.freeze(Object.defineProperty({__proto__:null,useTime:Q},Symbol.toStringTag,{value:"Module"}));exports.commonjsGlobal=q;exports.getDefaultExportFromCjs=G;exports.useTime=Q;exports.yxHooks=st;
|