hermes-web-ui 0.2.2 → 0.2.3
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/README.md +30 -6
- package/bin/hermes-web-ui.mjs +34 -4
- package/dist/assets/Button-CQLKwjHl.js +109 -0
- package/dist/assets/ChannelsView-Bdv3P2Rv.js +1 -0
- package/dist/assets/ChatView-BGSDL0hI.js +142 -0
- package/dist/assets/{ChatView-BVHQ6KhU.css → ChatView-CGsFaSiv.css} +1 -1
- package/dist/assets/Close-inn9RP7R.js +45 -0
- package/dist/assets/FormItem-BvJieJmq.js +110 -0
- package/dist/assets/Input-edKmVCeM.js +234 -0
- package/dist/assets/InputNumber-BpYEJnKY.js +13 -0
- package/dist/assets/JobsView-Dx4HmGC6.js +2 -0
- package/dist/assets/LoginView-BHThbj0n.css +1 -0
- package/dist/assets/LoginView-CIQSZ6bh.js +1 -0
- package/dist/assets/LogsView-nn7t6RGX.js +1 -0
- package/dist/assets/{MarkdownRenderer-C2pkccH2.js → MarkdownRenderer-Yw5JS7CE.js} +9 -9
- package/dist/assets/MemoryView-CE9P7mef.js +5 -0
- package/dist/assets/Modal-CDRYujZp.js +232 -0
- package/dist/assets/ModelsView-B72PAvvd.js +1 -0
- package/dist/assets/Popover-CRhyj79I.js +117 -0
- package/dist/assets/Select-CXQmv_5e.js +340 -0
- package/dist/assets/SettingRow-B3O4TYKh.js +1 -0
- package/dist/assets/SettingsView-BF2Uh-Eo.js +352 -0
- package/dist/assets/SkillsView-Abm6Dt2r.css +1 -0
- package/dist/assets/SkillsView-CeUPV9g8.js +1 -0
- package/dist/assets/Spin-COypV4Iq.js +43 -0
- package/dist/assets/Suffix-Bs0SC_yA.js +101 -0
- package/dist/assets/Switch-BcUqwhfi.js +102 -0
- package/dist/assets/Tag-CVO-_zgr.js +71 -0
- package/dist/assets/Tooltip-BljrRE17.js +1 -0
- package/dist/assets/UsageView-CFH6hwxE.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DJRCopG_.js +3 -0
- package/dist/assets/app-BcCNNvPk.js +1 -0
- package/dist/assets/app-CMJknO_z.js +1 -0
- package/dist/assets/browser-BuJOvks2.js +47 -0
- package/dist/assets/chat-DIeO-6BT.js +6 -0
- package/dist/assets/context-C8Jv60vX.js +1 -0
- package/dist/assets/index-BZ3NfTDJ.css +1 -0
- package/dist/assets/index-Bj9YOu02.js +306 -0
- package/dist/assets/jobs-CnB9OiiZ.js +1 -0
- package/dist/assets/logo-CiQBpLPw.js +1 -0
- package/dist/assets/pinia-YU9i-6Bb.js +1 -0
- package/dist/assets/router--r9mOZY5.js +4 -0
- package/dist/assets/{sessions-DYkP_X2v.js → sessions-COjIc6fz.js} +1 -1
- package/dist/assets/{skills-C6QBmS9j.js → skills-C4yD0aCK.js} +1 -1
- package/dist/assets/use-message-D8bO1GLN.js +1 -0
- package/dist/index.html +18 -18
- package/dist/server/index.js +104 -61
- package/dist/server/routes/filesystem.js +38 -0
- package/dist/server/services/auth.d.ts +9 -0
- package/dist/server/services/auth.js +65 -0
- package/dist/server/services/hermes-cli.js +13 -1
- package/package.json +2 -2
- package/dist/assets/Button-CpNld4Mc.js +0 -109
- package/dist/assets/ChannelsView-BGXB46ZU.js +0 -1
- package/dist/assets/ChatView-CaO-j1NR.js +0 -142
- package/dist/assets/Close-BAvirVyH.js +0 -45
- package/dist/assets/FormItem-DUC1YCrh.js +0 -110
- package/dist/assets/Input-CCmp4iGM.js +0 -234
- package/dist/assets/InputNumber-DpIdrMEW.js +0 -13
- package/dist/assets/JobsView-t5o1pB0r.js +0 -2
- package/dist/assets/LogsView-QqOV3ZEf.js +0 -1
- package/dist/assets/MemoryView-oeAn8ZfB.js +0 -5
- package/dist/assets/Modal-BljFqAJF.js +0 -232
- package/dist/assets/ModelsView-DvK44HBy.js +0 -1
- package/dist/assets/Popover-BQMR8Xxo.js +0 -117
- package/dist/assets/Select-D33SMWcz.js +0 -340
- package/dist/assets/SettingRow-BxCsRfGG.js +0 -102
- package/dist/assets/SettingsView-CK9ArFcg.js +0 -352
- package/dist/assets/SkillsView-BvNhRbMq.css +0 -1
- package/dist/assets/SkillsView-_z2SQ9kJ.js +0 -1
- package/dist/assets/Spin-CwbBDHwW.js +0 -43
- package/dist/assets/Suffix-CKUJBJSi.js +0 -101
- package/dist/assets/Tag-87KswiOb.js +0 -71
- package/dist/assets/Tooltip-CuLVJgy8.js +0 -1
- package/dist/assets/UsageView-COiUupLe.js +0 -1
- package/dist/assets/_plugin-vue_export-helper-C7dadZ10.js +0 -49
- package/dist/assets/app-DX-WvBe8.js +0 -1
- package/dist/assets/app-DwI_Lyfm.js +0 -1
- package/dist/assets/chat-De2jGIM6.js +0 -6
- package/dist/assets/client-D-w1KhaU.js +0 -1
- package/dist/assets/context-vjXbZCu8.js +0 -1
- package/dist/assets/index-D3MGnlpF.js +0 -307
- package/dist/assets/index-DCNlSGk-.css +0 -1
- package/dist/assets/jobs-B2WdYQNb.js +0 -1
- package/dist/assets/pinia-B4dETPKk.js +0 -1
- package/dist/assets/preload-helper-D4M6sveU.js +0 -1
- package/dist/assets/use-message-BeTKmVAO.js +0 -1
- package/dist/assets/vue.runtime.esm-bundler-BoqZ7fRe.js +0 -3
- /package/dist/{assets/logo-BAarh-tH.png → logo.png} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import{A as e,B as t,H as n,I as r,M as i,P as a,R as o,S as s,V as c,X as l,Y as u,j as d,q as f,st as p,u as m,ut as h,v as g}from"./router--r9mOZY5.js";import{B as _,F as v,M as y,N as b,P as x,V as S,W as C,a as w,at as T,c as E,ct as D,d as ee,l as O,lt as k,n as A,o as te,ot as j,r as M,u as ne,z as re}from"./browser-BuJOvks2.js";function ie(e){return e.composedPath()[0]||null}function ae(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function oe(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function N(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function P(e){return e.composedPath()[0]}var F={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function se(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(P(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(P(n))},i=r=>{e&&(t.contains(P(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 I(e,t,n){let r=F[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=se(e,t,n)),a}function ce(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=I(e,t,n);return Object.keys(i).forEach(e=>{L(e,document,i[e],r)}),!0}return!1}function le(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=I(e,t,n);return Object.keys(i).forEach(e=>{R(e,document,i[e],r)}),!0}return!1}function ue(){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=P(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,ce(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(le(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:L,off:R}=ue();function de(e,t){return u(e,e=>{e!==void 0&&(t.value=e)}),s(()=>e.value===void 0?t.value:e.value)}var fe=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function pe(){return fe}function me(e){let t={isDeactivated:!1},n=!1;return o(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),c(()=>{t.isDeactivated=!0,n||=!0}),t}function he(e,t){console.error(`[vueuc/${e}]: ${t}`)}var z=[],ge=function(){return z.some(function(e){return e.activeTargets.length>0})},_e=function(){return z.some(function(e){return e.skippedTargets.length>0})},B=`ResizeObserver loop completed with undelivered notifications.`,ve=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:B}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=B),window.dispatchEvent(e)},V;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(V||={});var H=function(e){return Object.freeze(e)},ye=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,H(this)}return e}(),be=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,H(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}(),xe=function(e){return e instanceof SVGElement&&`getBBox`in e},U=function(e){if(xe(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)},Se=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},Ce=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},W=typeof window<`u`?window:{},G=new WeakMap,we=/auto|scroll/,Te=/^tb|vertical/,Ee=/msie|trident/i.test(W.navigator&&W.navigator.userAgent),K=function(e){return parseFloat(e||`0`)},q=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ye((n?t:e)||0,(n?e:t)||0)},De=H({devicePixelContentBoxSize:q(),borderBoxSize:q(),contentBoxSize:q(),contentRect:new be(0,0,0,0)}),J=function(e,t){if(t===void 0&&(t=!1),G.has(e)&&!t)return G.get(e);if(U(e))return G.set(e,De),De;var n=getComputedStyle(e),r=xe(e)&&e.ownerSVGElement&&e.getBBox(),i=!Ee&&n.boxSizing===`border-box`,a=Te.test(n.writingMode||``),o=!r&&we.test(n.overflowY||``),s=!r&&we.test(n.overflowX||``),c=r?0:K(n.paddingTop),l=r?0:K(n.paddingRight),u=r?0:K(n.paddingBottom),d=r?0:K(n.paddingLeft),f=r?0:K(n.borderTopWidth),p=r?0:K(n.borderRightWidth),m=r?0:K(n.borderBottomWidth),h=r?0:K(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:K(n.width)-S-x,T=r?r.height:K(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,ee=H({devicePixelContentBoxSize:q(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:q(E,D,a),contentBoxSize:q(w,T,a),contentRect:new be(d,c,w,T)});return G.set(e,ee),ee},Y=function(e,t,n){var r=J(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case V.DEVICE_PIXEL_CONTENT_BOX:return o;case V.BORDER_BOX:return i;default:return a}},Oe=function(){function e(e){var t=J(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=H([t.borderBoxSize]),this.contentBoxSize=H([t.contentBoxSize]),this.devicePixelContentBoxSize=H([t.devicePixelContentBoxSize])}return e}(),ke=function(e){if(U(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ae=function(){var e=1/0,t=[];z.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new Oe(t.target),i=ke(t.target);r.push(n),t.lastReportedSize=Y(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},je=function(e){z.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(ke(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Me=function(){var e=0;for(je(e);ge();)e=Ae(),je(e);return _e()&&ve(),e>0},X,Z=[],Ne=function(){return Z.splice(0).forEach(function(e){return e()})},Pe=function(e){if(!X){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Ne()}).observe(n,{characterData:!0}),X=function(){n.textContent=`${t?t--:t++}`}}Z.push(e),X()},Fe=function(e){Pe(function(){requestAnimationFrame(e)})},Ie=0,Le=function(){return!!Ie},Re=250,ze={attributes:!0,characterData:!0,childList:!0,subtree:!0},Be=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Ve=function(e){return e===void 0&&(e=0),Date.now()+e},He=!1,Ue=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=Re),!He){He=!0;var n=Ve(e);Fe(function(){var r=!1;try{r=Me()}finally{if(He=!1,e=n-Ve(),!Le())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,ze)};document.body?t():W.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Be.forEach(function(t){return W.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Be.forEach(function(t){return W.removeEventListener(t,e.listener,!0)}),!0)},e}()),We=function(e){!Ie&&e>0&&Ue.start(),Ie+=e,!Ie&&Ue.stop()},Ge=function(e){return!xe(e)&&!Ce(e)&&getComputedStyle(e).display===`inline`},Ke=function(){function e(e,t){this.target=e,this.observedBox=t||V.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Y(this.target,this.observedBox,!0);return Ge(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),qe=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Je=new WeakMap,Ye=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Xe=function(){function e(){}return e.connect=function(e,t){var n=new qe(e,t);Je.set(e,n)},e.observe=function(e,t,n){var r=Je.get(e),i=r.observationTargets.length===0;Ye(r.observationTargets,t)<0&&(i&&z.push(r),r.observationTargets.push(new Ke(t,n&&n.box)),We(1),Ue.schedule())},e.unobserve=function(e,t){var n=Je.get(e),r=Ye(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&z.splice(z.indexOf(n),1),n.observationTargets.splice(r,1),We(-1))},e.disconnect=function(e){var t=this,n=Je.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Ze=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.`);Xe.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(!Se(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Xe.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(!Se(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Xe.unobserve(this,e)},e.prototype.disconnect=function(){Xe.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Qe=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||Ze)(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))}},$e=e({name:`ResizeObserver`,props:{onResize:Function},setup(e){let r=!1,i=d().proxy;function a(t){let{onResize:n}=e;n!==void 0&&n(t)}n(()=>{let e=i.$el;if(e===void 0){he(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){he(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Qe.registerHandler(e.nextElementSibling,a),r=!0)}),t(()=>{r&&Qe.unregisterHandler(i.$el.nextElementSibling)})},render(){return f(this.$slots,`default`)}});function et(e){let{left:t,right:n,top:r,bottom:i}=N(e);return`${r} ${t} ${i} ${n}`}var tt=e({render(){var e;return(e=this.$slots).default?.call(e)}}),nt={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 rt(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Q(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 $(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)?at(s,e=>e.test(o)):it(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 it(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function at(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ot(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 st={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`}},ct=(e,t,n)=>{let r,i=st[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},lt={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ut=(e,t,n,r)=>lt[e],dt={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:Q({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Q({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:Q({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:Q({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:Q({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`})},ft={ordinalNumber:ot({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$({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:$({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:$({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:$({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:$({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`})},pt={name:`en-US`,locale:{code:`en-US`,formatDistance:ct,formatLong:{date:rt({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:rt({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:rt({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:ut,localize:dt,match:ft,options:{weekStartsOn:0,firstWeekContainsDate:1}}},mt=`[object Symbol]`;function ht(e){return typeof e==`symbol`||b(e)&&x(e)==mt}function gt(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var _t=1/0,vt=v?v.prototype:void 0,yt=vt?vt.toString:void 0;function bt(e){if(typeof e==`string`)return e;if(y(e))return gt(e,bt)+``;if(ht(e))return yt?yt.call(e):``;var t=e+``;return t==`0`&&1/e==-_t?`-0`:t}function xt(e){return e==null?``:bt(e)}function St(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Ct(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:St(e,t,n)}var wt=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function Tt(e){return wt.test(e)}function Et(e){return e.split(``)}var Dt=`\\ud800-\\udfff`,Ot=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,kt=`\\ufe0e\\ufe0f`,At=`[`+Dt+`]`,jt=`[`+Ot+`]`,Mt=`\\ud83c[\\udffb-\\udfff]`,Nt=`(?:`+jt+`|`+Mt+`)`,Pt=`[^`+Dt+`]`,Ft=`(?:\\ud83c[\\udde6-\\uddff]){2}`,It=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Lt=`\\u200d`,Rt=Nt+`?`,zt=`[`+kt+`]?`,Bt=`(?:`+Lt+`(?:`+[Pt,Ft,It].join(`|`)+`)`+zt+Rt+`)*`,Vt=zt+Rt+Bt,Ht=`(?:`+[Pt+jt+`?`,jt,Ft,It,At].join(`|`)+`)`,Ut=RegExp(Mt+`(?=`+Mt+`)|`+Ht+Vt,`g`);function Wt(e){return e.match(Ut)||[]}function Gt(e){return Tt(e)?Wt(e):Et(e)}function Kt(e){return function(t){t=xt(t);var n=Tt(t)?Gt(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ct(n,1).join(``):t.slice(1);return r[e]()+i}}var qt=Kt(`toUpperCase`);function Jt(e){let{mergedLocaleRef:t,mergedDateLocaleRef:n}=a(S,null)||{},r=s(()=>t?.value?.[e]??nt[e]);return{dateLocaleRef:s(()=>n?.value??pt),localeRef:r}}var Yt=j(`base-icon`,`
|
|
2
|
+
height: 1em;
|
|
3
|
+
width: 1em;
|
|
4
|
+
line-height: 1em;
|
|
5
|
+
text-align: center;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
position: relative;
|
|
8
|
+
fill: currentColor;
|
|
9
|
+
`,[T(`svg`,`
|
|
10
|
+
height: 1em;
|
|
11
|
+
width: 1em;
|
|
12
|
+
`)]),Xt=e({name:`BaseIcon`,props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){O(`-base-icon`,Yt,h(e,`clsPrefix`))},render(){return i(`i`,{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}});function Zt(t,n){let r=e({render(){return n()}});return e({name:qt(t),setup(){let e=a(S,null)?.mergedIconsRef;return()=>{let n=e?.value?.[t];return n?n():i(r,null)}}})}var Qt=e({name:`ChevronDown`,render(){return i(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i(`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`}))}}),$t=Zt(`clear`,()=>i(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},i(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},i(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},i(`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`}))))),en=j(`base-clear`,`
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
height: 1em;
|
|
15
|
+
width: 1em;
|
|
16
|
+
position: relative;
|
|
17
|
+
`,[T(`>`,[D(`clear`,`
|
|
18
|
+
font-size: var(--n-clear-size);
|
|
19
|
+
height: 1em;
|
|
20
|
+
width: 1em;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
color: var(--n-clear-color);
|
|
23
|
+
transition: color .3s var(--n-bezier);
|
|
24
|
+
display: flex;
|
|
25
|
+
`,[T(`&:hover`,`
|
|
26
|
+
color: var(--n-clear-color-hover)!important;
|
|
27
|
+
`),T(`&:active`,`
|
|
28
|
+
color: var(--n-clear-color-pressed)!important;
|
|
29
|
+
`)]),D(`placeholder`,`
|
|
30
|
+
display: flex;
|
|
31
|
+
`),D(`clear, placeholder`,`
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 50%;
|
|
34
|
+
top: 50%;
|
|
35
|
+
transform: translateX(-50%) translateY(-50%);
|
|
36
|
+
`,[w({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),tn=e({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return O(`-base-clear`,en,h(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return i(`div`,{class:`${e}-base-clear`},i(te,null,{default:()=>{var t;return this.show?i(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},C(this.$slots.icon,()=>[i(Xt,{clsPrefix:e},{default:()=>i($t,null)})])):i(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),{cubicBezierEaseInOut:nn}=ne;function rn({name:e=`fade-in`,enterDuration:t=`0.2s`,leaveDuration:n=`0.2s`,enterCubicBezier:r=nn,leaveCubicBezier:i=nn}={}){return[T(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),T(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),T(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),T(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}var an={railInsetHorizontalBottom:`auto 2px 4px 2px`,railInsetHorizontalTop:`4px 2px auto 2px`,railInsetVerticalRight:`2px 4px 2px auto`,railInsetVerticalLeft:`2px auto 2px 4px`,railColor:`transparent`};function on(e){let{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},an),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}var sn={name:`Scrollbar`,common:A,self:on},cn=j(`scrollbar`,`
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
position: relative;
|
|
39
|
+
z-index: auto;
|
|
40
|
+
height: 100%;
|
|
41
|
+
width: 100%;
|
|
42
|
+
`,[T(`>`,[j(`scrollbar-container`,`
|
|
43
|
+
width: 100%;
|
|
44
|
+
overflow: scroll;
|
|
45
|
+
height: 100%;
|
|
46
|
+
min-height: inherit;
|
|
47
|
+
max-height: inherit;
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
`,[T(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
50
|
+
width: 0;
|
|
51
|
+
height: 0;
|
|
52
|
+
display: none;
|
|
53
|
+
`),T(`>`,[j(`scrollbar-content`,`
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
min-width: 100%;
|
|
56
|
+
`)])])]),T(`>, +`,[j(`scrollbar-rail`,`
|
|
57
|
+
position: absolute;
|
|
58
|
+
pointer-events: none;
|
|
59
|
+
user-select: none;
|
|
60
|
+
background: var(--n-scrollbar-rail-color);
|
|
61
|
+
-webkit-user-select: none;
|
|
62
|
+
`,[k(`horizontal`,`
|
|
63
|
+
height: var(--n-scrollbar-height);
|
|
64
|
+
`,[T(`>`,[D(`scrollbar`,`
|
|
65
|
+
height: var(--n-scrollbar-height);
|
|
66
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
67
|
+
right: 0;
|
|
68
|
+
`)])]),k(`horizontal--top`,`
|
|
69
|
+
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
70
|
+
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
71
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
72
|
+
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
73
|
+
`),k(`horizontal--bottom`,`
|
|
74
|
+
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
75
|
+
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
76
|
+
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
77
|
+
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
78
|
+
`),k(`vertical`,`
|
|
79
|
+
width: var(--n-scrollbar-width);
|
|
80
|
+
`,[T(`>`,[D(`scrollbar`,`
|
|
81
|
+
width: var(--n-scrollbar-width);
|
|
82
|
+
border-radius: var(--n-scrollbar-border-radius);
|
|
83
|
+
bottom: 0;
|
|
84
|
+
`)])]),k(`vertical--left`,`
|
|
85
|
+
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
86
|
+
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
87
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
88
|
+
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
89
|
+
`),k(`vertical--right`,`
|
|
90
|
+
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
91
|
+
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
92
|
+
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
93
|
+
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
94
|
+
`),k(`disabled`,[T(`>`,[D(`scrollbar`,`pointer-events: none;`)])]),T(`>`,[D(`scrollbar`,`
|
|
95
|
+
z-index: 1;
|
|
96
|
+
position: absolute;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
pointer-events: all;
|
|
99
|
+
background-color: var(--n-scrollbar-color);
|
|
100
|
+
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
101
|
+
`,[rn(),T(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),ln=e({name:`Scrollbar`,props:Object.assign(Object.assign({},E.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(e){let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a}=_(e),o=ee(`Scrollbar`,a,r),c=p(null),u=p(null),d=p(null),f=p(null),m=p(null),h=p(null),g=p(null),v=p(null),y=p(null),b=p(null),x=p(null),S=p(0),C=p(0),w=p(!1),T=p(!1),D=!1,O=!1,k,A,te=0,j=0,M=0,ne=0,oe=pe(),P=E(`Scrollbar`,`-scrollbar`,cn,sn,e,r),F=s(()=>{let{value:e}=v,{value:t}=h,{value:n}=b;return e===null||t===null||n===null?0:Math.min(e,n*e/t+ae(P.value.self.width)*1.5)}),se=s(()=>`${F.value}px`),I=s(()=>{let{value:e}=y,{value:t}=g,{value:n}=x;return e===null||t===null||n===null?0:n*e/t+ae(P.value.self.height)*1.5}),ce=s(()=>`${I.value}px`),le=s(()=>{let{value:e}=v,{value:t}=S,{value:n}=h,{value:r}=b;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-F.value):0}}),ue=s(()=>`${le.value}px`),de=s(()=>{let{value:e}=y,{value:t}=C,{value:n}=g,{value:r}=x;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-I.value):0}}),fe=s(()=>`${de.value}px`),he=s(()=>{let{value:e}=v,{value:t}=h;return e!==null&&t!==null&&t>e}),z=s(()=>{let{value:e}=y,{value:t}=g;return e!==null&&t!==null&&t>e}),ge=s(()=>{let{trigger:t}=e;return t===`none`||w.value}),_e=s(()=>{let{trigger:t}=e;return t===`none`||T.value}),B=s(()=>{let{container:t}=e;return t?t():u.value}),ve=s(()=>{let{content:t}=e;return t?t():d.value}),V=(t,n)=>{if(!e.scrollable)return;if(typeof t==`number`){U(t,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=t;(r!==void 0||i!==void 0)&&U(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?U(0,a*o,o,u,c):s===`bottom`?U(0,2**53-1,0,!1,c):s===`top`&&U(0,0,0,!1,c):U(0,l.offsetTop,l.offsetHeight,u,c)},H=me(()=>{e.container||V({top:S.value,left:C.value})}),ye=()=>{H.isDeactivated||Y()},be=t=>{if(H.isDeactivated)return;let{onResize:n}=e;n&&n(t),Y()},xe=(t,n)=>{if(!e.scrollable)return;let{value:r}=B;r&&(typeof t==`object`?r.scrollBy(t):r.scrollBy(t,n||0))};function U(e,t,n,r,i){let{value:a}=B;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 Se(){Te(),Ee(),Y()}function Ce(){W()}function W(){G(),we()}function G(){A!==void 0&&window.clearTimeout(A),A=window.setTimeout(()=>{T.value=!1},e.duration)}function we(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{w.value=!1},e.duration)}function Te(){k!==void 0&&window.clearTimeout(k),w.value=!0}function Ee(){A!==void 0&&window.clearTimeout(A),T.value=!0}function K(t){let{onScroll:n}=e;n&&n(t),q()}function q(){let{value:e}=B;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(o?.value?-1:1))}function De(){let{value:e}=ve;e&&(h.value=e.offsetHeight,g.value=e.offsetWidth);let{value:t}=B;t&&(v.value=t.offsetHeight,y.value=t.offsetWidth);let{value:n}=m,{value:r}=f;n&&(x.value=n.offsetWidth),r&&(b.value=r.offsetHeight)}function J(){let{value:e}=B;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(o?.value?-1:1),v.value=e.offsetHeight,y.value=e.offsetWidth,h.value=e.scrollHeight,g.value=e.scrollWidth);let{value:t}=m,{value:n}=f;t&&(x.value=t.offsetWidth),n&&(b.value=n.offsetHeight)}function Y(){e.scrollable&&(e.useUnifiedContainer?J():(De(),q()))}function Oe(e){return!c.value?.contains(ie(e))}function ke(e){e.preventDefault(),e.stopPropagation(),O=!0,L(`mousemove`,window,Ae,!0),L(`mouseup`,window,je,!0),j=C.value,M=o?.value?window.innerWidth-e.clientX:e.clientX}function Ae(t){if(!O)return;k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A);let{value:n}=y,{value:r}=g,{value:i}=I;if(n===null||r===null)return;let a=(o?.value?window.innerWidth-t.clientX-M:t.clientX-M)*(r-n)/(n-i),s=r-n,c=j+a;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=B;if(l){l.scrollLeft=c*(o?.value?-1:1);let{internalOnUpdateScrollLeft:t}=e;t&&t(c)}}function je(e){e.preventDefault(),e.stopPropagation(),R(`mousemove`,window,Ae,!0),R(`mouseup`,window,je,!0),O=!1,Y(),Oe(e)&&W()}function Me(e){e.preventDefault(),e.stopPropagation(),D=!0,L(`mousemove`,window,X,!0),L(`mouseup`,window,Z,!0),te=S.value,ne=e.clientY}function X(e){if(!D)return;k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A);let{value:t}=v,{value:n}=h,{value:r}=F;if(t===null||n===null)return;let i=(e.clientY-ne)*(n-t)/(t-r),a=n-t,o=te+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=B;s&&(s.scrollTop=o)}function Z(e){e.preventDefault(),e.stopPropagation(),R(`mousemove`,window,X,!0),R(`mouseup`,window,Z,!0),D=!1,Y(),Oe(e)&&W()}l(()=>{let{value:e}=z,{value:t}=he,{value:n}=r,{value:i}=m,{value:a}=f;i&&(e?i.classList.remove(`${n}-scrollbar-rail--disabled`):i.classList.add(`${n}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${n}-scrollbar-rail--disabled`):a.classList.add(`${n}-scrollbar-rail--disabled`))}),n(()=>{e.container||Y()}),t(()=>{k!==void 0&&window.clearTimeout(k),A!==void 0&&window.clearTimeout(A),R(`mousemove`,window,X,!0),R(`mouseup`,window,Z,!0)});let Ne=s(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:a,railInsetHorizontalTop:s,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=P.value,{top:f,right:p,bottom:m,left:h}=N(s),{top:g,right:_,bottom:v,left:y}=N(c),{top:b,right:x,bottom:S,left:C}=N(o?.value?et(l):l),{top:w,right:T,bottom:E,left:D}=N(o?.value?et(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":a,"--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}}),Pe=i?re(`scrollbar`,void 0,Ne,e):void 0;return Object.assign(Object.assign({},{scrollTo:V,scrollBy:xe,sync:Y,syncUnifiedContainer:J,handleMouseEnterWrapper:Se,handleMouseLeaveWrapper:Ce}),{mergedClsPrefix:r,rtlEnabled:o,containerScrollTop:S,wrapperRef:c,containerRef:u,contentRef:d,yRailRef:f,xRailRef:m,needYBar:he,needXBar:z,yBarSizePx:se,xBarSizePx:ce,yBarTopPx:ue,xBarLeftPx:fe,isShowXBar:ge,isShowYBar:_e,isIos:oe,handleScroll:K,handleContentResize:ye,handleContainerResize:be,handleYScrollMouseDown:Me,handleXScrollMouseDown:ke,containerWidth:y,cssVars:i?void 0:Ne,themeClass:Pe?.themeClass,onRender:Pe?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:a,internalHoistYRail:o,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>i(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},i(u?tt:m,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var s;return(s=this.onRender)==null||s.call(this),i(`div`,r(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,a&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):i(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":oe(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},i($e,{onResize:this.handleContentResize},{default:()=>i(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),o?null:d(void 0,void 0),l&&i(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},i(u?tt:m,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?i(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:a?this.xBarLeftPx:void 0,left:a?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},p=this.container?f():i($e,{onResize:this.handleContainerResize},{default:f});return o?i(g,null,p,d(this.themeClass,this.cssVars)):p}}),un=ln,dn=e({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 i(M,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?i(tn,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>i(Xt,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>C(t.default,()=>[i(Qt,null)])})}):null})}}});export{ie as S,R as _,rn as a,N as b,Xt as c,gt as d,ht as f,de as g,Qe as h,sn as i,Jt as l,$e as m,ln as n,tn as o,tt as p,un as r,Zt as s,dn as t,xt as u,L as v,oe as x,ae as y};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import{A as e,M as t,S as n,st as r,ut as i}from"./router--r9mOZY5.js";import{B as a,K as o,R as s,U as c,a as l,at as u,c as d,ct as f,dt as p,lt as m,n as h,o as g,ot as _,q as v,r as y,tt as b,ut as x,z as S}from"./browser-BuJOvks2.js";import{g as C,x as w,y as T}from"./Suffix-Bs0SC_yA.js";var E={buttonHeightSmall:`14px`,buttonHeightMedium:`18px`,buttonHeightLarge:`22px`,buttonWidthSmall:`14px`,buttonWidthMedium:`18px`,buttonWidthLarge:`22px`,buttonWidthPressedSmall:`20px`,buttonWidthPressedMedium:`24px`,buttonWidthPressedLarge:`28px`,railHeightSmall:`18px`,railHeightMedium:`22px`,railHeightLarge:`26px`,railWidthSmall:`32px`,railWidthMedium:`40px`,railWidthLarge:`48px`};function D(e){let{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},E),{iconColor:i,textColor:`white`,loadingColor:t,opacityDisabled:n,railColor:`rgba(0, 0, 0, .14)`,railColorActive:t,buttonBoxShadow:`0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${b(t,{alpha:.2})}`})}var O={name:`Switch`,common:h,self:D},k=_(`switch`,`
|
|
2
|
+
height: var(--n-height);
|
|
3
|
+
min-width: var(--n-width);
|
|
4
|
+
vertical-align: middle;
|
|
5
|
+
user-select: none;
|
|
6
|
+
-webkit-user-select: none;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
outline: none;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
`,[f(`children-placeholder`,`
|
|
12
|
+
height: var(--n-rail-height);
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
visibility: hidden;
|
|
18
|
+
`),f(`rail-placeholder`,`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-wrap: none;
|
|
21
|
+
`),f(`button-placeholder`,`
|
|
22
|
+
width: calc(1.75 * var(--n-rail-height));
|
|
23
|
+
height: var(--n-rail-height);
|
|
24
|
+
`),_(`base-loading`,`
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
left: 50%;
|
|
28
|
+
transform: translateX(-50%) translateY(-50%);
|
|
29
|
+
font-size: calc(var(--n-button-width) - 4px);
|
|
30
|
+
color: var(--n-loading-color);
|
|
31
|
+
transition: color .3s var(--n-bezier);
|
|
32
|
+
`,[l({left:`50%`,top:`50%`,originalTransform:`translateX(-50%) translateY(-50%)`})]),f(`checked, unchecked`,`
|
|
33
|
+
transition: color .3s var(--n-bezier);
|
|
34
|
+
color: var(--n-text-color);
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
position: absolute;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
line-height: 1;
|
|
43
|
+
`),f(`checked`,`
|
|
44
|
+
right: 0;
|
|
45
|
+
padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
46
|
+
`),f(`unchecked`,`
|
|
47
|
+
left: 0;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
|
|
50
|
+
`),u(`&:focus`,[f(`rail`,`
|
|
51
|
+
box-shadow: var(--n-box-shadow-focus);
|
|
52
|
+
`)]),m(`round`,[f(`rail`,`border-radius: calc(var(--n-rail-height) / 2);`,[f(`button`,`border-radius: calc(var(--n-button-height) / 2);`)])]),x(`disabled`,[x(`icon`,[m(`rubber-band`,[m(`pressed`,[f(`rail`,[f(`button`,`max-width: var(--n-button-width-pressed);`)])]),f(`rail`,[u(`&:active`,[f(`button`,`max-width: var(--n-button-width-pressed);`)])]),m(`active`,[m(`pressed`,[f(`rail`,[f(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])]),f(`rail`,[u(`&:active`,[f(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])])])])])]),m(`active`,[f(`rail`,[f(`button`,`left: calc(100% - var(--n-button-width) - var(--n-offset))`)])]),f(`rail`,`
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
height: var(--n-rail-height);
|
|
55
|
+
min-width: var(--n-rail-width);
|
|
56
|
+
border-radius: var(--n-rail-border-radius);
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
position: relative;
|
|
59
|
+
transition:
|
|
60
|
+
opacity .3s var(--n-bezier),
|
|
61
|
+
background .3s var(--n-bezier),
|
|
62
|
+
box-shadow .3s var(--n-bezier);
|
|
63
|
+
background-color: var(--n-rail-color);
|
|
64
|
+
`,[f(`button-icon`,`
|
|
65
|
+
color: var(--n-icon-color);
|
|
66
|
+
transition: color .3s var(--n-bezier);
|
|
67
|
+
font-size: calc(var(--n-button-height) - 4px);
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
top: 0;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
line-height: 1;
|
|
77
|
+
`,[l()]),f(`button`,`
|
|
78
|
+
align-items: center;
|
|
79
|
+
top: var(--n-offset);
|
|
80
|
+
left: var(--n-offset);
|
|
81
|
+
height: var(--n-button-height);
|
|
82
|
+
width: var(--n-button-width-pressed);
|
|
83
|
+
max-width: var(--n-button-width);
|
|
84
|
+
border-radius: var(--n-button-border-radius);
|
|
85
|
+
background-color: var(--n-button-color);
|
|
86
|
+
box-shadow: var(--n-button-box-shadow);
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
cursor: inherit;
|
|
89
|
+
content: "";
|
|
90
|
+
position: absolute;
|
|
91
|
+
transition:
|
|
92
|
+
background-color .3s var(--n-bezier),
|
|
93
|
+
left .3s var(--n-bezier),
|
|
94
|
+
opacity .3s var(--n-bezier),
|
|
95
|
+
max-width .3s var(--n-bezier),
|
|
96
|
+
box-shadow .3s var(--n-bezier);
|
|
97
|
+
`)]),m(`active`,[f(`rail`,`background-color: var(--n-rail-color-active);`)]),m(`loading`,[f(`rail`,`
|
|
98
|
+
cursor: wait;
|
|
99
|
+
`)]),m(`disabled`,[f(`rail`,`
|
|
100
|
+
cursor: not-allowed;
|
|
101
|
+
opacity: .5;
|
|
102
|
+
`)])]),A=Object.assign(Object.assign({},d.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),j,M=e({name:`Switch`,props:A,slots:Object,setup(e){j===void 0&&(j=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:t,inlineThemeDisabled:o,mergedComponentPropsRef:c}=a(e),l=d(`Switch`,`-switch`,k,O,e,t),u=s(e,{mergedSize(t){return e.size===void 0?t?t.mergedSize.value:c?.value?.Switch?.size||`medium`:e.size}}),{mergedSizeRef:f,mergedDisabledRef:m}=u,h=r(e.defaultValue),g=C(i(e,`value`),h),_=n(()=>g.value===e.checkedValue),y=r(!1),b=r(!1),x=n(()=>{let{railStyle:t}=e;if(t)return t({focused:b.value,checked:_.value})});function E(t){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=e,{nTriggerFormInput:a,nTriggerFormChange:o}=u;n&&v(n,t),i&&v(i,t),r&&v(r,t),h.value=t,a(),o()}function D(){let{nTriggerFormFocus:e}=u;e()}function A(){let{nTriggerFormBlur:e}=u;e()}function M(){e.loading||m.value||(g.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue))}function N(){b.value=!0,D()}function P(){b.value=!1,A(),y.value=!1}function F(t){e.loading||m.value||t.key===` `&&(g.value===e.checkedValue?E(e.uncheckedValue):E(e.checkedValue),y.value=!1)}function I(t){e.loading||m.value||t.key===` `&&(t.preventDefault(),y.value=!0)}let L=n(()=>{let{value:e}=f,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:a,boxShadowFocus:o,loadingColor:s,textColor:c,iconColor:u,[p(`buttonHeight`,e)]:d,[p(`buttonWidth`,e)]:m,[p(`buttonWidthPressed`,e)]:h,[p(`railHeight`,e)]:g,[p(`railWidth`,e)]:_,[p(`railBorderRadius`,e)]:v,[p(`buttonBorderRadius`,e)]:y},common:{cubicBezierEaseInOut:b}}=l.value,x,S,C;return j?(x=`calc((${g} - ${d}) / 2)`,S=`max(${g}, ${d})`,C=`max(${_}, calc(${_} + ${d} - ${g}))`):(x=w((T(g)-T(d))/2),S=w(Math.max(T(g),T(d))),C=T(g)>T(d)?_:w(T(_)+T(d)-T(g))),{"--n-bezier":b,"--n-button-border-radius":y,"--n-button-box-shadow":i,"--n-button-color":a,"--n-button-width":m,"--n-button-width-pressed":h,"--n-button-height":d,"--n-height":S,"--n-offset":x,"--n-opacity-disabled":t,"--n-rail-border-radius":v,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":g,"--n-rail-width":_,"--n-width":C,"--n-box-shadow-focus":o,"--n-loading-color":s,"--n-text-color":c,"--n-icon-color":u}}),R=o?S(`switch`,n(()=>f.value[0]),L,e):void 0;return{handleClick:M,handleBlur:P,handleFocus:N,handleKeyup:F,handleKeydown:I,mergedRailStyle:x,pressed:y,mergedClsPrefix:t,mergedValue:g,checked:_,mergedDisabled:m,cssVars:o?void 0:L,themeClass:R?.themeClass,onRender:R?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:n,checked:r,mergedRailStyle:i,onRender:a,$slots:s}=this;a?.();let{checked:l,unchecked:u,icon:d,"checked-icon":f,"unchecked-icon":p}=s,m=!(c(d)&&c(f)&&c(p));return t(`div`,{role:`switch`,"aria-checked":r,class:[`${e}-switch`,this.themeClass,m&&`${e}-switch--icon`,r&&`${e}-switch--active`,n&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},t(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:i},o(l,n=>o(u,r=>n||r?t(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),n),t(`div`,{class:`${e}-switch__rail-placeholder`},t(`div`,{class:`${e}-switch__button-placeholder`}),r)):null)),t(`div`,{class:`${e}-switch__button`},o(d,n=>o(f,r=>o(p,i=>t(g,null,{default:()=>this.loading?t(y,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(r||n)?t(`div`,{class:`${e}-switch__button-icon`,key:r?`checked-icon`:`icon`},r||n):!this.checked&&(i||n)?t(`div`,{class:`${e}-switch__button-icon`,key:i?`unchecked-icon`:`icon`},i||n):null})))),o(l,n=>n&&t(`div`,{key:`checked`,class:`${e}-switch__checked`},n)),o(u,n=>n&&t(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},n)))))}});export{M as t};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import{A as e,G as t,M as n,S as r,st as i,ut as a}from"./router--r9mOZY5.js";import{B as o,K as s,Q as c,at as l,c as u,ct as d,d as f,dt as p,lt as m,n as h,ot as g,q as _,tt as v,ut as y,z as b}from"./browser-BuJOvks2.js";import{b as x}from"./Suffix-Bs0SC_yA.js";import{t as S}from"./Close-inn9RP7R.js";import{a as C}from"./Button-CQLKwjHl.js";var w={closeIconSizeTiny:`12px`,closeIconSizeSmall:`12px`,closeIconSizeMedium:`14px`,closeIconSizeLarge:`14px`,closeSizeTiny:`16px`,closeSizeSmall:`16px`,closeSizeMedium:`18px`,closeSizeLarge:`18px`,padding:`0 7px`,closeMargin:`0 0 0 4px`};function T(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:o,warningColor:s,errorColor:c,baseColor:l,borderColor:u,opacityDisabled:d,tagColor:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderRadiusSmall:g,fontSizeMini:_,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:T,heightMedium:E,closeColorHover:D,closeColorPressed:O,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},w),{closeBorderRadius:g,heightTiny:S,heightSmall:C,heightMedium:T,heightLarge:E,borderRadius:g,opacityDisabled:d,fontSizeTiny:_,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:l,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:f,colorBordered:`rgb(250, 250, 252)`,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:D,closeColorPressed:O,borderPrimary:`1px solid ${v(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:v(i,{alpha:.12}),colorBorderedPrimary:v(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:v(i,{alpha:.12}),closeColorPressedPrimary:v(i,{alpha:.18}),borderInfo:`1px solid ${v(a,{alpha:.3})}`,textColorInfo:a,colorInfo:v(a,{alpha:.12}),colorBorderedInfo:v(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:v(a,{alpha:.12}),closeColorPressedInfo:v(a,{alpha:.18}),borderSuccess:`1px solid ${v(o,{alpha:.3})}`,textColorSuccess:o,colorSuccess:v(o,{alpha:.12}),colorBorderedSuccess:v(o,{alpha:.1}),closeIconColorSuccess:o,closeIconColorHoverSuccess:o,closeIconColorPressedSuccess:o,closeColorHoverSuccess:v(o,{alpha:.12}),closeColorPressedSuccess:v(o,{alpha:.18}),borderWarning:`1px solid ${v(s,{alpha:.35})}`,textColorWarning:s,colorWarning:v(s,{alpha:.15}),colorBorderedWarning:v(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:v(s,{alpha:.12}),closeColorPressedWarning:v(s,{alpha:.18}),borderError:`1px solid ${v(c,{alpha:.23})}`,textColorError:c,colorError:v(c,{alpha:.1}),colorBorderedError:v(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:v(c,{alpha:.12}),closeColorPressedError:v(c,{alpha:.18})})}var E={name:`Tag`,common:h,self:T},D={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},O=g(`tag`,`
|
|
2
|
+
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
3
|
+
white-space: nowrap;
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
cursor: default;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
flex-wrap: nowrap;
|
|
10
|
+
padding: var(--n-padding);
|
|
11
|
+
border-radius: var(--n-border-radius);
|
|
12
|
+
color: var(--n-text-color);
|
|
13
|
+
background-color: var(--n-color);
|
|
14
|
+
transition:
|
|
15
|
+
border-color .3s var(--n-bezier),
|
|
16
|
+
background-color .3s var(--n-bezier),
|
|
17
|
+
color .3s var(--n-bezier),
|
|
18
|
+
box-shadow .3s var(--n-bezier),
|
|
19
|
+
opacity .3s var(--n-bezier);
|
|
20
|
+
line-height: 1;
|
|
21
|
+
height: var(--n-height);
|
|
22
|
+
font-size: var(--n-font-size);
|
|
23
|
+
`,[m(`strong`,`
|
|
24
|
+
font-weight: var(--n-font-weight-strong);
|
|
25
|
+
`),d(`border`,`
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
position: absolute;
|
|
28
|
+
left: 0;
|
|
29
|
+
right: 0;
|
|
30
|
+
top: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
border-radius: inherit;
|
|
33
|
+
border: var(--n-border);
|
|
34
|
+
transition: border-color .3s var(--n-bezier);
|
|
35
|
+
`),d(`icon`,`
|
|
36
|
+
display: flex;
|
|
37
|
+
margin: 0 4px 0 0;
|
|
38
|
+
color: var(--n-text-color);
|
|
39
|
+
transition: color .3s var(--n-bezier);
|
|
40
|
+
font-size: var(--n-avatar-size-override);
|
|
41
|
+
`),d(`avatar`,`
|
|
42
|
+
display: flex;
|
|
43
|
+
margin: 0 6px 0 0;
|
|
44
|
+
`),d(`close`,`
|
|
45
|
+
margin: var(--n-close-margin);
|
|
46
|
+
transition:
|
|
47
|
+
background-color .3s var(--n-bezier),
|
|
48
|
+
color .3s var(--n-bezier);
|
|
49
|
+
`),m(`round`,`
|
|
50
|
+
padding: 0 calc(var(--n-height) / 3);
|
|
51
|
+
border-radius: calc(var(--n-height) / 2);
|
|
52
|
+
`,[d(`icon`,`
|
|
53
|
+
margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
|
|
54
|
+
`),d(`avatar`,`
|
|
55
|
+
margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
|
|
56
|
+
`),m(`closable`,`
|
|
57
|
+
padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
|
|
58
|
+
`)]),m(`icon, avatar`,[m(`round`,`
|
|
59
|
+
padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
|
|
60
|
+
`)]),m(`disabled`,`
|
|
61
|
+
cursor: not-allowed !important;
|
|
62
|
+
opacity: var(--n-opacity-disabled);
|
|
63
|
+
`),m(`checkable`,`
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
color: var(--n-text-color-checkable);
|
|
67
|
+
background-color: var(--n-color-checkable);
|
|
68
|
+
`,[y(`disabled`,[l(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[y(`checked`,`color: var(--n-text-color-hover-checkable);`)]),l(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[y(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),m(`checked`,`
|
|
69
|
+
color: var(--n-text-color-checked);
|
|
70
|
+
background-color: var(--n-color-checked);
|
|
71
|
+
`,[y(`disabled`,[l(`&:hover`,`background-color: var(--n-color-checked-hover);`),l(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),k=Object.assign(Object.assign(Object.assign({},u.props),D),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),A=c(`n-tag`),j=e({name:`Tag`,props:k,slots:Object,setup(e){let n=i(null),{mergedBorderedRef:s,mergedClsPrefixRef:c,inlineThemeDisabled:l,mergedRtlRef:d,mergedComponentPropsRef:m}=o(e),h=r(()=>e.size||m?.value?.Tag?.size||`medium`),g=u(`Tag`,`-tag`,O,E,e,c);t(A,{roundRef:a(e,`round`)});function v(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function y(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&_(n,t)}}let S={setTextContent(e){let{value:t}=n;t&&(t.textContent=e)}},w=f(`Tag`,d,c),T=r(()=>{let{type:t,color:{color:n,textColor:r}={}}=e,i=h.value,{common:{cubicBezierEaseInOut:a},self:{padding:o,closeMargin:c,borderRadius:l,opacityDisabled:u,textColorCheckable:d,textColorHoverCheckable:f,textColorPressedCheckable:m,textColorChecked:_,colorCheckable:v,colorHoverCheckable:y,colorPressedCheckable:b,colorChecked:S,colorCheckedHover:C,colorCheckedPressed:w,closeBorderRadius:T,fontWeightStrong:E,[p(`colorBordered`,t)]:D,[p(`closeSize`,i)]:O,[p(`closeIconSize`,i)]:k,[p(`fontSize`,i)]:A,[p(`height`,i)]:j,[p(`color`,t)]:M,[p(`textColor`,t)]:N,[p(`border`,t)]:P,[p(`closeIconColor`,t)]:F,[p(`closeIconColorHover`,t)]:I,[p(`closeIconColorPressed`,t)]:L,[p(`closeColorHover`,t)]:R,[p(`closeColorPressed`,t)]:z}}=g.value,B=x(c);return{"--n-font-weight-strong":E,"--n-avatar-size-override":`calc(${j} - 8px)`,"--n-bezier":a,"--n-border-radius":l,"--n-border":P,"--n-close-icon-size":k,"--n-close-color-pressed":z,"--n-close-color-hover":R,"--n-close-border-radius":T,"--n-close-icon-color":F,"--n-close-icon-color-hover":I,"--n-close-icon-color-pressed":L,"--n-close-icon-color-disabled":F,"--n-close-margin-top":B.top,"--n-close-margin-right":B.right,"--n-close-margin-bottom":B.bottom,"--n-close-margin-left":B.left,"--n-close-size":O,"--n-color":n||(s.value?D:M),"--n-color-checkable":v,"--n-color-checked":S,"--n-color-checked-hover":C,"--n-color-checked-pressed":w,"--n-color-hover-checkable":y,"--n-color-pressed-checkable":b,"--n-font-size":A,"--n-height":j,"--n-opacity-disabled":u,"--n-padding":o,"--n-text-color":r||N,"--n-text-color-checkable":d,"--n-text-color-checked":_,"--n-text-color-hover-checkable":f,"--n-text-color-pressed-checkable":m}}),D=l?b(`tag`,r(()=>{let t=``,{type:n,color:{color:r,textColor:i}={}}=e;return t+=n[0],t+=h.value[0],r&&(t+=`a${C(r)}`),i&&(t+=`b${C(i)}`),s.value&&(t+=`c`),t}),T,e):void 0;return Object.assign(Object.assign({},S),{rtlEnabled:w,mergedClsPrefix:c,contentRef:n,mergedBordered:s,handleClick:v,handleCloseClick:y,cssVars:l?void 0:T,themeClass:D?.themeClass,onRender:D?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:r,closable:i,color:{borderColor:a}={},round:o,onRender:c,$slots:l}=this;c?.();let u=s(l.avatar,e=>e&&n(`div`,{class:`${t}-tag__avatar`},e)),d=s(l.icon,e=>e&&n(`div`,{class:`${t}-tag__icon`},e));return n(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:r,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:o,[`${t}-tag--avatar`]:u,[`${t}-tag--icon`]:d,[`${t}-tag--closable`]:i}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},d||u,n(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&i?n(S,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:o,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?n(`div`,{class:`${t}-tag__border`,style:{borderColor:a}}):null)}});export{j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,M as t,S as n,st as r}from"./router--r9mOZY5.js";import{B as i,c as a,n as o,nt as s,s as c}from"./browser-BuJOvks2.js";import{i as l,n as u,t as d}from"./Popover-CRhyj79I.js";var f={padding:`8px 14px`};function p(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},f),{borderRadius:t,boxShadow:n,color:s(r,`rgba(0, 0, 0, .85)`),textColor:r})}var m=c({name:`Tooltip`,common:o,peers:{Popover:l},self:p}),h=e({name:`Tooltip`,props:Object.assign(Object.assign({},u),a.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=i(e),o=a(`Tooltip`,`-tooltip`,void 0,m,e,t),s=r(null);return Object.assign(Object.assign({},{syncPosition(){s.value.syncPosition()},setShow(e){s.value.setShow(e)}}),{popoverRef:s,mergedTheme:o,popoverThemeOverrides:n(()=>o.value.self)})},render(){let{mergedTheme:e,internalExtraClass:n}=this;return t(d,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:n.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}});export{h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,E as n,H as r,K as i,O as a,S as o,T as s,W as c,Z as l,ft as u,ht as d,k as f,mt as p,st as m,v as h}from"./router--r9mOZY5.js";import{n as g}from"./pinia-YU9i-6Bb.js";import{r as _,t as v}from"./_plugin-vue_export-helper-DJRCopG_.js";import{t as ee}from"./Button-CQLKwjHl.js";import{r as y}from"./sessions-COjIc6fz.js";var b=g(`usage`,()=>{let e=m([]),t=m(!1);async function n(){t.value=!0;try{e.value=await y()}catch(e){console.error(`Failed to load sessions for usage:`,e)}finally{t.value=!1}}let r=o(()=>e.value.reduce((e,t)=>e+(t.input_tokens||0),0)),i=o(()=>e.value.reduce((e,t)=>e+(t.output_tokens||0),0)),a=o(()=>r.value+i.value),s=o(()=>e.value.length),c=o(()=>e.value.reduce((e,t)=>e+(t.cache_read_tokens||0),0));return{sessions:e,isLoading:t,loadSessions:n,totalInputTokens:r,totalOutputTokens:i,totalTokens:a,totalSessions:s,totalCacheTokens:c,cacheHitRate:o(()=>{let e=r.value;return e===0?null:c.value/e*100}),estimatedCost:o(()=>e.value.reduce((e,t)=>e+(t.actual_cost_usd??t.estimated_cost_usd??0),0)),modelUsage:o(()=>{let t=new Map;for(let n of e.value){let e=n.model||`unknown`;t.has(e)||t.set(e,{model:e,inputTokens:0,outputTokens:0,cacheTokens:0,totalTokens:0,sessions:0});let r=t.get(e);r.inputTokens+=n.input_tokens||0,r.outputTokens+=n.output_tokens||0,r.cacheTokens+=n.cache_read_tokens||0,r.totalTokens+=(n.input_tokens||0)+(n.output_tokens||0),r.sessions+=1}return[...t.values()].sort((e,t)=>t.totalTokens-e.totalTokens)}),dailyUsage:o(()=>{let t=new Map,n=new Date;for(let e=29;e>=0;e--){let r=new Date(n);r.setDate(r.getDate()-e);let i=r.toISOString().slice(0,10);t.set(i,{date:i,tokens:0,cache:0,sessions:0,cost:0})}for(let n of e.value){let e=new Date(n.started_at*1e3).toISOString().slice(0,10),r=t.get(e);if(r){r.tokens+=(n.input_tokens||0)+(n.output_tokens||0),r.cache+=n.cache_read_tokens||0,r.sessions+=1;let e=n.actual_cost_usd??n.estimated_cost_usd??0;r.cost+=e}}return[...t.values()]}),avgSessionsPerDay:o(()=>{let t=e.value.length>0?new Date(e.value[e.value.length-1].started_at*1e3):new Date,n=Math.max(1,Math.ceil((Date.now()-t.getTime())/(1e3*60*60*24)));return s.value/n})}}),x={class:`stat-cards`},S={class:`stat-card`},C={class:`stat-label`},w={class:`stat-value`},T={class:`stat-sub`},E={class:`stat-card`},D={class:`stat-label`},O={class:`stat-value`},k={class:`stat-sub`},A={class:`stat-card`},j={class:`stat-label`},M={class:`stat-value`},N={class:`stat-card`},P={class:`stat-label`},F={class:`stat-value`},I={key:0,class:`stat-sub`},L=v(e({__name:`StatCards`,setup(e){let{t:r}=_(),i=b();function a(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function o(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}return(e,l)=>(c(),n(`div`,x,[t(`div`,S,[t(`div`,C,d(u(r)(`usage.totalTokens`)),1),t(`div`,w,d(a(u(i).totalTokens)),1),t(`div`,T,d(a(u(i).totalInputTokens))+` `+d(u(r)(`usage.inputTokens`))+` / `+d(a(u(i).totalOutputTokens))+` `+d(u(r)(`usage.outputTokens`)),1)]),t(`div`,E,[t(`div`,D,d(u(r)(`usage.totalSessions`)),1),t(`div`,O,d(u(i).totalSessions),1),t(`div`,k,d(u(r)(`usage.avgPerDay`,{n:u(i).avgSessionsPerDay.toFixed(1)})),1)]),t(`div`,A,[t(`div`,j,d(u(r)(`usage.estimatedCost`)),1),t(`div`,M,d(o(u(i).estimatedCost)),1)]),t(`div`,N,[t(`div`,P,d(u(r)(`usage.cacheHitRate`)),1),t(`div`,F,d(u(i).cacheHitRate===null?`--`:u(i).cacheHitRate.toFixed(1)+`%`),1),u(i).cacheHitRate===null?s(``,!0):(c(),n(`div`,I,d(a(u(i).totalCacheTokens))+` tokens `,1))])]))}}),[[`__scopeId`,`data-v-5a2f1363`]]),R={class:`model-breakdown`},te={class:`section-title`},z={class:`model-list`},B={class:`model-name`},V={class:`model-bar-wrap`},H={class:`model-tokens`},U=v(e({__name:`ModelBreakdown`,setup(e){let{t:r}=_(),a=b();function o(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}return(e,s)=>(c(),n(`div`,R,[t(`h3`,te,d(u(r)(`usage.modelBreakdown`)),1),t(`div`,z,[(c(!0),n(h,null,i(u(a).modelUsage,e=>(c(),n(`div`,{key:e.model,class:`model-row`},[t(`span`,B,d(e.model),1),t(`div`,V,[t(`div`,{class:`model-bar`,style:p({width:e.totalTokens/u(a).modelUsage[0].totalTokens*100+`%`})},null,4)]),t(`span`,H,d(o(e.totalTokens)),1)]))),128))])]))}}),[[`__scopeId`,`data-v-26d187bc`]]),W={class:`daily-trend`},G={class:`section-title`},K={class:`bar-chart`},q={class:`bar-track`},J={class:`bar-tooltip`},Y={class:`tooltip-date`},X={class:`tooltip-row`},Z={class:`tooltip-row`},Q={class:`tooltip-row`},ne={class:`tooltip-row`},re={class:`bar-dates`},ie={class:`trend-table`},ae=v(e({__name:`DailyTrend`,setup(e){let{t:r}=_(),a=b();function s(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function l(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}let f=o(()=>Math.max(...a.dailyUsage.map(e=>e.tokens),1));return(e,o)=>(c(),n(`div`,W,[t(`h3`,G,d(u(r)(`usage.dailyTrend`)),1),t(`div`,K,[(c(!0),n(h,null,i(u(a).dailyUsage,e=>(c(),n(`div`,{key:e.date,class:`bar-col`},[t(`div`,q,[t(`div`,{class:`bar-fill`,style:p({height:e.tokens/f.value*100+`%`})},null,4)]),t(`div`,J,[t(`div`,Y,d(e.date),1),t(`div`,X,d(u(r)(`usage.tokens`))+`: `+d(s(e.tokens)),1),t(`div`,Z,d(u(r)(`usage.cache`))+`: `+d(s(e.cache)),1),t(`div`,Q,d(u(r)(`usage.sessions`))+`: `+d(e.sessions),1),t(`div`,ne,d(u(r)(`usage.cost`))+`: `+d(l(e.cost)),1)])]))),128))]),t(`div`,re,[t(`span`,null,d(u(a).dailyUsage[0]?.date.slice(5)),1),t(`span`,null,d(u(a).dailyUsage[u(a).dailyUsage.length-1]?.date.slice(5)),1)]),t(`div`,ie,[t(`table`,null,[t(`thead`,null,[t(`tr`,null,[t(`th`,null,d(u(r)(`usage.date`)),1),t(`th`,null,d(u(r)(`usage.tokens`)),1),t(`th`,null,d(u(r)(`usage.cache`)),1),t(`th`,null,d(u(r)(`usage.sessions`)),1),t(`th`,null,d(u(r)(`usage.cost`)),1)])]),t(`tbody`,null,[(c(!0),n(h,null,i([...u(a).dailyUsage].reverse().slice(0,30),e=>(c(),n(`tr`,{key:e.date},[t(`td`,null,d(e.date),1),t(`td`,null,d(s(e.tokens)),1),t(`td`,null,d(s(e.cache)),1),t(`td`,null,d(e.sessions),1),t(`td`,null,d(l(e.cost)),1)]))),128))])])])]))}}),[[`__scopeId`,`data-v-42ea27be`]]),oe={class:`usage-view`},$={class:`usage-header`},se={class:`usage-title`},ce={key:0,class:`usage-loading`},le={key:2,class:`usage-empty`},ue=v(e({__name:`UsageView`,setup(e){let{t:i}=_(),o=b();return r(()=>{o.loadSessions()}),(e,r)=>(c(),n(`div`,oe,[t(`header`,$,[t(`h2`,se,d(u(i)(`usage.title`)),1),f(u(ee),{size:`small`,quaternary:``,loading:u(o).isLoading,onClick:r[0]||=e=>u(o).loadSessions()},{default:l(()=>[a(d(u(i)(`usage.refresh`)),1)]),_:1},8,[`loading`])]),u(o).isLoading&&u(o).sessions.length===0?(c(),n(`div`,ce,d(u(i)(`common.loading`)),1)):u(o).sessions.length>0?(c(),n(h,{key:1},[f(L),f(U),f(ae)],64)):(c(),n(`div`,le,d(u(i)(`usage.noData`)),1))]))}}),[[`__scopeId`,`data-v-cdb16942`]]);export{ue as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{$ as e,A as t,H as n,M as r,P as i,S as a,U as o,Y as s,b as c,ct as l,j as u,k as d,l as f,nt as p,st as m,v as h}from"./router--r9mOZY5.js";function g(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var _=typeof window<`u`,v=(e,t=!1)=>t?Symbol.for(e):Symbol(e),y=(e,t,n)=>b({l:e,k:t,s:n}),b=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),x=e=>typeof e==`number`&&isFinite(e),S=e=>re(e)===`[object Date]`,C=e=>re(e)===`[object RegExp]`,w=e=>z(e)&&Object.keys(e).length===0,T=Object.assign,E=Object.create,D=(e=null)=>E(e),O,k=()=>O||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:D();function A(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function j(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function M(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${j(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${j(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1on$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript:`)}),e}var ee=Object.prototype.hasOwnProperty;function N(e,t){return ee.call(e,t)}var P=Array.isArray,F=e=>typeof e==`function`,I=e=>typeof e==`string`,L=e=>typeof e==`boolean`,R=e=>typeof e==`object`&&!!e,te=e=>R(e)&&F(e.then)&&F(e.catch),ne=Object.prototype.toString,re=e=>ne.call(e),z=e=>re(e)===`[object Object]`,ie=e=>e==null?``:P(e)||z(e)&&e.toString===ne?JSON.stringify(e,null,2):String(e);function ae(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var oe=e=>!R(e)||P(e);function se(e,t){if(oe(e)||oe(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(R(e[r])&&!R(t[r])&&(t[r]=Array.isArray(e[r])?[]:D()),oe(t[r])||oe(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function ce(e,t,n){return{line:e,column:t,offset:n}}function le(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var B={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};B.EXPECTED_TOKEN,B.INVALID_TOKEN_IN_PLACEHOLDER,B.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,B.UNKNOWN_ESCAPE_SEQUENCE,B.INVALID_UNICODE_ESCAPE_SEQUENCE,B.UNBALANCED_CLOSING_BRACE,B.UNTERMINATED_CLOSING_BRACE,B.EMPTY_PLACEHOLDER,B.NOT_ALLOW_NEST_PLACEHOLDER,B.INVALID_LINKED_FORMAT,B.MUST_HAVE_MESSAGES_IN_PLURAL,B.UNEXPECTED_EMPTY_LINKED_MODIFIER,B.UNEXPECTED_EMPTY_LINKED_KEY,B.UNEXPECTED_LEXICAL_ANALYSIS,B.UNHANDLED_CODEGEN_NODE_TYPE,B.UNHANDLED_MINIFIER_NODE_TYPE;function ue(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function de(e){throw e}var V=` `,fe=`\r`,H=`
|
|
2
|
+
`,pe=`\u2028`,me=`\u2029`;function he(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===fe&&t[e+1]===H,s=e=>t[e]===H,c=e=>t[e]===me,l=e=>t[e]===pe,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?H:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var U=void 0,ge=`'`,_e=`tokenizer`;function ve(e,t={}){let n=t.location!==!1,r=he(e),i=()=>r.index(),a=()=>ce(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(ue(e,n?le(a.startLoc,t):null,{domain:_e,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=le(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(B.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===V||e.currentPeek()===H;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===U)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===U)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===ge;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===V||!t?!1:t===H?(e.peek(),r()):D(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===V||r===H):i===V?(e.peek(),n(!0,V)):i===H?(e.peek(),n(!0,H)):!0},r=n();return t&&e.resetPeek(),r}function O(e,t){let n=e.currentChar();return n===U?U:t(n)?(e.next(),n):null}function k(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function A(e){return O(e,k)}function j(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return O(e,j)}function ee(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function N(e){return O(e,ee)}function P(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function F(e){return O(e,P)}function I(e){let t=``,n=``;for(;t=N(e);)n+=t;return n}function L(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===V||n===H)if(D(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function R(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==U&&r!==V&&r!==H&&r!==` `){let t=oe(e);return d(B.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===U&&d(B.UNTERMINATED_CLOSING_BRACE,a(),0),n}function te(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${I(e)}`):t+=I(e),e.currentChar()===U&&d(B.UNTERMINATED_CLOSING_BRACE,a(),0),t}function ne(e){return e!==ge&&e!==H}function re(e){g(e),m(e,`'`);let t=``,n=``;for(;t=O(e,ne);)t===`\\`?n+=z(e):n+=t;let r=e.currentChar();return r===H||r===U?(d(B.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===H&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function z(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return ie(e,t,4);case`U`:return ie(e,t,6);default:return d(B.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function ie(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=F(e);if(!n){d(B.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function ae(e){return e!==`{`&&e!==`}`&&e!==V&&e!==H}function oe(e){g(e);let t=``,n=``;for(;t=O(e,ae);)n+=t;return n}function se(e){let t=``,n=``;for(;t=A(e);)n+=t;return n}function de(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===V?n:(n+=r,e.next(),t(n))};return t(``)}function fe(e){g(e);let t=m(e,`|`);return g(e),t}function pe(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(B.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(B.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(B.UNTERMINATED_CLOSING_BRACE,a(),0),n=me(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(B.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(B.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,ve(e,t);if(r=y(e,t))return n=f(t,4,R(e)),g(e),n;if(i=b(e,t))return n=f(t,5,te(e)),g(e),n;if(o=x(e,t))return n=f(t,6,re(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,oe(e)),d(B.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function me(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===H||i===V)&&d(B.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return E(e)?(r=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),me(e,t)):C(e,t)?(g(e),f(t,11,se(e))):T(e,t)?(g(e),i===`{`?pe(e,t)||r:f(t,10,de(e))):(n===7&&d(B.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,ve(e,t))}}function ve(e,t){let n={type:13};if(t.braceNest>0)return pe(e,t)||p(t);if(t.inLinked)return me(e,t)||p(t);switch(e.currentChar()){case`{`:return pe(e,t)||p(t);case`}`:return d(B.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return me(e,t)||p(t);default:if(E(e))return n=f(t,1,fe(e)),t.braceNest=0,t.inLinked=!1,n;if(D(e))return f(t,0,L(e));break}return n}function ye(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===U?f(c,13):ve(r,c)}return{nextToken:ye,currentOffset:i,currentPosition:a,context:l}}var ye=`parser`,be=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,xe=/\\([\\@{}|])/g;function Se(e,t){return t}function Ce(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function we(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(ue(r,t?le(i,s):null,{domain:ye,args:o}))}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(xe,Se),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(be,Ce),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,W(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,B.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=l(e,o.value||``);break;default:{r(e,B.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,B.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,B.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=ve(n,T({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,B.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function W(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Te(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function Ee(e,t){for(let n=0;n<e.length;n++)De(e[n],t)}function De(e,t){switch(e.type){case 1:Ee(e.cases,t),t.helper(`plural`);break;case 2:Ee(e.items,t);break;case 6:De(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function G(e,t={}){let n=Te(e);n.helper(`normalize`),e.body&&De(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function Oe(e){let t=e.body;return t.type===2?ke(t):t.cases.forEach(e=>ke(e)),e}function ke(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=ae(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}function Ae(e){switch(e.t=e.type,e.type){case 0:{let t=e;Ae(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)Ae(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)Ae(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Ae(t.key),t.k=t.key,delete t.key,t.modifier&&(Ae(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:}delete e.type}function je(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function Me(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),Ie(e,t.key),t.modifier?(e.push(`, `),Ie(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function Ne(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(Ie(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function Pe(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(Ie(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function Fe(e,t){t.body?Ie(e,t.body):e.push(`null`)}function Ie(e,t){let{helper:n}=e;switch(t.type){case 0:Fe(e,t);break;case 1:Pe(e,t);break;case 2:Ne(e,t);break;case 6:Me(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:}}var Le=(e,t={})=>{let n=I(t.mode)?t.mode:`normal`,r=I(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
|
|
3
|
+
`:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=je(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${ae(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),Ie(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function Re(e,t={}){let n=T({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=we(n).parse(e);return r?(a&&Oe(o),i&&Ae(o),{ast:o,code:``}):(G(o,n),Le(o,n))}function ze(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(k().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(k().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function K(e){return R(e)&&Ye(e)===0&&(N(e,`b`)||N(e,`body`))}var Be=[`b`,`body`];function Ve(e){return q(e,Be)}var He=[`c`,`cases`];function Ue(e){return q(e,He,[])}var We=[`s`,`static`];function Ge(e){return q(e,We)}var Ke=[`i`,`items`];function qe(e){return q(e,Ke,[])}var Je=[`t`,`type`];function Ye(e){return q(e,Je)}var Xe=[`v`,`value`];function Ze(e,t){let n=q(e,Xe);if(n!=null)return n;throw rt(t)}var Qe=[`m`,`modifier`];function $e(e){return q(e,Qe)}var et=[`k`,`key`];function tt(e){let t=q(e,et);if(t)return t;throw rt(6)}function q(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(N(e,r)&&e[r]!=null)return e[r]}return n}var nt=[...Be,...He,...We,...Ke,...et,...Qe,...Xe,...Je];function rt(e){return Error(`unhandled node type: ${e}`)}function it(e){return t=>at(t,e)}function at(e,t){let n=Ve(t);if(n==null)throw rt(0);if(Ye(n)===1){let t=Ue(n);return e.plural(t.reduce((t,n)=>[...t,ot(e,n)],[]))}else return ot(e,n)}function ot(e,t){let n=Ge(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=qe(t).reduce((t,n)=>[...t,st(e,n)],[]);return e.normalize(n)}}function st(e,t){let n=Ye(t);switch(n){case 3:return Ze(t,n);case 9:return Ze(t,n);case 4:{let r=t;if(N(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(N(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw rt(n)}case 5:{let r=t;if(N(r,`i`)&&x(r.i))return e.interpolate(e.list(r.i));if(N(r,`index`)&&x(r.index))return e.interpolate(e.list(r.index));throw rt(n)}case 6:{let n=t,r=$e(n),i=tt(n);return e.linked(st(e,i),r?st(e,r):void 0,e.type)}case 7:return Ze(t,n);case 8:return Ze(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var ct=e=>e,lt=D();function ut(e,t={}){let n=!1,r=t.onError||de;return t.onError=e=>{n=!0,r(e)},{...Re(e,t),detectError:n}}function dt(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&I(e)){L(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||ct)(e),r=lt[n];if(r)return r;let{ast:i,detectError:a}=ut(e,{...t,location:!1,jit:!0}),o=it(i);return a?o:lt[n]=o}else{let t=e.cacheKey;return t?lt[t]||(lt[t]=it(e)):it(e)}}var ft=null;function pt(e){ft=e}function mt(e,t,n){ft&&ft.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var ht=gt(`function:translate`);function gt(e){return t=>ft&&ft.emit(e,t)}var J={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function Y(e){return ue(e,null,void 0)}J.INVALID_ARGUMENT,J.INVALID_DATE_ARGUMENT,J.INVALID_ISO_DATE_ARGUMENT,J.NOT_SUPPORT_NON_STRING_MESSAGE,J.NOT_SUPPORT_LOCALE_PROMISE_VALUE,J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,J.NOT_SUPPORT_LOCALE_TYPE;function _t(e,t){return t.locale==null?yt(e.locale):yt(t.locale)}var vt;function yt(e){if(I(e))return e;if(F(e)){if(e.resolvedOnce&&vt!=null)return vt;if(e.constructor.name===`Function`){let t=e();if(te(t))throw Y(J.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return vt=t}else throw Y(J.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Y(J.NOT_SUPPORT_LOCALE_TYPE)}function bt(e,t,n){return[...new Set([n,...P(t)?t:R(t)?Object.keys(t):I(t)?[t]:[n]])]}function xt(e,t,n){let r=I(n)?n:It,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;P(e);)e=St(a,e,t);let o=P(t)||!z(t)?t:t.default?t.default:null;e=I(o)?[o]:o,P(e)&&St(a,e,!1),i.__localeChainCache.set(r,a)}return a}function St(e,t,n){let r=!0;for(let i=0;i<t.length&&L(r);i++){let a=t[i];I(a)&&(r=Ct(e,t[i],n))}return r}function Ct(e,t,n){let r,i=t.split(`-`);do r=wt(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function wt(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(P(n)||z(n))&&n[i]&&(r=n[i])}return r}var Tt=[];Tt[0]={w:[0],i:[3,0],"[":[4],o:[7]},Tt[1]={w:[1],".":[2],"[":[4],o:[7]},Tt[2]={w:[2],i:[3,0],0:[3,0]},Tt[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Tt[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Tt[5]={"'":[4,0],o:8,l:[5,0]},Tt[6]={'"':[4,0],o:8,l:[6,0]};var Et=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Dt(e){return Et.test(e)}function Ot(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function kt(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function At(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Dt(t)?Ot(t):`*`+t}function jt(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=At(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=kt(a),d=Tt[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Mt=new Map;function Nt(e,t){return R(e)?e[t]:null}function Pt(e,t){if(!R(e))return null;let n=Mt.get(t);if(n||(n=jt(t),n&&Mt.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(nt.includes(e)&&K(i)||!R(i)||!N(i,e))return null;let t=i[e];if(t===void 0||F(i))return null;i=t,a++}return i}var X={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9};X.NOT_FOUND_KEY,X.FALLBACK_TO_TRANSLATE,X.CANNOT_FORMAT_NUMBER,X.FALLBACK_TO_NUMBER_FORMAT,X.CANNOT_FORMAT_DATE,X.FALLBACK_TO_DATE_FORMAT,X.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER,X.INVALID_NUMBER_ARGUMENT,X.INVALID_DATE_ARGUMENT;var Ft=`11.3.2`,It=`en-US`,Lt=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Rt(){return{upper:(e,t)=>t===`text`&&I(e)?e.toUpperCase():t===`vnode`&&R(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&I(e)?e.toLowerCase():t===`vnode`&&R(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&I(e)?Lt(e):t===`vnode`&&R(e)&&`__v_isVNode`in e?Lt(e.children):e}}var zt;function Bt(e){zt=e}var Vt;function Ht(e){Vt=e}var Ut;function Wt(e){Ut=e}var Gt=null,Kt=()=>Gt,qt=null,Jt=e=>{qt=e},Yt=()=>qt,Xt=0;function Zt(e={}){let t=F(e.onWarn)?e.onWarn:g,n=I(e.version)?e.version:Ft,r=I(e.locale)||F(e.locale)?e.locale:It,i=F(r)?It:r,a=P(e.fallbackLocale)||z(e.fallbackLocale)||I(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=z(e.messages)?e.messages:Qt(i),s=z(e.datetimeFormats)?e.datetimeFormats:Qt(i),c=z(e.numberFormats)?e.numberFormats:Qt(i),l=T(D(),e.modifiers,Rt()),u=e.pluralRules||D(),d=F(e.missing)?e.missing:null,f=L(e.missingWarn)||C(e.missingWarn)?e.missingWarn:!0,p=L(e.fallbackWarn)||C(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,_=F(e.postTranslation)?e.postTranslation:null,v=z(e.processor)?e.processor:null,y=L(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter,x=F(e.messageCompiler)?e.messageCompiler:zt,S=F(e.messageResolver)?e.messageResolver:Vt||Nt,w=F(e.localeFallbacker)?e.localeFallbacker:Ut||bt,E=R(e.fallbackContext)?e.fallbackContext:void 0,O=e,k=R(O.__datetimeFormatters)?O.__datetimeFormatters:new Map,A=R(O.__numberFormatters)?O.__numberFormatters:new Map,j=R(O.__meta)?O.__meta:{};Xt++;let M={version:n,cid:Xt,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:_,processor:v,warnHtmlMessage:y,escapeParameter:b,messageCompiler:x,messageResolver:S,localeFallbacker:w,fallbackContext:E,onWarn:t,__meta:j};return M.datetimeFormats=s,M.numberFormats=c,M.__datetimeFormatters=k,M.__numberFormatters=A,__INTLIFY_PROD_DEVTOOLS__&&mt(M,n,j),M}var Qt=e=>({[e]:D()});function $t(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return I(r)?r:t}else return t}function en(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function tn(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function nn(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(tn(e,t[r]))return!0;return!1}var rn=typeof Intl<`u`;rn&&Intl.DateTimeFormat,rn&&Intl.NumberFormat;function an(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e;if(!I(t[0])&&!S(t[0])&&!x(t[0]))return``;let[c,l,u,d]=sn(...t),f=L(u.missingWarn)?u.missingWarn:e.missingWarn;L(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=_t(e,u),h=o(e,i,m);if(!I(c)||c===``)return new Intl.DateTimeFormat(m.replace(/!/g,``),d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!z(v));t++)$t(e,c,_,f,`datetime format`);if(!z(v)||!I(_))return r?-1:c;let y=`${_}__${c}`;w(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.DateTimeFormat(_,T({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var on=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function sn(...e){let[t,n,r,i]=e,a=D(),o=D(),s;if(I(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Y(J.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw Y(J.INVALID_ISO_DATE_ARGUMENT)}}else if(S(t)){if(isNaN(t.getTime()))throw Y(J.INVALID_DATE_ARGUMENT);s=t}else if(x(t))s=t;else throw Y(J.INVALID_ARGUMENT);return I(n)?a.key=n:z(n)&&Object.keys(n).forEach(e=>{on.includes(e)?o[e]=n[e]:a[e]=n[e]}),I(r)?a.locale=r:z(r)&&(o=r),z(i)&&(o=i),[a.key||``,s,a,o]}function cn(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function ln(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e;if(!x(t[0]))return``;let[c,l,u,d]=dn(...t),f=L(u.missingWarn)?u.missingWarn:e.missingWarn;L(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=_t(e,u),h=o(e,i,m);if(!I(c)||c===``)return new Intl.NumberFormat(m.replace(/!/g,``),d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!z(v));t++)$t(e,c,_,f,`number format`);if(!z(v)||!I(_))return r?-1:c;let y=`${_}__${c}`;w(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.NumberFormat(_,T({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var un=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function dn(...e){let[t,n,r,i]=e,a=D(),o=D();if(!x(t))throw Y(J.INVALID_ARGUMENT);let s=t;return I(n)?a.key=n:z(n)&&Object.keys(n).forEach(e=>{un.includes(e)?o[e]=n[e]:a[e]=n[e]}),I(r)?a.locale=r:z(r)&&(o=r),z(i)&&(o=i),[a.key||``,s,a,o]}function fn(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}var pn=e=>e,mn=e=>``,hn=`text`,gn=e=>e.length===0?``:ae(e),_n=ie;function vn(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function yn(e){let t=x(e.pluralIndex)?e.pluralIndex:-1;return x(e.named?.count)?e.named.count:x(e.named?.n)?e.named.n:t}function bn(e={}){let t=e.locale,n=yn(e),r=I(t)&&F(e.pluralRules?.[t])?e.pluralRules[t]:vn,i=r===vn?void 0:vn,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||D();x(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(F(e.messages)?e.messages(t,!!n):R(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):mn)}let d=t=>e.modifiers?e.modifiers[t]:pn,f=F(e.processor?.normalize)?e.processor.normalize:gn,p=F(e.processor?.interpolate)?e.processor.interpolate:_n,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?R(n)?(a=n.modifier||a,i=n.type||i):I(n)&&(a=n||a):t.length===2&&(I(n)&&(a=n||a),I(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&P(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:I(e.processor?.type)?e.processor.type:hn,interpolate:p,normalize:f,values:T(D(),o,c)};return m}var xn=()=>``,Z=e=>F(e);function Sn(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=Dn(...t),u=L(l.missingWarn)?l.missingWarn:e.missingWarn,d=L(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=L(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=I(l.default)||L(l.default)?L(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(I(m)||F(m)),g=_t(e,l);f&&Cn(l);let[_,v,y]=p?[c,g,s[g]||D()]:wn(e,c,g,o,d,u),b=_,x=c;if(!p&&!(I(b)||K(b)||Z(b))&&h&&(b=m,x=b),!p&&(!(I(b)||K(b)||Z(b))||!I(v)))return i?-1:c;let S=!1,C=Z(b)?b:Tn(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=En(e,C,bn(kn(e,v,y,l))),E=r?r(w,c):w;if(f&&I(E)&&(E=M(E)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:I(c)?c:Z(b)?b.key:``,locale:v||(Z(b)?b.locale:``),format:I(b)?b:Z(b)?b.source:``,message:E};t.meta=T({},e.__meta,Kt()||{}),ht(t)}return E}function Cn(e){P(e.list)?e.list=e.list.map(e=>I(e)?A(e):e):R(e.named)&&Object.keys(e.named).forEach(t=>{I(e.named[t])&&(e.named[t]=A(e.named[t]))})}function wn(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=D(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||D(),(p=c(d,t))===null&&(p=d[t]),!(I(p)||K(p)||Z(p)));n++)if(!nn(f,u)){let n=$t(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function Tn(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(Z(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,On(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function En(e,t,n){return t(n)}function Dn(...e){let[t,n,r]=e,i=D();if(!I(t)&&!x(t)&&!Z(t)&&!K(t))throw Y(J.INVALID_ARGUMENT);let a=x(t)?String(t):(Z(t),t);return x(n)?i.plural=n:I(n)?i.default=n:z(n)&&!w(n)?i.named=n:P(n)&&(i.list=n),x(r)?i.plural=r:I(r)?i.default=r:z(r)&&T(i,r),[a,i]}function On(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>y(t,n,e)}}function kn(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=wn(u||e,r,t,s,c,l);a=n??o(i,r)}if(I(a)||K(a)){let n=!1,i=Tn(e,r,t,a,r,()=>{n=!0});return n?xn:i}else if(Z(a))return a;else return xn}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),x(r.plural)&&(d.pluralIndex=r.plural),d}ze();var An=`11.3.2`;function jn(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(k().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(k().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(k().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(k().__INTLIFY_PROD_DEVTOOLS__=!1)}var Q={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function $(e,...t){return ue(e,null,void 0)}Q.UNEXPECTED_RETURN_TYPE,Q.INVALID_ARGUMENT,Q.MUST_BE_CALL_SETUP_TOP,Q.NOT_INSTALLED,Q.UNEXPECTED_ERROR,Q.REQUIRED_VALUE,Q.INVALID_VALUE,Q.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,Q.NOT_INSTALLED_WITH_PROVIDE,Q.NOT_COMPATIBLE_LEGACY_VUE_I18N,Q.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var Mn=v(`__translateVNode`),Nn=v(`__datetimeParts`),Pn=v(`__numberParts`),Fn=v(`__setPluralRules`);v(`__intlifyMeta`);var In=v(`__injectWithOption`),Ln=v(`__dispose`),Rn={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};Rn.FALLBACK_TO_ROOT,Rn.NOT_FOUND_PARENT_SCOPE,Rn.IGNORE_OBJ_FLATTEN,Rn.DEPRECATE_LEGACY_MODE,Rn.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,Rn.DUPLICATE_USE_I18N_CALLING;function zn(e){if(!R(e)||K(e))return e;for(let t in e)if(N(e,t))if(!t.includes(`.`))R(e[t])&&zn(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=D()),!R(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(K(i)?nt.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!K(i)){let e=i[n[r]];R(e)&&zn(e)}}return e}function Bn(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=z(n)?n:P(r)?D():{[e]:D()};if(P(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||D(),se(n,o[t])):se(n,o)}else I(e)&&se(JSON.parse(e),o)}),i==null&&a)for(let e in o)N(o,e)&&zn(o[e]);return o}function Vn(e){return e.type}function Hn(e,t,n){let r=R(t.messages)?t.messages:D();`__i18nGlobal`in n&&(r=Bn(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),R(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(R(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function Un(e){return d(c,null,e,0)}function Wn(){let e=`currentInstance`;return e in f?f[e]:u()}var Gn=()=>[],Kn=()=>!1,qn=0;function Jn(e){return((t,n,r,i)=>e(n,r,Wn()||void 0,i))}function Yn(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,o=_?m:l,c=L(e.inheritLocale)?e.inheritLocale:!0,u=o(t&&c?t.locale.value:I(e.locale)?e.locale:It),d=o(t&&c?t.fallbackLocale.value:I(e.fallbackLocale)||P(e.fallbackLocale)||z(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),f=o(Bn(u.value,e)),p=o(z(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=o(z(e.numberFormats)?e.numberFormats:{[u.value]:{}}),g=t?t.missingWarn:L(e.missingWarn)||C(e.missingWarn)?e.missingWarn:!0,v=t?t.fallbackWarn:L(e.fallbackWarn)||C(e.fallbackWarn)?e.fallbackWarn:!0,y=t?t.fallbackRoot:L(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,S=F(e.missing)?e.missing:null,w=F(e.missing)?Jn(e.missing):null,E=F(e.postTranslation)?e.postTranslation:null,D=t?t.warnHtmlMessage:L(e.warnHtmlMessage)?e.warnHtmlMessage:!0,O=!!e.escapeParameter,k=t?t.modifiers:z(e.modifiers)?e.modifiers:{},A=e.pluralRules||t&&t.pluralRules,j;j=(()=>{r&&Jt(null);let t={version:An,locale:u.value,fallbackLocale:d.value,messages:f.value,modifiers:k,pluralRules:A,missing:w===null?void 0:w,missingWarn:g,fallbackWarn:v,fallbackFormat:b,unresolving:!0,postTranslation:E===null?void 0:E,warnHtmlMessage:D,escapeParameter:O,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=p.value,t.numberFormats=h.value,t.__datetimeFormatters=z(j)?j.__datetimeFormatters:void 0,t.__numberFormatters=z(j)?j.__numberFormatters:void 0;let n=Zt(t);return r&&Jt(n),n})(),en(j,u.value,d.value);function M(){return[u.value,d.value,f.value,p.value,h.value]}let ee=a({get:()=>u.value,set:e=>{j.locale=e,u.value=e}}),te=a({get:()=>d.value,set:e=>{j.fallbackLocale=e,d.value=e,en(j,u.value,e)}}),ne=a(()=>f.value),re=a(()=>p.value),ie=a(()=>h.value);function ae(){return F(E)?E:null}function oe(e){E=e,j.postTranslation=e}function ce(){return S}function le(e){e!==null&&(w=Jn(e)),S=e,j.missing=w}let B=(e,n,i,a,o,s)=>{M();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(j.fallbackContext=t?Yt():void 0),c=e(j)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(j.fallbackContext=void 0)}if(i!==`translate exists`&&x(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();return t&&y?a(t):o(e)}else if(s(c))return c;else throw $(Q.UNEXPECTED_RETURN_TYPE)};function ue(...e){return B(t=>Reflect.apply(Sn,null,[t,...e]),()=>Dn(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>I(e))}function de(...e){let[t,n,r]=e;if(r&&!R(r))throw $(Q.INVALID_ARGUMENT);return ue(t,n,T({resolvedMessage:!0},r||{}))}function V(...e){return B(t=>Reflect.apply(an,null,[t,...e]),()=>sn(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>I(e)||P(e))}function fe(...e){return B(t=>Reflect.apply(ln,null,[t,...e]),()=>dn(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>I(e)||P(e))}function H(e){return e.map(e=>I(e)||x(e)||L(e)?Un(String(e)):e)}let pe={normalize:H,interpolate:e=>e,type:`vnode`};function me(...e){return B(t=>{let n,r=t;try{r.processor=pe,n=Reflect.apply(Sn,null,[r,...e])}finally{r.processor=null}return n},()=>Dn(...e),`translate`,t=>t[Mn](...e),e=>[Un(e)],e=>P(e))}function he(...e){return B(t=>Reflect.apply(ln,null,[t,...e]),()=>dn(...e),`number format`,t=>t[Pn](...e),Gn,e=>I(e)||P(e))}function U(...e){return B(t=>Reflect.apply(an,null,[t,...e]),()=>sn(...e),`datetime format`,t=>t[Nn](...e),Gn,e=>I(e)||P(e))}function ge(e){A=e,j.pluralRules=A}function _e(e,t){return B(()=>{if(!e)return!1;let n=I(t)?t:u.value,r=I(t)?[n]:xt(j,d.value,n);for(let t=0;t<r.length;t++){let n=be(r[t]),i=j.messageResolver(n,e);if(i===null&&(i=n[e]),K(i)||Z(i)||I(i))return!0}return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),Kn,e=>L(e))}function ve(e){let t=null,n=xt(j,d.value,u.value);for(let r=0;r<n.length;r++){let i=f.value[n[r]]||{},a=j.messageResolver(i,e);if(a!=null){t=a;break}}return t}function ye(e){return ve(e)??(t&&t.tm(e)||{})}function be(e){return f.value[e]||{}}function xe(e,t){if(i){let n={[e]:t};for(let e in n)N(n,e)&&zn(n[e]);t=n[e]}f.value[e]=t,j.messages=f.value}function Se(e,t){f.value[e]=f.value[e]||{};let n={[e]:t};if(i)for(let e in n)N(n,e)&&zn(n[e]);t=n[e],se(t,f.value[e]),j.messages=f.value}function Ce(e){return p.value[e]||{}}function we(e,t){p.value[e]=t,j.datetimeFormats=p.value,cn(j,e,t)}function W(e,t){p.value[e]=T(p.value[e]||{},t),j.datetimeFormats=p.value,cn(j,e,t)}function Te(e){return h.value[e]||{}}function Ee(e,t){h.value[e]=t,j.numberFormats=h.value,fn(j,e,t)}function De(e,t){h.value[e]=T(h.value[e]||{},t),j.numberFormats=h.value,fn(j,e,t)}qn++,t&&_&&(s(t.locale,e=>{c&&(u.value=e,j.locale=e,en(j,u.value,d.value))}),s(t.fallbackLocale,e=>{c&&(d.value=e,j.fallbackLocale=e,en(j,u.value,d.value))}));let G={id:qn,locale:ee,fallbackLocale:te,get inheritLocale(){return c},set inheritLocale(e){c=e,e&&t&&(u.value=t.locale.value,d.value=t.fallbackLocale.value,en(j,u.value,d.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:ne,get modifiers(){return k},get pluralRules(){return A||{}},get isGlobal(){return r},get missingWarn(){return g},set missingWarn(e){g=e,j.missingWarn=g},get fallbackWarn(){return v},set fallbackWarn(e){v=e,j.fallbackWarn=v},get fallbackRoot(){return y},set fallbackRoot(e){y=e},get fallbackFormat(){return b},set fallbackFormat(e){b=e,j.fallbackFormat=b},get warnHtmlMessage(){return D},set warnHtmlMessage(e){D=e,j.warnHtmlMessage=e},get escapeParameter(){return O},set escapeParameter(e){O=e,j.escapeParameter=e},t:ue,getLocaleMessage:be,setLocaleMessage:xe,mergeLocaleMessage:Se,getPostTranslationHandler:ae,setPostTranslationHandler:oe,getMissingHandler:ce,setMissingHandler:le,[Fn]:ge};return G.datetimeFormats=re,G.numberFormats=ie,G.rt=de,G.te=_e,G.tm=ye,G.d=V,G.n=fe,G.getDateTimeFormat=Ce,G.setDateTimeFormat=we,G.mergeDateTimeFormat=W,G.getNumberFormat=Te,G.setNumberFormat=Ee,G.mergeNumberFormat=De,G[In]=n,G[Mn]=me,G[Nn]=U,G[Pn]=he,G}function Xn(e){let t=I(e.locale)?e.locale:It,n=I(e.fallbackLocale)||P(e.fallbackLocale)||z(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=F(e.missing)?e.missing:void 0,i=L(e.silentTranslationWarn)||C(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=L(e.silentFallbackWarn)||C(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=L(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=z(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=F(e.postTranslation)?e.postTranslation:void 0,d=I(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=L(e.sync)?e.sync:!0,m=e.messages;if(z(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(T(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function Zn(e={}){let t=Yn(Xn(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return L(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=L(e)?!e:e},get silentFallbackWarn(){return L(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=L(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,r}function Qn(e,t,n){return{beforeCreate(){let r=Wn();if(!r)throw $(Q.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=$n(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Zn(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=$n(e,i);else{this.$i18n=Zn({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Hn(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=Wn();if(!e)throw $(Q.UNEXPECTED_ERROR);let t=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n}}}function $n(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Fn](t.pluralizationRules||e.pluralizationRules);let n=Bn(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var er={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function tr({slots:e},t){return t.length===1&&t[0]===`default`?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===h?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},D())}function nr(){return h}var rr=t({name:`i18n-t`,props:T({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>x(e)||!isNaN(e)}},er),setup(e,t){let{slots:n,attrs:i}=t,a=e.i18n||mr({useScope:e.scope,__useComponent:!0});return()=>{let o=Object.keys(n).filter(e=>e[0]!==`_`),s=D();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=I(e.plural)?+e.plural:e.plural);let c=tr(t,o),l=a[Mn](e.keypath,c,s),u=T(D(),i);return r(I(e.tag)||R(e.tag)?e.tag:nr(),u,l)}}});function ir(e){return P(e)&&!I(e[0])}function ar(e,t,n,i){let{slots:a,attrs:o}=t;return()=>{let t={part:!0},s=D();e.locale&&(t.locale=e.locale),I(e.format)?t.key=e.format:R(e.format)&&(I(e.format.key)&&(t.key=e.format.key),s=Object.keys(e.format).reduce((t,r)=>n.includes(r)?T(D(),t,{[r]:e.format[r]}):t,D()));let c=i(e.value,t,s),l=[t.key];P(c)?l=c.map((e,t)=>{let n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];return ir(r)&&(r[0].key=`${e.type}-${t}`),r}):I(c)&&(l=[c]);let u=T(D(),o);return r(I(e.tag)||R(e.tag)?e.tag:nr(),u,l)}}var or=t({name:`i18n-n`,props:T({value:{type:Number,required:!0},format:{type:[String,Object]}},er),setup(e,t){let n=e.i18n||mr({useScope:e.scope,__useComponent:!0});return ar(e,t,un,(...e)=>n[Pn](...e))}});function sr(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function cr(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw $(Q.UNEXPECTED_ERROR);let i=sr(e,n.$),a=lr(r);return[Reflect.apply(i.t,i,[...ur(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);_&&(e.__i18nWatcher=s(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{_&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=lr(t);e.textContent=Reflect.apply(n.t,n,[...ur(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function lr(e){if(I(e))return{path:e};if(z(e)){if(!(`path`in e))throw $(Q.REQUIRED_VALUE,`path`);return e}else throw $(Q.INVALID_VALUE)}function ur(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return I(n)&&(o.locale=n),x(i)&&(o.plural=i),x(a)&&(o.plural=a),[t,s,o]}function dr(e,t,...n){let r=z(n[0])?n[0]:{};(!L(r.globalInstall)||r.globalInstall)&&([rr.name,`I18nT`].forEach(t=>e.component(t,rr)),[or.name,`I18nN`].forEach(t=>e.component(t,or)),[Tr.name,`I18nD`].forEach(t=>e.component(t,Tr))),e.directive(`t`,cr(t))}var fr=v(`global-vue-i18n`);function pr(e={}){let t=__VUE_I18N_LEGACY_API__&&L(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=L(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=hr(e,t),o=v(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),z(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=wr(e,u.global)),__VUE_I18N_FULL_INSTALL__&&dr(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(Qn(a,a.__composer,u));let s=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),s()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function mr(e={}){let t=Wn();if(t==null)throw $(Q.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw $(Q.NOT_INSTALLED);let n=gr(t),r=vr(n),i=Vn(t),a=_r(e,i);if(a===`global`)return Hn(r,e,i),r;if(a===`parent`){let i=yr(n,t,e.__useComponent);return i??=r,i}let o=n,s=o.__getInstance(t);if(s==null){let n=T({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=Yn(n),o.__composerExtend&&(s[Ln]=o.__composerExtend(s)),xr(o,t,s),o.__setInstance(t,s)}return s}function hr(t,n){let r=e(),i=__VUE_I18N_LEGACY_API__&&n?r.run(()=>Zn(t)):r.run(()=>Yn(t));if(i==null)throw $(Q.UNEXPECTED_ERROR);return[r,i]}function gr(e){let t=i(e.isCE?fr:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw $(e.isCE?Q.NOT_INSTALLED_WITH_PROVIDE:Q.UNEXPECTED_ERROR);return t}function _r(e,t){return w(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function vr(e){return e.mode===`composition`?e.global:e.global.__composer}function yr(e,t,n=!1){let r=null,i=t.root,a=br(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[In]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function br(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function xr(e,t,r){n(()=>{},t),o(()=>{let n=r;e.__deleteInstance(t);let i=n[Ln];i&&(i(),delete n[Ln])},t)}var Sr=[`locale`,`fallbackLocale`,`availableLocales`],Cr=[`t`,`rt`,`d`,`n`,`tm`,`te`];function wr(e,t){let n=Object.create(null);return Sr.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw $(Q.UNEXPECTED_ERROR);let i=p(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Cr.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw $(Q.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Cr.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Tr=t({name:`i18n-d`,props:T({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},er),setup(e,t){let n=e.i18n||mr({useScope:e.scope,__useComponent:!0});return ar(e,t,on,(...e)=>n[Nn](...e))}});if(jn(),Bt(dt),Ht(Pt),Wt(xt),__INTLIFY_PROD_DEVTOOLS__){let e=k();e.__INTLIFY__=!0,pt(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var Er=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{pr as n,mr as r,Er as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,st as t}from"./router--r9mOZY5.js";import{n}from"./pinia-YU9i-6Bb.js";async function r(){return e(`/health`)}async function i(){return e(`/api/available-models`)}async function a(t){await e(`/api/config/model`,{method:`PUT`,body:JSON.stringify(t)})}async function o(t){await e(`/api/config/providers`,{method:`POST`,body:JSON.stringify(t)})}async function s(t){await e(`/api/config/providers/${encodeURIComponent(t)}`,{method:`DELETE`})}var c=n(`app`,()=>{let e=t(!1),n=t(``),o=t([]),s=t(``),c=t(),l=t(!0),u=t(!0),d=t(4096);async function f(){try{let t=await r();e.value=t.status===`ok`,t.version&&(n.value=t.version)}catch{e.value=!1}}async function p(){try{let e=await i();o.value=e.groups,s.value=e.default}catch{}}async function m(e,t){try{let n=o.value.find(t=>t.models.includes(e));await a({default:e,provider:t||n?.provider||``}),s.value=e}catch(e){console.error(`Failed to switch model:`,e)}}function h(e=3e4){g(),f(),c.value=setInterval(f,e)}function g(){c.value&&=(clearInterval(c.value),void 0)}return{connected:e,serverVersion:n,modelGroups:o,selectedModel:s,streamEnabled:l,sessionPersistence:u,maxTokens:d,checkConnection:f,loadModels:p,switchModel:m,startHealthPolling:h,stopHealthPolling:g}});export{a,s as i,o as n,i as r,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./app-BcCNNvPk.js";export{e as useAppStore};
|