k5web/assets/form-model.0db7876d.js

89 lines
44 KiB
JavaScript
Raw Normal View History

2024-06-07 16:46:40 +00:00
import{u as ee,i as le,g as tt,a as re,_ as Ve,l as rt,b as nt,c as H}from"./useConfig.7e9a03f4.js";import{d as oe,c as N,f as W,g as Be,w as te,b as ze,i as qe,o as He,t as Ke,n as de,aI as q,bn as at,bo as ot,bB as ut}from"./arco.446db797.js";import{u as _e,r as be,_ as we,a as lt}from"./dialog.604d372a.js";import{t as Q,w as it,x as ct,y as ve,z as st,A as We,B as Ue,C as ft,E as vt,F as dt}from"./index.25cd9d44.js";import{_ as pt,a as mt}from"./index.80de110f.js";import{i as Ge}from"./index.79f252de.js";/**
2024-05-26 17:09:50 +00:00
* 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-cl
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/function Et(e){return e==null}var fr=Et;/**
2024-05-26 17:09:50 +00:00
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/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 J(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 J(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(!isNa
2024-05-26 17:09:50 +00:00
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/function Mt(e,t,r,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"value",m=Be(),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,ct(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))}])}/**
2024-05-26 17:09:50 +00:00
* 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"}),ze(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 Qe(e){var t=Be(),r=N(function(){return t.props.disabled}),n=qe("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
2024-06-07 16:46:40 +00:00
*/var vr=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||{}),dr=Symbol("FormProvide"),Dt=Symbol("FormItemProvide");/**
2024-05-26 17:09:50 +00:00
* 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 rt(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?tt(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=Ve(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),He(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=Ke(e),n=r.value,o=r.modelValue,m=W(),l=W(!1),a=W(),f=W(null),g=W(),_=Qe(),s=Mt(n,o,e.defaultValue,e.onChange),w=Ve(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)})},J=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=qe(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:J,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=Ke(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))}),ze(function(){clearTimeout(a.value)});var g=function(){te([r,m],function(){!o.value||de(function(){f()})},{immediate:!0})};return He(function(){o.value&&g()}),{inputPreRef:l}}/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/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=st("input"),m=o.globalConfig,l=lt({BrowseIcon:It,BrowseOffIcon:xt,CloseCircleFilledIcon:Ft}),a=l.BrowseIcon,f=l.BrowseOffIcon,g=l.CloseCircleFilledIcon,_=Qe(),s=ee("input"),w=ee("input__wrap"),I=ee("input__tips"),D=nt(),d=D.STATUS,P=D.SIZE,C=ee(),u=We(),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),J=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 Je=[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 at(q("div",{class:v.value},[q("div",{class:Je,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",ut({class:["".concat(s.value,"__inner"),H({},"".concat(s.value,"--soft-hidden"),!t.showInput)]},c.value,S,{ref:A,value:R.value?(x=B.valu
2024-05-26 17:09:50 +00:00
* 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=We(),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
2024-06-07 16:46:40 +00:00
*/var pr=Ue(zt);Ue(Ht);/**
2024-05-26 17:09:50 +00:00
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/var Kt=ft,Wt=pt,Ut=vt,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 Qt=Yt;/**
2024-05-26 17:09:50 +00:00
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
2024-06-07 16:46:40 +00:00
*/var Xt=Qt;function Jt(e,t,r){return e==null?e:Xt(e,t,r)}var mr=Jt;/**
2024-05-26 17:09:50 +00:00
* 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=Q(pe.exports),me={exports:{}},X={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})(X,X.exports);X.exports;var fe={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=n(X.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(X.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
2024-06-07 16:46:40 +00:00
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=Q(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 Xe(e){var t=Object.prototype.toString.call(e),r={Date:"[object Date]"};return t===r.Date?!1:ve(e)?dt(e):["",void 0,null].includes(e)}var rr={date:Zt,url:tr,email:er,required:function(t){return!Xe(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