@charlie_deng/e2e-assistant-web 0.0.0-stage → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AgentWorkPage-BixelI-Z.js +1 -0
- package/dist/assets/AgentWorkPage-C5pG8SyJ.css +1 -0
- package/dist/assets/Button-B9KdpLiQ.js +109 -0
- package/dist/assets/ChatComposer-C12a4eUe.css +1 -0
- package/dist/assets/ChatComposer-DQY07g6H.js +1 -0
- package/dist/assets/ConfigurationPage-C0bn8s_C.css +1 -0
- package/dist/assets/ConfigurationPage-RyibiA06.js +1 -0
- package/dist/assets/OnboardingProgressStrip-BOebB3lC.js +1 -0
- package/dist/assets/OnboardingProgressStrip-Br3y57OH.css +1 -0
- package/dist/assets/Select-C-fgI4Iw.js +317 -0
- package/dist/assets/SkillCreateModal-TAmQ9LXf.css +1 -0
- package/dist/assets/SkillCreateModal-ztXpookC.js +1 -0
- package/dist/assets/SkillDevPage-C6QIYZQk.js +228 -0
- package/dist/assets/SkillDevPage-hUaIo_y8.css +1 -0
- package/dist/assets/SkillDevelopmentChatRoute-CYCwxEAE.js +1 -0
- package/dist/assets/SkillDevelopmentChatRoute-e6ztFmxi.css +1 -0
- package/dist/assets/SkillDevelopmentCodeRoute-DhF5kUq_.js +1 -0
- package/dist/assets/SkillDevelopmentCodeRoute-aAV58kqu.css +1 -0
- package/dist/assets/SkillDevelopmentE2ETestCaseRoute-DhX2osG-.css +1 -0
- package/dist/assets/SkillDevelopmentE2ETestCaseRoute-DyfDQyfj.js +102 -0
- package/dist/assets/SkillDevelopmentImageRoute-BelitCV9.js +1 -0
- package/dist/assets/SkillDevelopmentImageRoute-CI59F2wz.css +1 -0
- package/dist/assets/SkillDevelopmentReportRoute-Dy2Usmx9.css +1 -0
- package/dist/assets/SkillDevelopmentReportRoute-QO8HDcyC.js +1 -0
- package/dist/assets/SkillsPage-B-NGVlDa.js +120 -0
- package/dist/assets/SkillsPage-C74aPnSg.css +1 -0
- package/dist/assets/Space-Db724DU3.js +232 -0
- package/dist/assets/Tag-CfVAG5oG.js +71 -0
- package/dist/assets/VirtualList-DAaB5pP0.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-B_1YmakK.js +124 -0
- package/dist/assets/chat-markdown-c63JX4UP.js +16 -0
- package/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/dist/assets/css.worker-BKx7BC4h.js +89 -0
- package/dist/assets/editor.worker-DQJwLooG.js +26 -0
- package/dist/assets/get-slot-CuPt92KB.js +1 -0
- package/dist/assets/html.worker-ChRLLxCa.js +502 -0
- package/dist/assets/iconfont-C1_IDV6T.ttf +0 -0
- package/dist/assets/iconfont-CZtA2q6w.eot +0 -0
- package/dist/assets/iconfont-DDGY8VTz.svg +2435 -0
- package/dist/assets/iconfont-H4dHfFBl.woff +0 -0
- package/dist/assets/index-DtdpSL_8.js +1821 -0
- package/dist/assets/index-NDn3xcTv.css +1 -0
- package/dist/assets/json.worker-DR52qCex.js +58 -0
- package/dist/assets/limits-kkJeZt9H.js +1 -0
- package/dist/assets/monaco-Bf-GDAu0.js +2 -0
- package/dist/assets/monaco-editor-Br_kD0ds.css +1 -0
- package/dist/assets/monaco-editor-d6BaUM92.js +1201 -0
- package/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/dist/assets/ts.worker-Cqvg7802.js +67734 -0
- package/dist/assets/use-message-BT2Y6PCe.js +323 -0
- package/dist/assets/useGlobalMessage-DNIyxJnz.js +1 -0
- package/dist/assets/useWorkbenchSubject-Bn-Ijpg_.js +1 -0
- package/dist/assets/workbench-B_zzXGel.js +1 -0
- package/dist/index.html +23 -0
- package/package.json +47 -3
- package/README.md +0 -3
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import{Bt as e,Dt as t,Ft as n,Jt as r,Nn as i,Q as a,Qt as o,St as s,X as c,Xt as l,Yt as u,Z as d,_ as f,_n as p,_t as m,a as h,an as g,bt as _,dn as v,dt as y,en as b,g as x,gt as S,h as C,i as w,in as T,it as E,kn as D,l as O,ln as k,lt as A,m as ee,mt as j,nn as M,nt as N,on as te,pt as ne,r as P,rt as F,st as I,tn as re,tt as L,v as ie,vn as ae,x as oe,xt as R,y as se,yt as z}from"./_plugin-vue_export-helper-B_1YmakK.js";import{a as ce,l as le,o as B,r as ue}from"./Button-B9KdpLiQ.js";import{i as de}from"./Tag-CfVAG5oG.js";function fe(e){return e.composedPath()[0]||null}function V(e){return e.composedPath()[0]}var H={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function pe(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(V(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(V(n))},i=r=>{e&&(t.contains(V(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function me(e,t,n){let r=H[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=pe(e,t,n)),a}function he(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=me(e,t,n);return Object.keys(i).forEach(e=>{U(e,document,i[e],r)}),!0}return!1}function ge(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=me(e,t,n);return Object.keys(i).forEach(e=>{W(e,document,i[e],r)}),!0}return!1}function _e(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=V(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,he(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(ge(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:U,off:W}=_e(),G=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function ve(){return G}function ye(e){let t={isDeactivated:!1},n=!1;return M(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),g(()=>{t.isDeactivated=!0,n||=!0}),t}function be(e,t){console.error(`[vueuc/${e}]: ${t}`)}var K=[],xe=function(){return K.some(function(e){return e.activeTargets.length>0})},Se=function(){return K.some(function(e){return e.skippedTargets.length>0})},Ce=`ResizeObserver loop completed with undelivered notifications.`,we=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:Ce}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=Ce),window.dispatchEvent(e)},Te;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(Te||={});var q=function(e){return Object.freeze(e)},Ee=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,q(this)}return e}(),De=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,q(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Oe=function(e){return e instanceof SVGElement&&`getBBox`in e},J=function(e){if(Oe(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},ke=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},Ae=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},Y=typeof window<`u`?window:{},X=new WeakMap,je=/auto|scroll/,Z=/^tb|vertical/,Me=/msie|trident/i.test(Y.navigator&&Y.navigator.userAgent),Q=function(e){return parseFloat(e||`0`)},$=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Ee((n?t:e)||0,(n?e:t)||0)},Ne=q({devicePixelContentBoxSize:$(),borderBoxSize:$(),contentBoxSize:$(),contentRect:new De(0,0,0,0)}),Pe=function(e,t){if(t===void 0&&(t=!1),X.has(e)&&!t)return X.get(e);if(J(e))return X.set(e,Ne),Ne;var n=getComputedStyle(e),r=Oe(e)&&e.ownerSVGElement&&e.getBBox(),i=!Me&&n.boxSizing===`border-box`,a=Z.test(n.writingMode||``),o=!r&&je.test(n.overflowY||``),s=!r&&je.test(n.overflowX||``),c=r?0:Q(n.paddingTop),l=r?0:Q(n.paddingRight),u=r?0:Q(n.paddingBottom),d=r?0:Q(n.paddingLeft),f=r?0:Q(n.borderTopWidth),p=r?0:Q(n.borderRightWidth),m=r?0:Q(n.borderBottomWidth),h=r?0:Q(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:Q(n.width)-S-x,T=r?r.height:Q(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=q({devicePixelContentBoxSize:$(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:$(E,D,a),contentBoxSize:$(w,T,a),contentRect:new De(d,c,w,T)});return X.set(e,O),O},Fe=function(e,t,n){var r=Pe(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case Te.DEVICE_PIXEL_CONTENT_BOX:return o;case Te.BORDER_BOX:return i;default:return a}},Ie=function(){function e(e){var t=Pe(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=q([t.borderBoxSize]),this.contentBoxSize=q([t.contentBoxSize]),this.devicePixelContentBoxSize=q([t.devicePixelContentBoxSize])}return e}(),Le=function(e){if(J(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Re=function(){var e=1/0,t=[];K.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new Ie(t.target),i=Le(t.target);r.push(n),t.lastReportedSize=Fe(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},ze=function(e){K.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(Le(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Be=function(){var e=0;for(ze(e);xe();)e=Re(),ze(e);return Se()&&we(),e>0},Ve,He=[],Ue=function(){return He.splice(0).forEach(function(e){return e()})},We=function(e){if(!Ve){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Ue()}).observe(n,{characterData:!0}),Ve=function(){n.textContent=`${t?t--:t++}`}}He.push(e),Ve()},Ge=function(e){We(function(){requestAnimationFrame(e)})},Ke=0,qe=function(){return!!Ke},Je=250,Ye={attributes:!0,characterData:!0,childList:!0,subtree:!0},Xe=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Ze=function(e){return e===void 0&&(e=0),Date.now()+e},Qe=!1,$e=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=Je),!Qe){Qe=!0;var n=Ze(e);Ge(function(){var r=!1;try{r=Be()}finally{if(Qe=!1,e=n-Ze(),!qe())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Ye)};document.body?t():Y.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Xe.forEach(function(t){return Y.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Xe.forEach(function(t){return Y.removeEventListener(t,e.listener,!0)}),!0)},e}()),et=function(e){!Ke&&e>0&&$e.start(),Ke+=e,!Ke&&$e.stop()},tt=function(e){return!Oe(e)&&!Ae(e)&&getComputedStyle(e).display===`inline`},nt=function(){function e(e,t){this.target=e,this.observedBox=t||Te.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Fe(this.target,this.observedBox,!0);return tt(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),rt=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),it=new WeakMap,at=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ot=function(){function e(){}return e.connect=function(e,t){var n=new rt(e,t);it.set(e,n)},e.observe=function(e,t,n){var r=it.get(e),i=r.observationTargets.length===0;at(r.observationTargets,t)<0&&(i&&K.push(r),r.observationTargets.push(new nt(t,n&&n.box)),et(1),$e.schedule())},e.unobserve=function(e,t){var n=it.get(e),r=at(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&K.splice(K.indexOf(n),1),n.observationTargets.splice(r,1),et(-1))},e.disconnect=function(e){var t=this,n=it.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),st=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);ot.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!ke(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);ot.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!ke(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);ot.unobserve(this,e)},e.prototype.disconnect=function(){ot.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),ct=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||st)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},lt=r({name:`ResizeObserver`,props:{onResize:Function},setup(e){let t=!1,n=u().proxy;function r(t){let{onResize:n}=e;n!==void 0&&n(t)}te(()=>{let e=n.$el;if(e===void 0){be(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){be(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(ct.registerHandler(e.nextElementSibling,r),t=!0)}),T(()=>{t&&ct.unregisterHandler(n.$el.nextElementSibling)})},render(){return v(this.$slots,`default`)}});function ut(e){let{left:t,right:n,top:r,bottom:i}=ne(e);return`${r} ${t} ${i} ${n}`}var dt=r({render(){var e;return(e=this.$slots).default?.call(e)}}),ft={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function pt(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function mt(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function ht(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?_t(s,e=>e.test(o)):gt(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function gt(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _t(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function vt(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var yt={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},bt=(e,t,n)=>{let r,i=yt[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},xt={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},St=(e,t,n,r)=>xt[e],Ct={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:mt({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:mt({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:mt({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:mt({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:mt({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},wt={ordinalNumber:vt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:ht({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:ht({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:ht({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:ht({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:ht({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},Tt={name:`en-US`,locale:{code:`en-US`,formatDistance:bt,formatLong:{date:pt({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:pt({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:pt({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:St,localize:Ct,match:wt,options:{weekStartsOn:0,firstWeekContainsDate:1}}};function Et(t){let{mergedLocaleRef:n,mergedDateLocaleRef:r}=o(a,null)||{},i=e(()=>n?.value?.[t]??ft[t]);return{dateLocaleRef:e(()=>r?.value??Tt),localeRef:i}}var Dt=r({name:`ChevronDown`,render(){return l(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},l(`path`,{d:`M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z`,fill:`currentColor`}))}}),Ot=ee(`clear`,()=>l(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},l(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},l(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},l(`path`,{d:`M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z`}))))),kt=r({name:`Eye`,render(){return l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},l(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),l(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),At=r({name:`EyeOff`,render(){return l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},l(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),l(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),l(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),l(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),l(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),jt=m(`base-clear`,`
|
|
2
|
+
flex-shrink: 0;
|
|
3
|
+
height: 1em;
|
|
4
|
+
width: 1em;
|
|
5
|
+
position: relative;
|
|
6
|
+
`,[S(`>`,[z(`clear`,`
|
|
7
|
+
font-size: var(--n-clear-size);
|
|
8
|
+
height: 1em;
|
|
9
|
+
width: 1em;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
color: var(--n-clear-color);
|
|
12
|
+
transition: color .3s var(--n-bezier);
|
|
13
|
+
display: flex;
|
|
14
|
+
`,[S(`&:hover`,`
|
|
15
|
+
color: var(--n-clear-color-hover)!important;
|
|
16
|
+
`),S(`&:active`,`
|
|
17
|
+
color: var(--n-clear-color-pressed)!important;
|
|
18
|
+
`)]),z(`placeholder`,`
|
|
19
|
+
display: flex;
|
|
20
|
+
`),z(`clear, placeholder`,`
|
|
21
|
+
position: absolute;
|
|
22
|
+
left: 50%;
|
|
23
|
+
top: 50%;
|
|
24
|
+
transform: translateX(-50%) translateY(-50%);
|
|
25
|
+
`,[O({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),Mt=r({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return se(`-base-clear`,jt,i(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return l(`div`,{class:`${e}-base-clear`},l(C,null,{default:()=>{var t;return this.show?l(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},L(this.$slots.icon,()=>[l(x,{clsPrefix:e},{default:()=>l(Ot,null)})])):l(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),Nt={railInsetHorizontalBottom:`auto 2px 4px 2px`,railInsetHorizontalTop:`4px 2px auto 2px`,railInsetVerticalRight:`2px 4px 2px auto`,railInsetVerticalLeft:`2px auto 2px 4px`,railColor:`transparent`};function Pt(e){let{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},Nt),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}var Ft={name:`Scrollbar`,common:P,self:Pt},It=m(`scrollbar`,`
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: auto;
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 100%;
|
|
31
|
+
`,[S(`>`,[m(`scrollbar-container`,`
|
|
32
|
+
width: 100%;
|
|
33
|
+
overflow: scroll;
|
|
34
|
+
height: 100%;
|
|
35
|
+
min-height: inherit;
|
|
36
|
+
max-height: inherit;
|
|
37
|
+
scrollbar-width: none;
|
|
38
|
+
`,[S(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
39
|
+
width: 0;
|
|
40
|
+
height: 0;
|
|
41
|
+
display: none;
|
|
42
|
+
`),S(`>`,[m(`scrollbar-content`,`
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
min-width: 100%;
|
|
45
|
+
`)])])]),S(`>, +`,[m(`scrollbar-rail`,`
|
|
46
|
+
position: absolute;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
user-select: none;
|
|
49
|
+
background: var(--n-scrollbar-rail-color);
|
|
50
|
+
-webkit-user-select: none;
|
|
51
|
+
`,[_(`horizontal`,`
|
|
52
|
+
height: var(--n-scrollbar-height);
|
|
53
|
+
`,[S(`>`,[z(`scrollbar`,`
|
|
54
|
+
height: var(--n-scrollbar-height);
|
|
55
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
56
|
+
right: 0;
|
|
57
|
+
`)])]),_(`horizontal--top`,`
|
|
58
|
+
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
59
|
+
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
60
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
61
|
+
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
62
|
+
`),_(`horizontal--bottom`,`
|
|
63
|
+
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
64
|
+
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
65
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
66
|
+
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
67
|
+
`),_(`vertical`,`
|
|
68
|
+
width: var(--n-scrollbar-width);
|
|
69
|
+
`,[S(`>`,[z(`scrollbar`,`
|
|
70
|
+
width: var(--n-scrollbar-width);
|
|
71
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
72
|
+
bottom: 0;
|
|
73
|
+
`)])]),_(`vertical--left`,`
|
|
74
|
+
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
75
|
+
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
76
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
77
|
+
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
78
|
+
`),_(`vertical--right`,`
|
|
79
|
+
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
80
|
+
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
81
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
82
|
+
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
83
|
+
`),_(`disabled`,[S(`>`,[z(`scrollbar`,`pointer-events: none;`)])]),S(`>`,[z(`scrollbar`,`
|
|
84
|
+
z-index: 1;
|
|
85
|
+
position: absolute;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
pointer-events: all;
|
|
88
|
+
background-color: var(--n-scrollbar-color);
|
|
89
|
+
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
90
|
+
`,[w(),S(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),Lt=r({name:`Scrollbar`,props:Object.assign(Object.assign({},ie.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=d(t),a=oe(`Scrollbar`,i,n),o=D(null),s=D(null),l=D(null),u=D(null),f=D(null),p=D(null),m=D(null),h=D(null),g=D(null),_=D(null),v=D(null),b=D(0),x=D(0),S=D(!1),C=D(!1),w=!1,E=!1,O,k,A=0,ee=0,j=0,M=0,N=ve(),P=ie(`Scrollbar`,`-scrollbar`,It,Ft,t,n),F=e(()=>{let{value:e}=h,{value:t}=p,{value:n}=_;return e===null||t===null||n===null?0:Math.min(e,n*e/t+y(P.value.self.width)*1.5)}),I=e(()=>`${F.value}px`),re=e(()=>{let{value:e}=g,{value:t}=m,{value:n}=v;return e===null||t===null||n===null?0:n*e/t+y(P.value.self.height)*1.5}),L=e(()=>`${re.value}px`),R=e(()=>{let{value:e}=h,{value:t}=b,{value:n}=p,{value:r}=_;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-F.value):0}}),se=e(()=>`${R.value}px`),z=e(()=>{let{value:e}=g,{value:t}=x,{value:n}=m,{value:r}=v;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-re.value):0}}),ce=e(()=>`${z.value}px`),le=e(()=>{let{value:e}=h,{value:t}=p;return e!==null&&t!==null&&t>e}),B=e(()=>{let{value:e}=g,{value:t}=m;return e!==null&&t!==null&&t>e}),ue=e(()=>{let{trigger:e}=t;return e===`none`||S.value}),de=e(()=>{let{trigger:e}=t;return e===`none`||C.value}),V=e(()=>{let{container:e}=t;return e?e():s.value}),H=e(()=>{let{content:e}=t;return e?e():l.value}),pe=(e,n)=>{if(!t.scrollable)return;if(typeof e==`number`){G(e,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=e;(r!==void 0||i!==void 0)&&G(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?G(0,a*o,o,u,c):s===`bottom`?G(0,2**53-1,0,!1,c):s===`top`&&G(0,0,0,!1,c):G(0,l.offsetTop,l.offsetHeight,u,c)},me=ye(()=>{t.container||pe({top:b.value,left:x.value})}),he=()=>{me.isDeactivated||J()},ge=e=>{if(me.isDeactivated)return;let{onResize:n}=t;n&&n(e),J()},_e=(e,n)=>{if(!t.scrollable)return;let{value:r}=V;r&&(typeof e==`object`?r.scrollBy(e):r.scrollBy(e,n||0))};function G(e,t,n,r,i){let{value:a}=V;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function be(){we(),Te(),J()}function K(){xe()}function xe(){Se(),Ce()}function Se(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{C.value=!1},t.duration)}function Ce(){O!==void 0&&window.clearTimeout(O),O=window.setTimeout(()=>{S.value=!1},t.duration)}function we(){O!==void 0&&window.clearTimeout(O),S.value=!0}function Te(){k!==void 0&&window.clearTimeout(k),C.value=!0}function q(e){let{onScroll:n}=t;n&&n(e),Ee()}function Ee(){let{value:e}=V;e&&(b.value=e.scrollTop,x.value=e.scrollLeft*(a?.value?-1:1))}function De(){let{value:e}=H;e&&(p.value=e.offsetHeight,m.value=e.offsetWidth);let{value:t}=V;t&&(h.value=t.offsetHeight,g.value=t.offsetWidth);let{value:n}=f,{value:r}=u;n&&(v.value=n.offsetWidth),r&&(_.value=r.offsetHeight)}function Oe(){let{value:e}=V;e&&(b.value=e.scrollTop,x.value=e.scrollLeft*(a?.value?-1:1),h.value=e.offsetHeight,g.value=e.offsetWidth,p.value=e.scrollHeight,m.value=e.scrollWidth);let{value:t}=f,{value:n}=u;t&&(v.value=t.offsetWidth),n&&(_.value=n.offsetHeight)}function J(){t.scrollable&&(t.useUnifiedContainer?Oe():(De(),Ee()))}function ke(e){return!o.value?.contains(fe(e))}function Ae(e){e.preventDefault(),e.stopPropagation(),E=!0,U(`mousemove`,window,Y,!0),U(`mouseup`,window,X,!0),ee=x.value,j=a?.value?window.innerWidth-e.clientX:e.clientX}function Y(e){if(!E)return;O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k);let{value:n}=g,{value:r}=m,{value:i}=re;if(n===null||r===null)return;let o=(a?.value?window.innerWidth-e.clientX-j:e.clientX-j)*(r-n)/(n-i),s=r-n,c=ee+o;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=V;if(l){l.scrollLeft=c*(a?.value?-1:1);let{internalOnUpdateScrollLeft:e}=t;e&&e(c)}}function X(e){e.preventDefault(),e.stopPropagation(),W(`mousemove`,window,Y,!0),W(`mouseup`,window,X,!0),E=!1,J(),ke(e)&&xe()}function je(e){e.preventDefault(),e.stopPropagation(),w=!0,U(`mousemove`,window,Z,!0),U(`mouseup`,window,Me,!0),A=b.value,M=e.clientY}function Z(e){if(!w)return;O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k);let{value:t}=h,{value:n}=p,{value:r}=F;if(t===null||n===null)return;let i=(e.clientY-M)*(n-t)/(t-r),a=n-t,o=A+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=V;s&&(s.scrollTop=o)}function Me(e){e.preventDefault(),e.stopPropagation(),W(`mousemove`,window,Z,!0),W(`mouseup`,window,Me,!0),w=!1,J(),ke(e)&&xe()}ae(()=>{let{value:e}=B,{value:t}=le,{value:r}=n,{value:i}=f,{value:a}=u;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),te(()=>{t.container||J()}),T(()=>{O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k),W(`mousemove`,window,Z,!0),W(`mouseup`,window,Me,!0)});let Q=e(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:o,railInsetHorizontalTop:s,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=P.value,{top:f,right:p,bottom:m,left:h}=ne(s),{top:g,right:_,bottom:v,left:y}=ne(c),{top:b,right:x,bottom:S,left:C}=ne(a?.value?ut(l):l),{top:w,right:T,bottom:E,left:D}=ne(a?.value?ut(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":o,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":C,"--n-scrollbar-rail-top-vertical-left":w,"--n-scrollbar-rail-right-vertical-left":T,"--n-scrollbar-rail-bottom-vertical-left":E,"--n-scrollbar-rail-left-vertical-left":D,"--n-scrollbar-rail-color":d}}),$=r?c(`scrollbar`,void 0,Q,t):void 0;return Object.assign(Object.assign({},{scrollTo:pe,scrollBy:_e,sync:J,syncUnifiedContainer:Oe,handleMouseEnterWrapper:be,handleMouseLeaveWrapper:K}),{mergedClsPrefix:n,rtlEnabled:a,containerScrollTop:b,wrapperRef:o,containerRef:s,contentRef:l,yRailRef:u,xRailRef:f,needYBar:le,needXBar:B,yBarSizePx:I,xBarSizePx:L,yBarTopPx:se,xBarLeftPx:ce,isShowXBar:ue,isShowYBar:de,isIos:N,handleScroll:q,handleContentResize:he,handleContainerResize:ge,handleYScrollMouseDown:je,handleXScrollMouseDown:Ae,containerWidth:g,cssVars:r?void 0:Q,themeClass:$?.themeClass,onRender:$?.onRender})},render(){let{$slots:e,mergedClsPrefix:r,triggerDisplayManually:i,rtlEnabled:a,internalHoistYRail:o,yPlacement:s,xPlacement:c,xScrollable:u}=this;if(!this.scrollable)return e.default?.call(e);let d=this.trigger===`none`,f=(e,n)=>l(`div`,{ref:`yRailRef`,class:[`${r}-scrollbar-rail`,`${r}-scrollbar-rail--vertical`,`${r}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},l(d?dt:t,d?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?l(`div`,{class:`${r}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),p=()=>{var n;return(n=this.onRender)==null||n.call(this),l(`div`,b(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${r}-scrollbar`,this.themeClass,a&&`${r}-scrollbar--rtl`],style:this.cssVars,onMouseenter:i?void 0:this.handleMouseEnterWrapper,onMouseleave:i?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):l(`div`,{role:`none`,ref:`containerRef`,class:[`${r}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":j(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},l(lt,{onResize:this.handleContentResize},{default:()=>l(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${r}-scrollbar-content`,this.contentClass]},e)})),o?null:f(void 0,void 0),u&&l(`div`,{ref:`xRailRef`,class:[`${r}-scrollbar-rail`,`${r}-scrollbar-rail--horizontal`,`${r}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},l(d?dt:t,d?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?l(`div`,{class:`${r}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:a?this.xBarLeftPx:void 0,left:a?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},m=this.container?p():l(lt,{onResize:this.handleContainerResize},{default:p});return o?l(n,null,m,f(this.themeClass,this.cssVars)):m}}),Rt=Lt,zt=r({name:`InternalSelectionSuffix`,props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:n}=e;return l(h,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?l(Mt,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>l(x,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>L(t.default,()=>[l(Dt,null)])})}):null})}}}),Bt={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function Vt(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:p,lineHeight:m,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,actionColor:C,clearColor:w,clearColorHover:T,clearColorPressed:E,placeholderColor:D,placeholderColorDisabled:O,iconColor:k,iconColorDisabled:ee,iconColorHover:j,iconColorPressed:M,fontWeight:N}=e;return Object.assign(Object.assign({},Bt),{fontWeight:N,countTextColorDisabled:r,countTextColor:n,heightTiny:y,heightSmall:b,heightMedium:x,heightLarge:S,fontSizeTiny:h,fontSizeSmall:g,fontSizeMedium:_,fontSizeLarge:v,lineHeight:m,lineHeightTextarea:m,borderRadius:p,iconSize:`16px`,groupLabelColor:C,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:D,placeholderColorDisabled:O,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${A(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${A(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${A(d,{alpha:.2})}`,caretColorError:d,clearColor:w,clearColorHover:T,clearColorPressed:E,iconColor:k,iconColorDisabled:ee,iconColorHover:j,iconColorPressed:M,suffixTextColor:t})}var Ht=f({name:`Input`,common:P,peers:{Scrollbar:Ft},self:Vt}),Ut=I(`n-input`),Wt=m(`input`,`
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
cursor: text;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
z-index: auto;
|
|
95
|
+
outline: none;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
position: relative;
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
border-radius: var(--n-border-radius);
|
|
100
|
+
background-color: var(--n-color);
|
|
101
|
+
transition: background-color .3s var(--n-bezier);
|
|
102
|
+
font-size: var(--n-font-size);
|
|
103
|
+
font-weight: var(--n-font-weight);
|
|
104
|
+
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
105
|
+
`,[z(`input, textarea`,`
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
position: relative;
|
|
109
|
+
`),z(`input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder`,`
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
font-size: inherit;
|
|
112
|
+
line-height: 1.5;
|
|
113
|
+
font-family: inherit;
|
|
114
|
+
border: none;
|
|
115
|
+
outline: none;
|
|
116
|
+
background-color: #0000;
|
|
117
|
+
text-align: inherit;
|
|
118
|
+
transition:
|
|
119
|
+
-webkit-text-fill-color .3s var(--n-bezier),
|
|
120
|
+
caret-color .3s var(--n-bezier),
|
|
121
|
+
color .3s var(--n-bezier),
|
|
122
|
+
text-decoration-color .3s var(--n-bezier);
|
|
123
|
+
`),z(`input-el, textarea-el`,`
|
|
124
|
+
-webkit-appearance: none;
|
|
125
|
+
scrollbar-width: none;
|
|
126
|
+
width: 100%;
|
|
127
|
+
min-width: 0;
|
|
128
|
+
text-decoration-color: var(--n-text-decoration-color);
|
|
129
|
+
color: var(--n-text-color);
|
|
130
|
+
caret-color: var(--n-caret-color);
|
|
131
|
+
background-color: transparent;
|
|
132
|
+
`,[S(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
133
|
+
width: 0;
|
|
134
|
+
height: 0;
|
|
135
|
+
display: none;
|
|
136
|
+
`),S(`&::placeholder`,`
|
|
137
|
+
color: #0000;
|
|
138
|
+
-webkit-text-fill-color: transparent !important;
|
|
139
|
+
`),S(`&:-webkit-autofill ~`,[z(`placeholder`,`display: none;`)])]),_(`round`,[R(`textarea`,`border-radius: calc(var(--n-height) / 2);`)]),z(`placeholder`,`
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
position: absolute;
|
|
142
|
+
left: 0;
|
|
143
|
+
right: 0;
|
|
144
|
+
top: 0;
|
|
145
|
+
bottom: 0;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
color: var(--n-placeholder-color);
|
|
148
|
+
`,[S(`span`,`
|
|
149
|
+
width: 100%;
|
|
150
|
+
display: inline-block;
|
|
151
|
+
`)]),_(`textarea`,[z(`placeholder`,`overflow: visible;`)]),R(`autosize`,`width: 100%;`),_(`autosize`,[z(`textarea-el, input-el`,`
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 0;
|
|
154
|
+
left: 0;
|
|
155
|
+
height: 100%;
|
|
156
|
+
`)]),m(`input-wrapper`,`
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
flex-grow: 1;
|
|
160
|
+
position: relative;
|
|
161
|
+
padding-left: var(--n-padding-left);
|
|
162
|
+
padding-right: var(--n-padding-right);
|
|
163
|
+
`),z(`input-mirror`,`
|
|
164
|
+
padding: 0;
|
|
165
|
+
height: var(--n-height);
|
|
166
|
+
line-height: var(--n-height);
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
visibility: hidden;
|
|
169
|
+
position: static;
|
|
170
|
+
white-space: pre;
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
`),z(`input-el`,`
|
|
173
|
+
padding: 0;
|
|
174
|
+
height: var(--n-height);
|
|
175
|
+
line-height: var(--n-height);
|
|
176
|
+
`,[S(`&[type=password]::-ms-reveal`,`display: none;`),S(`+`,[z(`placeholder`,`
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
`)])]),R(`textarea`,[z(`placeholder`,`white-space: nowrap;`)]),z(`eye`,`
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
transition: color .3s var(--n-bezier);
|
|
184
|
+
`),_(`textarea`,`width: 100%;`,[m(`input-word-count`,`
|
|
185
|
+
position: absolute;
|
|
186
|
+
right: var(--n-padding-right);
|
|
187
|
+
bottom: var(--n-padding-vertical);
|
|
188
|
+
`),_(`resizable`,[m(`input-wrapper`,`
|
|
189
|
+
resize: vertical;
|
|
190
|
+
min-height: var(--n-height);
|
|
191
|
+
`)]),z(`textarea-el, textarea-mirror, placeholder`,`
|
|
192
|
+
height: 100%;
|
|
193
|
+
padding-left: 0;
|
|
194
|
+
padding-right: 0;
|
|
195
|
+
padding-top: var(--n-padding-vertical);
|
|
196
|
+
padding-bottom: var(--n-padding-vertical);
|
|
197
|
+
word-break: break-word;
|
|
198
|
+
display: inline-block;
|
|
199
|
+
vertical-align: bottom;
|
|
200
|
+
box-sizing: border-box;
|
|
201
|
+
line-height: var(--n-line-height-textarea);
|
|
202
|
+
margin: 0;
|
|
203
|
+
resize: none;
|
|
204
|
+
white-space: pre-wrap;
|
|
205
|
+
scroll-padding-block-end: var(--n-padding-vertical);
|
|
206
|
+
`),z(`textarea-mirror`,`
|
|
207
|
+
width: 100%;
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
visibility: hidden;
|
|
211
|
+
position: static;
|
|
212
|
+
white-space: pre-wrap;
|
|
213
|
+
overflow-wrap: break-word;
|
|
214
|
+
`)]),_(`pair`,[z(`input-el, placeholder`,`text-align: center;`),z(`separator`,`
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
transition: color .3s var(--n-bezier);
|
|
218
|
+
color: var(--n-text-color);
|
|
219
|
+
white-space: nowrap;
|
|
220
|
+
`,[m(`icon`,`
|
|
221
|
+
color: var(--n-icon-color);
|
|
222
|
+
`),m(`base-icon`,`
|
|
223
|
+
color: var(--n-icon-color);
|
|
224
|
+
`)])]),_(`disabled`,`
|
|
225
|
+
cursor: not-allowed;
|
|
226
|
+
background-color: var(--n-color-disabled);
|
|
227
|
+
`,[z(`border`,`border: var(--n-border-disabled);`),z(`input-el, textarea-el`,`
|
|
228
|
+
cursor: not-allowed;
|
|
229
|
+
color: var(--n-text-color-disabled);
|
|
230
|
+
text-decoration-color: var(--n-text-color-disabled);
|
|
231
|
+
`),z(`placeholder`,`color: var(--n-placeholder-color-disabled);`),z(`separator`,`color: var(--n-text-color-disabled);`,[m(`icon`,`
|
|
232
|
+
color: var(--n-icon-color-disabled);
|
|
233
|
+
`),m(`base-icon`,`
|
|
234
|
+
color: var(--n-icon-color-disabled);
|
|
235
|
+
`)]),m(`input-word-count`,`
|
|
236
|
+
color: var(--n-count-text-color-disabled);
|
|
237
|
+
`),z(`suffix, prefix`,`color: var(--n-text-color-disabled);`,[m(`icon`,`
|
|
238
|
+
color: var(--n-icon-color-disabled);
|
|
239
|
+
`),m(`internal-icon`,`
|
|
240
|
+
color: var(--n-icon-color-disabled);
|
|
241
|
+
`)])]),R(`disabled`,[z(`eye`,`
|
|
242
|
+
color: var(--n-icon-color);
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
`,[S(`&:hover`,`
|
|
245
|
+
color: var(--n-icon-color-hover);
|
|
246
|
+
`),S(`&:active`,`
|
|
247
|
+
color: var(--n-icon-color-pressed);
|
|
248
|
+
`)]),S(`&:hover`,[z(`state-border`,`border: var(--n-border-hover);`)]),_(`focus`,`background-color: var(--n-color-focus);`,[z(`state-border`,`
|
|
249
|
+
border: var(--n-border-focus);
|
|
250
|
+
box-shadow: var(--n-box-shadow-focus);
|
|
251
|
+
`)])]),z(`border, state-border`,`
|
|
252
|
+
box-sizing: border-box;
|
|
253
|
+
position: absolute;
|
|
254
|
+
left: 0;
|
|
255
|
+
right: 0;
|
|
256
|
+
top: 0;
|
|
257
|
+
bottom: 0;
|
|
258
|
+
pointer-events: none;
|
|
259
|
+
border-radius: inherit;
|
|
260
|
+
border: var(--n-border);
|
|
261
|
+
transition:
|
|
262
|
+
box-shadow .3s var(--n-bezier),
|
|
263
|
+
border-color .3s var(--n-bezier);
|
|
264
|
+
`),z(`state-border`,`
|
|
265
|
+
border-color: #0000;
|
|
266
|
+
z-index: 1;
|
|
267
|
+
`),z(`prefix`,`margin-right: 4px;`),z(`suffix`,`
|
|
268
|
+
margin-left: 4px;
|
|
269
|
+
`),z(`suffix, prefix`,`
|
|
270
|
+
transition: color .3s var(--n-bezier);
|
|
271
|
+
flex-wrap: nowrap;
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
line-height: var(--n-height);
|
|
274
|
+
white-space: nowrap;
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
justify-content: center;
|
|
278
|
+
color: var(--n-suffix-text-color);
|
|
279
|
+
`,[m(`base-loading`,`
|
|
280
|
+
font-size: var(--n-icon-size);
|
|
281
|
+
margin: 0 2px;
|
|
282
|
+
color: var(--n-loading-color);
|
|
283
|
+
`),m(`base-clear`,`
|
|
284
|
+
font-size: var(--n-icon-size);
|
|
285
|
+
`,[z(`placeholder`,[m(`base-icon`,`
|
|
286
|
+
transition: color .3s var(--n-bezier);
|
|
287
|
+
color: var(--n-icon-color);
|
|
288
|
+
font-size: var(--n-icon-size);
|
|
289
|
+
`)])]),S(`>`,[m(`icon`,`
|
|
290
|
+
transition: color .3s var(--n-bezier);
|
|
291
|
+
color: var(--n-icon-color);
|
|
292
|
+
font-size: var(--n-icon-size);
|
|
293
|
+
`)]),m(`base-icon`,`
|
|
294
|
+
font-size: var(--n-icon-size);
|
|
295
|
+
`)]),m(`input-word-count`,`
|
|
296
|
+
pointer-events: none;
|
|
297
|
+
line-height: 1.5;
|
|
298
|
+
font-size: .85em;
|
|
299
|
+
color: var(--n-count-text-color);
|
|
300
|
+
transition: color .3s var(--n-bezier);
|
|
301
|
+
margin-left: 4px;
|
|
302
|
+
font-variant: tabular-nums;
|
|
303
|
+
`),[`warning`,`error`].map(e=>_(`${e}-status`,[R(`disabled`,[m(`base-loading`,`
|
|
304
|
+
color: var(--n-loading-color-${e})
|
|
305
|
+
`),z(`input-el, textarea-el`,`
|
|
306
|
+
caret-color: var(--n-caret-color-${e});
|
|
307
|
+
`),z(`state-border`,`
|
|
308
|
+
border: var(--n-border-${e});
|
|
309
|
+
`),S(`&:hover`,[z(`state-border`,`
|
|
310
|
+
border: var(--n-border-hover-${e});
|
|
311
|
+
`)]),S(`&:focus`,`
|
|
312
|
+
background-color: var(--n-color-focus-${e});
|
|
313
|
+
`,[z(`state-border`,`
|
|
314
|
+
box-shadow: var(--n-box-shadow-focus-${e});
|
|
315
|
+
border: var(--n-border-focus-${e});
|
|
316
|
+
`)]),_(`focus`,`
|
|
317
|
+
background-color: var(--n-color-focus-${e});
|
|
318
|
+
`,[z(`state-border`,`
|
|
319
|
+
box-shadow: var(--n-box-shadow-focus-${e});
|
|
320
|
+
border: var(--n-border-focus-${e});
|
|
321
|
+
`)])])]))]),Gt=m(`input`,[_(`disabled`,[z(`input-el, textarea-el`,`
|
|
322
|
+
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
323
|
+
`)])]);function Kt(e){let t=0;for(let n of e)t++;return t}function qt(e){return e===``||e==null}function Jt(e){let t=D(null);function n(){let{value:n}=e;if(!n?.focus){i();return}let{selectionStart:r,selectionEnd:a,value:o}=n;if(r==null||a==null){i();return}t.value={start:r,end:a,beforeText:o.slice(0,r),afterText:o.slice(a)}}function r(){var n;let{value:r}=t,{value:i}=e;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(n=i.setSelectionRange)==null||n.call(i,l,l)}function i(){t.value=null}return p(e,i),{recordCursor:n,restoreCursor:r}}var Yt=r({name:`InputWordCount`,setup(t,{slots:n}){let{mergedValueRef:r,maxlengthRef:i,mergedClsPrefixRef:a,countGraphemesRef:s}=o(Ut),c=e(()=>{let{value:e}=r;return e===null||Array.isArray(e)?0:(s.value||Kt)(e)});return()=>{let{value:e}=i,{value:t}=r;return l(`span`,{class:`${a.value}-input-word-count`},N(n.default,{value:t===null||Array.isArray(t)?``:t},()=>[e===void 0?c.value:`${c.value} / ${e}`]))}}}),Xt=r({name:`Input`,props:Object.assign(Object.assign({},ie.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(t){let{mergedClsPrefixRef:n,mergedBorderedRef:r,inlineThemeDisabled:a,mergedRtlRef:o,mergedComponentPropsRef:l}=d(t),f=ie(`Input`,`-input`,Wt,Ht,t,n);ue&&se(`-input-safari`,Gt,n);let m=D(null),h=D(null),g=D(null),_=D(null),v=D(null),y=D(null),b=D(null),x=Jt(b),S=D(null),{localeRef:C}=Et(`Input`),w=D(t.defaultValue),T=de(i(t,`value`),w),E=ce(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:l?.value?.Input?.size||`medium`}}),{mergedSizeRef:O,mergedDisabledRef:A,mergedStatusRef:ee}=E,j=D(!1),M=D(!1),N=D(!1),P=D(!1),F=null,I=e(()=>{let{placeholder:e,pair:n}=t;return n?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[C.value.placeholder]:[e]}),L=e(()=>{let{value:e}=N,{value:t}=T,{value:n}=I;return!e&&(qt(t)||Array.isArray(t)&&qt(t[0]))&&n[0]}),R=e(()=>{let{value:e}=N,{value:t}=T,{value:n}=I;return!e&&n[1]&&(qt(t)||Array.isArray(t)&&qt(t[1]))}),z=le(()=>t.internalForceFocus||j.value),fe=le(()=>{if(A.value||t.readonly||!t.clearable||!z.value&&!M.value)return!1;let{value:e}=T,{value:n}=z;return t.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(M.value||n):!!e&&(M.value||n)}),V=e(()=>{let{showPasswordOn:e}=t;if(e)return e;if(t.showPasswordToggle)return`click`}),H=D(!1),pe=e(()=>{let{textDecoration:e}=t;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),me=D(void 0),he=()=>{if(t.type===`textarea`){let{autosize:e}=t;if(e&&(me.value=S.value?.$el?.offsetWidth),!h.value||typeof e==`boolean`)return;let{paddingTop:n,paddingBottom:r,lineHeight:i}=window.getComputedStyle(h.value),a=Number(n.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=g;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},ge=e(()=>{let{maxlength:e}=t;return e===void 0?void 0:Number(e)});te(()=>{let{value:e}=T;Array.isArray(e)||Ye(e)});let _e=u().proxy;function G(e,n){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=t,{nTriggerFormInput:o}=E;r&&B(r,e,n),i&&B(i,e,n),a&&B(a,e,n),w.value=e,o()}function ve(e,n){let{onChange:r}=t,{nTriggerFormChange:i}=E;r&&B(r,e,n),w.value=e,i()}function ye(e){let{onBlur:n}=t,{nTriggerFormBlur:r}=E;n&&B(n,e),r()}function be(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=E;n&&B(n,e),r()}function K(e){let{onClear:n}=t;n&&B(n,e)}function xe(e){let{onInputBlur:n}=t;n&&B(n,e)}function Se(e){let{onInputFocus:n}=t;n&&B(n,e)}function Ce(){let{onDeactivate:e}=t;e&&B(e)}function we(){let{onActivate:e}=t;e&&B(e)}function Te(e){let{onClick:n}=t;n&&B(n,e)}function q(e){let{onWrapperFocus:n}=t;n&&B(n,e)}function Ee(e){let{onWrapperBlur:n}=t;n&&B(n,e)}function De(){N.value=!0}function Oe(e){N.value=!1,e.target===y.value?J(e,1):J(e,0)}function J(e,n=0,r=`input`){let i=e.target.value;if(Ye(i),e instanceof InputEvent&&!e.isComposing&&(N.value=!1),t.type===`textarea`){let{value:e}=S;e&&e.syncUnifiedContainer()}if(F=i,N.value)return;x.recordCursor();let a=ke(i);if(a)if(!t.pair)r===`input`?G(i,{source:n}):ve(i,{source:n});else{let{value:e}=T;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[n]=i,r===`input`?G(e,{source:n}):ve(e,{source:n})}_e.$forceUpdate(),a||re(x.restoreCursor)}function ke(e){let{countGraphemes:n,maxlength:r,minlength:i}=t;if(n){let t;if(r!==void 0&&(t===void 0&&(t=n(e)),t>Number(r))||i!==void 0&&(t===void 0&&(t=n(e)),t<Number(r)))return!1}let{allowInput:a}=t;return typeof a==`function`?a(e):!0}function Ae(e){xe(e),e.relatedTarget===m.value&&Ce(),e.relatedTarget!==null&&(e.relatedTarget===v.value||e.relatedTarget===y.value||e.relatedTarget===h.value)||(P.value=!1),Z(e,`blur`),b.value=null}function Y(e,t){Se(e),j.value=!0,P.value=!0,we(),Z(e,`focus`),t===0?b.value=v.value:t===1?b.value=y.value:t===2&&(b.value=h.value)}function X(e){t.passivelyActivated&&(Ee(e),Z(e,`blur`))}function je(e){t.passivelyActivated&&(j.value=!0,q(e),Z(e,`focus`))}function Z(e,t){e.relatedTarget!==null&&(e.relatedTarget===v.value||e.relatedTarget===y.value||e.relatedTarget===h.value||e.relatedTarget===m.value)||(t===`focus`?(be(e),j.value=!0):t===`blur`&&(ye(e),j.value=!1))}function Me(e,t){J(e,t,`change`)}function Q(e){Te(e)}function $(e){K(e),Ne()}function Ne(){t.pair?(G([``,``],{source:`clear`}),ve([``,``],{source:`clear`})):(G(``,{source:`clear`}),ve(``,{source:`clear`}))}function Pe(e){let{onMousedown:n}=t;n&&n(e);let{tagName:r}=e.target;if(r!==`INPUT`&&r!==`TEXTAREA`){if(t.resizable){let{value:t}=m;if(t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect();if(n+i-14<e.clientX&&e.clientX<n+i&&r+a-14<e.clientY&&e.clientY<r+a)return}}e.preventDefault(),j.value||Ue()}}function Fe(){var e;M.value=!0,t.type===`textarea`&&((e=S.value)==null||e.handleMouseEnterWrapper())}function Ie(){var e;M.value=!1,t.type===`textarea`&&((e=S.value)==null||e.handleMouseLeaveWrapper())}function Le(){A.value||V.value===`click`&&(H.value=!H.value)}function Re(e){if(A.value)return;e.preventDefault();let t=e=>{e.preventDefault(),W(`mouseup`,document,t)};if(U(`mouseup`,document,t),V.value!==`mousedown`)return;H.value=!0;let n=()=>{H.value=!1,W(`mouseup`,document,n)};U(`mouseup`,document,n)}function ze(e){t.onKeyup&&B(t.onKeyup,e)}function Be(e){switch(t.onKeydown&&B(t.onKeydown,e),e.key){case`Escape`:He();break;case`Enter`:Ve(e);break}}function Ve(e){var n,r;if(t.passivelyActivated){let{value:i}=P;if(i){t.internalDeactivateOnEnter&&He();return}e.preventDefault(),t.type===`textarea`?(n=h.value)==null||n.focus():(r=v.value)==null||r.focus()}}function He(){t.passivelyActivated&&(P.value=!1,re(()=>{var e;(e=m.value)==null||e.focus()}))}function Ue(){var e,n,r;A.value||(t.passivelyActivated?(e=m.value)==null||e.focus():((n=h.value)==null||n.focus(),(r=v.value)==null||r.focus()))}function We(){m.value?.contains(document.activeElement)&&document.activeElement.blur()}function Ge(){var e,t;(e=h.value)==null||e.select(),(t=v.value)==null||t.select()}function Ke(){A.value||(h.value?h.value.focus():v.value&&v.value.focus())}function qe(){let{value:e}=m;e?.contains(document.activeElement)&&e!==document.activeElement&&He()}function Je(e){if(t.type===`textarea`){let{value:t}=h;t?.scrollTo(e)}else{let{value:t}=v;t?.scrollTo(e)}}function Ye(e){let{type:n,pair:r,autosize:i}=t;if(!r&&i)if(n===`textarea`){let{value:t}=g;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=_;t&&(e?t.textContent=e:t.innerHTML=` `)}}function Xe(){he()}let Ze=D({top:`0`});function Qe(e){var t;let{scrollTop:n}=e.target;Ze.value.top=`${-n}px`,(t=S.value)==null||t.syncUnifiedContainer()}let $e=null;ae(()=>{let{autosize:e,type:n}=t;e&&n===`textarea`?$e=p(T,e=>{!Array.isArray(e)&&e!==F&&Ye(e)}):$e?.()});let et=null;ae(()=>{t.type===`textarea`?et=p(T,e=>{var t;!Array.isArray(e)&&e!==F&&((t=S.value)==null||t.syncUnifiedContainer())}):et?.()}),k(Ut,{mergedValueRef:T,maxlengthRef:ge,mergedClsPrefixRef:n,countGraphemesRef:i(t,`countGraphemes`)});let tt={wrapperElRef:m,inputElRef:v,textareaElRef:h,isCompositing:N,clear:Ne,focus:Ue,blur:We,select:Ge,deactivate:qe,activate:Ke,scrollTo:Je},nt=oe(`Input`,o,n),rt=e(()=>{let{value:e}=O,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:c,textDecorationColor:l,border:u,borderDisabled:d,borderHover:p,borderFocus:m,placeholderColor:h,placeholderColorDisabled:g,lineHeightTextarea:_,colorDisabled:v,colorFocus:y,textColorDisabled:b,boxShadowFocus:x,iconSize:S,colorFocusWarning:C,boxShadowFocusWarning:w,borderWarning:T,borderFocusWarning:E,borderHoverWarning:D,colorFocusError:k,boxShadowFocusError:A,borderError:ee,borderFocusError:j,borderHoverError:M,clearSize:N,clearColor:te,clearColorHover:P,clearColorPressed:F,iconColor:I,iconColorDisabled:re,suffixTextColor:L,countTextColor:ie,countTextColorDisabled:ae,iconColorHover:oe,iconColorPressed:R,loadingColor:se,loadingColorError:z,loadingColorWarning:ce,fontWeight:le,[s(`padding`,e)]:B,[s(`fontSize`,e)]:ue,[s(`height`,e)]:de}}=f.value,{left:fe,right:V}=ne(B);return{"--n-bezier":t,"--n-count-text-color":ie,"--n-count-text-color-disabled":ae,"--n-color":n,"--n-font-size":ue,"--n-font-weight":le,"--n-border-radius":r,"--n-height":de,"--n-padding-left":fe,"--n-padding-right":V,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":l,"--n-border":u,"--n-border-disabled":d,"--n-border-hover":p,"--n-border-focus":m,"--n-placeholder-color":h,"--n-placeholder-color-disabled":g,"--n-icon-size":S,"--n-line-height-textarea":_,"--n-color-disabled":v,"--n-color-focus":y,"--n-text-color-disabled":b,"--n-box-shadow-focus":x,"--n-loading-color":se,"--n-caret-color-warning":c,"--n-color-focus-warning":C,"--n-box-shadow-focus-warning":w,"--n-border-warning":T,"--n-border-focus-warning":E,"--n-border-hover-warning":D,"--n-loading-color-warning":ce,"--n-caret-color-error":o,"--n-color-focus-error":k,"--n-box-shadow-focus-error":A,"--n-border-error":ee,"--n-border-focus-error":j,"--n-border-hover-error":M,"--n-loading-color-error":z,"--n-clear-color":te,"--n-clear-size":N,"--n-clear-color-hover":P,"--n-clear-color-pressed":F,"--n-icon-color":I,"--n-icon-color-hover":oe,"--n-icon-color-pressed":R,"--n-icon-color-disabled":re,"--n-suffix-text-color":L}}),it=a?c(`input`,e(()=>{let{value:e}=O;return e[0]}),rt,t):void 0;return Object.assign(Object.assign({},tt),{wrapperElRef:m,inputElRef:v,inputMirrorElRef:_,inputEl2Ref:y,textareaElRef:h,textareaMirrorElRef:g,textareaScrollbarInstRef:S,rtlEnabled:nt,uncontrolledValue:w,mergedValue:T,passwordVisible:H,mergedPlaceholder:I,showPlaceholder1:L,showPlaceholder2:R,mergedFocus:z,isComposing:N,activated:P,showClearButton:fe,mergedSize:O,mergedDisabled:A,textDecorationStyle:pe,mergedClsPrefix:n,mergedBordered:r,mergedShowPasswordOn:V,placeholderStyle:Ze,mergedStatus:ee,textAreaScrollContainerWidth:me,handleTextAreaScroll:Qe,handleCompositionStart:De,handleCompositionEnd:Oe,handleInput:J,handleInputBlur:Ae,handleInputFocus:Y,handleWrapperBlur:X,handleWrapperFocus:je,handleMouseEnter:Fe,handleMouseLeave:Ie,handleMouseDown:Pe,handleChange:Me,handleClick:Q,handleClear:$,handlePasswordToggleClick:Le,handlePasswordToggleMousedown:Re,handleWrapperKeydown:Be,handleWrapperKeyup:ze,handleTextAreaMirrorResize:Xe,getTextareaScrollContainer:()=>h.value,mergedTheme:f,cssVars:a?void 0:rt,themeClass:it?.themeClass,onRender:it?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:r,type:i,countGraphemes:a,onRender:o}=this,s=this.$slots;return o?.(),l(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,r,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:i===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&i!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},l(`div`,{class:`${e}-input-wrapper`},F(s.prefix,t=>t&&l(`div`,{class:`${e}-input__prefix`},t)),i===`textarea`?l(Lt,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,r={width:this.autosize&&t&&`${t}px`};return l(n,null,l(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,r],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?l(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,r],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?l(lt,{onResize:this.handleTextAreaMirrorResize},{default:()=>l(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):l(`div`,{class:`${e}-input__input`},l(`input`,Object.assign({type:i===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:i},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?l(`div`,{class:`${e}-input__placeholder`},l(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?l(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&F(s.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?l(`div`,{class:`${e}-input__suffix`},[F(s[`clear-icon-placeholder`],t=>(this.clearable||t)&&l(Mt,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:l(zt,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?l(Yt,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?l(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?L(s[`password-visible-icon`],()=>[l(x,{clsPrefix:e},{default:()=>l(kt,null)})]):L(s[`password-invisible-icon`],()=>[l(x,{clsPrefix:e},{default:()=>l(At,null)})])):null]):null)),this.pair?l(`span`,{class:`${e}-input__separator`},L(s.separator,()=>[this.separator])):null,this.pair?l(`div`,{class:`${e}-input-wrapper`},l(`div`,{class:`${e}-input__input`},l(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?l(`div`,{class:`${e}-input__placeholder`},l(`span`,null,this.mergedPlaceholder[1])):null),F(s.suffix,t=>(this.clearable||t)&&l(`div`,{class:`${e}-input__suffix`},[this.clearable&&l(Mt,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>s[`clear-icon`]?.call(s),placeholder:()=>s[`clear-icon-placeholder`]?.call(s)}),t]))):null,this.mergedBordered?l(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?l(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&i===`textarea`?l(Yt,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null)}}),Zt=I(`n-message-api`),Qt=I(`n-message-provider`);function $t(){let e=o(Zt,null);return e===null&&E(`use-message`,"No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}export{fe as _,Ht as a,Rt as c,dt as d,lt as f,U as g,W as h,Xt as i,Ft as l,ye as m,Zt as n,zt as o,ct as p,Qt as r,Lt as s,$t as t,Et as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./use-message-BT2Y6PCe.js";function t(){let t=e();return{success(e){return t.success(e,{duration:3e3})},warning(e){return t.warning(e,{duration:3e3})},error(e){return t.error(e,{duration:5e3})},raw:t}}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{at as e,ot as t,w as n}from"./index-DtdpSL_8.js";async function r(e){let{current:t,currentRunning:n}=e;return!t||!n?`started`:t.kind===`generation`?`rejected-running-generation`:await e.confirm(i(t))?`started`:`cancelled`}function i(e){return`当前有正在运行的任务(${e.skillTitle?`「${e.skillTitle}」`:`该 Skill`}),切换后其进度将不再在工作台显示。任务仍会继续运行,可在该 Skill 的开发页查看。是否继续?`}function a(e){return`正在生成 ${e},请等待完成或先停止生成。`}function o(e){return e===`skill`?`SKILL.md`:`test.spec.ts`}function s(){let r=e(),i=t(),a=n(),o=r.subject;return o?o.kind===`generation`?a.isRunning:i.isRunning(o.skillId):!1}function c(){let t=e(),r=n();t.subject?.kind===`generation`&&r.reset()}function l(){return o(n().stages.find(e=>![`completed`,`failed`,`conflict`,`cancelled`].includes(e.status))?.kind??`skill`)}function u(e){return Promise.resolve(window.confirm(e))}export{r as a,s as i,c as n,a as o,u as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bt as e,kn as t}from"./_plugin-vue_export-helper-B_1YmakK.js";import{U as n}from"./Space-Db724DU3.js";import{Tt as r,et as i}from"./index-DtdpSL_8.js";var a=n(`workbench`,()=>{let n=t([]),r=t(!1),a=t(!1),c=t(null),l=t(``),u=null,d=e(()=>c.value!==null),f=e(()=>r.value&&!d.value);async function p(){u?.abort();let e=new AbortController;u=e,r.value=!0,l.value=``;try{let t=await i(e.signal);if(e.signal.aborted)return;n.value=t.data,c.value=new Date().toISOString()}catch(t){if(e.signal.aborted||o(t))return;l.value=s(t)}finally{u===e&&(u=null,r.value=!1,a.value=!0)}}function m(){let e=u;u=null,e?.abort(),n.value=[],r.value=!1,a.value=!1,c.value=null,l.value=``}function h(){l.value=``}return{skillList:n,refreshingSkills:r,skillsInitialized:a,lastSuccessfulRefreshAt:c,errorMessage:l,initialLoading:f,hasSuccessfulSkillLoad:d,refreshSkills:p,invalidateSkills:m,clearError:h}});function o(e){return e instanceof r&&e.kind===`aborted`}function s(e){return(e instanceof r||e instanceof Error)&&e.message||`获取 Skill 列表失败,请稍后重试。`}export{a as t};
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Authine E2E Agent Platform</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DtdpSL_8.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-B_1YmakK.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/Button-B9KdpLiQ.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/Tag-CfVAG5oG.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/use-message-BT2Y6PCe.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/get-slot-CuPt92KB.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/Space-Db724DU3.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/monaco-editor-d6BaUM92.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-markdown-c63JX4UP.js">
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/assets/monaco-editor-Br_kD0ds.css">
|
|
18
|
+
<link rel="stylesheet" crossorigin href="/assets/index-NDn3xcTv.css">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="app"></div>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charlie_deng/e2e-assistant-web",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"exports": {
|
|
10
|
+
"./package.json": "./package.json",
|
|
11
|
+
"./dist/*": "./dist/*"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"dompurify": "^3.4.12",
|
|
18
|
+
"highlight.js": "^11.11.1",
|
|
19
|
+
"markdown-it": "^14.3.0",
|
|
20
|
+
"monaco-editor": "^0.55.1",
|
|
21
|
+
"naive-ui": "^2.44.1",
|
|
22
|
+
"pinia": "^2.1.7",
|
|
23
|
+
"vue": "^3.5.34",
|
|
24
|
+
"vue-router": "^4.5.1",
|
|
25
|
+
"@charlie_deng/e2e-assistant-types": "^0.1.3"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
29
|
+
"@types/markdown-it": "^14.1.2",
|
|
30
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
31
|
+
"@vue/test-utils": "^2.4.11",
|
|
32
|
+
"happy-dom": "^20.10.6",
|
|
33
|
+
"tailwindcss": "^4.3.0",
|
|
34
|
+
"typescript": "^6.0.0",
|
|
35
|
+
"vite": "^8.0.0",
|
|
36
|
+
"vitest": "^4.1.10",
|
|
37
|
+
"vue-tsc": "^2.0.6"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=22.19.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"dev": "vite",
|
|
44
|
+
"build": "vue-tsc && vite build",
|
|
45
|
+
"typecheck": "vue-tsc --noEmit",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:unit": "vitest run",
|
|
48
|
+
"preview": "vite preview"
|
|
49
|
+
}
|
|
6
50
|
}
|
package/README.md
DELETED