next-ui3 1.3.23 → 1.4.0

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.
Files changed (112) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.min.js +131 -16
  3. package/dist/index.full.min.mjs +133 -18
  4. package/dist/locale/zh-cn.min.js +1 -1
  5. package/dist/locale/zh-cn.min.mjs +1 -1
  6. package/dist/utils/index.min.js +2 -2
  7. package/dist/utils/index.min.mjs +2 -2
  8. package/es/components/autocomplete/src/index.vue.d.ts +10 -203
  9. package/es/components/cascader/src/index.vue.d.ts +5 -1111
  10. package/es/components/checkbox/src/index.vue.d.ts +5 -10
  11. package/es/components/checkbox-group/src/BlockCheckboxGroup.vue.d.ts +10 -15
  12. package/es/components/checkbox-group/src/index.vue.d.ts +24 -27
  13. package/es/components/date-picker/src/QuarterPicker.vue.d.ts +1 -1
  14. package/es/components/date-picker/src/SemiAnnualPicker.vue.d.ts +1 -1
  15. package/es/components/date-picker/src/index.vue.d.ts +5 -383
  16. package/es/components/download-button/src/index.vue.d.ts +5 -10
  17. package/es/components/empty/src/index.vue.d.ts +5 -10
  18. package/es/components/file-select/src/index.vue.d.ts +9 -17
  19. package/es/components/file-upload/index.d.ts +3 -0
  20. package/es/components/file-upload/src/FileList.vue.d.ts +2 -0
  21. package/es/components/file-upload/src/index.vue.d.ts +110 -0
  22. package/es/components/file-upload/src/types.d.ts +12 -0
  23. package/es/components/filter/src/index.vue.d.ts +11 -197
  24. package/es/components/flex-text/src/index.vue.d.ts +7 -14
  25. package/es/components/form/src/index.vue.d.ts +13 -197
  26. package/es/components/icon/index.d.ts +2 -0
  27. package/es/components/icon/src/index.vue.d.ts +12 -0
  28. package/es/components/index.d.ts +2 -0
  29. package/es/components/input/src/index.vue.d.ts +5 -415
  30. package/es/components/input-number/src/index.vue.d.ts +9 -418
  31. package/es/components/input-password/src/index.vue.d.ts +5 -415
  32. package/es/components/pagination/src/index.vue.d.ts +5 -8
  33. package/es/components/radio-group/src/CustomRadioGroup.vue.d.ts +10 -15
  34. package/es/components/radio-group/src/index.vue.d.ts +19 -21
  35. package/es/components/remote-cascader/src/index.vue.d.ts +5 -10
  36. package/es/components/remote-select/src/DictSelect.vue.d.ts +5 -149
  37. package/es/components/remote-select/src/EnumSelect.vue.d.ts +5 -149
  38. package/es/components/remote-select/src/index.vue.d.ts +5 -10
  39. package/es/components/remote-tree-select/src/index.vue.d.ts +5 -10
  40. package/es/components/remote-tree-select/src/old.vue.d.ts +5 -53
  41. package/es/components/select/src/index.vue.d.ts +19 -549
  42. package/es/components/table/src/index.vue.d.ts +15 -571
  43. package/es/components/tree-panel/src/index.vue.d.ts +11 -882
  44. package/es/components/tree-select/src/index.vue.d.ts +5 -53
  45. package/es/components/upload/src/ImageUpload.vue.d.ts +8 -15
  46. package/es/components/upload/src/index.vue.d.ts +11 -468
  47. package/es/config/icons.d.ts +1 -0
  48. package/es/config/index.d.ts +1 -0
  49. package/es/hooks/use-toast/index.d.ts +1 -0
  50. package/es/hooks/use-upload-config/index.d.ts +1 -1
  51. package/es/utils/index.d.ts +1 -0
  52. package/es/utils/lock.d.ts +6 -0
  53. package/es/utils/timer.d.ts +1 -1
  54. package/es/version.d.ts +1 -1
  55. package/lib/components/autocomplete/src/index.vue.d.ts +10 -203
  56. package/lib/components/cascader/src/index.vue.d.ts +5 -1111
  57. package/lib/components/checkbox/src/index.vue.d.ts +5 -10
  58. package/lib/components/checkbox-group/src/BlockCheckboxGroup.vue.d.ts +10 -15
  59. package/lib/components/checkbox-group/src/index.vue.d.ts +24 -27
  60. package/lib/components/date-picker/src/QuarterPicker.vue.d.ts +1 -1
  61. package/lib/components/date-picker/src/SemiAnnualPicker.vue.d.ts +1 -1
  62. package/lib/components/date-picker/src/index.vue.d.ts +5 -383
  63. package/lib/components/download-button/src/index.vue.d.ts +5 -10
  64. package/lib/components/empty/src/index.vue.d.ts +5 -10
  65. package/lib/components/file-select/src/index.vue.d.ts +9 -17
  66. package/lib/components/file-upload/index.d.ts +3 -0
  67. package/lib/components/file-upload/src/FileList.vue.d.ts +2 -0
  68. package/lib/components/file-upload/src/index.vue.d.ts +110 -0
  69. package/lib/components/file-upload/src/types.d.ts +12 -0
  70. package/lib/components/filter/src/index.vue.d.ts +11 -197
  71. package/lib/components/flex-text/src/index.vue.d.ts +7 -14
  72. package/lib/components/form/src/index.vue.d.ts +13 -197
  73. package/lib/components/icon/index.d.ts +2 -0
  74. package/lib/components/icon/src/index.vue.d.ts +12 -0
  75. package/lib/components/index.d.ts +2 -0
  76. package/lib/components/input/src/index.vue.d.ts +5 -415
  77. package/lib/components/input-number/src/index.vue.d.ts +9 -418
  78. package/lib/components/input-password/src/index.vue.d.ts +5 -415
  79. package/lib/components/pagination/src/index.vue.d.ts +5 -8
  80. package/lib/components/radio-group/src/CustomRadioGroup.vue.d.ts +10 -15
  81. package/lib/components/radio-group/src/index.vue.d.ts +19 -21
  82. package/lib/components/remote-cascader/src/index.vue.d.ts +5 -10
  83. package/lib/components/remote-select/src/DictSelect.vue.d.ts +5 -149
  84. package/lib/components/remote-select/src/EnumSelect.vue.d.ts +5 -149
  85. package/lib/components/remote-select/src/index.vue.d.ts +5 -10
  86. package/lib/components/remote-tree-select/src/index.vue.d.ts +5 -10
  87. package/lib/components/remote-tree-select/src/old.vue.d.ts +5 -53
  88. package/lib/components/select/src/index.vue.d.ts +19 -549
  89. package/lib/components/table/src/index.vue.d.ts +15 -571
  90. package/lib/components/tree-panel/src/index.vue.d.ts +11 -882
  91. package/lib/components/tree-select/src/index.vue.d.ts +5 -53
  92. package/lib/components/upload/src/ImageUpload.vue.d.ts +8 -15
  93. package/lib/components/upload/src/index.vue.d.ts +11 -468
  94. package/lib/config/icons.d.ts +1 -0
  95. package/lib/config/index.d.ts +1 -0
  96. package/lib/hooks/use-toast/index.d.ts +1 -0
  97. package/lib/hooks/use-upload-config/index.d.ts +1 -1
  98. package/lib/utils/index.d.ts +1 -0
  99. package/lib/utils/lock.d.ts +6 -0
  100. package/lib/utils/timer.d.ts +1 -1
  101. package/lib/version.d.ts +1 -1
  102. package/package.json +1 -1
  103. package/theme-chalk/base.css +1 -1
  104. package/theme-chalk/index.css +1 -1
  105. package/theme-chalk/nt-empty.css +1 -1
  106. package/theme-chalk/nt-file-select.css +1 -1
  107. package/theme-chalk/nt-file-upload.css +1 -0
  108. package/theme-chalk/nt-icon.css +1 -0
  109. package/theme-chalk/src/base.scss +3 -0
  110. package/theme-chalk/src/file-upload.scss +156 -0
  111. package/theme-chalk/src/icon.scss +15 -0
  112. package/theme-chalk/src/index.scss +2 -0
@@ -1 +1 @@
1
- /*! Next UI v1.3.23 */(function(e,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self,e.NextUILocaleZhCn=n())})(this,function(){"use strict";var e={name:"zh-cn",nt:{input:{label:"\u786E\u8BA4"}}};return e});
1
+ /*! Next UI v1.4.0 */(function(e,n){typeof exports=="object"&&typeof module!="undefined"?module.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis!="undefined"?globalThis:e||self,e.NextUILocaleZhCn=n())})(this,function(){"use strict";var e={name:"zh-cn",nt:{input:{label:"\u786E\u8BA4"}}};return e});
@@ -1 +1 @@
1
- /*! Next UI v1.3.23 */var a={name:"zh-cn",nt:{input:{label:"\u786E\u8BA4"}}};export{a as default};
1
+ /*! Next UI v1.4.0 */var a={name:"zh-cn",nt:{input:{label:"\u786E\u8BA4"}}};export{a as default};
@@ -1,2 +1,2 @@
1
- /*! Next UI utils v1.3.23 */(function(c,U){typeof exports=="object"&&typeof module!="undefined"?U(exports,require("element-plus")):typeof define=="function"&&define.amd?define(["exports","element-plus"],U):(c=typeof globalThis!="undefined"?globalThis:c||self,U(c.NextUI={},c.ElementPlus))})(this,function(c,U){"use strict";const X=(e,t)=>{try{if(e.install=n=>{for(const r of[e,...Object.values(t!=null?t:{})])r.name&&n.component(r.name,r)},t)for(const[n,r]of Object.entries(t))e[n]=r;return e}catch(n){}};function Z(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function A(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function B(e){if(typeof e=="boolean"||typeof e=="number")return!1;if(Array.isArray(e)){if(e.length===0)return!0}else if(e instanceof Object&&JSON.stringify(e)==="{}")return!0;return e==null||e==="null"||e==="undefined"||e===""}function Q(){return window.top!==window}function x(e){return toString.call(e)==="[object Blob]"}function ee(e){if(e.startsWith("data:image"))return!0;const t=e.lastIndexOf("."),n=t>=0?e.slice(t+1).toLowerCase():"";return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(n)}function te(e,t){for(;e;){if(e===t)return!0;e=Object.getPrototypeOf(e)}return!1}const S=(e,t)=>{const n=A(e),r=A(t);return n&&r?JSON.stringify(e)===JSON.stringify(t):!n&&!r?String(e)===String(t):!1},$=(e,t)=>{if(e=e||[],t=t||[],e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!S(r,t[n]))return!1;return!0},ne=(e,t)=>Array.isArray(e)&&Array.isArray(t)?$(e,t):S(e,t);function re(e,t,n){const r={};let i;typeof n=="function"?i=n:n?i=d=>d[n]:i=d=>d,(e||[]).forEach(d=>{const h=i(d);r[h]={item:d,count:-1}}),(t||[]).forEach(d=>{const h=i(d);r[h]?r[h].count=0:r[h]={item:d,count:1}});const a=[],f=[];for(const d in r)Object.prototype.hasOwnProperty.call(r,d)&&(r[d].count===1?f.push(r[d].item):r[d].count===-1&&a.push(r[d].item));return{changed:a.length+f.length>0,removed:a.length>0,added:f.length>0,removedItems:a,addedItems:f}}const ie=(e,...t)=>{const n=[];return e.forEach(r=>{t.includes(r)||n.push(r)}),n},oe=e=>B(e)?[]:Array.isArray(e)?e:[e],ae=(e,t)=>{if(typeof t!="function"){const n=t;t=r=>String(r[n])}return(e||[]).reduce((n,r)=>{const i=t(r);return n[i]||(n[i]=[]),n[i].push(r),n},{})};function ue(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function H(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function se(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()).replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}const W=(e,t,...n)=>{const r={};return t=(t?[].concat(t):[]).concat(n),e&&t.forEach(i=>{Object.hasOwnProperty.call(e,i)&&(r[i]=e[i])}),r},ce=(e,t,...n)=>{const r={};return t=(t?[].concat(t):[]).concat(n),e&&Object.keys(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),r},le=(e,...t)=>{for(const n of t)Object.assign(e,W(n,Object.keys(e)));return e};function q(e,...t){A(e)||(e={});for(const n of t)if(A(n))for(const r in n)r==="__proto__"||e===n[r]||(A(n[r])?e[r]=q(e[r],n[r]):e[r]=n[r]);return e}const fe=e=>{const t={};if(e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(B(e[n])||(t[n]=e[n]));return t};function de(e){const t=new WeakMap,n=r=>{if(typeof r=="object"&&r!==null){if(t.has(r))return t.get(r);const i=Array.isArray(r)?[]:{};t.set(r,i);for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=n(r[a]));return i}return r};return n(e)}function z(e,t){try{return JSON.parse(e)}catch(n){return console.error("parse json error:",e),t}}function he(e,t,n){if(!e||!t)return;const r=t.split(".");let i;for(;(i=r.shift())!==void 0&&r.length!==0;)e[i]||(e[i]={}),e=e[i];i&&(e[i]=n)}function L(e,t){if(!e||!t)return;const n=t.split(".");for(const r of n){if(!e)return;e=e[r]}return e}const Y=(e,t)=>{for(const n in e)Object.getOwnPropertyDescriptor(t,n)?A(e[n])&&Y(e[n],t[n]):t[n]=e[n];return t},me=(e,t)=>{var n;return(n=e[t])!=null?n:e[H(t)]};function ge(e,t){let{key:n,parentKey:r}=t||{};n=n||"id",r=r||"pid";const i=(e||[]).reduce((f,d)=>(f[L(d,n)]=d,f),{}),a=[];return(e||[]).forEach(f=>{const d=i[L(f,r)];d?(d.children||(d.children=[])).push(f):a.push(f)}),a}function J(e,t){const n=[];return(e||[]).forEach(r=>{let{children:i,...a}=r;i&&i.length>0&&(i=J(i,t),i.length>0&&(a.children=i)),t(a)&&n.push(a)}),n}function pe(e,t){const n=e?[...e]:[];for(;n.length>0;){const r=n.shift();if(t(r))return r;r.children&&r.children.length>0&&n.push(...r.children)}return null}function ye(e,t){const n=(r,i)=>{for(const a of r){if(t(a))return[...i,a];if(a.children&&a.children.length>0){const f=n(a.children,[...i,a]);if(f)return f}}return null};return n(e||[],[])}function we(e,t){const n={children:e||[]},r=[n];let i,a=-1;for(;r.length>0;){i=r.shift();const{children:f}=i;if(f&&f.length>0){for(const[d,h]of f.entries())if(t(h)){a=d;break}if(a!==-1)break;r.push(...f)}}return{found:a!==-1,parent:i===n?null:i,index:a}}function be(e,t){const n=(e||[]).map(r=>({node:r,parent:null}));for(;n.length>0;){const r=n.shift(),{node:i,parent:a}=r;if(t(i,a)===!1)break;i.children&&i.children.length>0&&n.push(...i.children.map(d=>({node:d,parent:i})))}}function Ee(e){const t=[];if(e&&e.length>0){t.push(...e);let n=0;for(;n<t.length;){const{children:r}=t[n];r&&r.length>0&&t.push(...r),n++}}return t}function ve(e,t,n){n||(n=t);const r=i=>(i||[]).reduce((a,f)=>(f[n]=f[t]+(f.children?r(f.children):0),a+f[n]),0);r(e)}function Oe(e,t){if(!e)return"";const n=new Date(e);if(n.getTime()===0)return"";t=t||"yyyy-MM-dd";let r;const i={"Y+":n.getFullYear().toString(),"y+":n.getFullYear().toString(),"M+":(n.getMonth()+1).toString(),"D+":n.getDate().toString(),"d+":n.getDate().toString(),"h+":(n.getHours()%12||12).toString(),"H+":n.getHours().toString(),"m+":n.getMinutes().toString(),"s+":n.getSeconds().toString(),a:n.getHours()<12?"am":"pm",A:n.getHours()<12?"AM":"PM"};for(const a in i)r=new RegExp(`(${a})`).exec(t),r&&(t=t.replace(r[1],r[1].length===1?i[a]:i[a].padStart(r[1].length,"0")));return t}function Fe(e,t){if(B(e))return"";let{minPrecision:n,maxPrecision:r,decimalPoint:i,thousandSeparator:a,grouping:f}=t||{};n=n!=null?n:0,r=r!=null?r:2,i=i||".",a=a!=null?a:",",f=f!=null?f:3;let[d,h]=`${e}`.split(".");return d=d.replace(new RegExp(`(?<!^-?)(?=(\\d{${f}})+$)`,"g"),a),h=(h||"").slice(0,r).padEnd(n,"0"),h&&(h=i+h),d+h}function Te(e,t){if(t){const i=B(e[0])||e[0]===Number.NEGATIVE_INFINITY?"-\u221E":e[0],a=B(e[1])||e[1]===+Number.POSITIVE_INFINITY?"+\u221E":e[1];return`${i+(i==="-\u221E"?" < ":" \u2264 ")+t} < ${a}`}const n=B(e[0])||e[0]==="-\u221E"||e[0]==="-Infinity"?"-\u221E":e[0],r=B(e[1])||e[1]==="+\u221E"||e[1]==="Infinity"?"+\u221E":e[1];return`${n==="-\u221E"?"(":"["} ${n}, ${r} )`}function Ie(e){if(e=Number(e),Number.isNaN(e))return"";const t=["B","KB","MB","GB","TB","PB"];let n=0;for(;e>=1024&&n<t.length-1;)e/=1024,n++;return e=Math.round(e*100)/100,`${e} ${t[n]}`}function De(e){return Number.isNaN(Number(e))?e||"":`${Number(e)}px`}const _=e=>new Promise(t=>{setTimeout(t,e)}),Pe=(e,t)=>new Promise((n,r)=>{(async()=>{try{const a=Date.now(),f=await e(),d=Date.now()-a;d<t&&await _(t-d),n(f)}catch(a){r(a)}})()}),Ae=()=>{const e=Date.now();return{delayTo:async n=>{const r=Date.now()-e;r<n&&await _(n-r)}}},Be=(e,t)=>{let n;const r=()=>{if(e()){n(void 0);return}requestAnimationFrame(r)};return new Promise(i=>{n=i,t?setTimeout(r,t):requestAnimationFrame(r)})},Ce=(e,t)=>Math.floor(e+Math.random()*(t-e));function Ue(e){return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=()=>{if(r.status===200){const i=new FileReader;i.readAsDataURL(r.response),i.onload=a=>{t(a.target.result)},i.onerror=a=>n(a)}else n(new Error("Failed to load file"))},r.onerror=()=>{n(new Error("Failed to load file"))},r.send()})}function Me(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=i=>{t(i.target.result)},r.onerror=i=>n(i)})}function Se(e){return URL.createObjectURL(e)}function Le(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=i=>{t(new Blob([i.target.result]))},r.onerror=i=>n(i)})}async function _e(e){if(!e)throw new Error("url is empty");return(await fetch(e)).blob()}async function ke(e){if(!e)throw new Error("url is empty");return new Promise((t,n)=>{const r=new Image;r.onload=()=>{const i=document.createElement("canvas");i.width=r.width,i.height=r.height;const a=i.getContext("2d");a==null||a.drawImage(r,0,0,r.width,r.height),i.toBlob(f=>{f?t(f):n(new Error("transform image to blob failed"))},"image/png")},r.onerror=n,r.src=e})}function Re(e,t){if(!e)return"";if(typeof e=="string"&&(e=new URL(e)),t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.searchParams.append(n,t[n]);return e.toString()}function je(e){return e.replace(/[<>&]/g,t=>`&#${t.charCodeAt(0)};`)}function Ne(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText}async function*$e(e,t){const n=new TextDecoder("utf-8"),{original:r}=t||{};let i="";for(;;){const{value:a,done:f}=await e.read();if(f)return;i+=n.decode(a);const d=i.split(`
2
- `);i=d.pop()||"";for(let h of d)if(h=h.trim(),!!h)if(r)yield h;else{if(h==="event: ping")continue;const I=h.match(/^(?:(\w*):)?(.*)$/);if(!I){console.error("[BufferedReader] parse line failed:",h);continue}const O=I[1],D=z(I[2].trim());if(!D){console.error("[BufferedReader] parse json failed:",I[2].trim());continue}yield{event:O,data:D}}}}const He=e=>{let{url:t,filename:n}=e;if(n=n||"\u672A\u547D\u540D",t||e.blob&&(t=URL.createObjectURL(e.blob),setTimeout(()=>{URL.revokeObjectURL(t)},1e4)),!t)throw new Error("No URL provided");const r=document.createElement("a");r.href=t,r.download=n,r.click()};function We(e,t,n){let r,i,a,f,d,h,I=0,O=!1,D=!1,M=!0;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0,n&&A(n)&&(O=!!n.leading,D="maxWait"in n,a=D?Math.max(+n.maxWait||0,t):a,M="trailing"in n?!!n.trailing:M);function T(p){const v=r,F=i;return r=i=void 0,I=p,f=e.apply(F,v),f}function C(p,v){return setTimeout(p,v)}function o(p){clearTimeout(p)}function l(p){return I=p,d=C(g,t),O?T(p):f}function s(p){const v=p-h,F=p-I,P=t-v;return D?Math.min(P,a-F):P}function u(p){const v=p-h,F=p-I;return h===void 0||v>=t||v<0||D&&F>=a}function g(){const p=Date.now();if(u(p))return y(p);d=C(g,s(p))}function y(p){return d=void 0,M&&r?T(p):(r=i=void 0,f)}function E(){d!==void 0&&o(d),I=0,r=h=i=d=void 0}function m(){return d===void 0?f:y(Date.now())}function b(){return d!==void 0}function w(...p){const v=Date.now(),F=u(v);if(r=p,i=this,h=v,F){if(d===void 0)return l(h);if(D)return d=C(g,t),T(h)}return d===void 0&&(d=C(g,t)),f}return w.cancel=E,w.flush=m,w.pending=b,w}function qe(e){const{el:t,msg:n}=e||{},r=n===void 0?"\u8BF7\u5B8C\u5584\u8868\u5355\u5185\u5BB9":n;if(r&&U.ElMessage.error(r),!t)return;const i=t.querySelector(".is-error");i&&i.scrollIntoView({behavior:"smooth",inline:"nearest",block:"center"})}async function ze(e,t={successText:"\u590D\u5236\u6210\u529F"}){const{successText:n}=t||{};try{if(navigator.clipboard){await navigator.clipboard.writeText(e),n&&U.ElMessage.success(n);return}}catch(i){}const r=document.createElement("textarea");document.body.appendChild(r),r.style.position="fixed",r.style.clip="rect(0 0 0 0)",r.style.top="10px",r.value=e,r.select(),document.execCommand("copy",!0),document.body.removeChild(r),n&&U.ElMessage.success(n)}function Ye(e,...t){if(!e)return;const n=document.createElement("a");n.addEventListener("click",r=>{r.preventDefault(),window.open(e,...t)}),n.click()}function Je(e){if(!e)return[];const t=[`${e.slice(0,2)}0000`,`${e.slice(0,4)}00`,e.slice(0,6),e.slice(0,9),e.slice(0,12)],n=0,r=t.indexOf(e)+1;return t.slice(n,r)}class k{constructor(t){this._enumItems={};var n;if(t)if(Array.isArray(t))for(const[r,i]of t.entries())this.add((n=i.key)!=null?n:`${r}`,i);else for(const r in t){const i=t[r];this.add(r,i)}}add(t,n){if(this[t])throw new Error(`\u679A\u4E3E\u9879 ${t} \u5DF2\u5B58\u5728`);const r=n.value;return this[t]=r,this._enumItems[r]={...n},this}keys(){return Object.keys(this).filter(t=>t!=="_enumItems")}*[Symbol.iterator](){for(const t of this.keys())yield this.getItem(this[t])}getItem(t){return this._enumItems[t]}getLabel(t){var n;return(n=this.getItem(t))==null?void 0:n.label}getProps(t){var n;return(n=this.getItem(t))==null?void 0:n.props}filter(t){const n=new k;for(const r of this.keys()){const i=this.getItem(this[r]);t(i,r)&&n.add(r,i)}return n}clone(){return this.filter(()=>!0)}set(t,n){const r=this.getItem(this[t]);return r&&Object.assign(r,n),this}remove(t){const n=this[t];return n!==void 0&&(delete this[t],delete this._enumItems[n]),this}forEach(t){for(const n of this.keys())t(this.getItem(this[n]),n)}}const Ve=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V={exports:{}},R={exports:{}},G;function Ke(){return G||(G=1,function(e,t){(function(n,r){e.exports=r()})(window,function(){return function(n){var r={};function i(a){if(r[a])return r[a].exports;var f=r[a]={i:a,l:!1,exports:{}};return n[a].call(f.exports,f,f.exports,i),f.l=!0,f.exports}return i.m=n,i.c=r,i.d=function(a,f,d){i.o(a,f)||Object.defineProperty(a,f,{enumerable:!0,get:d})},i.r=function(a){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,f){if(1&f&&(a=i(a)),8&f||4&f&&typeof a=="object"&&a&&a.__esModule)return a;var d=Object.create(null);if(i.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&f&&typeof a!="string")for(var h in a)i.d(d,h,function(I){return a[I]}.bind(null,h));return d},i.n=function(a){var f=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(f,"a",f),f},i.o=function(a,f){return Object.prototype.hasOwnProperty.call(a,f)},i.p="",i(i.s=0)}([function(n,r,i){i.r(r);var a=window,f=/^image\//,d=/\.\w+$/,h={},I={file:null,quality:.8,convertSize:2048e3,loose:!0,redressOrientation:!0},O=function(o){return typeof o=="function"},D=function(o){return f.test(o)};function M(o){o=Object.assign({},I,o),this.options=o,this.file=o.file,this.image=null,this.ParsedOrientationInfo=null,this.init()}var T=M.prototype;for(var C in r.default=M,T.init=function(){var o=this,l=this.file,s=this.options;l&&D(l.type)?(D(s.mimeType)||(s.mimeType=l.type),h.file2Image(l,function(u){O(o.beforeCompress)&&(o.image=u,l.width=u.naturalWidth,l.height=u.naturalHeight,o.beforeCompress(l)),l.type==="image/jpeg"&&s.redressOrientation?o.getParsedOrientationInfo(function(g){o.parsedOrientationInfo=g,o.rendCanvas()}):(o.parsedOrientationInfo={rotate:0,scaleX:1,scaleY:1},o.rendCanvas())},o.error)):o.error("\u8BF7\u4E0A\u4F20\u56FE\u7247\u6587\u4EF6!")},T.rendCanvas=function(){var o=this,l=this.options,s=this.image,u=this.getExpectedEdge(),g=u.dWidth,y=u.dHeight,E=u.width,m=u.height,b=h.image2Canvas(s,g,y,o.beforeDraw.bind(o),o.afterDraw.bind(o),E,m);h.canvas2Blob(b,function(w){w&&(w.width=b.width,w.height=b.height),o.success(w)},l.quality,l.mimeType)},T.beforeCompress=function(){O(this.options.beforeCompress)&&this.options.beforeCompress(this.file)},T.getExpectedEdge=function(){var o,l=this.image,s=this.parsedOrientationInfo.rotate,u=this.options,g=l.naturalWidth,y=l.naturalHeight,E=Math.abs(s)%180==90;E&&(o=y,y=g,g=o);var m=g/y,b=Math.max(u.maxWidth,0)||1/0,w=Math.max(u.maxHeight,0)||1/0,p=Math.max(u.minWidth,0)||0,v=Math.max(u.minHeight,0)||0,F=Math.max(u.width,0)||g,P=Math.max(u.height,0)||y;b<1/0&&w<1/0?w*m>b?w=b/m:b=w*m:b<1/0?w=b/m:w<1/0&&(b=w*m),p>0&&v>0?v*m>p?v=p/m:p=v*m:p>0?v=p/m:v>0&&(p=v*m),P*m>F?P=F/m:F=P*m;var j=F=Math.floor(Math.min(Math.max(F,p),b)),N=P=Math.floor(Math.min(Math.max(P,v),w));return E&&(o=N,N=j,j=o),{dWidth:j,dHeight:N,width:F,height:P}},T.getParsedOrientationInfo=function(o){var l=this;this.getOrientation(function(s){O(o)&&o(l.parseOrientation(s))})},T.getOrientation=function(o){var l=this;h.file2ArrayBuffer(this.file,function(s){O(o)&&o(l.resetAndGetOrientation(s))})},T.resetAndGetOrientation=function(o){var l,s=new DataView(o);try{var u,g,y;if(s.getUint8(0)===255&&s.getUint8(1)===216)for(var E=s.byteLength,m=2;m+1<E;){if(s.getUint8(m)===255&&s.getUint8(m+1)===225){g=m;break}m+=1}if(g){var b=g+4,w=g+10;if(h.getStringFromCharCode(s,b,4)==="Exif"){var p=s.getUint16(w);if(((u=p===18761)||p===19789)&&s.getUint16(w+2,u)===42){var v=s.getUint32(w+4,u);v>=8&&(y=w+v)}}}if(y){var F;for(E=s.getUint16(y,u),F=0;F<E;F+=1)if(m=y+12*F+2,s.getUint16(m,u)===274){m+=8,l=s.getUint16(m,u),s.setUint16(m,1,u);break}}}catch(P){console.error(P),l=1}return l},T.parseOrientation=function(o){var l=0,s=1,u=1;switch(o){case 2:s=-1;break;case 3:l=-180;break;case 4:u=-1;break;case 5:l=90,u=-1;break;case 6:l=90;break;case 7:l=90,s=-1;break;case 8:l=-90}return{rotate:l,scaleX:s,scaleY:u}},T.beforeDraw=function(o,l){var s=this.parsedOrientationInfo,u=s.rotate,g=s.scaleX,y=s.scaleY,E=this.file,m=this.options,b="transparent",w=l.width,p=l.height;switch(E.size>m.convertSize&&m.mimeType==="image/png"&&(b="#fff",m.mimeType="image/jpeg"),o.fillStyle=b,o.fillRect(0,0,w,p),O(m.beforeDraw)&&m.beforeDraw.call(this,o,l),o.save(),u){case 90:o.translate(w,0);break;case-90:o.translate(0,p);break;case-180:o.translate(w,p)}o.rotate(u*Math.PI/180),o.scale(g,y)},T.afterDraw=function(o,l){var s=this.options;O(s.afterDraw)&&s.afterDraw.call(this,o,l)},T.error=function(o){var l=this.options;if(!O(l.error))throw new Error(o);l.error.call(this,o)},T.success=function(o){var l,s,u=this.options,g=this.file,y=this.image,E=this.getExpectedEdge(),m=y.naturalHeight,b=y.naturalWidth;if(o&&o.size)if(!u.loose&&o.size>g.size&&!(E.width>b||E.height>m))console.warn("\u5F53\u524D\u8BBE\u7F6E\u7684\u662F\u975E\u5BBD\u677E\u6A21\u5F0F\uFF0C\u538B\u7F29\u7ED3\u679C\u5927\u4E8E\u6E90\u56FE\u7247\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),o=g;else{var w=new Date;o.lastModified=w.getTime(),o.lastModifiedDate=w,o.name=g.name,o.name&&o.type!==g.type&&(o.name=o.name.replace(d,(l=o.type,(s=D(l)?l.substr(6):"")==="jpeg"&&(s="jpg"),"."+s)))}else console.warn("\u56FE\u7247\u538B\u7F29\u51FA\u4E86\u70B9\u610F\u5916\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),o=g;O(u.success)&&u.success.call(this,o)},h.file2DataUrl=function(o,l,s){var u=new FileReader;u.onload=function(){l(u.result)},u.onerror=function(){O(s)&&s("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsDataURL(o)},h.file2ArrayBuffer=function(o,l,s){var u=new FileReader;u.onload=function(g){l(g.target.result)},u.onerror=function(){O(s)&&s("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsArrayBuffer(o)},h.getStringFromCharCode=function(o,l,s){var u,g="";for(s+=l,u=l;u<s;u+=1)g+=String.fromCharCode(o.getUint8(u));return g},h.file2Image=function(o,l,s){var u=new Image,g=a.URL||a.webkitURL;if(a.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(a.navigator.userAgent)&&(u.crossOrigin="anonymous"),u.alt=o.name,u.onerror=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},g){var y=g.createObjectURL(o);u.onload=function(){l(u),g.revokeObjectURL(y)},u.src=y}else this.file2DataUrl(o,function(E){u.onload=function(){l(u)},u.src=E},s)},h.url2Image=function(o,l,s){var u=new Image;u.src=o,u.onload=function(){l(u)},u.onerror=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")}},h.image2Canvas=function(o,l,s,u,g,y,E){var m=document.createElement("canvas"),b=m.getContext("2d");return m.width=y||o.naturalWidth,m.height=E||o.naturalHeight,O(u)&&u(b,m),b.save(),b.drawImage(o,0,0,l,s),b.restore(),O(g)&&g(b,m),m},h.canvas2DataUrl=function(o,l,s){return o.toDataURL(s||"image/jpeg",l)},h.dataUrl2Image=function(o,l,s){var u=new Image;u.onload=function(){l(u)},u.error=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},u.src=o},h.dataUrl2Blob=function(o,l){for(var s=o.split(",")[1],u=o.match(/^data:(.*?)(;base64)?,/)[1],g=atob(s),y=s.length,E=new Uint8Array(y),m=0;m<y;m++)E[m]=g.charCodeAt(m);return new Blob([E],{type:l||u})},h.blob2DataUrl=function(o,l,s){this.file2DataUrl(o,l,s)},h.blob2Image=function(o,l,s){this.file2Image(o,l,s)},h.canvas2Blob=function(o,l,s,u){var g=this;HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(y,E,m){var b=this.toDataURL(E,m);y(g.dataUrl2Blob(b))}}),o.toBlob(function(y){l(y)},u||"image/jpeg",s||.8)},h.upload=function(o,l,s){var u=new XMLHttpRequest,g=new FormData;g.append("file",l),u.onreadystatechange=function(){if(u.readyState!==4||u.status!==200)throw new Error(u);s&&s(u.responseText)},u.open("POST",o,!0),u.send(g)},h)h.hasOwnProperty(C)&&(M[C]=h[C])}]).default})}(R)),R.exports}(function(e){e.exports=Ke()})(V);var Xe=Ge(V.exports);const Ze=e=>{if(!e.file)throw new Error("file is required");const t=e.file.size/1024;let n=e.quality;if(n===void 0){if(t<200)return e.file;t>200&&t<=512?n=.9:t>512&&t<=1024?n=.8:t>1024&&t<=2048?n=.85:t>2048&&t<=10240?n=.8:t>10240&&t<=20480&&(n=.75)}return new Promise((r,i)=>{var a;new Xe({...e,quality:n,convertSize:(a=e.convertSize)!=null?a:1024,success:f=>{r(f)},error:f=>{i(f)}})})},K=e=>e&&e.split("?")[0].split("/").pop()||"",Qe=e=>(e=K(e),e?(e.split(".").pop()||"").toLowerCase():""),xe=(e,t,n)=>Math.min(Math.max(n,e),t);c.Enum=k,c.arrayDiff=re,c.arrayEquals=$,c.assign=le,c.buildTree=ge,c.buildUrl=Re,c.clamp=xe,c.combineByField=ve,c.compressImage=Ze,c.copyText=ze,c.createStreamIterator=$e,c.createTimer=Ae,c.debounce=We,c.decodeHTMLEntities=Ne,c.deepAssign=q,c.deepClone=de,c.delayWhen=Be,c.downloadFile=He,c.encodeHTMLEntities=je,c.fileToBlob=Le,c.fileToDataURL=Me,c.fileToObjectURL=Se,c.filterTree=J,c.findNode=pe,c.findNodeWithPath=ye,c.findParentAndIndex=we,c.flatTree=Ee,c.formatBytes=Ie,c.formatDate=Oe,c.formatInterval=Te,c.formatNumber=Fe,c.formatPx=De,c.getFileExt=Qe,c.getFilename=K,c.getProp=me,c.getProperty=L,c.getRandInt=Ce,c.groupBy=ae,c.handleFormValidateError=qe,c.hasClass=Ve,c.isBlob=x,c.isChildClassOf=te,c.isEmpty=B,c.isEqual=ne,c.isIframe=Q,c.isImage=ee,c.isObject=Z,c.isPlainObject=A,c.looseEqual=S,c.mergeDefaultOptions=Y,c.omit=ce,c.omitEmpty=fe,c.openPage=Ye,c.parseAreaCode=Je,c.parseJson=z,c.pick=W,c.runAtLeastTime=Pe,c.setProperty=he,c.sleep=_,c.toArray=oe,c.toCamelCase=se,c.toKebabCase=H,c.toUnderscore=ue,c.urlToBlob=_e,c.urlToDataURL=Ue,c.urlToPngBlob=ke,c.walkTree=be,c.withInstall=X,c.without=ie,Object.defineProperty(c,"__esModule",{value:!0})});
1
+ /*! Next UI utils v1.4.0 */(function(c,M){typeof exports=="object"&&typeof module!="undefined"?M(exports,require("element-plus")):typeof define=="function"&&define.amd?define(["exports","element-plus"],M):(c=typeof globalThis!="undefined"?globalThis:c||self,M(c.NextUI={},c.ElementPlus))})(this,function(c,M){"use strict";const Z=(e,n)=>{try{if(e.install=t=>{for(const r of[e,...Object.values(n!=null?n:{})])r.name&&t.component(r.name,r)},n)for(const[t,r]of Object.entries(n))e[t]=r;return e}catch(t){}};function x(e){const n=typeof e;return e!=null&&(n==="object"||n==="function")}function A(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function B(e){if(typeof e=="boolean"||typeof e=="number")return!1;if(Array.isArray(e)){if(e.length===0)return!0}else if(e instanceof Object&&JSON.stringify(e)==="{}")return!0;return e==null||e==="null"||e==="undefined"||e===""}function Q(){return window.top!==window}function ee(e){return toString.call(e)==="[object Blob]"}function te(e){if(e.startsWith("data:image"))return!0;const n=e.lastIndexOf("."),t=n>=0?e.slice(n+1).toLowerCase():"";return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)}function ne(e,n){for(;e;){if(e===n)return!0;e=Object.getPrototypeOf(e)}return!1}const k=(e,n)=>{const t=A(e),r=A(n);return t&&r?JSON.stringify(e)===JSON.stringify(n):!t&&!r?String(e)===String(n):!1},$=(e,n)=>{if(e=e||[],n=n||[],e.length!==n.length)return!1;for(const[t,r]of e.entries())if(!k(r,n[t]))return!1;return!0},re=(e,n)=>Array.isArray(e)&&Array.isArray(n)?$(e,n):k(e,n);function ie(e,n,t){const r={};let i;typeof t=="function"?i=t:t?i=d=>d[t]:i=d=>d,(e||[]).forEach(d=>{const h=i(d);r[h]={item:d,count:-1}}),(n||[]).forEach(d=>{const h=i(d);r[h]?r[h].count=0:r[h]={item:d,count:1}});const o=[],l=[];for(const d in r)Object.prototype.hasOwnProperty.call(r,d)&&(r[d].count===1?l.push(r[d].item):r[d].count===-1&&o.push(r[d].item));return{changed:o.length+l.length>0,removed:o.length>0,added:l.length>0,removedItems:o,addedItems:l}}const oe=(e,...n)=>{const t=[];return e.forEach(r=>{n.includes(r)||t.push(r)}),t},ae=e=>B(e)?[]:Array.isArray(e)?e:[e],ue=(e,n)=>{if(typeof n!="function"){const t=n;n=r=>String(r[t])}return(e||[]).reduce((t,r)=>{const i=n(r);return t[i]||(t[i]=[]),t[i].push(r),t},{})};function se(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function H(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ce(e){return e.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()).replace(/_([a-z])/g,(n,t)=>t.toUpperCase())}const W=(e,n,...t)=>{const r={};return n=(n?[].concat(n):[]).concat(t),e&&n.forEach(i=>{Object.hasOwnProperty.call(e,i)&&(r[i]=e[i])}),r},le=(e,n,...t)=>{const r={};return n=(n?[].concat(n):[]).concat(t),e&&Object.keys(e).forEach(i=>{n.includes(i)||(r[i]=e[i])}),r},fe=(e,...n)=>{for(const t of n)Object.assign(e,W(t,Object.keys(e)));return e};function z(e,...n){A(e)||(e={});for(const t of n)if(A(t))for(const r in t)r==="__proto__"||e===t[r]||(A(t[r])?e[r]=z(e[r],t[r]):e[r]=t[r]);return e}const de=e=>{const n={};if(e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(B(e[t])||(n[t]=e[t]));return n};function he(e){const n=new WeakMap,t=r=>{if(typeof r=="object"&&r!==null){if(n.has(r))return n.get(r);const i=Array.isArray(r)?[]:{};n.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=t(r[o]));return i}return r};return t(e)}function Y(e,n){try{return JSON.parse(e)}catch(t){return console.error("parse json error:",e),n}}function me(e,n,t){if(!e||!n)return;const r=n.split(".");let i;for(;(i=r.shift())!==void 0&&r.length!==0;)e[i]||(e[i]={}),e=e[i];i&&(e[i]=t)}function S(e,n){if(!e||!n)return;const t=n.split(".");for(const r of t){if(!e)return;e=e[r]}return e}const J=(e,n)=>{for(const t in e)Object.getOwnPropertyDescriptor(n,t)?A(e[t])&&J(e[t],n[t]):n[t]=e[t];return n},ge=(e,n)=>{var t;return(t=e[n])!=null?t:e[H(n)]};function pe(e,n){let{key:t,parentKey:r}=n||{};t=t||"id",r=r||"pid";const i=(e||[]).reduce((l,d)=>(l[S(d,t)]=d,l),{}),o=[];return(e||[]).forEach(l=>{const d=i[S(l,r)];d?(d.children||(d.children=[])).push(l):o.push(l)}),o}function V(e,n){const t=[];return(e||[]).forEach(r=>{let{children:i,...o}=r;i&&i.length>0&&(i=V(i,n),i.length>0&&(o.children=i)),n(o)&&t.push(o)}),t}function ye(e,n){const t=e?[...e]:[];for(;t.length>0;){const r=t.shift();if(n(r))return r;r.children&&r.children.length>0&&t.push(...r.children)}return null}function we(e,n){const t=(r,i)=>{for(const o of r){if(n(o))return[...i,o];if(o.children&&o.children.length>0){const l=t(o.children,[...i,o]);if(l)return l}}return null};return t(e||[],[])}function be(e,n){const t={children:e||[]},r=[t];let i,o=-1;for(;r.length>0;){i=r.shift();const{children:l}=i;if(l&&l.length>0){for(const[d,h]of l.entries())if(n(h)){o=d;break}if(o!==-1)break;r.push(...l)}}return{found:o!==-1,parent:i===t?null:i,index:o}}function Ee(e,n){const t=(e||[]).map(r=>({node:r,parent:null}));for(;t.length>0;){const r=t.shift(),{node:i,parent:o}=r;if(n(i,o)===!1)break;i.children&&i.children.length>0&&t.push(...i.children.map(d=>({node:d,parent:i})))}}function ve(e){const n=[];if(e&&e.length>0){n.push(...e);let t=0;for(;t<n.length;){const{children:r}=n[t];r&&r.length>0&&n.push(...r),t++}}return n}function Oe(e,n,t){t||(t=n);const r=i=>(i||[]).reduce((o,l)=>(l[t]=l[n]+(l.children?r(l.children):0),o+l[t]),0);r(e)}function Fe(e,n){if(!e)return"";const t=new Date(e);if(t.getTime()===0)return"";n=n||"yyyy-MM-dd";let r;const i={"Y+":t.getFullYear().toString(),"y+":t.getFullYear().toString(),"M+":(t.getMonth()+1).toString(),"D+":t.getDate().toString(),"d+":t.getDate().toString(),"h+":(t.getHours()%12||12).toString(),"H+":t.getHours().toString(),"m+":t.getMinutes().toString(),"s+":t.getSeconds().toString(),a:t.getHours()<12?"am":"pm",A:t.getHours()<12?"AM":"PM"};for(const o in i)r=new RegExp(`(${o})`).exec(n),r&&(n=n.replace(r[1],r[1].length===1?i[o]:i[o].padStart(r[1].length,"0")));return n}function Te(e,n){if(B(e))return"";let{minPrecision:t,maxPrecision:r,decimalPoint:i,thousandSeparator:o,grouping:l}=n||{};t=t!=null?t:0,r=r!=null?r:2,i=i||".",o=o!=null?o:",",l=l!=null?l:3;let[d,h]=`${e}`.split(".");return d=d.replace(new RegExp(`(?<!^-?)(?=(\\d{${l}})+$)`,"g"),o),h=(h||"").slice(0,r).padEnd(t,"0"),h&&(h=i+h),d+h}function Ie(e,n){if(n){const i=B(e[0])||e[0]===Number.NEGATIVE_INFINITY?"-\u221E":e[0],o=B(e[1])||e[1]===+Number.POSITIVE_INFINITY?"+\u221E":e[1];return`${i+(i==="-\u221E"?" < ":" \u2264 ")+n} < ${o}`}const t=B(e[0])||e[0]==="-\u221E"||e[0]==="-Infinity"?"-\u221E":e[0],r=B(e[1])||e[1]==="+\u221E"||e[1]==="Infinity"?"+\u221E":e[1];return`${t==="-\u221E"?"(":"["} ${t}, ${r} )`}function De(e){if(e=Number(e),Number.isNaN(e))return"";const n=["B","KB","MB","GB","TB","PB"];let t=0;for(;e>=1024&&t<n.length-1;)e/=1024,t++;return e=Math.round(e*100)/100,`${e} ${n[t]}`}function Pe(e){return Number.isNaN(Number(e))?e||"":`${Number(e)}px`}const _=e=>new Promise(n=>{setTimeout(n,e)}),Ae=(e,n)=>new Promise((t,r)=>{(async()=>{try{const o=Date.now(),l=await e(),d=Date.now()-o;d<n&&await _(n-d),t(l)}catch(o){r(o)}})()}),Be=()=>{const e=Date.now();return{delayTo:async t=>{const r=Date.now()-e;r<t&&await _(t-r)}}},Ce=(e,n,t)=>{let r,i=!1,o;const l=()=>{if(i||e()){r(void 0),clearTimeout(o);return}requestAnimationFrame(l)};return t&&(o=setTimeout(()=>{i=!0},t)),new Promise(d=>{r=d,n?setTimeout(l,n):requestAnimationFrame(l)})},Me=(e,n)=>Math.floor(e+Math.random()*(n-e));function Ue(e){return new Promise((n,t)=>{const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=()=>{if(r.status===200){const i=new FileReader;i.readAsDataURL(r.response),i.onload=o=>{n(o.target.result)},i.onerror=o=>t(o)}else t(new Error("Failed to load file"))},r.onerror=()=>{t(new Error("Failed to load file"))},r.send()})}function Le(e){return new Promise((n,t)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=i=>{n(i.target.result)},r.onerror=i=>t(i)})}function ke(e){return URL.createObjectURL(e)}function Se(e){return new Promise((n,t)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=i=>{n(new Blob([i.target.result]))},r.onerror=i=>t(i)})}async function _e(e){if(!e)throw new Error("url is empty");return(await fetch(e)).blob()}async function Re(e){if(!e)throw new Error("url is empty");return new Promise((n,t)=>{const r=new Image;r.onload=()=>{const i=document.createElement("canvas");i.width=r.width,i.height=r.height;const o=i.getContext("2d");o==null||o.drawImage(r,0,0,r.width,r.height),i.toBlob(l=>{l?n(l):t(new Error("transform image to blob failed"))},"image/png")},r.onerror=t,r.src=e})}function je(e,n){if(!e)return"";if(typeof e=="string"&&(e=new URL(e)),n)for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.searchParams.append(t,n[t]);return e.toString()}function Ne(e){return e.replace(/[<>&]/g,n=>`&#${n.charCodeAt(0)};`)}function qe(e){const n=document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText}async function*$e(e,n){const t=new TextDecoder("utf-8"),{original:r}=n||{};let i="";for(;;){const{value:o,done:l}=await e.read();if(l)return;i+=t.decode(o);const d=i.split(`
2
+ `);i=d.pop()||"";for(let h of d)if(h=h.trim(),!!h)if(r)yield h;else{if(h==="event: ping")continue;const I=h.match(/^(?:(\w*):)?(.*)$/);if(!I){console.error("[BufferedReader] parse line failed:",h);continue}const O=I[1],D=Y(I[2].trim());if(!D){console.error("[BufferedReader] parse json failed:",I[2].trim());continue}yield{event:O,data:D}}}}const He=e=>{let{url:n,filename:t}=e;if(t=t||"\u672A\u547D\u540D",n||e.blob&&(n=URL.createObjectURL(e.blob),setTimeout(()=>{URL.revokeObjectURL(n)},1e4)),!n)throw new Error("No URL provided");const r=document.createElement("a");r.href=n,r.download=t,r.click()};function We(e,n,t){let r,i,o,l,d,h,I=0,O=!1,D=!1,U=!0;if(typeof e!="function")throw new TypeError("Expected a function");n=+n||0,t&&A(t)&&(O=!!t.leading,D="maxWait"in t,o=D?Math.max(+t.maxWait||0,n):o,U="trailing"in t?!!t.trailing:U);function T(p){const v=r,F=i;return r=i=void 0,I=p,l=e.apply(F,v),l}function C(p,v){return setTimeout(p,v)}function a(p){clearTimeout(p)}function f(p){return I=p,d=C(g,n),O?T(p):l}function s(p){const v=p-h,F=p-I,P=n-v;return D?Math.min(P,o-F):P}function u(p){const v=p-h,F=p-I;return h===void 0||v>=n||v<0||D&&F>=o}function g(){const p=Date.now();if(u(p))return y(p);d=C(g,s(p))}function y(p){return d=void 0,U&&r?T(p):(r=i=void 0,l)}function E(){d!==void 0&&a(d),I=0,r=h=i=d=void 0}function m(){return d===void 0?l:y(Date.now())}function b(){return d!==void 0}function w(...p){const v=Date.now(),F=u(v);if(r=p,i=this,h=v,F){if(d===void 0)return f(h);if(D)return d=C(g,n),T(h)}return d===void 0&&(d=C(g,n)),l}return w.cancel=E,w.flush=m,w.pending=b,w}function ze(e){const{el:n,msg:t}=e||{},r=t===void 0?"\u8BF7\u5B8C\u5584\u8868\u5355\u5185\u5BB9":t;if(r&&M.ElMessage.error(r),!n)return;const i=n.querySelector(".is-error");i&&i.scrollIntoView({behavior:"smooth",inline:"nearest",block:"center"})}async function Ye(e,n={successText:"\u590D\u5236\u6210\u529F"}){const{successText:t}=n||{};try{if(navigator.clipboard){await navigator.clipboard.writeText(e),t&&M.ElMessage.success(t);return}}catch(i){}const r=document.createElement("textarea");document.body.appendChild(r),r.style.position="fixed",r.style.clip="rect(0 0 0 0)",r.style.top="10px",r.value=e,r.select(),document.execCommand("copy",!0),document.body.removeChild(r),t&&M.ElMessage.success(t)}function Je(e,...n){if(!e)return;const t=document.createElement("a");t.addEventListener("click",r=>{r.preventDefault(),window.open(e,...n)}),t.click()}function Ve(e){if(!e)return[];const n=[`${e.slice(0,2)}0000`,`${e.slice(0,4)}00`,e.slice(0,6),e.slice(0,9),e.slice(0,12)],t=0,r=n.indexOf(e)+1;return n.slice(t,r)}class R{constructor(n){this._enumItems={};var t;if(n)if(Array.isArray(n))for(const[r,i]of n.entries())this.add((t=i.key)!=null?t:`${r}`,i);else for(const r in n){const i=n[r];this.add(r,i)}}add(n,t){if(this[n])throw new Error(`\u679A\u4E3E\u9879 ${n} \u5DF2\u5B58\u5728`);const r=t.value;return this[n]=r,this._enumItems[r]={...t},this}keys(){return Object.keys(this).filter(n=>n!=="_enumItems")}*[Symbol.iterator](){for(const n of this.keys())yield this.getItem(this[n])}getItem(n){return this._enumItems[n]}getLabel(n){var t;return(t=this.getItem(n))==null?void 0:t.label}getProps(n){var t;return(t=this.getItem(n))==null?void 0:t.props}filter(n){const t=new R;for(const r of this.keys()){const i=this.getItem(this[r]);n(i,r)&&t.add(r,i)}return t}clone(){return this.filter(()=>!0)}set(n,t){const r=this.getItem(this[n]);return r&&Object.assign(r,t),this}remove(n){const t=this[n];return t!==void 0&&(delete this[n],delete this._enumItems[t]),this}forEach(n){for(const t of this.keys())n(this.getItem(this[t]),t)}}const Ge=(e,n)=>{if(!e||!n)return!1;if(n.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(n)};function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G={exports:{}},j={exports:{}},K;function Xe(){return K||(K=1,function(e,n){(function(t,r){e.exports=r()})(window,function(){return function(t){var r={};function i(o){if(r[o])return r[o].exports;var l=r[o]={i:o,l:!1,exports:{}};return t[o].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=t,i.c=r,i.d=function(o,l,d){i.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:d})},i.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,l){if(1&l&&(o=i(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var d=Object.create(null);if(i.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var h in o)i.d(d,h,function(I){return o[I]}.bind(null,h));return d},i.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(l,"a",l),l},i.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},i.p="",i(i.s=0)}([function(t,r,i){i.r(r);var o=window,l=/^image\//,d=/\.\w+$/,h={},I={file:null,quality:.8,convertSize:2048e3,loose:!0,redressOrientation:!0},O=function(a){return typeof a=="function"},D=function(a){return l.test(a)};function U(a){a=Object.assign({},I,a),this.options=a,this.file=a.file,this.image=null,this.ParsedOrientationInfo=null,this.init()}var T=U.prototype;for(var C in r.default=U,T.init=function(){var a=this,f=this.file,s=this.options;f&&D(f.type)?(D(s.mimeType)||(s.mimeType=f.type),h.file2Image(f,function(u){O(a.beforeCompress)&&(a.image=u,f.width=u.naturalWidth,f.height=u.naturalHeight,a.beforeCompress(f)),f.type==="image/jpeg"&&s.redressOrientation?a.getParsedOrientationInfo(function(g){a.parsedOrientationInfo=g,a.rendCanvas()}):(a.parsedOrientationInfo={rotate:0,scaleX:1,scaleY:1},a.rendCanvas())},a.error)):a.error("\u8BF7\u4E0A\u4F20\u56FE\u7247\u6587\u4EF6!")},T.rendCanvas=function(){var a=this,f=this.options,s=this.image,u=this.getExpectedEdge(),g=u.dWidth,y=u.dHeight,E=u.width,m=u.height,b=h.image2Canvas(s,g,y,a.beforeDraw.bind(a),a.afterDraw.bind(a),E,m);h.canvas2Blob(b,function(w){w&&(w.width=b.width,w.height=b.height),a.success(w)},f.quality,f.mimeType)},T.beforeCompress=function(){O(this.options.beforeCompress)&&this.options.beforeCompress(this.file)},T.getExpectedEdge=function(){var a,f=this.image,s=this.parsedOrientationInfo.rotate,u=this.options,g=f.naturalWidth,y=f.naturalHeight,E=Math.abs(s)%180==90;E&&(a=y,y=g,g=a);var m=g/y,b=Math.max(u.maxWidth,0)||1/0,w=Math.max(u.maxHeight,0)||1/0,p=Math.max(u.minWidth,0)||0,v=Math.max(u.minHeight,0)||0,F=Math.max(u.width,0)||g,P=Math.max(u.height,0)||y;b<1/0&&w<1/0?w*m>b?w=b/m:b=w*m:b<1/0?w=b/m:w<1/0&&(b=w*m),p>0&&v>0?v*m>p?v=p/m:p=v*m:p>0?v=p/m:v>0&&(p=v*m),P*m>F?P=F/m:F=P*m;var N=F=Math.floor(Math.min(Math.max(F,p),b)),q=P=Math.floor(Math.min(Math.max(P,v),w));return E&&(a=q,q=N,N=a),{dWidth:N,dHeight:q,width:F,height:P}},T.getParsedOrientationInfo=function(a){var f=this;this.getOrientation(function(s){O(a)&&a(f.parseOrientation(s))})},T.getOrientation=function(a){var f=this;h.file2ArrayBuffer(this.file,function(s){O(a)&&a(f.resetAndGetOrientation(s))})},T.resetAndGetOrientation=function(a){var f,s=new DataView(a);try{var u,g,y;if(s.getUint8(0)===255&&s.getUint8(1)===216)for(var E=s.byteLength,m=2;m+1<E;){if(s.getUint8(m)===255&&s.getUint8(m+1)===225){g=m;break}m+=1}if(g){var b=g+4,w=g+10;if(h.getStringFromCharCode(s,b,4)==="Exif"){var p=s.getUint16(w);if(((u=p===18761)||p===19789)&&s.getUint16(w+2,u)===42){var v=s.getUint32(w+4,u);v>=8&&(y=w+v)}}}if(y){var F;for(E=s.getUint16(y,u),F=0;F<E;F+=1)if(m=y+12*F+2,s.getUint16(m,u)===274){m+=8,f=s.getUint16(m,u),s.setUint16(m,1,u);break}}}catch(P){console.error(P),f=1}return f},T.parseOrientation=function(a){var f=0,s=1,u=1;switch(a){case 2:s=-1;break;case 3:f=-180;break;case 4:u=-1;break;case 5:f=90,u=-1;break;case 6:f=90;break;case 7:f=90,s=-1;break;case 8:f=-90}return{rotate:f,scaleX:s,scaleY:u}},T.beforeDraw=function(a,f){var s=this.parsedOrientationInfo,u=s.rotate,g=s.scaleX,y=s.scaleY,E=this.file,m=this.options,b="transparent",w=f.width,p=f.height;switch(E.size>m.convertSize&&m.mimeType==="image/png"&&(b="#fff",m.mimeType="image/jpeg"),a.fillStyle=b,a.fillRect(0,0,w,p),O(m.beforeDraw)&&m.beforeDraw.call(this,a,f),a.save(),u){case 90:a.translate(w,0);break;case-90:a.translate(0,p);break;case-180:a.translate(w,p)}a.rotate(u*Math.PI/180),a.scale(g,y)},T.afterDraw=function(a,f){var s=this.options;O(s.afterDraw)&&s.afterDraw.call(this,a,f)},T.error=function(a){var f=this.options;if(!O(f.error))throw new Error(a);f.error.call(this,a)},T.success=function(a){var f,s,u=this.options,g=this.file,y=this.image,E=this.getExpectedEdge(),m=y.naturalHeight,b=y.naturalWidth;if(a&&a.size)if(!u.loose&&a.size>g.size&&!(E.width>b||E.height>m))console.warn("\u5F53\u524D\u8BBE\u7F6E\u7684\u662F\u975E\u5BBD\u677E\u6A21\u5F0F\uFF0C\u538B\u7F29\u7ED3\u679C\u5927\u4E8E\u6E90\u56FE\u7247\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),a=g;else{var w=new Date;a.lastModified=w.getTime(),a.lastModifiedDate=w,a.name=g.name,a.name&&a.type!==g.type&&(a.name=a.name.replace(d,(f=a.type,(s=D(f)?f.substr(6):"")==="jpeg"&&(s="jpg"),"."+s)))}else console.warn("\u56FE\u7247\u538B\u7F29\u51FA\u4E86\u70B9\u610F\u5916\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),a=g;O(u.success)&&u.success.call(this,a)},h.file2DataUrl=function(a,f,s){var u=new FileReader;u.onload=function(){f(u.result)},u.onerror=function(){O(s)&&s("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsDataURL(a)},h.file2ArrayBuffer=function(a,f,s){var u=new FileReader;u.onload=function(g){f(g.target.result)},u.onerror=function(){O(s)&&s("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsArrayBuffer(a)},h.getStringFromCharCode=function(a,f,s){var u,g="";for(s+=f,u=f;u<s;u+=1)g+=String.fromCharCode(a.getUint8(u));return g},h.file2Image=function(a,f,s){var u=new Image,g=o.URL||o.webkitURL;if(o.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(o.navigator.userAgent)&&(u.crossOrigin="anonymous"),u.alt=a.name,u.onerror=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},g){var y=g.createObjectURL(a);u.onload=function(){f(u),g.revokeObjectURL(y)},u.src=y}else this.file2DataUrl(a,function(E){u.onload=function(){f(u)},u.src=E},s)},h.url2Image=function(a,f,s){var u=new Image;u.src=a,u.onload=function(){f(u)},u.onerror=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")}},h.image2Canvas=function(a,f,s,u,g,y,E){var m=document.createElement("canvas"),b=m.getContext("2d");return m.width=y||a.naturalWidth,m.height=E||a.naturalHeight,O(u)&&u(b,m),b.save(),b.drawImage(a,0,0,f,s),b.restore(),O(g)&&g(b,m),m},h.canvas2DataUrl=function(a,f,s){return a.toDataURL(s||"image/jpeg",f)},h.dataUrl2Image=function(a,f,s){var u=new Image;u.onload=function(){f(u)},u.error=function(){O(s)&&s("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},u.src=a},h.dataUrl2Blob=function(a,f){for(var s=a.split(",")[1],u=a.match(/^data:(.*?)(;base64)?,/)[1],g=atob(s),y=s.length,E=new Uint8Array(y),m=0;m<y;m++)E[m]=g.charCodeAt(m);return new Blob([E],{type:f||u})},h.blob2DataUrl=function(a,f,s){this.file2DataUrl(a,f,s)},h.blob2Image=function(a,f,s){this.file2Image(a,f,s)},h.canvas2Blob=function(a,f,s,u){var g=this;HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(y,E,m){var b=this.toDataURL(E,m);y(g.dataUrl2Blob(b))}}),a.toBlob(function(y){f(y)},u||"image/jpeg",s||.8)},h.upload=function(a,f,s){var u=new XMLHttpRequest,g=new FormData;g.append("file",f),u.onreadystatechange=function(){if(u.readyState!==4||u.status!==200)throw new Error(u);s&&s(u.responseText)},u.open("POST",a,!0),u.send(g)},h)h.hasOwnProperty(C)&&(U[C]=h[C])}]).default})}(j)),j.exports}(function(e){e.exports=Xe()})(G);var Ze=Ke(G.exports);const xe=e=>{if(!e.file)throw new Error("file is required");const n=e.file.size/1024;let t=e.quality;if(t===void 0){if(n<200)return e.file;n>200&&n<=512?t=.9:n>512&&n<=1024?t=.8:n>1024&&n<=2048?t=.85:n>2048&&n<=10240?t=.8:n>10240&&n<=20480&&(t=.75)}return new Promise((r,i)=>{var o;new Ze({...e,quality:t,convertSize:(o=e.convertSize)!=null?o:1024,success:l=>{r(l)},error:l=>{i(l)}})})},X=e=>e&&e.split("?")[0].split("/").pop()||"",Qe=e=>(e=X(e),e?(e.split(".").pop()||"").toLowerCase():""),et=(e,n,t)=>Math.min(Math.max(t,e),n),L=new Map,tt=(e,n=3)=>{if(!e)throw new Error("name is required");let t;return L.has(e)?t=L.get(e):(t={maxNum:n,currentNum:0,queue:[]},L.set(e,t)),{acquire:async()=>new Promise((d,h)=>{t.currentNum>=t.maxNum?t.queue.push({resolve:d,reject:h}):(t.currentNum++,d(!0))}),release:()=>{if(t.queue.length>0){const{resolve:d}=t.queue.shift();d(!0)}else t.currentNum--},destroy:async()=>{L.delete(e)},getMaxNum:()=>t.maxNum}};c.Enum=R,c.arrayDiff=ie,c.arrayEquals=$,c.assign=fe,c.buildTree=pe,c.buildUrl=je,c.clamp=et,c.combineByField=Oe,c.compressImage=xe,c.copyText=Ye,c.createLock=tt,c.createStreamIterator=$e,c.createTimer=Be,c.debounce=We,c.decodeHTMLEntities=qe,c.deepAssign=z,c.deepClone=he,c.delayWhen=Ce,c.downloadFile=He,c.encodeHTMLEntities=Ne,c.fileToBlob=Se,c.fileToDataURL=Le,c.fileToObjectURL=ke,c.filterTree=V,c.findNode=ye,c.findNodeWithPath=we,c.findParentAndIndex=be,c.flatTree=ve,c.formatBytes=De,c.formatDate=Fe,c.formatInterval=Ie,c.formatNumber=Te,c.formatPx=Pe,c.getFileExt=Qe,c.getFilename=X,c.getProp=ge,c.getProperty=S,c.getRandInt=Me,c.groupBy=ue,c.handleFormValidateError=ze,c.hasClass=Ge,c.isBlob=ee,c.isChildClassOf=ne,c.isEmpty=B,c.isEqual=re,c.isIframe=Q,c.isImage=te,c.isObject=x,c.isPlainObject=A,c.looseEqual=k,c.mergeDefaultOptions=J,c.omit=le,c.omitEmpty=de,c.openPage=Je,c.parseAreaCode=Ve,c.parseJson=Y,c.pick=W,c.runAtLeastTime=Ae,c.setProperty=me,c.sleep=_,c.toArray=ae,c.toCamelCase=ce,c.toKebabCase=H,c.toUnderscore=se,c.urlToBlob=_e,c.urlToDataURL=Ue,c.urlToPngBlob=Re,c.walkTree=Ee,c.withInstall=Z,c.without=oe,Object.defineProperty(c,"__esModule",{value:!0})});
@@ -1,2 +1,2 @@
1
- /*! Next UI utils v1.3.23 */import{ElMessage as S}from"element-plus";const V=(e,t)=>{try{if(e.install=n=>{for(const r of[e,...Object.values(t!=null?t:{})])r.name&&n.component(r.name,r)},t)for(const[n,r]of Object.entries(t))e[n]=r;return e}catch(n){}};function X(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function A(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function P(e){if(typeof e=="boolean"||typeof e=="number")return!1;if(Array.isArray(e)){if(e.length===0)return!0}else if(e instanceof Object&&JSON.stringify(e)==="{}")return!0;return e==null||e==="null"||e==="undefined"||e===""}function K(){return window.top!==window}function Z(e){return toString.call(e)==="[object Blob]"}function Q(e){if(e.startsWith("data:image"))return!0;const t=e.lastIndexOf("."),n=t>=0?e.slice(t+1).toLowerCase():"";return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(n)}function ee(e,t){for(;e;){if(e===t)return!0;e=Object.getPrototypeOf(e)}return!1}const U=(e,t)=>{const n=A(e),r=A(t);return n&&r?JSON.stringify(e)===JSON.stringify(t):!n&&!r?String(e)===String(t):!1},j=(e,t)=>{if(e=e||[],t=t||[],e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!U(r,t[n]))return!1;return!0},te=(e,t)=>Array.isArray(e)&&Array.isArray(t)?j(e,t):U(e,t);function ne(e,t,n){const r={};let i;typeof n=="function"?i=n:n?i=f=>f[n]:i=f=>f,(e||[]).forEach(f=>{const d=i(f);r[d]={item:f,count:-1}}),(t||[]).forEach(f=>{const d=i(f);r[d]?r[d].count=0:r[d]={item:f,count:1}});const s=[],l=[];for(const f in r)Object.prototype.hasOwnProperty.call(r,f)&&(r[f].count===1?l.push(r[f].item):r[f].count===-1&&s.push(r[f].item));return{changed:s.length+l.length>0,removed:s.length>0,added:l.length>0,removedItems:s,addedItems:l}}const re=(e,...t)=>{const n=[];return e.forEach(r=>{t.includes(r)||n.push(r)}),n},ie=e=>P(e)?[]:Array.isArray(e)?e:[e],oe=(e,t)=>{if(typeof t!="function"){const n=t;t=r=>String(r[n])}return(e||[]).reduce((n,r)=>{const i=t(r);return n[i]||(n[i]=[]),n[i].push(r),n},{})};function se(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function N(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ae(e){return e.replace(/-([a-z])/g,(t,n)=>n.toUpperCase()).replace(/_([a-z])/g,(t,n)=>n.toUpperCase())}const $=(e,t,...n)=>{const r={};return t=(t?[].concat(t):[]).concat(n),e&&t.forEach(i=>{Object.hasOwnProperty.call(e,i)&&(r[i]=e[i])}),r},ue=(e,t,...n)=>{const r={};return t=(t?[].concat(t):[]).concat(n),e&&Object.keys(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),r},ce=(e,...t)=>{for(const n of t)Object.assign(e,$(n,Object.keys(e)));return e};function H(e,...t){A(e)||(e={});for(const n of t)if(A(n))for(const r in n)r==="__proto__"||e===n[r]||(A(n[r])?e[r]=H(e[r],n[r]):e[r]=n[r]);return e}const le=e=>{const t={};if(e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(P(e[n])||(t[n]=e[n]));return t};function fe(e){const t=new WeakMap,n=r=>{if(typeof r=="object"&&r!==null){if(t.has(r))return t.get(r);const i=Array.isArray(r)?[]:{};t.set(r,i);for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(i[s]=n(r[s]));return i}return r};return n(e)}function W(e,t){try{return JSON.parse(e)}catch(n){return console.error("parse json error:",e),t}}function de(e,t,n){if(!e||!t)return;const r=t.split(".");let i;for(;(i=r.shift())!==void 0&&r.length!==0;)e[i]||(e[i]={}),e=e[i];i&&(e[i]=n)}function _(e,t){if(!e||!t)return;const n=t.split(".");for(const r of n){if(!e)return;e=e[r]}return e}const q=(e,t)=>{for(const n in e)Object.getOwnPropertyDescriptor(t,n)?A(e[n])&&q(e[n],t[n]):t[n]=e[n];return t},he=(e,t)=>{var n;return(n=e[t])!=null?n:e[N(t)]};function pe(e,t){let{key:n,parentKey:r}=t||{};n=n||"id",r=r||"pid";const i=(e||[]).reduce((l,f)=>(l[_(f,n)]=f,l),{}),s=[];return(e||[]).forEach(l=>{const f=i[_(l,r)];f?(f.children||(f.children=[])).push(l):s.push(l)}),s}function z(e,t){const n=[];return(e||[]).forEach(r=>{let{children:i,...s}=r;i&&i.length>0&&(i=z(i,t),i.length>0&&(s.children=i)),t(s)&&n.push(s)}),n}function ge(e,t){const n=e?[...e]:[];for(;n.length>0;){const r=n.shift();if(t(r))return r;r.children&&r.children.length>0&&n.push(...r.children)}return null}function me(e,t){const n=(r,i)=>{for(const s of r){if(t(s))return[...i,s];if(s.children&&s.children.length>0){const l=n(s.children,[...i,s]);if(l)return l}}return null};return n(e||[],[])}function we(e,t){const n={children:e||[]},r=[n];let i,s=-1;for(;r.length>0;){i=r.shift();const{children:l}=i;if(l&&l.length>0){for(const[f,d]of l.entries())if(t(d)){s=f;break}if(s!==-1)break;r.push(...l)}}return{found:s!==-1,parent:i===n?null:i,index:s}}function ye(e,t){const n=(e||[]).map(r=>({node:r,parent:null}));for(;n.length>0;){const r=n.shift(),{node:i,parent:s}=r;if(t(i,s)===!1)break;i.children&&i.children.length>0&&n.push(...i.children.map(f=>({node:f,parent:i})))}}function be(e){const t=[];if(e&&e.length>0){t.push(...e);let n=0;for(;n<t.length;){const{children:r}=t[n];r&&r.length>0&&t.push(...r),n++}}return t}function ve(e,t,n){n||(n=t);const r=i=>(i||[]).reduce((s,l)=>(l[n]=l[t]+(l.children?r(l.children):0),s+l[n]),0);r(e)}function Ee(e,t){if(!e)return"";const n=new Date(e);if(n.getTime()===0)return"";t=t||"yyyy-MM-dd";let r;const i={"Y+":n.getFullYear().toString(),"y+":n.getFullYear().toString(),"M+":(n.getMonth()+1).toString(),"D+":n.getDate().toString(),"d+":n.getDate().toString(),"h+":(n.getHours()%12||12).toString(),"H+":n.getHours().toString(),"m+":n.getMinutes().toString(),"s+":n.getSeconds().toString(),a:n.getHours()<12?"am":"pm",A:n.getHours()<12?"AM":"PM"};for(const s in i)r=new RegExp(`(${s})`).exec(t),r&&(t=t.replace(r[1],r[1].length===1?i[s]:i[s].padStart(r[1].length,"0")));return t}function Fe(e,t){if(P(e))return"";let{minPrecision:n,maxPrecision:r,decimalPoint:i,thousandSeparator:s,grouping:l}=t||{};n=n!=null?n:0,r=r!=null?r:2,i=i||".",s=s!=null?s:",",l=l!=null?l:3;let[f,d]=`${e}`.split(".");return f=f.replace(new RegExp(`(?<!^-?)(?=(\\d{${l}})+$)`,"g"),s),d=(d||"").slice(0,r).padEnd(n,"0"),d&&(d=i+d),f+d}function Oe(e,t){if(t){const i=P(e[0])||e[0]===Number.NEGATIVE_INFINITY?"-\u221E":e[0],s=P(e[1])||e[1]===+Number.POSITIVE_INFINITY?"+\u221E":e[1];return`${i+(i==="-\u221E"?" < ":" \u2264 ")+t} < ${s}`}const n=P(e[0])||e[0]==="-\u221E"||e[0]==="-Infinity"?"-\u221E":e[0],r=P(e[1])||e[1]==="+\u221E"||e[1]==="Infinity"?"+\u221E":e[1];return`${n==="-\u221E"?"(":"["} ${n}, ${r} )`}function Ie(e){if(e=Number(e),Number.isNaN(e))return"";const t=["B","KB","MB","GB","TB","PB"];let n=0;for(;e>=1024&&n<t.length-1;)e/=1024,n++;return e=Math.round(e*100)/100,`${e} ${t[n]}`}function xe(e){return Number.isNaN(Number(e))?e||"":`${Number(e)}px`}const k=e=>new Promise(t=>{setTimeout(t,e)}),Te=(e,t)=>new Promise((n,r)=>{(async()=>{try{const s=Date.now(),l=await e(),f=Date.now()-s;f<t&&await k(t-f),n(l)}catch(s){r(s)}})()}),De=()=>{const e=Date.now();return{delayTo:async n=>{const r=Date.now()-e;r<n&&await k(n-r)}}},Ae=(e,t)=>{let n;const r=()=>{if(e()){n(void 0);return}requestAnimationFrame(r)};return new Promise(i=>{n=i,t?setTimeout(r,t):requestAnimationFrame(r)})},Pe=(e,t)=>Math.floor(e+Math.random()*(t-e));function Be(e){return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=()=>{if(r.status===200){const i=new FileReader;i.readAsDataURL(r.response),i.onload=s=>{t(s.target.result)},i.onerror=s=>n(s)}else n(new Error("Failed to load file"))},r.onerror=()=>{n(new Error("Failed to load file"))},r.send()})}function Ce(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=i=>{t(i.target.result)},r.onerror=i=>n(i)})}function Me(e){return URL.createObjectURL(e)}function Se(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=i=>{t(new Blob([i.target.result]))},r.onerror=i=>n(i)})}async function Ue(e){if(!e)throw new Error("url is empty");return(await fetch(e)).blob()}async function _e(e){if(!e)throw new Error("url is empty");return new Promise((t,n)=>{const r=new Image;r.onload=()=>{const i=document.createElement("canvas");i.width=r.width,i.height=r.height;const s=i.getContext("2d");s==null||s.drawImage(r,0,0,r.width,r.height),i.toBlob(l=>{l?t(l):n(new Error("transform image to blob failed"))},"image/png")},r.onerror=n,r.src=e})}function ke(e,t){if(!e)return"";if(typeof e=="string"&&(e=new URL(e)),t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.searchParams.append(n,t[n]);return e.toString()}function Le(e){return e.replace(/[<>&]/g,t=>`&#${t.charCodeAt(0)};`)}function Re(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText}async function*je(e,t){const n=new TextDecoder("utf-8"),{original:r}=t||{};let i="";for(;;){const{value:s,done:l}=await e.read();if(l)return;i+=n.decode(s);const f=i.split(`
2
- `);i=f.pop()||"";for(let d of f)if(d=d.trim(),!!d)if(r)yield d;else{if(d==="event: ping")continue;const I=d.match(/^(?:(\w*):)?(.*)$/);if(!I){console.error("[BufferedReader] parse line failed:",d);continue}const E=I[1],x=W(I[2].trim());if(!x){console.error("[BufferedReader] parse json failed:",I[2].trim());continue}yield{event:E,data:x}}}}const Ne=e=>{let{url:t,filename:n}=e;if(n=n||"\u672A\u547D\u540D",t||e.blob&&(t=URL.createObjectURL(e.blob),setTimeout(()=>{URL.revokeObjectURL(t)},1e4)),!t)throw new Error("No URL provided");const r=document.createElement("a");r.href=t,r.download=n,r.click()};function $e(e,t,n){let r,i,s,l,f,d,I=0,E=!1,x=!1,B=!0;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0,n&&A(n)&&(E=!!n.leading,x="maxWait"in n,s=x?Math.max(+n.maxWait||0,t):s,B="trailing"in n?!!n.trailing:B);function O(g){const v=r,F=i;return r=i=void 0,I=g,l=e.apply(F,v),l}function D(g,v){return setTimeout(g,v)}function o(g){clearTimeout(g)}function c(g){return I=g,f=D(p,t),E?O(g):l}function u(g){const v=g-d,F=g-I,T=t-v;return x?Math.min(T,s-F):T}function a(g){const v=g-d,F=g-I;return d===void 0||v>=t||v<0||x&&F>=s}function p(){const g=Date.now();if(a(g))return m(g);f=D(p,u(g))}function m(g){return f=void 0,B&&r?O(g):(r=i=void 0,l)}function b(){f!==void 0&&o(f),I=0,r=d=i=f=void 0}function h(){return f===void 0?l:m(Date.now())}function y(){return f!==void 0}function w(...g){const v=Date.now(),F=a(v);if(r=g,i=this,d=v,F){if(f===void 0)return c(d);if(x)return f=D(p,t),O(d)}return f===void 0&&(f=D(p,t)),l}return w.cancel=b,w.flush=h,w.pending=y,w}function He(e){const{el:t,msg:n}=e||{},r=n===void 0?"\u8BF7\u5B8C\u5584\u8868\u5355\u5185\u5BB9":n;if(r&&S.error(r),!t)return;const i=t.querySelector(".is-error");i&&i.scrollIntoView({behavior:"smooth",inline:"nearest",block:"center"})}async function We(e,t={successText:"\u590D\u5236\u6210\u529F"}){const{successText:n}=t||{};try{if(navigator.clipboard){await navigator.clipboard.writeText(e),n&&S.success(n);return}}catch(i){}const r=document.createElement("textarea");document.body.appendChild(r),r.style.position="fixed",r.style.clip="rect(0 0 0 0)",r.style.top="10px",r.value=e,r.select(),document.execCommand("copy",!0),document.body.removeChild(r),n&&S.success(n)}function qe(e,...t){if(!e)return;const n=document.createElement("a");n.addEventListener("click",r=>{r.preventDefault(),window.open(e,...t)}),n.click()}function ze(e){if(!e)return[];const t=[`${e.slice(0,2)}0000`,`${e.slice(0,4)}00`,e.slice(0,6),e.slice(0,9),e.slice(0,12)],n=0,r=t.indexOf(e)+1;return t.slice(n,r)}class R{constructor(t){this._enumItems={};var n;if(t)if(Array.isArray(t))for(const[r,i]of t.entries())this.add((n=i.key)!=null?n:`${r}`,i);else for(const r in t){const i=t[r];this.add(r,i)}}add(t,n){if(this[t])throw new Error(`\u679A\u4E3E\u9879 ${t} \u5DF2\u5B58\u5728`);const r=n.value;return this[t]=r,this._enumItems[r]={...n},this}keys(){return Object.keys(this).filter(t=>t!=="_enumItems")}*[Symbol.iterator](){for(const t of this.keys())yield this.getItem(this[t])}getItem(t){return this._enumItems[t]}getLabel(t){var n;return(n=this.getItem(t))==null?void 0:n.label}getProps(t){var n;return(n=this.getItem(t))==null?void 0:n.props}filter(t){const n=new R;for(const r of this.keys()){const i=this.getItem(this[r]);t(i,r)&&n.add(r,i)}return n}clone(){return this.filter(()=>!0)}set(t,n){const r=this.getItem(this[t]);return r&&Object.assign(r,n),this}remove(t){const n=this[t];return n!==void 0&&(delete this[t],delete this._enumItems[n]),this}forEach(t){for(const n of this.keys())t(this.getItem(this[n]),n)}}const Ye=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)};function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y={exports:{}},L={exports:{}},G;function Je(){return G||(G=1,function(e,t){(function(n,r){e.exports=r()})(window,function(){return function(n){var r={};function i(s){if(r[s])return r[s].exports;var l=r[s]={i:s,l:!1,exports:{}};return n[s].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=n,i.c=r,i.d=function(s,l,f){i.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:f})},i.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},i.t=function(s,l){if(1&l&&(s=i(s)),8&l||4&l&&typeof s=="object"&&s&&s.__esModule)return s;var f=Object.create(null);if(i.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:s}),2&l&&typeof s!="string")for(var d in s)i.d(f,d,function(I){return s[I]}.bind(null,d));return f},i.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(l,"a",l),l},i.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},i.p="",i(i.s=0)}([function(n,r,i){i.r(r);var s=window,l=/^image\//,f=/\.\w+$/,d={},I={file:null,quality:.8,convertSize:2048e3,loose:!0,redressOrientation:!0},E=function(o){return typeof o=="function"},x=function(o){return l.test(o)};function B(o){o=Object.assign({},I,o),this.options=o,this.file=o.file,this.image=null,this.ParsedOrientationInfo=null,this.init()}var O=B.prototype;for(var D in r.default=B,O.init=function(){var o=this,c=this.file,u=this.options;c&&x(c.type)?(x(u.mimeType)||(u.mimeType=c.type),d.file2Image(c,function(a){E(o.beforeCompress)&&(o.image=a,c.width=a.naturalWidth,c.height=a.naturalHeight,o.beforeCompress(c)),c.type==="image/jpeg"&&u.redressOrientation?o.getParsedOrientationInfo(function(p){o.parsedOrientationInfo=p,o.rendCanvas()}):(o.parsedOrientationInfo={rotate:0,scaleX:1,scaleY:1},o.rendCanvas())},o.error)):o.error("\u8BF7\u4E0A\u4F20\u56FE\u7247\u6587\u4EF6!")},O.rendCanvas=function(){var o=this,c=this.options,u=this.image,a=this.getExpectedEdge(),p=a.dWidth,m=a.dHeight,b=a.width,h=a.height,y=d.image2Canvas(u,p,m,o.beforeDraw.bind(o),o.afterDraw.bind(o),b,h);d.canvas2Blob(y,function(w){w&&(w.width=y.width,w.height=y.height),o.success(w)},c.quality,c.mimeType)},O.beforeCompress=function(){E(this.options.beforeCompress)&&this.options.beforeCompress(this.file)},O.getExpectedEdge=function(){var o,c=this.image,u=this.parsedOrientationInfo.rotate,a=this.options,p=c.naturalWidth,m=c.naturalHeight,b=Math.abs(u)%180==90;b&&(o=m,m=p,p=o);var h=p/m,y=Math.max(a.maxWidth,0)||1/0,w=Math.max(a.maxHeight,0)||1/0,g=Math.max(a.minWidth,0)||0,v=Math.max(a.minHeight,0)||0,F=Math.max(a.width,0)||p,T=Math.max(a.height,0)||m;y<1/0&&w<1/0?w*h>y?w=y/h:y=w*h:y<1/0?w=y/h:w<1/0&&(y=w*h),g>0&&v>0?v*h>g?v=g/h:g=v*h:g>0?v=g/h:v>0&&(g=v*h),T*h>F?T=F/h:F=T*h;var C=F=Math.floor(Math.min(Math.max(F,g),y)),M=T=Math.floor(Math.min(Math.max(T,v),w));return b&&(o=M,M=C,C=o),{dWidth:C,dHeight:M,width:F,height:T}},O.getParsedOrientationInfo=function(o){var c=this;this.getOrientation(function(u){E(o)&&o(c.parseOrientation(u))})},O.getOrientation=function(o){var c=this;d.file2ArrayBuffer(this.file,function(u){E(o)&&o(c.resetAndGetOrientation(u))})},O.resetAndGetOrientation=function(o){var c,u=new DataView(o);try{var a,p,m;if(u.getUint8(0)===255&&u.getUint8(1)===216)for(var b=u.byteLength,h=2;h+1<b;){if(u.getUint8(h)===255&&u.getUint8(h+1)===225){p=h;break}h+=1}if(p){var y=p+4,w=p+10;if(d.getStringFromCharCode(u,y,4)==="Exif"){var g=u.getUint16(w);if(((a=g===18761)||g===19789)&&u.getUint16(w+2,a)===42){var v=u.getUint32(w+4,a);v>=8&&(m=w+v)}}}if(m){var F;for(b=u.getUint16(m,a),F=0;F<b;F+=1)if(h=m+12*F+2,u.getUint16(h,a)===274){h+=8,c=u.getUint16(h,a),u.setUint16(h,1,a);break}}}catch(T){console.error(T),c=1}return c},O.parseOrientation=function(o){var c=0,u=1,a=1;switch(o){case 2:u=-1;break;case 3:c=-180;break;case 4:a=-1;break;case 5:c=90,a=-1;break;case 6:c=90;break;case 7:c=90,u=-1;break;case 8:c=-90}return{rotate:c,scaleX:u,scaleY:a}},O.beforeDraw=function(o,c){var u=this.parsedOrientationInfo,a=u.rotate,p=u.scaleX,m=u.scaleY,b=this.file,h=this.options,y="transparent",w=c.width,g=c.height;switch(b.size>h.convertSize&&h.mimeType==="image/png"&&(y="#fff",h.mimeType="image/jpeg"),o.fillStyle=y,o.fillRect(0,0,w,g),E(h.beforeDraw)&&h.beforeDraw.call(this,o,c),o.save(),a){case 90:o.translate(w,0);break;case-90:o.translate(0,g);break;case-180:o.translate(w,g)}o.rotate(a*Math.PI/180),o.scale(p,m)},O.afterDraw=function(o,c){var u=this.options;E(u.afterDraw)&&u.afterDraw.call(this,o,c)},O.error=function(o){var c=this.options;if(!E(c.error))throw new Error(o);c.error.call(this,o)},O.success=function(o){var c,u,a=this.options,p=this.file,m=this.image,b=this.getExpectedEdge(),h=m.naturalHeight,y=m.naturalWidth;if(o&&o.size)if(!a.loose&&o.size>p.size&&!(b.width>y||b.height>h))console.warn("\u5F53\u524D\u8BBE\u7F6E\u7684\u662F\u975E\u5BBD\u677E\u6A21\u5F0F\uFF0C\u538B\u7F29\u7ED3\u679C\u5927\u4E8E\u6E90\u56FE\u7247\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),o=p;else{var w=new Date;o.lastModified=w.getTime(),o.lastModifiedDate=w,o.name=p.name,o.name&&o.type!==p.type&&(o.name=o.name.replace(f,(c=o.type,(u=x(c)?c.substr(6):"")==="jpeg"&&(u="jpg"),"."+u)))}else console.warn("\u56FE\u7247\u538B\u7F29\u51FA\u4E86\u70B9\u610F\u5916\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),o=p;E(a.success)&&a.success.call(this,o)},d.file2DataUrl=function(o,c,u){var a=new FileReader;a.onload=function(){c(a.result)},a.onerror=function(){E(u)&&u("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},a.readAsDataURL(o)},d.file2ArrayBuffer=function(o,c,u){var a=new FileReader;a.onload=function(p){c(p.target.result)},a.onerror=function(){E(u)&&u("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},a.readAsArrayBuffer(o)},d.getStringFromCharCode=function(o,c,u){var a,p="";for(u+=c,a=c;a<u;a+=1)p+=String.fromCharCode(o.getUint8(a));return p},d.file2Image=function(o,c,u){var a=new Image,p=s.URL||s.webkitURL;if(s.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(s.navigator.userAgent)&&(a.crossOrigin="anonymous"),a.alt=o.name,a.onerror=function(){E(u)&&u("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},p){var m=p.createObjectURL(o);a.onload=function(){c(a),p.revokeObjectURL(m)},a.src=m}else this.file2DataUrl(o,function(b){a.onload=function(){c(a)},a.src=b},u)},d.url2Image=function(o,c,u){var a=new Image;a.src=o,a.onload=function(){c(a)},a.onerror=function(){E(u)&&u("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")}},d.image2Canvas=function(o,c,u,a,p,m,b){var h=document.createElement("canvas"),y=h.getContext("2d");return h.width=m||o.naturalWidth,h.height=b||o.naturalHeight,E(a)&&a(y,h),y.save(),y.drawImage(o,0,0,c,u),y.restore(),E(p)&&p(y,h),h},d.canvas2DataUrl=function(o,c,u){return o.toDataURL(u||"image/jpeg",c)},d.dataUrl2Image=function(o,c,u){var a=new Image;a.onload=function(){c(a)},a.error=function(){E(u)&&u("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},a.src=o},d.dataUrl2Blob=function(o,c){for(var u=o.split(",")[1],a=o.match(/^data:(.*?)(;base64)?,/)[1],p=atob(u),m=u.length,b=new Uint8Array(m),h=0;h<m;h++)b[h]=p.charCodeAt(h);return new Blob([b],{type:c||a})},d.blob2DataUrl=function(o,c,u){this.file2DataUrl(o,c,u)},d.blob2Image=function(o,c,u){this.file2Image(o,c,u)},d.canvas2Blob=function(o,c,u,a){var p=this;HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(m,b,h){var y=this.toDataURL(b,h);m(p.dataUrl2Blob(y))}}),o.toBlob(function(m){c(m)},a||"image/jpeg",u||.8)},d.upload=function(o,c,u){var a=new XMLHttpRequest,p=new FormData;p.append("file",c),a.onreadystatechange=function(){if(a.readyState!==4||a.status!==200)throw new Error(a);u&&u(a.responseText)},a.open("POST",o,!0),a.send(p)},d)d.hasOwnProperty(D)&&(B[D]=d[D])}]).default})}(L)),L.exports}(function(e){e.exports=Je()})(Y);var Ve=Ge(Y.exports);const Xe=e=>{if(!e.file)throw new Error("file is required");const t=e.file.size/1024;let n=e.quality;if(n===void 0){if(t<200)return e.file;t>200&&t<=512?n=.9:t>512&&t<=1024?n=.8:t>1024&&t<=2048?n=.85:t>2048&&t<=10240?n=.8:t>10240&&t<=20480&&(n=.75)}return new Promise((r,i)=>{var s;new Ve({...e,quality:n,convertSize:(s=e.convertSize)!=null?s:1024,success:l=>{r(l)},error:l=>{i(l)}})})},J=e=>e&&e.split("?")[0].split("/").pop()||"",Ke=e=>(e=J(e),e?(e.split(".").pop()||"").toLowerCase():""),Ze=(e,t,n)=>Math.min(Math.max(n,e),t);export{R as Enum,ne as arrayDiff,j as arrayEquals,ce as assign,pe as buildTree,ke as buildUrl,Ze as clamp,ve as combineByField,Xe as compressImage,We as copyText,je as createStreamIterator,De as createTimer,$e as debounce,Re as decodeHTMLEntities,H as deepAssign,fe as deepClone,Ae as delayWhen,Ne as downloadFile,Le as encodeHTMLEntities,Se as fileToBlob,Ce as fileToDataURL,Me as fileToObjectURL,z as filterTree,ge as findNode,me as findNodeWithPath,we as findParentAndIndex,be as flatTree,Ie as formatBytes,Ee as formatDate,Oe as formatInterval,Fe as formatNumber,xe as formatPx,Ke as getFileExt,J as getFilename,he as getProp,_ as getProperty,Pe as getRandInt,oe as groupBy,He as handleFormValidateError,Ye as hasClass,Z as isBlob,ee as isChildClassOf,P as isEmpty,te as isEqual,K as isIframe,Q as isImage,X as isObject,A as isPlainObject,U as looseEqual,q as mergeDefaultOptions,ue as omit,le as omitEmpty,qe as openPage,ze as parseAreaCode,W as parseJson,$ as pick,Te as runAtLeastTime,de as setProperty,k as sleep,ie as toArray,ae as toCamelCase,N as toKebabCase,se as toUnderscore,Ue as urlToBlob,Be as urlToDataURL,_e as urlToPngBlob,ye as walkTree,V as withInstall,re as without};
1
+ /*! Next UI utils v1.4.0 */import{ElMessage as U}from"element-plus";const X=(e,n)=>{try{if(e.install=t=>{for(const r of[e,...Object.values(n!=null?n:{})])r.name&&t.component(r.name,r)},n)for(const[t,r]of Object.entries(n))e[t]=r;return e}catch(t){}};function K(e){const n=typeof e;return e!=null&&(n==="object"||n==="function")}function A(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function P(e){if(typeof e=="boolean"||typeof e=="number")return!1;if(Array.isArray(e)){if(e.length===0)return!0}else if(e instanceof Object&&JSON.stringify(e)==="{}")return!0;return e==null||e==="null"||e==="undefined"||e===""}function Z(){return window.top!==window}function Q(e){return toString.call(e)==="[object Blob]"}function ee(e){if(e.startsWith("data:image"))return!0;const n=e.lastIndexOf("."),t=n>=0?e.slice(n+1).toLowerCase():"";return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)}function te(e,n){for(;e;){if(e===n)return!0;e=Object.getPrototypeOf(e)}return!1}const k=(e,n)=>{const t=A(e),r=A(n);return t&&r?JSON.stringify(e)===JSON.stringify(n):!t&&!r?String(e)===String(n):!1},j=(e,n)=>{if(e=e||[],n=n||[],e.length!==n.length)return!1;for(const[t,r]of e.entries())if(!k(r,n[t]))return!1;return!0},ne=(e,n)=>Array.isArray(e)&&Array.isArray(n)?j(e,n):k(e,n);function re(e,n,t){const r={};let i;typeof t=="function"?i=t:t?i=f=>f[t]:i=f=>f,(e||[]).forEach(f=>{const d=i(f);r[d]={item:f,count:-1}}),(n||[]).forEach(f=>{const d=i(f);r[d]?r[d].count=0:r[d]={item:f,count:1}});const o=[],c=[];for(const f in r)Object.prototype.hasOwnProperty.call(r,f)&&(r[f].count===1?c.push(r[f].item):r[f].count===-1&&o.push(r[f].item));return{changed:o.length+c.length>0,removed:o.length>0,added:c.length>0,removedItems:o,addedItems:c}}const ie=(e,...n)=>{const t=[];return e.forEach(r=>{n.includes(r)||t.push(r)}),t},oe=e=>P(e)?[]:Array.isArray(e)?e:[e],se=(e,n)=>{if(typeof n!="function"){const t=n;n=r=>String(r[t])}return(e||[]).reduce((t,r)=>{const i=n(r);return t[i]||(t[i]=[]),t[i].push(r),t},{})};function ue(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()}function $(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ae(e){return e.replace(/-([a-z])/g,(n,t)=>t.toUpperCase()).replace(/_([a-z])/g,(n,t)=>t.toUpperCase())}const q=(e,n,...t)=>{const r={};return n=(n?[].concat(n):[]).concat(t),e&&n.forEach(i=>{Object.hasOwnProperty.call(e,i)&&(r[i]=e[i])}),r},ce=(e,n,...t)=>{const r={};return n=(n?[].concat(n):[]).concat(t),e&&Object.keys(e).forEach(i=>{n.includes(i)||(r[i]=e[i])}),r},le=(e,...n)=>{for(const t of n)Object.assign(e,q(t,Object.keys(e)));return e};function H(e,...n){A(e)||(e={});for(const t of n)if(A(t))for(const r in t)r==="__proto__"||e===t[r]||(A(t[r])?e[r]=H(e[r],t[r]):e[r]=t[r]);return e}const fe=e=>{const n={};if(e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(P(e[t])||(n[t]=e[t]));return n};function de(e){const n=new WeakMap,t=r=>{if(typeof r=="object"&&r!==null){if(n.has(r))return n.get(r);const i=Array.isArray(r)?[]:{};n.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=t(r[o]));return i}return r};return t(e)}function W(e,n){try{return JSON.parse(e)}catch(t){return console.error("parse json error:",e),n}}function he(e,n,t){if(!e||!n)return;const r=n.split(".");let i;for(;(i=r.shift())!==void 0&&r.length!==0;)e[i]||(e[i]={}),e=e[i];i&&(e[i]=t)}function _(e,n){if(!e||!n)return;const t=n.split(".");for(const r of t){if(!e)return;e=e[r]}return e}const z=(e,n)=>{for(const t in e)Object.getOwnPropertyDescriptor(n,t)?A(e[t])&&z(e[t],n[t]):n[t]=e[t];return n},pe=(e,n)=>{var t;return(t=e[n])!=null?t:e[$(n)]};function ge(e,n){let{key:t,parentKey:r}=n||{};t=t||"id",r=r||"pid";const i=(e||[]).reduce((c,f)=>(c[_(f,t)]=f,c),{}),o=[];return(e||[]).forEach(c=>{const f=i[_(c,r)];f?(f.children||(f.children=[])).push(c):o.push(c)}),o}function Y(e,n){const t=[];return(e||[]).forEach(r=>{let{children:i,...o}=r;i&&i.length>0&&(i=Y(i,n),i.length>0&&(o.children=i)),n(o)&&t.push(o)}),t}function me(e,n){const t=e?[...e]:[];for(;t.length>0;){const r=t.shift();if(n(r))return r;r.children&&r.children.length>0&&t.push(...r.children)}return null}function we(e,n){const t=(r,i)=>{for(const o of r){if(n(o))return[...i,o];if(o.children&&o.children.length>0){const c=t(o.children,[...i,o]);if(c)return c}}return null};return t(e||[],[])}function ye(e,n){const t={children:e||[]},r=[t];let i,o=-1;for(;r.length>0;){i=r.shift();const{children:c}=i;if(c&&c.length>0){for(const[f,d]of c.entries())if(n(d)){o=f;break}if(o!==-1)break;r.push(...c)}}return{found:o!==-1,parent:i===t?null:i,index:o}}function be(e,n){const t=(e||[]).map(r=>({node:r,parent:null}));for(;t.length>0;){const r=t.shift(),{node:i,parent:o}=r;if(n(i,o)===!1)break;i.children&&i.children.length>0&&t.push(...i.children.map(f=>({node:f,parent:i})))}}function ve(e){const n=[];if(e&&e.length>0){n.push(...e);let t=0;for(;t<n.length;){const{children:r}=n[t];r&&r.length>0&&n.push(...r),t++}}return n}function Ee(e,n,t){t||(t=n);const r=i=>(i||[]).reduce((o,c)=>(c[t]=c[n]+(c.children?r(c.children):0),o+c[t]),0);r(e)}function Fe(e,n){if(!e)return"";const t=new Date(e);if(t.getTime()===0)return"";n=n||"yyyy-MM-dd";let r;const i={"Y+":t.getFullYear().toString(),"y+":t.getFullYear().toString(),"M+":(t.getMonth()+1).toString(),"D+":t.getDate().toString(),"d+":t.getDate().toString(),"h+":(t.getHours()%12||12).toString(),"H+":t.getHours().toString(),"m+":t.getMinutes().toString(),"s+":t.getSeconds().toString(),a:t.getHours()<12?"am":"pm",A:t.getHours()<12?"AM":"PM"};for(const o in i)r=new RegExp(`(${o})`).exec(n),r&&(n=n.replace(r[1],r[1].length===1?i[o]:i[o].padStart(r[1].length,"0")));return n}function Oe(e,n){if(P(e))return"";let{minPrecision:t,maxPrecision:r,decimalPoint:i,thousandSeparator:o,grouping:c}=n||{};t=t!=null?t:0,r=r!=null?r:2,i=i||".",o=o!=null?o:",",c=c!=null?c:3;let[f,d]=`${e}`.split(".");return f=f.replace(new RegExp(`(?<!^-?)(?=(\\d{${c}})+$)`,"g"),o),d=(d||"").slice(0,r).padEnd(t,"0"),d&&(d=i+d),f+d}function Ie(e,n){if(n){const i=P(e[0])||e[0]===Number.NEGATIVE_INFINITY?"-\u221E":e[0],o=P(e[1])||e[1]===+Number.POSITIVE_INFINITY?"+\u221E":e[1];return`${i+(i==="-\u221E"?" < ":" \u2264 ")+n} < ${o}`}const t=P(e[0])||e[0]==="-\u221E"||e[0]==="-Infinity"?"-\u221E":e[0],r=P(e[1])||e[1]==="+\u221E"||e[1]==="Infinity"?"+\u221E":e[1];return`${t==="-\u221E"?"(":"["} ${t}, ${r} )`}function xe(e){if(e=Number(e),Number.isNaN(e))return"";const n=["B","KB","MB","GB","TB","PB"];let t=0;for(;e>=1024&&t<n.length-1;)e/=1024,t++;return e=Math.round(e*100)/100,`${e} ${n[t]}`}function Te(e){return Number.isNaN(Number(e))?e||"":`${Number(e)}px`}const L=e=>new Promise(n=>{setTimeout(n,e)}),De=(e,n)=>new Promise((t,r)=>{(async()=>{try{const o=Date.now(),c=await e(),f=Date.now()-o;f<n&&await L(n-f),t(c)}catch(o){r(o)}})()}),Ae=()=>{const e=Date.now();return{delayTo:async t=>{const r=Date.now()-e;r<t&&await L(t-r)}}},Pe=(e,n,t)=>{let r,i=!1,o;const c=()=>{if(i||e()){r(void 0),clearTimeout(o);return}requestAnimationFrame(c)};return t&&(o=setTimeout(()=>{i=!0},t)),new Promise(f=>{r=f,n?setTimeout(c,n):requestAnimationFrame(c)})},Be=(e,n)=>Math.floor(e+Math.random()*(n-e));function Me(e){return new Promise((n,t)=>{const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=()=>{if(r.status===200){const i=new FileReader;i.readAsDataURL(r.response),i.onload=o=>{n(o.target.result)},i.onerror=o=>t(o)}else t(new Error("Failed to load file"))},r.onerror=()=>{t(new Error("Failed to load file"))},r.send()})}function Ce(e){return new Promise((n,t)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=i=>{n(i.target.result)},r.onerror=i=>t(i)})}function Se(e){return URL.createObjectURL(e)}function Ue(e){return new Promise((n,t)=>{const r=new FileReader;r.readAsArrayBuffer(e),r.onload=i=>{n(new Blob([i.target.result]))},r.onerror=i=>t(i)})}async function ke(e){if(!e)throw new Error("url is empty");return(await fetch(e)).blob()}async function _e(e){if(!e)throw new Error("url is empty");return new Promise((n,t)=>{const r=new Image;r.onload=()=>{const i=document.createElement("canvas");i.width=r.width,i.height=r.height;const o=i.getContext("2d");o==null||o.drawImage(r,0,0,r.width,r.height),i.toBlob(c=>{c?n(c):t(new Error("transform image to blob failed"))},"image/png")},r.onerror=t,r.src=e})}function Le(e,n){if(!e)return"";if(typeof e=="string"&&(e=new URL(e)),n)for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.searchParams.append(t,n[t]);return e.toString()}function Re(e){return e.replace(/[<>&]/g,n=>`&#${n.charCodeAt(0)};`)}function Ne(e){const n=document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText}async function*je(e,n){const t=new TextDecoder("utf-8"),{original:r}=n||{};let i="";for(;;){const{value:o,done:c}=await e.read();if(c)return;i+=t.decode(o);const f=i.split(`
2
+ `);i=f.pop()||"";for(let d of f)if(d=d.trim(),!!d)if(r)yield d;else{if(d==="event: ping")continue;const I=d.match(/^(?:(\w*):)?(.*)$/);if(!I){console.error("[BufferedReader] parse line failed:",d);continue}const E=I[1],x=W(I[2].trim());if(!x){console.error("[BufferedReader] parse json failed:",I[2].trim());continue}yield{event:E,data:x}}}}const $e=e=>{let{url:n,filename:t}=e;if(t=t||"\u672A\u547D\u540D",n||e.blob&&(n=URL.createObjectURL(e.blob),setTimeout(()=>{URL.revokeObjectURL(n)},1e4)),!n)throw new Error("No URL provided");const r=document.createElement("a");r.href=n,r.download=t,r.click()};function qe(e,n,t){let r,i,o,c,f,d,I=0,E=!1,x=!1,B=!0;if(typeof e!="function")throw new TypeError("Expected a function");n=+n||0,t&&A(t)&&(E=!!t.leading,x="maxWait"in t,o=x?Math.max(+t.maxWait||0,n):o,B="trailing"in t?!!t.trailing:B);function O(g){const v=r,F=i;return r=i=void 0,I=g,c=e.apply(F,v),c}function D(g,v){return setTimeout(g,v)}function s(g){clearTimeout(g)}function l(g){return I=g,f=D(p,n),E?O(g):c}function a(g){const v=g-d,F=g-I,T=n-v;return x?Math.min(T,o-F):T}function u(g){const v=g-d,F=g-I;return d===void 0||v>=n||v<0||x&&F>=o}function p(){const g=Date.now();if(u(g))return m(g);f=D(p,a(g))}function m(g){return f=void 0,B&&r?O(g):(r=i=void 0,c)}function b(){f!==void 0&&s(f),I=0,r=d=i=f=void 0}function h(){return f===void 0?c:m(Date.now())}function y(){return f!==void 0}function w(...g){const v=Date.now(),F=u(v);if(r=g,i=this,d=v,F){if(f===void 0)return l(d);if(x)return f=D(p,n),O(d)}return f===void 0&&(f=D(p,n)),c}return w.cancel=b,w.flush=h,w.pending=y,w}function He(e){const{el:n,msg:t}=e||{},r=t===void 0?"\u8BF7\u5B8C\u5584\u8868\u5355\u5185\u5BB9":t;if(r&&U.error(r),!n)return;const i=n.querySelector(".is-error");i&&i.scrollIntoView({behavior:"smooth",inline:"nearest",block:"center"})}async function We(e,n={successText:"\u590D\u5236\u6210\u529F"}){const{successText:t}=n||{};try{if(navigator.clipboard){await navigator.clipboard.writeText(e),t&&U.success(t);return}}catch(i){}const r=document.createElement("textarea");document.body.appendChild(r),r.style.position="fixed",r.style.clip="rect(0 0 0 0)",r.style.top="10px",r.value=e,r.select(),document.execCommand("copy",!0),document.body.removeChild(r),t&&U.success(t)}function ze(e,...n){if(!e)return;const t=document.createElement("a");t.addEventListener("click",r=>{r.preventDefault(),window.open(e,...n)}),t.click()}function Ye(e){if(!e)return[];const n=[`${e.slice(0,2)}0000`,`${e.slice(0,4)}00`,e.slice(0,6),e.slice(0,9),e.slice(0,12)],t=0,r=n.indexOf(e)+1;return n.slice(t,r)}class N{constructor(n){this._enumItems={};var t;if(n)if(Array.isArray(n))for(const[r,i]of n.entries())this.add((t=i.key)!=null?t:`${r}`,i);else for(const r in n){const i=n[r];this.add(r,i)}}add(n,t){if(this[n])throw new Error(`\u679A\u4E3E\u9879 ${n} \u5DF2\u5B58\u5728`);const r=t.value;return this[n]=r,this._enumItems[r]={...t},this}keys(){return Object.keys(this).filter(n=>n!=="_enumItems")}*[Symbol.iterator](){for(const n of this.keys())yield this.getItem(this[n])}getItem(n){return this._enumItems[n]}getLabel(n){var t;return(t=this.getItem(n))==null?void 0:t.label}getProps(n){var t;return(t=this.getItem(n))==null?void 0:t.props}filter(n){const t=new N;for(const r of this.keys()){const i=this.getItem(this[r]);n(i,r)&&t.add(r,i)}return t}clone(){return this.filter(()=>!0)}set(n,t){const r=this.getItem(this[n]);return r&&Object.assign(r,t),this}remove(n){const t=this[n];return t!==void 0&&(delete this[n],delete this._enumItems[t]),this}forEach(n){for(const t of this.keys())n(this.getItem(this[t]),t)}}const Ge=(e,n)=>{if(!e||!n)return!1;if(n.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(n)};function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G={exports:{}},R={exports:{}},J;function Ve(){return J||(J=1,function(e,n){(function(t,r){e.exports=r()})(window,function(){return function(t){var r={};function i(o){if(r[o])return r[o].exports;var c=r[o]={i:o,l:!1,exports:{}};return t[o].call(c.exports,c,c.exports,i),c.l=!0,c.exports}return i.m=t,i.c=r,i.d=function(o,c,f){i.o(o,c)||Object.defineProperty(o,c,{enumerable:!0,get:f})},i.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,c){if(1&c&&(o=i(o)),8&c||4&c&&typeof o=="object"&&o&&o.__esModule)return o;var f=Object.create(null);if(i.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:o}),2&c&&typeof o!="string")for(var d in o)i.d(f,d,function(I){return o[I]}.bind(null,d));return f},i.n=function(o){var c=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(c,"a",c),c},i.o=function(o,c){return Object.prototype.hasOwnProperty.call(o,c)},i.p="",i(i.s=0)}([function(t,r,i){i.r(r);var o=window,c=/^image\//,f=/\.\w+$/,d={},I={file:null,quality:.8,convertSize:2048e3,loose:!0,redressOrientation:!0},E=function(s){return typeof s=="function"},x=function(s){return c.test(s)};function B(s){s=Object.assign({},I,s),this.options=s,this.file=s.file,this.image=null,this.ParsedOrientationInfo=null,this.init()}var O=B.prototype;for(var D in r.default=B,O.init=function(){var s=this,l=this.file,a=this.options;l&&x(l.type)?(x(a.mimeType)||(a.mimeType=l.type),d.file2Image(l,function(u){E(s.beforeCompress)&&(s.image=u,l.width=u.naturalWidth,l.height=u.naturalHeight,s.beforeCompress(l)),l.type==="image/jpeg"&&a.redressOrientation?s.getParsedOrientationInfo(function(p){s.parsedOrientationInfo=p,s.rendCanvas()}):(s.parsedOrientationInfo={rotate:0,scaleX:1,scaleY:1},s.rendCanvas())},s.error)):s.error("\u8BF7\u4E0A\u4F20\u56FE\u7247\u6587\u4EF6!")},O.rendCanvas=function(){var s=this,l=this.options,a=this.image,u=this.getExpectedEdge(),p=u.dWidth,m=u.dHeight,b=u.width,h=u.height,y=d.image2Canvas(a,p,m,s.beforeDraw.bind(s),s.afterDraw.bind(s),b,h);d.canvas2Blob(y,function(w){w&&(w.width=y.width,w.height=y.height),s.success(w)},l.quality,l.mimeType)},O.beforeCompress=function(){E(this.options.beforeCompress)&&this.options.beforeCompress(this.file)},O.getExpectedEdge=function(){var s,l=this.image,a=this.parsedOrientationInfo.rotate,u=this.options,p=l.naturalWidth,m=l.naturalHeight,b=Math.abs(a)%180==90;b&&(s=m,m=p,p=s);var h=p/m,y=Math.max(u.maxWidth,0)||1/0,w=Math.max(u.maxHeight,0)||1/0,g=Math.max(u.minWidth,0)||0,v=Math.max(u.minHeight,0)||0,F=Math.max(u.width,0)||p,T=Math.max(u.height,0)||m;y<1/0&&w<1/0?w*h>y?w=y/h:y=w*h:y<1/0?w=y/h:w<1/0&&(y=w*h),g>0&&v>0?v*h>g?v=g/h:g=v*h:g>0?v=g/h:v>0&&(g=v*h),T*h>F?T=F/h:F=T*h;var C=F=Math.floor(Math.min(Math.max(F,g),y)),S=T=Math.floor(Math.min(Math.max(T,v),w));return b&&(s=S,S=C,C=s),{dWidth:C,dHeight:S,width:F,height:T}},O.getParsedOrientationInfo=function(s){var l=this;this.getOrientation(function(a){E(s)&&s(l.parseOrientation(a))})},O.getOrientation=function(s){var l=this;d.file2ArrayBuffer(this.file,function(a){E(s)&&s(l.resetAndGetOrientation(a))})},O.resetAndGetOrientation=function(s){var l,a=new DataView(s);try{var u,p,m;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var b=a.byteLength,h=2;h+1<b;){if(a.getUint8(h)===255&&a.getUint8(h+1)===225){p=h;break}h+=1}if(p){var y=p+4,w=p+10;if(d.getStringFromCharCode(a,y,4)==="Exif"){var g=a.getUint16(w);if(((u=g===18761)||g===19789)&&a.getUint16(w+2,u)===42){var v=a.getUint32(w+4,u);v>=8&&(m=w+v)}}}if(m){var F;for(b=a.getUint16(m,u),F=0;F<b;F+=1)if(h=m+12*F+2,a.getUint16(h,u)===274){h+=8,l=a.getUint16(h,u),a.setUint16(h,1,u);break}}}catch(T){console.error(T),l=1}return l},O.parseOrientation=function(s){var l=0,a=1,u=1;switch(s){case 2:a=-1;break;case 3:l=-180;break;case 4:u=-1;break;case 5:l=90,u=-1;break;case 6:l=90;break;case 7:l=90,a=-1;break;case 8:l=-90}return{rotate:l,scaleX:a,scaleY:u}},O.beforeDraw=function(s,l){var a=this.parsedOrientationInfo,u=a.rotate,p=a.scaleX,m=a.scaleY,b=this.file,h=this.options,y="transparent",w=l.width,g=l.height;switch(b.size>h.convertSize&&h.mimeType==="image/png"&&(y="#fff",h.mimeType="image/jpeg"),s.fillStyle=y,s.fillRect(0,0,w,g),E(h.beforeDraw)&&h.beforeDraw.call(this,s,l),s.save(),u){case 90:s.translate(w,0);break;case-90:s.translate(0,g);break;case-180:s.translate(w,g)}s.rotate(u*Math.PI/180),s.scale(p,m)},O.afterDraw=function(s,l){var a=this.options;E(a.afterDraw)&&a.afterDraw.call(this,s,l)},O.error=function(s){var l=this.options;if(!E(l.error))throw new Error(s);l.error.call(this,s)},O.success=function(s){var l,a,u=this.options,p=this.file,m=this.image,b=this.getExpectedEdge(),h=m.naturalHeight,y=m.naturalWidth;if(s&&s.size)if(!u.loose&&s.size>p.size&&!(b.width>y||b.height>h))console.warn("\u5F53\u524D\u8BBE\u7F6E\u7684\u662F\u975E\u5BBD\u677E\u6A21\u5F0F\uFF0C\u538B\u7F29\u7ED3\u679C\u5927\u4E8E\u6E90\u56FE\u7247\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),s=p;else{var w=new Date;s.lastModified=w.getTime(),s.lastModifiedDate=w,s.name=p.name,s.name&&s.type!==p.type&&(s.name=s.name.replace(f,(l=s.type,(a=x(l)?l.substr(6):"")==="jpeg"&&(a="jpg"),"."+a)))}else console.warn("\u56FE\u7247\u538B\u7F29\u51FA\u4E86\u70B9\u610F\u5916\uFF0C\u8F93\u51FA\u6E90\u56FE\u7247"),s=p;E(u.success)&&u.success.call(this,s)},d.file2DataUrl=function(s,l,a){var u=new FileReader;u.onload=function(){l(u.result)},u.onerror=function(){E(a)&&a("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsDataURL(s)},d.file2ArrayBuffer=function(s,l,a){var u=new FileReader;u.onload=function(p){l(p.target.result)},u.onerror=function(){E(a)&&a("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25\uFF01")},u.readAsArrayBuffer(s)},d.getStringFromCharCode=function(s,l,a){var u,p="";for(a+=l,u=l;u<a;u+=1)p+=String.fromCharCode(s.getUint8(u));return p},d.file2Image=function(s,l,a){var u=new Image,p=o.URL||o.webkitURL;if(o.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(o.navigator.userAgent)&&(u.crossOrigin="anonymous"),u.alt=s.name,u.onerror=function(){E(a)&&a("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},p){var m=p.createObjectURL(s);u.onload=function(){l(u),p.revokeObjectURL(m)},u.src=m}else this.file2DataUrl(s,function(b){u.onload=function(){l(u)},u.src=b},a)},d.url2Image=function(s,l,a){var u=new Image;u.src=s,u.onload=function(){l(u)},u.onerror=function(){E(a)&&a("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")}},d.image2Canvas=function(s,l,a,u,p,m,b){var h=document.createElement("canvas"),y=h.getContext("2d");return h.width=m||s.naturalWidth,h.height=b||s.naturalHeight,E(u)&&u(y,h),y.save(),y.drawImage(s,0,0,l,a),y.restore(),E(p)&&p(y,h),h},d.canvas2DataUrl=function(s,l,a){return s.toDataURL(a||"image/jpeg",l)},d.dataUrl2Image=function(s,l,a){var u=new Image;u.onload=function(){l(u)},u.error=function(){E(a)&&a("\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF\uFF01")},u.src=s},d.dataUrl2Blob=function(s,l){for(var a=s.split(",")[1],u=s.match(/^data:(.*?)(;base64)?,/)[1],p=atob(a),m=a.length,b=new Uint8Array(m),h=0;h<m;h++)b[h]=p.charCodeAt(h);return new Blob([b],{type:l||u})},d.blob2DataUrl=function(s,l,a){this.file2DataUrl(s,l,a)},d.blob2Image=function(s,l,a){this.file2Image(s,l,a)},d.canvas2Blob=function(s,l,a,u){var p=this;HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(m,b,h){var y=this.toDataURL(b,h);m(p.dataUrl2Blob(y))}}),s.toBlob(function(m){l(m)},u||"image/jpeg",a||.8)},d.upload=function(s,l,a){var u=new XMLHttpRequest,p=new FormData;p.append("file",l),u.onreadystatechange=function(){if(u.readyState!==4||u.status!==200)throw new Error(u);a&&a(u.responseText)},u.open("POST",s,!0),u.send(p)},d)d.hasOwnProperty(D)&&(B[D]=d[D])}]).default})}(R)),R.exports}(function(e){e.exports=Ve()})(G);var Xe=Je(G.exports);const Ke=e=>{if(!e.file)throw new Error("file is required");const n=e.file.size/1024;let t=e.quality;if(t===void 0){if(n<200)return e.file;n>200&&n<=512?t=.9:n>512&&n<=1024?t=.8:n>1024&&n<=2048?t=.85:n>2048&&n<=10240?t=.8:n>10240&&n<=20480&&(t=.75)}return new Promise((r,i)=>{var o;new Xe({...e,quality:t,convertSize:(o=e.convertSize)!=null?o:1024,success:c=>{r(c)},error:c=>{i(c)}})})},V=e=>e&&e.split("?")[0].split("/").pop()||"",Ze=e=>(e=V(e),e?(e.split(".").pop()||"").toLowerCase():""),Qe=(e,n,t)=>Math.min(Math.max(t,e),n),M=new Map,et=(e,n=3)=>{if(!e)throw new Error("name is required");let t;return M.has(e)?t=M.get(e):(t={maxNum:n,currentNum:0,queue:[]},M.set(e,t)),{acquire:async()=>new Promise((f,d)=>{t.currentNum>=t.maxNum?t.queue.push({resolve:f,reject:d}):(t.currentNum++,f(!0))}),release:()=>{if(t.queue.length>0){const{resolve:f}=t.queue.shift();f(!0)}else t.currentNum--},destroy:async()=>{M.delete(e)},getMaxNum:()=>t.maxNum}};export{N as Enum,re as arrayDiff,j as arrayEquals,le as assign,ge as buildTree,Le as buildUrl,Qe as clamp,Ee as combineByField,Ke as compressImage,We as copyText,et as createLock,je as createStreamIterator,Ae as createTimer,qe as debounce,Ne as decodeHTMLEntities,H as deepAssign,de as deepClone,Pe as delayWhen,$e as downloadFile,Re as encodeHTMLEntities,Ue as fileToBlob,Ce as fileToDataURL,Se as fileToObjectURL,Y as filterTree,me as findNode,we as findNodeWithPath,ye as findParentAndIndex,ve as flatTree,xe as formatBytes,Fe as formatDate,Ie as formatInterval,Oe as formatNumber,Te as formatPx,Ze as getFileExt,V as getFilename,pe as getProp,_ as getProperty,Be as getRandInt,se as groupBy,He as handleFormValidateError,Ge as hasClass,Q as isBlob,te as isChildClassOf,P as isEmpty,ne as isEqual,Z as isIframe,ee as isImage,K as isObject,A as isPlainObject,k as looseEqual,z as mergeDefaultOptions,ce as omit,fe as omitEmpty,ze as openPage,Ye as parseAreaCode,W as parseJson,q as pick,De as runAtLeastTime,he as setProperty,L as sleep,oe as toArray,ae as toCamelCase,$ as toKebabCase,ue as toUnderscore,ke as urlToBlob,Me as urlToDataURL,_e as urlToPngBlob,be as walkTree,X as withInstall,ie as without};
@@ -1,210 +1,17 @@
1
- import { nextTick } from 'vue';
2
1
  type __VLS_Props = {
3
- modelValue: string;
4
- defaultValue?: string;
5
- emptyValue?: string;
2
+ modelValue: string | number;
3
+ defaultValue?: string | number;
4
+ emptyValue?: string | number;
6
5
  lazy?: boolean;
7
6
  valueKey?: string;
8
7
  trim?: boolean;
9
8
  validateEvent?: boolean;
10
9
  blurAfterSelect?: boolean;
11
10
  };
12
- declare function __VLS_template(): {
13
- attrs: Partial<{}>;
14
- slots: Partial<Record<string, (_: any) => any>>;
15
- refs: {
16
- autocompleteRef: ({
17
- $: import("vue").ComponentInternalInstance;
18
- $data: {};
19
- $props: Partial<{
20
- readonly disabled: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
21
- readonly modelValue: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
22
- readonly placement: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end", unknown>;
23
- readonly clearable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
24
- readonly popperClass: string;
25
- readonly teleported: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
26
- readonly valueKey: string;
27
- readonly debounce: number;
28
- readonly fetchSuggestions: import("element-plus").AutocompleteFetchSuggestions;
29
- readonly triggerOnFocus: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
30
- readonly selectWhenUnmatched: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
31
- readonly hideLoading: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
32
- readonly highlightFirstItem: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
33
- readonly fitInputWidth: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
34
- }> & Omit<Readonly<import("vue").ExtractPropTypes<{
35
- readonly ariaLabel: StringConstructor;
36
- readonly valueKey: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "value", boolean>;
37
- readonly modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
38
- readonly debounce: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
39
- readonly placement: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end", unknown, "bottom-start", boolean>;
40
- readonly fetchSuggestions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions) | ((new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions))[], unknown, unknown, () => void, boolean>;
41
- readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
42
- readonly triggerOnFocus: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
43
- readonly selectWhenUnmatched: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
44
- readonly hideLoading: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
45
- readonly teleported: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
46
- readonly highlightFirstItem: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
47
- readonly fitInputWidth: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
48
- readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
49
- readonly disabled: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
50
- readonly name: StringConstructor;
51
- }>> & {
52
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
53
- onChange?: ((value: string) => any) | undefined;
54
- onFocus?: ((evt: FocusEvent) => any) | undefined;
55
- onBlur?: ((evt: FocusEvent) => any) | undefined;
56
- onInput?: ((value: string) => any) | undefined;
57
- onSelect?: ((item: Record<string, any>) => any) | undefined;
58
- onClear?: (() => any) | undefined;
59
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "modelValue" | "valueKey" | "debounce" | "placement" | "fetchSuggestions" | "popperClass" | "triggerOnFocus" | "selectWhenUnmatched" | "hideLoading" | "teleported" | "highlightFirstItem" | "fitInputWidth" | "clearable">;
60
- $attrs: {
61
- [x: string]: unknown;
62
- };
63
- $refs: {
64
- [x: string]: unknown;
65
- };
66
- $slots: import("vue").Slots;
67
- $root: import("vue").ComponentPublicInstance | null;
68
- $parent: import("vue").ComponentPublicInstance | null;
69
- $emit: ((event: "input", value: string) => void) & ((event: "select", item: Record<string, any>) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "clear") => void);
70
- $el: any;
71
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
72
- readonly ariaLabel: StringConstructor;
73
- readonly valueKey: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "value", boolean>;
74
- readonly modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
75
- readonly debounce: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
76
- readonly placement: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end", unknown, "bottom-start", boolean>;
77
- readonly fetchSuggestions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions) | ((new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions))[], unknown, unknown, () => void, boolean>;
78
- readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
79
- readonly triggerOnFocus: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
80
- readonly selectWhenUnmatched: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
81
- readonly hideLoading: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
82
- readonly teleported: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
83
- readonly highlightFirstItem: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
84
- readonly fitInputWidth: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
85
- readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
86
- readonly disabled: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
87
- readonly name: StringConstructor;
88
- }>> & {
89
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
90
- onChange?: ((value: string) => any) | undefined;
91
- onFocus?: ((evt: FocusEvent) => any) | undefined;
92
- onBlur?: ((evt: FocusEvent) => any) | undefined;
93
- onInput?: ((value: string) => any) | undefined;
94
- onSelect?: ((item: Record<string, any>) => any) | undefined;
95
- onClear?: (() => any) | undefined;
96
- }, {
97
- highlightedIndex: import("vue").Ref<number>;
98
- activated: import("vue").Ref<boolean>;
99
- loading: import("vue").Ref<boolean>;
100
- inputRef: import("vue").Ref<import("element-plus").InputInstance | undefined>;
101
- popperRef: import("vue").Ref<import("element-plus").TooltipInstance | undefined>;
102
- suggestions: import("vue").Ref<import("element-plus").AutocompleteData>;
103
- handleSelect: (item: any) => void;
104
- handleKeyEnter: () => void;
105
- focus: () => void;
106
- blur: () => void;
107
- close: () => void;
108
- highlight: (index: number) => void;
109
- getData: (queryString: string) => void;
110
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
111
- select: (item: Record<string, any>) => void;
112
- clear: () => void;
113
- "update:modelValue": (value: string) => void;
114
- change: (value: string) => void;
115
- input: (value: string) => void;
116
- blur: (evt: FocusEvent) => void;
117
- focus: (evt: FocusEvent) => void;
118
- }, string, {
119
- readonly disabled: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
120
- readonly modelValue: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
121
- readonly placement: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end", unknown>;
122
- readonly clearable: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
123
- readonly popperClass: string;
124
- readonly teleported: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
125
- readonly valueKey: string;
126
- readonly debounce: number;
127
- readonly fetchSuggestions: import("element-plus").AutocompleteFetchSuggestions;
128
- readonly triggerOnFocus: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
129
- readonly selectWhenUnmatched: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
130
- readonly hideLoading: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
131
- readonly highlightFirstItem: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
132
- readonly fitInputWidth: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
133
- }> & {
134
- beforeCreate?: (() => void) | (() => void)[];
135
- created?: (() => void) | (() => void)[];
136
- beforeMount?: (() => void) | (() => void)[];
137
- mounted?: (() => void) | (() => void)[];
138
- beforeUpdate?: (() => void) | (() => void)[];
139
- updated?: (() => void) | (() => void)[];
140
- activated?: (() => void) | (() => void)[];
141
- deactivated?: (() => void) | (() => void)[];
142
- beforeDestroy?: (() => void) | (() => void)[];
143
- beforeUnmount?: (() => void) | (() => void)[];
144
- destroyed?: (() => void) | (() => void)[];
145
- unmounted?: (() => void) | (() => void)[];
146
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
147
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
148
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
149
- };
150
- $forceUpdate: () => void;
151
- $nextTick: typeof nextTick;
152
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
153
- } & Readonly<import("vue").ExtractPropTypes<{
154
- readonly ariaLabel: StringConstructor;
155
- readonly valueKey: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "value", boolean>;
156
- readonly modelValue: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
157
- readonly debounce: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
158
- readonly placement: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement) | ((new (...args: any[]) => "top" | "bottom" | "left" | "right" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("@popperjs/core").Placement))[], "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end", unknown, "bottom-start", boolean>;
159
- readonly fetchSuggestions: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions) | ((new (...args: any[]) => import("element-plus").AutocompleteData | ((queryString: string, cb: import("element-plus").AutocompleteFetchSuggestionsCallback) => import("element-plus/es/utils").Awaitable<import("element-plus").AutocompleteData> | void)) | (() => import("element-plus").AutocompleteFetchSuggestions))[], unknown, unknown, () => void, boolean>;
160
- readonly popperClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
161
- readonly triggerOnFocus: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
162
- readonly selectWhenUnmatched: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
163
- readonly hideLoading: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
164
- readonly teleported: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
165
- readonly highlightFirstItem: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
166
- readonly fitInputWidth: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
167
- readonly clearable: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
168
- readonly disabled: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
169
- readonly name: StringConstructor;
170
- }>> & {
171
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
172
- onChange?: ((value: string) => any) | undefined;
173
- onFocus?: ((evt: FocusEvent) => any) | undefined;
174
- onBlur?: ((evt: FocusEvent) => any) | undefined;
175
- onInput?: ((value: string) => any) | undefined;
176
- onSelect?: ((item: Record<string, any>) => any) | undefined;
177
- onClear?: (() => any) | undefined;
178
- } & import("vue").ShallowUnwrapRef<{
179
- highlightedIndex: import("vue").Ref<number>;
180
- activated: import("vue").Ref<boolean>;
181
- loading: import("vue").Ref<boolean>;
182
- inputRef: import("vue").Ref<import("element-plus").InputInstance | undefined>;
183
- popperRef: import("vue").Ref<import("element-plus").TooltipInstance | undefined>;
184
- suggestions: import("vue").Ref<import("element-plus").AutocompleteData>;
185
- handleSelect: (item: any) => void;
186
- handleKeyEnter: () => void;
187
- focus: () => void;
188
- blur: () => void;
189
- close: () => void;
190
- highlight: (index: number) => void;
191
- getData: (queryString: string) => void;
192
- }> & {} & import("@vue/runtime-core").ComponentCustomProperties & {
193
- $slots: {
194
- prepend?(_: {}): any;
195
- append?(_: {}): any;
196
- prefix?(_: {}): any;
197
- suffix?(_: {}): any;
198
- loading?(_: {}): any;
199
- default?(_: {
200
- item: Record<string, any>;
201
- }): any;
202
- };
203
- }) | null;
204
- };
205
- rootEl: any;
11
+ declare var __VLS_14: string, __VLS_15: any;
12
+ type __VLS_Slots = {} & {
13
+ [K in NonNullable<typeof __VLS_14>]?: (props: typeof __VLS_15) => any;
206
14
  };
207
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
208
15
  declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
209
16
  defaultValue: string;
210
17
  emptyValue: string;
@@ -230,15 +37,15 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
230
37
  onChange?: ((...args: any[]) => any) | undefined;
231
38
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
232
39
  }, {
233
- defaultValue: string;
234
- emptyValue: string;
40
+ defaultValue: string | number;
41
+ emptyValue: string | number;
235
42
  lazy: boolean;
236
43
  valueKey: string;
237
44
  trim: boolean;
238
45
  validateEvent: boolean;
239
46
  blurAfterSelect: boolean;
240
47
  }>;
241
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
48
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
242
49
  export default _default;
243
50
  type __VLS_WithDefaults<P, D> = {
244
51
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
@@ -254,7 +61,7 @@ type __VLS_TypePropsToOption<T> = {
254
61
  required: true;
255
62
  };
256
63
  };
257
- type __VLS_WithTemplateSlots<T, S> = T & {
64
+ type __VLS_WithSlots<T, S> = T & {
258
65
  new (): {
259
66
  $slots: S;
260
67
  };