mirror of
https://github.com/silenty4ng/k5web
synced 2024-11-14 14:33:23 +00:00
89 lines
44 KiB
JavaScript
89 lines
44 KiB
JavaScript
import{u as ee,a as tt,_ as H}from"./useConfig.6cf5b795.js";import{d as oe,c as N,f as W,g as Ve,w as te,b as Be,i as ze,o as qe,t as He,n as de,aI as q,bn as rt,bo as nt,bB as at}from"./arco.949c921a.js";import{u as _e,r as be,_ as we,a as ot}from"./dialog.1ba30eca.js";import{C as J,e as ut,E as lt,F as ve,d as it,c as Ke,w as We,G as ct,H as st,J as ft}from"./index.2a65a066.js";import{i as le,g as vt,a as re,_ as Ue,l as dt}from"./helper.71009a45.js";import{_ as pt,a as mt}from"./index.911ac6d9.js";import{i as Ge}from"./useDisabled.bde84ef9.js";/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ht(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,m;for(m=0;m<n.length;m++)o=n[m],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function yt(e,t){if(e==null)return{};var r=ht(e,t),n,o;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);for(o=0;o<m.length;o++)n=m[o],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function gt(e){return e===void 0}var _t=gt;function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(r),!0).forEach(function(n){we(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bt={tag:"svg",attrs:{fill:"none",viewBox:"0 0 26 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"}}]},wt=oe({name:"BrowseOffIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=N(()=>e.size),{className:o,style:m}=_e(n),l=N(()=>["t-icon","t-icon-browse-off",o.value]),a=N(()=>Fe(Fe({},m.value),r.style)),f=N(()=>({class:l.value,style:a.value,onClick:g=>{var _;return(_=e.onClick)===null||_===void 0?void 0:_.call(e,{e:g})}}));return()=>be(bt,f.value)}});const xt=wt;function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ee(Object(r),!0).forEach(function(n){we(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ot={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{clipPath:"url(#clip0_8726_7319)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]}]},St=oe({name:"BrowseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=N(()=>e.size),{className:o,style:m}=_e(n),l=N(()=>["t-icon","t-icon-browse",o.value]),a=N(()=>Me(Me({},m.value),r.style)),f=N(()=>({class:l.value,style:a.value,onClick:g=>{var _;return(_=e.onClick)===null||_===void 0?void 0:_.call(e,{e:g})}}));return()=>be(Ot,f.value)}});const It=St;function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(n){we(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ct={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"}}]},Pt=oe({name:"CloseCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,t){var{attrs:r}=t,n=N(()=>e.size),{className:o,style:m}=_e(n),l=N(()=>["t-icon","t-icon-close-circle-filled",o.value]),a=N(()=>je(je({},m.value),r.style)),f=N(()=>({class:l.value,style:a.value,onClick:g=>{var _;return(_=e.onClick)===null||_===void 0?void 0:_.call(e,{e:g})}}));return()=>be(Ct,f.value)}});const Ft=Pt;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Et(e){return e==null}var vr=Et;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Le(e,t,r,n,o,m,l){try{var a=e[m](l),f=a.value}catch(g){r(g);return}a.done?t(f):Promise.resolve(f).then(n,o)}function Ye(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var m=e.apply(t,r);function l(f){Le(m,n,o,l,a,"next",f)}function a(f){Le(m,n,o,l,a,"throw",f)}l(void 0)})}}var xe={exports:{}},Oe={exports:{}};(function(e){function t(r){return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Oe);Oe.exports;(function(e){var t=Oe.exports.default;function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var n,o={},m=Object.prototype,l=m.hasOwnProperty,a=Object.defineProperty||function(p,c,v){p[c]=v.value},f=typeof Symbol=="function"?Symbol:{},g=f.iterator||"@@iterator",_=f.asyncIterator||"@@asyncIterator",s=f.toStringTag||"@@toStringTag";function w(p,c,v){return Object.defineProperty(p,c,{value:v,enumerable:!0,configurable:!0,writable:!0}),p[c]}try{w({},"")}catch{w=function(v,S,x){return v[S]=x}}function I(p,c,v,S){var x=c&&c.prototype instanceof O?c:O,h=Object.create(x.prototype),y=new X(S||[]);return a(h,"_invoke",{value:k(p,v,y)}),h}function D(p,c,v){try{return{type:"normal",arg:p.call(c,v)}}catch(S){return{type:"throw",arg:S}}}o.wrap=I;var d="suspendedStart",P="suspendedYield",C="executing",u="completed",i={};function O(){}function F(){}function A(){}var L={};w(L,g,function(){return this});var $=Object.getPrototypeOf,j=$&&$($(K([])));j&&j!==m&&l.call(j,g)&&(L=j);var M=A.prototype=O.prototype=Object.create(L);function R(p){["next","throw","return"].forEach(function(c){w(p,c,function(v){return this._invoke(c,v)})})}function B(p,c){function v(x,h,y,b){var E=D(p[x],p,h);if(E.type!=="throw"){var V=E.arg,G=V.value;return G&&t(G)=="object"&&l.call(G,"__await")?c.resolve(G.__await).then(function(Y){v("next",Y,y,b)},function(Y){v("throw",Y,y,b)}):c.resolve(G).then(function(Y){V.value=Y,y(V)},function(Y){return v("throw",Y,y,b)})}b(E.arg)}var S;a(this,"_invoke",{value:function(h,y){function b(){return new c(function(E,V){v(h,y,E,V)})}return S=S?S.then(b,b):b()}})}function k(p,c,v){var S=d;return function(x,h){if(S===C)throw Error("Generator is already running");if(S===u){if(x==="throw")throw h;return{value:n,done:!0}}for(v.method=x,v.arg=h;;){var y=v.delegate;if(y){var b=U(y,v);if(b){if(b===i)continue;return b}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(S===d)throw S=u,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);S=C;var E=D(p,c,v);if(E.type==="normal"){if(S=v.done?u:P,E.arg===i)continue;return{value:E.arg,done:v.done}}E.type==="throw"&&(S=u,v.method="throw",v.arg=E.arg)}}}function U(p,c){var v=c.method,S=p.iterator[v];if(S===n)return c.delegate=null,v==="throw"&&p.iterator.return&&(c.method="return",c.arg=n,U(p,c),c.method==="throw")||v!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+v+"' method")),i;var x=D(S,p.iterator,c.arg);if(x.type==="throw")return c.method="throw",c.arg=x.arg,c.delegate=null,i;var h=x.arg;return h?h.done?(c[p.resultName]=h.value,c.next=p.nextLoc,c.method!=="return"&&(c.method="next",c.arg=n),c.delegate=null,i):h:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,i)}function T(p){var c={tryLoc:p[0]};1 in p&&(c.catchLoc=p[1]),2 in p&&(c.finallyLoc=p[2],c.afterLoc=p[3]),this.tryEntries.push(c)}function z(p){var c=p.completion||{};c.type="normal",delete c.arg,p.completion=c}function X(p){this.tryEntries=[{tryLoc:"root"}],p.forEach(T,this),this.reset(!0)}function K(p){if(p||p===""){var c=p[g];if(c)return c.call(p);if(typeof p.next=="function")return p;if(!isNaN(p.length)){var v=-1,S=function x(){for(;++v<p.length;)if(l.call(p,v))return x.value=p[v],x.done=!1,x;return x.value=n,x.done=!0,x};return S.next=S}}throw new TypeError(t(p)+" is not iterable")}return F.prototype=A,a(M,"constructor",{value:A,configurable:!0}),a(A,"constructor",{value:F,configurable:!0}),F.displayName=w(A,s,"GeneratorFunction"),o.isGeneratorFunction=function(p){var c=typeof p=="function"&&p.constructor;return!!c&&(c===F||(c.displayName||c.name)==="GeneratorFunction")},o.mark=function(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,A):(p.__proto__=A,w(p,s,"GeneratorFunction")),p.prototype=Object.create(M),p},o.awrap=function(p){return{__await:p}},R(B.prototype),w(B.prototype,_,function(){return this}),o.AsyncIterator=B,o.async=function(p,c,v,S,x){x===void 0&&(x=Promise);var h=new B(I(p,c,v,S),x);return o.isGeneratorFunction(c)?h:h.next().then(function(y){return y.done?y.value:h.next()})},R(M),w(M,s,"Generator"),w(M,g,function(){return this}),w(M,"toString",function(){return"[object Generator]"}),o.keys=function(p){var c=Object(p),v=[];for(var S in c)v.push(S);return v.reverse(),function x(){for(;v.length;){var h=v.pop();if(h in c)return x.value=h,x.done=!1,x}return x.done=!0,x}},o.values=K,X.prototype={constructor:X,reset:function(c){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(z),!c)for(var v in this)v.charAt(0)==="t"&&l.call(this,v)&&!isNaN(+v.slice(1))&&(this[v]=n)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var v=this;function S(V,G){return y.type="throw",y.arg=c,v.next=V,G&&(v.method="next",v.arg=n),!!G}for(var x=this.tryEntries.length-1;x>=0;--x){var h=this.tryEntries[x],y=h.completion;if(h.tryLoc==="root")return S("end");if(h.tryLoc<=this.prev){var b=l.call(h,"catchLoc"),E=l.call(h,"finallyLoc");if(b&&E){if(this.prev<h.catchLoc)return S(h.catchLoc,!0);if(this.prev<h.finallyLoc)return S(h.finallyLoc)}else if(b){if(this.prev<h.catchLoc)return S(h.catchLoc,!0)}else{if(!E)throw Error("try statement without catch or finally");if(this.prev<h.finallyLoc)return S(h.finallyLoc)}}}},abrupt:function(c,v){for(var S=this.tryEntries.length-1;S>=0;--S){var x=this.tryEntries[S];if(x.tryLoc<=this.prev&&l.call(x,"finallyLoc")&&this.prev<x.finallyLoc){var h=x;break}}h&&(c==="break"||c==="continue")&&h.tryLoc<=v&&v<=h.finallyLoc&&(h=null);var y=h?h.completion:{};return y.type=c,y.arg=v,h?(this.method="next",this.next=h.finallyLoc,i):this.complete(y)},complete:function(c,v){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&v&&(this.next=v),i},finish:function(c){for(var v=this.tryEntries.length-1;v>=0;--v){var S=this.tryEntries[v];if(S.finallyLoc===c)return this.complete(S.completion,S.afterLoc),z(S),i}},catch:function(c){for(var v=this.tryEntries.length-1;v>=0;--v){var S=this.tryEntries[v];if(S.tryLoc===c){var x=S.completion;if(x.type==="throw"){var h=x.arg;z(S)}return h}}throw Error("illegal catch attempt")},delegateYield:function(c,v,S){return this.delegate={iterator:K(c),resultName:v,nextLoc:S},this.method==="next"&&(this.arg=n),i}},o}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(xe);xe.exports;var ie=xe.exports(),se=ie;try{regeneratorRuntime=ie}catch{(typeof globalThis>"u"?"undefined":ut(globalThis))==="object"?globalThis.regeneratorRuntime=ie:Function("r","regeneratorRuntime = r")(ie)}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Mt(e,t,r,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"value",m=Ve(),l=m.emit,a=m.vnode,f=W(),g=a.props||{},_=Object.prototype.hasOwnProperty.call(g,"modelValue")||Object.prototype.hasOwnProperty.call(g,"model-value"),s=Object.prototype.hasOwnProperty.call(g,o)||Object.prototype.hasOwnProperty.call(g,lt(o));return _?[t,function(w){l("update:modelValue",w);for(var I=arguments.length,D=new Array(I>1?I-1:0),d=1;d<I;d++)D[d-1]=arguments[d];n==null||n.apply(void 0,[w].concat(D))}]:s?[e,function(w){l("update:".concat(o),w);for(var I=arguments.length,D=new Array(I>1?I-1:0),d=1;d<I;d++)D[d-1]=arguments[d];n==null||n.apply(void 0,[w].concat(D))}]:(f.value=r,[f,function(w){f.value=w;for(var I=arguments.length,D=new Array(I>1?I-1:0),d=1;d<I;d++)D[d-1]=arguments[d];n==null||n.apply(void 0,[w].concat(D))}])}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var ue=new Set,At={warn:function(t,r){console.warn("TDesign ".concat(t," Warn: ").concat(r))},warnOnce:function(t,r){var n="TDesign ".concat(t," Warn: ").concat(r);ue.has(n)||(ue.add(n),console.warn(n))},error:function(t,r){console.error("TDesign ".concat(t," Error: ").concat(r))},errorOnce:function(t,r){var n="TDesign ".concat(t," Error: ").concat(r);ue.has(n)||(ue.add(n),console.error(n))},info:function(t,r){console.info("TDesign ".concat(t," Info: ").concat(r))}};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function jt(e,t){if(!(typeof window>"u")){var r=window&&window.ResizeObserver;if(!!r){var n=null,o=function(){!n||!e.value||(n.unobserve(e.value),n.disconnect(),n=null)},m=function(a){n=new ResizeObserver(t),n.observe(a)};e&&te(e,function(l){o(),l&&m(l)},{immediate:!0,flush:"post"}),Be(function(){o()})}}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Lt={align:{type:String,default:"left",validator:function(t){return t?["left","center","right"].includes(t):!0}},allowInputOverMax:Boolean,autoWidth:Boolean,autocomplete:{type:String,default:void 0},autofocus:Boolean,borderless:Boolean,clearable:Boolean,disabled:Boolean,format:{type:Function},inputClass:{type:[String,Object,Array]},label:{type:[String,Function]},maxcharacter:{type:Number},maxlength:{type:[String,Number]},name:{type:String,default:""},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:Boolean,showClearIconOnEmpty:Boolean,showLimitNumber:Boolean,size:{type:String,default:"medium",validator:function(t){return t?["small","medium","large"].includes(t):!0}},status:{type:String,default:void 0,validator:function(t){return t?["default","success","warning","error"].includes(t):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tips:{type:[String,Function]},type:{type:String,default:"text",validator:function(t){return t?["text","number","url","tel","password","search","submit","hidden"].includes(t):!0}},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onCompositionend:Function,onCompositionstart:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onValidate:Function,onWheel:Function};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Je(e){var t=Ve(),r=N(function(){return t.props.disabled}),n=ze("formDisabled",Object.create(null)),o=n.disabled;return N(function(){return r.value||(o==null?void 0:o.value)||(e==null?void 0:e.value)||!1})}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var dr=function(){var t=ee();return N(function(){var r="".concat(t.value,"-form"),n="".concat(t.value,"-input"),o="".concat(t.value,"-is");return{form:r,label:"".concat(r,"__label"),labelTop:"".concat(r,"__label--top"),inline:"".concat(r,"-inline"),formItem:"".concat(r,"__item"),formItemWithHelp:"".concat(r,"__item-with-help"),formItemWithExtra:"".concat(r,"__item-with-extra"),controls:"".concat(r,"__controls"),controlsContent:"".concat(r,"__controls-content"),status:"".concat(r,"__status"),extra:"".concat(n,"__extra"),help:"".concat(n,"__help"),success:"".concat(o,"-success"),successBorder:"".concat(r,"--success-border"),error:"".concat(o,"-error"),warning:"".concat(o,"-warning")}})},$t=function(e){return e.TO_BE_VALIDATED="not",e.SUCCESS="success",e.FAIL="fail",e}($t||{}),pr=Symbol("FormProvide"),Dt=Symbol("FormItemProvide");/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Nt(e){var t=function(a){var f=e.value,g=f.allowInputOverMax,_=f.maxlength,s=f.maxcharacter;if(!(_||s)||g||!a)return a;if(_)return dt(a,_);if(s){var w=re(a,s);if(ve(w))return w.characters}},r=N(function(){var l=e.value,a=l.maxlength,f=l.maxcharacter,g=l.value;if(le(g))return String(g);if(a&&f&&At.warn("Input","Pick one of maxlength and maxcharacter please."),a){var _=g!=null&&g.length?vt(g):0;return"".concat(_,"/").concat(a)}return f?"".concat(re(g||""),"/").concat(f):""}),n=N(function(){if(r.value){var l=r.value.split("/"),a=Ue(l,2),f=a[0],g=a[1];return Number(f)>Number(g)?"error":""}return""}),o=N(function(){var l=e.value.status;return l||n.value}),m=function(){var a,f;(a=(f=e.value).onValidate)===null||a===void 0||a.call(f,{error:n.value?"exceed-maximum":void 0})};return te(n,m),qe(function(){n.value&&m()}),{tStatus:o,limitNumber:r,getValueByLimitNumber:t}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function ce(e,t){return t==="number"?e||e===0?Number(e):void 0:e}function Tt(e,t){var r=He(e),n=r.value,o=r.modelValue,m=W(),l=W(!1),a=W(),f=W(null),g=W(),_=Je(),s=Mt(n,o,e.defaultValue,e.onChange),w=Ue(s,2),I=w[0],D=w[1],d=W(!1),P=W(!1),C=W(e.type),u=W(null),i=N(function(){return{value:[void 0,null].includes(I.value)?void 0:String(I.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),O=Nt(i),F=O.limitNumber,A=O.getValueByLimitNumber,L=O.tStatus,$=N(function(){return(I.value&&!_.value&&e.clearable&&!e.readonly||e.showClearIconOnEmpty)&&d.value}),j=function(){var y;P.value=!0,(y=u.value)===null||y===void 0||y.focus()},M=function(){var y;P.value=!1,(y=u.value)===null||y===void 0||y.blur()},R=function(y){var b;d.value&&P.value||(m.value=I.value,!e.disabled&&(P.value=!0,(b=e.onFocus)===null||b===void 0||b.call(e,I.value,{e:y})))},B=function(y){var b,E=y.e,V=e.type==="number"?void 0:"";D(V,{e:E,trigger:"clear"}),(b=e.onClear)===null||b===void 0||b.call(e,{e:E})},k=function(y){g.value=y.target},U=function(){var y=C.value==="password"?"text":"password";C.value=y},T=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",b=u.value;if(!!b){var E=String(y);!b.value||b.value!==E&&(b.value=E)}},z=function(y){var b,E=y.target,V=E.value;e.type!=="number"&&typeof I.value=="string"&&V.length>((b=I.value)===null||b===void 0?void 0:b.length)&&(V=A(V)),D(ce(V,e.type),{e:y,trigger:"input"}),de(function(){T(I.value)})},X=function(y){var b=y.inputType&&y.inputType==="insertCompositionText",E=y.currentTarget.value;if(b||l.value){a.value=E;return}z(y)},K=function(){var y,b=g.value;if(!b||!b.tagName||!((y=f.value)!==null&&y!==void 0&&y.$el)||!["path","svg"].includes(b.tagName))return!1;for(;b;){var E;if(((E=f.value)===null||E===void 0?void 0:E.$el)===b)return!0;b=b.parentNode}return!1},p=ze(Dt,void 0),c=function(y){if(K())j();else{var b;e.format&&(m.value=typeof I.value=="number"||e.type==="number"?I.value:e.format(I.value)),P.value=!1,(b=e.onBlur)===null||b===void 0||b.call(e,I.value,{e:y}),p==null||p.handleBlur()}},v=function(y){var b;l.value=!1,a.value="",z(y),(b=e.onCompositionend)===null||b===void 0||b.call(e,String(I.value),{e:y})},S=function(y){var b;l.value=!0;var E=y.currentTarget.value;a.value=E,(b=e.onCompositionstart)===null||b===void 0||b.call(e,String(I.value),{e:y})},x=function(y){var b,E;(b=u.value)===null||b===void 0||b.focus(),(E=e.onClick)===null||E===void 0||E.call(e,{e:y})};return te(function(){return e.autofocus},function(h){h===!0&&de(function(){var y;(y=u.value)===null||y===void 0||y.focus()})},{immediate:!0}),te(I,function(h,y){var b=e.type==="number";y===void 0&&e.format&&typeof h!="number"&&!b?m.value=e.format(h):m.value=h;var E=typeof h=="number"?h:A(h);E!==h&&!b&&D(E,{trigger:"initial"})},{immediate:!0}),te(function(){return e.type},function(h){C.value=h},{immediate:!0}),t({inputRef:u,focus:j,blur:M}),{isHover:d,focused:P,renderType:C,showClear:$,inputRef:u,clearIconRef:f,inputValue:m,isComposition:l,compositionValue:a,limitNumber:F,tStatus:L,emitFocus:R,formatAndEmitBlur:c,onHandleCompositionend:v,onHandleCompositionstart:S,onRootClick:x,emitPassword:U,handleInput:X,emitClear:B,onClearIconMousedown:k,innerValue:I}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Rt(e,t){var r=function(s){if(!e.disabled){var w=s.code,I=ce(s.currentTarget.value,e.type);if(/enter/i.test(w)||/enter/i.test(s.key)){var D;(D=e.onEnter)===null||D===void 0||D.call(e,I,{e:s})}else{var d;(d=e.onKeydown)===null||d===void 0||d.call(e,I,{e:s})}}},n=function(s){var w;if(!e.disabled){var I=ce(s.currentTarget.value,e.type);(w=e.onKeyup)===null||w===void 0||w.call(e,I,{e:s})}},o=function(s){var w;if(!e.disabled){var I=ce(s.currentTarget.value,e.type);(w=e.onKeypress)===null||w===void 0||w.call(e,I,{e:s})}},m=function(s){var w;if(!e.disabled){var I=s.clipboardData||window.clipboardData;(w=e.onPaste)===null||w===void 0||w.call(e,{e:s,pasteValue:I==null?void 0:I.getData("text/plain")})}},l=function(s){return t.value=s},a=function(s){var w;return(w=e.onWheel)===null||w===void 0?void 0:w.call(e,{e:s})},f=function(s){var w;l(!0),(w=e.onMouseenter)===null||w===void 0||w.call(e,{e:s})},g=function(s){var w;l(!1),(w=e.onMouseleave)===null||w===void 0||w.call(e,{e:s})};return{isHover:t,handleKeydown:r,handleKeyUp:n,handleKeypress:o,onHandlePaste:m,onHandleMousewheel:a,onInputMouseenter:f,onInputMouseleave:g}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var kt=100;function Vt(e,t,r){var n=He(e),o=n.autoWidth,m=n.placeholder,l=W(null),a=W(null),f=function(){if(!(!l.value||!t.value)){var s=l.value.getBoundingClientRect(),w=s.width;t.value.style.width="".concat(w||0,"px")}};jt(t,function(){o.value&&(a.value=setTimeout(function(){f(),clearTimeout(a.value)},kt))}),Be(function(){clearTimeout(a.value)});var g=function(){te([r,m],function(){!o.value||de(function(){f()})},{immediate:!0})};return qe(function(){o.value&&g()}),{inputPreRef:l}}/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Bt=["isHover","tStatus","inputRef","renderType","showClear","focused","inputValue","isComposition","compositionValue","innerValue","limitNumber"];function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function De(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$e(Object(r),!0).forEach(function(n){H(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(e){var t={};return Object.keys(e).forEach(function(r){_t(e[r])||(t[r]=e[r])}),t}var zt=oe({name:"TInput",props:De(De({},Lt),{},{showInput:{type:Boolean,default:!0},keepWrapperWidth:{type:Boolean,default:!1}}),setup:function(t,r){var n=r.expose,o=it("input"),m=o.globalConfig,l=ot({BrowseIcon:It,BrowseOffIcon:xt,CloseCircleFilledIcon:Ft}),a=l.BrowseIcon,f=l.BrowseOffIcon,g=l.CloseCircleFilledIcon,_=Je(),s=ee("input"),w=ee("input__wrap"),I=ee("input__tips"),D=tt(),d=D.STATUS,P=D.SIZE,C=ee(),u=Ke(),i=Tt(t,n),O=i.isHover,F=i.tStatus,A=i.inputRef,L=i.renderType,$=i.showClear,j=i.focused,M=i.inputValue,R=i.isComposition,B=i.compositionValue,k=i.innerValue,U=i.limitNumber,T=yt(i,Bt),z=Vt(t,A,k),X=z.inputPreRef,K=Rt(t,O),p=N(function(){var x;return(x=t.placeholder)!==null&&x!==void 0?x:m.value.placeholder}),c=N(function(){var x;return Ne({autofocus:t.autofocus,disabled:_.value,readonly:t.readonly,placeholder:p.value,maxlength:!t.allowInputOverMax&&t.maxlength||void 0,name:t.name||void 0,type:L.value,autocomplete:(x=t.autocomplete)!==null&&x!==void 0?x:m.value.autocomplete||void 0,unselectable:t.readonly?"on":void 0})}),v=N(function(){return[w.value,H({},"".concat(s.value,"--auto-width"),t.autoWidth&&!t.keepWrapperWidth)]}),S=Ne({onFocus:T.emitFocus,onBlur:T.formatAndEmitBlur,onKeydown:K.handleKeydown,onKeyup:K.handleKeyUp,onKeypress:K.handleKeypress,onPaste:K.onHandlePaste,onCompositionend:T.onHandleCompositionend,onCompositionstart:T.onHandleCompositionstart});return function(){var x,h,y=u("prefixIcon"),b=u("suffixIcon"),E=u("passwordIcon"),V=u("label",{silent:!0}),G=u("suffix"),Y=U.value&&t.showLimitNumber?q("div",{class:["".concat(C.value,"-input__limit-number"),H({},"".concat(C.value,"-is-disabled"),_.value)]},[U.value]):null,Se=V?q("div",{class:"".concat(s.value,"__prefix")},[V]):null,Ie=G||Y?q("div",{class:"".concat(s.value,"__suffix")},[G,Y]):null;t.type==="password"&&(L.value==="password"?b=q(f,{class:"".concat(s.value,"__suffix-clear"),onClick:T.emitPassword},null):L.value==="text"&&(b=q(a,{class:"".concat(s.value,"__suffix-clear"),onClick:T.emitPassword},null))),$.value&&(t.type==="password"?E=q(g,{ref:T.clearIconRef,class:"".concat(s.value,"__suffix-clear"),onClick:T.emitClear,onMousedown:T.onClearIconMousedown},null):b=q(g,{ref:T.clearIconRef,class:"".concat(s.value,"__suffix-clear"),onClick:T.emitClear,onMousedown:T.onClearIconMousedown},null));var Xe=[s.value,t.inputClass,H(H(H(H(H(H(H(H(H({},P.value[t.size],t.size!=="medium"),d.value.disabled,_.value),d.value.focused,_.value?!1:j.value),"".concat(C.value,"-is-").concat(F.value),F.value&&F.value!=="default"),"".concat(C.value,"-align-").concat(t.align),t.align!=="left"),"".concat(C.value,"-is-readonly"),t.readonly),"".concat(s.value,"--prefix"),y||Se),"".concat(s.value,"--suffix"),b||Ie),"".concat(s.value,"--focused"),j.value)],Ce=u("tips"),Ze=[I.value,"".concat(C.value,"-tips"),"".concat(C.value,"-is-").concat(F.value||"default")];return rt(q("div",{class:v.value},[q("div",{class:Xe,onClick:T.onRootClick,onMouseenter:K.onInputMouseenter,onMouseleave:K.onInputMouseleave,onWheel:K.onHandleMousewheel},[y?q("span",{class:["".concat(s.value,"__prefix"),"".concat(s.value,"__prefix-icon")]},[y]):null,Se,q("input",at({class:["".concat(s.value,"__inner"),H({},"".concat(s.value,"--soft-hidden"),!t.showInput)]},c.value,S,{ref:A,value:R.value?(x=B.value)!==null&&x!==void 0?x:"":(h=M.value)!==null&&h!==void 0?h:"",onInput:function(et){return T.handleInput(et)}}),null),t.autoWidth&&q("span",{ref:X,class:"".concat(C.value,"-input__input-pre")},[k.value||p.value]),Ie,E?q("span",{class:["".concat(s.value,"__suffix"),"".concat(s.value,"__suffix-icon"),"".concat(s.value,"__clear")]},[E]):null,b?q("span",{class:["".concat(s.value,"__suffix"),"".concat(s.value,"__suffix-icon"),H({},"".concat(s.value,"__clear"),$.value)]},[b]):null]),Ce&&q("div",{class:Ze},[Ce])]),[[nt,t.type!=="hidden"]])}}});/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var qt={separate:Boolean};/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Ht=oe({name:"TInputGroup",props:qt,setup:function(t){var r=ee("input-group"),n=Ke(),o=N(function(){return[r.value,H({},"".concat(r.value,"--separate"),t.separate)]});return function(){return q("div",{class:o.value},[n("default")])}}});/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var mr=We(zt);We(Ht);/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Kt=ct,Wt=pt,Ut=st,Te=ve,Gt=mt;function Yt(e,t,r,n){if(!Te(e))return e;t=Wt(t,e);for(var o=-1,m=t.length,l=m-1,a=e;a!=null&&++o<m;){var f=Gt(t[o]),g=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(o!=l){var _=a[f];g=n?n(_,f,a):void 0,g===void 0&&(g=Te(_)?_:Ut(t[o+1])?[]:{})}Kt(a,f,g),a=a[f]}return e}var Jt=Yt;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Qt=Jt;function Xt(e,t,r){return e==null?e:Qt(e,t,r)}var hr=Xt;/**
|
|
* tdesign v1.9.4
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var pe={exports:{}},Z={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;for(var m in o)typeof n[m]>"u"&&(n[m]=o[m]);return n}e.exports=t.default,e.exports.default=t.default})(Z,Z.exports);Z.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=D;var r=n(Z.exports);function n(d){return d&&d.__esModule?d:{default:d}}function o(d,P){return a(d)||l(d,P)||g(d,P)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(d,P){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(d)))){var C=[],u=!0,i=!1,O=void 0;try{for(var F=d[Symbol.iterator](),A;!(u=(A=F.next()).done)&&(C.push(A.value),!(P&&C.length===P));u=!0);}catch(L){i=!0,O=L}finally{try{!u&&F.return!=null&&F.return()}finally{if(i)throw O}}return C}}function a(d){if(Array.isArray(d))return d}function f(d,P){var C;if(typeof Symbol>"u"||d[Symbol.iterator]==null){if(Array.isArray(d)||(C=g(d))||P&&d&&typeof d.length=="number"){C&&(d=C);var u=0,i=function(){};return{s:i,n:function(){return u>=d.length?{done:!0}:{done:!1,value:d[u++]}},e:function($){throw $},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O=!0,F=!1,A;return{s:function(){C=d[Symbol.iterator]()},n:function(){var $=C.next();return O=$.done,$},e:function($){F=!0,A=$},f:function(){try{!O&&C.return!=null&&C.return()}finally{if(F)throw A}}}}function g(d,P){if(!!d){if(typeof d=="string")return _(d,P);var C=Object.prototype.toString.call(d).slice(8,-1);if(C==="Object"&&d.constructor&&(C=d.constructor.name),C==="Map"||C==="Set")return Array.from(d);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return _(d,P)}}function _(d,P){(P==null||P>d.length)&&(P=d.length);for(var C=0,u=new Array(P);C<P;C++)u[C]=d[C];return u}var s={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};function w(d){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(d)}function I(d,P){for(var C=[],u=Math.min(d.length,P.length),i=0;i<u;i++)C.push([d[i],P[i]]);return C}function D(d,P){if(typeof P=="string"?P=(0,r.default)({format:P},s):P=(0,r.default)(P,s),typeof d=="string"&&w(P.format)){var C=P.delimiters.find(function(k){return P.format.indexOf(k)!==-1}),u=P.strictMode?C:P.delimiters.find(function(k){return d.indexOf(k)!==-1}),i=I(d.split(u),P.format.toLowerCase().split(C)),O={},F=f(i),A;try{for(F.s();!(A=F.n()).done;){var L=o(A.value,2),$=L[0],j=L[1];if($.length!==j.length)return!1;O[j.charAt(0)]=$}}catch(k){F.e(k)}finally{F.f()}var M=O.y;if(O.y.length===2){var R=parseInt(O.y,10);if(isNaN(R))return!1;var B=new Date().getFullYear()%100;R<B?M="20".concat(O.y):M="19".concat(O.y)}return new Date("".concat(M,"-").concat(O.m,"-").concat(O.d)).getDate()===+O.d}return P.strictMode?!1:Object.prototype.toString.call(d)==="[object Date]"&&isFinite(d)}e.exports=t.default,e.exports.default=t.default})(pe,pe.exports);var Zt=J(pe.exports),me={exports:{}},Q={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r=function(l){return typeof l}:r=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(o)}function n(o){var m=typeof o=="string"||o instanceof String;if(!m){var l=r(o);throw o===null?l="null":l==="object"&&(l=o.constructor.name),new TypeError("Expected a string but received a ".concat(l))}}e.exports=t.default,e.exports.default=t.default})(Q,Q.exports);Q.exports;var fe={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=n(Q.exports);function n(l){return l&&l.__esModule?l:{default:l}}function o(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(f){return typeof f}:o=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},o(l)}function m(l,a){(0,r.default)(l);var f,g;o(a)==="object"?(f=a.min||0,g=a.max):(f=arguments[1],g=arguments[2]);var _=encodeURI(l).split(/%..|./).length-1;return _>=f&&(typeof g>"u"||_<=g)}e.exports=t.default,e.exports.default=t.default})(fe,fe.exports);fe.exports;var ne={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=o(Q.exports),n=o(Z.exports);function o(a){return a&&a.__esModule?a:{default:a}}var m={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function l(a,f){(0,r.default)(a),f=(0,n.default)(f,m),f.allow_trailing_dot&&a[a.length-1]==="."&&(a=a.substring(0,a.length-1)),f.allow_wildcard===!0&&a.indexOf("*.")===0&&(a=a.substring(2));var g=a.split("."),_=g[g.length-1];return f.require_tld&&(g.length<2||!f.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(_)||/\s/.test(_))||!f.allow_numeric_tld&&/^\d+$/.test(_)?!1:g.every(function(s){return!(s.length>63&&!f.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(s)||/[\uff01-\uff5e]/.test(s)||/^-|-$/.test(s)||!f.allow_underscores&&/_/.test(s))})}e.exports=t.default,e.exports.default=t.default})(ne,ne.exports);ne.exports;var ae={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=n(Q.exports);function n(_){return _&&_.__esModule?_:{default:_}}var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",m="(".concat(o,"[.]){3}").concat(o),l=new RegExp("^".concat(m,"$")),a="(?:[0-9a-fA-F]{1,4})",f=new RegExp("^("+"(?:".concat(a,":){7}(?:").concat(a,"|:)|")+"(?:".concat(a,":){6}(?:").concat(m,"|:").concat(a,"|:)|")+"(?:".concat(a,":){5}(?::").concat(m,"|(:").concat(a,"){1,2}|:)|")+"(?:".concat(a,":){4}(?:(:").concat(a,"){0,1}:").concat(m,"|(:").concat(a,"){1,3}|:)|")+"(?:".concat(a,":){3}(?:(:").concat(a,"){0,2}:").concat(m,"|(:").concat(a,"){1,4}|:)|")+"(?:".concat(a,":){2}(?:(:").concat(a,"){0,3}:").concat(m,"|(:").concat(a,"){1,5}|:)|")+"(?:".concat(a,":){1}(?:(:").concat(a,"){0,4}:").concat(m,"|(:").concat(a,"){1,6}|:)|")+"(?::((?::".concat(a,"){0,5}:").concat(m,"|(?::").concat(a,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function g(_){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,r.default)(_),s=String(s),s?s==="4"?l.test(_):s==="6"?f.test(_):!1:g(_,4)||g(_,6)}e.exports=t.default,e.exports.default=t.default})(ae,ae.exports);ae.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;var r=a(Q.exports),n=a(fe.exports),o=a(ne.exports),m=a(ae.exports),l=a(Z.exports);function a(u){return u&&u.__esModule?u:{default:u}}var f={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},g=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,s=/^[a-z\d]+$/,w=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,I=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,D=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,d=254;function P(u){var i=u.replace(/^"(.+)"$/,"$1");if(!i.trim())return!1;var O=/[\.";<>]/.test(i);if(O){if(i===u)return!1;var F=i.split('"').length===i.split('\\"').length;if(!F)return!1}return!0}function C(u,i){if((0,r.default)(u),i=(0,l.default)(i,f),i.require_display_name||i.allow_display_name){var O=u.match(g);if(O){var F=O[1];if(u=u.replace(F,"").replace(/(^<|>$)/g,""),F.endsWith(" ")&&(F=F.slice(0,-1)),!P(F))return!1}else if(i.require_display_name)return!1}if(!i.ignore_max_length&&u.length>d)return!1;var A=u.split("@"),L=A.pop(),$=L.toLowerCase();if(i.host_blacklist.includes($)||i.host_whitelist.length>0&&!i.host_whitelist.includes($))return!1;var j=A.join("@");if(i.domain_specific_validation&&($==="gmail.com"||$==="googlemail.com")){j=j.toLowerCase();var M=j.split("+")[0];if(!(0,n.default)(M.replace(/\./g,""),{min:6,max:30}))return!1;for(var R=M.split("."),B=0;B<R.length;B++)if(!s.test(R[B]))return!1}if(i.ignore_max_length===!1&&(!(0,n.default)(j,{max:64})||!(0,n.default)(L,{max:254})))return!1;if(!(0,o.default)(L,{require_tld:i.require_tld,ignore_max_length:i.ignore_max_length,allow_underscores:i.allow_underscores})){if(!i.allow_ip_domain)return!1;if(!(0,m.default)(L)){if(!L.startsWith("[")||!L.endsWith("]"))return!1;var k=L.slice(1,-1);if(k.length===0||!(0,m.default)(k))return!1}}if(j[0]==='"')return j=j.slice(1,j.length-1),i.allow_utf8_local_part?D.test(j):w.test(j);for(var U=i.allow_utf8_local_part?I:_,T=j.split("."),z=0;z<T.length;z++)if(!U.test(T[z]))return!1;return!(i.blacklisted_chars&&j.search(new RegExp("[".concat(i.blacklisted_chars,"]+"),"g"))!==-1)}e.exports=t.default,e.exports.default=t.default})(me,me.exports);var er=J(me.exports),he={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=C;var r=l(Q.exports),n=l(ne.exports),o=l(ae.exports),m=l(Z.exports);function l(u){return u&&u.__esModule?u:{default:u}}function a(u,i){return w(u)||s(u,i)||g(u,i)||f()}function f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(u,i){if(!!u){if(typeof u=="string")return _(u,i);var O=Object.prototype.toString.call(u).slice(8,-1);if(O==="Object"&&u.constructor&&(O=u.constructor.name),O==="Map"||O==="Set")return Array.from(u);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return _(u,i)}}function _(u,i){(i==null||i>u.length)&&(i=u.length);for(var O=0,F=new Array(i);O<i;O++)F[O]=u[O];return F}function s(u,i){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var O=[],F=!0,A=!1,L=void 0;try{for(var $=u[Symbol.iterator](),j;!(F=(j=$.next()).done)&&(O.push(j.value),!(i&&O.length===i));F=!0);}catch(M){A=!0,L=M}finally{try{!F&&$.return!=null&&$.return()}finally{if(A)throw L}}return O}}function w(u){if(Array.isArray(u))return u}var I={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},D=/^\[([^\]]+)\](?::([0-9]+))?$/;function d(u){return Object.prototype.toString.call(u)==="[object RegExp]"}function P(u,i){for(var O=0;O<i.length;O++){var F=i[O];if(u===F||d(F)&&F.test(u))return!0}return!1}function C(u,i){if((0,r.default)(u),!u||/[\s<>]/.test(u)||u.indexOf("mailto:")===0||(i=(0,m.default)(i,I),i.validate_length&&u.length>=2083)||!i.allow_fragments&&u.includes("#")||!i.allow_query_components&&(u.includes("?")||u.includes("&")))return!1;var O,F,A,L,$,j,M,R;if(M=u.split("#"),u=M.shift(),M=u.split("?"),u=M.shift(),M=u.split("://"),M.length>1){if(O=M.shift().toLowerCase(),i.require_valid_protocol&&i.protocols.indexOf(O)===-1)return!1}else{if(i.require_protocol)return!1;if(u.slice(0,2)==="//"){if(!i.allow_protocol_relative_urls)return!1;M[0]=u.slice(2)}}if(u=M.join("://"),u==="")return!1;if(M=u.split("/"),u=M.shift(),u===""&&!i.require_host)return!0;if(M=u.split("@"),M.length>1){if(i.disallow_auth||M[0]===""||(F=M.shift(),F.indexOf(":")>=0&&F.split(":").length>2))return!1;var B=F.split(":"),k=a(B,2),U=k[0],T=k[1];if(U===""&&T==="")return!1}L=M.join("@"),j=null,R=null;var z=L.match(D);if(z?(A="",R=z[1],j=z[2]||null):(M=L.split(":"),A=M.shift(),M.length&&(j=M.join(":"))),j!==null&&j.length>0){if($=parseInt(j,10),!/^[0-9]+$/.test(j)||$<=0||$>65535)return!1}else if(i.require_port)return!1;return i.host_whitelist?P(A,i.host_whitelist):A===""&&!i.require_host?!0:!(!(0,o.default)(A)&&!(0,n.default)(A,i)&&(!R||!(0,o.default)(R,6))||(A=A||R,i.host_blacklist&&P(A,i.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(he,he.exports);var tr=J(he.exports);function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Re(Object(r),!0).forEach(function(n){H(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qe(e){var t=Object.prototype.toString.call(e),r={Date:"[object Date]"};return t===r.Date?!1:ve(e)?ft(e):["",void 0,null].includes(e)}var rr={date:Zt,url:tr,email:er,required:function(t){return!Qe(t)},whitespace:function(t){return!(/^\s+$/.test(t)||t==="")},boolean:function(t){return Ge(t)},max:function(t,r){return le(t)?t<=r:re(t)<=r},min:function(t,r){return le(t)?t>=r:re(t)>=r},len:function(t,r){return re(String(t))===r},number:function(t){return le(t)},enum:function(t,r){return r.includes(t)},idcard:function(t){return/^(\d{18,18}|\d{15,15}|\d{17,17}x)$/i.test(t)},telnumber:function(t){return/^1[3-9]\d{9}$/.test(t)},pattern:function(t,r){return r.test(t)},validator:function(t,r){return r(t)}};function nr(e,t){return ye.apply(this,arguments)}function ye(){return ye=Ye(se.mark(function e(t,r){var n,o,m,l,a,f,g;return se.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:n={result:!0},o=Object.keys(r),a=0;case 3:if(!(a<o.length)){s.next=15;break}if(f=o[a],!(!r.required&&Qe(t)&&!r.validator)){s.next=7;break}return s.abrupt("return",n);case 7:if(g=rr[f],!(g&&(r[f]||r[f]===0))){s.next=12;break}return m=r[f]===!0?void 0:r[f],l=g,s.abrupt("break",15);case 12:a++,s.next=3;break;case 15:if(!l){s.next=23;break}return s.next=18,l(t,m);case 18:if(n=s.sent,!Ge(n)){s.next=21;break}return s.abrupt("return",ke(ke({},r),{},{result:n}));case 21:if(!ve(n)){s.next=23;break}return s.abrupt("return",n);case 23:return s.abrupt("return",n);case 24:case"end":return s.stop()}},e)})),ye.apply(this,arguments)}function yr(e,t){return ge.apply(this,arguments)}function ge(){return ge=Ye(se.mark(function e(t,r){var n,o;return se.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=r.map(function(a){return nr(t,a)}),l.next=3,Promise.all(n);case 3:return o=l.sent,l.abrupt("return",o);case 5:case"end":return l.stop()}},e)})),ge.apply(this,arguments)}export{It as B,Ft as C,pr as F,mr as I,$t as V,Ye as _,Dt as a,Mt as b,jt as c,_t as d,Je as e,Jt as f,yt as g,Nt as h,vr as i,At as l,se as r,hr as s,dr as u,yr as v};
|