galaxy-charts 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/galaxy-charts.js +332 -330
- package/dist/galaxy-charts.umd.cjs +29 -29
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(We,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(We=typeof globalThis<"u"?globalThis:We||self,o(We.GalaxyCharts={},We.vue))})(this,function(We,o){"use strict";var Mi=document.createElement("style");Mi.textContent=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.z-10{z-index:10}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mr-1{margin-right:.25rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.\\!hidden{display:none!important}.hidden{display:none}.size-14{width:3.5rem;height:3.5rem}.size-3{width:.75rem;height:.75rem}.size-4{width:1rem;height:1rem}.h-screen{height:100vh}.w-full{width:100%}.min-w-14{min-width:3.5rem}.max-w-14{max-width:3.5rem}.flex-1{flex:1 1 0%}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-\\[70\\%_30\\%\\]{grid-template-columns:70% 30%}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-dotted{border-style:dotted}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-sky-100{--tw-bg-opacity: 1;background-color:rgb(224 242 254 / var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-thin{font-weight:100}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-sky-900{--tw-text-opacity: 1;color:rgb(12 74 110 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (min-width: 768px){.md\\:flex{display:flex}}
|
|
2
|
-
`,document.head.appendChild(Mi);function Ii(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function go(e){throw Error(Ii(e))}const Oi=o.ref("/"),Ai=o.ref("include");function Fi(){function e(){return Ai.value}function t(i){Ai.value=i}function n(){return Oi.value}function r(i){Oi.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}async function ir(e,t){const n=Fi(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});return{data:await i.json(),response:i}}catch(i){go(i)}}function en(){async function e(r){return ir(r,{method:"GET"})}async function t(r,i){return ir(r,{body:JSON.stringify(i),method:"POST"})}async function n(r,i){return ir(r,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function Vs(e,t){try{const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString(),{data:r}=await en().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const l of r.data)for(const s in l){const d=Number(s),c=l[s];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}catch(n){console.error(n);return}}function Hs(e){return`/api/datasets/${e}/display`}const Di=["auto"],Ln=o.ref({});function Ls(){function e(n,r){const i=[];for(const a of n)for(const l of r){const s=a[l];s&&![...i,...Di].includes(s)&&i.push(s)}return i}async function t(n,r,i){Ln.value[n]=Ln.value[n]||{};const a=Object.keys(Ln.value[n]),l=e(r,i).filter(d=>!a.includes(d));if(l.length>0){const d=await Vs(n,l);if(d)for(const[c,f]of l.entries())Ln.value[n][f]=d[c]}const s=[];return r.forEach(d=>{const c={};i.forEach(f=>{const u=d[f];u&&!Di.includes(u)&&(c[f]=Ln.value[n][u])}),s.push(c)}),s}return{fetchColumns:t}}function Ns(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function Ws(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Vi(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function js(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Us(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Gs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Hi(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Ks(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function qs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Xs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let mo=[];const Li=new WeakMap;function Ys(){mo.forEach(e=>e(...Li.get(e))),mo=[]}function Ni(e,...t){Li.set(e,t),!mo.includes(e)&&mo.push(e)===1&&requestAnimationFrame(Ys)}function Nn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function $n(e){return e.composedPath()[0]||null}function ot(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function tn(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function dt(e,t){const 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 new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const Wi={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};function ji(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function vo(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function Dt(e,t,n){t/=100,n/=100;let r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function ar(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),r&&i/r*100,r*100]}function lr(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=1-Math.abs(r+r-i-1),l=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(r+r-i)*50]}function sr(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const wt="^\\s*",Ct="\\s*$",Vt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",ct="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",nn="([0-9A-Fa-f])",on="([0-9A-Fa-f]{2})",Zs=new RegExp(`${wt}hsl\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Js=new RegExp(`${wt}hsv\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Qs=new RegExp(`${wt}hsla\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),ed=new RegExp(`${wt}hsva\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),td=new RegExp(`${wt}rgb\\s*\\(${ct},${ct},${ct}\\)${Ct}`),nd=new RegExp(`${wt}rgba\\s*\\(${ct},${ct},${ct},${ct}\\)${Ct}`),dr=new RegExp(`${wt}#${nn}${nn}${nn}${Ct}`),cr=new RegExp(`${wt}#${on}${on}${on}${Ct}`),ur=new RegExp(`${wt}#${nn}${nn}${nn}${nn}${Ct}`),fr=new RegExp(`${wt}#${on}${on}${on}${on}${Ct}`);function at(e){return parseInt(e,16)}function kn(e){try{let t;if(t=Qs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Zs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function rn(e){try{let t;if(t=ed.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Js.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Qe(e){try{let t;if(t=cr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),1];if(t=td.exec(e))return[He(t[1]),He(t[5]),He(t[9]),1];if(t=nd.exec(e))return[He(t[1]),He(t[5]),He(t[9]),Rt(t[13])];if(t=dr.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),1];if(t=fr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),Rt(at(t[4])/255)];if(t=ur.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),Rt(at(t[4]+t[4])/255)];if(e in Wi)return Qe(Wi[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function od(e){return e>1?1:e<0?0:e}function rd(e,t,n){return`rgb(${He(e)}, ${He(t)}, ${He(n)})`}function hr(e,t,n,r){return`rgba(${He(e)}, ${He(t)}, ${He(n)}, ${od(r)})`}function pr(e,t,n,r,i){return He((e*t*(1-r)+n*r)/i)}function ft(e,t){Array.isArray(e)||(e=Qe(e)),Array.isArray(t)||(t=Qe(t));const n=e[3],r=t[3],i=Rt(n+r-n*r);return hr(pr(e[0],n,t[0],r,i),pr(e[1],n,t[1],r,i),pr(e[2],n,t[2],r,i),i)}function me(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e);return t.alpha?hr(n,r,i,t.alpha):hr(n,r,i,a)}function xo(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e),{lightness:l=1,alpha:s=1}=t;return $t([n*l,r*l,i*l,a*s])}function Rt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function St(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function He(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ge(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function br(e){const[t,n,r]=Array.isArray(e)?e:Qe(e);return rd(t,n,r)}function $t(e){const[t,n,r]=e;return 3 in e?`rgba(${He(t)}, ${He(n)}, ${He(r)}, ${Rt(e[3])})`:`rgba(${He(t)}, ${He(n)}, ${He(r)}, 1)`}function gr(e){return`hsv(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function an(e){const[t,n,r]=e;return 3 in e?`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function mr(e){return`hsl(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function Ht(e){const[t,n,r]=e;return 3 in e?`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function Lt(e){if(typeof e=="string"){let r;if(r=cr.exec(e))return`${r[0]}FF`;if(r=fr.exec(e))return r[0];if(r=dr.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=ur.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>He(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":He(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function Wn(e){if(typeof e=="string"){let t;if(t=cr.exec(e))return t[0];if(t=fr.exec(e))return t[0].slice(0,7);if(t=dr.exec(e)||ur.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>He(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function id(e=8){return Math.random().toString(16).slice(2,2+e)}function ad(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function ld(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(r[a]=e[a])}),Object.assign(r,n)}function zn(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){zn(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&zn(r.children,t,n)}else{if(r.type===o.Comment&&t)return;n.push(r)}}}),n}function de(e,...t){if(Array.isArray(e))e.forEach(n=>de(n,...t));else return e(...t)}function ln(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null}const Ui=new Set;function tt(e,t){const n=`[naive/${e}]: ${t}`;Ui.has(n)||(Ui.add(n),console.error(n))}function jn(e,t){console.error(`[naive/${e}]: ${t}`)}function vr(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Gi(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function Ki(e,t="default",n=void 0){const r=e[t];if(!r)return jn("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=zn(r(n));return i.length===1?i[0]:(jn("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function dy(e){return e}function Un(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!Un(t.children)):!0)?e:null}function mt(e,t){return e&&Un(e())||t()}function sd(e,t,n){return e&&Un(e(t))||n(t)}function Oe(e,t){const n=e&&Un(e());return t(n||null)}function Tn(e){return!(e&&Un(e()))}function xr(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}const yr=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),dd=/^(\d|\.)+$/,qi=/(\d|\.)+/;function lt(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(dd.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=qi.exec(e);return i?e.replace(qi,String((Number(i[0])+n)*t)):e}return e}function yo(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function cd(e){const{left:t,right:n,top:r,bottom:i}=dt(e);return`${r} ${n} ${i} ${t}`}function ud(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Xi=/\s*,(?![^(]*\))\s*/g,fd=/\s+/g;function hd(e,t){const n=[];return t.split(Xi).forEach(r=>{let i=ud(r);if(i){if(i===1){e.forEach(l=>{n.push(r.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+r)});return}let a=[r];for(;i--;){const l=[];a.forEach(s=>{e.forEach(d=>{l.push(s.replace("&",d))})}),a=l}a.forEach(l=>n.push(l))}),n}function pd(e,t){const n=[];return t.split(Xi).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function bd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=hd(t,n):t=pd(t,n))}),t.join(", ").replace(fd," ")}function Yi(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function wo(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function gd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Co(e){return e?/^\s*@(s|m)/.test(e):!1}const md=/[A-Z]/g;function Zi(e){return e.replace(md,t=>"-"+t.toLowerCase())}function vd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
2
|
+
`,document.head.appendChild(Mi);function Ii(e,t="Request failed."){let n=t;return e&&e.response&&e.response.data&&e.response.data.err_msg?n=e.response.data.err_msg:e&&e.data&&e.data.err_msg?n=e.data.err_msg:e&&e.response?n=`${e.response.statusText} (${e.response.status})`:e instanceof Error?n=e.message:typeof e=="string"&&(n=e),n}function $n(e){throw Error(Ii(e))}const Oi=o.ref("/"),Ai=o.ref("include");function Fi(){function e(){return Ai.value}function t(i){Ai.value=i}function n(){return Oi.value}function r(i){Oi.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:r}}async function ir(e,t){const n=Fi(),r=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(r,{credentials:n.getCredentials(),headers:{"Content-Type":"application/json"},...t});if(i.ok)return{data:await i.json(),response:i};$n(i)}catch(i){$n(i)}}function en(){async function e(r){return ir(r,{method:"GET"})}async function t(r,i){return ir(r,{body:JSON.stringify(i),method:"POST"})}async function n(r,i){return ir(r,{body:JSON.stringify(i),method:"PUT"})}return{GET:e,POST:t,PUT:n}}async function Vs(e,t){const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString();try{const{data:r}=await en().GET(`/api/datasets/${e}?${n}`),i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const l of r.data)for(const s in l){const d=Number(s),c=l[s];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}catch(r){$n(r)}}function Hs(e){return`/api/datasets/${e}/display`}const Di=["auto"],Nn=o.ref({});function Ls(){function e(n,r){const i=[];for(const a of n)for(const l of r){const s=a[l];s&&![...i,...Di].includes(s)&&i.push(s)}return i}async function t(n,r,i){Nn.value[n]=Nn.value[n]||{};const a=Object.keys(Nn.value[n]),l=e(r,i).filter(d=>!a.includes(d));if(l.length>0){const d=await Vs(n,l);if(d)for(const[c,f]of l.entries())Nn.value[n][f]=d[c]}const s=[];return r.forEach(d=>{const c={};i.forEach(f=>{const u=d[f];u&&!Di.includes(u)&&(c[f]=Nn.value[n][u])}),s.push(c)}),s}return{fetchColumns:t}}function Ns(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])}function Ws(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Vi(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function js(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"})])}function Us(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"})])}function Gs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 16.5V9.75m0 0 3 3m-3-3-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"})])}function Hi(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})])}function Ks(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function qs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"})])}function Xs(e,t){return o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}let mo=[];const Li=new WeakMap;function Ys(){mo.forEach(e=>e(...Li.get(e))),mo=[]}function Ni(e,...t){Li.set(e,t),!mo.includes(e)&&mo.push(e)===1&&requestAnimationFrame(Ys)}function Wn(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function kn(e){return e.composedPath()[0]||null}function ot(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function tn(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function dt(e,t){const 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 new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const Wi={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};function ji(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n)+n;return[e,r?(2-2*n/r)*100:0,r*100]}function vo(e,t,n){t/=100,n/=100;const r=n-n*t/2,i=Math.min(r,1-r);return[e,i?(n-r)/i*100:0,r*100]}function Dt(e,t,n){t/=100,n/=100;let r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5)*255,r(3)*255,r(1)*255]}function ar(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),r&&i/r*100,r*100]}function lr(e,t,n){e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=1-Math.abs(r+r-i-1),l=i&&(r==e?(t-n)/i:r==t?2+(n-e)/i:4+(e-t)/i);return[60*(l<0?l+6:l),a?i/a*100:0,(r+r-i)*50]}function sr(e,t,n){t/=100,n/=100;let r=t*Math.min(n,1-n),i=(a,l=(a+e/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const wt="^\\s*",Ct="\\s*$",Vt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",ct="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",nn="([0-9A-Fa-f])",on="([0-9A-Fa-f]{2})",Zs=new RegExp(`${wt}hsl\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Js=new RegExp(`${wt}hsv\\s*\\(${ct},${Vt},${Vt}\\)${Ct}`),Qs=new RegExp(`${wt}hsla\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),ed=new RegExp(`${wt}hsva\\s*\\(${ct},${Vt},${Vt},${ct}\\)${Ct}`),td=new RegExp(`${wt}rgb\\s*\\(${ct},${ct},${ct}\\)${Ct}`),nd=new RegExp(`${wt}rgba\\s*\\(${ct},${ct},${ct},${ct}\\)${Ct}`),dr=new RegExp(`${wt}#${nn}${nn}${nn}${Ct}`),cr=new RegExp(`${wt}#${on}${on}${on}${Ct}`),ur=new RegExp(`${wt}#${nn}${nn}${nn}${nn}${Ct}`),fr=new RegExp(`${wt}#${on}${on}${on}${on}${Ct}`);function at(e){return parseInt(e,16)}function zn(e){try{let t;if(t=Qs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Zs.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function rn(e){try{let t;if(t=ed.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),Rt(t[13])];if(t=Js.exec(e))return[St(t[1]),Ge(t[5]),Ge(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Qe(e){try{let t;if(t=cr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),1];if(t=td.exec(e))return[He(t[1]),He(t[5]),He(t[9]),1];if(t=nd.exec(e))return[He(t[1]),He(t[5]),He(t[9]),Rt(t[13])];if(t=dr.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),1];if(t=fr.exec(e))return[at(t[1]),at(t[2]),at(t[3]),Rt(at(t[4])/255)];if(t=ur.exec(e))return[at(t[1]+t[1]),at(t[2]+t[2]),at(t[3]+t[3]),Rt(at(t[4]+t[4])/255)];if(e in Wi)return Qe(Wi[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function od(e){return e>1?1:e<0?0:e}function rd(e,t,n){return`rgb(${He(e)}, ${He(t)}, ${He(n)})`}function hr(e,t,n,r){return`rgba(${He(e)}, ${He(t)}, ${He(n)}, ${od(r)})`}function pr(e,t,n,r,i){return He((e*t*(1-r)+n*r)/i)}function ft(e,t){Array.isArray(e)||(e=Qe(e)),Array.isArray(t)||(t=Qe(t));const n=e[3],r=t[3],i=Rt(n+r-n*r);return hr(pr(e[0],n,t[0],r,i),pr(e[1],n,t[1],r,i),pr(e[2],n,t[2],r,i),i)}function me(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e);return t.alpha?hr(n,r,i,t.alpha):hr(n,r,i,a)}function xo(e,t){const[n,r,i,a=1]=Array.isArray(e)?e:Qe(e),{lightness:l=1,alpha:s=1}=t;return $t([n*l,r*l,i*l,a*s])}function Rt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function St(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function He(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ge(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function br(e){const[t,n,r]=Array.isArray(e)?e:Qe(e);return rd(t,n,r)}function $t(e){const[t,n,r]=e;return 3 in e?`rgba(${He(t)}, ${He(n)}, ${He(r)}, ${Rt(e[3])})`:`rgba(${He(t)}, ${He(n)}, ${He(r)}, 1)`}function gr(e){return`hsv(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function an(e){const[t,n,r]=e;return 3 in e?`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsva(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function mr(e){return`hsl(${St(e[0])}, ${Ge(e[1])}%, ${Ge(e[2])}%)`}function Ht(e){const[t,n,r]=e;return 3 in e?`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, ${Rt(e[3])})`:`hsla(${St(t)}, ${Ge(n)}%, ${Ge(r)}%, 1)`}function Lt(e){if(typeof e=="string"){let r;if(r=cr.exec(e))return`${r[0]}FF`;if(r=fr.exec(e))return r[0];if(r=dr.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;if(r=ur.exec(e))return`#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(r=>He(r).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":He(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function jn(e){if(typeof e=="string"){let t;if(t=cr.exec(e))return t[0];if(t=fr.exec(e))return t[0].slice(0,7);if(t=dr.exec(e)||ur.exec(e))return`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}return`#${e.slice(0,3).map(t=>He(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function id(e=8){return Math.random().toString(16).slice(2,2+e)}function ad(e,t=[],n){const r={};return t.forEach(i=>{r[i]=e[i]}),Object.assign(r,n)}function ld(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(r[a]=e[a])}),Object.assign(r,n)}function Tn(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){Tn(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&Tn(r.children,t,n)}else{if(r.type===o.Comment&&t)return;n.push(r)}}}),n}function de(e,...t){if(Array.isArray(e))e.forEach(n=>de(n,...t));else return e(...t)}function ln(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?o.createTextVNode(e):typeof e=="number"?o.createTextVNode(String(e)):null}const Ui=new Set;function tt(e,t){const n=`[naive/${e}]: ${t}`;Ui.has(n)||(Ui.add(n),console.error(n))}function Un(e,t){console.error(`[naive/${e}]: ${t}`)}function vr(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Gi(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}function Ki(e,t="default",n=void 0){const r=e[t];if(!r)return Un("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=Tn(r(n));return i.length===1?i[0]:(Un("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function dy(e){return e}function Gn(e){return e.some(t=>o.isVNode(t)?!(t.type===o.Comment||t.type===o.Fragment&&!Gn(t.children)):!0)?e:null}function mt(e,t){return e&&Gn(e())||t()}function sd(e,t,n){return e&&Gn(e(t))||n(t)}function Oe(e,t){const n=e&&Gn(e());return t(n||null)}function Pn(e){return!(e&&Gn(e()))}function xr(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(r=>{r&&r(n)})}}const yr=o.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),dd=/^(\d|\.)+$/,qi=/(\d|\.)+/;function lt(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(dd.test(e)){const i=(Number(e)+n)*t;return r?i===0?"0":`${i}px`:`${i}`}else{const i=qi.exec(e);return i?e.replace(qi,String((Number(i[0])+n)*t)):e}return e}function yo(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}function cd(e){const{left:t,right:n,top:r,bottom:i}=dt(e);return`${r} ${n} ${i} ${t}`}function ud(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Xi=/\s*,(?![^(]*\))\s*/g,fd=/\s+/g;function hd(e,t){const n=[];return t.split(Xi).forEach(r=>{let i=ud(r);if(i){if(i===1){e.forEach(l=>{n.push(r.replace("&",l))});return}}else{e.forEach(l=>{n.push((l&&l+" ")+r)});return}let a=[r];for(;i--;){const l=[];a.forEach(s=>{e.forEach(d=>{l.push(s.replace("&",d))})}),a=l}a.forEach(l=>n.push(l))}),n}function pd(e,t){const n=[];return t.split(Xi).forEach(r=>{e.forEach(i=>{n.push((i&&i+" ")+r)})}),n}function bd(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=hd(t,n):t=pd(t,n))}),t.join(", ").replace(fd," ")}function Yi(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function wo(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function gd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Co(e){return e?/^\s*@(s|m)/.test(e):!1}const md=/[A-Z]/g;function Zi(e){return e.replace(md,t=>"-"+t.toLowerCase())}function vd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
3
|
`+Object.entries(e).map(n=>t+` ${Zi(n[0])}: ${n[1]};`).join(`
|
|
4
4
|
`)+`
|
|
5
5
|
`+t+"}":`: ${e};`}function xd(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function Ji(e,t,n,r){if(!t)return"";const i=xd(t,n,r);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
@@ -10,9 +10,9 @@ ${i}
|
|
|
10
10
|
`);return}s=Zi(s),d!=null&&l.push(` ${s}${vd(d)}`)}),e&&l.push("}"),l.join(`
|
|
11
11
|
`)}function wr(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))wr(r,t,n);else if(typeof r=="function"){const i=r(t);Array.isArray(i)?wr(i,t,n):i&&n(i)}else r&&n(r)})}function Qi(e,t,n,r,i){const a=e.$;let l="";if(!a||typeof a=="string")Co(a)?l=a:t.push(a);else if(typeof a=="function"){const c=a({context:r.context,props:i});Co(c)?l=c:t.push(c)}else if(a.before&&a.before(r.context),!a.$||typeof a.$=="string")Co(a.$)?l=a.$:t.push(a.$);else if(a.$){const c=a.$({context:r.context,props:i});Co(c)?l=c:t.push(c)}const s=bd(t),d=Ji(s,e.props,r,i);l?n.push(`${l} {`):d.length&&n.push(d),e.children&&wr(e.children,{context:r.context,props:i},c=>{if(typeof c=="string"){const f=Ji(s,{raw:c},r,i);n.push(f)}else Qi(c,t,n,r,i)}),t.pop(),l&&n.push("}"),a&&a.after&&a.after(r.context)}function yd(e,t,n){const r=[];return Qi(e,[],r,t,n),r.join(`
|
|
12
12
|
|
|
13
|
-
`)}function Cr(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function wd(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Yi),t.els=[];else{const a=wo(n,r);a&&i.includes(a)&&(Yi(a),t.els=i.filter(l=>l!==a))}}function ea(e,t){e.push(t)}function Cd(e,t,n,r,i,a,l,s,d){let c;if(n===void 0&&(c=t.render(r),n=Cr(c)),d){d.adapter(n,c??t.render(r));return}s===void 0&&(s=document.head);const f=wo(n,s);if(f!==null&&!a)return f;const u=f??gd(n);if(c===void 0&&(c=t.render(r)),u.textContent=c,f!==null)return f;if(l){const g=s.querySelector(`meta[name="${l}"]`);if(g)return s.insertBefore(u,g),ea(t.els,u),u}return i?s.insertBefore(u,s.querySelector("style, link")):s.appendChild(u),ea(t.els,u),u}function Sd(e){return yd(this,this.instance,e)}function $d(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return Cd(this.instance,this,t,r,i,a,l,s,n)}function kd(e={}){const{id:t,parent:n}=e;wd(this.instance,this,t,n)}const So=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Sd,mount:$d,unmount:kd}},zd=function(e,t,n,r){return Array.isArray(t)?So(e,{$:null},null,t):Array.isArray(n)?So(e,t,null,n):Array.isArray(r)?So(e,t,n,r):So(e,t,n,null)};function ta(e={}){const t={c:(...n)=>zd(t,...n),use:(n,...r)=>n.install(t,...r),find:wo,context:{},config:e};return t}function Td(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return wo(e)!==null}function Pd(e){let t=".",n="__",r="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(r=h)}const a={install(h){i=h.c;const x=h.context;x.bem={},x.bem.b=null,x.bem.els=null}};function l(h){let x,y;return{before(b){x=b.bem.b,y=b.bem.els,b.bem.els=null},after(b){b.bem.b=x,b.bem.els=y},$({context:b,props:P}){return h=typeof h=="string"?h:h({context:b,props:P}),b.bem.b=h,`${(P==null?void 0:P.bPrefix)||t}${b.bem.b}`}}}function s(h){let x;return{before(y){x=y.bem.els},after(y){y.bem.els=x},$({context:y,props:b}){return h=typeof h=="string"?h:h({context:y,props:b}),y.bem.els=h.split(",").map(P=>P.trim()),y.bem.els.map(P=>`${(b==null?void 0:b.bPrefix)||t}${y.bem.b}${n}${P}`).join(", ")}}}function d(h){return{$({context:x,props:y}){h=typeof h=="string"?h:h({context:x,props:y});const b=h.split(",").map($=>$.trim());function P($){return b.map(k=>`&${(y==null?void 0:y.bPrefix)||t}${x.bem.b}${$!==void 0?`${n}${$}`:""}${r}${k}`).join(", ")}const H=x.bem.els;if(H!==null){if(process.env.NODE_ENV!=="production"&&H.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return P(H[0])}else return P()}}}function c(h){return{$({context:x,props:y}){h=typeof h=="string"?h:h({context:x,props:y});const b=x.bem.els;if(process.env.NODE_ENV!=="production"&&b!==null&&b.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(y==null?void 0:y.bPrefix)||t}${x.bem.b}${b!==null&&b.length>0?`${n}${b[0]}`:""}${r}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(d(h[0]),h[1],h[2]),cNotM:(...h)=>i(c(h[0]),h[1],h[2])}),a}const $o=".n-",Rd="__",_d="--",na=ta(),oa=Pd({blockPrefix:$o,elementPrefix:Rd,modifierPrefix:_d});na.use(oa);const{c:I,find:uy}=na,{cB:w,cE:T,cM:W,cNotM:je}=oa;function Bd(e){return I(({props:{bPrefix:t}})=>`${t||$o}modal, ${t||$o}drawer`,[e])}function Ed(e){return I(({props:{bPrefix:t}})=>`${t||$o}popover`,[e])}const Md=(...e)=>I(">",[w(...e)]);function Q(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let Sr;function Id(){return Sr===void 0&&(Sr=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Sr}const ko=typeof document<"u"&&typeof window<"u",Od=new WeakSet;function Ad(e){Od.add(e)}function Fd(e){const t=o.ref(!!e.value);if(t.value)return o.readonly(t);const n=o.watch(e,r=>{r&&(t.value=!0,n())});return o.readonly(t)}function Xe(e){const t=o.computed(e),n=o.ref(t.value);return o.watch(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const Dd=typeof window<"u";let Pn,Gn;(()=>{var e,t;Pn=Dd?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Gn=!1,Pn!==void 0?Pn.then(()=>{Gn=!0}):Gn=!0})();function ra(e){if(Gn)return;let t=!1;o.onMounted(()=>{Gn||Pn==null||Pn.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function zo(e){return e.composedPath()[0]}const Vd={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Hd(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(zo(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=l=>{r=!t.contains(zo(l))},a=l=>{r&&(t.contains(zo(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function ia(e,t,n){const r=Vd[e];let 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=Hd(e,t,n)),a}function Ld(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=ia(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],r)}),!0}return!1}function Nd(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=ia(e,t,n);return Object.keys(i).forEach(a=>{$e(a,document,i[a],r)}),!0}return!1}function Wd(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(p,S,E){const D=p[S];return p[S]=function(){return E.apply(p,arguments),D.apply(p,arguments)},p}function a(p,S){p[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var p;return(p=l.get(this))!==null&&p!==void 0?p:null}function c(p,S){s!==void 0&&Object.defineProperty(p,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const f={bubble:{},capture:{}},u={};function g(){const p=function(S){const{type:E,eventPhase:D,bubbles:O}=S,V=zo(S);if(D===2)return;const j=D===1?"capture":"bubble";let J=V;const N=[];for(;J===null&&(J=window),N.push(J),J!==window;)J=J.parentNode||null;const U=f.capture[E],q=f.bubble[E];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",r),c(S,d),j==="capture"){if(U===void 0)return;for(let oe=N.length-1;oe>=0&&!e.has(S);--oe){const pe=N[oe],ie=U.get(pe);if(ie!==void 0){l.set(S,pe);for(const fe of ie){if(t.has(S))break;fe(S)}}if(oe===0&&!O&&q!==void 0){const fe=q.get(pe);if(fe!==void 0)for(const G of fe){if(t.has(S))break;G(S)}}}}else if(j==="bubble"){if(q===void 0)return;for(let oe=0;oe<N.length&&!e.has(S);++oe){const pe=N[oe],ie=q.get(pe);if(ie!==void 0){l.set(S,pe);for(const fe of ie){if(t.has(S))break;fe(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return p.displayName="evtdUnifiedHandler",p}function m(){const p=function(S){const{type:E,eventPhase:D}=S;if(D!==2)return;const O=u[E];O!==void 0&&O.forEach(V=>V(S))};return p.displayName="evtdUnifiedWindowEventHandler",p}const h=g(),x=m();function y(p,S){const E=f[p];return E[S]===void 0&&(E[S]=new Map,window.addEventListener(S,h,p==="capture")),E[S]}function b(p){return u[p]===void 0&&(u[p]=new Set,window.addEventListener(p,x)),u[p]}function P(p,S){let E=p.get(S);return E===void 0&&p.set(S,E=new Set),E}function H(p,S,E,D){const O=f[S][E];if(O!==void 0){const V=O.get(p);if(V!==void 0&&V.has(D))return!0}return!1}function $(p,S){const E=u[p];return!!(E!==void 0&&E.has(S))}function k(p,S,E,D){let O;if(typeof D=="object"&&D.once===!0?O=U=>{M(p,S,O,D),E(U)}:O=E,Ld(p,S,O,D))return;const j=D===!0||typeof D=="object"&&D.capture===!0?"capture":"bubble",J=y(j,p),N=P(J,S);if(N.has(O)||N.add(O),S===window){const U=b(p);U.has(O)||U.add(O)}}function M(p,S,E,D){if(Nd(p,S,E,D))return;const V=D===!0||typeof D=="object"&&D.capture===!0,j=V?"capture":"bubble",J=y(j,p),N=P(J,S);if(S===window&&!H(S,V?"bubble":"capture",p,E)&&$(p,E)){const q=u[p];q.delete(E),q.size===0&&(window.removeEventListener(p,x),u[p]=void 0)}N.has(E)&&N.delete(E),N.size===0&&J.delete(S),J.size===0&&(window.removeEventListener(p,h,j==="capture"),f[j][p]=void 0)}return{on:k,off:M}}const{on:Pe,off:$e}=Wd();function vt(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function Rn(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function To(e,t){return o.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const jd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Ud(){return jd}const $r="n-internal-select-menu",aa="n-internal-select-menu-body",la="n-modal-body",sa="n-drawer-body",da="n-popover-body",ca="__disabled__";function rt(e){const t=o.inject(la,null),n=o.inject(sa,null),r=o.inject(da,null),i=o.inject(aa,null),a=o.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};o.onMounted(()=>{Pe("fullscreenchange",document,l)}),o.onBeforeUnmount(()=>{$e("fullscreenchange",document,l)})}return Xe(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?ca:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(a.value||"body")})}rt.tdkey=ca,rt.propTo={type:[String,Object,Boolean],default:void 0};function kr(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function zr(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){zr(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&zr(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function ua(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=zr(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Nt=null;function fa(){if(Nt===null&&(Nt=document.getElementById("v-binder-view-measurer"),Nt===null)){Nt=document.createElement("div"),Nt.id="v-binder-view-measurer";const{style:e}=Nt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Nt)}return Nt.getBoundingClientRect()}function Gd(e,t){const n=fa();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Tr(e){const t=e.getBoundingClientRect(),n=fa();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function Kd(e){return e.nodeType===9?null:e.parentNode}function ha(e){if(e===null)return null;const t=Kd(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return ha(t)}const Po=o.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;o.provide("VBinder",(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=o.inject("VBinder",null),r=o.ref(null),i=b=>{r.value=b,n&&e.syncTargetWithParent&&n.setTargetRef(b)};let a=[];const l=()=>{let b=r.value;for(;b=ha(b),b!==null;)a.push(b);for(const P of a)Pe("scroll",P,u,!0)},s=()=>{for(const b of a)$e("scroll",b,u,!0);a=[]},d=new Set,c=b=>{d.size===0&&l(),d.has(b)||d.add(b)},f=b=>{d.has(b)&&d.delete(b),d.size===0&&s()},u=()=>{Ni(g)},g=()=>{d.forEach(b=>b())},m=new Set,h=b=>{m.size===0&&Pe("resize",window,y),m.has(b)||m.add(b)},x=b=>{m.has(b)&&m.delete(b),m.size===0&&$e("resize",window,y)},y=()=>{m.forEach(b=>b())};return o.onBeforeUnmount(()=>{$e("resize",window,y),s()}),{targetRef:r,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:x}},render(){return kr("binder",this.$slots)}}),Ro=o.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=o.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?o.withDirectives(ua("follower",this.$slots),[[t]]):ua("follower",this.$slots)}}),_n="@@mmoContext",pa={mounted(e,{value:t}){e[_n]={handler:void 0},typeof t=="function"&&(e[_n].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[_n];typeof t=="function"?n.handler?n.handler!==t&&($e("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[_n].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&($e("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[_n];t&&$e("mousemoveoutside",e,t),e[_n].handler=void 0}},Bn="@@coContext",Kn={mounted(e,{value:t,modifiers:n}){e[Bn]={handler:void 0},typeof t=="function"&&(e[Bn].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Bn];typeof t=="function"?r.handler?r.handler!==t&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[Bn].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):r.handler&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Bn];n&&$e("clickoutside",e,n,{capture:t.capture}),e[Bn].handler=void 0}};function qd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Xd{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&qd("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Pr=new Xd,En="@@ziContext",ba={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[En]={enabled:!!i,initialized:!1},i&&(Pr.ensureZIndex(e,r),e[En].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[En].enabled;i&&!a&&(Pr.ensureZIndex(e,r),e[En].initialized=!0),e[En].enabled=!!i},unmounted(e,t){if(!e[En].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Pr.unregister(e,r)}},Yd="@css-render/vue3-ssr";function Zd(e,t){return`<style cssr-id="${e}">
|
|
13
|
+
`)}function Cr(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function wd(e,t,n,r){const{els:i}=t;if(n===void 0)i.forEach(Yi),t.els=[];else{const a=wo(n,r);a&&i.includes(a)&&(Yi(a),t.els=i.filter(l=>l!==a))}}function ea(e,t){e.push(t)}function Cd(e,t,n,r,i,a,l,s,d){let c;if(n===void 0&&(c=t.render(r),n=Cr(c)),d){d.adapter(n,c??t.render(r));return}s===void 0&&(s=document.head);const f=wo(n,s);if(f!==null&&!a)return f;const u=f??gd(n);if(c===void 0&&(c=t.render(r)),u.textContent=c,f!==null)return f;if(l){const g=s.querySelector(`meta[name="${l}"]`);if(g)return s.insertBefore(u,g),ea(t.els,u),u}return i?s.insertBefore(u,s.querySelector("style, link")):s.appendChild(u),ea(t.els,u),u}function Sd(e){return yd(this,this.instance,e)}function $d(e={}){const{id:t,ssr:n,props:r,head:i=!1,force:a=!1,anchorMetaName:l,parent:s}=e;return Cd(this.instance,this,t,r,i,a,l,s,n)}function kd(e={}){const{id:t,parent:n}=e;wd(this.instance,this,t,n)}const So=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Sd,mount:$d,unmount:kd}},zd=function(e,t,n,r){return Array.isArray(t)?So(e,{$:null},null,t):Array.isArray(n)?So(e,t,null,n):Array.isArray(r)?So(e,t,n,r):So(e,t,n,null)};function ta(e={}){const t={c:(...n)=>zd(t,...n),use:(n,...r)=>n.install(t,...r),find:wo,context:{},config:e};return t}function Td(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return wo(e)!==null}function Pd(e){let t=".",n="__",r="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(r=h)}const a={install(h){i=h.c;const x=h.context;x.bem={},x.bem.b=null,x.bem.els=null}};function l(h){let x,y;return{before(b){x=b.bem.b,y=b.bem.els,b.bem.els=null},after(b){b.bem.b=x,b.bem.els=y},$({context:b,props:P}){return h=typeof h=="string"?h:h({context:b,props:P}),b.bem.b=h,`${(P==null?void 0:P.bPrefix)||t}${b.bem.b}`}}}function s(h){let x;return{before(y){x=y.bem.els},after(y){y.bem.els=x},$({context:y,props:b}){return h=typeof h=="string"?h:h({context:y,props:b}),y.bem.els=h.split(",").map(P=>P.trim()),y.bem.els.map(P=>`${(b==null?void 0:b.bPrefix)||t}${y.bem.b}${n}${P}`).join(", ")}}}function d(h){return{$({context:x,props:y}){h=typeof h=="string"?h:h({context:x,props:y});const b=h.split(",").map($=>$.trim());function P($){return b.map(k=>`&${(y==null?void 0:y.bPrefix)||t}${x.bem.b}${$!==void 0?`${n}${$}`:""}${r}${k}`).join(", ")}const H=x.bem.els;if(H!==null){if(process.env.NODE_ENV!=="production"&&H.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return P(H[0])}else return P()}}}function c(h){return{$({context:x,props:y}){h=typeof h=="string"?h:h({context:x,props:y});const b=x.bem.els;if(process.env.NODE_ENV!=="production"&&b!==null&&b.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(y==null?void 0:y.bPrefix)||t}${x.bem.b}${b!==null&&b.length>0?`${n}${b[0]}`:""}${r}${h})`}}}return Object.assign(a,{cB:(...h)=>i(l(h[0]),h[1],h[2]),cE:(...h)=>i(s(h[0]),h[1],h[2]),cM:(...h)=>i(d(h[0]),h[1],h[2]),cNotM:(...h)=>i(c(h[0]),h[1],h[2])}),a}const $o=".n-",Rd="__",_d="--",na=ta(),oa=Pd({blockPrefix:$o,elementPrefix:Rd,modifierPrefix:_d});na.use(oa);const{c:I,find:uy}=na,{cB:w,cE:T,cM:W,cNotM:je}=oa;function Bd(e){return I(({props:{bPrefix:t}})=>`${t||$o}modal, ${t||$o}drawer`,[e])}function Ed(e){return I(({props:{bPrefix:t}})=>`${t||$o}popover`,[e])}const Md=(...e)=>I(">",[w(...e)]);function Q(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let Sr;function Id(){return Sr===void 0&&(Sr=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Sr}const ko=typeof document<"u"&&typeof window<"u",Od=new WeakSet;function Ad(e){Od.add(e)}function Fd(e){const t=o.ref(!!e.value);if(t.value)return o.readonly(t);const n=o.watch(e,r=>{r&&(t.value=!0,n())});return o.readonly(t)}function Xe(e){const t=o.computed(e),n=o.ref(t.value);return o.watch(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const Dd=typeof window<"u";let Rn,Kn;(()=>{var e,t;Rn=Dd?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Kn=!1,Rn!==void 0?Rn.then(()=>{Kn=!0}):Kn=!0})();function ra(e){if(Kn)return;let t=!1;o.onMounted(()=>{Kn||Rn==null||Rn.then(()=>{t||e()})}),o.onBeforeUnmount(()=>{t=!0})}function zo(e){return e.composedPath()[0]}const Vd={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Hd(e,t,n){if(e==="mousemoveoutside"){const r=i=>{t.contains(zo(i))||n(i)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const i=l=>{r=!t.contains(zo(l))},a=l=>{r&&(t.contains(zo(l))||n(l))};return{mousedown:i,mouseup:a,touchstart:i,touchend:a}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function ia(e,t,n){const r=Vd[e];let 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=Hd(e,t,n)),a}function Ld(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=ia(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],r)}),!0}return!1}function Nd(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const i=ia(e,t,n);return Object.keys(i).forEach(a=>{$e(a,document,i[a],r)}),!0}return!1}function Wd(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(p,S,E){const D=p[S];return p[S]=function(){return E.apply(p,arguments),D.apply(p,arguments)},p}function a(p,S){p[S]=Event.prototype[S]}const l=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var p;return(p=l.get(this))!==null&&p!==void 0?p:null}function c(p,S){s!==void 0&&Object.defineProperty(p,"currentTarget",{configurable:!0,enumerable:!0,get:S??s.get})}const f={bubble:{},capture:{}},u={};function g(){const p=function(S){const{type:E,eventPhase:D,bubbles:O}=S,V=zo(S);if(D===2)return;const j=D===1?"capture":"bubble";let J=V;const N=[];for(;J===null&&(J=window),N.push(J),J!==window;)J=J.parentNode||null;const U=f.capture[E],q=f.bubble[E];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",r),c(S,d),j==="capture"){if(U===void 0)return;for(let oe=N.length-1;oe>=0&&!e.has(S);--oe){const pe=N[oe],ie=U.get(pe);if(ie!==void 0){l.set(S,pe);for(const fe of ie){if(t.has(S))break;fe(S)}}if(oe===0&&!O&&q!==void 0){const fe=q.get(pe);if(fe!==void 0)for(const G of fe){if(t.has(S))break;G(S)}}}}else if(j==="bubble"){if(q===void 0)return;for(let oe=0;oe<N.length&&!e.has(S);++oe){const pe=N[oe],ie=q.get(pe);if(ie!==void 0){l.set(S,pe);for(const fe of ie){if(t.has(S))break;fe(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return p.displayName="evtdUnifiedHandler",p}function m(){const p=function(S){const{type:E,eventPhase:D}=S;if(D!==2)return;const O=u[E];O!==void 0&&O.forEach(V=>V(S))};return p.displayName="evtdUnifiedWindowEventHandler",p}const h=g(),x=m();function y(p,S){const E=f[p];return E[S]===void 0&&(E[S]=new Map,window.addEventListener(S,h,p==="capture")),E[S]}function b(p){return u[p]===void 0&&(u[p]=new Set,window.addEventListener(p,x)),u[p]}function P(p,S){let E=p.get(S);return E===void 0&&p.set(S,E=new Set),E}function H(p,S,E,D){const O=f[S][E];if(O!==void 0){const V=O.get(p);if(V!==void 0&&V.has(D))return!0}return!1}function $(p,S){const E=u[p];return!!(E!==void 0&&E.has(S))}function k(p,S,E,D){let O;if(typeof D=="object"&&D.once===!0?O=U=>{M(p,S,O,D),E(U)}:O=E,Ld(p,S,O,D))return;const j=D===!0||typeof D=="object"&&D.capture===!0?"capture":"bubble",J=y(j,p),N=P(J,S);if(N.has(O)||N.add(O),S===window){const U=b(p);U.has(O)||U.add(O)}}function M(p,S,E,D){if(Nd(p,S,E,D))return;const V=D===!0||typeof D=="object"&&D.capture===!0,j=V?"capture":"bubble",J=y(j,p),N=P(J,S);if(S===window&&!H(S,V?"bubble":"capture",p,E)&&$(p,E)){const q=u[p];q.delete(E),q.size===0&&(window.removeEventListener(p,x),u[p]=void 0)}N.has(E)&&N.delete(E),N.size===0&&J.delete(S),J.size===0&&(window.removeEventListener(p,h,j==="capture"),f[j][p]=void 0)}return{on:k,off:M}}const{on:Pe,off:$e}=Wd();function vt(e,t){return o.watch(e,n=>{n!==void 0&&(t.value=n)}),o.computed(()=>e.value===void 0?t.value:e.value)}function _n(){const e=o.ref(!1);return o.onMounted(()=>{e.value=!0}),o.readonly(e)}function To(e,t){return o.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const jd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Ud(){return jd}const $r="n-internal-select-menu",aa="n-internal-select-menu-body",la="n-modal-body",sa="n-drawer-body",da="n-popover-body",ca="__disabled__";function rt(e){const t=o.inject(la,null),n=o.inject(sa,null),r=o.inject(da,null),i=o.inject(aa,null),a=o.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const l=()=>{a.value=document.fullscreenElement};o.onMounted(()=>{Pe("fullscreenchange",document,l)}),o.onBeforeUnmount(()=>{$e("fullscreenchange",document,l)})}return Xe(()=>{var l;const{to:s}=e;return s!==void 0?s===!1?ca:s===!0?a.value||"body":s:t!=null&&t.value?(l=t.value.$el)!==null&&l!==void 0?l:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:i!=null&&i.value?i.value:s??(a.value||"body")})}rt.tdkey=ca,rt.propTo={type:[String,Object,Boolean],default:void 0};function kr(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function zr(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(o.createTextVNode(String(r)));return}if(Array.isArray(r)){zr(r,t,n);return}if(r.type===o.Fragment){if(r.children===null)return;Array.isArray(r.children)&&zr(r.children,t,n)}else r.type!==o.Comment&&n.push(r)}}),n}function ua(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=zr(r());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Nt=null;function fa(){if(Nt===null&&(Nt=document.getElementById("v-binder-view-measurer"),Nt===null)){Nt=document.createElement("div"),Nt.id="v-binder-view-measurer";const{style:e}=Nt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Nt)}return Nt.getBoundingClientRect()}function Gd(e,t){const n=fa();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Tr(e){const t=e.getBoundingClientRect(),n=fa();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function Kd(e){return e.nodeType===9?null:e.parentNode}function ha(e){if(e===null)return null;const t=Kd(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+r))return t}return ha(t)}const Po=o.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;o.provide("VBinder",(t=o.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=o.inject("VBinder",null),r=o.ref(null),i=b=>{r.value=b,n&&e.syncTargetWithParent&&n.setTargetRef(b)};let a=[];const l=()=>{let b=r.value;for(;b=ha(b),b!==null;)a.push(b);for(const P of a)Pe("scroll",P,u,!0)},s=()=>{for(const b of a)$e("scroll",b,u,!0);a=[]},d=new Set,c=b=>{d.size===0&&l(),d.has(b)||d.add(b)},f=b=>{d.has(b)&&d.delete(b),d.size===0&&s()},u=()=>{Ni(g)},g=()=>{d.forEach(b=>b())},m=new Set,h=b=>{m.size===0&&Pe("resize",window,y),m.has(b)||m.add(b)},x=b=>{m.has(b)&&m.delete(b),m.size===0&&$e("resize",window,y)},y=()=>{m.forEach(b=>b())};return o.onBeforeUnmount(()=>{$e("resize",window,y),s()}),{targetRef:r,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:x}},render(){return kr("binder",this.$slots)}}),Ro=o.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=o.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?o.withDirectives(ua("follower",this.$slots),[[t]]):ua("follower",this.$slots)}}),Bn="@@mmoContext",pa={mounted(e,{value:t}){e[Bn]={handler:void 0},typeof t=="function"&&(e[Bn].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Bn];typeof t=="function"?n.handler?n.handler!==t&&($e("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[Bn].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&($e("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Bn];t&&$e("mousemoveoutside",e,t),e[Bn].handler=void 0}},En="@@coContext",qn={mounted(e,{value:t,modifiers:n}){e[En]={handler:void 0},typeof t=="function"&&(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[En];typeof t=="function"?r.handler?r.handler!==t&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[En].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):r.handler&&($e("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[En];n&&$e("clickoutside",e,n,{capture:t.capture}),e[En].handler=void 0}};function qd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Xd{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:i}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,r.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&qd("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],i=this.nextZIndex++;`${i}`!==r.style.zIndex&&(r.style.zIndex=`${i}`)})}}const Pr=new Xd,Mn="@@ziContext",ba={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n;e[Mn]={enabled:!!i,initialized:!1},i&&(Pr.ensureZIndex(e,r),e[Mn].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[Mn].enabled;i&&!a&&(Pr.ensureZIndex(e,r),e[Mn].initialized=!0),e[Mn].enabled=!!i},unmounted(e,t){if(!e[Mn].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Pr.unregister(e,r)}},Yd="@css-render/vue3-ssr";function Zd(e,t){return`<style cssr-id="${e}">
|
|
14
14
|
${t}
|
|
15
|
-
</style>`}function Jd(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Zd(e,t)))}const Qd=typeof document<"u";function Wt(){if(Qd)return;const e=o.inject(Yd,null);if(e!==null)return{adapter:(t,n)=>Jd(t,n,e),context:e}}function ga(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:kt}=ta(),_o="vueuc-style";function ma(e){return e&-e}class ec{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=ma(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*r;for(;t>0;)a+=n[t],t-=ma(t);return a}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),a=this.sum(i);if(a>t){r=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function va(e){return typeof e=="string"?document.querySelector(e):e()}const tc=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Fd(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?kr("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},kr("lazy-teleport",this.$slots)):null}}),Bo={top:"bottom",bottom:"top",left:"right",right:"left"},xa={start:"end",center:"center",end:"start"},Rr={top:"height",bottom:"height",left:"width",right:"width"},nc={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},oc={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},rc={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},ya={top:!0,bottom:!1,left:!0,right:!1},wa={top:"end",bottom:"start",left:"end",right:"start"};function ic(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let d=s??"center",c={top:0,left:0};const f=(m,h,x)=>{let y=0,b=0;const P=n[m]-t[h]-t[m];return P>0&&r&&(x?b=ya[h]?P:-P:y=ya[h]?P:-P),{left:y,top:b}},u=l==="left"||l==="right";if(d!=="center"){const m=rc[e],h=Bo[m],x=Rr[m];if(n[x]>t[x]){if(t[m]+t[x]<n[x]){const y=(n[x]-t[x])/2;t[m]<y||t[h]<y?t[m]<t[h]?(d=xa[s],c=f(x,h,u)):c=f(x,m,u):d="center"}}else n[x]<t[x]&&t[h]<0&&t[m]>t[h]&&(d=xa[s])}else{const m=l==="bottom"||l==="top"?"left":"top",h=Bo[m],x=Rr[m],y=(n[x]-t[x])/2;(t[m]<y||t[h]<y)&&(t[m]>t[h]?(d=wa[m],c=f(x,m,u)):(d=wa[h],c=f(x,h,u)))}let g=l;return t[l]<n[Rr[l]]&&t[l]<t[Bo[l]]&&(g=Bo[l]),{placement:d!=="center"?`${g}-${d}`:g,left:c.left,top:c.top}}function ac(e,t){return t?oc[e]:nc[e]}function lc(e,t,n,r,i,a){if(a)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const sc=kt([kt(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),kt(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[kt("> *",{pointerEvents:"all"})])]),Eo=o.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=o.inject("VBinder"),n=Xe(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),a=()=>{const{syncTrigger:g}=e;g.includes("scroll")&&t.addScrollListener(d),g.includes("resize")&&t.addResizeListener(d)},l=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};o.onMounted(()=>{n.value&&(d(),a())});const s=Wt();sc.mount({id:"vueuc/binder",head:!0,anchorMetaName:_o,ssr:s}),o.onBeforeUnmount(()=>{l()}),ra(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const g=r.value;if(g===null)return;const m=t.targetRef,{x:h,y:x,overlap:y}=e,b=h!==void 0&&x!==void 0?Gd(h,x):Tr(m);g.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),g.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:P,minWidth:H,placement:$,internalShift:k,flip:M}=e;g.setAttribute("v-placement",$),y?g.setAttribute("v-overlap",""):g.removeAttribute("v-overlap");const{style:p}=g;P==="target"?p.width=`${b.width}px`:P!==void 0?p.width=P:p.width="",H==="target"?p.minWidth=`${b.width}px`:H!==void 0?p.minWidth=H:p.minWidth="";const S=Tr(g),E=Tr(i.value),{left:D,top:O,placement:V}=ic($,b,S,k,M,y),j=ac(V,y),{left:J,top:N,transform:U}=lc(V,E,b,O,D,y);g.setAttribute("v-placement",V),g.style.setProperty("--v-offset-left",`${Math.round(D)}px`),g.style.setProperty("--v-offset-top",`${Math.round(O)}px`),g.style.transform=`translateX(${J}) translateY(${N}) ${U}`,g.style.setProperty("--v-transform-origin",j),g.style.transformOrigin=j};o.watch(n,g=>{g?(a(),c()):l()});const c=()=>{o.nextTick().then(d).catch(g=>console.error(g))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(g=>{o.watch(o.toRef(e,g),d)}),["teleportDisabled"].forEach(g=>{o.watch(o.toRef(e,g),c)}),o.watch(o.toRef(e,"syncTrigger"),g=>{g.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),g.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=Rn(),u=Xe(()=>{const{to:g}=e;if(g!==void 0)return g;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:u,syncPosition:d}},render(){return o.h(tc,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=o.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[o.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?o.withDirectives(n,[[ba,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var sn=[],dc=function(){return sn.some(function(e){return e.activeTargets.length>0})},cc=function(){return sn.some(function(e){return e.skippedTargets.length>0})},Ca="ResizeObserver loop completed with undelivered notifications.",uc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ca}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ca),window.dispatchEvent(e)},qn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(qn||(qn={}));var dn=function(e){return Object.freeze(e)},fc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,dn(this)}return e}(),Sa=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,dn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,d=t.width,c=t.height;return{x:n,y:r,top:i,right:a,bottom:l,left:s,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),_r=function(e){return e instanceof SVGElement&&"getBBox"in e},$a=function(e){if(_r(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},ka=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},hc=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},Xn=typeof window<"u"?window:{},Mo=new WeakMap,za=/auto|scroll/,pc=/^tb|vertical/,bc=/msie|trident/i.test(Xn.navigator&&Xn.navigator.userAgent),zt=function(e){return parseFloat(e||"0")},Mn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new fc((n?t:e)||0,(n?e:t)||0)},Ta=dn({devicePixelContentBoxSize:Mn(),borderBoxSize:Mn(),contentBoxSize:Mn(),contentRect:new Sa(0,0,0,0)}),Pa=function(e,t){if(t===void 0&&(t=!1),Mo.has(e)&&!t)return Mo.get(e);if($a(e))return Mo.set(e,Ta),Ta;var n=getComputedStyle(e),r=_r(e)&&e.ownerSVGElement&&e.getBBox(),i=!bc&&n.boxSizing==="border-box",a=pc.test(n.writingMode||""),l=!r&&za.test(n.overflowY||""),s=!r&&za.test(n.overflowX||""),d=r?0:zt(n.paddingTop),c=r?0:zt(n.paddingRight),f=r?0:zt(n.paddingBottom),u=r?0:zt(n.paddingLeft),g=r?0:zt(n.borderTopWidth),m=r?0:zt(n.borderRightWidth),h=r?0:zt(n.borderBottomWidth),x=r?0:zt(n.borderLeftWidth),y=u+c,b=d+f,P=x+m,H=g+h,$=s?e.offsetHeight-H-e.clientHeight:0,k=l?e.offsetWidth-P-e.clientWidth:0,M=i?y+P:0,p=i?b+H:0,S=r?r.width:zt(n.width)-M-k,E=r?r.height:zt(n.height)-p-$,D=S+y+k+P,O=E+b+$+H,V=dn({devicePixelContentBoxSize:Mn(Math.round(S*devicePixelRatio),Math.round(E*devicePixelRatio),a),borderBoxSize:Mn(D,O,a),contentBoxSize:Mn(S,E,a),contentRect:new Sa(u,d,S,E)});return Mo.set(e,V),V},Ra=function(e,t,n){var r=Pa(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case qn.DEVICE_PIXEL_CONTENT_BOX:return l;case qn.BORDER_BOX:return i;default:return a}},gc=function(){function e(t){var n=Pa(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return e}(),_a=function(e){if($a(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},mc=function(){var e=1/0,t=[];sn.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(c){var f=new gc(c.target),u=_a(c.target);s.push(f),c.lastReportedSize=Ra(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},Ba=function(e){sn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(_a(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},vc=function(){var e=0;for(Ba(e);dc();)e=mc(),Ba(e);return cc()&&uc(),e>0},Br,Ea=[],xc=function(){return Ea.splice(0).forEach(function(e){return e()})},yc=function(e){if(!Br){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xc()}).observe(n,r),Br=function(){n.textContent="".concat(t?t--:t++)}}Ea.push(e),Br()},wc=function(e){yc(function(){requestAnimationFrame(e)})},Io=0,Cc=function(){return!!Io},Sc=250,$c={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ma=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ia=function(e){return e===void 0&&(e=0),Date.now()+e},Er=!1,kc=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Sc),!Er){Er=!0;var r=Ia(t);wc(function(){var i=!1;try{i=vc()}finally{if(Er=!1,t=r-Ia(),!Cc())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,$c)};document.body?n():Xn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ma.forEach(function(n){return Xn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ma.forEach(function(n){return Xn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Mr=new kc,Oa=function(e){!Io&&e>0&&Mr.start(),Io+=e,!Io&&Mr.stop()},zc=function(e){return!_r(e)&&!hc(e)&&getComputedStyle(e).display==="inline"},Tc=function(){function e(t,n){this.target=t,this.observedBox=n||qn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Ra(this.target,this.observedBox,!0);return zc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Pc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Oo=new WeakMap,Aa=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ao=function(){function e(){}return e.connect=function(t,n){var r=new Pc(t,n);Oo.set(t,r)},e.observe=function(t,n,r){var i=Oo.get(t),a=i.observationTargets.length===0;Aa(i.observationTargets,n)<0&&(a&&sn.push(i),i.observationTargets.push(new Tc(n,r&&r.box)),Oa(1),Mr.schedule())},e.unobserve=function(t,n){var r=Oo.get(t),i=Aa(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&sn.splice(sn.indexOf(r),1),r.observationTargets.splice(i,1),Oa(-1))},e.disconnect=function(t){var n=this,r=Oo.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),Rc=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ao.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ka(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ka(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.unobserve(this,t)},e.prototype.disconnect=function(){Ao.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class _c{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Rc)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const Fo=new _c,jt=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:a}=e;a!==void 0&&a(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){ga("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ga("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Fo.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&Fo.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let Do;function Bc(){return typeof document>"u"?!1:(Do===void 0&&("matchMedia"in window?Do=window.matchMedia("(pointer:coarse)").matches:Do=!1),Do)}let Ir;function Fa(){return typeof document>"u"?1:(Ir===void 0&&(Ir="chrome"in window?window.devicePixelRatio:1),Ir)}const Ec=kt(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[kt("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[kt("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Mc=o.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=Wt();Ec.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:_o,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:O,defaultScrollKey:V}=e;O!=null?h({index:O}):V!=null&&h({key:V})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r){r=!0;return}h({top:u.value,left:f})}),o.onDeactivated(()=>{n=!0,r||(r=!0)});const i=o.computed(()=>{const O=new Map,{keyField:V}=e;return e.items.forEach((j,J)=>{O.set(j[V],J)}),O}),a=o.ref(null),l=o.ref(void 0),s=new Map,d=o.computed(()=>{const{items:O,itemSize:V,keyField:j}=e,J=new ec(O.length,V);return O.forEach((N,U)=>{const q=N[j],oe=s.get(q);oe!==void 0&&J.add(U,oe)}),J}),c=o.ref(0);let f=0;const u=o.ref(0),g=Xe(()=>Math.max(d.value.getBound(u.value-ot(e.paddingTop))-1,0)),m=o.computed(()=>{const{value:O}=l;if(O===void 0)return[];const{items:V,itemSize:j}=e,J=g.value,N=Math.min(J+Math.ceil(O/j+1),V.length-1),U=[];for(let q=J;q<=N;++q)U.push(V[q]);return U}),h=(O,V)=>{if(typeof O=="number"){P(O,V,"auto");return}const{left:j,top:J,index:N,key:U,position:q,behavior:oe,debounce:pe=!0}=O;if(j!==void 0||J!==void 0)P(j,J,oe);else if(N!==void 0)b(N,oe,pe);else if(U!==void 0){const ie=i.value.get(U);ie!==void 0&&b(ie,oe,pe)}else q==="bottom"?P(0,Number.MAX_SAFE_INTEGER,oe):q==="top"&&P(0,0,oe)};let x,y=null;function b(O,V,j){const{value:J}=d,N=J.sum(O)+ot(e.paddingTop);if(!j)a.value.scrollTo({left:0,top:N,behavior:V});else{x=O,y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{x=void 0,y=null},16);const{scrollTop:U,offsetHeight:q}=a.value;if(N>U){const oe=J.get(O);N+oe<=U+q||a.value.scrollTo({left:0,top:N+oe-q,behavior:V})}else a.value.scrollTo({left:0,top:N,behavior:V})}}function P(O,V,j){a.value.scrollTo({left:O,top:V,behavior:j})}function H(O,V){var j,J,N;if(n||e.ignoreItemResize||D(V.target))return;const{value:U}=d,q=i.value.get(O),oe=U.get(q),pe=(N=(J=(j=V.borderBoxSize)===null||j===void 0?void 0:j[0])===null||J===void 0?void 0:J.blockSize)!==null&&N!==void 0?N:V.contentRect.height;if(pe===oe)return;pe-e.itemSize===0?s.delete(O):s.set(O,pe-e.itemSize);const fe=pe-oe;if(fe===0)return;U.add(q,fe);const G=a.value;if(G!=null){if(x===void 0){const ee=U.sum(q);G.scrollTop>ee&&G.scrollBy(0,fe)}else if(q<x)G.scrollBy(0,fe);else if(q===x){const ee=U.sum(q);pe+ee>G.scrollTop+G.offsetHeight&&G.scrollBy(0,fe)}E()}c.value++}const $=!Bc();let k=!1;function M(O){var V;(V=e.onScroll)===null||V===void 0||V.call(e,O),(!$||!k)&&E()}function p(O){var V;if((V=e.onWheel)===null||V===void 0||V.call(e,O),$){const j=a.value;if(j!=null){if(O.deltaX===0&&(j.scrollTop===0&&O.deltaY<=0||j.scrollTop+j.offsetHeight>=j.scrollHeight&&O.deltaY>=0))return;O.preventDefault(),j.scrollTop+=O.deltaY/Fa(),j.scrollLeft+=O.deltaX/Fa(),E(),k=!0,Ni(()=>{k=!1})}}}function S(O){if(n||D(O.target)||O.contentRect.height===l.value)return;l.value=O.contentRect.height;const{onResize:V}=e;V!==void 0&&V(O)}function E(){const{value:O}=a;O!=null&&(u.value=O.scrollTop,f=O.scrollLeft)}function D(O){let V=O;for(;V!==null;){if(V.style.display==="none")return!0;V=V.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:o.computed(()=>{const{itemResizable:O}=e,V=tn(d.value.sum());return c.value,[e.itemsStyle,{boxSizing:"content-box",height:O?"":V,minHeight:O?V:"",paddingTop:tn(e.paddingTop),paddingBottom:tn(e.paddingBottom)}]}),visibleItemsStyle:o.computed(()=>(c.value,{transform:`translateY(${tn(d.value.sum(g.value))})`})),viewportItems:m,listElRef:a,itemsElRef:o.ref(null),scrollTo:h,handleListResize:S,handleListScroll:M,handleListWheel:p,handleItemResize:H}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return o.h(jt,{onResize:this.handleListResize},{default:()=>{var i,a;return o.h("div",o.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?o.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[o.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],d=n.get(s),c=this.$slots.default({item:l,index:d})[0];return e?o.h(jt,{key:s,onResize:f=>this.handleItemResize(s,f)},{default:()=>c}):(c.key=s,c)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Ic=kt(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[kt("&::-webkit-scrollbar",{width:0,height:0})]),Oc=o.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=o.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Wt();return Ic.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:_o,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return o.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),_t="v-hidden",Ac=kt("[v-hidden]",{display:"none!important"}),Da=o.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=o.ref(null),r=o.ref(null);function i(l){const{value:s}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=r.value,!s||!f)return;f.hasAttribute(_t)&&f.removeAttribute(_t);const{children:u}=s;if(l.showAllItemsBeforeCalculate)for(const H of u)H.hasAttribute(_t)&&H.removeAttribute(_t);const g=s.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let x=h?h.offsetWidth:0,y=!1;const b=s.children.length-(t.tail?1:0);for(let H=0;H<b-1;++H){if(H<0)continue;const $=u[H];if(y){$.hasAttribute(_t)||$.setAttribute(_t,"");continue}else $.hasAttribute(_t)&&$.removeAttribute(_t);const k=$.offsetWidth;if(x+=k,m[H]=k,x>g){const{updateCounter:M}=e;for(let p=H;p>=0;--p){const S=b-1-p;M!==void 0?M(S):f.textContent=`${S}`;const E=f.offsetWidth;if(x-=m[p],x+E<=g||p===0){y=!0,H=p-1,h&&(H===-1?(h.style.maxWidth=`${g-E}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:D}=e;D&&D(S);break}}}}const{onUpdateOverflow:P}=e;y?P!==void 0&&P(!0):(P!==void 0&&P(!1),f.setAttribute(_t,""))}const a=Wt();return Ac.mount({id:"vueuc/overflow",head:!0,anchorMetaName:_o,ssr:a}),o.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return o.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),o.h("div",{class:"v-overflow",ref:"selfRef"},[o.renderSlot(e,"default"),e.counter?e.counter():o.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Va(e){return e instanceof HTMLElement}function Ha(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Va(n)&&(Na(n)||Ha(n)))return!0}return!1}function La(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Va(n)&&(Na(n)||La(n)))return!0}return!1}function Na(e){if(!Fc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Fc(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Yn=[];const Dc=o.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=id(),n=o.ref(null),r=o.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Yn[Yn.length-1]===t}function d(y){var b;y.code==="Escape"&&s()&&((b=e.onEsc)===null||b===void 0||b.call(e,y))}o.onMounted(()=>{o.watch(()=>e.active,y=>{y?(u(),Pe("keydown",document,d)):($e("keydown",document,d),i&&g())},{immediate:!0})}),o.onBeforeUnmount(()=>{$e("keydown",document,d),i&&g()});function c(y){if(!a&&s()){const b=f();if(b===null||b.contains($n(y)))return;m("first")}}function f(){const y=n.value;if(y===null)return null;let b=y;for(;b=b.nextSibling,!(b===null||b instanceof Element&&b.tagName==="DIV"););return b}function u(){var y;if(!e.disabled){if(Yn.push(t),e.autoFocus){const{initialFocusTo:b}=e;b===void 0?m("first"):(y=va(b))===null||y===void 0||y.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function g(){var y;if(e.disabled||(document.removeEventListener("focus",c,!0),Yn=Yn.filter(P=>P!==t),s()))return;const{finalFocusTo:b}=e;b!==void 0?(y=va(b))===null||y===void 0||y.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function m(y){if(s()&&e.active){const b=n.value,P=r.value;if(b!==null&&P!==null){const H=f();if(H==null||H===P){a=!0,b.focus({preventScroll:!0}),a=!1;return}a=!0;const $=y==="first"?Ha(H):La(H);a=!1,$||(a=!0,b.focus({preventScroll:!0}),a=!1)}}}function h(y){if(a)return;const b=f();b!==null&&(y.relatedTarget!==null&&b.contains(y.relatedTarget)?m("last"):m("first"))}function x(y){a||(y.relatedTarget!==null&&y.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:x}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return o.h(o.Fragment,null,[o.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),o.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function Wa(e,t){t&&(o.onMounted(()=>{const{value:n}=e;n&&Fo.registerHandler(n,t)}),o.onBeforeUnmount(()=>{const{value:n}=e;n&&Fo.unregisterHandler(n)}))}function Vc(e){const t={isDeactivated:!1};let n=!1;return o.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),o.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const ja="n-form-item";function cn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=o.inject(ja,null);o.provide(ja,null);const a=o.computed(n?()=>n(i):()=>{const{size:d}=e;if(d)return d;if(i){const{mergedSize:c}=i;if(c.value!==void 0)return c.value}return t}),l=o.computed(r?()=>r(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),s=o.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return o.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ua=typeof global=="object"&&global&&global.Object===Object&&global,Hc=typeof self=="object"&&self&&self.Object===Object&&self,xt=Ua||Hc||Function("return this")(),Ut=xt.Symbol,Ga=Object.prototype,Lc=Ga.hasOwnProperty,Nc=Ga.toString,Zn=Ut?Ut.toStringTag:void 0;function Wc(e){var t=Lc.call(e,Zn),n=e[Zn];try{e[Zn]=void 0;var r=!0}catch{}var i=Nc.call(e);return r&&(t?e[Zn]=n:delete e[Zn]),i}var jc=Object.prototype,Uc=jc.toString;function Gc(e){return Uc.call(e)}var Kc="[object Null]",qc="[object Undefined]",Ka=Ut?Ut.toStringTag:void 0;function un(e){return e==null?e===void 0?qc:Kc:Ka&&Ka in Object(e)?Wc(e):Gc(e)}function Gt(e){return e!=null&&typeof e=="object"}var Xc="[object Symbol]";function Vo(e){return typeof e=="symbol"||Gt(e)&&un(e)==Xc}function qa(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 ht=Array.isArray,Yc=1/0,Xa=Ut?Ut.prototype:void 0,Ya=Xa?Xa.toString:void 0;function Za(e){if(typeof e=="string")return e;if(ht(e))return qa(e,Za)+"";if(Vo(e))return Ya?Ya.call(e):"";var t=e+"";return t=="0"&&1/e==-Yc?"-0":t}var Zc=/\s/;function Jc(e){for(var t=e.length;t--&&Zc.test(e.charAt(t)););return t}var Qc=/^\s+/;function eu(e){return e&&e.slice(0,Jc(e)+1).replace(Qc,"")}function pt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ja=NaN,tu=/^[-+]0x[0-9a-f]+$/i,nu=/^0b[01]+$/i,ou=/^0o[0-7]+$/i,ru=parseInt;function Qa(e){if(typeof e=="number")return e;if(Vo(e))return Ja;if(pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eu(e);var n=nu.test(e);return n||ou.test(e)?ru(e.slice(2),n?2:8):tu.test(e)?Ja:+e}function Or(e){return e}var iu="[object AsyncFunction]",au="[object Function]",lu="[object GeneratorFunction]",su="[object Proxy]";function Ar(e){if(!pt(e))return!1;var t=un(e);return t==au||t==lu||t==iu||t==su}var Fr=xt["__core-js_shared__"],el=function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function du(e){return!!el&&el in e}var cu=Function.prototype,uu=cu.toString;function fn(e){if(e!=null){try{return uu.call(e)}catch{}try{return e+""}catch{}}return""}var fu=/[\\^$.*+?()[\]{}|]/g,hu=/^\[object .+?Constructor\]$/,pu=Function.prototype,bu=Object.prototype,gu=pu.toString,mu=bu.hasOwnProperty,vu=RegExp("^"+gu.call(mu).replace(fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xu(e){if(!pt(e)||du(e))return!1;var t=Ar(e)?vu:hu;return t.test(fn(e))}function yu(e,t){return e==null?void 0:e[t]}function hn(e,t){var n=yu(e,t);return xu(n)?n:void 0}var Dr=hn(xt,"WeakMap"),tl=Object.create,wu=function(){function e(){}return function(t){if(!pt(t))return{};if(tl)return tl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Cu(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Su(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $u=800,ku=16,zu=Date.now;function Tu(e){var t=0,n=0;return function(){var r=zu(),i=ku-(r-n);if(n=r,i>0){if(++t>=$u)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Pu(e){return function(){return e}}var Ho=function(){try{var e=hn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ru=Ho?function(e,t){return Ho(e,"toString",{configurable:!0,enumerable:!1,value:Pu(t),writable:!0})}:Or,_u=Tu(Ru),Bu=9007199254740991,Eu=/^(?:0|[1-9]\d*)$/;function Vr(e,t){var n=typeof e;return t=t??Bu,!!t&&(n=="number"||n!="symbol"&&Eu.test(e))&&e>-1&&e%1==0&&e<t}function Hr(e,t,n){t=="__proto__"&&Ho?Ho(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){return e===t||e!==e&&t!==t}var Mu=Object.prototype,Iu=Mu.hasOwnProperty;function Ou(e,t,n){var r=e[t];(!(Iu.call(e,t)&&Jn(r,n))||n===void 0&&!(t in e))&&Hr(e,t,n)}function Au(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],d=void 0;d===void 0&&(d=e[s]),i?Hr(n,s,d):Ou(n,s,d)}return n}var nl=Math.max;function Fu(e,t,n){return t=nl(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=nl(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Cu(e,this,s)}}function Du(e,t){return _u(Fu(e,t,Or),e+"")}var Vu=9007199254740991;function Lr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Vu}function In(e){return e!=null&&Lr(e.length)&&!Ar(e)}function Hu(e,t,n){if(!pt(n))return!1;var r=typeof t;return(r=="number"?In(n)&&Vr(t,n.length):r=="string"&&t in n)?Jn(n[t],e):!1}function Lu(e){return Du(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Hu(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Nu=Object.prototype;function Nr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Nu;return e===n}function Wu(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ju="[object Arguments]";function ol(e){return Gt(e)&&un(e)==ju}var rl=Object.prototype,Uu=rl.hasOwnProperty,Gu=rl.propertyIsEnumerable,Lo=ol(function(){return arguments}())?ol:function(e){return Gt(e)&&Uu.call(e,"callee")&&!Gu.call(e,"callee")};function Ku(){return!1}var il=typeof We=="object"&&We&&!We.nodeType&&We,al=il&&typeof module=="object"&&module&&!module.nodeType&&module,qu=al&&al.exports===il,ll=qu?xt.Buffer:void 0,Xu=ll?ll.isBuffer:void 0,No=Xu||Ku,Yu="[object Arguments]",Zu="[object Array]",Ju="[object Boolean]",Qu="[object Date]",ef="[object Error]",tf="[object Function]",nf="[object Map]",of="[object Number]",rf="[object Object]",af="[object RegExp]",lf="[object Set]",sf="[object String]",df="[object WeakMap]",cf="[object ArrayBuffer]",uf="[object DataView]",ff="[object Float32Array]",hf="[object Float64Array]",pf="[object Int8Array]",bf="[object Int16Array]",gf="[object Int32Array]",mf="[object Uint8Array]",vf="[object Uint8ClampedArray]",xf="[object Uint16Array]",yf="[object Uint32Array]",Fe={};Fe[ff]=Fe[hf]=Fe[pf]=Fe[bf]=Fe[gf]=Fe[mf]=Fe[vf]=Fe[xf]=Fe[yf]=!0,Fe[Yu]=Fe[Zu]=Fe[cf]=Fe[Ju]=Fe[uf]=Fe[Qu]=Fe[ef]=Fe[tf]=Fe[nf]=Fe[of]=Fe[rf]=Fe[af]=Fe[lf]=Fe[sf]=Fe[df]=!1;function wf(e){return Gt(e)&&Lr(e.length)&&!!Fe[un(e)]}function Cf(e){return function(t){return e(t)}}var sl=typeof We=="object"&&We&&!We.nodeType&&We,Qn=sl&&typeof module=="object"&&module&&!module.nodeType&&module,Sf=Qn&&Qn.exports===sl,Wr=Sf&&Ua.process,dl=function(){try{var e=Qn&&Qn.require&&Qn.require("util").types;return e||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),cl=dl&&dl.isTypedArray,jr=cl?Cf(cl):wf,$f=Object.prototype,kf=$f.hasOwnProperty;function ul(e,t){var n=ht(e),r=!n&&Lo(e),i=!n&&!r&&No(e),a=!n&&!r&&!i&&jr(e),l=n||r||i||a,s=l?Wu(e.length,String):[],d=s.length;for(var c in e)(t||kf.call(e,c))&&!(l&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vr(c,d)))&&s.push(c);return s}function fl(e,t){return function(n){return e(t(n))}}var zf=fl(Object.keys,Object),Tf=Object.prototype,Pf=Tf.hasOwnProperty;function Rf(e){if(!Nr(e))return zf(e);var t=[];for(var n in Object(e))Pf.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ur(e){return In(e)?ul(e):Rf(e)}function _f(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Bf=Object.prototype,Ef=Bf.hasOwnProperty;function Mf(e){if(!pt(e))return _f(e);var t=Nr(e),n=[];for(var r in e)r=="constructor"&&(t||!Ef.call(e,r))||n.push(r);return n}function hl(e){return In(e)?ul(e,!0):Mf(e)}var If=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Of=/^\w*$/;function Gr(e,t){if(ht(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vo(e)?!0:Of.test(e)||!If.test(e)||t!=null&&e in Object(t)}var eo=hn(Object,"create");function Af(){this.__data__=eo?eo(null):{},this.size=0}function Ff(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Df="__lodash_hash_undefined__",Vf=Object.prototype,Hf=Vf.hasOwnProperty;function Lf(e){var t=this.__data__;if(eo){var n=t[e];return n===Df?void 0:n}return Hf.call(t,e)?t[e]:void 0}var Nf=Object.prototype,Wf=Nf.hasOwnProperty;function jf(e){var t=this.__data__;return eo?t[e]!==void 0:Wf.call(t,e)}var Uf="__lodash_hash_undefined__";function Gf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=eo&&t===void 0?Uf:t,this}function pn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pn.prototype.clear=Af,pn.prototype.delete=Ff,pn.prototype.get=Lf,pn.prototype.has=jf,pn.prototype.set=Gf;function Kf(){this.__data__=[],this.size=0}function Wo(e,t){for(var n=e.length;n--;)if(Jn(e[n][0],t))return n;return-1}var qf=Array.prototype,Xf=qf.splice;function Yf(e){var t=this.__data__,n=Wo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xf.call(t,n,1),--this.size,!0}function Zf(e){var t=this.__data__,n=Wo(t,e);return n<0?void 0:t[n][1]}function Jf(e){return Wo(this.__data__,e)>-1}function Qf(e,t){var n=this.__data__,r=Wo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Bt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bt.prototype.clear=Kf,Bt.prototype.delete=Yf,Bt.prototype.get=Zf,Bt.prototype.has=Jf,Bt.prototype.set=Qf;var to=hn(xt,"Map");function eh(){this.size=0,this.__data__={hash:new pn,map:new(to||Bt),string:new pn}}function th(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jo(e,t){var n=e.__data__;return th(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nh(e){var t=jo(this,e).delete(e);return this.size-=t?1:0,t}function oh(e){return jo(this,e).get(e)}function rh(e){return jo(this,e).has(e)}function ih(e,t){var n=jo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=eh,Et.prototype.delete=nh,Et.prototype.get=oh,Et.prototype.has=rh,Et.prototype.set=ih;var ah="Expected a function";function Kr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ah);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Kr.Cache||Et),n}Kr.Cache=Et;var lh=500;function sh(e){var t=Kr(e,function(r){return n.size===lh&&n.clear(),r}),n=t.cache;return t}var dh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ch=/\\(\\)?/g,uh=sh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dh,function(n,r,i,a){t.push(i?a.replace(ch,"$1"):r||n)}),t});function pl(e){return e==null?"":Za(e)}function bl(e,t){return ht(e)?e:Gr(e,t)?[e]:uh(pl(e))}var fh=1/0;function Uo(e){if(typeof e=="string"||Vo(e))return e;var t=e+"";return t=="0"&&1/e==-fh?"-0":t}function gl(e,t){t=bl(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Uo(t[n++])];return n&&n==r?e:void 0}function hh(e,t,n){var r=e==null?void 0:gl(e,t);return r===void 0?n:r}function ph(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ml=fl(Object.getPrototypeOf,Object),bh="[object Object]",gh=Function.prototype,mh=Object.prototype,vl=gh.toString,vh=mh.hasOwnProperty,xh=vl.call(Object);function yh(e){if(!Gt(e)||un(e)!=bh)return!1;var t=ml(e);if(t===null)return!0;var n=vh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&vl.call(n)==xh}function wh(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 Ch(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:wh(e,t,n)}var Sh="\\ud800-\\udfff",$h="\\u0300-\\u036f",kh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Th=$h+kh+zh,Ph="\\ufe0e\\ufe0f",Rh="\\u200d",_h=RegExp("["+Rh+Sh+Th+Ph+"]");function xl(e){return _h.test(e)}function Bh(e){return e.split("")}var yl="\\ud800-\\udfff",Eh="\\u0300-\\u036f",Mh="\\ufe20-\\ufe2f",Ih="\\u20d0-\\u20ff",Oh=Eh+Mh+Ih,Ah="\\ufe0e\\ufe0f",Fh="["+yl+"]",qr="["+Oh+"]",Xr="\\ud83c[\\udffb-\\udfff]",Dh="(?:"+qr+"|"+Xr+")",wl="[^"+yl+"]",Cl="(?:\\ud83c[\\udde6-\\uddff]){2}",Sl="[\\ud800-\\udbff][\\udc00-\\udfff]",Vh="\\u200d",$l=Dh+"?",kl="["+Ah+"]?",Hh="(?:"+Vh+"(?:"+[wl,Cl,Sl].join("|")+")"+kl+$l+")*",Lh=kl+$l+Hh,Nh="(?:"+[wl+qr+"?",qr,Cl,Sl,Fh].join("|")+")",Wh=RegExp(Xr+"(?="+Xr+")|"+Nh+Lh,"g");function jh(e){return e.match(Wh)||[]}function Uh(e){return xl(e)?jh(e):Bh(e)}function Gh(e){return function(t){t=pl(t);var n=xl(t)?Uh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ch(n,1).join(""):t.slice(1);return r[e]()+i}}var Kh=Gh("toUpperCase");function qh(){this.__data__=new Bt,this.size=0}function Xh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Yh(e){return this.__data__.get(e)}function Zh(e){return this.__data__.has(e)}var Jh=200;function Qh(e,t){var n=this.__data__;if(n instanceof Bt){var r=n.__data__;if(!to||r.length<Jh-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Et(r)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new Bt(e);this.size=t.size}Tt.prototype.clear=qh,Tt.prototype.delete=Xh,Tt.prototype.get=Yh,Tt.prototype.has=Zh,Tt.prototype.set=Qh;var zl=typeof We=="object"&&We&&!We.nodeType&&We,Tl=zl&&typeof module=="object"&&module&&!module.nodeType&&module,ep=Tl&&Tl.exports===zl,Pl=ep?xt.Buffer:void 0;Pl&&Pl.allocUnsafe;function tp(e,t){return e.slice()}function np(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function op(){return[]}var rp=Object.prototype,ip=rp.propertyIsEnumerable,Rl=Object.getOwnPropertySymbols,ap=Rl?function(e){return e==null?[]:(e=Object(e),np(Rl(e),function(t){return ip.call(e,t)}))}:op;function lp(e,t,n){var r=t(e);return ht(e)?r:ph(r,n(e))}function _l(e){return lp(e,Ur,ap)}var Yr=hn(xt,"DataView"),Zr=hn(xt,"Promise"),Jr=hn(xt,"Set"),Bl="[object Map]",sp="[object Object]",El="[object Promise]",Ml="[object Set]",Il="[object WeakMap]",Ol="[object DataView]",dp=fn(Yr),cp=fn(to),up=fn(Zr),fp=fn(Jr),hp=fn(Dr),Kt=un;(Yr&&Kt(new Yr(new ArrayBuffer(1)))!=Ol||to&&Kt(new to)!=Bl||Zr&&Kt(Zr.resolve())!=El||Jr&&Kt(new Jr)!=Ml||Dr&&Kt(new Dr)!=Il)&&(Kt=function(e){var t=un(e),n=t==sp?e.constructor:void 0,r=n?fn(n):"";if(r)switch(r){case dp:return Ol;case cp:return Bl;case up:return El;case fp:return Ml;case hp:return Il}return t});var Go=xt.Uint8Array;function pp(e){var t=new e.constructor(e.byteLength);return new Go(t).set(new Go(e)),t}function bp(e,t){var n=pp(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function gp(e){return typeof e.constructor=="function"&&!Nr(e)?wu(ml(e)):{}}var mp="__lodash_hash_undefined__";function vp(e){return this.__data__.set(e,mp),this}function xp(e){return this.__data__.has(e)}function Ko(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Et;++t<n;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=vp,Ko.prototype.has=xp;function yp(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wp(e,t){return e.has(t)}var Cp=1,Sp=2;function Al(e,t,n,r,i,a){var l=n&Cp,s=e.length,d=t.length;if(s!=d&&!(l&&d>s))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,g=!0,m=n&Sp?new Ko:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var h=e[u],x=t[u];if(r)var y=l?r(x,h,u,t,e,a):r(h,x,u,e,t,a);if(y!==void 0){if(y)continue;g=!1;break}if(m){if(!yp(t,function(b,P){if(!wp(m,P)&&(h===b||i(h,b,n,r,a)))return m.push(P)})){g=!1;break}}else if(!(h===x||i(h,x,n,r,a))){g=!1;break}}return a.delete(e),a.delete(t),g}function $p(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function kp(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zp=1,Tp=2,Pp="[object Boolean]",Rp="[object Date]",_p="[object Error]",Bp="[object Map]",Ep="[object Number]",Mp="[object RegExp]",Ip="[object Set]",Op="[object String]",Ap="[object Symbol]",Fp="[object ArrayBuffer]",Dp="[object DataView]",Fl=Ut?Ut.prototype:void 0,Qr=Fl?Fl.valueOf:void 0;function Vp(e,t,n,r,i,a,l){switch(n){case Dp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fp:return!(e.byteLength!=t.byteLength||!a(new Go(e),new Go(t)));case Pp:case Rp:case Ep:return Jn(+e,+t);case _p:return e.name==t.name&&e.message==t.message;case Mp:case Op:return e==t+"";case Bp:var s=$p;case Ip:var d=r&zp;if(s||(s=kp),e.size!=t.size&&!d)return!1;var c=l.get(e);if(c)return c==t;r|=Tp,l.set(e,t);var f=Al(s(e),s(t),r,i,a,l);return l.delete(e),f;case Ap:if(Qr)return Qr.call(e)==Qr.call(t)}return!1}var Hp=1,Lp=Object.prototype,Np=Lp.hasOwnProperty;function Wp(e,t,n,r,i,a){var l=n&Hp,s=_l(e),d=s.length,c=_l(t),f=c.length;if(d!=f&&!l)return!1;for(var u=d;u--;){var g=s[u];if(!(l?g in t:Np.call(t,g)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var x=!0;a.set(e,t),a.set(t,e);for(var y=l;++u<d;){g=s[u];var b=e[g],P=t[g];if(r)var H=l?r(P,b,g,t,e,a):r(b,P,g,e,t,a);if(!(H===void 0?b===P||i(b,P,n,r,a):H)){x=!1;break}y||(y=g=="constructor")}if(x&&!y){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(x=!1)}return a.delete(e),a.delete(t),x}var jp=1,Dl="[object Arguments]",Vl="[object Array]",qo="[object Object]",Up=Object.prototype,Hl=Up.hasOwnProperty;function Gp(e,t,n,r,i,a){var l=ht(e),s=ht(t),d=l?Vl:Kt(e),c=s?Vl:Kt(t);d=d==Dl?qo:d,c=c==Dl?qo:c;var f=d==qo,u=c==qo,g=d==c;if(g&&No(e)){if(!No(t))return!1;l=!0,f=!1}if(g&&!f)return a||(a=new Tt),l||jr(e)?Al(e,t,n,r,i,a):Vp(e,t,d,n,r,i,a);if(!(n&jp)){var m=f&&Hl.call(e,"__wrapped__"),h=u&&Hl.call(t,"__wrapped__");if(m||h){var x=m?e.value():e,y=h?t.value():t;return a||(a=new Tt),i(x,y,n,r,a)}}return g?(a||(a=new Tt),Wp(e,t,n,r,i,a)):!1}function ei(e,t,n,r,i){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:Gp(e,t,n,r,ei,i)}var Kp=1,qp=2;function Xp(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],d=e[s],c=l[1];if(l[2]){if(d===void 0&&!(s in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ei(c,d,Kp|qp,r,f):u))return!1}}return!0}function Ll(e){return e===e&&!pt(e)}function Yp(e){for(var t=Ur(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ll(i)]}return t}function Nl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Zp(e){var t=Yp(e);return t.length==1&&t[0][2]?Nl(t[0][0],t[0][1]):function(n){return n===e||Xp(n,e,t)}}function Jp(e,t){return e!=null&&t in Object(e)}function Qp(e,t,n){t=bl(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=Uo(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Lr(i)&&Vr(l,i)&&(ht(e)||Lo(e)))}function eb(e,t){return e!=null&&Qp(e,t,Jp)}var tb=1,nb=2;function ob(e,t){return Gr(e)&&Ll(t)?Nl(Uo(e),t):function(n){var r=hh(n,e);return r===void 0&&r===t?eb(n,e):ei(t,r,tb|nb)}}function rb(e){return function(t){return t==null?void 0:t[e]}}function ib(e){return function(t){return gl(t,e)}}function ab(e){return Gr(e)?rb(Uo(e)):ib(e)}function lb(e){return typeof e=="function"?e:e==null?Or:typeof e=="object"?ht(e)?ob(e[0],e[1]):Zp(e):ab(e)}function sb(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var d=l[++i];if(n(a[d],d,a)===!1)break}return t}}var Wl=sb();function db(e,t){return e&&Wl(e,t,Ur)}function cb(e,t){return function(n,r){if(n==null)return n;if(!In(n))return e(n,r);for(var i=n.length,a=-1,l=Object(n);++a<i&&r(l[a],a,l)!==!1;);return n}}var ub=cb(db),ti=function(){return xt.Date.now()},fb="Expected a function",hb=Math.max,pb=Math.min;function bb(e,t,n){var r,i,a,l,s,d,c=0,f=!1,u=!1,g=!0;if(typeof e!="function")throw new TypeError(fb);t=Qa(t)||0,pt(n)&&(f=!!n.leading,u="maxWait"in n,a=u?hb(Qa(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function m(M){var p=r,S=i;return r=i=void 0,c=M,l=e.apply(S,p),l}function h(M){return c=M,s=setTimeout(b,t),f?m(M):l}function x(M){var p=M-d,S=M-c,E=t-p;return u?pb(E,a-S):E}function y(M){var p=M-d,S=M-c;return d===void 0||p>=t||p<0||u&&S>=a}function b(){var M=ti();if(y(M))return P(M);s=setTimeout(b,x(M))}function P(M){return s=void 0,g&&r?m(M):(r=i=void 0,l)}function H(){s!==void 0&&clearTimeout(s),c=0,r=d=i=s=void 0}function $(){return s===void 0?l:P(ti())}function k(){var M=ti(),p=y(M);if(r=arguments,i=this,d=M,p){if(s===void 0)return h(d);if(u)return clearTimeout(s),s=setTimeout(b,t),m(d)}return s===void 0&&(s=setTimeout(b,t)),l}return k.cancel=H,k.flush=$,k}function ni(e,t,n){(n!==void 0&&!Jn(e[t],n)||n===void 0&&!(t in e))&&Hr(e,t,n)}function gb(e){return Gt(e)&&In(e)}function oi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function mb(e){return Au(e,hl(e))}function vb(e,t,n,r,i,a,l){var s=oi(e,n),d=oi(t,n),c=l.get(d);if(c){ni(e,n,c);return}var f=a?a(s,d,n+"",e,t,l):void 0,u=f===void 0;if(u){var g=ht(d),m=!g&&No(d),h=!g&&!m&&jr(d);f=d,g||m||h?ht(s)?f=s:gb(s)?f=Su(s):m?(u=!1,f=tp(d)):h?(u=!1,f=bp(d)):f=[]:yh(d)||Lo(d)?(f=s,Lo(s)?f=mb(s):(!pt(s)||Ar(s))&&(f=gp(d))):u=!1}u&&(l.set(d,f),i(f,d,r,a,l),l.delete(d)),ni(e,n,f)}function jl(e,t,n,r,i){e!==t&&Wl(t,function(a,l){if(i||(i=new Tt),pt(a))vb(e,t,l,n,jl,r,i);else{var s=r?r(oi(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),ni(e,l,s)}},hl)}function xb(e,t){var n=-1,r=In(e)?Array(e.length):[];return ub(e,function(i,a,l){r[++n]=t(i,a,l)}),r}function yb(e,t){var n=ht(e)?qa:xb;return n(e,lb(t))}var Xo=Lu(function(e,t,n){jl(e,t,n)}),wb="Expected a function";function ri(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(wb);return pt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bb(e,t,{leading:r,maxWait:t,trailing:i})}const bn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Cb,fontFamily:Sb,lineHeight:$b}=bn,Ul=I("body",`
|
|
15
|
+
</style>`}function Jd(e,t,n){const{styles:r,ids:i}=n;i.has(e)||r!==null&&(i.add(e),r.push(Zd(e,t)))}const Qd=typeof document<"u";function Wt(){if(Qd)return;const e=o.inject(Yd,null);if(e!==null)return{adapter:(t,n)=>Jd(t,n,e),context:e}}function ga(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:kt}=ta(),_o="vueuc-style";function ma(e){return e&-e}class ec{constructor(t,n){this.l=t,this.min=n;const r=new Array(t+1);for(let i=0;i<t+1;++i)r[i]=0;this.ft=r}add(t,n){if(n===0)return;const{l:r,ft:i}=this;for(t+=1;t<=r;)i[t]+=n,t+=ma(t)}get(t){return this.sum(t+1)-this.sum(t)}sum(t){if(t===void 0&&(t=this.l),t<=0)return 0;const{ft:n,min:r,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*r;for(;t>0;)a+=n[t],t-=ma(t);return a}getBound(t){let n=0,r=this.l;for(;r>n;){const i=Math.floor((n+r)/2),a=this.sum(i);if(a>t){r=i;continue}else if(a<t){if(n===i)return this.sum(n+1)<=t?n+1:i;n=i}else return i}return n}}function va(e){return typeof e=="string"?document.querySelector(e):e()}const tc=o.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Fd(o.toRef(e,"show")),mergedTo:o.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?kr("lazy-teleport",this.$slots):o.h(o.Teleport,{disabled:this.disabled,to:this.mergedTo},kr("lazy-teleport",this.$slots)):null}}),Bo={top:"bottom",bottom:"top",left:"right",right:"left"},xa={start:"end",center:"center",end:"start"},Rr={top:"height",bottom:"height",left:"width",right:"width"},nc={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},oc={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},rc={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},ya={top:!0,bottom:!1,left:!0,right:!1},wa={top:"end",bottom:"start",left:"end",right:"start"};function ic(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};const[l,s]=e.split("-");let d=s??"center",c={top:0,left:0};const f=(m,h,x)=>{let y=0,b=0;const P=n[m]-t[h]-t[m];return P>0&&r&&(x?b=ya[h]?P:-P:y=ya[h]?P:-P),{left:y,top:b}},u=l==="left"||l==="right";if(d!=="center"){const m=rc[e],h=Bo[m],x=Rr[m];if(n[x]>t[x]){if(t[m]+t[x]<n[x]){const y=(n[x]-t[x])/2;t[m]<y||t[h]<y?t[m]<t[h]?(d=xa[s],c=f(x,h,u)):c=f(x,m,u):d="center"}}else n[x]<t[x]&&t[h]<0&&t[m]>t[h]&&(d=xa[s])}else{const m=l==="bottom"||l==="top"?"left":"top",h=Bo[m],x=Rr[m],y=(n[x]-t[x])/2;(t[m]<y||t[h]<y)&&(t[m]>t[h]?(d=wa[m],c=f(x,m,u)):(d=wa[h],c=f(x,h,u)))}let g=l;return t[l]<n[Rr[l]]&&t[l]<t[Bo[l]]&&(g=Bo[l]),{placement:d!=="center"?`${g}-${d}`:g,left:c.left,top:c.top}}function ac(e,t){return t?oc[e]:nc[e]}function lc(e,t,n,r,i,a){if(a)switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"top-end":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%)"};case"right-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:""};case"left-end":return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:"translateX(-100%) translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:"translateY(-50%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:"translateX(-50%) translateY(-100%)"}}switch(e){case"bottom-start":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%)"};case"top-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"right-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:""};case"right-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-100%)"};case"left-start":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%)"};case"left-end":return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateX(-100%) translateY(-100%)"};case"top":return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateY(-100%) translateX(-50%)"};case"right":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:"translateY(-50%)"};case"left":return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-50%) translateX(-100%)"};case"bottom":default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const sc=kt([kt(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),kt(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[kt("> *",{pointerEvents:"all"})])]),Eo=o.defineComponent({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=o.inject("VBinder"),n=Xe(()=>e.enabled!==void 0?e.enabled:e.show),r=o.ref(null),i=o.ref(null),a=()=>{const{syncTrigger:g}=e;g.includes("scroll")&&t.addScrollListener(d),g.includes("resize")&&t.addResizeListener(d)},l=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};o.onMounted(()=>{n.value&&(d(),a())});const s=Wt();sc.mount({id:"vueuc/binder",head:!0,anchorMetaName:_o,ssr:s}),o.onBeforeUnmount(()=>{l()}),ra(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const g=r.value;if(g===null)return;const m=t.targetRef,{x:h,y:x,overlap:y}=e,b=h!==void 0&&x!==void 0?Gd(h,x):Tr(m);g.style.setProperty("--v-target-width",`${Math.round(b.width)}px`),g.style.setProperty("--v-target-height",`${Math.round(b.height)}px`);const{width:P,minWidth:H,placement:$,internalShift:k,flip:M}=e;g.setAttribute("v-placement",$),y?g.setAttribute("v-overlap",""):g.removeAttribute("v-overlap");const{style:p}=g;P==="target"?p.width=`${b.width}px`:P!==void 0?p.width=P:p.width="",H==="target"?p.minWidth=`${b.width}px`:H!==void 0?p.minWidth=H:p.minWidth="";const S=Tr(g),E=Tr(i.value),{left:D,top:O,placement:V}=ic($,b,S,k,M,y),j=ac(V,y),{left:J,top:N,transform:U}=lc(V,E,b,O,D,y);g.setAttribute("v-placement",V),g.style.setProperty("--v-offset-left",`${Math.round(D)}px`),g.style.setProperty("--v-offset-top",`${Math.round(O)}px`),g.style.transform=`translateX(${J}) translateY(${N}) ${U}`,g.style.setProperty("--v-transform-origin",j),g.style.transformOrigin=j};o.watch(n,g=>{g?(a(),c()):l()});const c=()=>{o.nextTick().then(d).catch(g=>console.error(g))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(g=>{o.watch(o.toRef(e,g),d)}),["teleportDisabled"].forEach(g=>{o.watch(o.toRef(e,g),c)}),o.watch(o.toRef(e,"syncTrigger"),g=>{g.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),g.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=_n(),u=Xe(()=>{const{to:g}=e;if(g!==void 0)return g;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:u,syncPosition:d}},render(){return o.h(tc,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=o.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[o.h("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?o.withDirectives(n,[[ba,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var sn=[],dc=function(){return sn.some(function(e){return e.activeTargets.length>0})},cc=function(){return sn.some(function(e){return e.skippedTargets.length>0})},Ca="ResizeObserver loop completed with undelivered notifications.",uc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ca}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ca),window.dispatchEvent(e)},Xn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Xn||(Xn={}));var dn=function(e){return Object.freeze(e)},fc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,dn(this)}return e}(),Sa=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,dn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,a=t.right,l=t.bottom,s=t.left,d=t.width,c=t.height;return{x:n,y:r,top:i,right:a,bottom:l,left:s,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),_r=function(e){return e instanceof SVGElement&&"getBBox"in e},$a=function(e){if(_r(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,l=i.offsetHeight;return!(a||l||e.getClientRects().length)},ka=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},hc=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},Yn=typeof window<"u"?window:{},Mo=new WeakMap,za=/auto|scroll/,pc=/^tb|vertical/,bc=/msie|trident/i.test(Yn.navigator&&Yn.navigator.userAgent),zt=function(e){return parseFloat(e||"0")},In=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new fc((n?t:e)||0,(n?e:t)||0)},Ta=dn({devicePixelContentBoxSize:In(),borderBoxSize:In(),contentBoxSize:In(),contentRect:new Sa(0,0,0,0)}),Pa=function(e,t){if(t===void 0&&(t=!1),Mo.has(e)&&!t)return Mo.get(e);if($a(e))return Mo.set(e,Ta),Ta;var n=getComputedStyle(e),r=_r(e)&&e.ownerSVGElement&&e.getBBox(),i=!bc&&n.boxSizing==="border-box",a=pc.test(n.writingMode||""),l=!r&&za.test(n.overflowY||""),s=!r&&za.test(n.overflowX||""),d=r?0:zt(n.paddingTop),c=r?0:zt(n.paddingRight),f=r?0:zt(n.paddingBottom),u=r?0:zt(n.paddingLeft),g=r?0:zt(n.borderTopWidth),m=r?0:zt(n.borderRightWidth),h=r?0:zt(n.borderBottomWidth),x=r?0:zt(n.borderLeftWidth),y=u+c,b=d+f,P=x+m,H=g+h,$=s?e.offsetHeight-H-e.clientHeight:0,k=l?e.offsetWidth-P-e.clientWidth:0,M=i?y+P:0,p=i?b+H:0,S=r?r.width:zt(n.width)-M-k,E=r?r.height:zt(n.height)-p-$,D=S+y+k+P,O=E+b+$+H,V=dn({devicePixelContentBoxSize:In(Math.round(S*devicePixelRatio),Math.round(E*devicePixelRatio),a),borderBoxSize:In(D,O,a),contentBoxSize:In(S,E,a),contentRect:new Sa(u,d,S,E)});return Mo.set(e,V),V},Ra=function(e,t,n){var r=Pa(e,n),i=r.borderBoxSize,a=r.contentBoxSize,l=r.devicePixelContentBoxSize;switch(t){case Xn.DEVICE_PIXEL_CONTENT_BOX:return l;case Xn.BORDER_BOX:return i;default:return a}},gc=function(){function e(t){var n=Pa(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return e}(),_a=function(e){if($a(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},mc=function(){var e=1/0,t=[];sn.forEach(function(l){if(l.activeTargets.length!==0){var s=[];l.activeTargets.forEach(function(c){var f=new gc(c.target),u=_a(c.target);s.push(f),c.lastReportedSize=Ra(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){l.callback.call(l.observer,s,l.observer)}),l.activeTargets.splice(0,l.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},Ba=function(e){sn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(_a(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},vc=function(){var e=0;for(Ba(e);dc();)e=mc(),Ba(e);return cc()&&uc(),e>0},Br,Ea=[],xc=function(){return Ea.splice(0).forEach(function(e){return e()})},yc=function(e){if(!Br){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xc()}).observe(n,r),Br=function(){n.textContent="".concat(t?t--:t++)}}Ea.push(e),Br()},wc=function(e){yc(function(){requestAnimationFrame(e)})},Io=0,Cc=function(){return!!Io},Sc=250,$c={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ma=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ia=function(e){return e===void 0&&(e=0),Date.now()+e},Er=!1,kc=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Sc),!Er){Er=!0;var r=Ia(t);wc(function(){var i=!1;try{i=vc()}finally{if(Er=!1,t=r-Ia(),!Cc())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,$c)};document.body?n():Yn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ma.forEach(function(n){return Yn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ma.forEach(function(n){return Yn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Mr=new kc,Oa=function(e){!Io&&e>0&&Mr.start(),Io+=e,!Io&&Mr.stop()},zc=function(e){return!_r(e)&&!hc(e)&&getComputedStyle(e).display==="inline"},Tc=function(){function e(t,n){this.target=t,this.observedBox=n||Xn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Ra(this.target,this.observedBox,!0);return zc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Pc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Oo=new WeakMap,Aa=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ao=function(){function e(){}return e.connect=function(t,n){var r=new Pc(t,n);Oo.set(t,r)},e.observe=function(t,n,r){var i=Oo.get(t),a=i.observationTargets.length===0;Aa(i.observationTargets,n)<0&&(a&&sn.push(i),i.observationTargets.push(new Tc(n,r&&r.box)),Oa(1),Mr.schedule())},e.unobserve=function(t,n){var r=Oo.get(t),i=Aa(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&sn.splice(sn.indexOf(r),1),r.observationTargets.splice(i,1),Oa(-1))},e.disconnect=function(t){var n=this,r=Oo.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),Rc=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ao.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ka(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ka(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ao.unobserve(this,t)},e.prototype.disconnect=function(){Ao.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class _c{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Rc)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const Fo=new _c,jt=o.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=o.getCurrentInstance().proxy;function r(i){const{onResize:a}=e;a!==void 0&&a(i)}o.onMounted(()=>{const i=n.$el;if(i===void 0){ga("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ga("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Fo.registerHandler(i.nextElementSibling,r),t=!0)}),o.onBeforeUnmount(()=>{t&&Fo.unregisterHandler(n.$el.nextElementSibling)})},render(){return o.renderSlot(this.$slots,"default")}});let Do;function Bc(){return typeof document>"u"?!1:(Do===void 0&&("matchMedia"in window?Do=window.matchMedia("(pointer:coarse)").matches:Do=!1),Do)}let Ir;function Fa(){return typeof document>"u"?1:(Ir===void 0&&(Ir="chrome"in window?window.devicePixelRatio:1),Ir)}const Ec=kt(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[kt("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[kt("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Mc=o.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){const t=Wt();Ec.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:_o,ssr:t}),o.onMounted(()=>{const{defaultScrollIndex:O,defaultScrollKey:V}=e;O!=null?h({index:O}):V!=null&&h({key:V})});let n=!1,r=!1;o.onActivated(()=>{if(n=!1,!r){r=!0;return}h({top:u.value,left:f})}),o.onDeactivated(()=>{n=!0,r||(r=!0)});const i=o.computed(()=>{const O=new Map,{keyField:V}=e;return e.items.forEach((j,J)=>{O.set(j[V],J)}),O}),a=o.ref(null),l=o.ref(void 0),s=new Map,d=o.computed(()=>{const{items:O,itemSize:V,keyField:j}=e,J=new ec(O.length,V);return O.forEach((N,U)=>{const q=N[j],oe=s.get(q);oe!==void 0&&J.add(U,oe)}),J}),c=o.ref(0);let f=0;const u=o.ref(0),g=Xe(()=>Math.max(d.value.getBound(u.value-ot(e.paddingTop))-1,0)),m=o.computed(()=>{const{value:O}=l;if(O===void 0)return[];const{items:V,itemSize:j}=e,J=g.value,N=Math.min(J+Math.ceil(O/j+1),V.length-1),U=[];for(let q=J;q<=N;++q)U.push(V[q]);return U}),h=(O,V)=>{if(typeof O=="number"){P(O,V,"auto");return}const{left:j,top:J,index:N,key:U,position:q,behavior:oe,debounce:pe=!0}=O;if(j!==void 0||J!==void 0)P(j,J,oe);else if(N!==void 0)b(N,oe,pe);else if(U!==void 0){const ie=i.value.get(U);ie!==void 0&&b(ie,oe,pe)}else q==="bottom"?P(0,Number.MAX_SAFE_INTEGER,oe):q==="top"&&P(0,0,oe)};let x,y=null;function b(O,V,j){const{value:J}=d,N=J.sum(O)+ot(e.paddingTop);if(!j)a.value.scrollTo({left:0,top:N,behavior:V});else{x=O,y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{x=void 0,y=null},16);const{scrollTop:U,offsetHeight:q}=a.value;if(N>U){const oe=J.get(O);N+oe<=U+q||a.value.scrollTo({left:0,top:N+oe-q,behavior:V})}else a.value.scrollTo({left:0,top:N,behavior:V})}}function P(O,V,j){a.value.scrollTo({left:O,top:V,behavior:j})}function H(O,V){var j,J,N;if(n||e.ignoreItemResize||D(V.target))return;const{value:U}=d,q=i.value.get(O),oe=U.get(q),pe=(N=(J=(j=V.borderBoxSize)===null||j===void 0?void 0:j[0])===null||J===void 0?void 0:J.blockSize)!==null&&N!==void 0?N:V.contentRect.height;if(pe===oe)return;pe-e.itemSize===0?s.delete(O):s.set(O,pe-e.itemSize);const fe=pe-oe;if(fe===0)return;U.add(q,fe);const G=a.value;if(G!=null){if(x===void 0){const ee=U.sum(q);G.scrollTop>ee&&G.scrollBy(0,fe)}else if(q<x)G.scrollBy(0,fe);else if(q===x){const ee=U.sum(q);pe+ee>G.scrollTop+G.offsetHeight&&G.scrollBy(0,fe)}E()}c.value++}const $=!Bc();let k=!1;function M(O){var V;(V=e.onScroll)===null||V===void 0||V.call(e,O),(!$||!k)&&E()}function p(O){var V;if((V=e.onWheel)===null||V===void 0||V.call(e,O),$){const j=a.value;if(j!=null){if(O.deltaX===0&&(j.scrollTop===0&&O.deltaY<=0||j.scrollTop+j.offsetHeight>=j.scrollHeight&&O.deltaY>=0))return;O.preventDefault(),j.scrollTop+=O.deltaY/Fa(),j.scrollLeft+=O.deltaX/Fa(),E(),k=!0,Ni(()=>{k=!1})}}}function S(O){if(n||D(O.target)||O.contentRect.height===l.value)return;l.value=O.contentRect.height;const{onResize:V}=e;V!==void 0&&V(O)}function E(){const{value:O}=a;O!=null&&(u.value=O.scrollTop,f=O.scrollLeft)}function D(O){let V=O;for(;V!==null;){if(V.style.display==="none")return!0;V=V.parentElement}return!1}return{listHeight:l,listStyle:{overflow:"auto"},keyToIndex:i,itemsStyle:o.computed(()=>{const{itemResizable:O}=e,V=tn(d.value.sum());return c.value,[e.itemsStyle,{boxSizing:"content-box",height:O?"":V,minHeight:O?V:"",paddingTop:tn(e.paddingTop),paddingBottom:tn(e.paddingBottom)}]}),visibleItemsStyle:o.computed(()=>(c.value,{transform:`translateY(${tn(d.value.sum(g.value))})`})),viewportItems:m,listElRef:a,itemsElRef:o.ref(null),scrollTo:h,handleListResize:S,handleListScroll:M,handleListWheel:p,handleItemResize:H}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:r}=this;return o.h(jt,{onResize:this.handleListResize},{default:()=>{var i,a;return o.h("div",o.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?o.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[o.h(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(l=>{const s=l[t],d=n.get(s),c=this.$slots.default({item:l,index:d})[0];return e?o.h(jt,{key:s,onResize:f=>this.handleItemResize(s,f)},{default:()=>c}):(c.key=s,c)})})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Ic=kt(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[kt("&::-webkit-scrollbar",{width:0,height:0})]),Oc=o.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=o.ref(null);function t(i){!(i.currentTarget.offsetWidth<i.currentTarget.scrollWidth)||i.deltaY===0||(i.currentTarget.scrollLeft+=i.deltaY+i.deltaX,i.preventDefault())}const n=Wt();return Ic.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:_o,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return o.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),_t="v-hidden",Ac=kt("[v-hidden]",{display:"none!important"}),Da=o.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=o.ref(null),r=o.ref(null);function i(l){const{value:s}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=r.value,!s||!f)return;f.hasAttribute(_t)&&f.removeAttribute(_t);const{children:u}=s;if(l.showAllItemsBeforeCalculate)for(const H of u)H.hasAttribute(_t)&&H.removeAttribute(_t);const g=s.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let x=h?h.offsetWidth:0,y=!1;const b=s.children.length-(t.tail?1:0);for(let H=0;H<b-1;++H){if(H<0)continue;const $=u[H];if(y){$.hasAttribute(_t)||$.setAttribute(_t,"");continue}else $.hasAttribute(_t)&&$.removeAttribute(_t);const k=$.offsetWidth;if(x+=k,m[H]=k,x>g){const{updateCounter:M}=e;for(let p=H;p>=0;--p){const S=b-1-p;M!==void 0?M(S):f.textContent=`${S}`;const E=f.offsetWidth;if(x-=m[p],x+E<=g||p===0){y=!0,H=p-1,h&&(H===-1?(h.style.maxWidth=`${g-E}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:D}=e;D&&D(S);break}}}}const{onUpdateOverflow:P}=e;y?P!==void 0&&P(!0):(P!==void 0&&P(!1),f.setAttribute(_t,""))}const a=Wt();return Ac.mount({id:"vueuc/overflow",head:!0,anchorMetaName:_o,ssr:a}),o.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){const{$slots:e}=this;return o.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),o.h("div",{class:"v-overflow",ref:"selfRef"},[o.renderSlot(e,"default"),e.counter?e.counter():o.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Va(e){return e instanceof HTMLElement}function Ha(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Va(n)&&(Na(n)||Ha(n)))return!0}return!1}function La(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Va(n)&&(Na(n)||La(n)))return!0}return!1}function Na(e){if(!Fc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Fc(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Zn=[];const Dc=o.defineComponent({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=id(),n=o.ref(null),r=o.ref(null);let i=!1,a=!1;const l=typeof document>"u"?null:document.activeElement;function s(){return Zn[Zn.length-1]===t}function d(y){var b;y.code==="Escape"&&s()&&((b=e.onEsc)===null||b===void 0||b.call(e,y))}o.onMounted(()=>{o.watch(()=>e.active,y=>{y?(u(),Pe("keydown",document,d)):($e("keydown",document,d),i&&g())},{immediate:!0})}),o.onBeforeUnmount(()=>{$e("keydown",document,d),i&&g()});function c(y){if(!a&&s()){const b=f();if(b===null||b.contains(kn(y)))return;m("first")}}function f(){const y=n.value;if(y===null)return null;let b=y;for(;b=b.nextSibling,!(b===null||b instanceof Element&&b.tagName==="DIV"););return b}function u(){var y;if(!e.disabled){if(Zn.push(t),e.autoFocus){const{initialFocusTo:b}=e;b===void 0?m("first"):(y=va(b))===null||y===void 0||y.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function g(){var y;if(e.disabled||(document.removeEventListener("focus",c,!0),Zn=Zn.filter(P=>P!==t),s()))return;const{finalFocusTo:b}=e;b!==void 0?(y=va(b))===null||y===void 0||y.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&l instanceof HTMLElement&&(a=!0,l.focus({preventScroll:!0}),a=!1)}function m(y){if(s()&&e.active){const b=n.value,P=r.value;if(b!==null&&P!==null){const H=f();if(H==null||H===P){a=!0,b.focus({preventScroll:!0}),a=!1;return}a=!0;const $=y==="first"?Ha(H):La(H);a=!1,$||(a=!0,b.focus({preventScroll:!0}),a=!1)}}}function h(y){if(a)return;const b=f();b!==null&&(y.relatedTarget!==null&&b.contains(y.relatedTarget)?m("last"):m("first"))}function x(y){a||(y.relatedTarget!==null&&y.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:x}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return o.h(o.Fragment,null,[o.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),o.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function Wa(e,t){t&&(o.onMounted(()=>{const{value:n}=e;n&&Fo.registerHandler(n,t)}),o.onBeforeUnmount(()=>{const{value:n}=e;n&&Fo.unregisterHandler(n)}))}function Vc(e){const t={isDeactivated:!1};let n=!1;return o.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),o.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const ja="n-form-item";function cn(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const i=o.inject(ja,null);o.provide(ja,null);const a=o.computed(n?()=>n(i):()=>{const{size:d}=e;if(d)return d;if(i){const{mergedSize:c}=i;if(c.value!==void 0)return c.value}return t}),l=o.computed(r?()=>r(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),s=o.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return o.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:l,mergedStatusRef:s,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}var Ua=typeof global=="object"&&global&&global.Object===Object&&global,Hc=typeof self=="object"&&self&&self.Object===Object&&self,xt=Ua||Hc||Function("return this")(),Ut=xt.Symbol,Ga=Object.prototype,Lc=Ga.hasOwnProperty,Nc=Ga.toString,Jn=Ut?Ut.toStringTag:void 0;function Wc(e){var t=Lc.call(e,Jn),n=e[Jn];try{e[Jn]=void 0;var r=!0}catch{}var i=Nc.call(e);return r&&(t?e[Jn]=n:delete e[Jn]),i}var jc=Object.prototype,Uc=jc.toString;function Gc(e){return Uc.call(e)}var Kc="[object Null]",qc="[object Undefined]",Ka=Ut?Ut.toStringTag:void 0;function un(e){return e==null?e===void 0?qc:Kc:Ka&&Ka in Object(e)?Wc(e):Gc(e)}function Gt(e){return e!=null&&typeof e=="object"}var Xc="[object Symbol]";function Vo(e){return typeof e=="symbol"||Gt(e)&&un(e)==Xc}function qa(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 ht=Array.isArray,Yc=1/0,Xa=Ut?Ut.prototype:void 0,Ya=Xa?Xa.toString:void 0;function Za(e){if(typeof e=="string")return e;if(ht(e))return qa(e,Za)+"";if(Vo(e))return Ya?Ya.call(e):"";var t=e+"";return t=="0"&&1/e==-Yc?"-0":t}var Zc=/\s/;function Jc(e){for(var t=e.length;t--&&Zc.test(e.charAt(t)););return t}var Qc=/^\s+/;function eu(e){return e&&e.slice(0,Jc(e)+1).replace(Qc,"")}function pt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ja=NaN,tu=/^[-+]0x[0-9a-f]+$/i,nu=/^0b[01]+$/i,ou=/^0o[0-7]+$/i,ru=parseInt;function Qa(e){if(typeof e=="number")return e;if(Vo(e))return Ja;if(pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eu(e);var n=nu.test(e);return n||ou.test(e)?ru(e.slice(2),n?2:8):tu.test(e)?Ja:+e}function Or(e){return e}var iu="[object AsyncFunction]",au="[object Function]",lu="[object GeneratorFunction]",su="[object Proxy]";function Ar(e){if(!pt(e))return!1;var t=un(e);return t==au||t==lu||t==iu||t==su}var Fr=xt["__core-js_shared__"],el=function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function du(e){return!!el&&el in e}var cu=Function.prototype,uu=cu.toString;function fn(e){if(e!=null){try{return uu.call(e)}catch{}try{return e+""}catch{}}return""}var fu=/[\\^$.*+?()[\]{}|]/g,hu=/^\[object .+?Constructor\]$/,pu=Function.prototype,bu=Object.prototype,gu=pu.toString,mu=bu.hasOwnProperty,vu=RegExp("^"+gu.call(mu).replace(fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function xu(e){if(!pt(e)||du(e))return!1;var t=Ar(e)?vu:hu;return t.test(fn(e))}function yu(e,t){return e==null?void 0:e[t]}function hn(e,t){var n=yu(e,t);return xu(n)?n:void 0}var Dr=hn(xt,"WeakMap"),tl=Object.create,wu=function(){function e(){}return function(t){if(!pt(t))return{};if(tl)return tl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Cu(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Su(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var $u=800,ku=16,zu=Date.now;function Tu(e){var t=0,n=0;return function(){var r=zu(),i=ku-(r-n);if(n=r,i>0){if(++t>=$u)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Pu(e){return function(){return e}}var Ho=function(){try{var e=hn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ru=Ho?function(e,t){return Ho(e,"toString",{configurable:!0,enumerable:!1,value:Pu(t),writable:!0})}:Or,_u=Tu(Ru),Bu=9007199254740991,Eu=/^(?:0|[1-9]\d*)$/;function Vr(e,t){var n=typeof e;return t=t??Bu,!!t&&(n=="number"||n!="symbol"&&Eu.test(e))&&e>-1&&e%1==0&&e<t}function Hr(e,t,n){t=="__proto__"&&Ho?Ho(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qn(e,t){return e===t||e!==e&&t!==t}var Mu=Object.prototype,Iu=Mu.hasOwnProperty;function Ou(e,t,n){var r=e[t];(!(Iu.call(e,t)&&Qn(r,n))||n===void 0&&!(t in e))&&Hr(e,t,n)}function Au(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],d=void 0;d===void 0&&(d=e[s]),i?Hr(n,s,d):Ou(n,s,d)}return n}var nl=Math.max;function Fu(e,t,n){return t=nl(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=nl(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Cu(e,this,s)}}function Du(e,t){return _u(Fu(e,t,Or),e+"")}var Vu=9007199254740991;function Lr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Vu}function On(e){return e!=null&&Lr(e.length)&&!Ar(e)}function Hu(e,t,n){if(!pt(n))return!1;var r=typeof t;return(r=="number"?On(n)&&Vr(t,n.length):r=="string"&&t in n)?Qn(n[t],e):!1}function Lu(e){return Du(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Hu(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Nu=Object.prototype;function Nr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Nu;return e===n}function Wu(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ju="[object Arguments]";function ol(e){return Gt(e)&&un(e)==ju}var rl=Object.prototype,Uu=rl.hasOwnProperty,Gu=rl.propertyIsEnumerable,Lo=ol(function(){return arguments}())?ol:function(e){return Gt(e)&&Uu.call(e,"callee")&&!Gu.call(e,"callee")};function Ku(){return!1}var il=typeof We=="object"&&We&&!We.nodeType&&We,al=il&&typeof module=="object"&&module&&!module.nodeType&&module,qu=al&&al.exports===il,ll=qu?xt.Buffer:void 0,Xu=ll?ll.isBuffer:void 0,No=Xu||Ku,Yu="[object Arguments]",Zu="[object Array]",Ju="[object Boolean]",Qu="[object Date]",ef="[object Error]",tf="[object Function]",nf="[object Map]",of="[object Number]",rf="[object Object]",af="[object RegExp]",lf="[object Set]",sf="[object String]",df="[object WeakMap]",cf="[object ArrayBuffer]",uf="[object DataView]",ff="[object Float32Array]",hf="[object Float64Array]",pf="[object Int8Array]",bf="[object Int16Array]",gf="[object Int32Array]",mf="[object Uint8Array]",vf="[object Uint8ClampedArray]",xf="[object Uint16Array]",yf="[object Uint32Array]",Fe={};Fe[ff]=Fe[hf]=Fe[pf]=Fe[bf]=Fe[gf]=Fe[mf]=Fe[vf]=Fe[xf]=Fe[yf]=!0,Fe[Yu]=Fe[Zu]=Fe[cf]=Fe[Ju]=Fe[uf]=Fe[Qu]=Fe[ef]=Fe[tf]=Fe[nf]=Fe[of]=Fe[rf]=Fe[af]=Fe[lf]=Fe[sf]=Fe[df]=!1;function wf(e){return Gt(e)&&Lr(e.length)&&!!Fe[un(e)]}function Cf(e){return function(t){return e(t)}}var sl=typeof We=="object"&&We&&!We.nodeType&&We,eo=sl&&typeof module=="object"&&module&&!module.nodeType&&module,Sf=eo&&eo.exports===sl,Wr=Sf&&Ua.process,dl=function(){try{var e=eo&&eo.require&&eo.require("util").types;return e||Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),cl=dl&&dl.isTypedArray,jr=cl?Cf(cl):wf,$f=Object.prototype,kf=$f.hasOwnProperty;function ul(e,t){var n=ht(e),r=!n&&Lo(e),i=!n&&!r&&No(e),a=!n&&!r&&!i&&jr(e),l=n||r||i||a,s=l?Wu(e.length,String):[],d=s.length;for(var c in e)(t||kf.call(e,c))&&!(l&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vr(c,d)))&&s.push(c);return s}function fl(e,t){return function(n){return e(t(n))}}var zf=fl(Object.keys,Object),Tf=Object.prototype,Pf=Tf.hasOwnProperty;function Rf(e){if(!Nr(e))return zf(e);var t=[];for(var n in Object(e))Pf.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ur(e){return On(e)?ul(e):Rf(e)}function _f(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Bf=Object.prototype,Ef=Bf.hasOwnProperty;function Mf(e){if(!pt(e))return _f(e);var t=Nr(e),n=[];for(var r in e)r=="constructor"&&(t||!Ef.call(e,r))||n.push(r);return n}function hl(e){return On(e)?ul(e,!0):Mf(e)}var If=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Of=/^\w*$/;function Gr(e,t){if(ht(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Vo(e)?!0:Of.test(e)||!If.test(e)||t!=null&&e in Object(t)}var to=hn(Object,"create");function Af(){this.__data__=to?to(null):{},this.size=0}function Ff(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Df="__lodash_hash_undefined__",Vf=Object.prototype,Hf=Vf.hasOwnProperty;function Lf(e){var t=this.__data__;if(to){var n=t[e];return n===Df?void 0:n}return Hf.call(t,e)?t[e]:void 0}var Nf=Object.prototype,Wf=Nf.hasOwnProperty;function jf(e){var t=this.__data__;return to?t[e]!==void 0:Wf.call(t,e)}var Uf="__lodash_hash_undefined__";function Gf(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=to&&t===void 0?Uf:t,this}function pn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pn.prototype.clear=Af,pn.prototype.delete=Ff,pn.prototype.get=Lf,pn.prototype.has=jf,pn.prototype.set=Gf;function Kf(){this.__data__=[],this.size=0}function Wo(e,t){for(var n=e.length;n--;)if(Qn(e[n][0],t))return n;return-1}var qf=Array.prototype,Xf=qf.splice;function Yf(e){var t=this.__data__,n=Wo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xf.call(t,n,1),--this.size,!0}function Zf(e){var t=this.__data__,n=Wo(t,e);return n<0?void 0:t[n][1]}function Jf(e){return Wo(this.__data__,e)>-1}function Qf(e,t){var n=this.__data__,r=Wo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Bt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bt.prototype.clear=Kf,Bt.prototype.delete=Yf,Bt.prototype.get=Zf,Bt.prototype.has=Jf,Bt.prototype.set=Qf;var no=hn(xt,"Map");function eh(){this.size=0,this.__data__={hash:new pn,map:new(no||Bt),string:new pn}}function th(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function jo(e,t){var n=e.__data__;return th(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nh(e){var t=jo(this,e).delete(e);return this.size-=t?1:0,t}function oh(e){return jo(this,e).get(e)}function rh(e){return jo(this,e).has(e)}function ih(e,t){var n=jo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Et(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=eh,Et.prototype.delete=nh,Et.prototype.get=oh,Et.prototype.has=rh,Et.prototype.set=ih;var ah="Expected a function";function Kr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ah);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Kr.Cache||Et),n}Kr.Cache=Et;var lh=500;function sh(e){var t=Kr(e,function(r){return n.size===lh&&n.clear(),r}),n=t.cache;return t}var dh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ch=/\\(\\)?/g,uh=sh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dh,function(n,r,i,a){t.push(i?a.replace(ch,"$1"):r||n)}),t});function pl(e){return e==null?"":Za(e)}function bl(e,t){return ht(e)?e:Gr(e,t)?[e]:uh(pl(e))}var fh=1/0;function Uo(e){if(typeof e=="string"||Vo(e))return e;var t=e+"";return t=="0"&&1/e==-fh?"-0":t}function gl(e,t){t=bl(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Uo(t[n++])];return n&&n==r?e:void 0}function hh(e,t,n){var r=e==null?void 0:gl(e,t);return r===void 0?n:r}function ph(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ml=fl(Object.getPrototypeOf,Object),bh="[object Object]",gh=Function.prototype,mh=Object.prototype,vl=gh.toString,vh=mh.hasOwnProperty,xh=vl.call(Object);function yh(e){if(!Gt(e)||un(e)!=bh)return!1;var t=ml(e);if(t===null)return!0;var n=vh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&vl.call(n)==xh}function wh(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 Ch(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:wh(e,t,n)}var Sh="\\ud800-\\udfff",$h="\\u0300-\\u036f",kh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Th=$h+kh+zh,Ph="\\ufe0e\\ufe0f",Rh="\\u200d",_h=RegExp("["+Rh+Sh+Th+Ph+"]");function xl(e){return _h.test(e)}function Bh(e){return e.split("")}var yl="\\ud800-\\udfff",Eh="\\u0300-\\u036f",Mh="\\ufe20-\\ufe2f",Ih="\\u20d0-\\u20ff",Oh=Eh+Mh+Ih,Ah="\\ufe0e\\ufe0f",Fh="["+yl+"]",qr="["+Oh+"]",Xr="\\ud83c[\\udffb-\\udfff]",Dh="(?:"+qr+"|"+Xr+")",wl="[^"+yl+"]",Cl="(?:\\ud83c[\\udde6-\\uddff]){2}",Sl="[\\ud800-\\udbff][\\udc00-\\udfff]",Vh="\\u200d",$l=Dh+"?",kl="["+Ah+"]?",Hh="(?:"+Vh+"(?:"+[wl,Cl,Sl].join("|")+")"+kl+$l+")*",Lh=kl+$l+Hh,Nh="(?:"+[wl+qr+"?",qr,Cl,Sl,Fh].join("|")+")",Wh=RegExp(Xr+"(?="+Xr+")|"+Nh+Lh,"g");function jh(e){return e.match(Wh)||[]}function Uh(e){return xl(e)?jh(e):Bh(e)}function Gh(e){return function(t){t=pl(t);var n=xl(t)?Uh(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ch(n,1).join(""):t.slice(1);return r[e]()+i}}var Kh=Gh("toUpperCase");function qh(){this.__data__=new Bt,this.size=0}function Xh(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Yh(e){return this.__data__.get(e)}function Zh(e){return this.__data__.has(e)}var Jh=200;function Qh(e,t){var n=this.__data__;if(n instanceof Bt){var r=n.__data__;if(!no||r.length<Jh-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Et(r)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new Bt(e);this.size=t.size}Tt.prototype.clear=qh,Tt.prototype.delete=Xh,Tt.prototype.get=Yh,Tt.prototype.has=Zh,Tt.prototype.set=Qh;var zl=typeof We=="object"&&We&&!We.nodeType&&We,Tl=zl&&typeof module=="object"&&module&&!module.nodeType&&module,ep=Tl&&Tl.exports===zl,Pl=ep?xt.Buffer:void 0;Pl&&Pl.allocUnsafe;function tp(e,t){return e.slice()}function np(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function op(){return[]}var rp=Object.prototype,ip=rp.propertyIsEnumerable,Rl=Object.getOwnPropertySymbols,ap=Rl?function(e){return e==null?[]:(e=Object(e),np(Rl(e),function(t){return ip.call(e,t)}))}:op;function lp(e,t,n){var r=t(e);return ht(e)?r:ph(r,n(e))}function _l(e){return lp(e,Ur,ap)}var Yr=hn(xt,"DataView"),Zr=hn(xt,"Promise"),Jr=hn(xt,"Set"),Bl="[object Map]",sp="[object Object]",El="[object Promise]",Ml="[object Set]",Il="[object WeakMap]",Ol="[object DataView]",dp=fn(Yr),cp=fn(no),up=fn(Zr),fp=fn(Jr),hp=fn(Dr),Kt=un;(Yr&&Kt(new Yr(new ArrayBuffer(1)))!=Ol||no&&Kt(new no)!=Bl||Zr&&Kt(Zr.resolve())!=El||Jr&&Kt(new Jr)!=Ml||Dr&&Kt(new Dr)!=Il)&&(Kt=function(e){var t=un(e),n=t==sp?e.constructor:void 0,r=n?fn(n):"";if(r)switch(r){case dp:return Ol;case cp:return Bl;case up:return El;case fp:return Ml;case hp:return Il}return t});var Go=xt.Uint8Array;function pp(e){var t=new e.constructor(e.byteLength);return new Go(t).set(new Go(e)),t}function bp(e,t){var n=pp(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function gp(e){return typeof e.constructor=="function"&&!Nr(e)?wu(ml(e)):{}}var mp="__lodash_hash_undefined__";function vp(e){return this.__data__.set(e,mp),this}function xp(e){return this.__data__.has(e)}function Ko(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Et;++t<n;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=vp,Ko.prototype.has=xp;function yp(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wp(e,t){return e.has(t)}var Cp=1,Sp=2;function Al(e,t,n,r,i,a){var l=n&Cp,s=e.length,d=t.length;if(s!=d&&!(l&&d>s))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,g=!0,m=n&Sp?new Ko:void 0;for(a.set(e,t),a.set(t,e);++u<s;){var h=e[u],x=t[u];if(r)var y=l?r(x,h,u,t,e,a):r(h,x,u,e,t,a);if(y!==void 0){if(y)continue;g=!1;break}if(m){if(!yp(t,function(b,P){if(!wp(m,P)&&(h===b||i(h,b,n,r,a)))return m.push(P)})){g=!1;break}}else if(!(h===x||i(h,x,n,r,a))){g=!1;break}}return a.delete(e),a.delete(t),g}function $p(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function kp(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zp=1,Tp=2,Pp="[object Boolean]",Rp="[object Date]",_p="[object Error]",Bp="[object Map]",Ep="[object Number]",Mp="[object RegExp]",Ip="[object Set]",Op="[object String]",Ap="[object Symbol]",Fp="[object ArrayBuffer]",Dp="[object DataView]",Fl=Ut?Ut.prototype:void 0,Qr=Fl?Fl.valueOf:void 0;function Vp(e,t,n,r,i,a,l){switch(n){case Dp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fp:return!(e.byteLength!=t.byteLength||!a(new Go(e),new Go(t)));case Pp:case Rp:case Ep:return Qn(+e,+t);case _p:return e.name==t.name&&e.message==t.message;case Mp:case Op:return e==t+"";case Bp:var s=$p;case Ip:var d=r&zp;if(s||(s=kp),e.size!=t.size&&!d)return!1;var c=l.get(e);if(c)return c==t;r|=Tp,l.set(e,t);var f=Al(s(e),s(t),r,i,a,l);return l.delete(e),f;case Ap:if(Qr)return Qr.call(e)==Qr.call(t)}return!1}var Hp=1,Lp=Object.prototype,Np=Lp.hasOwnProperty;function Wp(e,t,n,r,i,a){var l=n&Hp,s=_l(e),d=s.length,c=_l(t),f=c.length;if(d!=f&&!l)return!1;for(var u=d;u--;){var g=s[u];if(!(l?g in t:Np.call(t,g)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var x=!0;a.set(e,t),a.set(t,e);for(var y=l;++u<d;){g=s[u];var b=e[g],P=t[g];if(r)var H=l?r(P,b,g,t,e,a):r(b,P,g,e,t,a);if(!(H===void 0?b===P||i(b,P,n,r,a):H)){x=!1;break}y||(y=g=="constructor")}if(x&&!y){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(x=!1)}return a.delete(e),a.delete(t),x}var jp=1,Dl="[object Arguments]",Vl="[object Array]",qo="[object Object]",Up=Object.prototype,Hl=Up.hasOwnProperty;function Gp(e,t,n,r,i,a){var l=ht(e),s=ht(t),d=l?Vl:Kt(e),c=s?Vl:Kt(t);d=d==Dl?qo:d,c=c==Dl?qo:c;var f=d==qo,u=c==qo,g=d==c;if(g&&No(e)){if(!No(t))return!1;l=!0,f=!1}if(g&&!f)return a||(a=new Tt),l||jr(e)?Al(e,t,n,r,i,a):Vp(e,t,d,n,r,i,a);if(!(n&jp)){var m=f&&Hl.call(e,"__wrapped__"),h=u&&Hl.call(t,"__wrapped__");if(m||h){var x=m?e.value():e,y=h?t.value():t;return a||(a=new Tt),i(x,y,n,r,a)}}return g?(a||(a=new Tt),Wp(e,t,n,r,i,a)):!1}function ei(e,t,n,r,i){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:Gp(e,t,n,r,ei,i)}var Kp=1,qp=2;function Xp(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var l=n[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=n[i];var s=l[0],d=e[s],c=l[1];if(l[2]){if(d===void 0&&!(s in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ei(c,d,Kp|qp,r,f):u))return!1}}return!0}function Ll(e){return e===e&&!pt(e)}function Yp(e){for(var t=Ur(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ll(i)]}return t}function Nl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Zp(e){var t=Yp(e);return t.length==1&&t[0][2]?Nl(t[0][0],t[0][1]):function(n){return n===e||Xp(n,e,t)}}function Jp(e,t){return e!=null&&t in Object(e)}function Qp(e,t,n){t=bl(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=Uo(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Lr(i)&&Vr(l,i)&&(ht(e)||Lo(e)))}function eb(e,t){return e!=null&&Qp(e,t,Jp)}var tb=1,nb=2;function ob(e,t){return Gr(e)&&Ll(t)?Nl(Uo(e),t):function(n){var r=hh(n,e);return r===void 0&&r===t?eb(n,e):ei(t,r,tb|nb)}}function rb(e){return function(t){return t==null?void 0:t[e]}}function ib(e){return function(t){return gl(t,e)}}function ab(e){return Gr(e)?rb(Uo(e)):ib(e)}function lb(e){return typeof e=="function"?e:e==null?Or:typeof e=="object"?ht(e)?ob(e[0],e[1]):Zp(e):ab(e)}function sb(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var d=l[++i];if(n(a[d],d,a)===!1)break}return t}}var Wl=sb();function db(e,t){return e&&Wl(e,t,Ur)}function cb(e,t){return function(n,r){if(n==null)return n;if(!On(n))return e(n,r);for(var i=n.length,a=-1,l=Object(n);++a<i&&r(l[a],a,l)!==!1;);return n}}var ub=cb(db),ti=function(){return xt.Date.now()},fb="Expected a function",hb=Math.max,pb=Math.min;function bb(e,t,n){var r,i,a,l,s,d,c=0,f=!1,u=!1,g=!0;if(typeof e!="function")throw new TypeError(fb);t=Qa(t)||0,pt(n)&&(f=!!n.leading,u="maxWait"in n,a=u?hb(Qa(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function m(M){var p=r,S=i;return r=i=void 0,c=M,l=e.apply(S,p),l}function h(M){return c=M,s=setTimeout(b,t),f?m(M):l}function x(M){var p=M-d,S=M-c,E=t-p;return u?pb(E,a-S):E}function y(M){var p=M-d,S=M-c;return d===void 0||p>=t||p<0||u&&S>=a}function b(){var M=ti();if(y(M))return P(M);s=setTimeout(b,x(M))}function P(M){return s=void 0,g&&r?m(M):(r=i=void 0,l)}function H(){s!==void 0&&clearTimeout(s),c=0,r=d=i=s=void 0}function $(){return s===void 0?l:P(ti())}function k(){var M=ti(),p=y(M);if(r=arguments,i=this,d=M,p){if(s===void 0)return h(d);if(u)return clearTimeout(s),s=setTimeout(b,t),m(d)}return s===void 0&&(s=setTimeout(b,t)),l}return k.cancel=H,k.flush=$,k}function ni(e,t,n){(n!==void 0&&!Qn(e[t],n)||n===void 0&&!(t in e))&&Hr(e,t,n)}function gb(e){return Gt(e)&&On(e)}function oi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function mb(e){return Au(e,hl(e))}function vb(e,t,n,r,i,a,l){var s=oi(e,n),d=oi(t,n),c=l.get(d);if(c){ni(e,n,c);return}var f=a?a(s,d,n+"",e,t,l):void 0,u=f===void 0;if(u){var g=ht(d),m=!g&&No(d),h=!g&&!m&&jr(d);f=d,g||m||h?ht(s)?f=s:gb(s)?f=Su(s):m?(u=!1,f=tp(d)):h?(u=!1,f=bp(d)):f=[]:yh(d)||Lo(d)?(f=s,Lo(s)?f=mb(s):(!pt(s)||Ar(s))&&(f=gp(d))):u=!1}u&&(l.set(d,f),i(f,d,r,a,l),l.delete(d)),ni(e,n,f)}function jl(e,t,n,r,i){e!==t&&Wl(t,function(a,l){if(i||(i=new Tt),pt(a))vb(e,t,l,n,jl,r,i);else{var s=r?r(oi(e,l),a,l+"",e,t,i):void 0;s===void 0&&(s=a),ni(e,l,s)}},hl)}function xb(e,t){var n=-1,r=On(e)?Array(e.length):[];return ub(e,function(i,a,l){r[++n]=t(i,a,l)}),r}function yb(e,t){var n=ht(e)?qa:xb;return n(e,lb(t))}var Xo=Lu(function(e,t,n){jl(e,t,n)}),wb="Expected a function";function ri(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(wb);return pt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bb(e,t,{leading:r,maxWait:t,trailing:i})}const bn={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:Cb,fontFamily:Sb,lineHeight:$b}=bn,Ul=I("body",`
|
|
16
16
|
margin: 0;
|
|
17
17
|
font-size: ${Cb};
|
|
18
18
|
font-family: ${Sb};
|
|
@@ -22,13 +22,13 @@ ${t}
|
|
|
22
22
|
`,[I("input",`
|
|
23
23
|
font-family: inherit;
|
|
24
24
|
font-size: inherit;
|
|
25
|
-
`)]),gn="n-config-provider",no="naive-ui-style";function hy(e){return e}function ye(e,t,n,r,i,a){const l=Wt(),s=o.inject(gn,null);if(n){const c=()=>{const f=a==null?void 0:a.value;n.mount({id:f===void 0?t:f+t,head:!0,props:{bPrefix:f?`.${f}-`:void 0},anchorMetaName:no,ssr:l}),s!=null&&s.preflightStyleDisabled||Ul.mount({id:"n-global",head:!0,anchorMetaName:no,ssr:l})};l?c():o.onBeforeMount(c)}return o.computed(()=>{var c;const{theme:{common:f,self:u,peers:g={}}={},themeOverrides:m={},builtinThemeOverrides:h={}}=i,{common:x,peers:y}=m,{common:b=void 0,[e]:{common:P=void 0,self:H=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:k=void 0,[e]:M={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:p,peers:S={}}=M,E=Xo({},f||P||b||r.common,k,p,x),D=Xo((c=u||H||r.self)===null||c===void 0?void 0:c(E),h,M,m);return{common:E,self:D,peers:Xo({},r.peers,$,g),peerOverrides:Xo({},h.peers,S,y)}})}ye.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const kb="n";function Ke(e={},t={defaultBordered:!0}){const n=o.inject(gn,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:o.computed(()=>{var r,i;const{bordered:a}=e;return a!==void 0?a:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:o.shallowRef(kb),namespaceRef:o.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const zb={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:"RRRR-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"}};function ii(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function oo(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,d=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[d]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function ro(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Pb(s,function(u){return u.test(l)}):Tb(s,function(u){return u.test(l)}),c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(l.length);return{value:c,rest:f}}}function Tb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Pb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Rb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var _b={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"}},Bb=function(t,n,r){var i,a=_b[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},Eb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ib={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ob={date:ii({formats:Eb,defaultWidth:"full"}),time:ii({formats:Mb,defaultWidth:"full"}),dateTime:ii({formats:Ib,defaultWidth:"full"})},Ab={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fb=function(t,n,r,i){return Ab[t]},Db={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hb={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"]},Lb={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"]},Nb={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"}},Wb={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"}},jb=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ub={ordinalNumber:jb,era:oo({values:Db,defaultWidth:"wide"}),quarter:oo({values:Vb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:oo({values:Hb,defaultWidth:"wide"}),day:oo({values:Lb,defaultWidth:"wide"}),dayPeriod:oo({values:Nb,defaultWidth:"wide",formattingValues:Wb,defaultFormattingWidth:"wide"})},Gb=/^(\d+)(th|st|nd|rd)?/i,Kb=/\d+/i,qb={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},Xb={any:[/^b/i,/^(a|c)/i]},Yb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zb={any:[/1/i,/2/i,/3/i,/4/i]},Jb={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},Qb={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]},eg={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},tg={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]},ng={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},og={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}},rg={ordinalNumber:Rb({matchPattern:Gb,parsePattern:Kb,valueCallback:function(t){return parseInt(t,10)}}),era:ro({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),quarter:ro({matchPatterns:Yb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ro({matchPatterns:Jb,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any"}),day:ro({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:tg,defaultParseWidth:"any"}),dayPeriod:ro({matchPatterns:ng,defaultMatchWidth:"any",parsePatterns:og,defaultParseWidth:"any"})},ig={code:"en-US",formatDistance:Bb,formatLong:Ob,formatRelative:Fb,localize:Ub,match:rg,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ag={name:"en-US",locale:ig};function io(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=o.inject(gn,null)||{},r=o.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:zb[e]});return{dateLocaleRef:o.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:ag}),localeRef:r}}function mn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&vr("use-style","No style is specified.");return}const r=Wt(),i=o.inject(gn,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:no,props:{bPrefix:l?`.${l}-`:void 0},ssr:r}),i!=null&&i.preflightStyleDisabled||Ul.mount({id:"n-global",head:!0,anchorMetaName:no,ssr:r})};r?a():o.onBeforeMount(a)}function et(e,t,n,r){var i;n||vr("useThemeClass","cssVarsRef is not passed");const a=(i=o.inject(gn,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=o.ref(""),s=Wt();let d;const c=`__${e}`,f=()=>{let u=c;const g=t?t.value:void 0,m=a==null?void 0:a.value;m&&(u+=`-${m}`),g&&(u+=`-${g}`);const{themeOverrides:h,builtinThemeOverrides:x}=r;h&&(u+=`-${Cr(JSON.stringify(h))}`),x&&(u+=`-${Cr(JSON.stringify(x))}`),l.value=u,d=()=>{const y=n.value;let b="";for(const P in y)b+=`${P}: ${y[P]};`;I(`.${u}`,b).mount({id:u,ssr:s}),d=void 0}};return o.watchEffect(()=>{f()}),{themeClass:l,onRender:()=>{d==null||d()}}}function qt(e,t,n){if(!t)return;const r=Wt(),i=o.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{o.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if(Td(s,r))return;const{value:d}=i;d&&d.style.mount({id:s,head:!0,anchorMetaName:no,props:{bPrefix:l?`.${l}-`:void 0},ssr:r})})};return r?a():o.onBeforeMount(a),i}const Gl=o.defineComponent({name:"Add",render(){return o.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function On(e,t){return o.defineComponent({name:Kh(e),setup(){var n;const r=(n=o.inject(gn,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const lg=o.defineComponent({name:"Checkmark",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},o.h("g",{fill:"none"},o.h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),Kl=On("close",o.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),sg=o.defineComponent({name:"Eye",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),o.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),dg=o.defineComponent({name:"EyeOff",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),o.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),o.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),o.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),o.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),cg=o.defineComponent({name:"Empty",render(){return o.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),o.h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ug=On("error",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),fg=On("info",o.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),hg=o.defineComponent({name:"Remove",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
25
|
+
`)]),gn="n-config-provider",oo="naive-ui-style";function hy(e){return e}function ye(e,t,n,r,i,a){const l=Wt(),s=o.inject(gn,null);if(n){const c=()=>{const f=a==null?void 0:a.value;n.mount({id:f===void 0?t:f+t,head:!0,props:{bPrefix:f?`.${f}-`:void 0},anchorMetaName:oo,ssr:l}),s!=null&&s.preflightStyleDisabled||Ul.mount({id:"n-global",head:!0,anchorMetaName:oo,ssr:l})};l?c():o.onBeforeMount(c)}return o.computed(()=>{var c;const{theme:{common:f,self:u,peers:g={}}={},themeOverrides:m={},builtinThemeOverrides:h={}}=i,{common:x,peers:y}=m,{common:b=void 0,[e]:{common:P=void 0,self:H=void 0,peers:$={}}={}}=(s==null?void 0:s.mergedThemeRef.value)||{},{common:k=void 0,[e]:M={}}=(s==null?void 0:s.mergedThemeOverridesRef.value)||{},{common:p,peers:S={}}=M,E=Xo({},f||P||b||r.common,k,p,x),D=Xo((c=u||H||r.self)===null||c===void 0?void 0:c(E),h,M,m);return{common:E,self:D,peers:Xo({},r.peers,$,g),peerOverrides:Xo({},h.peers,S,y)}})}ye.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const kb="n";function Ke(e={},t={defaultBordered:!0}){const n=o.inject(gn,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:o.computed(()=>{var r,i;const{bordered:a}=e;return a!==void 0?a:(i=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:o.shallowRef(kb),namespaceRef:o.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const zb={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:"RRRR-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"}};function ii(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}function ro(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,d=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[d]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}function io(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var l=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Pb(s,function(u){return u.test(l)}):Tb(s,function(u){return u.test(l)}),c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(l.length);return{value:c,rest:f}}}function Tb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Pb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Rb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;var s=t.slice(i.length);return{value:l,rest:s}}}var _b={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"}},Bb=function(t,n,r){var i,a=_b[t];return typeof a=="string"?i=a:n===1?i=a.one:i=a.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i},Eb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ib={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ob={date:ii({formats:Eb,defaultWidth:"full"}),time:ii({formats:Mb,defaultWidth:"full"}),dateTime:ii({formats:Ib,defaultWidth:"full"})},Ab={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fb=function(t,n,r,i){return Ab[t]},Db={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hb={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"]},Lb={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"]},Nb={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"}},Wb={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"}},jb=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ub={ordinalNumber:jb,era:ro({values:Db,defaultWidth:"wide"}),quarter:ro({values:Vb,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ro({values:Hb,defaultWidth:"wide"}),day:ro({values:Lb,defaultWidth:"wide"}),dayPeriod:ro({values:Nb,defaultWidth:"wide",formattingValues:Wb,defaultFormattingWidth:"wide"})},Gb=/^(\d+)(th|st|nd|rd)?/i,Kb=/\d+/i,qb={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},Xb={any:[/^b/i,/^(a|c)/i]},Yb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zb={any:[/1/i,/2/i,/3/i,/4/i]},Jb={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},Qb={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]},eg={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},tg={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]},ng={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},og={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}},rg={ordinalNumber:Rb({matchPattern:Gb,parsePattern:Kb,valueCallback:function(t){return parseInt(t,10)}}),era:io({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),quarter:io({matchPatterns:Yb,defaultMatchWidth:"wide",parsePatterns:Zb,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:io({matchPatterns:Jb,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any"}),day:io({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:tg,defaultParseWidth:"any"}),dayPeriod:io({matchPatterns:ng,defaultMatchWidth:"any",parsePatterns:og,defaultParseWidth:"any"})},ig={code:"en-US",formatDistance:Bb,formatLong:Ob,formatRelative:Fb,localize:Ub,match:rg,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ag={name:"en-US",locale:ig};function ao(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=o.inject(gn,null)||{},r=o.computed(()=>{var a,l;return(l=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&l!==void 0?l:zb[e]});return{dateLocaleRef:o.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:ag}),localeRef:r}}function mn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&vr("use-style","No style is specified.");return}const r=Wt(),i=o.inject(gn,null),a=()=>{const l=n.value;t.mount({id:l===void 0?e:l+e,head:!0,anchorMetaName:oo,props:{bPrefix:l?`.${l}-`:void 0},ssr:r}),i!=null&&i.preflightStyleDisabled||Ul.mount({id:"n-global",head:!0,anchorMetaName:oo,ssr:r})};r?a():o.onBeforeMount(a)}function et(e,t,n,r){var i;n||vr("useThemeClass","cssVarsRef is not passed");const a=(i=o.inject(gn,null))===null||i===void 0?void 0:i.mergedThemeHashRef,l=o.ref(""),s=Wt();let d;const c=`__${e}`,f=()=>{let u=c;const g=t?t.value:void 0,m=a==null?void 0:a.value;m&&(u+=`-${m}`),g&&(u+=`-${g}`);const{themeOverrides:h,builtinThemeOverrides:x}=r;h&&(u+=`-${Cr(JSON.stringify(h))}`),x&&(u+=`-${Cr(JSON.stringify(x))}`),l.value=u,d=()=>{const y=n.value;let b="";for(const P in y)b+=`${P}: ${y[P]};`;I(`.${u}`,b).mount({id:u,ssr:s}),d=void 0}};return o.watchEffect(()=>{f()}),{themeClass:l,onRender:()=>{d==null||d()}}}function qt(e,t,n){if(!t)return;const r=Wt(),i=o.computed(()=>{const{value:l}=t;if(!l)return;const s=l[e];if(s)return s}),a=()=>{o.watchEffect(()=>{const{value:l}=n,s=`${l}${e}Rtl`;if(Td(s,r))return;const{value:d}=i;d&&d.style.mount({id:s,head:!0,anchorMetaName:oo,props:{bPrefix:l?`.${l}-`:void 0},ssr:r})})};return r?a():o.onBeforeMount(a),i}const Gl=o.defineComponent({name:"Add",render(){return o.h("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function An(e,t){return o.defineComponent({name:Kh(e),setup(){var n;const r=(n=o.inject(gn,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var i;const a=(i=r==null?void 0:r.value)===null||i===void 0?void 0:i[e];return a?a():t}}})}const lg=o.defineComponent({name:"Checkmark",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},o.h("g",{fill:"none"},o.h("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),Kl=An("close",o.h("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),sg=o.defineComponent({name:"Eye",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),o.h("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),dg=o.defineComponent({name:"EyeOff",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),o.h("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),o.h("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),o.h("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),o.h("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),cg=o.defineComponent({name:"Empty",render(){return o.h("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),o.h("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),ug=An("error",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"}))))),fg=An("info",o.h("svg",{viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"}))))),hg=o.defineComponent({name:"Remove",render(){return o.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},o.h("line",{x1:"400",y1:"256",x2:"112",y2:"256",style:`
|
|
26
26
|
fill: none;
|
|
27
27
|
stroke: currentColor;
|
|
28
28
|
stroke-linecap: round;
|
|
29
29
|
stroke-linejoin: round;
|
|
30
30
|
stroke-width: 32px;
|
|
31
|
-
`}))}}),pg=
|
|
31
|
+
`}))}}),pg=An("success",o.h("svg",{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"}))))),bg=An("warning",o.h("svg",{viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},o.h("g",{"fill-rule":"nonzero"},o.h("path",{d:"M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"}))))),gg=o.defineComponent({name:"ChevronDown",render(){return o.h("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.h("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"}))}}),mg=An("clear",o.h("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},o.h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},o.h("g",{fill:"currentColor","fill-rule":"nonzero"},o.h("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"}))))),Yo=o.defineComponent({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=_n();return()=>o.h(o.Transition,{name:"icon-switch-transition",appear:n.value},t)}}),ql=o.defineComponent({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(s){e.width?s.style.maxWidth=`${s.offsetWidth}px`:s.style.maxHeight=`${s.offsetHeight}px`,s.offsetWidth}function r(s){e.width?s.style.maxWidth="0":s.style.maxHeight="0",s.offsetWidth;const{onLeave:d}=e;d&&d()}function i(s){e.width?s.style.maxWidth="":s.style.maxHeight="";const{onAfterLeave:d}=e;d&&d()}function a(s){if(s.style.transition="none",e.width){const d=s.offsetWidth;s.style.maxWidth="0",s.offsetWidth,s.style.transition="",s.style.maxWidth=`${d}px`}else if(e.reverse)s.style.maxHeight=`${s.offsetHeight}px`,s.offsetHeight,s.style.transition="",s.style.maxHeight="0";else{const d=s.offsetHeight;s.style.maxHeight="0",s.offsetWidth,s.style.transition="",s.style.maxHeight=`${d}px`}s.offsetWidth}function l(s){var d;e.width?s.style.maxWidth="":e.reverse||(s.style.maxHeight=""),(d=e.onAfterEnter)===null||d===void 0||d.call(e)}return()=>{const{group:s,width:d,appear:c,mode:f}=e,u=s?o.TransitionGroup:o.Transition,g={name:d?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:c,onEnter:a,onAfterEnter:l,onBeforeLeave:n,onLeave:r,onAfterLeave:i};return s||(g.mode=f),o.h(u,g,t)}}}),vg=w("base-icon",`
|
|
32
32
|
height: 1em;
|
|
33
33
|
width: 1em;
|
|
34
34
|
line-height: 1em;
|
|
@@ -84,7 +84,7 @@ ${t}
|
|
|
84
84
|
background-color: transparent;
|
|
85
85
|
`),W("round",[I("&::before",`
|
|
86
86
|
border-radius: 50%;
|
|
87
|
-
`)])]),ai=o.defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return mn("-base-close",xg,o.toRef(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:i,isButtonTag:a}=e,l=a?"button":"div";return o.h(l,{type:a?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:a?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:s=>{e.focusable||s.preventDefault()},onClick:e.onClick},o.h(bt,{clsPrefix:t},{default:()=>o.h(Kl,null)}))}}}),yg=o.defineComponent({props:{onFocus:Function,onBlur:Function},setup(e){return()=>o.h("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),{cubicBezierEaseInOut:wg}=bn;function
|
|
87
|
+
`)])]),ai=o.defineComponent({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return mn("-base-close",xg,o.toRef(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:i,isButtonTag:a}=e,l=a?"button":"div";return o.h(l,{type:a?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:a?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,i&&`${t}-base-close--round`],onMousedown:s=>{e.focusable||s.preventDefault()},onClick:e.onClick},o.h(bt,{clsPrefix:t},{default:()=>o.h(Kl,null)}))}}}),yg=o.defineComponent({props:{onFocus:Function,onBlur:Function},setup(e){return()=>o.h("div",{style:"width: 0; height: 0",tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}}),{cubicBezierEaseInOut:wg}=bn;function Fn({originalTransform:e="",left:t=0,top:n=0,transition:r=`all .3s ${wg} !important`}={}){return[I("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:`${e} scale(0.75)`,left:t,top:n,opacity:0}),I("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),I("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:r})]}const Cg=I([I("@keyframes rotator",`
|
|
88
88
|
0% {
|
|
89
89
|
-webkit-transform: rotate(0deg);
|
|
90
90
|
transform: rotate(0deg);
|
|
@@ -101,12 +101,12 @@ ${t}
|
|
|
101
101
|
position: absolute;
|
|
102
102
|
width: 100%;
|
|
103
103
|
height: 100%;
|
|
104
|
-
`,[
|
|
104
|
+
`,[Fn()]),T("placeholder",`
|
|
105
105
|
position: absolute;
|
|
106
106
|
left: 50%;
|
|
107
107
|
top: 50%;
|
|
108
108
|
transform: translateX(-50%) translateY(-50%);
|
|
109
|
-
`,[
|
|
109
|
+
`,[Fn({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),T("container",`
|
|
110
110
|
animation: rotator 3s linear infinite both;
|
|
111
111
|
`,[T("icon",`
|
|
112
112
|
height: 1em;
|
|
@@ -134,7 +134,7 @@ ${t}
|
|
|
134
134
|
transition: color .3s var(--n-bezier);
|
|
135
135
|
margin-top: 12px;
|
|
136
136
|
color: var(--n-extra-text-color);
|
|
137
|
-
`)]),tm=Object.assign(Object.assign({},ye.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),nm=o.defineComponent({name:"Empty",props:tm,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("Empty","-empty",em,ts,e,t),{localeRef:i}=
|
|
137
|
+
`)]),tm=Object.assign(Object.assign({},ye.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),nm=o.defineComponent({name:"Empty",props:tm,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("Empty","-empty",em,ts,e,t),{localeRef:i}=ao("Empty"),a=o.inject(gn,null),l=o.computed(()=>{var f,u,g;return(f=e.description)!==null&&f!==void 0?f:(g=(u=a==null?void 0:a.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||g===void 0?void 0:g.description}),s=o.computed(()=>{var f,u;return((u=(f=a==null?void 0:a.mergedComponentPropsRef.value)===null||f===void 0?void 0:f.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>o.h(cg,null))}),d=o.computed(()=>{const{size:f}=e,{common:{cubicBezierEaseInOut:u},self:{[Q("iconSize",f)]:g,[Q("fontSize",f)]:m,textColor:h,iconColor:x,extraTextColor:y}}=r.value;return{"--n-icon-size":g,"--n-font-size":m,"--n-bezier":u,"--n-text-color":h,"--n-icon-color":x,"--n-extra-text-color":y}}),c=n?et("empty",o.computed(()=>{let f="";const{size:u}=e;return f+=u[0],f}),d,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:o.computed(()=>l.value||i.value.description),cssVars:n?void 0:d,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0:c.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),o.h("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?o.h("div",{class:`${t}-empty__icon`},e.icon?e.icon():o.h(bt,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?o.h("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?o.h("div",{class:`${t}-empty__extra`},e.extra()):null)}}),om={railInsetHorizontal:"auto 2px 4px 2px",railInsetVertical:"2px 4px 2px auto",railColor:"transparent"};function rm(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},om),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}const ns={name:"Scrollbar",common:Ye,self:rm},{cubicBezierEaseInOut:os}=bn;function im({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=os,leaveCubicBezier:i=os}={}){return[I(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),I(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),I(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),I(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const am=w("scrollbar",`
|
|
138
138
|
overflow: hidden;
|
|
139
139
|
position: relative;
|
|
140
140
|
z-index: auto;
|
|
@@ -181,7 +181,7 @@ ${t}
|
|
|
181
181
|
pointer-events: all;
|
|
182
182
|
background-color: var(--n-scrollbar-color);
|
|
183
183
|
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
184
|
-
`,[im(),I("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),lm=Object.assign(Object.assign({},ye.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}),hi=o.defineComponent({name:"Scrollbar",props:lm,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Ke(e),i=qt("Scrollbar",r,t),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(null),x=o.ref(null),y=o.ref(0),b=o.ref(0),P=o.ref(!1),H=o.ref(!1);let $=!1,k=!1,M,p,S=0,E=0,D=0,O=0;const V=Ud(),j=ye("Scrollbar","-scrollbar",am,ns,e,t),J=o.computed(()=>{const{value:v}=g,{value:L}=f,{value:Z}=h;return v===null||L===null||Z===null?0:Math.min(v,Z*v/L+ot(j.value.self.width)*1.5)}),N=o.computed(()=>`${J.value}px`),U=o.computed(()=>{const{value:v}=m,{value:L}=u,{value:Z}=x;return v===null||L===null||Z===null?0:Z*v/L+ot(j.value.self.height)*1.5}),q=o.computed(()=>`${U.value}px`),oe=o.computed(()=>{const{value:v}=g,{value:L}=y,{value:Z}=f,{value:ae}=h;if(v===null||Z===null||ae===null)return 0;{const se=Z-v;return se?L/se*(ae-J.value):0}}),pe=o.computed(()=>`${oe.value}px`),ie=o.computed(()=>{const{value:v}=m,{value:L}=b,{value:Z}=u,{value:ae}=x;if(v===null||Z===null||ae===null)return 0;{const se=Z-v;return se?L/se*(ae-U.value):0}}),fe=o.computed(()=>`${ie.value}px`),G=o.computed(()=>{const{value:v}=g,{value:L}=f;return v!==null&&L!==null&&L>v}),ee=o.computed(()=>{const{value:v}=m,{value:L}=u;return v!==null&&L!==null&&L>v}),ve=o.computed(()=>{const{trigger:v}=e;return v==="none"||P.value}),we=o.computed(()=>{const{trigger:v}=e;return v==="none"||H.value}),re=o.computed(()=>{const{container:v}=e;return v?v():l.value}),Se=o.computed(()=>{const{content:v}=e;return v?v():s.value}),Ce=(v,L)=>{if(!e.scrollable)return;if(typeof v=="number"){Ie(v,L??0,0,!1,"auto");return}const{left:Z,top:ae,index:se,elSize:ce,position:ue,behavior:ge,el:Te,debounce:ut=!0}=v;(Z!==void 0||ae!==void 0)&&Ie(Z??0,ae??0,0,!1,ge),Te!==void 0?Ie(0,Te.offsetTop,Te.offsetHeight,ut,ge):se!==void 0&&ce!==void 0?Ie(0,se*ce,ce,ut,ge):ue==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):ue==="top"&&Ie(0,0,0,!1,ge)},le=Vc(()=>{e.container||Ce({top:y.value,left:b.value})}),Me=()=>{le.isDeactivated||_()},Re=v=>{if(le.isDeactivated)return;const{onResize:L}=e;L&&L(v),_()},Le=(v,L)=>{if(!e.scrollable)return;const{value:Z}=re;Z&&(typeof v=="object"?Z.scrollBy(v):Z.scrollBy(v,L||0))};function Ie(v,L,Z,ae,se){const{value:ce}=re;if(ce){if(ae){const{scrollTop:ue,offsetHeight:ge}=ce;if(L>ue){L+Z<=ue+ge||ce.scrollTo({left:v,top:L+Z-ge,behavior:se});return}}ce.scrollTo({left:v,top:L,behavior:se})}}function De(){te(),B(),_()}function Ue(){ke()}function ke(){Y(),A()}function Y(){p!==void 0&&window.clearTimeout(p),p=window.setTimeout(()=>{H.value=!1},e.duration)}function A(){M!==void 0&&window.clearTimeout(M),M=window.setTimeout(()=>{P.value=!1},e.duration)}function te(){M!==void 0&&window.clearTimeout(M),P.value=!0}function B(){p!==void 0&&window.clearTimeout(p),H.value=!0}function F(v){const{onScroll:L}=e;L&&L(v),X()}function X(){const{value:v}=re;v&&(y.value=v.scrollTop,b.value=v.scrollLeft*(i!=null&&i.value?-1:1))}function z(){const{value:v}=Se;v&&(f.value=v.offsetHeight,u.value=v.offsetWidth);const{value:L}=re;L&&(g.value=L.offsetHeight,m.value=L.offsetWidth);const{value:Z}=c,{value:ae}=d;Z&&(x.value=Z.offsetWidth),ae&&(h.value=ae.offsetHeight)}function C(){const{value:v}=re;v&&(y.value=v.scrollTop,b.value=v.scrollLeft*(i!=null&&i.value?-1:1),g.value=v.offsetHeight,m.value=v.offsetWidth,f.value=v.scrollHeight,u.value=v.scrollWidth);const{value:L}=c,{value:Z}=d;L&&(x.value=L.offsetWidth),Z&&(h.value=Z.offsetHeight)}function _(){e.scrollable&&(e.useUnifiedContainer?C():(z(),X()))}function ne(v){var L;return!(!((L=a.value)===null||L===void 0)&&L.contains($n(v)))}function xe(v){v.preventDefault(),v.stopPropagation(),k=!0,Pe("mousemove",window,ze,!0),Pe("mouseup",window,Ne,!0),E=b.value,D=i!=null&&i.value?window.innerWidth-v.clientX:v.clientX}function ze(v){if(!k)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:L}=m,{value:Z}=u,{value:ae}=U;if(L===null||Z===null)return;const ce=(i!=null&&i.value?window.innerWidth-v.clientX-D:v.clientX-D)*(Z-L)/(L-ae),ue=Z-L;let ge=E+ce;ge=Math.min(ue,ge),ge=Math.max(ge,0);const{value:Te}=re;if(Te){Te.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ut}=e;ut&&ut(ge)}}function Ne(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,ze,!0),$e("mouseup",window,Ne,!0),k=!1,_(),ne(v)&&ke()}function Ae(v){v.preventDefault(),v.stopPropagation(),$=!0,Pe("mousemove",window,Be,!0),Pe("mouseup",window,qe,!0),S=y.value,O=v.clientY}function Be(v){if(!$)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:L}=g,{value:Z}=f,{value:ae}=J;if(L===null||Z===null)return;const ce=(v.clientY-O)*(Z-L)/(L-ae),ue=Z-L;let ge=S+ce;ge=Math.min(ue,ge),ge=Math.max(ge,0);const{value:Te}=re;Te&&(Te.scrollTop=ge)}function qe(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,Be,!0),$e("mouseup",window,qe,!0),$=!1,_(),ne(v)&&ke()}o.watchEffect(()=>{const{value:v}=ee,{value:L}=G,{value:Z}=t,{value:ae}=c,{value:se}=d;ae&&(v?ae.classList.remove(`${Z}-scrollbar-rail--disabled`):ae.classList.add(`${Z}-scrollbar-rail--disabled`)),se&&(L?se.classList.remove(`${Z}-scrollbar-rail--disabled`):se.classList.add(`${Z}-scrollbar-rail--disabled`))}),o.onMounted(()=>{e.container||_()}),o.onBeforeUnmount(()=>{M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p),$e("mousemove",window,Be,!0),$e("mouseup",window,qe,!0)});const st=o.computed(()=>{const{common:{cubicBezierEaseInOut:v},self:{color:L,colorHover:Z,height:ae,width:se,borderRadius:ce,railInsetHorizontal:ue,railInsetVertical:ge,railColor:Te}}=j.value;return{"--n-scrollbar-bezier":v,"--n-scrollbar-color":L,"--n-scrollbar-color-hover":Z,"--n-scrollbar-border-radius":ce,"--n-scrollbar-width":se,"--n-scrollbar-height":ae,"--n-scrollbar-rail-inset-horizontal":ue,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?cd(ge):ge,"--n-scrollbar-rail-color":Te}}),Je=n?et("scrollbar",void 0,st,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ce,scrollBy:Le,sync:_,syncUnifiedContainer:C,handleMouseEnterWrapper:De,handleMouseLeaveWrapper:Ue}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:y,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:d,xRailRef:c,needYBar:G,needXBar:ee,yBarSizePx:N,xBarSizePx:q,yBarTopPx:pe,xBarLeftPx:fe,isShowXBar:ve,isShowYBar:we,isIos:V,handleScroll:F,handleContentResize:Me,handleContainerResize:Re,handleYScrollMouseDown:Ae,handleXScrollMouseDown:xe,cssVars:n?void 0:st,themeClass:Je==null?void 0:Je.themeClass,onRender:Je==null?void 0:Je.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(f,u)=>o.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,f],"data-scrollbar-rail":!0,style:[u||"",this.verticalRailStyle],"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var f,u;return(f=this.onRender)===null||f===void 0||f.call(this),o.h("div",o.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(u=t.default)===null||u===void 0?void 0:u.call(t):o.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},o.h(jt,{onResize:this.handleContentResize},{default:()=>o.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&o.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},c=this.container?d():o.h(jt,{onResize:this.handleContainerResize},{default:d});return a?o.h(o.Fragment,null,c,s(this.themeClass,this.cssVars)):c}}),sm=hi,dm={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function cm(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:d,opacityDisabled:c,hoverColor:f,fontSizeSmall:u,fontSizeMedium:g,fontSizeLarge:m,fontSizeHuge:h,heightSmall:x,heightMedium:y,heightLarge:b,heightHuge:P}=e;return Object.assign(Object.assign({},dm),{optionFontSizeSmall:u,optionFontSizeMedium:g,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightSmall:x,optionHeightMedium:y,optionHeightLarge:b,optionHeightHuge:P,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:d,optionOpacityDisabled:c,optionCheckColor:d,optionColorPending:f,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:f,actionTextColor:a,loadingColor:d})}const rs={name:"InternalSelectMenu",common:Ye,peers:{Scrollbar:ns,Empty:ts},self:cm};function um(e,t){return o.h(o.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?o.h(bt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>o.h(lg)}):null})}const is=o.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:c,nodePropsRef:f,handleOptionClick:u,handleOptionMouseEnter:g}=o.inject($r),m=Xe(()=>{const{value:b}=n;return b?e.tmNode.key===b.key:!1});function h(b){const{tmNode:P}=e;P.disabled||u(b,P)}function x(b){const{tmNode:P}=e;P.disabled||g(b,P)}function y(b){const{tmNode:P}=e,{value:H}=m;P.disabled||H||g(b,P)}return{multiple:r,isGrouped:Xe(()=>{const{tmNode:b}=e,{parent:P}=b;return P&&P.rawNode.type==="group"}),showCheckmark:c,nodeProps:f,isPending:m,isSelected:Xe(()=>{const{value:b}=t,{value:P}=r;if(b===null)return!1;const H=e.tmNode.rawNode[d.value];if(P){const{value:$}=i;return $.has(H)}else return b===H}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:y,handleMouseEnter:x,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:d,handleClick:c,handleMouseEnter:f,handleMouseMove:u}=this,g=um(n,e),m=d?[d(t,n),a&&g]:[ln(t[this.labelField],t,n),a&&g],h=l==null?void 0:l(t),x=o.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:xr([c,h==null?void 0:h.onClick]),onMouseenter:xr([f,h==null?void 0:h.onMouseenter]),onMousemove:xr([u,h==null?void 0:h.onMousemove])}),o.h("div",{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:x,option:t,selected:n}):s?s({node:x,option:t,selected:n}):x}}),as=o.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=o.inject($r);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r==null?void 0:r(i),l=t?t(i,!1):ln(i[this.labelField],i,!1),s=o.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:ls,cubicBezierEaseOut:ss}=bn;function ao({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[I("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${ls}, transform ${t} ${ls} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${ss}, transform ${t} ${ss} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),I("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const fm=w("base-select-menu",`
|
|
184
|
+
`,[im(),I("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),lm=Object.assign(Object.assign({},ye.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}),hi=o.defineComponent({name:"Scrollbar",props:lm,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Ke(e),i=qt("Scrollbar",r,t),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(null),x=o.ref(null),y=o.ref(0),b=o.ref(0),P=o.ref(!1),H=o.ref(!1);let $=!1,k=!1,M,p,S=0,E=0,D=0,O=0;const V=Ud(),j=ye("Scrollbar","-scrollbar",am,ns,e,t),J=o.computed(()=>{const{value:v}=g,{value:L}=f,{value:Z}=h;return v===null||L===null||Z===null?0:Math.min(v,Z*v/L+ot(j.value.self.width)*1.5)}),N=o.computed(()=>`${J.value}px`),U=o.computed(()=>{const{value:v}=m,{value:L}=u,{value:Z}=x;return v===null||L===null||Z===null?0:Z*v/L+ot(j.value.self.height)*1.5}),q=o.computed(()=>`${U.value}px`),oe=o.computed(()=>{const{value:v}=g,{value:L}=y,{value:Z}=f,{value:ae}=h;if(v===null||Z===null||ae===null)return 0;{const se=Z-v;return se?L/se*(ae-J.value):0}}),pe=o.computed(()=>`${oe.value}px`),ie=o.computed(()=>{const{value:v}=m,{value:L}=b,{value:Z}=u,{value:ae}=x;if(v===null||Z===null||ae===null)return 0;{const se=Z-v;return se?L/se*(ae-U.value):0}}),fe=o.computed(()=>`${ie.value}px`),G=o.computed(()=>{const{value:v}=g,{value:L}=f;return v!==null&&L!==null&&L>v}),ee=o.computed(()=>{const{value:v}=m,{value:L}=u;return v!==null&&L!==null&&L>v}),ve=o.computed(()=>{const{trigger:v}=e;return v==="none"||P.value}),we=o.computed(()=>{const{trigger:v}=e;return v==="none"||H.value}),re=o.computed(()=>{const{container:v}=e;return v?v():l.value}),Se=o.computed(()=>{const{content:v}=e;return v?v():s.value}),Ce=(v,L)=>{if(!e.scrollable)return;if(typeof v=="number"){Ie(v,L??0,0,!1,"auto");return}const{left:Z,top:ae,index:se,elSize:ce,position:ue,behavior:ge,el:Te,debounce:ut=!0}=v;(Z!==void 0||ae!==void 0)&&Ie(Z??0,ae??0,0,!1,ge),Te!==void 0?Ie(0,Te.offsetTop,Te.offsetHeight,ut,ge):se!==void 0&&ce!==void 0?Ie(0,se*ce,ce,ut,ge):ue==="bottom"?Ie(0,Number.MAX_SAFE_INTEGER,0,!1,ge):ue==="top"&&Ie(0,0,0,!1,ge)},le=Vc(()=>{e.container||Ce({top:y.value,left:b.value})}),Me=()=>{le.isDeactivated||_()},Re=v=>{if(le.isDeactivated)return;const{onResize:L}=e;L&&L(v),_()},Le=(v,L)=>{if(!e.scrollable)return;const{value:Z}=re;Z&&(typeof v=="object"?Z.scrollBy(v):Z.scrollBy(v,L||0))};function Ie(v,L,Z,ae,se){const{value:ce}=re;if(ce){if(ae){const{scrollTop:ue,offsetHeight:ge}=ce;if(L>ue){L+Z<=ue+ge||ce.scrollTo({left:v,top:L+Z-ge,behavior:se});return}}ce.scrollTo({left:v,top:L,behavior:se})}}function De(){te(),B(),_()}function Ue(){ke()}function ke(){Y(),A()}function Y(){p!==void 0&&window.clearTimeout(p),p=window.setTimeout(()=>{H.value=!1},e.duration)}function A(){M!==void 0&&window.clearTimeout(M),M=window.setTimeout(()=>{P.value=!1},e.duration)}function te(){M!==void 0&&window.clearTimeout(M),P.value=!0}function B(){p!==void 0&&window.clearTimeout(p),H.value=!0}function F(v){const{onScroll:L}=e;L&&L(v),X()}function X(){const{value:v}=re;v&&(y.value=v.scrollTop,b.value=v.scrollLeft*(i!=null&&i.value?-1:1))}function z(){const{value:v}=Se;v&&(f.value=v.offsetHeight,u.value=v.offsetWidth);const{value:L}=re;L&&(g.value=L.offsetHeight,m.value=L.offsetWidth);const{value:Z}=c,{value:ae}=d;Z&&(x.value=Z.offsetWidth),ae&&(h.value=ae.offsetHeight)}function C(){const{value:v}=re;v&&(y.value=v.scrollTop,b.value=v.scrollLeft*(i!=null&&i.value?-1:1),g.value=v.offsetHeight,m.value=v.offsetWidth,f.value=v.scrollHeight,u.value=v.scrollWidth);const{value:L}=c,{value:Z}=d;L&&(x.value=L.offsetWidth),Z&&(h.value=Z.offsetHeight)}function _(){e.scrollable&&(e.useUnifiedContainer?C():(z(),X()))}function ne(v){var L;return!(!((L=a.value)===null||L===void 0)&&L.contains(kn(v)))}function xe(v){v.preventDefault(),v.stopPropagation(),k=!0,Pe("mousemove",window,ze,!0),Pe("mouseup",window,Ne,!0),E=b.value,D=i!=null&&i.value?window.innerWidth-v.clientX:v.clientX}function ze(v){if(!k)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:L}=m,{value:Z}=u,{value:ae}=U;if(L===null||Z===null)return;const ce=(i!=null&&i.value?window.innerWidth-v.clientX-D:v.clientX-D)*(Z-L)/(L-ae),ue=Z-L;let ge=E+ce;ge=Math.min(ue,ge),ge=Math.max(ge,0);const{value:Te}=re;if(Te){Te.scrollLeft=ge*(i!=null&&i.value?-1:1);const{internalOnUpdateScrollLeft:ut}=e;ut&&ut(ge)}}function Ne(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,ze,!0),$e("mouseup",window,Ne,!0),k=!1,_(),ne(v)&&ke()}function Ae(v){v.preventDefault(),v.stopPropagation(),$=!0,Pe("mousemove",window,Be,!0),Pe("mouseup",window,qe,!0),S=y.value,O=v.clientY}function Be(v){if(!$)return;M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p);const{value:L}=g,{value:Z}=f,{value:ae}=J;if(L===null||Z===null)return;const ce=(v.clientY-O)*(Z-L)/(L-ae),ue=Z-L;let ge=S+ce;ge=Math.min(ue,ge),ge=Math.max(ge,0);const{value:Te}=re;Te&&(Te.scrollTop=ge)}function qe(v){v.preventDefault(),v.stopPropagation(),$e("mousemove",window,Be,!0),$e("mouseup",window,qe,!0),$=!1,_(),ne(v)&&ke()}o.watchEffect(()=>{const{value:v}=ee,{value:L}=G,{value:Z}=t,{value:ae}=c,{value:se}=d;ae&&(v?ae.classList.remove(`${Z}-scrollbar-rail--disabled`):ae.classList.add(`${Z}-scrollbar-rail--disabled`)),se&&(L?se.classList.remove(`${Z}-scrollbar-rail--disabled`):se.classList.add(`${Z}-scrollbar-rail--disabled`))}),o.onMounted(()=>{e.container||_()}),o.onBeforeUnmount(()=>{M!==void 0&&window.clearTimeout(M),p!==void 0&&window.clearTimeout(p),$e("mousemove",window,Be,!0),$e("mouseup",window,qe,!0)});const st=o.computed(()=>{const{common:{cubicBezierEaseInOut:v},self:{color:L,colorHover:Z,height:ae,width:se,borderRadius:ce,railInsetHorizontal:ue,railInsetVertical:ge,railColor:Te}}=j.value;return{"--n-scrollbar-bezier":v,"--n-scrollbar-color":L,"--n-scrollbar-color-hover":Z,"--n-scrollbar-border-radius":ce,"--n-scrollbar-width":se,"--n-scrollbar-height":ae,"--n-scrollbar-rail-inset-horizontal":ue,"--n-scrollbar-rail-inset-vertical":i!=null&&i.value?cd(ge):ge,"--n-scrollbar-rail-color":Te}}),Je=n?et("scrollbar",void 0,st,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ce,scrollBy:Le,sync:_,syncUnifiedContainer:C,handleMouseEnterWrapper:De,handleMouseLeaveWrapper:Ue}),{mergedClsPrefix:t,rtlEnabled:i,containerScrollTop:y,wrapperRef:a,containerRef:l,contentRef:s,yRailRef:d,xRailRef:c,needYBar:G,needXBar:ee,yBarSizePx:N,xBarSizePx:q,yBarTopPx:pe,xBarLeftPx:fe,isShowXBar:ve,isShowYBar:we,isIos:V,handleScroll:F,handleContentResize:Me,handleContainerResize:Re,handleYScrollMouseDown:Ae,handleXScrollMouseDown:xe,cssVars:n?void 0:st,themeClass:Je==null?void 0:Je.themeClass,onRender:Je==null?void 0:Je.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:i,internalHoistYRail:a}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",s=(f,u)=>o.h("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,f],"data-scrollbar-rail":!0,style:[u||"",this.verticalRailStyle],"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var f,u;return(f=this.onRender)===null||f===void 0||f.call(this),o.h("div",o.mergeProps(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,i&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(u=t.default)===null||u===void 0?void 0:u.call(t):o.h("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},o.h(jt,{onResize:this.handleContentResize},{default:()=>o.h("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),a?null:s(void 0,void 0),this.xScrollable&&o.h("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o.h(l?yr:o.Transition,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o.h("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:i?this.xBarLeftPx:void 0,left:i?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},c=this.container?d():o.h(jt,{onResize:this.handleContainerResize},{default:d});return a?o.h(o.Fragment,null,c,s(this.themeClass,this.cssVars)):c}}),sm=hi,dm={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function cm(e){const{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:l,textColorDisabled:s,primaryColor:d,opacityDisabled:c,hoverColor:f,fontSizeSmall:u,fontSizeMedium:g,fontSizeLarge:m,fontSizeHuge:h,heightSmall:x,heightMedium:y,heightLarge:b,heightHuge:P}=e;return Object.assign(Object.assign({},dm),{optionFontSizeSmall:u,optionFontSizeMedium:g,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightSmall:x,optionHeightMedium:y,optionHeightLarge:b,optionHeightHuge:P,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:l,optionTextColorDisabled:s,optionTextColorActive:d,optionOpacityDisabled:c,optionCheckColor:d,optionColorPending:f,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:f,actionTextColor:a,loadingColor:d})}const rs={name:"InternalSelectMenu",common:Ye,peers:{Scrollbar:ns,Empty:ts},self:cm};function um(e,t){return o.h(o.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?o.h(bt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>o.h(lg)}):null})}const is=o.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:l,labelFieldRef:s,valueFieldRef:d,showCheckmarkRef:c,nodePropsRef:f,handleOptionClick:u,handleOptionMouseEnter:g}=o.inject($r),m=Xe(()=>{const{value:b}=n;return b?e.tmNode.key===b.key:!1});function h(b){const{tmNode:P}=e;P.disabled||u(b,P)}function x(b){const{tmNode:P}=e;P.disabled||g(b,P)}function y(b){const{tmNode:P}=e,{value:H}=m;P.disabled||H||g(b,P)}return{multiple:r,isGrouped:Xe(()=>{const{tmNode:b}=e,{parent:P}=b;return P&&P.rawNode.type==="group"}),showCheckmark:c,nodeProps:f,isPending:m,isSelected:Xe(()=>{const{value:b}=t,{value:P}=r;if(b===null)return!1;const H=e.tmNode.rawNode[d.value];if(P){const{value:$}=i;return $.has(H)}else return b===H}),labelField:s,renderLabel:a,renderOption:l,handleMouseMove:y,handleMouseEnter:x,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:l,renderOption:s,renderLabel:d,handleClick:c,handleMouseEnter:f,handleMouseMove:u}=this,g=um(n,e),m=d?[d(t,n),a&&g]:[ln(t[this.labelField],t,n),a&&g],h=l==null?void 0:l(t),x=o.h("div",Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h==null?void 0:h.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:xr([c,h==null?void 0:h.onClick]),onMouseenter:xr([f,h==null?void 0:h.onMouseenter]),onMousemove:xr([u,h==null?void 0:h.onMousemove])}),o.h("div",{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:x,option:t,selected:n}):s?s({node:x,option:t,selected:n}):x}}),as=o.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=o.inject($r);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r==null?void 0:r(i),l=t?t(i,!1):ln(i[this.labelField],i,!1),s=o.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),l);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}}),{cubicBezierEaseIn:ls,cubicBezierEaseOut:ss}=bn;function lo({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:i=""}={}){return[I("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${ls}, transform ${t} ${ls} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${ss}, transform ${t} ${ss} ${i&&`,${i}`}`}),I("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),I("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const fm=w("base-select-menu",`
|
|
185
185
|
line-height: 1.5;
|
|
186
186
|
outline: none;
|
|
187
187
|
z-index: 0;
|
|
@@ -288,7 +288,7 @@ ${t}
|
|
|
288
288
|
top: calc(50% - 7px);
|
|
289
289
|
color: var(--n-option-check-color);
|
|
290
290
|
transition: color .3s var(--n-bezier);
|
|
291
|
-
`,[
|
|
291
|
+
`,[lo({enterScale:"0.5"})])])]),hm=o.defineComponent({name:"InternalSelectMenu",props:Object.assign(Object.assign({},ye.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:"medium"},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,onToggle:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ke(e),r=qt("InternalSelectMenu",n,t),i=ye("InternalSelectMenu","-internal-select-menu",fm,rs,e,o.toRef(e,"clsPrefix")),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.computed(()=>e.treeMate.getFlattenedNodes()),c=o.computed(()=>Ag(d.value)),f=o.ref(null);function u(){const{treeMate:G}=e;let ee=null;const{value:ve}=e;ve===null?ee=G.getFirstAvailableNode():(e.multiple?ee=G.getNode((ve||[])[(ve||[]).length-1]):ee=G.getNode(ve),(!ee||ee.disabled)&&(ee=G.getFirstAvailableNode())),J(ee||null)}function g(){const{value:G}=f;G&&!e.treeMate.getNode(G.key)&&(f.value=null)}let m;o.watch(()=>e.show,G=>{G?m=o.watch(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?u():g(),o.nextTick(N)):g()},{immediate:!0}):m==null||m()},{immediate:!0}),o.onBeforeUnmount(()=>{m==null||m()});const h=o.computed(()=>ot(i.value.self[Q("optionHeight",e.size)])),x=o.computed(()=>dt(i.value.self[Q("padding",e.size)])),y=o.computed(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),b=o.computed(()=>{const G=d.value;return G&&G.length===0});function P(G){const{onToggle:ee}=e;ee&&ee(G)}function H(G){const{onScroll:ee}=e;ee&&ee(G)}function $(G){var ee;(ee=s.value)===null||ee===void 0||ee.sync(),H(G)}function k(){var G;(G=s.value)===null||G===void 0||G.sync()}function M(){const{value:G}=f;return G||null}function p(G,ee){ee.disabled||J(ee,!1)}function S(G,ee){ee.disabled||P(ee)}function E(G){var ee;Wn(G,"action")||(ee=e.onKeyup)===null||ee===void 0||ee.call(e,G)}function D(G){var ee;Wn(G,"action")||(ee=e.onKeydown)===null||ee===void 0||ee.call(e,G)}function O(G){var ee;(ee=e.onMousedown)===null||ee===void 0||ee.call(e,G),!e.focusable&&G.preventDefault()}function V(){const{value:G}=f;G&&J(G.getNext({loop:!0}),!0)}function j(){const{value:G}=f;G&&J(G.getPrev({loop:!0}),!0)}function J(G,ee=!1){f.value=G,ee&&N()}function N(){var G,ee;const ve=f.value;if(!ve)return;const we=c.value(ve.key);we!==null&&(e.virtualScroll?(G=l.value)===null||G===void 0||G.scrollTo({index:we}):(ee=s.value)===null||ee===void 0||ee.scrollTo({index:we,elSize:h.value}))}function U(G){var ee,ve;!((ee=a.value)===null||ee===void 0)&&ee.contains(G.target)&&((ve=e.onFocus)===null||ve===void 0||ve.call(e,G))}function q(G){var ee,ve;!((ee=a.value)===null||ee===void 0)&&ee.contains(G.relatedTarget)||(ve=e.onBlur)===null||ve===void 0||ve.call(e,G)}o.provide($r,{handleOptionMouseEnter:p,handleOptionClick:S,valueSetRef:y,pendingTmNodeRef:f,nodePropsRef:o.toRef(e,"nodeProps"),showCheckmarkRef:o.toRef(e,"showCheckmark"),multipleRef:o.toRef(e,"multiple"),valueRef:o.toRef(e,"value"),renderLabelRef:o.toRef(e,"renderLabel"),renderOptionRef:o.toRef(e,"renderOption"),labelFieldRef:o.toRef(e,"labelField"),valueFieldRef:o.toRef(e,"valueField")}),o.provide(aa,a),o.onMounted(()=>{const{value:G}=s;G&&G.sync()});const oe=o.computed(()=>{const{size:G}=e,{common:{cubicBezierEaseInOut:ee},self:{height:ve,borderRadius:we,color:re,groupHeaderTextColor:Se,actionDividerColor:Ce,optionTextColorPressed:le,optionTextColor:Me,optionTextColorDisabled:Re,optionTextColorActive:Le,optionOpacityDisabled:Ie,optionCheckColor:De,actionTextColor:Ue,optionColorPending:ke,optionColorActive:Y,loadingColor:A,loadingSize:te,optionColorActivePending:B,[Q("optionFontSize",G)]:F,[Q("optionHeight",G)]:X,[Q("optionPadding",G)]:z}}=i.value;return{"--n-height":ve,"--n-action-divider-color":Ce,"--n-action-text-color":Ue,"--n-bezier":ee,"--n-border-radius":we,"--n-color":re,"--n-option-font-size":F,"--n-group-header-text-color":Se,"--n-option-check-color":De,"--n-option-color-pending":ke,"--n-option-color-active":Y,"--n-option-color-active-pending":B,"--n-option-height":X,"--n-option-opacity-disabled":Ie,"--n-option-text-color":Me,"--n-option-text-color-active":Le,"--n-option-text-color-disabled":Re,"--n-option-text-color-pressed":le,"--n-option-padding":z,"--n-option-padding-left":dt(z,"left"),"--n-option-padding-right":dt(z,"right"),"--n-loading-color":A,"--n-loading-size":te}}),{inlineThemeDisabled:pe}=e,ie=pe?et("internal-select-menu",o.computed(()=>e.size[0]),oe,e):void 0,fe={selfRef:a,next:V,prev:j,getPendingTmNode:M};return Wa(a,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:r,virtualListRef:l,scrollbarRef:s,itemSize:h,padding:x,flattenedNodes:d,empty:b,virtualListContainer(){const{value:G}=l;return G==null?void 0:G.listElRef},virtualListContent(){const{value:G}=l;return G==null?void 0:G.itemsElRef},doScroll:H,handleFocusin:U,handleFocusout:q,handleKeyUp:E,handleKeyDown:D,handleMouseDown:O,handleVirtualListResize:k,handleVirtualListScroll:$,cssVars:pe?void 0:oe,themeClass:ie==null?void 0:ie.themeClass,onRender:ie==null?void 0:ie.onRender},fe)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:a}=this;return a==null||a(),o.h("div",{ref:"selfRef",tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Oe(e.header,l=>l&&o.h("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},l)),this.loading?o.h("div",{class:`${n}-base-select-menu__loading`},o.h(Zo,{clsPrefix:n,strokeWidth:20})):this.empty?o.h("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},mt(e.empty,()=>[o.h(nm,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty})])):o.h(hi,{ref:"scrollbarRef",theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},{default:()=>t?o.h(Mc,{ref:"virtualListRef",class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:l})=>l.isGroup?o.h(as,{key:l.key,clsPrefix:n,tmNode:l}):l.ignored?null:o.h(is,{clsPrefix:n,key:l.key,tmNode:l})}):o.h("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(l=>l.isGroup?o.h(as,{key:l.key,clsPrefix:n,tmNode:l}):o.h(is,{clsPrefix:n,key:l.key,tmNode:l})))}),Oe(e.action,l=>l&&[o.h("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},l),o.h(yg,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),pm=w("base-wave",`
|
|
292
292
|
position: absolute;
|
|
293
293
|
left: 0;
|
|
294
294
|
right: 0;
|
|
@@ -411,7 +411,7 @@ ${t}
|
|
|
411
411
|
${n}: 100%;
|
|
412
412
|
${bi[n]}: auto;
|
|
413
413
|
${r}
|
|
414
|
-
`,[w("popover-arrow",t)])])])}const ds=Object.assign(Object.assign({},ye.props),{to:rt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function xm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o.h("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},o.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const ym=o.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:ds,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Ke(e),l=ye("Popover","-popover",vm,pi,e,i),s=o.ref(null),d=o.inject("NPopover"),c=o.ref(null),f=o.ref(e.show),u=o.ref(!1);o.watchEffect(()=>{const{show:p}=e;p&&!Id()&&!e.internalDeactivateImmediately&&(u.value=!0)});const g=o.computed(()=>{const{trigger:p,onClickoutside:S}=e,E=[],{positionManuallyRef:{value:D}}=d;return D||(p==="click"&&!S&&E.push([Kn,$,void 0,{capture:!0}]),p==="hover"&&E.push([pa,H])),S&&E.push([Kn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&E.push([o.vShow,e.show]),E}),m=o.computed(()=>{const{common:{cubicBezierEaseInOut:p,cubicBezierEaseIn:S,cubicBezierEaseOut:E},self:{space:D,spaceArrow:O,padding:V,fontSize:j,textColor:J,dividerColor:N,color:U,boxShadow:q,borderRadius:oe,arrowHeight:pe,arrowOffset:ie,arrowOffsetVertical:fe}}=l.value;return{"--n-box-shadow":q,"--n-bezier":p,"--n-bezier-ease-in":S,"--n-bezier-ease-out":E,"--n-font-size":j,"--n-text-color":J,"--n-color":U,"--n-divider-color":N,"--n-border-radius":oe,"--n-arrow-height":pe,"--n-arrow-offset":ie,"--n-arrow-offset-vertical":fe,"--n-padding":V,"--n-space":D,"--n-space-arrow":O}}),h=o.computed(()=>{const p=e.width==="trigger"?void 0:lt(e.width),S=[];p&&S.push({width:p});const{maxWidth:E,minWidth:D}=e;return E&&S.push({maxWidth:lt(E)}),D&&S.push({maxWidth:lt(D)}),a||S.push(m.value),S}),x=a?et("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:y}),o.onBeforeUnmount(()=>{d.setBodyInstance(null)}),o.watch(o.toRef(e,"show"),p=>{e.animated||(p?f.value=!0:f.value=!1)});function y(){var p;(p=s.value)===null||p===void 0||p.syncPosition()}function b(p){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(p)}function P(p){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(p)}function H(p){e.trigger==="hover"&&!k().contains($n(p))&&d.handleMouseMoveOutside(p)}function $(p){(e.trigger==="click"&&!k().contains($n(p))||e.onClickoutside)&&d.handleClickOutside(p)}function k(){return d.getTriggerElement()}o.provide(da,c),o.provide(sa,null),o.provide(la,null);function M(){if(x==null||x.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const E=d.internalRenderBodyRef.value,{value:D}=i;if(E)S=E([`${D}-popover-shared`,x==null?void 0:x.themeClass.value,e.overlap&&`${D}-popover-shared--overlap`,e.showArrow&&`${D}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${D}-popover-shared--center-arrow`],c,h.value,b,P);else{const{value:O}=d.extraClassRef,{internalTrapFocus:V}=e,j=!Tn(t.header)||!Tn(t.footer),J=()=>{var N,U;const q=j?o.h(o.Fragment,null,Oe(t.header,ie=>ie?o.h("div",{class:[`${D}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Oe(t.default,ie=>ie?o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Oe(t.footer,ie=>ie?o.h("div",{class:[`${D}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(N=t.default)===null||N===void 0?void 0:N.call(t):o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t),oe=e.scrollable?o.h(sm,{contentClass:j?void 0:`${D}-popover__content ${(U=e.contentClass)!==null&&U!==void 0?U:""}`,contentStyle:j?void 0:e.contentStyle},{default:()=>q}):q,pe=e.showArrow?xm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:D}):null;return[oe,pe]};S=o.h("div",o.mergeProps({class:[`${D}-popover`,`${D}-popover-shared`,x==null?void 0:x.themeClass.value,O.map(N=>`${D}-${N}`),{[`${D}-popover--scrollable`]:e.scrollable,[`${D}-popover--show-header-or-footer`]:j,[`${D}-popover--raw`]:e.raw,[`${D}-popover-shared--overlap`]:e.overlap,[`${D}-popover-shared--show-arrow`]:e.showArrow,[`${D}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:c,style:h.value,onKeydown:d.handleKeydown,onMouseenter:b,onMouseleave:P},n),V?o.h(Dc,{active:e.show,autoFocus:!0},{default:J}):J())}return o.withDirectives(S,g.value)}return{displayed:u,namespace:r,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:s,adjustedTo:rt(e),followerEnabled:f,renderContentNode:M}},render(){return o.h(Eo,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===rt.tdkey},{default:()=>this.animated?o.h(o.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),wm=Object.keys(ds),Cm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Sm(e,t,n){Cm[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],a=n[r];i?e.props[r]=(...l)=>{i(...l),a(...l)}:e.props[r]=a})}const cs={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:rt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},$m=Object.assign(Object.assign(Object.assign({},ye.props),cs),{internalOnAfterLeave:Function,internalRenderBody:Function}),us=o.defineComponent({name:"Popover",inheritAttrs:!1,props:$m,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.maxWidth!==void 0&&tt("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&tt("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&tt("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&tt("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&tt("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=Rn(),n=o.ref(null),r=o.computed(()=>e.show),i=o.ref(e.defaultShow),a=vt(r,i),l=Xe(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:N}=e;return!!(N!=null&&N())},d=()=>s()?!1:a.value,c=To(e,["arrow","showArrow"]),f=o.computed(()=>e.overlap?!1:c.value);let u=null;const g=o.ref(null),m=o.ref(null),h=Xe(()=>e.x!==void 0&&e.y!==void 0);function x(N){const{"onUpdate:show":U,onUpdateShow:q,onShow:oe,onHide:pe}=e;i.value=N,U&&de(U,N),q&&de(q,N),N&&oe&&de(oe,!0),N&&pe&&de(pe,!1)}function y(){u&&u.syncPosition()}function b(){const{value:N}=g;N&&(window.clearTimeout(N),g.value=null)}function P(){const{value:N}=m;N&&(window.clearTimeout(N),m.value=null)}function H(){const N=s();if(e.trigger==="focus"&&!N){if(d())return;x(!0)}}function $(){const N=s();if(e.trigger==="focus"&&!N){if(!d())return;x(!1)}}function k(){const N=s();if(e.trigger==="hover"&&!N){if(P(),g.value!==null||d())return;const U=()=>{x(!0),g.value=null},{delay:q}=e;q===0?U():g.value=window.setTimeout(U,q)}}function M(){const N=s();if(e.trigger==="hover"&&!N){if(b(),m.value!==null||!d())return;const U=()=>{x(!1),m.value=null},{duration:q}=e;q===0?U():m.value=window.setTimeout(U,q)}}function p(){M()}function S(N){var U;d()&&(e.trigger==="click"&&(b(),P(),x(!1)),(U=e.onClickoutside)===null||U===void 0||U.call(e,N))}function E(){if(e.trigger==="click"&&!s()){b(),P();const N=!d();x(N)}}function D(N){e.internalTrapFocus&&N.key==="Escape"&&(b(),P(),x(!1))}function O(N){i.value=N}function V(){var N;return(N=n.value)===null||N===void 0?void 0:N.targetRef}function j(N){u=N}return o.provide("NPopover",{getTriggerElement:V,handleKeydown:D,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:p,setBodyInstance:j,positionManuallyRef:h,isMountedRef:t,zIndexRef:o.toRef(e,"zIndex"),extraClassRef:o.toRef(e,"internalExtraClass"),internalRenderBodyRef:o.toRef(e,"internalRenderBody")}),o.watchEffect(()=>{a.value&&s()&&x(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:O,handleClick:E,handleMouseEnter:k,handleMouseLeave:M,handleFocus:H,handleBlur:$,syncPosition:y}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=Ki(n,"activator"):r=Ki(n,"trigger"),r)){r=o.cloneVNode(r),r=r.type===o.Text?o.h("span",[r]):r;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[a,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],d={onBlur:c=>{s.forEach(f=>{f.onBlur(c)})},onFocus:c=>{s.forEach(f=>{f.onFocus(c)})},onClick:c=>{s.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{s.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{s.forEach(f=>{f.onMouseleave(c)})}};Sm(r,l?"nested":t?"manual":this.trigger,d)}}return o.h(Po,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?o.withDirectives(o.h("div",{style:{position:"fixed",inset:0}}),[[ba,{enabled:a,zIndex:this.zIndex}]]):null,t?null:o.h(Ro,null,{default:()=>r}),o.h(ym,ad(this.$props,wm,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),km={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 zm(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:g,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,borderRadiusSmall:y,fontSizeMini:b,fontSizeTiny:P,fontSizeSmall:H,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:p,heightMedium:S,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:O,buttonColor2Pressed:V,fontWeightStrong:j}=e;return Object.assign(Object.assign({},km),{closeBorderRadius:y,heightTiny:k,heightSmall:M,heightMedium:p,heightLarge:S,borderRadius:y,opacityDisabled:u,fontSizeTiny:b,fontSizeSmall:P,fontSizeMedium:H,fontSizeLarge:$,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:O,colorPressedCheckable:V,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${f}`,textColor:t,color:g,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${me(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:me(i,{alpha:.12}),colorBorderedPrimary:me(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:me(i,{alpha:.12}),closeColorPressedPrimary:me(i,{alpha:.18}),borderInfo:`1px solid ${me(a,{alpha:.3})}`,textColorInfo:a,colorInfo:me(a,{alpha:.12}),colorBorderedInfo:me(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:me(a,{alpha:.12}),closeColorPressedInfo:me(a,{alpha:.18}),borderSuccess:`1px solid ${me(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:me(l,{alpha:.12}),colorBorderedSuccess:me(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:me(l,{alpha:.12}),closeColorPressedSuccess:me(l,{alpha:.18}),borderWarning:`1px solid ${me(s,{alpha:.35})}`,textColorWarning:s,colorWarning:me(s,{alpha:.15}),colorBorderedWarning:me(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:me(s,{alpha:.12}),closeColorPressedWarning:me(s,{alpha:.18}),borderError:`1px solid ${me(d,{alpha:.23})}`,textColorError:d,colorError:me(d,{alpha:.1}),colorBorderedError:me(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:me(d,{alpha:.12}),closeColorPressedError:me(d,{alpha:.18})})}const Tm={name:"Tag",common:Ye,self:zm},Pm={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Rm=w("tag",`
|
|
414
|
+
`,[w("popover-arrow",t)])])])}const ds=Object.assign(Object.assign({},ye.props),{to:rt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function xm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o.h("div",{key:"__popover-arrow__",style:r,class:[`${i}-popover-arrow-wrapper`,n]},o.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const ym=o.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:ds,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Ke(e),l=ye("Popover","-popover",vm,pi,e,i),s=o.ref(null),d=o.inject("NPopover"),c=o.ref(null),f=o.ref(e.show),u=o.ref(!1);o.watchEffect(()=>{const{show:p}=e;p&&!Id()&&!e.internalDeactivateImmediately&&(u.value=!0)});const g=o.computed(()=>{const{trigger:p,onClickoutside:S}=e,E=[],{positionManuallyRef:{value:D}}=d;return D||(p==="click"&&!S&&E.push([qn,$,void 0,{capture:!0}]),p==="hover"&&E.push([pa,H])),S&&E.push([qn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&E.push([o.vShow,e.show]),E}),m=o.computed(()=>{const{common:{cubicBezierEaseInOut:p,cubicBezierEaseIn:S,cubicBezierEaseOut:E},self:{space:D,spaceArrow:O,padding:V,fontSize:j,textColor:J,dividerColor:N,color:U,boxShadow:q,borderRadius:oe,arrowHeight:pe,arrowOffset:ie,arrowOffsetVertical:fe}}=l.value;return{"--n-box-shadow":q,"--n-bezier":p,"--n-bezier-ease-in":S,"--n-bezier-ease-out":E,"--n-font-size":j,"--n-text-color":J,"--n-color":U,"--n-divider-color":N,"--n-border-radius":oe,"--n-arrow-height":pe,"--n-arrow-offset":ie,"--n-arrow-offset-vertical":fe,"--n-padding":V,"--n-space":D,"--n-space-arrow":O}}),h=o.computed(()=>{const p=e.width==="trigger"?void 0:lt(e.width),S=[];p&&S.push({width:p});const{maxWidth:E,minWidth:D}=e;return E&&S.push({maxWidth:lt(E)}),D&&S.push({maxWidth:lt(D)}),a||S.push(m.value),S}),x=a?et("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:y}),o.onBeforeUnmount(()=>{d.setBodyInstance(null)}),o.watch(o.toRef(e,"show"),p=>{e.animated||(p?f.value=!0:f.value=!1)});function y(){var p;(p=s.value)===null||p===void 0||p.syncPosition()}function b(p){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(p)}function P(p){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(p)}function H(p){e.trigger==="hover"&&!k().contains(kn(p))&&d.handleMouseMoveOutside(p)}function $(p){(e.trigger==="click"&&!k().contains(kn(p))||e.onClickoutside)&&d.handleClickOutside(p)}function k(){return d.getTriggerElement()}o.provide(da,c),o.provide(sa,null),o.provide(la,null);function M(){if(x==null||x.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const E=d.internalRenderBodyRef.value,{value:D}=i;if(E)S=E([`${D}-popover-shared`,x==null?void 0:x.themeClass.value,e.overlap&&`${D}-popover-shared--overlap`,e.showArrow&&`${D}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${D}-popover-shared--center-arrow`],c,h.value,b,P);else{const{value:O}=d.extraClassRef,{internalTrapFocus:V}=e,j=!Pn(t.header)||!Pn(t.footer),J=()=>{var N,U;const q=j?o.h(o.Fragment,null,Oe(t.header,ie=>ie?o.h("div",{class:[`${D}-popover__header`,e.headerClass],style:e.headerStyle},ie):null),Oe(t.default,ie=>ie?o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Oe(t.footer,ie=>ie?o.h("div",{class:[`${D}-popover__footer`,e.footerClass],style:e.footerStyle},ie):null)):e.scrollable?(N=t.default)===null||N===void 0?void 0:N.call(t):o.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t),oe=e.scrollable?o.h(sm,{contentClass:j?void 0:`${D}-popover__content ${(U=e.contentClass)!==null&&U!==void 0?U:""}`,contentStyle:j?void 0:e.contentStyle},{default:()=>q}):q,pe=e.showArrow?xm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:D}):null;return[oe,pe]};S=o.h("div",o.mergeProps({class:[`${D}-popover`,`${D}-popover-shared`,x==null?void 0:x.themeClass.value,O.map(N=>`${D}-${N}`),{[`${D}-popover--scrollable`]:e.scrollable,[`${D}-popover--show-header-or-footer`]:j,[`${D}-popover--raw`]:e.raw,[`${D}-popover-shared--overlap`]:e.overlap,[`${D}-popover-shared--show-arrow`]:e.showArrow,[`${D}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:c,style:h.value,onKeydown:d.handleKeydown,onMouseenter:b,onMouseleave:P},n),V?o.h(Dc,{active:e.show,autoFocus:!0},{default:J}):J())}return o.withDirectives(S,g.value)}return{displayed:u,namespace:r,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:s,adjustedTo:rt(e),followerEnabled:f,renderContentNode:M}},render(){return o.h(Eo,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===rt.tdkey},{default:()=>this.animated?o.h(o.Transition,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),wm=Object.keys(ds),Cm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function Sm(e,t,n){Cm[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[r],a=n[r];i?e.props[r]=(...l)=>{i(...l),a(...l)}:e.props[r]=a})}const cs={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:rt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},$m=Object.assign(Object.assign(Object.assign({},ye.props),cs),{internalOnAfterLeave:Function,internalRenderBody:Function}),us=o.defineComponent({name:"Popover",inheritAttrs:!1,props:$m,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.maxWidth!==void 0&&tt("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&tt("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&tt("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&tt("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&tt("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=_n(),n=o.ref(null),r=o.computed(()=>e.show),i=o.ref(e.defaultShow),a=vt(r,i),l=Xe(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;const{getDisabled:N}=e;return!!(N!=null&&N())},d=()=>s()?!1:a.value,c=To(e,["arrow","showArrow"]),f=o.computed(()=>e.overlap?!1:c.value);let u=null;const g=o.ref(null),m=o.ref(null),h=Xe(()=>e.x!==void 0&&e.y!==void 0);function x(N){const{"onUpdate:show":U,onUpdateShow:q,onShow:oe,onHide:pe}=e;i.value=N,U&&de(U,N),q&&de(q,N),N&&oe&&de(oe,!0),N&&pe&&de(pe,!1)}function y(){u&&u.syncPosition()}function b(){const{value:N}=g;N&&(window.clearTimeout(N),g.value=null)}function P(){const{value:N}=m;N&&(window.clearTimeout(N),m.value=null)}function H(){const N=s();if(e.trigger==="focus"&&!N){if(d())return;x(!0)}}function $(){const N=s();if(e.trigger==="focus"&&!N){if(!d())return;x(!1)}}function k(){const N=s();if(e.trigger==="hover"&&!N){if(P(),g.value!==null||d())return;const U=()=>{x(!0),g.value=null},{delay:q}=e;q===0?U():g.value=window.setTimeout(U,q)}}function M(){const N=s();if(e.trigger==="hover"&&!N){if(b(),m.value!==null||!d())return;const U=()=>{x(!1),m.value=null},{duration:q}=e;q===0?U():m.value=window.setTimeout(U,q)}}function p(){M()}function S(N){var U;d()&&(e.trigger==="click"&&(b(),P(),x(!1)),(U=e.onClickoutside)===null||U===void 0||U.call(e,N))}function E(){if(e.trigger==="click"&&!s()){b(),P();const N=!d();x(N)}}function D(N){e.internalTrapFocus&&N.key==="Escape"&&(b(),P(),x(!1))}function O(N){i.value=N}function V(){var N;return(N=n.value)===null||N===void 0?void 0:N.targetRef}function j(N){u=N}return o.provide("NPopover",{getTriggerElement:V,handleKeydown:D,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:p,setBodyInstance:j,positionManuallyRef:h,isMountedRef:t,zIndexRef:o.toRef(e,"zIndex"),extraClassRef:o.toRef(e,"internalExtraClass"),internalRenderBodyRef:o.toRef(e,"internalRenderBody")}),o.watchEffect(()=>{a.value&&s()&&x(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:l,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:O,handleClick:E,handleMouseEnter:k,handleMouseLeave:M,handleFocus:H,handleBlur:$,syncPosition:y}},render(){var e;const{positionManually:t,$slots:n}=this;let r,i=!1;if(!t&&(n.activator?r=Ki(n,"activator"):r=Ki(n,"trigger"),r)){r=o.cloneVNode(r),r=r.type===o.Text?o.h("span",[r]):r;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)i=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[a,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:l}=this,s=[a,...l],d={onBlur:c=>{s.forEach(f=>{f.onBlur(c)})},onFocus:c=>{s.forEach(f=>{f.onFocus(c)})},onClick:c=>{s.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{s.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{s.forEach(f=>{f.onMouseleave(c)})}};Sm(r,l?"nested":t?"manual":this.trigger,d)}}return o.h(Po,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?o.withDirectives(o.h("div",{style:{position:"fixed",inset:0}}),[[ba,{enabled:a,zIndex:this.zIndex}]]):null,t?null:o.h(Ro,null,{default:()=>r}),o.h(ym,ad(this.$props,wm,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var l,s;return(s=(l=this.$slots).default)===null||s===void 0?void 0:s.call(l)},header:()=>{var l,s;return(s=(l=this.$slots).header)===null||s===void 0?void 0:s.call(l)},footer:()=>{var l,s;return(s=(l=this.$slots).footer)===null||s===void 0?void 0:s.call(l)}})]}})}}),km={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 zm(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:l,warningColor:s,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:g,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,borderRadiusSmall:y,fontSizeMini:b,fontSizeTiny:P,fontSizeSmall:H,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:p,heightMedium:S,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:O,buttonColor2Pressed:V,fontWeightStrong:j}=e;return Object.assign(Object.assign({},km),{closeBorderRadius:y,heightTiny:k,heightSmall:M,heightMedium:p,heightLarge:S,borderRadius:y,opacityDisabled:u,fontSizeTiny:b,fontSizeSmall:P,fontSizeMedium:H,fontSizeLarge:$,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:O,colorPressedCheckable:V,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${f}`,textColor:t,color:g,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:x,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${me(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:me(i,{alpha:.12}),colorBorderedPrimary:me(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:me(i,{alpha:.12}),closeColorPressedPrimary:me(i,{alpha:.18}),borderInfo:`1px solid ${me(a,{alpha:.3})}`,textColorInfo:a,colorInfo:me(a,{alpha:.12}),colorBorderedInfo:me(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:me(a,{alpha:.12}),closeColorPressedInfo:me(a,{alpha:.18}),borderSuccess:`1px solid ${me(l,{alpha:.3})}`,textColorSuccess:l,colorSuccess:me(l,{alpha:.12}),colorBorderedSuccess:me(l,{alpha:.1}),closeIconColorSuccess:l,closeIconColorHoverSuccess:l,closeIconColorPressedSuccess:l,closeColorHoverSuccess:me(l,{alpha:.12}),closeColorPressedSuccess:me(l,{alpha:.18}),borderWarning:`1px solid ${me(s,{alpha:.35})}`,textColorWarning:s,colorWarning:me(s,{alpha:.15}),colorBorderedWarning:me(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:me(s,{alpha:.12}),closeColorPressedWarning:me(s,{alpha:.18}),borderError:`1px solid ${me(d,{alpha:.23})}`,textColorError:d,colorError:me(d,{alpha:.1}),colorBorderedError:me(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:me(d,{alpha:.12}),closeColorPressedError:me(d,{alpha:.18})})}const Tm={name:"Tag",common:Ye,self:zm},Pm={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Rm=w("tag",`
|
|
415
415
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
416
416
|
white-space: nowrap;
|
|
417
417
|
position: relative;
|
|
@@ -505,7 +505,7 @@ ${t}
|
|
|
505
505
|
left: 50%;
|
|
506
506
|
top: 50%;
|
|
507
507
|
transform: translateX(-50%) translateY(-50%);
|
|
508
|
-
`,[
|
|
508
|
+
`,[Fn({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),mi=o.defineComponent({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return mn("-base-clear",Em,o.toRef(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-base-clear`},o.h(Yo,null,{default:()=>{var t,n;return this.show?o.h("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},mt(this.$slots.icon,()=>[o.h(bt,{clsPrefix:e},{default:()=>o.h(mg,null)})])):o.h("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),fs=o.defineComponent({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()=>{const{clsPrefix:n}=e;return o.h(Zo,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?o.h(mi,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>o.h(bt,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>mt(t.default,()=>[o.h(gg,null)])})}):null})}}}),Mm={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};function Im(e){const{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:a,primaryColor:l,primaryColorHover:s,warningColor:d,warningColorHover:c,errorColor:f,errorColorHover:u,borderColor:g,iconColor:m,iconColorDisabled:h,clearColor:x,clearColorHover:y,clearColorPressed:b,placeholderColor:P,placeholderColorDisabled:H,fontSizeTiny:$,fontSizeSmall:k,fontSizeMedium:M,fontSizeLarge:p,heightTiny:S,heightSmall:E,heightMedium:D,heightLarge:O}=e;return Object.assign(Object.assign({},Mm),{fontSizeTiny:$,fontSizeSmall:k,fontSizeMedium:M,fontSizeLarge:p,heightTiny:S,heightSmall:E,heightMedium:D,heightLarge:O,borderRadius:t,textColor:n,textColorDisabled:r,placeholderColor:P,placeholderColorDisabled:H,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${g}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${l}`,borderFocus:`1px solid ${s}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${me(l,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${me(l,{alpha:.2})}`,caretColor:l,arrowColor:m,arrowColorDisabled:h,loadingColor:l,borderWarning:`1px solid ${d}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${d}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${me(d,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${me(d,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:d,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${f}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${me(f,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${me(f,{alpha:.2})}`,colorActiveError:i,caretColorError:f,clearColor:x,clearColorHover:y,clearColorPressed:b})}const hs={name:"InternalSelection",common:Ye,peers:{Popover:pi},self:Im},Om=I([w("base-selection",`
|
|
509
509
|
--n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
|
|
510
510
|
--n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
|
|
511
511
|
position: relative;
|
|
@@ -705,7 +705,7 @@ ${t}
|
|
|
705
705
|
line-height: 1.25;
|
|
706
706
|
text-overflow: ellipsis;
|
|
707
707
|
overflow: hidden;
|
|
708
|
-
`)])])]),Am=o.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},ye.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ke(e),r=qt("InternalSelection",n,t),i=o.ref(null),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(!1),x=o.ref(!1),y=o.ref(!1),b=ye("InternalSelection","-internal-selection",Om,hs,e,o.toRef(e,"clsPrefix")),P=o.computed(()=>e.clearable&&!e.disabled&&(y.value||e.active)),H=o.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):ln(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=o.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=o.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:_}=i;if(_){const{value:ne}=a;ne&&(ne.style.width=`${_.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=g.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function p(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}o.watch(o.toRef(e,"active"),C=>{C||p()}),o.watch(o.toRef(e,"pattern"),()=>{e.multiple&&o.nextTick(M)});function E(C){const{onFocus:_}=e;_&&_(C)}function D(C){const{onBlur:_}=e;_&&_(C)}function O(C){const{onDeleteOption:_}=e;_&&_(C)}function V(C){const{onClear:_}=e;_&&_(C)}function j(C){const{onPatternInput:_}=e;_&&_(C)}function J(C){var _;(!C.relatedTarget||!(!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)))&&E(C)}function N(C){var _;!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)||D(C)}function U(C){V(C)}function q(){y.value=!0}function oe(){y.value=!1}function pe(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ie(C){O(C)}const fe=o.ref(!1);function G(C){if(C.key==="Backspace"&&!fe.value&&!e.pattern.length){const{selectedOptions:_}=e;_!=null&&_.length&&ie(_[_.length-1])}}let ee=null;function ve(C){const{value:_}=i;if(_){const ne=C.target.value;_.textContent=ne,M()}e.ignoreComposition&&fe.value?ee=C:j(C)}function we(){fe.value=!0}function re(){fe.value=!1,e.ignoreComposition&&j(ee),ee=null}function Se(C){var _;x.value=!0,(_=e.onPatternFocus)===null||_===void 0||_.call(e,C)}function Ce(C){var _;x.value=!1,(_=e.onPatternBlur)===null||_===void 0||_.call(e,C)}function le(){var C,_;if(e.filterable)x.value=!1,(C=c.value)===null||C===void 0||C.blur(),(_=a.value)===null||_===void 0||_.blur();else if(e.multiple){const{value:ne}=s;ne==null||ne.blur()}else{const{value:ne}=d;ne==null||ne.blur()}}function Me(){var C,_,ne;e.filterable?(x.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(_=s.value)===null||_===void 0||_.focus():(ne=d.value)===null||ne===void 0||ne.focus()}function Re(){const{value:C}=a;C&&(S(),C.focus())}function Le(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:_}=f;_&&_.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ue(){return a.value}let ke=null;function Y(){ke!==null&&window.clearTimeout(ke)}function A(){e.active||(Y(),ke=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function te(){Y()}function B(C){C||(Y(),h.value=!1)}o.watch(k,C=>{C||(h.value=!1)}),o.onMounted(()=>{o.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=x.value?-1:0)})}),Wa(l,e.onResize);const{inlineThemeDisabled:F}=e,X=o.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:_},self:{borderRadius:ne,color:xe,placeholderColor:ze,textColor:Ne,paddingSingle:Ae,paddingMultiple:Be,caretColor:qe,colorDisabled:st,textColorDisabled:Je,placeholderColorDisabled:it,colorActive:v,boxShadowFocus:L,boxShadowActive:Z,boxShadowHover:ae,border:se,borderFocus:ce,borderHover:ue,borderActive:ge,arrowColor:Te,arrowColorDisabled:ut,loadingColor:Yt,colorActiveWarning:wn,boxShadowFocusWarning:Zt,boxShadowActiveWarning:Jt,boxShadowHoverWarning:ho,borderWarning:po,borderFocusWarning:Dn,borderHoverWarning:Qt,borderActiveWarning:R,colorActiveError:K,boxShadowFocusError:be,boxShadowActiveError:Ee,boxShadowHoverError:Ve,borderError:_e,borderFocusError:Ot,borderHoverError:At,borderActiveError:Ft,clearColor:Cn,clearColorHover:Sn,clearColorPressed:bo,clearSize:Ri,arrowSize:_i,[Q("height",C)]:Bi,[Q("fontSize",C)]:Ei}}=b.value,Vn=dt(Ae),Hn=dt(Be);return{"--n-bezier":_,"--n-border":se,"--n-border-active":ge,"--n-border-focus":ce,"--n-border-hover":ue,"--n-border-radius":ne,"--n-box-shadow-active":Z,"--n-box-shadow-focus":L,"--n-box-shadow-hover":ae,"--n-caret-color":qe,"--n-color":xe,"--n-color-active":v,"--n-color-disabled":st,"--n-font-size":Ei,"--n-height":Bi,"--n-padding-single-top":Vn.top,"--n-padding-multiple-top":Hn.top,"--n-padding-single-right":Vn.right,"--n-padding-multiple-right":Hn.right,"--n-padding-single-left":Vn.left,"--n-padding-multiple-left":Hn.left,"--n-padding-single-bottom":Vn.bottom,"--n-padding-multiple-bottom":Hn.bottom,"--n-placeholder-color":ze,"--n-placeholder-color-disabled":it,"--n-text-color":Ne,"--n-text-color-disabled":Je,"--n-arrow-color":Te,"--n-arrow-color-disabled":ut,"--n-loading-color":Yt,"--n-color-active-warning":wn,"--n-box-shadow-focus-warning":Zt,"--n-box-shadow-active-warning":Jt,"--n-box-shadow-hover-warning":ho,"--n-border-warning":po,"--n-border-focus-warning":Dn,"--n-border-hover-warning":Qt,"--n-border-active-warning":R,"--n-color-active-error":K,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Ee,"--n-box-shadow-hover-error":Ve,"--n-border-error":_e,"--n-border-focus-error":Ot,"--n-border-hover-error":At,"--n-border-active-error":Ft,"--n-clear-size":Ri,"--n-clear-color":Cn,"--n-clear-color-hover":Sn,"--n-clear-color-pressed":bo,"--n-arrow-size":_i}}),z=F?et("internal-selection",o.computed(()=>e.size[0]),X,e):void 0;return{mergedTheme:b,mergedClearable:P,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:x,filterablePlaceholder:H,label:$,selected:k,showTagsPanel:h,isComposing:fe,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:c,overflowRef:g,inputTagElRef:m,handleMouseDown:pe,handleFocusin:J,handleClear:U,handleMouseEnter:q,handleMouseLeave:oe,handleDeleteOption:ie,handlePatternKeyDown:G,handlePatternInputInput:ve,handlePatternInputBlur:Ce,handlePatternInputFocus:Se,handleMouseEnterCounter:A,handleMouseLeaveCounter:te,handleFocusout:N,handleCompositionEnd:re,handleCompositionStart:we,onPopoverUpdateShow:B,focus:Me,focusInput:Re,blur:le,blurInput:Le,updateCounter:Ie,getCounter:De,getTail:Ue,renderLabel:e.renderLabel,cssVars:F?void 0:X,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const g=a==="responsive",m=typeof a=="number",h=g||m,x=o.h(yr,null,{default:()=>o.h(fs,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var b,P;return(P=(b=this.$slots).arrow)===null||P===void 0?void 0:P.call(b)}})});let y;if(t){const{labelField:b}=this,P=j=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:j.value},f?f({option:j,handleClose:()=>{this.handleDeleteOption(j)}}):o.h(gi,{size:n,closable:!j.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(j)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(j,!0):ln(j[b],j,!0)})),H=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(P),$=i?o.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),o.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,k=g?()=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let M;if(m){const j=this.selectedOptions.length-a;j>0&&(M=o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${j}`})))}const p=g?i?o.h(Da,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k,tail:()=>$}):o.h(Da,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k}):m&&M?H().concat(M):H(),S=h?()=>o.h("div",{class:`${s}-base-selection-popover`},g?H():this.selectedOptions.map(P)):void 0,E=h?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,O=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,V=i?o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},p,g?null:$,x):o.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},p,x);y=o.h(o.Fragment,null,h?o.h(us,Object.assign({},E,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>V,default:S}):V,O)}else if(i){const b=this.pattern||this.isComposing,P=this.active?!b:!this.selected,H=this.active?!1:this.selected;y=o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Gi(this.label)},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),H?o.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):null,P?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,x)}else y=o.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?o.h("div",{class:`${s}-base-selection-input`,title:Gi(this.label),key:"input"},o.h("div",{class:`${s}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),x);return o.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},y,l?o.h("div",{class:`${s}-base-selection__border`}):null,l?o.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Xt}=bn;function Fm({duration:e=".2s",delay:t=".1s"}={}){return[I("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),I("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
708
|
+
`)])])]),Am=o.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},ye.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:""},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:"medium"},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Ke(e),r=qt("InternalSelection",n,t),i=o.ref(null),a=o.ref(null),l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(!1),x=o.ref(!1),y=o.ref(!1),b=ye("InternalSelection","-internal-selection",Om,hs,e,o.toRef(e,"clsPrefix")),P=o.computed(()=>e.clearable&&!e.disabled&&(y.value||e.active)),H=o.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):ln(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=o.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=o.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:_}=i;if(_){const{value:ne}=a;ne&&(ne.style.width=`${_.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=g.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function p(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}o.watch(o.toRef(e,"active"),C=>{C||p()}),o.watch(o.toRef(e,"pattern"),()=>{e.multiple&&o.nextTick(M)});function E(C){const{onFocus:_}=e;_&&_(C)}function D(C){const{onBlur:_}=e;_&&_(C)}function O(C){const{onDeleteOption:_}=e;_&&_(C)}function V(C){const{onClear:_}=e;_&&_(C)}function j(C){const{onPatternInput:_}=e;_&&_(C)}function J(C){var _;(!C.relatedTarget||!(!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)))&&E(C)}function N(C){var _;!((_=l.value)===null||_===void 0)&&_.contains(C.relatedTarget)||D(C)}function U(C){V(C)}function q(){y.value=!0}function oe(){y.value=!1}function pe(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function ie(C){O(C)}const fe=o.ref(!1);function G(C){if(C.key==="Backspace"&&!fe.value&&!e.pattern.length){const{selectedOptions:_}=e;_!=null&&_.length&&ie(_[_.length-1])}}let ee=null;function ve(C){const{value:_}=i;if(_){const ne=C.target.value;_.textContent=ne,M()}e.ignoreComposition&&fe.value?ee=C:j(C)}function we(){fe.value=!0}function re(){fe.value=!1,e.ignoreComposition&&j(ee),ee=null}function Se(C){var _;x.value=!0,(_=e.onPatternFocus)===null||_===void 0||_.call(e,C)}function Ce(C){var _;x.value=!1,(_=e.onPatternBlur)===null||_===void 0||_.call(e,C)}function le(){var C,_;if(e.filterable)x.value=!1,(C=c.value)===null||C===void 0||C.blur(),(_=a.value)===null||_===void 0||_.blur();else if(e.multiple){const{value:ne}=s;ne==null||ne.blur()}else{const{value:ne}=d;ne==null||ne.blur()}}function Me(){var C,_,ne;e.filterable?(x.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(_=s.value)===null||_===void 0||_.focus():(ne=d.value)===null||ne===void 0||ne.focus()}function Re(){const{value:C}=a;C&&(S(),C.focus())}function Le(){const{value:C}=a;C&&C.blur()}function Ie(C){const{value:_}=f;_&&_.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ue(){return a.value}let ke=null;function Y(){ke!==null&&window.clearTimeout(ke)}function A(){e.active||(Y(),ke=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function te(){Y()}function B(C){C||(Y(),h.value=!1)}o.watch(k,C=>{C||(h.value=!1)}),o.onMounted(()=>{o.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=x.value?-1:0)})}),Wa(l,e.onResize);const{inlineThemeDisabled:F}=e,X=o.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:_},self:{borderRadius:ne,color:xe,placeholderColor:ze,textColor:Ne,paddingSingle:Ae,paddingMultiple:Be,caretColor:qe,colorDisabled:st,textColorDisabled:Je,placeholderColorDisabled:it,colorActive:v,boxShadowFocus:L,boxShadowActive:Z,boxShadowHover:ae,border:se,borderFocus:ce,borderHover:ue,borderActive:ge,arrowColor:Te,arrowColorDisabled:ut,loadingColor:Yt,colorActiveWarning:wn,boxShadowFocusWarning:Zt,boxShadowActiveWarning:Jt,boxShadowHoverWarning:po,borderWarning:bo,borderFocusWarning:Vn,borderHoverWarning:Qt,borderActiveWarning:R,colorActiveError:K,boxShadowFocusError:be,boxShadowActiveError:Ee,boxShadowHoverError:Ve,borderError:_e,borderFocusError:Ot,borderHoverError:At,borderActiveError:Ft,clearColor:Cn,clearColorHover:Sn,clearColorPressed:go,clearSize:Ri,arrowSize:_i,[Q("height",C)]:Bi,[Q("fontSize",C)]:Ei}}=b.value,Hn=dt(Ae),Ln=dt(Be);return{"--n-bezier":_,"--n-border":se,"--n-border-active":ge,"--n-border-focus":ce,"--n-border-hover":ue,"--n-border-radius":ne,"--n-box-shadow-active":Z,"--n-box-shadow-focus":L,"--n-box-shadow-hover":ae,"--n-caret-color":qe,"--n-color":xe,"--n-color-active":v,"--n-color-disabled":st,"--n-font-size":Ei,"--n-height":Bi,"--n-padding-single-top":Hn.top,"--n-padding-multiple-top":Ln.top,"--n-padding-single-right":Hn.right,"--n-padding-multiple-right":Ln.right,"--n-padding-single-left":Hn.left,"--n-padding-multiple-left":Ln.left,"--n-padding-single-bottom":Hn.bottom,"--n-padding-multiple-bottom":Ln.bottom,"--n-placeholder-color":ze,"--n-placeholder-color-disabled":it,"--n-text-color":Ne,"--n-text-color-disabled":Je,"--n-arrow-color":Te,"--n-arrow-color-disabled":ut,"--n-loading-color":Yt,"--n-color-active-warning":wn,"--n-box-shadow-focus-warning":Zt,"--n-box-shadow-active-warning":Jt,"--n-box-shadow-hover-warning":po,"--n-border-warning":bo,"--n-border-focus-warning":Vn,"--n-border-hover-warning":Qt,"--n-border-active-warning":R,"--n-color-active-error":K,"--n-box-shadow-focus-error":be,"--n-box-shadow-active-error":Ee,"--n-box-shadow-hover-error":Ve,"--n-border-error":_e,"--n-border-focus-error":Ot,"--n-border-hover-error":At,"--n-border-active-error":Ft,"--n-clear-size":Ri,"--n-clear-color":Cn,"--n-clear-color-hover":Sn,"--n-clear-color-pressed":go,"--n-arrow-size":_i}}),z=F?et("internal-selection",o.computed(()=>e.size[0]),X,e):void 0;return{mergedTheme:b,mergedClearable:P,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:x,filterablePlaceholder:H,label:$,selected:k,showTagsPanel:h,isComposing:fe,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:l,multipleElRef:s,singleElRef:d,patternInputWrapperRef:c,overflowRef:g,inputTagElRef:m,handleMouseDown:pe,handleFocusin:J,handleClear:U,handleMouseEnter:q,handleMouseLeave:oe,handleDeleteOption:ie,handlePatternKeyDown:G,handlePatternInputInput:ve,handlePatternInputBlur:Ce,handlePatternInputFocus:Se,handleMouseEnterCounter:A,handleMouseLeaveCounter:te,handleFocusout:N,handleCompositionEnd:re,handleCompositionStart:we,onPopoverUpdateShow:B,focus:Me,focusInput:Re,blur:le,blurInput:Le,updateCounter:Ie,getCounter:De,getTail:Ue,renderLabel:e.renderLabel,cssVars:F?void 0:X,themeClass:z==null?void 0:z.themeClass,onRender:z==null?void 0:z.onRender}},render(){const{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:l,clsPrefix:s,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const g=a==="responsive",m=typeof a=="number",h=g||m,x=o.h(yr,null,{default:()=>o.h(fs,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var b,P;return(P=(b=this.$slots).arrow)===null||P===void 0?void 0:P.call(b)}})});let y;if(t){const{labelField:b}=this,P=j=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:j.value},f?f({option:j,handleClose:()=>{this.handleDeleteOption(j)}}):o.h(gi,{size:n,closable:!j.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(j)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(j,!0):ln(j[b],j,!0)})),H=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(P),$=i?o.h("div",{class:`${s}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),o.h("span",{ref:"patternInputMirrorRef",class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,k=g?()=>o.h("div",{class:`${s}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0;let M;if(m){const j=this.selectedOptions.length-a;j>0&&(M=o.h("div",{class:`${s}-base-selection-tag-wrapper`,key:"__counter__"},o.h(gi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${j}`})))}const p=g?i?o.h(Da,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k,tail:()=>$}):o.h(Da,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:H,counter:k}):m&&M?H().concat(M):H(),S=h?()=>o.h("div",{class:`${s}-base-selection-popover`},g?H():this.selectedOptions.map(P)):void 0,E=h?Object.assign({show:this.showTagsPanel,trigger:"hover",overlap:!0,placement:"top",width:"trigger",onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},d):null,O=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,V=i?o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-tags`},p,g?null:$,x):o.h("div",{ref:"multipleElRef",class:`${s}-base-selection-tags`,tabindex:r?void 0:0},p,x);y=o.h(o.Fragment,null,h?o.h(us,Object.assign({},E,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>V,default:S}):V,O)}else if(i){const b=this.pattern||this.isComposing,P=this.active?!b:!this.selected,H=this.active?!1:this.selected;y=o.h("div",{ref:"patternInputWrapperRef",class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:Gi(this.label)},o.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${s}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),H?o.h("div",{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:"input"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):null,P?o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,x)}else y=o.h("div",{ref:"singleElRef",class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?o.h("div",{class:`${s}-base-selection-input`,title:Gi(this.label),key:"input"},o.h("div",{class:`${s}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):ln(this.label,this.selectedOption,!0))):o.h("div",{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:"placeholder"},o.h("div",{class:`${s}-base-selection-placeholder__inner`},this.placeholder)),x);return o.h("div",{ref:"selfRef",class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},y,l?o.h("div",{class:`${s}-base-selection__border`}):null,l?o.h("div",{class:`${s}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Xt}=bn;function Fm({duration:e=".2s",delay:t=".1s"}={}){return[I("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),I("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
709
709
|
opacity: 0!important;
|
|
710
710
|
margin-left: 0!important;
|
|
711
711
|
margin-right: 0!important;
|
|
@@ -1024,8 +1024,8 @@ ${t}
|
|
|
1024
1024
|
border: var(--n-border-focus-${e});
|
|
1025
1025
|
`)])])]))]),tv=w("input",[W("disabled",[T("input-el, textarea-el",`
|
|
1026
1026
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1027
|
-
`)])]),nv=Object.assign(Object.assign({},ye.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),
|
|
1028
|
-
`)}else{const{value:Ve}=c;Ve&&(R?Ve.textContent=R:Ve.innerHTML=" ")}}function ut(){fe()}const Yt=o.ref({top:"0"});function wn(R){var K;const{scrollTop:be}=R.target;Yt.value.top=`${-be}px`,(K=h.value)===null||K===void 0||K.syncUnifiedContainer()}let Zt=null;o.watchEffect(()=>{const{autosize:R,type:K}=e;R&&K==="textarea"?Zt=o.watch(P,be=>{!Array.isArray(be)&&be!==O&&Te(be)}):Zt==null||Zt()});let Jt=null;o.watchEffect(()=>{e.type==="textarea"?Jt=o.watch(P,R=>{var K;!Array.isArray(R)&&R!==O&&((K=h.value)===null||K===void 0||K.syncUnifiedContainer())}):Jt==null||Jt()}),o.provide(ms,{mergedValueRef:P,maxlengthRef:G,mergedClsPrefixRef:t,countGraphemesRef:o.toRef(e,"countGraphemes")});const ho={wrapperElRef:l,inputElRef:f,textareaElRef:s,isCompositing:E,clear:ze,focus:Z,blur:ae,select:se,deactivate:ue,activate:ce,scrollTo:ge},po=qt("Input",i,t),Dn=o.computed(()=>{const{value:R}=$,{common:{cubicBezierEaseInOut:K},self:{color:be,borderRadius:Ee,textColor:Ve,caretColor:_e,caretColorError:Ot,caretColorWarning:At,textDecorationColor:Ft,border:Cn,borderDisabled:Sn,borderHover:bo,borderFocus:Ri,placeholderColor:_i,placeholderColorDisabled:Bi,lineHeightTextarea:Ei,colorDisabled:Vn,colorFocus:Hn,textColorDisabled:Bx,boxShadowFocus:Ex,iconSize:Mx,colorFocusWarning:Ix,boxShadowFocusWarning:Ox,borderWarning:Ax,borderFocusWarning:Fx,borderHoverWarning:Dx,colorFocusError:Vx,boxShadowFocusError:Hx,borderError:Lx,borderFocusError:Nx,borderHoverError:Wx,clearSize:jx,clearColor:Ux,clearColorHover:Gx,clearColorPressed:Kx,iconColor:qx,iconColorDisabled:Xx,suffixTextColor:Yx,countTextColor:Zx,countTextColorDisabled:Jx,iconColorHover:Qx,iconColorPressed:ey,loadingColor:ty,loadingColorError:ny,loadingColorWarning:oy,[Q("padding",R)]:ry,[Q("fontSize",R)]:iy,[Q("height",R)]:ay}}=a.value,{left:ly,right:sy}=dt(ry);return{"--n-bezier":K,"--n-count-text-color":Zx,"--n-count-text-color-disabled":Jx,"--n-color":be,"--n-font-size":iy,"--n-border-radius":Ee,"--n-height":ay,"--n-padding-left":ly,"--n-padding-right":sy,"--n-text-color":Ve,"--n-caret-color":_e,"--n-text-decoration-color":Ft,"--n-border":Cn,"--n-border-disabled":Sn,"--n-border-hover":bo,"--n-border-focus":Ri,"--n-placeholder-color":_i,"--n-placeholder-color-disabled":Bi,"--n-icon-size":Mx,"--n-line-height-textarea":Ei,"--n-color-disabled":Vn,"--n-color-focus":Hn,"--n-text-color-disabled":Bx,"--n-box-shadow-focus":Ex,"--n-loading-color":ty,"--n-caret-color-warning":At,"--n-color-focus-warning":Ix,"--n-box-shadow-focus-warning":Ox,"--n-border-warning":Ax,"--n-border-focus-warning":Fx,"--n-border-hover-warning":Dx,"--n-loading-color-warning":oy,"--n-caret-color-error":Ot,"--n-color-focus-error":Vx,"--n-box-shadow-focus-error":Hx,"--n-border-error":Lx,"--n-border-focus-error":Nx,"--n-border-hover-error":Wx,"--n-loading-color-error":ny,"--n-clear-color":Ux,"--n-clear-size":jx,"--n-clear-color-hover":Gx,"--n-clear-color-pressed":Kx,"--n-icon-color":qx,"--n-icon-color-hover":Qx,"--n-icon-color-pressed":ey,"--n-icon-color-disabled":Xx,"--n-suffix-text-color":Yx}}),Qt=r?et("input",o.computed(()=>{const{value:R}=$;return R[0]}),Dn,e):void 0;return Object.assign(Object.assign({},ho),{wrapperElRef:l,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:s,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:po,uncontrolledValue:y,mergedValue:P,passwordVisible:oe,mergedPlaceholder:V,showPlaceholder1:j,showPlaceholder2:J,mergedFocus:N,isComposing:E,activated:D,showClearButton:U,mergedSize:$,mergedDisabled:k,textDecorationStyle:pe,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:q,placeholderStyle:Yt,mergedStatus:M,textAreaScrollContainerWidth:ie,handleTextAreaScroll:wn,handleCompositionStart:ke,handleCompositionEnd:Y,handleInput:A,handleInputBlur:B,handleInputFocus:F,handleWrapperBlur:X,handleWrapperFocus:z,handleMouseEnter:Ae,handleMouseLeave:Be,handleMouseDown:Ne,handleChange:_,handleClick:ne,handleClear:xe,handlePasswordToggleClick:qe,handlePasswordToggleMousedown:st,handleWrapperKeydown:it,handleWrapperKeyup:Je,handleTextAreaMirrorResize:ut,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:r?void 0:Dn,themeClass:Qt==null?void 0:Qt.themeClass,onRender:Qt==null?void 0:Qt.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,d=this.$slots;return s==null||s(),o.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},o.h("div",{class:`${n}-input-wrapper`},Oe(d.prefix,c=>c&&o.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?o.h(hi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var c,f;const{textAreaScrollContainerWidth:u}=this,g={width:this.autosize&&u&&`${u}px`};return o.h(o.Fragment,null,o.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(c=this.inputProps)===null||c===void 0?void 0:c.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(f=this.inputProps)===null||f===void 0?void 0:f.style,g],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,g],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?o.h(jt,{onResize:this.handleTextAreaMirrorResize},{default:()=>o.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):o.h("div",{class:`${n}-input__input`},o.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,0)},onInput:c=>{this.handleInput(c,0)},onChange:c=>{this.handleChange(c,0)}})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?o.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Oe(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?o.h("div",{class:`${n}-input__suffix`},[Oe(d["clear-icon-placeholder"],f=>(this.clearable||f)&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,g;return(g=(u=this.$slots)["clear-icon"])===null||g===void 0?void 0:g.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?o.h(fs,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?o.h(vs,null,{default:f=>{var u;return(u=d.count)===null||u===void 0?void 0:u.call(d,f)}}):null,this.mergedShowPasswordOn&&this.type==="password"?o.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?mt(d["password-visible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(sg,null)})]):mt(d["password-invisible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(dg,null)})])):null]):null)),this.pair?o.h("span",{class:`${n}-input__separator`},mt(d.separator,()=>[this.separator])):null,this.pair?o.h("div",{class:`${n}-input-wrapper`},o.h("div",{class:`${n}-input__input`},o.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,1)},onInput:c=>{this.handleInput(c,1)},onChange:c=>{this.handleChange(c,1)}}),this.showPlaceholder2?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[1])):null),Oe(d.suffix,c=>(this.clearable||c)&&o.h("div",{class:`${n}-input__suffix`},[this.clearable&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var f;return(f=d["clear-icon"])===null||f===void 0?void 0:f.call(d)},placeholder:()=>{var f;return(f=d["clear-icon-placeholder"])===null||f===void 0?void 0:f.call(d)}}),c]))):null,this.mergedBordered?o.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?o.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?o.h(vs,null,{default:c=>{var f;const{renderCount:u}=this;return u?u(c):(f=d.count)===null||f===void 0?void 0:f.call(d,c)}}):null)}}),ov=w("input-group",`
|
|
1027
|
+
`)])]),nv=Object.assign(Object.assign({},ye.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),so=o.defineComponent({name:"Input",props:nv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.showPasswordToggle&&tt("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=Ke(e),a=ye("Input","-input",ev,xi,e,t);gs&&mn("-input-safari",tv,t);const l=o.ref(null),s=o.ref(null),d=o.ref(null),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=Qm(g),h=o.ref(null),{localeRef:x}=ao("Input"),y=o.ref(e.defaultValue),b=o.toRef(e,"value"),P=vt(b,y),H=cn(e),{mergedSizeRef:$,mergedDisabledRef:k,mergedStatusRef:M}=H,p=o.ref(!1),S=o.ref(!1),E=o.ref(!1),D=o.ref(!1);let O=null;const V=o.computed(()=>{const{placeholder:R,pair:K}=e;return K?Array.isArray(R)?R:R===void 0?["",""]:[R,R]:R===void 0?[x.value.placeholder]:[R]}),j=o.computed(()=>{const{value:R}=E,{value:K}=P,{value:be}=V;return!R&&(er(K)||Array.isArray(K)&&er(K[0]))&&be[0]}),J=o.computed(()=>{const{value:R}=E,{value:K}=P,{value:be}=V;return!R&&be[1]&&(er(K)||Array.isArray(K)&&er(K[1]))}),N=Xe(()=>e.internalForceFocus||p.value),U=Xe(()=>{if(k.value||e.readonly||!e.clearable||!N.value&&!S.value)return!1;const{value:R}=P,{value:K}=N;return e.pair?!!(Array.isArray(R)&&(R[0]||R[1]))&&(S.value||K):!!R&&(S.value||K)}),q=o.computed(()=>{const{showPasswordOn:R}=e;if(R)return R;if(e.showPasswordToggle)return"click"}),oe=o.ref(!1),pe=o.computed(()=>{const{textDecoration:R}=e;return R?Array.isArray(R)?R.map(K=>({textDecoration:K})):[{textDecoration:R}]:["",""]}),ie=o.ref(void 0),fe=()=>{var R,K;if(e.type==="textarea"){const{autosize:be}=e;if(be&&(ie.value=(K=(R=h.value)===null||R===void 0?void 0:R.$el)===null||K===void 0?void 0:K.offsetWidth),!s.value||typeof be=="boolean")return;const{paddingTop:Ee,paddingBottom:Ve,lineHeight:_e}=window.getComputedStyle(s.value),Ot=Number(Ee.slice(0,-2)),At=Number(Ve.slice(0,-2)),Ft=Number(_e.slice(0,-2)),{value:Cn}=d;if(!Cn)return;if(be.minRows){const Sn=Math.max(be.minRows,1),go=`${Ot+At+Ft*Sn}px`;Cn.style.minHeight=go}if(be.maxRows){const Sn=`${Ot+At+Ft*be.maxRows}px`;Cn.style.maxHeight=Sn}}},G=o.computed(()=>{const{maxlength:R}=e;return R===void 0?void 0:Number(R)});o.onMounted(()=>{const{value:R}=P;Array.isArray(R)||Te(R)});const ee=o.getCurrentInstance().proxy;function ve(R,K){const{onUpdateValue:be,"onUpdate:value":Ee,onInput:Ve}=e,{nTriggerFormInput:_e}=H;be&&de(be,R,K),Ee&&de(Ee,R,K),Ve&&de(Ve,R,K),y.value=R,_e()}function we(R,K){const{onChange:be}=e,{nTriggerFormChange:Ee}=H;be&&de(be,R,K),y.value=R,Ee()}function re(R){const{onBlur:K}=e,{nTriggerFormBlur:be}=H;K&&de(K,R),be()}function Se(R){const{onFocus:K}=e,{nTriggerFormFocus:be}=H;K&&de(K,R),be()}function Ce(R){const{onClear:K}=e;K&&de(K,R)}function le(R){const{onInputBlur:K}=e;K&&de(K,R)}function Me(R){const{onInputFocus:K}=e;K&&de(K,R)}function Re(){const{onDeactivate:R}=e;R&&de(R)}function Le(){const{onActivate:R}=e;R&&de(R)}function Ie(R){const{onClick:K}=e;K&&de(K,R)}function De(R){const{onWrapperFocus:K}=e;K&&de(K,R)}function Ue(R){const{onWrapperBlur:K}=e;K&&de(K,R)}function ke(){E.value=!0}function Y(R){E.value=!1,R.target===u.value?A(R,1):A(R,0)}function A(R,K=0,be="input"){const Ee=R.target.value;if(Te(Ee),R instanceof InputEvent&&!R.isComposing&&(E.value=!1),e.type==="textarea"){const{value:_e}=h;_e&&_e.syncUnifiedContainer()}if(O=Ee,E.value)return;m.recordCursor();const Ve=te(Ee);if(Ve)if(!e.pair)be==="input"?ve(Ee,{source:K}):we(Ee,{source:K});else{let{value:_e}=P;Array.isArray(_e)?_e=[_e[0],_e[1]]:_e=["",""],_e[K]=Ee,be==="input"?ve(_e,{source:K}):we(_e,{source:K})}ee.$forceUpdate(),Ve||o.nextTick(m.restoreCursor)}function te(R){const{countGraphemes:K,maxlength:be,minlength:Ee}=e;if(K){let _e;if(be!==void 0&&(_e===void 0&&(_e=K(R)),_e>Number(be))||Ee!==void 0&&(_e===void 0&&(_e=K(R)),_e<Number(be)))return!1}const{allowInput:Ve}=e;return typeof Ve=="function"?Ve(R):!0}function B(R){le(R),R.relatedTarget===l.value&&Re(),R.relatedTarget!==null&&(R.relatedTarget===f.value||R.relatedTarget===u.value||R.relatedTarget===s.value)||(D.value=!1),C(R,"blur"),g.value=null}function F(R,K){Me(R),p.value=!0,D.value=!0,Le(),C(R,"focus"),K===0?g.value=f.value:K===1?g.value=u.value:K===2&&(g.value=s.value)}function X(R){e.passivelyActivated&&(Ue(R),C(R,"blur"))}function z(R){e.passivelyActivated&&(p.value=!0,De(R),C(R,"focus"))}function C(R,K){R.relatedTarget!==null&&(R.relatedTarget===f.value||R.relatedTarget===u.value||R.relatedTarget===s.value||R.relatedTarget===l.value)||(K==="focus"?(Se(R),p.value=!0):K==="blur"&&(re(R),p.value=!1))}function _(R,K){A(R,K,"change")}function ne(R){Ie(R)}function xe(R){Ce(R),ze()}function ze(){e.pair?(ve(["",""],{source:"clear"}),we(["",""],{source:"clear"})):(ve("",{source:"clear"}),we("",{source:"clear"}))}function Ne(R){const{onMousedown:K}=e;K&&K(R);const{tagName:be}=R.target;if(be!=="INPUT"&&be!=="TEXTAREA"){if(e.resizable){const{value:Ee}=l;if(Ee){const{left:Ve,top:_e,width:Ot,height:At}=Ee.getBoundingClientRect(),Ft=14;if(Ve+Ot-Ft<R.clientX&&R.clientX<Ve+Ot&&_e+At-Ft<R.clientY&&R.clientY<_e+At)return}}R.preventDefault(),p.value||Z()}}function Ae(){var R;S.value=!0,e.type==="textarea"&&((R=h.value)===null||R===void 0||R.handleMouseEnterWrapper())}function Be(){var R;S.value=!1,e.type==="textarea"&&((R=h.value)===null||R===void 0||R.handleMouseLeaveWrapper())}function qe(){k.value||q.value==="click"&&(oe.value=!oe.value)}function st(R){if(k.value)return;R.preventDefault();const K=Ee=>{Ee.preventDefault(),$e("mouseup",document,K)};if(Pe("mouseup",document,K),q.value!=="mousedown")return;oe.value=!0;const be=()=>{oe.value=!1,$e("mouseup",document,be)};Pe("mouseup",document,be)}function Je(R){e.onKeyup&&de(e.onKeyup,R)}function it(R){switch(e.onKeydown&&de(e.onKeydown,R),R.key){case"Escape":L();break;case"Enter":v(R);break}}function v(R){var K,be;if(e.passivelyActivated){const{value:Ee}=D;if(Ee){e.internalDeactivateOnEnter&&L();return}R.preventDefault(),e.type==="textarea"?(K=s.value)===null||K===void 0||K.focus():(be=f.value)===null||be===void 0||be.focus()}}function L(){e.passivelyActivated&&(D.value=!1,o.nextTick(()=>{var R;(R=l.value)===null||R===void 0||R.focus()}))}function Z(){var R,K,be;k.value||(e.passivelyActivated?(R=l.value)===null||R===void 0||R.focus():((K=s.value)===null||K===void 0||K.focus(),(be=f.value)===null||be===void 0||be.focus()))}function ae(){var R;!((R=l.value)===null||R===void 0)&&R.contains(document.activeElement)&&document.activeElement.blur()}function se(){var R,K;(R=s.value)===null||R===void 0||R.select(),(K=f.value)===null||K===void 0||K.select()}function ce(){k.value||(s.value?s.value.focus():f.value&&f.value.focus())}function ue(){const{value:R}=l;R!=null&&R.contains(document.activeElement)&&R!==document.activeElement&&L()}function ge(R){if(e.type==="textarea"){const{value:K}=s;K==null||K.scrollTo(R)}else{const{value:K}=f;K==null||K.scrollTo(R)}}function Te(R){const{type:K,pair:be,autosize:Ee}=e;if(!be&&Ee)if(K==="textarea"){const{value:Ve}=d;Ve&&(Ve.textContent=`${R??""}\r
|
|
1028
|
+
`)}else{const{value:Ve}=c;Ve&&(R?Ve.textContent=R:Ve.innerHTML=" ")}}function ut(){fe()}const Yt=o.ref({top:"0"});function wn(R){var K;const{scrollTop:be}=R.target;Yt.value.top=`${-be}px`,(K=h.value)===null||K===void 0||K.syncUnifiedContainer()}let Zt=null;o.watchEffect(()=>{const{autosize:R,type:K}=e;R&&K==="textarea"?Zt=o.watch(P,be=>{!Array.isArray(be)&&be!==O&&Te(be)}):Zt==null||Zt()});let Jt=null;o.watchEffect(()=>{e.type==="textarea"?Jt=o.watch(P,R=>{var K;!Array.isArray(R)&&R!==O&&((K=h.value)===null||K===void 0||K.syncUnifiedContainer())}):Jt==null||Jt()}),o.provide(ms,{mergedValueRef:P,maxlengthRef:G,mergedClsPrefixRef:t,countGraphemesRef:o.toRef(e,"countGraphemes")});const po={wrapperElRef:l,inputElRef:f,textareaElRef:s,isCompositing:E,clear:ze,focus:Z,blur:ae,select:se,deactivate:ue,activate:ce,scrollTo:ge},bo=qt("Input",i,t),Vn=o.computed(()=>{const{value:R}=$,{common:{cubicBezierEaseInOut:K},self:{color:be,borderRadius:Ee,textColor:Ve,caretColor:_e,caretColorError:Ot,caretColorWarning:At,textDecorationColor:Ft,border:Cn,borderDisabled:Sn,borderHover:go,borderFocus:Ri,placeholderColor:_i,placeholderColorDisabled:Bi,lineHeightTextarea:Ei,colorDisabled:Hn,colorFocus:Ln,textColorDisabled:Bx,boxShadowFocus:Ex,iconSize:Mx,colorFocusWarning:Ix,boxShadowFocusWarning:Ox,borderWarning:Ax,borderFocusWarning:Fx,borderHoverWarning:Dx,colorFocusError:Vx,boxShadowFocusError:Hx,borderError:Lx,borderFocusError:Nx,borderHoverError:Wx,clearSize:jx,clearColor:Ux,clearColorHover:Gx,clearColorPressed:Kx,iconColor:qx,iconColorDisabled:Xx,suffixTextColor:Yx,countTextColor:Zx,countTextColorDisabled:Jx,iconColorHover:Qx,iconColorPressed:ey,loadingColor:ty,loadingColorError:ny,loadingColorWarning:oy,[Q("padding",R)]:ry,[Q("fontSize",R)]:iy,[Q("height",R)]:ay}}=a.value,{left:ly,right:sy}=dt(ry);return{"--n-bezier":K,"--n-count-text-color":Zx,"--n-count-text-color-disabled":Jx,"--n-color":be,"--n-font-size":iy,"--n-border-radius":Ee,"--n-height":ay,"--n-padding-left":ly,"--n-padding-right":sy,"--n-text-color":Ve,"--n-caret-color":_e,"--n-text-decoration-color":Ft,"--n-border":Cn,"--n-border-disabled":Sn,"--n-border-hover":go,"--n-border-focus":Ri,"--n-placeholder-color":_i,"--n-placeholder-color-disabled":Bi,"--n-icon-size":Mx,"--n-line-height-textarea":Ei,"--n-color-disabled":Hn,"--n-color-focus":Ln,"--n-text-color-disabled":Bx,"--n-box-shadow-focus":Ex,"--n-loading-color":ty,"--n-caret-color-warning":At,"--n-color-focus-warning":Ix,"--n-box-shadow-focus-warning":Ox,"--n-border-warning":Ax,"--n-border-focus-warning":Fx,"--n-border-hover-warning":Dx,"--n-loading-color-warning":oy,"--n-caret-color-error":Ot,"--n-color-focus-error":Vx,"--n-box-shadow-focus-error":Hx,"--n-border-error":Lx,"--n-border-focus-error":Nx,"--n-border-hover-error":Wx,"--n-loading-color-error":ny,"--n-clear-color":Ux,"--n-clear-size":jx,"--n-clear-color-hover":Gx,"--n-clear-color-pressed":Kx,"--n-icon-color":qx,"--n-icon-color-hover":Qx,"--n-icon-color-pressed":ey,"--n-icon-color-disabled":Xx,"--n-suffix-text-color":Yx}}),Qt=r?et("input",o.computed(()=>{const{value:R}=$;return R[0]}),Vn,e):void 0;return Object.assign(Object.assign({},po),{wrapperElRef:l,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:s,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:bo,uncontrolledValue:y,mergedValue:P,passwordVisible:oe,mergedPlaceholder:V,showPlaceholder1:j,showPlaceholder2:J,mergedFocus:N,isComposing:E,activated:D,showClearButton:U,mergedSize:$,mergedDisabled:k,textDecorationStyle:pe,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:q,placeholderStyle:Yt,mergedStatus:M,textAreaScrollContainerWidth:ie,handleTextAreaScroll:wn,handleCompositionStart:ke,handleCompositionEnd:Y,handleInput:A,handleInputBlur:B,handleInputFocus:F,handleWrapperBlur:X,handleWrapperFocus:z,handleMouseEnter:Ae,handleMouseLeave:Be,handleMouseDown:Ne,handleChange:_,handleClick:ne,handleClear:xe,handlePasswordToggleClick:qe,handlePasswordToggleMousedown:st,handleWrapperKeydown:it,handleWrapperKeyup:Je,handleTextAreaMirrorResize:ut,getTextareaScrollContainer:()=>s.value,mergedTheme:a,cssVars:r?void 0:Vn,themeClass:Qt==null?void 0:Qt.themeClass,onRender:Qt==null?void 0:Qt.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:i,type:a,countGraphemes:l,onRender:s}=this,d=this.$slots;return s==null||s(),o.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:a==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&a!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},o.h("div",{class:`${n}-input-wrapper`},Oe(d.prefix,c=>c&&o.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?o.h(hi,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var c,f;const{textAreaScrollContainerWidth:u}=this,g={width:this.autosize&&u&&`${u}px`};return o.h(o.Fragment,null,o.h("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(c=this.inputProps)===null||c===void 0?void 0:c.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(f=this.inputProps)===null||f===void 0?void 0:f.style,g],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,g],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?o.h(jt,{onResize:this.handleTextAreaMirrorResize},{default:()=>o.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):o.h("div",{class:`${n}-input__input`},o.h("input",Object.assign({type:a==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":a},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,0)},onInput:c=>{this.handleInput(c,0)},onChange:c=>{this.handleChange(c,0)}})),this.showPlaceholder1?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?o.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Oe(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?o.h("div",{class:`${n}-input__suffix`},[Oe(d["clear-icon-placeholder"],f=>(this.clearable||f)&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,g;return(g=(u=this.$slots)["clear-icon"])===null||g===void 0?void 0:g.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?o.h(fs,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?o.h(vs,null,{default:f=>{var u;return(u=d.count)===null||u===void 0?void 0:u.call(d,f)}}):null,this.mergedShowPasswordOn&&this.type==="password"?o.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?mt(d["password-visible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(sg,null)})]):mt(d["password-invisible-icon"],()=>[o.h(bt,{clsPrefix:n},{default:()=>o.h(dg,null)})])):null]):null)),this.pair?o.h("span",{class:`${n}-input__separator`},mt(d.separator,()=>[this.separator])):null,this.pair?o.h("div",{class:`${n}-input-wrapper`},o.h("div",{class:`${n}-input__input`},o.h("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:l?void 0:this.maxlength,minlength:l?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:c=>{this.handleInputFocus(c,1)},onInput:c=>{this.handleInput(c,1)},onChange:c=>{this.handleChange(c,1)}}),this.showPlaceholder2?o.h("div",{class:`${n}-input__placeholder`},o.h("span",null,this.mergedPlaceholder[1])):null),Oe(d.suffix,c=>(this.clearable||c)&&o.h("div",{class:`${n}-input__suffix`},[this.clearable&&o.h(mi,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var f;return(f=d["clear-icon"])===null||f===void 0?void 0:f.call(d)},placeholder:()=>{var f;return(f=d["clear-icon-placeholder"])===null||f===void 0?void 0:f.call(d)}}),c]))):null,this.mergedBordered?o.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?o.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?o.h(vs,null,{default:c=>{var f;const{renderCount:u}=this;return u?u(c):(f=d.count)===null||f===void 0?void 0:f.call(d,c)}}):null)}}),ov=w("input-group",`
|
|
1029
1029
|
display: inline-flex;
|
|
1030
1030
|
width: 100%;
|
|
1031
1031
|
flex-wrap: nowrap;
|
|
@@ -1149,7 +1149,7 @@ ${t}
|
|
|
1149
1149
|
display: flex;
|
|
1150
1150
|
align-items: center;
|
|
1151
1151
|
justify-content: center;
|
|
1152
|
-
`,[
|
|
1152
|
+
`,[Fn({top:"50%",originalTransform:"translateY(-50%)"})]),Fm()]),T("content",`
|
|
1153
1153
|
display: flex;
|
|
1154
1154
|
align-items: center;
|
|
1155
1155
|
flex-wrap: nowrap;
|
|
@@ -1157,7 +1157,7 @@ ${t}
|
|
|
1157
1157
|
`,[I("~",[T("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),W("block",`
|
|
1158
1158
|
display: flex;
|
|
1159
1159
|
width: 100%;
|
|
1160
|
-
`),W("dashed",[T("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),I("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),I("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),cv=Object.assign(Object.assign({},ye.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!gs}}),It=o.defineComponent({name:"Button",props:cv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:p,tertiary:S,quaternary:E}=e;($||k||M)&&(p||S||E)&&tt("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=o.ref(null),n=o.ref(null),r=o.ref(!1),i=Xe(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=o.inject(av,{}),{mergedSizeRef:l}=cn({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:p}=$||{};return p?p.value:"medium"}}),s=o.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((k=t.value)===null||k===void 0||k.focus({preventScroll:!0})))},c=$=>{var k;if(!e.disabled&&!e.loading){const{onClick:M}=e;M&&de(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;r.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}r.value=!0}},g=()=>{r.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:x}=Ke(e),y=ye("Button","-button",dv,yi,e,h),b=qt("Button",x,h),P=o.computed(()=>{const $=y.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:p}=$,{rippleDuration:S,opacityDisabled:E,fontWeight:D,fontWeightStrong:O}=p,V=l.value,{dashed:j,type:J,ghost:N,text:U,color:q,round:oe,circle:pe,textColor:ie,secondary:fe,tertiary:G,quaternary:ee,strong:ve}=e,we={"font-weight":ve?O:D};let re={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Se=J==="tertiary",Ce=J==="default",le=Se?"default":J;if(U){const B=ie||q;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":B||p[Q("textColorText",le)],"--n-text-color-hover":B?vn(B):p[Q("textColorTextHover",le)],"--n-text-color-pressed":B?tr(B):p[Q("textColorTextPressed",le)],"--n-text-color-focus":B?vn(B):p[Q("textColorTextHover",le)],"--n-text-color-disabled":B||p[Q("textColorTextDisabled",le)]}}else if(N||j){const B=ie||q;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":q||p[Q("rippleColor",le)],"--n-text-color":B||p[Q("textColorGhost",le)],"--n-text-color-hover":B?vn(B):p[Q("textColorGhostHover",le)],"--n-text-color-pressed":B?tr(B):p[Q("textColorGhostPressed",le)],"--n-text-color-focus":B?vn(B):p[Q("textColorGhostHover",le)],"--n-text-color-disabled":B||p[Q("textColorGhostDisabled",le)]}}else if(fe){const B=Ce?p.textColor:Se?p.textColorTertiary:p[Q("color",le)],F=q||B,X=J!=="default"&&J!=="tertiary";re={"--n-color":X?me(F,{alpha:Number(p.colorOpacitySecondary)}):p.colorSecondary,"--n-color-hover":X?me(F,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-pressed":X?me(F,{alpha:Number(p.colorOpacitySecondaryPressed)}):p.colorSecondaryPressed,"--n-color-focus":X?me(F,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-disabled":p.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":F,"--n-text-color-hover":F,"--n-text-color-pressed":F,"--n-text-color-focus":F,"--n-text-color-disabled":F}}else if(G||ee){const B=Ce?p.textColor:Se?p.textColorTertiary:p[Q("color",le)],F=q||B;G?(re["--n-color"]=p.colorTertiary,re["--n-color-hover"]=p.colorTertiaryHover,re["--n-color-pressed"]=p.colorTertiaryPressed,re["--n-color-focus"]=p.colorSecondaryHover,re["--n-color-disabled"]=p.colorTertiary):(re["--n-color"]=p.colorQuaternary,re["--n-color-hover"]=p.colorQuaternaryHover,re["--n-color-pressed"]=p.colorQuaternaryPressed,re["--n-color-focus"]=p.colorQuaternaryHover,re["--n-color-disabled"]=p.colorQuaternary),re["--n-ripple-color"]="#0000",re["--n-text-color"]=F,re["--n-text-color-hover"]=F,re["--n-text-color-pressed"]=F,re["--n-text-color-focus"]=F,re["--n-text-color-disabled"]=F}else re={"--n-color":q||p[Q("color",le)],"--n-color-hover":q?vn(q):p[Q("colorHover",le)],"--n-color-pressed":q?tr(q):p[Q("colorPressed",le)],"--n-color-focus":q?vn(q):p[Q("colorFocus",le)],"--n-color-disabled":q||p[Q("colorDisabled",le)],"--n-ripple-color":q||p[Q("rippleColor",le)],"--n-text-color":ie||(q?p.textColorPrimary:Se?p.textColorTertiary:p[Q("textColor",le)]),"--n-text-color-hover":ie||(q?p.textColorHoverPrimary:p[Q("textColorHover",le)]),"--n-text-color-pressed":ie||(q?p.textColorPressedPrimary:p[Q("textColorPressed",le)]),"--n-text-color-focus":ie||(q?p.textColorFocusPrimary:p[Q("textColorFocus",le)]),"--n-text-color-disabled":ie||(q?p.textColorDisabledPrimary:p[Q("textColorDisabled",le)])};let Me={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};U?Me={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Me={"--n-border":p[Q("border",le)],"--n-border-hover":p[Q("borderHover",le)],"--n-border-pressed":p[Q("borderPressed",le)],"--n-border-focus":p[Q("borderFocus",le)],"--n-border-disabled":p[Q("borderDisabled",le)]};const{[Q("height",V)]:Re,[Q("fontSize",V)]:Le,[Q("padding",V)]:Ie,[Q("paddingRound",V)]:De,[Q("iconSize",V)]:Ue,[Q("borderRadius",V)]:ke,[Q("iconMargin",V)]:Y,waveOpacity:A}=p,te={"--n-width":pe&&!U?Re:"initial","--n-height":U?"initial":Re,"--n-font-size":Le,"--n-padding":pe||U?"initial":oe?De:Ie,"--n-icon-size":Ue,"--n-icon-margin":Y,"--n-border-radius":U?"initial":pe||oe?Re:ke};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":E,"--n-wave-opacity":A},we),re),Me),te)}),H=m?et("button",o.computed(()=>{let $="";const{dashed:k,type:M,ghost:p,text:S,color:E,round:D,circle:O,textColor:V,secondary:j,tertiary:J,quaternary:N,strong:U}=e;k&&($+="a"),p&&($+="b"),S&&($+="c"),D&&($+="d"),O&&($+="e"),j&&($+="f"),J&&($+="g"),N&&($+="h"),U&&($+="i"),E&&($+=`j${yo(E)}`),V&&($+=`k${yo(V)}`);const{value:q}=l;return $+=`l${q[0]}`,$+=`m${M[0]}`,$}),P,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:r,rtlEnabled:b,handleMousedown:d,handleKeydown:u,handleBlur:g,handleKeyup:f,handleClick:c,customColorCssVars:o.computed(()=>{const{color:$}=e;if(!$)return null;const k=vn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":tr($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:P,themeClass:H==null?void 0:H.themeClass,onRender:H==null?void 0:H.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Oe(this.$slots.default,i=>i&&o.h("span",{class:`${e}-button__content`},i));return o.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,o.h(ql,{width:!0},{default:()=>Oe(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&o.h("span",{class:`${e}-button__icon`,style:{margin:Tn(this.$slots.default)?"0":""}},o.h(Yo,null,{default:()=>this.loading?o.h(Zo,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):o.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:o.h(bm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),xs=It;function uv(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:g,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:g,dividerColor:m}}const fv={name:"ColorPicker",common:Ye,peers:{Input:xi,Button:yi},self:uv};function hv(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return process.env.NODE_ENV!=="production"&&jn("color-picker","props.modes is invalid."),"#000000"}function so(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function pv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function bv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const gv={rgb:{hex(e){return Lt(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hex:{rgb(e){return $t(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=kn(e);return Lt([...sr(t,n,r),i])},rgb(e){const[t,n,r,i]=kn(e);return $t([...sr(t,n,r),i])},hsv(e){const[t,n,r,i]=kn(e);return an([...ji(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=rn(e);return Lt([...Dt(t,n,r),i])},rgb(e){const[t,n,r,i]=rn(e);return $t([...Dt(t,n,r),i])},hsl(e){const[t,n,r,i]=rn(e);return Ht([...vo(t,n,r),i])}}};function ys(e,t,n){return n=n||so(e),n?n===t?e:gv[n][t](e):null}const Fn="12px",mv=12,xn="6px",vv=6,xv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",yv=o.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=pv((a.clientX-d-vv)/(s-mv)*360);e.onUpdateHue(c)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,style:{height:Fn,borderRadius:xn}},o.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:xv,height:Fn,borderRadius:xn,position:"relative"},onMousedown:this.handleMouseDown},o.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${xn})`,borderRadius:xn,width:Fn,height:Fn}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:xn,width:Fn,height:Fn}})))))}}),co="12px",wv=12,yn="6px",Cv=o.defineComponent({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=(a.clientX-d)/(s-wv);e.onUpdateAlpha(bv(c))}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:o.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:co,borderRadius:yn},onMousedown:this.handleMouseDown},o.h("div",{style:{borderRadius:yn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},o.h("div",{class:`${e}-color-picker-checkboard`}),o.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&o.h("div",{style:{position:"absolute",left:yn,right:yn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${yn})`,borderRadius:yn,width:co,height:co}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:$t(this.rgba),borderRadius:yn,width:co,height:co}}))))}}),nr="12px",or="6px",Sv=o.defineComponent({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,height:d,left:c,bottom:f}=l.getBoundingClientRect(),u=(f-a.clientY)/d,g=(a.clientX-c)/s,m=100*(g>1?1:g<0?0:g),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:o.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},o.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),o.h("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&o.h("div",{class:`${e}-color-picker-handle`,style:{width:nr,height:nr,borderRadius:or,left:`calc(${this.displayedSv[0]}% - ${or})`,bottom:`calc(${this.displayedSv[1]}% - ${or})`}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:or,width:nr,height:nr}})))}}),wi="n-color-picker";function $v(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function kv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function zv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Tv(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function Pv(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const Rv={paddingSmall:"0 4px"},ws=o.defineComponent({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=o.ref(""),{themeRef:n}=o.inject(wi,null);o.watchEffect(()=>{t.value=r()});function r(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,d;switch(e.label){case"HEX":d=Tv(l),d&&e.onUpdateValue(l),t.value=r();break;case"H":s=kv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=zv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=Pv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=$v(l),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return o.h(lo,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:Rv,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),_v=o.defineComponent({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?Lt:Wn)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?an:gr)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?$t:br)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ht:mr)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return o.h("div",{class:`${e}-color-picker-input`},o.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),o.h(iv,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=r===null?null:(i?Lt:Wn)(r)}catch{}return o.h(ws,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>o.h(ws,{label:a.toUpperCase(),value:r===null?null:r[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),Bv=o.defineComponent({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=o.inject(wi,null);return()=>{const{hsla:r,value:i,clsPrefix:a,onClick:l,disabled:s}=e,d=t.label||n.value;return o.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},o.h("div",{class:`${a}-color-picker-trigger__fill`},o.h("div",{class:`${a}-color-picker-checkboard`}),o.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ht(r):""}}),i&&r?o.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},d?d(i):i):null))}}});function Ev(e,t){if(t==="hsv"){const[n,r,i,a]=rn(e);return $t([...Dt(n,r,i),a])}return e}function Mv(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Iv=o.defineComponent({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=o.computed(()=>e.swatches.map(a=>{const l=so(a);return{value:a,mode:l,legalValue:Ev(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(s)?s=Mv(s):(jn("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),d===l?s:ys(s,l,d)}function r(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&r(l)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>o.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},o.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Ov=o.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=so(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,ys(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-preview__preview`},o.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),o.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Av=I([w("color-picker",`
|
|
1160
|
+
`),W("dashed",[T("border, state-border",{borderStyle:"dashed !important"})]),W("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),I("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),I("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),cv=Object.assign(Object.assign({},ye.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!gs}}),It=o.defineComponent({name:"Button",props:cv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:p,tertiary:S,quaternary:E}=e;($||k||M)&&(p||S||E)&&tt("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=o.ref(null),n=o.ref(null),r=o.ref(!1),i=Xe(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=o.inject(av,{}),{mergedSizeRef:l}=cn({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:p}=$||{};return p?p.value:"medium"}}),s=o.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;s.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&s.value&&((k=t.value)===null||k===void 0||k.focus({preventScroll:!0})))},c=$=>{var k;if(!e.disabled&&!e.loading){const{onClick:M}=e;M&&de(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;r.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}r.value=!0}},g=()=>{r.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:x}=Ke(e),y=ye("Button","-button",dv,yi,e,h),b=qt("Button",x,h),P=o.computed(()=>{const $=y.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:p}=$,{rippleDuration:S,opacityDisabled:E,fontWeight:D,fontWeightStrong:O}=p,V=l.value,{dashed:j,type:J,ghost:N,text:U,color:q,round:oe,circle:pe,textColor:ie,secondary:fe,tertiary:G,quaternary:ee,strong:ve}=e,we={"font-weight":ve?O:D};let re={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Se=J==="tertiary",Ce=J==="default",le=Se?"default":J;if(U){const B=ie||q;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":B||p[Q("textColorText",le)],"--n-text-color-hover":B?vn(B):p[Q("textColorTextHover",le)],"--n-text-color-pressed":B?tr(B):p[Q("textColorTextPressed",le)],"--n-text-color-focus":B?vn(B):p[Q("textColorTextHover",le)],"--n-text-color-disabled":B||p[Q("textColorTextDisabled",le)]}}else if(N||j){const B=ie||q;re={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":q||p[Q("rippleColor",le)],"--n-text-color":B||p[Q("textColorGhost",le)],"--n-text-color-hover":B?vn(B):p[Q("textColorGhostHover",le)],"--n-text-color-pressed":B?tr(B):p[Q("textColorGhostPressed",le)],"--n-text-color-focus":B?vn(B):p[Q("textColorGhostHover",le)],"--n-text-color-disabled":B||p[Q("textColorGhostDisabled",le)]}}else if(fe){const B=Ce?p.textColor:Se?p.textColorTertiary:p[Q("color",le)],F=q||B,X=J!=="default"&&J!=="tertiary";re={"--n-color":X?me(F,{alpha:Number(p.colorOpacitySecondary)}):p.colorSecondary,"--n-color-hover":X?me(F,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-pressed":X?me(F,{alpha:Number(p.colorOpacitySecondaryPressed)}):p.colorSecondaryPressed,"--n-color-focus":X?me(F,{alpha:Number(p.colorOpacitySecondaryHover)}):p.colorSecondaryHover,"--n-color-disabled":p.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":F,"--n-text-color-hover":F,"--n-text-color-pressed":F,"--n-text-color-focus":F,"--n-text-color-disabled":F}}else if(G||ee){const B=Ce?p.textColor:Se?p.textColorTertiary:p[Q("color",le)],F=q||B;G?(re["--n-color"]=p.colorTertiary,re["--n-color-hover"]=p.colorTertiaryHover,re["--n-color-pressed"]=p.colorTertiaryPressed,re["--n-color-focus"]=p.colorSecondaryHover,re["--n-color-disabled"]=p.colorTertiary):(re["--n-color"]=p.colorQuaternary,re["--n-color-hover"]=p.colorQuaternaryHover,re["--n-color-pressed"]=p.colorQuaternaryPressed,re["--n-color-focus"]=p.colorQuaternaryHover,re["--n-color-disabled"]=p.colorQuaternary),re["--n-ripple-color"]="#0000",re["--n-text-color"]=F,re["--n-text-color-hover"]=F,re["--n-text-color-pressed"]=F,re["--n-text-color-focus"]=F,re["--n-text-color-disabled"]=F}else re={"--n-color":q||p[Q("color",le)],"--n-color-hover":q?vn(q):p[Q("colorHover",le)],"--n-color-pressed":q?tr(q):p[Q("colorPressed",le)],"--n-color-focus":q?vn(q):p[Q("colorFocus",le)],"--n-color-disabled":q||p[Q("colorDisabled",le)],"--n-ripple-color":q||p[Q("rippleColor",le)],"--n-text-color":ie||(q?p.textColorPrimary:Se?p.textColorTertiary:p[Q("textColor",le)]),"--n-text-color-hover":ie||(q?p.textColorHoverPrimary:p[Q("textColorHover",le)]),"--n-text-color-pressed":ie||(q?p.textColorPressedPrimary:p[Q("textColorPressed",le)]),"--n-text-color-focus":ie||(q?p.textColorFocusPrimary:p[Q("textColorFocus",le)]),"--n-text-color-disabled":ie||(q?p.textColorDisabledPrimary:p[Q("textColorDisabled",le)])};let Me={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};U?Me={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Me={"--n-border":p[Q("border",le)],"--n-border-hover":p[Q("borderHover",le)],"--n-border-pressed":p[Q("borderPressed",le)],"--n-border-focus":p[Q("borderFocus",le)],"--n-border-disabled":p[Q("borderDisabled",le)]};const{[Q("height",V)]:Re,[Q("fontSize",V)]:Le,[Q("padding",V)]:Ie,[Q("paddingRound",V)]:De,[Q("iconSize",V)]:Ue,[Q("borderRadius",V)]:ke,[Q("iconMargin",V)]:Y,waveOpacity:A}=p,te={"--n-width":pe&&!U?Re:"initial","--n-height":U?"initial":Re,"--n-font-size":Le,"--n-padding":pe||U?"initial":oe?De:Ie,"--n-icon-size":Ue,"--n-icon-margin":Y,"--n-border-radius":U?"initial":pe||oe?Re:ke};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":E,"--n-wave-opacity":A},we),re),Me),te)}),H=m?et("button",o.computed(()=>{let $="";const{dashed:k,type:M,ghost:p,text:S,color:E,round:D,circle:O,textColor:V,secondary:j,tertiary:J,quaternary:N,strong:U}=e;k&&($+="a"),p&&($+="b"),S&&($+="c"),D&&($+="d"),O&&($+="e"),j&&($+="f"),J&&($+="g"),N&&($+="h"),U&&($+="i"),E&&($+=`j${yo(E)}`),V&&($+=`k${yo(V)}`);const{value:q}=l;return $+=`l${q[0]}`,$+=`m${M[0]}`,$}),P,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:s,mergedSize:l,showBorder:i,enterPressed:r,rtlEnabled:b,handleMousedown:d,handleKeydown:u,handleBlur:g,handleKeyup:f,handleClick:c,customColorCssVars:o.computed(()=>{const{color:$}=e;if(!$)return null;const k=vn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":tr($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:P,themeClass:H==null?void 0:H.themeClass,onRender:H==null?void 0:H.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Oe(this.$slots.default,i=>i&&o.h("span",{class:`${e}-button__content`},i));return o.h(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,o.h(ql,{width:!0},{default:()=>Oe(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&o.h("span",{class:`${e}-button__icon`,style:{margin:Pn(this.$slots.default)?"0":""}},o.h(Yo,null,{default:()=>this.loading?o.h(Zo,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):o.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&r,this.text?null:o.h(bm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?o.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),xs=It;function uv(e){const{fontSize:t,boxShadow2:n,popoverColor:r,textColor2:i,borderRadius:a,borderColor:l,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:g,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:r,textColor:i,borderRadius:a,border:`1px solid ${l}`,heightSmall:s,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:g,dividerColor:m}}const fv={name:"ColorPicker",common:Ye,peers:{Input:xi,Button:yi},self:uv};function hv(e,t){switch(e[0]){case"hex":return t?"#000000FF":"#000000";case"rgb":return t?"rgba(0, 0, 0, 1)":"rgb(0, 0, 0)";case"hsl":return t?"hsla(0, 0%, 0%, 1)":"hsl(0, 0%, 0%)";case"hsv":return t?"hsva(0, 0%, 0%, 1)":"hsv(0, 0%, 0%)"}return process.env.NODE_ENV!=="production"&&Un("color-picker","props.modes is invalid."),"#000000"}function co(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function pv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function bv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const gv={rgb:{hex(e){return Lt(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hex:{rgb(e){return $t(Qe(e))},hsl(e){const[t,n,r,i]=Qe(e);return Ht([...lr(t,n,r),i])},hsv(e){const[t,n,r,i]=Qe(e);return an([...ar(t,n,r),i])}},hsl:{hex(e){const[t,n,r,i]=zn(e);return Lt([...sr(t,n,r),i])},rgb(e){const[t,n,r,i]=zn(e);return $t([...sr(t,n,r),i])},hsv(e){const[t,n,r,i]=zn(e);return an([...ji(t,n,r),i])}},hsv:{hex(e){const[t,n,r,i]=rn(e);return Lt([...Dt(t,n,r),i])},rgb(e){const[t,n,r,i]=rn(e);return $t([...Dt(t,n,r),i])},hsl(e){const[t,n,r,i]=rn(e);return Ht([...vo(t,n,r),i])}}};function ys(e,t,n){return n=n||co(e),n?n===t?e:gv[n][t](e):null}const Dn="12px",mv=12,xn="6px",vv=6,xv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",yv=o.defineComponent({name:"HueSlider",props:{clsPrefix:{type:String,required:!0},hue:{type:Number,required:!0},onUpdateHue:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=pv((a.clientX-d-vv)/(s-mv)*360);e.onUpdateHue(c)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,style:{height:Dn,borderRadius:xn}},o.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:xv,height:Dn,borderRadius:xn,position:"relative"},onMousedown:this.handleMouseDown},o.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${xn})`,borderRadius:xn,width:Dn,height:Dn}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:xn,width:Dn,height:Dn}})))))}}),uo="12px",wv=12,yn="6px",Cv=o.defineComponent({name:"AlphaSlider",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},alpha:{type:Number,default:0},onUpdateAlpha:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,left:d}=l.getBoundingClientRect(),c=(a.clientX-d)/(s-wv);e.onUpdateAlpha(bv(c))}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:o.computed(()=>{const{rgba:a}=e;return a?`linear-gradient(to right, rgba(${a[0]}, ${a[1]}, ${a[2]}, 0) 0%, rgba(${a[0]}, ${a[1]}, ${a[2]}, 1) 100%)`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:uo,borderRadius:yn},onMousedown:this.handleMouseDown},o.h("div",{style:{borderRadius:yn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},o.h("div",{class:`${e}-color-picker-checkboard`}),o.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&o.h("div",{style:{position:"absolute",left:yn,right:yn,top:0,bottom:0}},o.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${yn})`,borderRadius:yn,width:uo,height:uo}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:$t(this.rgba),borderRadius:yn,width:uo,height:uo}}))))}}),nr="12px",or="6px",Sv=o.defineComponent({name:"Pallete",props:{clsPrefix:{type:String,required:!0},rgba:{type:Array,default:null},displayedHue:{type:Number,required:!0},displayedSv:{type:Array,required:!0},onUpdateSV:{type:Function,required:!0},onComplete:Function},setup(e){const t=o.ref(null);function n(a){t.value&&(Pe("mousemove",document,r),Pe("mouseup",document,i),r(a))}function r(a){const{value:l}=t;if(!l)return;const{width:s,height:d,left:c,bottom:f}=l.getBoundingClientRect(),u=(f-a.clientY)/d,g=(a.clientX-c)/s,m=100*(g>1?1:g<0?0:g),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;$e("mousemove",document,r),$e("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:o.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},o.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),o.h("div",{class:`${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,style:{backgroundImage:"linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"}}),this.rgba&&o.h("div",{class:`${e}-color-picker-handle`,style:{width:nr,height:nr,borderRadius:or,left:`calc(${this.displayedSv[0]}% - ${or})`,bottom:`calc(${this.displayedSv[1]}% - ${or})`}},o.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:or,width:nr,height:nr}})))}}),wi="n-color-picker";function $v(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),255)):!1}function kv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),360)):!1}function zv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function Tv(e){const t=e.trim();return/^#[0-9a-fA-F]+$/.test(t)?[4,5,7,9].includes(t.length):!1}function Pv(e){return/^\d{1,3}\.?\d*%$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e)/100,100)):!1}const Rv={paddingSmall:"0 4px"},ws=o.defineComponent({name:"ColorInputUnit",props:{label:{type:String,required:!0},value:{type:[Number,String],default:null},showAlpha:Boolean,onUpdateValue:{type:Function,required:!0}},setup(e){const t=o.ref(""),{themeRef:n}=o.inject(wi,null);o.watchEffect(()=>{t.value=r()});function r(){const{value:l}=e;if(l===null)return"";const{label:s}=e;return s==="HEX"?l:s==="A"?`${Math.floor(l*100)}%`:String(Math.floor(l))}function i(l){t.value=l}function a(l){let s,d;switch(e.label){case"HEX":d=Tv(l),d&&e.onUpdateValue(l),t.value=r();break;case"H":s=kv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"S":case"L":case"V":s=zv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"A":s=Pv(l),s===!1?t.value=r():e.onUpdateValue(s);break;case"R":case"G":case"B":s=$v(l),s===!1?t.value=r():e.onUpdateValue(s);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return o.h(so,{size:"small",placeholder:this.label,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,builtinThemeOverrides:Rv,value:this.inputValue,onUpdateValue:this.handleInputUpdateValue,onChange:this.handleInputChange,style:this.label==="A"?"flex-grow: 1.25;":""})}}),_v=o.defineComponent({name:"ColorInput",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},modes:{type:Array,required:!0},showAlpha:{type:Boolean,required:!0},value:{type:String,default:null},valueArr:{type:Array,default:null},onUpdateValue:{type:Function,required:!0},onUpdateMode:{type:Function,required:!0}},setup(e){return{handleUnitUpdateValue(t,n){const{showAlpha:r}=e;if(e.mode==="hex"){e.onUpdateValue((r?Lt:jn)(n));return}let i;switch(e.valueArr===null?i=[0,0,0,0]:i=Array.from(e.valueArr),e.mode){case"hsv":i[t]=n,e.onUpdateValue((r?an:gr)(i));break;case"rgb":i[t]=n,e.onUpdateValue((r?$t:br)(i));break;case"hsl":i[t]=n,e.onUpdateValue((r?Ht:mr)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return o.h("div",{class:`${e}-color-picker-input`},o.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),o.h(iv,null,{default:()=>{const{mode:n,valueArr:r,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=r===null?null:(i?Lt:jn)(r)}catch{}return o.h(ws,{label:"HEX",showAlpha:i,value:a,onUpdateValue:l=>{this.handleUnitUpdateValue(0,l)}})}return(n+(i?"a":"")).split("").map((a,l)=>o.h(ws,{label:a.toUpperCase(),value:r===null?null:r[l],onUpdateValue:s=>{this.handleUnitUpdateValue(l,s)}}))}}))}}),Bv=o.defineComponent({name:"ColorPickerTrigger",props:{clsPrefix:{type:String,required:!0},value:{type:String,default:null},hsla:{type:Array,default:null},disabled:Boolean,onClick:Function},setup(e){const{colorPickerSlots:t,renderLabelRef:n}=o.inject(wi,null);return()=>{const{hsla:r,value:i,clsPrefix:a,onClick:l,disabled:s}=e,d=t.label||n.value;return o.h("div",{class:[`${a}-color-picker-trigger`,s&&`${a}-color-picker-trigger--disabled`],onClick:s?void 0:l},o.h("div",{class:`${a}-color-picker-trigger__fill`},o.h("div",{class:`${a}-color-picker-checkboard`}),o.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:r?Ht(r):""}}),i&&r?o.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:r[2]>50||r[3]<.5?"black":"white"}},d?d(i):i):null))}}});function Ev(e,t){if(t==="hsv"){const[n,r,i,a]=rn(e);return $t([...Dt(n,r,i),a])}return e}function Mv(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Iv=o.defineComponent({name:"ColorPickerSwatches",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},swatches:{type:Array,required:!0},onUpdateColor:{type:Function,required:!0}},setup(e){const t=o.computed(()=>e.swatches.map(a=>{const l=co(a);return{value:a,mode:l,legalValue:Ev(a,l)}}));function n(a){const{mode:l}=e;let{value:s,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(s)?s=Mv(s):(Un("color-picker",`color ${s} in swatches is invalid.`),s="#000000")),d===l?s:ys(s,l,d)}function r(a){e.onUpdateColor(n(a))}function i(a,l){a.key==="Enter"&&r(l)}return{parsedSwatchesRef:t,handleSwatchSelect:r,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>o.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},o.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Ov=o.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=co(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var r;const i=n.target.value;(r=e.onUpdateColor)===null||r===void 0||r.call(e,ys(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return o.h("div",{class:`${e}-color-picker-preview__preview`},o.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),o.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Av=I([w("color-picker",`
|
|
1161
1161
|
display: inline-block;
|
|
1162
1162
|
box-sizing: border-box;
|
|
1163
1163
|
height: var(--n-height);
|
|
@@ -1176,7 +1176,7 @@ ${t}
|
|
|
1176
1176
|
background-color .3s var(--n-bezier);
|
|
1177
1177
|
border-radius: var(--n-border-radius);
|
|
1178
1178
|
box-shadow: var(--n-box-shadow);
|
|
1179
|
-
`,[
|
|
1179
|
+
`,[lo(),w("input",`
|
|
1180
1180
|
text-align: center;
|
|
1181
1181
|
`)]),w("color-picker-checkboard",`
|
|
1182
1182
|
background: white;
|
|
@@ -1337,7 +1337,7 @@ ${t}
|
|
|
1337
1337
|
background: inherit;
|
|
1338
1338
|
filter: blur(2px);
|
|
1339
1339
|
content: "";
|
|
1340
|
-
`)])])])])]),Fv=Object.assign(Object.assign({},ye.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:rt.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),Dv=o.defineComponent({name:"ColorPicker",props:Fv,setup(e,{slots:t}){const n=o.ref(null);let r=null;const i=cn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,{localeRef:s}=
|
|
1340
|
+
`)])])])])]),Fv=Object.assign(Object.assign({},ye.props),{value:String,show:{type:Boolean,default:void 0},defaultShow:Boolean,defaultValue:String,modes:{type:Array,default:()=>["rgb","hex","hsl"]},placement:{type:String,default:"bottom-start"},to:rt.propTo,showAlpha:{type:Boolean,default:!0},showPreview:Boolean,swatches:Array,disabled:{type:Boolean,default:void 0},actions:{type:Array,default:null},internalActions:Array,size:String,renderLabel:Function,onComplete:Function,onConfirm:Function,onClear:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),Dv=o.defineComponent({name:"ColorPicker",props:Fv,setup(e,{slots:t}){const n=o.ref(null);let r=null;const i=cn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,{localeRef:s}=ao("global"),{mergedClsPrefixRef:d,namespaceRef:c,inlineThemeDisabled:f}=Ke(e),u=ye("ColorPicker","-color-picker",Av,fv,e,d);o.provide(wi,{themeRef:u,renderLabelRef:o.toRef(e,"renderLabel"),colorPickerSlots:t});const g=o.ref(e.defaultShow),m=vt(o.toRef(e,"show"),g);function h(A){const{onUpdateShow:te,"onUpdate:show":B}=e;te&&de(te,A),B&&de(B,A),g.value=A}const{defaultValue:x}=e,y=o.ref(x===void 0?hv(e.modes,e.showAlpha):x),b=vt(o.toRef(e,"value"),y),P=o.ref([b.value]),H=o.ref(0),$=o.computed(()=>co(b.value)),{modes:k}=e,M=o.ref(co(b.value)||k[0]||"rgb");function p(){const{modes:A}=e,{value:te}=M,B=A.findIndex(F=>F===te);~B?M.value=A[(B+1)%A.length]:M.value="rgb"}let S,E,D,O,V,j,J,N;const U=o.computed(()=>{const{value:A}=b;if(!A)return null;switch($.value){case"hsv":return rn(A);case"hsl":return[S,E,D,N]=zn(A),[...ji(S,E,D),N];case"rgb":case"hex":return[V,j,J,N]=Qe(A),[...ar(V,j,J),N]}}),q=o.computed(()=>{const{value:A}=b;if(!A)return null;switch($.value){case"rgb":case"hex":return Qe(A);case"hsv":return[S,E,O,N]=rn(A),[...Dt(S,E,O),N];case"hsl":return[S,E,D,N]=zn(A),[...sr(S,E,D),N]}}),oe=o.computed(()=>{const{value:A}=b;if(!A)return null;switch($.value){case"hsl":return zn(A);case"hsv":return[S,E,O,N]=rn(A),[...vo(S,E,O),N];case"rgb":case"hex":return[V,j,J,N]=Qe(A),[...lr(V,j,J),N]}}),pe=o.computed(()=>{switch(M.value){case"rgb":case"hex":return q.value;case"hsv":return U.value;case"hsl":return oe.value}}),ie=o.ref(0),fe=o.ref(1),G=o.ref([0,0]);function ee(A,te){const{value:B}=U,F=ie.value,X=B?B[3]:1;G.value=[A,te];const{showAlpha:z}=e;switch(M.value){case"hsv":re((z?an:gr)([F,A,te,X]),"cursor");break;case"hsl":re((z?Ht:mr)([...vo(F,A,te),X]),"cursor");break;case"rgb":re((z?$t:br)([...Dt(F,A,te),X]),"cursor");break;case"hex":re((z?Lt:jn)([...Dt(F,A,te),X]),"cursor");break}}function ve(A){ie.value=A;const{value:te}=U;if(!te)return;const[,B,F,X]=te,{showAlpha:z}=e;switch(M.value){case"hsv":re((z?an:gr)([A,B,F,X]),"cursor");break;case"rgb":re((z?$t:br)([...Dt(A,B,F),X]),"cursor");break;case"hex":re((z?Lt:jn)([...Dt(A,B,F),X]),"cursor");break;case"hsl":re((z?Ht:mr)([...vo(A,B,F),X]),"cursor");break}}function we(A){switch(M.value){case"hsv":[S,E,O]=U.value,re(an([S,E,O,A]),"cursor");break;case"rgb":[V,j,J]=q.value,re($t([V,j,J,A]),"cursor");break;case"hex":[V,j,J]=q.value,re(Lt([V,j,J,A]),"cursor");break;case"hsl":[S,E,D]=oe.value,re(Ht([S,E,D,A]),"cursor");break}fe.value=A}function re(A,te){te==="cursor"?r=A:r=null;const{nTriggerFormChange:B,nTriggerFormInput:F}=i,{onUpdateValue:X,"onUpdate:value":z}=e;X&&de(X,A),z&&de(z,A),B(),F(),y.value=A}function Se(A){re(A,"input"),o.nextTick(Ce)}function Ce(A=!0){const{value:te}=b;if(te){const{nTriggerFormChange:B,nTriggerFormInput:F}=i,{onComplete:X}=e;X&&X(te);const{value:z}=P,{value:C}=H;A&&(z.splice(C+1,z.length,te),H.value=C+1),B(),F()}}function le(){const{value:A}=H;A-1<0||(re(P.value[A-1],"input"),Ce(!1),H.value=A-1)}function Me(){const{value:A}=H;A<0||A+1>=P.value.length||(re(P.value[A+1],"input"),Ce(!1),H.value=A+1)}function Re(){re(null,"input");const{onClear:A}=e;A&&A(),h(!1)}function Le(){const{value:A}=b,{onConfirm:te}=e;te&&te(A),h(!1)}const Ie=o.computed(()=>H.value>=1),De=o.computed(()=>{const{value:A}=P;return A.length>1&&H.value<A.length-1});o.watch(m,A=>{A||(P.value=[b.value],H.value=0)}),o.watchEffect(()=>{if(!(r&&r===b.value)){const{value:A}=U;A&&(ie.value=A[0],fe.value=A[3],G.value=[A[1],A[2]])}r=null});const Ue=o.computed(()=>{const{value:A}=a,{common:{cubicBezierEaseInOut:te},self:{textColor:B,color:F,panelFontSize:X,boxShadow:z,border:C,borderRadius:_,dividerColor:ne,[Q("height",A)]:xe,[Q("fontSize",A)]:ze}}=u.value;return{"--n-bezier":te,"--n-text-color":B,"--n-color":F,"--n-panel-font-size":X,"--n-font-size":ze,"--n-box-shadow":z,"--n-border":C,"--n-border-radius":_,"--n-height":xe,"--n-divider-color":ne}}),ke=f?et("color-picker",o.computed(()=>a.value[0]),Ue,e):void 0;function Y(){var A;const{value:te}=q,{value:B}=ie,{internalActions:F,modes:X,actions:z}=e,{value:C}=u,{value:_}=d;return o.h("div",{class:[`${_}-color-picker-panel`,ke==null?void 0:ke.themeClass.value],onDragstart:ne=>{ne.preventDefault()},style:f?void 0:Ue.value},o.h("div",{class:`${_}-color-picker-control`},o.h(Sv,{clsPrefix:_,rgba:te,displayedHue:B,displayedSv:G.value,onUpdateSV:ee,onComplete:Ce}),o.h("div",{class:`${_}-color-picker-preview`},o.h("div",{class:`${_}-color-picker-preview__sliders`},o.h(yv,{clsPrefix:_,hue:B,onUpdateHue:ve,onComplete:Ce}),e.showAlpha?o.h(Cv,{clsPrefix:_,rgba:te,alpha:fe.value,onUpdateAlpha:we,onComplete:Ce}):null),e.showPreview?o.h(Ov,{clsPrefix:_,mode:M.value,color:q.value&&jn(q.value),onUpdateColor:ne=>{re(ne,"input")}}):null),o.h(_v,{clsPrefix:_,showAlpha:e.showAlpha,mode:M.value,modes:X,onUpdateMode:p,value:b.value,valueArr:pe.value,onUpdateValue:Se}),((A=e.swatches)===null||A===void 0?void 0:A.length)&&o.h(Iv,{clsPrefix:_,mode:M.value,swatches:e.swatches,onUpdateColor:ne=>{re(ne,"input")}})),z!=null&&z.length?o.h("div",{class:`${_}-color-picker-action`},z.includes("confirm")&&o.h(It,{size:"small",onClick:Le,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.confirm}),z.includes("clear")&&o.h(It,{size:"small",onClick:Re,disabled:!b.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.clear})):null,t.action?o.h("div",{class:`${_}-color-picker-action`},{default:t.action}):F?o.h("div",{class:`${_}-color-picker-action`},F.includes("undo")&&o.h(It,{size:"small",onClick:le,disabled:!Ie.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.undo}),F.includes("redo")&&o.h(It,{size:"small",onClick:Me,disabled:!De.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>s.value.redo})):null)}return{mergedClsPrefix:d,namespace:c,selfRef:n,hsla:oe,rgba:q,mergedShow:m,mergedDisabled:l,isMounted:_n(),adjustedTo:rt(e),mergedValue:b,handleTriggerClick(){h(!0)},handleClickOutside(A){var te;!((te=n.value)===null||te===void 0)&&te.contains(kn(A))||h(!1)},renderPanel:Y,cssVars:f?void 0:Ue,themeClass:ke==null?void 0:ke.themeClass,onRender:ke==null?void 0:ke.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),o.h("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h(Bv,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),o.h(Eo,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===rt.tdkey,to:this.adjustedTo},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?o.withDirectives(this.renderPanel(),[[qn,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function Vv(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const Hv={name:"Select",common:Ye,peers:{InternalSelection:hs,InternalSelectMenu:rs},self:Vv},Lv=I([w("select",`
|
|
1341
1341
|
z-index: auto;
|
|
1342
1342
|
outline: none;
|
|
1343
1343
|
width: 100%;
|
|
@@ -1345,7 +1345,7 @@ ${t}
|
|
|
1345
1345
|
`),w("select-menu",`
|
|
1346
1346
|
margin: 4px 0;
|
|
1347
1347
|
box-shadow: var(--n-menu-box-shadow);
|
|
1348
|
-
`,[ao({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Nv=Object.assign(Object.assign({},ye.props),{to:rt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),rr=o.defineComponent({name:"Select",props:Nv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.items!==void 0&&tt("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&tt("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=Ke(e),a=ye("Select","-select",Lv,Hv,e,t),l=o.ref(e.defaultValue),s=o.toRef(e,"value"),d=vt(s,l),c=o.ref(!1),f=o.ref(""),u=To(e,["items","options"]),g=o.ref([]),m=o.ref([]),h=o.computed(()=>m.value.concat(g.value).concat(u.value)),x=o.computed(()=>{const{filter:v}=e;if(v)return v;const{labelField:L,valueField:Z}=e;return(ae,se)=>{if(!se)return!1;const ce=se[L];if(typeof ce=="string")return vi(ae,ce);const ue=se[Z];return typeof ue=="string"?vi(ae,ue):typeof ue=="number"?vi(ae,String(ue)):!1}}),y=o.computed(()=>{if(e.remote)return u.value;{const{value:v}=h,{value:L}=f;return!L.length||!e.filterable?v:Km(v,x.value,L,e.childrenField)}}),b=o.computed(()=>{const{valueField:v,childrenField:L}=e,Z=Gm(v,L);return Xg(y.value,Z)}),P=o.computed(()=>qm(h.value,e.valueField,e.childrenField)),H=o.ref(!1),$=vt(o.toRef(e,"show"),H),k=o.ref(null),M=o.ref(null),p=o.ref(null),{localeRef:S}=io("Select"),E=o.computed(()=>{var v;return(v=e.placeholder)!==null&&v!==void 0?v:S.value.placeholder}),D=[],O=o.ref(new Map),V=o.computed(()=>{const{fallbackOption:v}=e;if(v===void 0){const{labelField:L,valueField:Z}=e;return ae=>({[L]:String(ae),[Z]:ae})}return v===!1?!1:L=>Object.assign(v(L),{value:L})});function j(v){const L=e.remote,{value:Z}=O,{value:ae}=P,{value:se}=V,ce=[];return v.forEach(ue=>{if(ae.has(ue))ce.push(ae.get(ue));else if(L&&Z.has(ue))ce.push(Z.get(ue));else if(se){const ge=se(ue);ge&&ce.push(ge)}}),ce}const J=o.computed(()=>{if(e.multiple){const{value:v}=d;return Array.isArray(v)?j(v):[]}return null}),N=o.computed(()=>{const{value:v}=d;return!e.multiple&&!Array.isArray(v)?v===null?null:j([v])[0]||null:null}),U=cn(e),{mergedSizeRef:q,mergedDisabledRef:oe,mergedStatusRef:pe}=U;function ie(v,L){const{onChange:Z,"onUpdate:value":ae,onUpdateValue:se}=e,{nTriggerFormChange:ce,nTriggerFormInput:ue}=U;Z&&de(Z,v,L),se&&de(se,v,L),ae&&de(ae,v,L),l.value=v,ce(),ue()}function fe(v){const{onBlur:L}=e,{nTriggerFormBlur:Z}=U;L&&de(L,v),Z()}function G(){const{onClear:v}=e;v&&de(v)}function ee(v){const{onFocus:L,showOnFocus:Z}=e,{nTriggerFormFocus:ae}=U;L&&de(L,v),ae(),Z&&Ce()}function ve(v){const{onSearch:L}=e;L&&de(L,v)}function we(v){const{onScroll:L}=e;L&&de(L,v)}function re(){var v;const{remote:L,multiple:Z}=e;if(L){const{value:ae}=O;if(Z){const{valueField:se}=e;(v=J.value)===null||v===void 0||v.forEach(ce=>{ae.set(ce[se],ce)})}else{const se=N.value;se&&ae.set(se[e.valueField],se)}}}function Se(v){const{onUpdateShow:L,"onUpdate:show":Z}=e;L&&de(L,v),Z&&de(Z,v),H.value=v}function Ce(){oe.value||(Se(!0),H.value=!0,e.filterable&&Be())}function le(){Se(!1)}function Me(){f.value="",m.value=D}const Re=o.ref(!1);function Le(){e.filterable&&(Re.value=!0)}function Ie(){e.filterable&&(Re.value=!1,$.value||Me())}function De(){oe.value||($.value?e.filterable?Be():le():Ce())}function Ue(v){var L,Z;!((Z=(L=p.value)===null||L===void 0?void 0:L.selfRef)===null||Z===void 0)&&Z.contains(v.relatedTarget)||(c.value=!1,fe(v),le())}function ke(v){ee(v),c.value=!0}function Y(){c.value=!0}function A(v){var L;!((L=k.value)===null||L===void 0)&&L.$el.contains(v.relatedTarget)||(c.value=!1,fe(v),le())}function te(){var v;(v=k.value)===null||v===void 0||v.focus(),le()}function B(v){var L;$.value&&(!((L=k.value)===null||L===void 0)&&L.$el.contains($n(v))||le())}function F(v){if(!Array.isArray(v))return[];if(V.value)return Array.from(v);{const{remote:L}=e,{value:Z}=P;if(L){const{value:ae}=O;return v.filter(se=>Z.has(se)||ae.has(se))}else return v.filter(ae=>Z.has(ae))}}function X(v){z(v.rawNode)}function z(v){if(oe.value)return;const{tag:L,remote:Z,clearFilterAfterSelect:ae,valueField:se}=e;if(L&&!Z){const{value:ce}=m,ue=ce[0]||null;if(ue){const ge=g.value;ge.length?ge.push(ue):g.value=[ue],m.value=D}}if(Z&&O.value.set(v[se],v),e.multiple){const ce=F(d.value),ue=ce.findIndex(ge=>ge===v[se]);if(~ue){if(ce.splice(ue,1),L&&!Z){const ge=C(v[se]);~ge&&(g.value.splice(ge,1),ae&&(f.value=""))}}else ce.push(v[se]),ae&&(f.value="");ie(ce,j(ce))}else{if(L&&!Z){const ce=C(v[se]);~ce?g.value=[g.value[ce]]:g.value=D}Ae(),le(),ie(v[se],v)}}function C(v){return g.value.findIndex(Z=>Z[e.valueField]===v)}function _(v){$.value||Ce();const{value:L}=v.target;f.value=L;const{tag:Z,remote:ae}=e;if(ve(L),Z&&!ae){if(!L){m.value=D;return}const{onCreate:se}=e,ce=se?se(L):{[e.labelField]:L,[e.valueField]:L},{valueField:ue,labelField:ge}=e;u.value.some(Te=>Te[ue]===ce[ue]||Te[ge]===ce[ge])||g.value.some(Te=>Te[ue]===ce[ue]||Te[ge]===ce[ge])?m.value=D:m.value=[ce]}}function ne(v){v.stopPropagation();const{multiple:L}=e;!L&&e.filterable&&le(),G(),L?ie([],[]):ie(null,null)}function xe(v){!Nn(v,"action")&&!Nn(v,"empty")&&!Nn(v,"header")&&v.preventDefault()}function ze(v){we(v)}function Ne(v){var L,Z,ae,se,ce;if(!e.keyboard){v.preventDefault();return}switch(v.key){case" ":if(e.filterable)break;v.preventDefault();case"Enter":if(!(!((L=k.value)===null||L===void 0)&&L.isComposing)){if($.value){const ue=(Z=p.value)===null||Z===void 0?void 0:Z.getPendingTmNode();ue?X(ue):e.filterable||(le(),Ae())}else if(Ce(),e.tag&&Re.value){const ue=m.value[0];if(ue){const ge=ue[e.valueField],{value:Te}=d;e.multiple&&Array.isArray(Te)&&Te.includes(ge)||z(ue)}}}v.preventDefault();break;case"ArrowUp":if(v.preventDefault(),e.loading)return;$.value&&((ae=p.value)===null||ae===void 0||ae.prev());break;case"ArrowDown":if(v.preventDefault(),e.loading)return;$.value?(se=p.value)===null||se===void 0||se.next():Ce();break;case"Escape":$.value&&(Ad(v),le()),(ce=k.value)===null||ce===void 0||ce.focus();break}}function Ae(){var v;(v=k.value)===null||v===void 0||v.focus()}function Be(){var v;(v=k.value)===null||v===void 0||v.focusInput()}function qe(){var v;$.value&&((v=M.value)===null||v===void 0||v.syncPosition())}re(),o.watch(o.toRef(e,"options"),re);const st={focus:()=>{var v;(v=k.value)===null||v===void 0||v.focus()},focusInput:()=>{var v;(v=k.value)===null||v===void 0||v.focusInput()},blur:()=>{var v;(v=k.value)===null||v===void 0||v.blur()},blurInput:()=>{var v;(v=k.value)===null||v===void 0||v.blurInput()}},Je=o.computed(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),it=i?et("select",void 0,Je,e):void 0;return Object.assign(Object.assign({},st),{mergedStatus:pe,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:b,isMounted:Rn(),triggerRef:k,menuRef:p,pattern:f,uncontrolledShow:H,mergedShow:$,adjustedTo:rt(e),uncontrolledValue:l,mergedValue:d,followerRef:M,localizedPlaceholder:E,selectedOption:N,selectedOptions:J,mergedSize:q,mergedDisabled:oe,focused:c,activeWithoutMenuOpen:Re,inlineThemeDisabled:i,onTriggerInputFocus:Le,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:qe,handleMenuFocus:Y,handleMenuBlur:A,handleMenuTabOut:te,handleTriggerClick:De,handleToggle:X,handleDeleteOption:z,handlePatternInput:_,handleClear:ne,handleTriggerBlur:Ue,handleTriggerFocus:ke,handleKeydown:Ne,handleMenuAfterLeave:Me,handleMenuClickOutside:B,handleMenuScroll:ze,handleMenuKeydown:Ne,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Je,themeClass:it==null?void 0:it.themeClass,onRender:it==null?void 0:it.onRender})},render(){return o.h("div",{class:`${this.mergedClsPrefix}-select`},o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h(Am,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),o.h(Eo,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===rt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),o.withDirectives(o.h(hm,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[o.vShow,this.mergedShow],[Kn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Kn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Wv={padding:"8px 14px"};function jv(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Wv),{borderRadius:t,boxShadow:n,color:ft(r,"rgba(0, 0, 0, .85)"),textColor:r})}const Uv={name:"Tooltip",common:Ye,peers:{Popover:pi},self:jv},Gv=Object.assign(Object.assign({},cs),ye.props),Cs=o.defineComponent({name:"Tooltip",props:Gv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Ke(e),n=ye("Tooltip","-tooltip",void 0,Uv,e,t),r=o.ref(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(a){r.value.setShow(a)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:o.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return o.h(us,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function Kv(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const qv={name:"Icon",common:Ye,self:Kv},Xv=w("icon",`
|
|
1348
|
+
`,[lo({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Nv=Object.assign(Object.assign({},ye.props),{to:rt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:"bottom-start"},widthMode:{type:String,default:"trigger"},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},childrenField:{type:String,default:"children"},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:"show"},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},onChange:[Function,Array],items:Array}),rr=o.defineComponent({name:"Select",props:Nv,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.items!==void 0&&tt("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&tt("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i}=Ke(e),a=ye("Select","-select",Lv,Hv,e,t),l=o.ref(e.defaultValue),s=o.toRef(e,"value"),d=vt(s,l),c=o.ref(!1),f=o.ref(""),u=To(e,["items","options"]),g=o.ref([]),m=o.ref([]),h=o.computed(()=>m.value.concat(g.value).concat(u.value)),x=o.computed(()=>{const{filter:v}=e;if(v)return v;const{labelField:L,valueField:Z}=e;return(ae,se)=>{if(!se)return!1;const ce=se[L];if(typeof ce=="string")return vi(ae,ce);const ue=se[Z];return typeof ue=="string"?vi(ae,ue):typeof ue=="number"?vi(ae,String(ue)):!1}}),y=o.computed(()=>{if(e.remote)return u.value;{const{value:v}=h,{value:L}=f;return!L.length||!e.filterable?v:Km(v,x.value,L,e.childrenField)}}),b=o.computed(()=>{const{valueField:v,childrenField:L}=e,Z=Gm(v,L);return Xg(y.value,Z)}),P=o.computed(()=>qm(h.value,e.valueField,e.childrenField)),H=o.ref(!1),$=vt(o.toRef(e,"show"),H),k=o.ref(null),M=o.ref(null),p=o.ref(null),{localeRef:S}=ao("Select"),E=o.computed(()=>{var v;return(v=e.placeholder)!==null&&v!==void 0?v:S.value.placeholder}),D=[],O=o.ref(new Map),V=o.computed(()=>{const{fallbackOption:v}=e;if(v===void 0){const{labelField:L,valueField:Z}=e;return ae=>({[L]:String(ae),[Z]:ae})}return v===!1?!1:L=>Object.assign(v(L),{value:L})});function j(v){const L=e.remote,{value:Z}=O,{value:ae}=P,{value:se}=V,ce=[];return v.forEach(ue=>{if(ae.has(ue))ce.push(ae.get(ue));else if(L&&Z.has(ue))ce.push(Z.get(ue));else if(se){const ge=se(ue);ge&&ce.push(ge)}}),ce}const J=o.computed(()=>{if(e.multiple){const{value:v}=d;return Array.isArray(v)?j(v):[]}return null}),N=o.computed(()=>{const{value:v}=d;return!e.multiple&&!Array.isArray(v)?v===null?null:j([v])[0]||null:null}),U=cn(e),{mergedSizeRef:q,mergedDisabledRef:oe,mergedStatusRef:pe}=U;function ie(v,L){const{onChange:Z,"onUpdate:value":ae,onUpdateValue:se}=e,{nTriggerFormChange:ce,nTriggerFormInput:ue}=U;Z&&de(Z,v,L),se&&de(se,v,L),ae&&de(ae,v,L),l.value=v,ce(),ue()}function fe(v){const{onBlur:L}=e,{nTriggerFormBlur:Z}=U;L&&de(L,v),Z()}function G(){const{onClear:v}=e;v&&de(v)}function ee(v){const{onFocus:L,showOnFocus:Z}=e,{nTriggerFormFocus:ae}=U;L&&de(L,v),ae(),Z&&Ce()}function ve(v){const{onSearch:L}=e;L&&de(L,v)}function we(v){const{onScroll:L}=e;L&&de(L,v)}function re(){var v;const{remote:L,multiple:Z}=e;if(L){const{value:ae}=O;if(Z){const{valueField:se}=e;(v=J.value)===null||v===void 0||v.forEach(ce=>{ae.set(ce[se],ce)})}else{const se=N.value;se&&ae.set(se[e.valueField],se)}}}function Se(v){const{onUpdateShow:L,"onUpdate:show":Z}=e;L&&de(L,v),Z&&de(Z,v),H.value=v}function Ce(){oe.value||(Se(!0),H.value=!0,e.filterable&&Be())}function le(){Se(!1)}function Me(){f.value="",m.value=D}const Re=o.ref(!1);function Le(){e.filterable&&(Re.value=!0)}function Ie(){e.filterable&&(Re.value=!1,$.value||Me())}function De(){oe.value||($.value?e.filterable?Be():le():Ce())}function Ue(v){var L,Z;!((Z=(L=p.value)===null||L===void 0?void 0:L.selfRef)===null||Z===void 0)&&Z.contains(v.relatedTarget)||(c.value=!1,fe(v),le())}function ke(v){ee(v),c.value=!0}function Y(){c.value=!0}function A(v){var L;!((L=k.value)===null||L===void 0)&&L.$el.contains(v.relatedTarget)||(c.value=!1,fe(v),le())}function te(){var v;(v=k.value)===null||v===void 0||v.focus(),le()}function B(v){var L;$.value&&(!((L=k.value)===null||L===void 0)&&L.$el.contains(kn(v))||le())}function F(v){if(!Array.isArray(v))return[];if(V.value)return Array.from(v);{const{remote:L}=e,{value:Z}=P;if(L){const{value:ae}=O;return v.filter(se=>Z.has(se)||ae.has(se))}else return v.filter(ae=>Z.has(ae))}}function X(v){z(v.rawNode)}function z(v){if(oe.value)return;const{tag:L,remote:Z,clearFilterAfterSelect:ae,valueField:se}=e;if(L&&!Z){const{value:ce}=m,ue=ce[0]||null;if(ue){const ge=g.value;ge.length?ge.push(ue):g.value=[ue],m.value=D}}if(Z&&O.value.set(v[se],v),e.multiple){const ce=F(d.value),ue=ce.findIndex(ge=>ge===v[se]);if(~ue){if(ce.splice(ue,1),L&&!Z){const ge=C(v[se]);~ge&&(g.value.splice(ge,1),ae&&(f.value=""))}}else ce.push(v[se]),ae&&(f.value="");ie(ce,j(ce))}else{if(L&&!Z){const ce=C(v[se]);~ce?g.value=[g.value[ce]]:g.value=D}Ae(),le(),ie(v[se],v)}}function C(v){return g.value.findIndex(Z=>Z[e.valueField]===v)}function _(v){$.value||Ce();const{value:L}=v.target;f.value=L;const{tag:Z,remote:ae}=e;if(ve(L),Z&&!ae){if(!L){m.value=D;return}const{onCreate:se}=e,ce=se?se(L):{[e.labelField]:L,[e.valueField]:L},{valueField:ue,labelField:ge}=e;u.value.some(Te=>Te[ue]===ce[ue]||Te[ge]===ce[ge])||g.value.some(Te=>Te[ue]===ce[ue]||Te[ge]===ce[ge])?m.value=D:m.value=[ce]}}function ne(v){v.stopPropagation();const{multiple:L}=e;!L&&e.filterable&&le(),G(),L?ie([],[]):ie(null,null)}function xe(v){!Wn(v,"action")&&!Wn(v,"empty")&&!Wn(v,"header")&&v.preventDefault()}function ze(v){we(v)}function Ne(v){var L,Z,ae,se,ce;if(!e.keyboard){v.preventDefault();return}switch(v.key){case" ":if(e.filterable)break;v.preventDefault();case"Enter":if(!(!((L=k.value)===null||L===void 0)&&L.isComposing)){if($.value){const ue=(Z=p.value)===null||Z===void 0?void 0:Z.getPendingTmNode();ue?X(ue):e.filterable||(le(),Ae())}else if(Ce(),e.tag&&Re.value){const ue=m.value[0];if(ue){const ge=ue[e.valueField],{value:Te}=d;e.multiple&&Array.isArray(Te)&&Te.includes(ge)||z(ue)}}}v.preventDefault();break;case"ArrowUp":if(v.preventDefault(),e.loading)return;$.value&&((ae=p.value)===null||ae===void 0||ae.prev());break;case"ArrowDown":if(v.preventDefault(),e.loading)return;$.value?(se=p.value)===null||se===void 0||se.next():Ce();break;case"Escape":$.value&&(Ad(v),le()),(ce=k.value)===null||ce===void 0||ce.focus();break}}function Ae(){var v;(v=k.value)===null||v===void 0||v.focus()}function Be(){var v;(v=k.value)===null||v===void 0||v.focusInput()}function qe(){var v;$.value&&((v=M.value)===null||v===void 0||v.syncPosition())}re(),o.watch(o.toRef(e,"options"),re);const st={focus:()=>{var v;(v=k.value)===null||v===void 0||v.focus()},focusInput:()=>{var v;(v=k.value)===null||v===void 0||v.focusInput()},blur:()=>{var v;(v=k.value)===null||v===void 0||v.blur()},blurInput:()=>{var v;(v=k.value)===null||v===void 0||v.blurInput()}},Je=o.computed(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),it=i?et("select",void 0,Je,e):void 0;return Object.assign(Object.assign({},st),{mergedStatus:pe,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:b,isMounted:_n(),triggerRef:k,menuRef:p,pattern:f,uncontrolledShow:H,mergedShow:$,adjustedTo:rt(e),uncontrolledValue:l,mergedValue:d,followerRef:M,localizedPlaceholder:E,selectedOption:N,selectedOptions:J,mergedSize:q,mergedDisabled:oe,focused:c,activeWithoutMenuOpen:Re,inlineThemeDisabled:i,onTriggerInputFocus:Le,onTriggerInputBlur:Ie,handleTriggerOrMenuResize:qe,handleMenuFocus:Y,handleMenuBlur:A,handleMenuTabOut:te,handleTriggerClick:De,handleToggle:X,handleDeleteOption:z,handlePatternInput:_,handleClear:ne,handleTriggerBlur:Ue,handleTriggerFocus:ke,handleKeydown:Ne,handleMenuAfterLeave:Me,handleMenuClickOutside:B,handleMenuScroll:ze,handleMenuKeydown:Ne,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Je,themeClass:it==null?void 0:it.themeClass,onRender:it==null?void 0:it.onRender})},render(){return o.h("div",{class:`${this.mergedClsPrefix}-select`},o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h(Am,{ref:"triggerRef",inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e,t;return[(t=(e=this.$slots).arrow)===null||t===void 0?void 0:t.call(e)]}})}),o.h(Eo,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===rt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e,t,n;return this.mergedShow||this.displayDirective==="show"?((e=this.onRender)===null||e===void 0||e.call(this),o.withDirectives(o.h(hm,Object.assign({},this.menuProps,{ref:"menuRef",onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,(t=this.menuProps)===null||t===void 0?void 0:t.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:"medium",renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[(n=this.menuProps)===null||n===void 0?void 0:n.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange}),{empty:()=>{var r,i;return[(i=(r=this.$slots).empty)===null||i===void 0?void 0:i.call(r)]},header:()=>{var r,i;return[(i=(r=this.$slots).header)===null||i===void 0?void 0:i.call(r)]},action:()=>{var r,i;return[(i=(r=this.$slots).action)===null||i===void 0?void 0:i.call(r)]}}),this.displayDirective==="show"?[[o.vShow,this.mergedShow],[qn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[qn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Wv={padding:"8px 14px"};function jv(e){const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},Wv),{borderRadius:t,boxShadow:n,color:ft(r,"rgba(0, 0, 0, .85)"),textColor:r})}const Uv={name:"Tooltip",common:Ye,peers:{Popover:pi},self:jv},Gv=Object.assign(Object.assign({},cs),ye.props),Cs=o.defineComponent({name:"Tooltip",props:Gv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Ke(e),n=ye("Tooltip","-tooltip",void 0,Uv,e,t),r=o.ref(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(a){r.value.setShow(a)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:o.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return o.h(us,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}});function Kv(e){const{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:l}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:l}}const qv={name:"Icon",common:Ye,self:Kv},Xv=w("icon",`
|
|
1349
1349
|
height: 1em;
|
|
1350
1350
|
width: 1em;
|
|
1351
1351
|
line-height: 1em;
|
|
@@ -1354,7 +1354,7 @@ ${t}
|
|
|
1354
1354
|
position: relative;
|
|
1355
1355
|
fill: currentColor;
|
|
1356
1356
|
transform: translateZ(0);
|
|
1357
|
-
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[I("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),I("svg",{height:"1em",width:"1em"})]),Yv=Object.assign(Object.assign({},ye.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),yt=o.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Yv,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("Icon","-icon",Xv,qv,e,t),i=o.computed(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:d}=r.value;if(l!==void 0){const{color:c,[`opacity${l}Depth`]:f}=d;return{"--n-bezier":s,"--n-color":c,"--n-opacity":f}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),a=n?et("icon",o.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:o.computed(()=>{const{size:l,color:s}=e;return{fontSize:lt(l),color:s}}),cssVars:n?void 0:i,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:a,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&
|
|
1357
|
+
`,[W("color-transition",{transition:"color .3s var(--n-bezier)"}),W("depth",{color:"var(--n-color)"},[I("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),I("svg",{height:"1em",width:"1em"})]),Yv=Object.assign(Object.assign({},ye.props),{depth:[String,Number],size:[Number,String],color:String,component:Object}),yt=o.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:Yv,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("Icon","-icon",Xv,qv,e,t),i=o.computed(()=>{const{depth:l}=e,{common:{cubicBezierEaseInOut:s},self:d}=r.value;if(l!==void 0){const{color:c,[`opacity${l}Depth`]:f}=d;return{"--n-bezier":s,"--n-color":c,"--n-opacity":f}}return{"--n-bezier":s,"--n-color":"","--n-opacity":""}}),a=n?et("icon",o.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:o.computed(()=>{const{size:l,color:s}=e;return{fontSize:lt(l),color:s}}),cssVars:n?void 0:i,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender}},render(){var e;const{$parent:t,depth:n,mergedClsPrefix:r,component:i,onRender:a,themeClass:l}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&Un("icon","don't wrap `n-icon` inside `n-icon`"),a==null||a(),o.h("i",o.mergeProps(this.$attrs,{role:"img",class:[`${r}-icon`,l,{[`${r}-icon--depth`]:n,[`${r}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?o.h(i):this.$slots)}});function Zv(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const Jv={name:"InputNumber",common:Ye,peers:{Button:yi,Input:xi},self:Zv},Qv={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function e0(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:i,baseColor:a,cardColor:l,modalColor:s,popoverColor:d,borderRadius:c,fontSize:f,opacityDisabled:u}=e;return Object.assign(Object.assign({},Qv),{fontSize:f,markFontSize:f,railColor:r,railColorHover:r,fillColor:i,fillColorHover:i,opacityDisabled:u,handleColor:"#FFF",dotColor:l,dotColorModal:s,dotColorPopover:d,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:n,indicatorTextColor:a,indicatorBorderRadius:c,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const t0={name:"Slider",common:Ye,self:e0},n0={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 o0(e){const{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},n0),{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 ${me(t,{alpha:.2})}`})}const r0={name:"Switch",common:Ye,self:o0},i0={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function a0(e){const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:d,tabColor:c,baseColor:f,dividerColor:u,fontWeight:g,textColor1:m,borderRadius:h,fontSize:x,fontWeightStrong:y}=e;return Object.assign(Object.assign({},i0),{colorSegment:c,tabFontSizeCard:x,tabTextColorLine:m,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:m,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:m,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:m,tabTextColorHoverCard:m,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:l,closeColorHover:s,closeColorPressed:d,closeBorderRadius:h,tabColor:c,tabColorSegment:f,tabBorderColor:u,tabFontWeightActive:g,tabFontWeight:g,tabBorderRadius:h,paneTextColor:t,fontWeightStrong:y})}const l0={name:"Tabs",common:Ye,self:a0};function s0(e){const{popoverColor:t,dividerColor:n,borderRadius:r}=e;return{color:t,buttonBorderColor:n,borderRadiusSquare:r,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)"}}const d0={name:"FloatButtonGroup",common:Ye,self:s0},c0=w("float-button-group",[w("float-button",`
|
|
1358
1358
|
position: relative;
|
|
1359
1359
|
`),W("square-shape",`
|
|
1360
1360
|
background-color: var(--n-color);
|
|
@@ -1469,7 +1469,7 @@ ${t}
|
|
|
1469
1469
|
`),w("input-number-prefix",`
|
|
1470
1470
|
display: inline-block;
|
|
1471
1471
|
margin-left: 10px;
|
|
1472
|
-
`)]),ks=800,zs=100,y0=Object.assign(Object.assign({},ye.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),w0=o.defineComponent({name:"InputNumber",props:y0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onChange!==void 0&&tt("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=Ke(e),i=ye("InputNumber","-input-number",x0,Jv,e,n),{localeRef:a}=
|
|
1472
|
+
`)]),ks=800,zs=100,y0=Object.assign(Object.assign({},ye.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:"right"},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),w0=o.defineComponent({name:"InputNumber",props:y0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onChange!==void 0&&tt("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:r}=Ke(e),i=ye("InputNumber","-input-number",x0,Jv,e,n),{localeRef:a}=ao("InputNumber"),l=cn(e),{mergedSizeRef:s,mergedDisabledRef:d,mergedStatusRef:c}=l,f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(e.defaultValue),h=o.toRef(e,"value"),x=vt(h,m),y=o.ref(""),b=Y=>{const A=String(Y).split(".")[1];return A?A.length:0},P=Y=>{const A=[e.min,e.max,e.step,Y].map(te=>te===void 0?0:b(te));return Math.max(...A)},H=Xe(()=>{const{placeholder:Y}=e;return Y!==void 0?Y:a.value.placeholder}),$=Xe(()=>{const Y=Si(e.step);return Y!==null?Y===0?1:Math.abs(Y):1}),k=Xe(()=>{const Y=Si(e.min);return Y!==null?Y:null}),M=Xe(()=>{const Y=Si(e.max);return Y!==null?Y:null}),p=()=>{const{value:Y}=x;if(Ci(Y)){const{format:A,precision:te}=e;A?y.value=A(Y):Y===null||te===void 0||b(Y)>te?y.value=$s(Y,void 0):y.value=$s(Y,te)}else y.value=String(Y)};p();const S=Y=>{const{value:A}=x;if(Y===A){p();return}const{"onUpdate:value":te,onUpdateValue:B,onChange:F}=e,{nTriggerFormInput:X,nTriggerFormChange:z}=l;F&&de(F,Y),B&&de(B,Y),te&&de(te,Y),m.value=Y,X(),z()},E=({offset:Y,doUpdateIfValid:A,fixPrecision:te,isInputing:B})=>{const{value:F}=y;if(B&&v0(F))return!1;const X=(e.parse||m0)(F);if(X===null)return A&&S(null),null;if(Ci(X)){const z=b(X),{precision:C}=e;if(C!==void 0&&C<z&&!te)return!1;let _=Number.parseFloat((X+Y).toFixed(C??P(X)));if(Ci(_)){const{value:ne}=M,{value:xe}=k;if(ne!==null&&_>ne){if(!A||B)return!1;_=ne}if(xe!==null&&_<xe){if(!A||B)return!1;_=xe}return e.validator&&!e.validator(_)?!1:(A&&S(_),_)}}return!1},D=Xe(()=>E({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),O=Xe(()=>{const{value:Y}=x;if(e.validator&&Y===null)return!1;const{value:A}=$;return E({offset:-A,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),V=Xe(()=>{const{value:Y}=x;if(e.validator&&Y===null)return!1;const{value:A}=$;return E({offset:+A,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function j(Y){const{onFocus:A}=e,{nTriggerFormFocus:te}=l;A&&de(A,Y),te()}function J(Y){var A,te;if(Y.target===((A=f.value)===null||A===void 0?void 0:A.wrapperElRef))return;const B=E({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(B!==!1){const z=(te=f.value)===null||te===void 0?void 0:te.inputElRef;z&&(z.value=String(B||"")),x.value===B&&p()}else p();const{onBlur:F}=e,{nTriggerFormBlur:X}=l;F&&de(F,Y),X(),o.nextTick(()=>{p()})}function N(Y){const{onClear:A}=e;A&&de(A,Y)}function U(){const{value:Y}=V;if(!Y){Ce();return}const{value:A}=x;if(A===null)e.validator||S(ie());else{const{value:te}=$;E({offset:te,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function q(){const{value:Y}=O;if(!Y){re();return}const{value:A}=x;if(A===null)e.validator||S(ie());else{const{value:te}=$;E({offset:-te,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const oe=j,pe=J;function ie(){if(e.validator)return null;const{value:Y}=k,{value:A}=M;return Y!==null?Math.max(0,Y):A!==null?Math.min(0,A):0}function fe(Y){N(Y),S(null)}function G(Y){var A,te,B;!((A=g.value)===null||A===void 0)&&A.$el.contains(Y.target)&&Y.preventDefault(),!((te=u.value)===null||te===void 0)&&te.$el.contains(Y.target)&&Y.preventDefault(),(B=f.value)===null||B===void 0||B.activate()}let ee=null,ve=null,we=null;function re(){we&&(window.clearTimeout(we),we=null),ee&&(window.clearInterval(ee),ee=null)}let Se=null;function Ce(){Se&&(window.clearTimeout(Se),Se=null),ve&&(window.clearInterval(ve),ve=null)}function le(){re(),we=window.setTimeout(()=>{ee=window.setInterval(()=>{q()},zs)},ks),Pe("mouseup",document,re,{once:!0})}function Me(){Ce(),Se=window.setTimeout(()=>{ve=window.setInterval(()=>{U()},zs)},ks),Pe("mouseup",document,Ce,{once:!0})}const Re=()=>{ve||U()},Le=()=>{ee||q()};function Ie(Y){var A,te;if(Y.key==="Enter"){if(Y.target===((A=f.value)===null||A===void 0?void 0:A.wrapperElRef))return;E({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((te=f.value)===null||te===void 0||te.deactivate())}else if(Y.key==="ArrowUp"){if(!V.value||e.keyboard.ArrowUp===!1)return;Y.preventDefault(),E({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&U()}else if(Y.key==="ArrowDown"){if(!O.value||e.keyboard.ArrowDown===!1)return;Y.preventDefault(),E({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&q()}}function De(Y){y.value=Y,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&E({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}o.watch(x,()=>{p()});const Ue={focus:()=>{var Y;return(Y=f.value)===null||Y===void 0?void 0:Y.focus()},blur:()=>{var Y;return(Y=f.value)===null||Y===void 0?void 0:Y.blur()},select:()=>{var Y;return(Y=f.value)===null||Y===void 0?void 0:Y.select()}},ke=qt("InputNumber",r,n);return Object.assign(Object.assign({},Ue),{rtlEnabled:ke,inputInstRef:f,minusButtonInstRef:u,addButtonInstRef:g,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:m,mergedValue:x,mergedPlaceholder:H,displayedValueInvalid:D,mergedSize:s,mergedDisabled:d,displayedValue:y,addable:V,minusable:O,mergedStatus:c,handleFocus:oe,handleBlur:pe,handleClear:fe,handleMouseDown:G,handleAddClick:Re,handleMinusClick:Le,handleAddMousedown:Me,handleMinusMousedown:le,handleKeyDown:Ie,handleUpdateDisplayedValue:De,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:o.computed(()=>{const{self:{iconColorDisabled:Y}}=i.value,[A,te,B,F]=Qe(Y);return{textColorTextDisabled:`rgb(${A}, ${te}, ${B})`,opacityDisabled:`${F}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>o.h(xs,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:"minusButtonInstRef"},{icon:()=>mt(t["minus-icon"],()=>[o.h(bt,{clsPrefix:e},{default:()=>o.h(hg,null)})])}),r=()=>o.h(xs,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:"addButtonInstRef"},{icon:()=>mt(t["add-icon"],()=>[o.h(bt,{clsPrefix:e},{default:()=>o.h(Gl,null)})])});return o.h("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},o.h(so,{ref:"inputInstRef",autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?"line-through":void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>{var i;return this.showButton&&this.buttonPlacement==="both"?[n(),Oe(t.prefix,a=>a?o.h("span",{class:`${e}-input-number-prefix`},a):null)]:(i=t.prefix)===null||i===void 0?void 0:i.call(t)},suffix:()=>{var i;return this.showButton?[Oe(t.suffix,a=>a?o.h("span",{class:`${e}-input-number-suffix`},a):null),this.buttonPlacement==="right"?n():null,r()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}});function Ts(e){return window.TouchEvent&&e instanceof window.TouchEvent}function Ps(){const e=new Map,t=n=>r=>{e.set(n,r)};return o.onBeforeUpdate(()=>{e.clear()}),[e,t]}const C0=I([w("slider",`
|
|
1473
1473
|
display: block;
|
|
1474
1474
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1475
1475
|
position: relative;
|
|
@@ -1611,7 +1611,7 @@ ${t}
|
|
|
1611
1611
|
color: var(--n-indicator-text-color);
|
|
1612
1612
|
background-color: var(--n-indicator-color);
|
|
1613
1613
|
box-shadow: var(--n-indicator-box-shadow);
|
|
1614
|
-
`,[
|
|
1614
|
+
`,[lo()]),w("slider-handle-indicator",`
|
|
1615
1615
|
font-size: var(--n-font-size);
|
|
1616
1616
|
padding: 6px 10px;
|
|
1617
1617
|
border-radius: var(--n-indicator-border-radius);
|
|
@@ -1626,7 +1626,7 @@ ${t}
|
|
|
1626
1626
|
margin-top: 12px;
|
|
1627
1627
|
`),W("left",`
|
|
1628
1628
|
margin-right: 12px;
|
|
1629
|
-
`),ao()]),Bd(w("slider",[w("slider-dot","background-color: var(--n-dot-color-modal);")])),Ed(w("slider",[w("slider-dot","background-color: var(--n-dot-color-popover);")]))]),S0=0,$0=Object.assign(Object.assign({},ye.props),{to:rt.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),k0=o.defineComponent({name:"Slider",props:$0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=Ke(e),i=ye("Slider","-slider",C0,t0,e,t),a=o.ref(null),[l,s]=Ps(),[d,c]=Ps(),f=o.ref(new Set),u=cn(e),{mergedDisabledRef:g}=u,m=o.computed(()=>{const{step:z}=e;if(Number(z)<=0||z==="mark")return 0;const C=z.toString();let _=0;return C.includes(".")&&(_=C.length-C.indexOf(".")-1),_}),h=o.ref(e.defaultValue),x=o.toRef(e,"value"),y=vt(x,h),b=o.computed(()=>{const{value:z}=y;return(e.range?z:[z]).map(G)}),P=o.computed(()=>b.value.length>2),H=o.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=o.computed(()=>{const{marks:z}=e;return z?Object.keys(z).map(Number.parseFloat):null}),k=o.ref(-1),M=o.ref(-1),p=o.ref(-1),S=o.ref(!1),E=o.ref(!1),D=o.computed(()=>{const{vertical:z,reverse:C}=e;return z?C?"top":"bottom":C?"right":"left"}),O=o.computed(()=>{if(P.value)return;const z=b.value,C=ee(e.range?Math.min(...z):e.min),_=ee(e.range?Math.max(...z):z[0]),{value:ne}=D;return e.vertical?{[ne]:`${C}%`,height:`${_-C}%`}:{[ne]:`${C}%`,width:`${_-C}%`}}),V=o.computed(()=>{const z=[],{marks:C}=e;if(C){const _=b.value.slice();_.sort((Ae,Be)=>Ae-Be);const{value:ne}=D,{value:xe}=P,{range:ze}=e,Ne=xe?()=>!1:Ae=>ze?Ae>=_[0]&&Ae<=_[_.length-1]:Ae<=_[0];for(const Ae of Object.keys(C)){const Be=Number(Ae);z.push({active:Ne(Be),label:C[Ae],style:{[ne]:`${ee(Be)}%`}})}}return z});function j(z,C){const _=ee(z),{value:ne}=D;return{[ne]:`${_}%`,zIndex:C===k.value?1:0}}function J(z){return e.showTooltip||p.value===z||k.value===z&&S.value}function N(z){return S.value?!(k.value===z&&M.value===z):!0}function U(z){var C;~z&&(k.value=z,(C=l.get(z))===null||C===void 0||C.focus())}function q(){d.forEach((z,C)=>{J(C)&&z.syncPosition()})}function oe(z){const{"onUpdate:value":C,onUpdateValue:_}=e,{nTriggerFormInput:ne,nTriggerFormChange:xe}=u;_&&de(_,z),C&&de(C,z),h.value=z,ne(),xe()}function pe(z){const{range:C}=e;if(C){if(Array.isArray(z)){const{value:_}=b;z.join()!==_.join()&&oe(z)}}else Array.isArray(z)||b.value[0]!==z&&oe(z)}function ie(z,C){if(e.range){const _=b.value.slice();_.splice(C,1,z),pe(_)}else pe(z)}function fe(z,C,_){const ne=_!==void 0;_||(_=z-C>0?1:-1);const xe=$.value||[],{step:ze}=e;if(ze==="mark"){const Be=re(z,xe.concat(C),ne?_:void 0);return Be?Be.value:C}if(ze<=0)return C;const{value:Ne}=m;let Ae;if(ne){const Be=Number((C/ze).toFixed(Ne)),qe=Math.floor(Be),st=Be>qe?qe:qe-1,Je=Be<qe?qe:qe+1;Ae=re(C,[Number((st*ze).toFixed(Ne)),Number((Je*ze).toFixed(Ne)),...xe],_)}else{const Be=we(z);Ae=re(z,[...xe,Be])}return Ae?G(Ae.value):C}function G(z){return Math.min(e.max,Math.max(e.min,z))}function ee(z){const{max:C,min:_}=e;return(z-_)/(C-_)*100}function ve(z){const{max:C,min:_}=e;return _+(C-_)*z}function we(z){const{step:C,min:_}=e;if(Number(C)<=0||C==="mark")return z;const ne=Math.round((z-_)/C)*C+_;return Number(ne.toFixed(m.value))}function re(z,C=$.value,_){if(!(C!=null&&C.length))return null;let ne=null,xe=-1;for(;++xe<C.length;){const ze=C[xe]-z,Ne=Math.abs(ze);(_===void 0||ze*_>0)&&(ne===null||Ne<ne.distance)&&(ne={index:xe,distance:Ne,value:C[xe]})}return ne}function Se(z){const C=a.value;if(!C)return;const _=Ts(z)?z.touches[0]:z,ne=C.getBoundingClientRect();let xe;return e.vertical?xe=(ne.bottom-_.clientY)/ne.height:xe=(_.clientX-ne.left)/ne.width,e.reverse&&(xe=1-xe),ve(xe)}function Ce(z){if(g.value||!e.keyboard)return;const{vertical:C,reverse:_}=e;switch(z.key){case"ArrowUp":z.preventDefault(),le(C&&_?-1:1);break;case"ArrowRight":z.preventDefault(),le(!C&&_?-1:1);break;case"ArrowDown":z.preventDefault(),le(C&&_?1:-1);break;case"ArrowLeft":z.preventDefault(),le(!C&&_?1:-1);break}}function le(z){const C=k.value;if(C===-1)return;const{step:_}=e,ne=b.value[C],xe=Number(_)<=0||_==="mark"?ne:ne+_*z;ie(fe(xe,ne,z>0?1:-1),C)}function Me(z){var C,_;if(g.value||!Ts(z)&&z.button!==S0)return;const ne=Se(z);if(ne===void 0)return;const xe=b.value.slice(),ze=e.range?(_=(C=re(ne,xe))===null||C===void 0?void 0:C.index)!==null&&_!==void 0?_:-1:0;ze!==-1&&(z.preventDefault(),U(ze),Re(),ie(fe(ne,b.value[ze]),ze))}function Re(){S.value||(S.value=!0,e.onDragstart&&de(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Ie),Pe("mousemove",document,Ie))}function Le(){S.value&&(S.value=!1,e.onDragend&&de(e.onDragend),$e("touchend",document,De),$e("mouseup",document,De),$e("touchmove",document,Ie),$e("mousemove",document,Ie))}function Ie(z){const{value:C}=k;if(!S.value||C===-1){Le();return}const _=Se(z);_!==void 0&&ie(fe(_,b.value[C]),C)}function De(){Le()}function Ue(z){k.value=z,g.value||(p.value=z)}function ke(z){k.value===z&&(k.value=-1,Le()),p.value===z&&(p.value=-1)}function Y(z){p.value=z}function A(z){p.value===z&&(p.value=-1)}o.watch(k,(z,C)=>void o.nextTick(()=>M.value=C)),o.watch(y,()=>{if(e.marks){if(E.value)return;E.value=!0,o.nextTick(()=>{E.value=!1})}o.nextTick(q)}),o.onBeforeUnmount(()=>{Le()});const te=o.computed(()=>{const{self:{markFontSize:z,railColor:C,railColorHover:_,fillColor:ne,fillColorHover:xe,handleColor:ze,opacityDisabled:Ne,dotColor:Ae,dotColorModal:Be,handleBoxShadow:qe,handleBoxShadowHover:st,handleBoxShadowActive:Je,handleBoxShadowFocus:it,dotBorder:v,dotBoxShadow:L,railHeight:Z,railWidthVertical:ae,handleSize:se,dotHeight:ce,dotWidth:ue,dotBorderRadius:ge,fontSize:Te,dotBorderActive:ut,dotColorPopover:Yt},common:{cubicBezierEaseInOut:wn}}=i.value;return{"--n-bezier":wn,"--n-dot-border":v,"--n-dot-border-active":ut,"--n-dot-border-radius":ge,"--n-dot-box-shadow":L,"--n-dot-color":Ae,"--n-dot-color-modal":Be,"--n-dot-color-popover":Yt,"--n-dot-height":ce,"--n-dot-width":ue,"--n-fill-color":ne,"--n-fill-color-hover":xe,"--n-font-size":Te,"--n-handle-box-shadow":qe,"--n-handle-box-shadow-active":Je,"--n-handle-box-shadow-focus":it,"--n-handle-box-shadow-hover":st,"--n-handle-color":ze,"--n-handle-size":se,"--n-opacity-disabled":Ne,"--n-rail-color":C,"--n-rail-color-hover":_,"--n-rail-height":Z,"--n-rail-width-vertical":ae,"--n-mark-font-size":z}}),B=r?et("slider",void 0,te,e):void 0,F=o.computed(()=>{const{self:{fontSize:z,indicatorColor:C,indicatorBoxShadow:_,indicatorTextColor:ne,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":z,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":_,"--n-indicator-color":C,"--n-indicator-text-color":ne}}),X=r?et("slider-indicator",void 0,F,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:y,mergedDisabled:g,mergedPlacement:H,isMounted:Rn(),adjustedTo:rt(e),dotTransitionDisabled:E,markInfos:V,isShowTooltip:J,shouldKeepTooltipTransition:N,handleRailRef:a,setHandleRefs:s,setFollowerRefs:c,fillStyle:O,getHandleStyle:j,activeIndex:k,arrifiedValues:b,followerEnabledIndexSet:f,handleRailMouseDown:Me,handleHandleFocus:Ue,handleHandleBlur:ke,handleHandleMouseEnter:Y,handleHandleMouseLeave:A,handleRailKeyDown:Ce,indicatorCssVars:r?void 0:F,indicatorThemeClass:X==null?void 0:X.themeClass,indicatorOnRender:X==null?void 0:X.onRender,cssVars:r?void 0:te,themeClass:B==null?void 0:B.themeClass,onRender:B==null?void 0:B.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),o.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},o.h("div",{class:`${t}-slider-rail`},o.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?o.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>o.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,o.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},mt(this.$slots.thumb,()=>[o.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&o.h(Eo,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===rt.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),o.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?o.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>o.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),z0=w("switch",`
|
|
1629
|
+
`),lo()]),Bd(w("slider",[w("slider-dot","background-color: var(--n-dot-color-modal);")])),Ed(w("slider",[w("slider-dot","background-color: var(--n-dot-color-popover);")]))]),S0=0,$0=Object.assign(Object.assign({},ye.props),{to:rt.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),k0=o.defineComponent({name:"Slider",props:$0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:r}=Ke(e),i=ye("Slider","-slider",C0,t0,e,t),a=o.ref(null),[l,s]=Ps(),[d,c]=Ps(),f=o.ref(new Set),u=cn(e),{mergedDisabledRef:g}=u,m=o.computed(()=>{const{step:z}=e;if(Number(z)<=0||z==="mark")return 0;const C=z.toString();let _=0;return C.includes(".")&&(_=C.length-C.indexOf(".")-1),_}),h=o.ref(e.defaultValue),x=o.toRef(e,"value"),y=vt(x,h),b=o.computed(()=>{const{value:z}=y;return(e.range?z:[z]).map(G)}),P=o.computed(()=>b.value.length>2),H=o.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=o.computed(()=>{const{marks:z}=e;return z?Object.keys(z).map(Number.parseFloat):null}),k=o.ref(-1),M=o.ref(-1),p=o.ref(-1),S=o.ref(!1),E=o.ref(!1),D=o.computed(()=>{const{vertical:z,reverse:C}=e;return z?C?"top":"bottom":C?"right":"left"}),O=o.computed(()=>{if(P.value)return;const z=b.value,C=ee(e.range?Math.min(...z):e.min),_=ee(e.range?Math.max(...z):z[0]),{value:ne}=D;return e.vertical?{[ne]:`${C}%`,height:`${_-C}%`}:{[ne]:`${C}%`,width:`${_-C}%`}}),V=o.computed(()=>{const z=[],{marks:C}=e;if(C){const _=b.value.slice();_.sort((Ae,Be)=>Ae-Be);const{value:ne}=D,{value:xe}=P,{range:ze}=e,Ne=xe?()=>!1:Ae=>ze?Ae>=_[0]&&Ae<=_[_.length-1]:Ae<=_[0];for(const Ae of Object.keys(C)){const Be=Number(Ae);z.push({active:Ne(Be),label:C[Ae],style:{[ne]:`${ee(Be)}%`}})}}return z});function j(z,C){const _=ee(z),{value:ne}=D;return{[ne]:`${_}%`,zIndex:C===k.value?1:0}}function J(z){return e.showTooltip||p.value===z||k.value===z&&S.value}function N(z){return S.value?!(k.value===z&&M.value===z):!0}function U(z){var C;~z&&(k.value=z,(C=l.get(z))===null||C===void 0||C.focus())}function q(){d.forEach((z,C)=>{J(C)&&z.syncPosition()})}function oe(z){const{"onUpdate:value":C,onUpdateValue:_}=e,{nTriggerFormInput:ne,nTriggerFormChange:xe}=u;_&&de(_,z),C&&de(C,z),h.value=z,ne(),xe()}function pe(z){const{range:C}=e;if(C){if(Array.isArray(z)){const{value:_}=b;z.join()!==_.join()&&oe(z)}}else Array.isArray(z)||b.value[0]!==z&&oe(z)}function ie(z,C){if(e.range){const _=b.value.slice();_.splice(C,1,z),pe(_)}else pe(z)}function fe(z,C,_){const ne=_!==void 0;_||(_=z-C>0?1:-1);const xe=$.value||[],{step:ze}=e;if(ze==="mark"){const Be=re(z,xe.concat(C),ne?_:void 0);return Be?Be.value:C}if(ze<=0)return C;const{value:Ne}=m;let Ae;if(ne){const Be=Number((C/ze).toFixed(Ne)),qe=Math.floor(Be),st=Be>qe?qe:qe-1,Je=Be<qe?qe:qe+1;Ae=re(C,[Number((st*ze).toFixed(Ne)),Number((Je*ze).toFixed(Ne)),...xe],_)}else{const Be=we(z);Ae=re(z,[...xe,Be])}return Ae?G(Ae.value):C}function G(z){return Math.min(e.max,Math.max(e.min,z))}function ee(z){const{max:C,min:_}=e;return(z-_)/(C-_)*100}function ve(z){const{max:C,min:_}=e;return _+(C-_)*z}function we(z){const{step:C,min:_}=e;if(Number(C)<=0||C==="mark")return z;const ne=Math.round((z-_)/C)*C+_;return Number(ne.toFixed(m.value))}function re(z,C=$.value,_){if(!(C!=null&&C.length))return null;let ne=null,xe=-1;for(;++xe<C.length;){const ze=C[xe]-z,Ne=Math.abs(ze);(_===void 0||ze*_>0)&&(ne===null||Ne<ne.distance)&&(ne={index:xe,distance:Ne,value:C[xe]})}return ne}function Se(z){const C=a.value;if(!C)return;const _=Ts(z)?z.touches[0]:z,ne=C.getBoundingClientRect();let xe;return e.vertical?xe=(ne.bottom-_.clientY)/ne.height:xe=(_.clientX-ne.left)/ne.width,e.reverse&&(xe=1-xe),ve(xe)}function Ce(z){if(g.value||!e.keyboard)return;const{vertical:C,reverse:_}=e;switch(z.key){case"ArrowUp":z.preventDefault(),le(C&&_?-1:1);break;case"ArrowRight":z.preventDefault(),le(!C&&_?-1:1);break;case"ArrowDown":z.preventDefault(),le(C&&_?1:-1);break;case"ArrowLeft":z.preventDefault(),le(!C&&_?1:-1);break}}function le(z){const C=k.value;if(C===-1)return;const{step:_}=e,ne=b.value[C],xe=Number(_)<=0||_==="mark"?ne:ne+_*z;ie(fe(xe,ne,z>0?1:-1),C)}function Me(z){var C,_;if(g.value||!Ts(z)&&z.button!==S0)return;const ne=Se(z);if(ne===void 0)return;const xe=b.value.slice(),ze=e.range?(_=(C=re(ne,xe))===null||C===void 0?void 0:C.index)!==null&&_!==void 0?_:-1:0;ze!==-1&&(z.preventDefault(),U(ze),Re(),ie(fe(ne,b.value[ze]),ze))}function Re(){S.value||(S.value=!0,e.onDragstart&&de(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Ie),Pe("mousemove",document,Ie))}function Le(){S.value&&(S.value=!1,e.onDragend&&de(e.onDragend),$e("touchend",document,De),$e("mouseup",document,De),$e("touchmove",document,Ie),$e("mousemove",document,Ie))}function Ie(z){const{value:C}=k;if(!S.value||C===-1){Le();return}const _=Se(z);_!==void 0&&ie(fe(_,b.value[C]),C)}function De(){Le()}function Ue(z){k.value=z,g.value||(p.value=z)}function ke(z){k.value===z&&(k.value=-1,Le()),p.value===z&&(p.value=-1)}function Y(z){p.value=z}function A(z){p.value===z&&(p.value=-1)}o.watch(k,(z,C)=>void o.nextTick(()=>M.value=C)),o.watch(y,()=>{if(e.marks){if(E.value)return;E.value=!0,o.nextTick(()=>{E.value=!1})}o.nextTick(q)}),o.onBeforeUnmount(()=>{Le()});const te=o.computed(()=>{const{self:{markFontSize:z,railColor:C,railColorHover:_,fillColor:ne,fillColorHover:xe,handleColor:ze,opacityDisabled:Ne,dotColor:Ae,dotColorModal:Be,handleBoxShadow:qe,handleBoxShadowHover:st,handleBoxShadowActive:Je,handleBoxShadowFocus:it,dotBorder:v,dotBoxShadow:L,railHeight:Z,railWidthVertical:ae,handleSize:se,dotHeight:ce,dotWidth:ue,dotBorderRadius:ge,fontSize:Te,dotBorderActive:ut,dotColorPopover:Yt},common:{cubicBezierEaseInOut:wn}}=i.value;return{"--n-bezier":wn,"--n-dot-border":v,"--n-dot-border-active":ut,"--n-dot-border-radius":ge,"--n-dot-box-shadow":L,"--n-dot-color":Ae,"--n-dot-color-modal":Be,"--n-dot-color-popover":Yt,"--n-dot-height":ce,"--n-dot-width":ue,"--n-fill-color":ne,"--n-fill-color-hover":xe,"--n-font-size":Te,"--n-handle-box-shadow":qe,"--n-handle-box-shadow-active":Je,"--n-handle-box-shadow-focus":it,"--n-handle-box-shadow-hover":st,"--n-handle-color":ze,"--n-handle-size":se,"--n-opacity-disabled":Ne,"--n-rail-color":C,"--n-rail-color-hover":_,"--n-rail-height":Z,"--n-rail-width-vertical":ae,"--n-mark-font-size":z}}),B=r?et("slider",void 0,te,e):void 0,F=o.computed(()=>{const{self:{fontSize:z,indicatorColor:C,indicatorBoxShadow:_,indicatorTextColor:ne,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":z,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":_,"--n-indicator-color":C,"--n-indicator-text-color":ne}}),X=r?et("slider-indicator",void 0,F,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:y,mergedDisabled:g,mergedPlacement:H,isMounted:_n(),adjustedTo:rt(e),dotTransitionDisabled:E,markInfos:V,isShowTooltip:J,shouldKeepTooltipTransition:N,handleRailRef:a,setHandleRefs:s,setFollowerRefs:c,fillStyle:O,getHandleStyle:j,activeIndex:k,arrifiedValues:b,followerEnabledIndexSet:f,handleRailMouseDown:Me,handleHandleFocus:Ue,handleHandleBlur:ke,handleHandleMouseEnter:Y,handleHandleMouseLeave:A,handleRailKeyDown:Ce,indicatorCssVars:r?void 0:F,indicatorThemeClass:X==null?void 0:X.themeClass,indicatorOnRender:X==null?void 0:X.onRender,cssVars:r?void 0:te,themeClass:B==null?void 0:B.themeClass,onRender:B==null?void 0:B.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),o.h("div",{class:[`${t}-slider`,n,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},o.h("div",{class:`${t}-slider-rail`},o.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?o.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>o.h("div",{key:i.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,o.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const l=this.isShowTooltip(a);return o.h(Po,null,{default:()=>[o.h(Ro,null,{default:()=>o.h("div",{ref:this.setHandleRefs(a),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":i,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(i,a),onFocus:()=>{this.handleHandleFocus(a)},onBlur:()=>{this.handleHandleBlur(a)},onMouseenter:()=>{this.handleHandleMouseEnter(a)},onMouseleave:()=>{this.handleHandleMouseLeave(a)}},mt(this.$slots.thumb,()=>[o.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&o.h(Eo,{ref:this.setFollowerRefs(a),show:l,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===rt.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>o.h(o.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(a),onEnter:()=>{this.followerEnabledIndexSet.add(a)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(a)}},{default:()=>{var s;return l?((s=this.indicatorOnRender)===null||s===void 0||s.call(this),o.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(i):i)):null}})})]})})),this.marks?o.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>o.h("div",{key:i.label,class:`${t}-slider-mark`,style:i.style},i.label))):null))}}),z0=w("switch",`
|
|
1630
1630
|
height: var(--n-height);
|
|
1631
1631
|
min-width: var(--n-width);
|
|
1632
1632
|
vertical-align: middle;
|
|
@@ -1657,7 +1657,7 @@ ${t}
|
|
|
1657
1657
|
font-size: calc(var(--n-button-width) - 4px);
|
|
1658
1658
|
color: var(--n-loading-color);
|
|
1659
1659
|
transition: color .3s var(--n-bezier);
|
|
1660
|
-
`,[
|
|
1660
|
+
`,[Fn({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),T("checked, unchecked",`
|
|
1661
1661
|
transition: color .3s var(--n-bezier);
|
|
1662
1662
|
color: var(--n-text-color);
|
|
1663
1663
|
box-sizing: border-box;
|
|
@@ -1702,7 +1702,7 @@ ${t}
|
|
|
1702
1702
|
justify-content: center;
|
|
1703
1703
|
align-items: center;
|
|
1704
1704
|
line-height: 1;
|
|
1705
|
-
`,[
|
|
1705
|
+
`,[Fn()]),T("button",`
|
|
1706
1706
|
align-items: center;
|
|
1707
1707
|
top: var(--n-offset);
|
|
1708
1708
|
left: var(--n-offset);
|
|
@@ -1727,7 +1727,7 @@ ${t}
|
|
|
1727
1727
|
`)]),W("disabled",[T("rail",`
|
|
1728
1728
|
cursor: not-allowed;
|
|
1729
1729
|
opacity: .5;
|
|
1730
|
-
`)])]),T0=Object.assign(Object.assign({},ye.props),{size:{type:String,default:"medium"},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},onChange:[Function,Array]});let
|
|
1730
|
+
`)])]),T0=Object.assign(Object.assign({},ye.props),{size:{type:String,default:"medium"},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},onChange:[Function,Array]});let fo;const Rs=o.defineComponent({name:"Switch",props:T0,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.onChange&&tt("switch","`on-change` is deprecated, please use `on-update:value` instead.")}),fo===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?fo=CSS.supports("width","max(1px)"):fo=!1:fo=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Ke(e),r=ye("Switch","-switch",z0,r0,e,t),i=cn(e),{mergedSizeRef:a,mergedDisabledRef:l}=i,s=o.ref(e.defaultValue),d=o.toRef(e,"value"),c=vt(d,s),f=o.computed(()=>c.value===e.checkedValue),u=o.ref(!1),g=o.ref(!1),m=o.computed(()=>{const{railStyle:S}=e;if(S)return S({focused:g.value,checked:f.value})});function h(S){const{"onUpdate:value":E,onChange:D,onUpdateValue:O}=e,{nTriggerFormInput:V,nTriggerFormChange:j}=i;E&&de(E,S),O&&de(O,S),D&&de(D,S),s.value=S,V(),j()}function x(){const{nTriggerFormFocus:S}=i;S()}function y(){const{nTriggerFormBlur:S}=i;S()}function b(){e.loading||l.value||(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue))}function P(){g.value=!0,x()}function H(){g.value=!1,y(),u.value=!1}function $(S){e.loading||l.value||S.key===" "&&(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue),u.value=!1)}function k(S){e.loading||l.value||S.key===" "&&(S.preventDefault(),u.value=!0)}const M=o.computed(()=>{const{value:S}=a,{self:{opacityDisabled:E,railColor:D,railColorActive:O,buttonBoxShadow:V,buttonColor:j,boxShadowFocus:J,loadingColor:N,textColor:U,iconColor:q,[Q("buttonHeight",S)]:oe,[Q("buttonWidth",S)]:pe,[Q("buttonWidthPressed",S)]:ie,[Q("railHeight",S)]:fe,[Q("railWidth",S)]:G,[Q("railBorderRadius",S)]:ee,[Q("buttonBorderRadius",S)]:ve},common:{cubicBezierEaseInOut:we}}=r.value;let re,Se,Ce;return fo?(re=`calc((${fe} - ${oe}) / 2)`,Se=`max(${fe}, ${oe})`,Ce=`max(${G}, calc(${G} + ${oe} - ${fe}))`):(re=tn((ot(fe)-ot(oe))/2),Se=tn(Math.max(ot(fe),ot(oe))),Ce=ot(fe)>ot(oe)?G:tn(ot(G)+ot(oe)-ot(fe))),{"--n-bezier":we,"--n-button-border-radius":ve,"--n-button-box-shadow":V,"--n-button-color":j,"--n-button-width":pe,"--n-button-width-pressed":ie,"--n-button-height":oe,"--n-height":Se,"--n-offset":re,"--n-opacity-disabled":E,"--n-rail-border-radius":ee,"--n-rail-color":D,"--n-rail-color-active":O,"--n-rail-height":fe,"--n-rail-width":G,"--n-width":Ce,"--n-box-shadow-focus":J,"--n-loading-color":N,"--n-text-color":U,"--n-icon-color":q}}),p=n?et("switch",o.computed(()=>a.value[0]),M,e):void 0;return{handleClick:b,handleBlur:H,handleFocus:P,handleKeyup:$,handleKeydown:k,mergedRailStyle:m,pressed:u,mergedClsPrefix:t,mergedValue:c,checked:f,mergedDisabled:l,cssVars:n?void 0:M,themeClass:p==null?void 0:p.themeClass,onRender:p==null?void 0:p.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:r,onRender:i,$slots:a}=this;i==null||i();const{checked:l,unchecked:s,icon:d,"checked-icon":c,"unchecked-icon":f}=a,u=!(Pn(d)&&Pn(c)&&Pn(f));return o.h("div",{role:"switch","aria-checked":n,class:[`${e}-switch`,this.themeClass,u&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${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},o.h("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:r},Oe(l,g=>Oe(s,m=>g||m?o.h("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},o.h("div",{class:`${e}-switch__rail-placeholder`},o.h("div",{class:`${e}-switch__button-placeholder`}),g),o.h("div",{class:`${e}-switch__rail-placeholder`},o.h("div",{class:`${e}-switch__button-placeholder`}),m)):null)),o.h("div",{class:`${e}-switch__button`},Oe(d,g=>Oe(c,m=>Oe(f,h=>o.h(Yo,null,{default:()=>this.loading?o.h(Zo,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(m||g)?o.h("div",{class:`${e}-switch__button-icon`,key:m?"checked-icon":"icon"},m||g):!this.checked&&(h||g)?o.h("div",{class:`${e}-switch__button-icon`,key:h?"unchecked-icon":"icon"},h||g):null})))),Oe(l,g=>g&&o.h("div",{key:"checked",class:`${e}-switch__checked`},g)),Oe(s,g=>g&&o.h("div",{key:"unchecked",class:`${e}-switch__unchecked`},g)))))}}),$i="n-tabs",_s={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},Bs=o.defineComponent({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:_s,setup(e){process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.label!==void 0&&tt("tab-pane","`label` is deprecated, please use `tab` instead.")});const t=o.inject($i,null);return t||vr("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return o.h("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),P0=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},ld(_s,["displayDirective"])),ki=o.defineComponent({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:P0,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:i,tabStyleRef:a,addTabStyleRef:l,tabClassRef:s,addTabClassRef:d,tabChangeIdRef:c,onBeforeLeaveRef:f,triggerRef:u,handleAdd:g,activateTab:m,handleClose:h}=o.inject($i);return{trigger:u,mergedClosable:o.computed(()=>{if(e.internalAddable)return!1;const{closable:x}=e;return x===void 0?i.value:x}),style:a,addStyle:l,tabClass:s,addTabClass:d,clsPrefix:t,value:n,type:r,handleClose(x){x.stopPropagation(),!e.disabled&&h(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){g();return}const{name:x}=e,y=++c.id;if(x!==n.value){const{value:b}=f;b?Promise.resolve(b(e.name,n.value)).then(P=>{P&&c.id===y&&m(x)}):m(x)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:a,value:l,mergedClosable:s,trigger:d,$slots:{default:c}}=this,f=i??a;return o.h("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?o.h("div",{class:`${t}-tabs-tab-pad`}):null,o.h("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},o.mergeProps({class:[`${t}-tabs-tab`,l===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,s&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:d==="click"?this.activateTab:void 0,onMouseenter:d==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),o.h("span",{class:`${t}-tabs-tab__label`},e?o.h(o.Fragment,null,o.h("div",{class:`${t}-tabs-tab__height-placeholder`}," "),o.h(bt,{clsPrefix:t},{default:()=>o.h(Gl,null)})):c?c():typeof f=="object"?f:ln(f??n)),s&&this.type==="card"?o.h(ai,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),R0=w("tabs",`
|
|
1731
1731
|
box-sizing: border-box;
|
|
1732
1732
|
width: 100%;
|
|
1733
1733
|
display: flex;
|
|
@@ -2065,4 +2065,4 @@ ${t}
|
|
|
2065
2065
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2066
2066
|
`),w("tabs-pad",`
|
|
2067
2067
|
border-top: 1px solid var(--n-tab-border-color);
|
|
2068
|
-
`)])])])]),_0=Object.assign(Object.assign({},ye.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),B0=o.defineComponent({name:"Tabs",props:_0,setup(e,{slots:t}){var n,r,i,a;process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.labelSize!==void 0&&tt("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&tt("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&tt("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Ke(e),d=ye("Tabs","-tabs",R0,l0,e,l),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(null),x=o.ref(!0),y=o.ref(!0),b=To(e,["labelSize","size"]),P=To(e,["activeName","value"]),H=o.ref((r=(n=P.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(a=(i=zn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=vt(P,H),k={id:0},M=o.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});o.watch($,()=>{k.id=0,O(),V()});function p(){var B;const{value:F}=$;return F===null?null:(B=c.value)===null||B===void 0?void 0:B.querySelector(`[data-name="${F}"]`)}function S(B){if(e.type==="card")return;const{value:F}=f;if(!F)return;const X=F.style.opacity==="0";if(B){const z=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:_}=e;if(B.dataset.disabled==="true"?F.classList.add(z):F.classList.remove(z),["top","bottom"].includes(_)){if(D(["top","maxHeight","height"]),typeof C=="number"&&B.offsetWidth>=C){const ne=Math.floor((B.offsetWidth-C)/2)+B.offsetLeft;F.style.left=`${ne}px`,F.style.maxWidth=`${C}px`}else F.style.left=`${B.offsetLeft}px`,F.style.maxWidth=`${B.offsetWidth}px`;F.style.width="8192px",X&&(F.style.transition="none"),F.offsetWidth,X&&(F.style.transition="",F.style.opacity="1")}else{if(D(["left","maxWidth","width"]),typeof C=="number"&&B.offsetHeight>=C){const ne=Math.floor((B.offsetHeight-C)/2)+B.offsetTop;F.style.top=`${ne}px`,F.style.maxHeight=`${C}px`}else F.style.top=`${B.offsetTop}px`,F.style.maxHeight=`${B.offsetHeight}px`;F.style.height="8192px",X&&(F.style.transition="none"),F.offsetHeight,X&&(F.style.transition="",F.style.opacity="1")}}}function E(){if(e.type==="card")return;const{value:B}=f;B&&(B.style.opacity="0")}function D(B){const{value:F}=f;if(F)for(const X of B)F.style[X]=""}function O(){if(e.type==="card")return;const B=p();B?S(B):E()}function V(){var B;const F=(B=m.value)===null||B===void 0?void 0:B.$el;if(!F)return;const X=p();if(!X)return;const{scrollLeft:z,offsetWidth:C}=F,{offsetLeft:_,offsetWidth:ne}=X;z>_?F.scrollTo({top:0,left:_,behavior:"smooth"}):_+ne>z+C&&F.scrollTo({top:0,left:_+ne-C,behavior:"smooth"})}const j=o.ref(null);let J=0,N=null;function U(B){const F=j.value;if(F){J=B.getBoundingClientRect().height;const X=`${J}px`,z=()=>{F.style.height=X,F.style.maxHeight=X};N?(z(),N(),N=null):N=z}}function q(B){const F=j.value;if(F){const X=B.getBoundingClientRect().height,z=()=>{document.body.offsetHeight,F.style.maxHeight=`${X}px`,F.style.height=`${Math.max(J,X)}px`};N?(N(),N=null,z()):N=z}}function oe(){const B=j.value;if(B){B.style.maxHeight="",B.style.height="";const{paneWrapperStyle:F}=e;if(typeof F=="string")B.style.cssText=F;else if(F){const{maxHeight:X,height:z}=F;X!==void 0&&(B.style.maxHeight=X),z!==void 0&&(B.style.height=z)}}}const pe={value:[]},ie=o.ref("next");function fe(B){const F=$.value;let X="next";for(const z of pe.value){if(z===F)break;if(z===B){X="prev";break}}ie.value=X,G(B)}function G(B){const{onActiveNameChange:F,onUpdateValue:X,"onUpdate:value":z}=e;F&&de(F,B),X&&de(X,B),z&&de(z,B),H.value=B}function ee(B){const{onClose:F}=e;F&&de(F,B)}function ve(){const{value:B}=f;if(!B)return;const F="transition-disabled";B.classList.add(F),O(),B.classList.remove(F)}const we=o.ref(null);function re({transitionDisabled:B}){const F=c.value;if(!F)return;B&&F.classList.add("transition-disabled");const X=p();X&&we.value&&(we.value.style.width=`${X.offsetWidth}px`,we.value.style.height=`${X.offsetHeight}px`,we.value.style.transform=`translateX(${X.offsetLeft-ot(getComputedStyle(F).paddingLeft)}px)`,B&&we.value.offsetWidth),B&&F.classList.remove("transition-disabled")}o.watch([$],()=>{e.type==="segment"&&o.nextTick(()=>{re({transitionDisabled:!1})})}),o.onMounted(()=>{e.type==="segment"&&re({transitionDisabled:!0})});let Se=0;function Ce(B){var F;if(B.contentRect.width===0&&B.contentRect.height===0||Se===B.contentRect.width)return;Se=B.contentRect.width;const{type:X}=e;if((X==="line"||X==="bar")&&ve(),X!=="segment"){const{placement:z}=e;De((z==="top"||z==="bottom"?(F=m.value)===null||F===void 0?void 0:F.$el:h.value)||null)}}const le=ri(Ce,64);o.watch([()=>e.justifyContent,()=>e.size],()=>{o.nextTick(()=>{const{type:B}=e;(B==="line"||B==="bar")&&ve()})});const Me=o.ref(!1);function Re(B){var F;const{target:X,contentRect:{width:z}}=B,C=X.parentElement.offsetWidth;if(!Me.value)C<z&&(Me.value=!0);else{const{value:_}=g;if(!_)return;C-z>_.$el.offsetWidth&&(Me.value=!1)}De(((F=m.value)===null||F===void 0?void 0:F.$el)||null)}const Le=ri(Re,64);function Ie(){const{onAdd:B}=e;B&&B(),o.nextTick(()=>{const F=p(),{value:X}=m;!F||!X||X.scrollTo({left:F.offsetLeft,top:0,behavior:"smooth"})})}function De(B){if(!B)return;const{placement:F}=e;if(F==="top"||F==="bottom"){const{scrollLeft:X,scrollWidth:z,offsetWidth:C}=B;x.value=X<=0,y.value=X+C>=z}else{const{scrollTop:X,scrollHeight:z,offsetHeight:C}=B;x.value=X<=0,y.value=X+C>=z}}const Ue=ri(B=>{De(B.target)},64);o.provide($i,{triggerRef:o.toRef(e,"trigger"),tabStyleRef:o.toRef(e,"tabStyle"),tabClassRef:o.toRef(e,"tabClass"),addTabStyleRef:o.toRef(e,"addTabStyle"),addTabClassRef:o.toRef(e,"addTabClass"),paneClassRef:o.toRef(e,"paneClass"),paneStyleRef:o.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:o.toRef(e,"type"),closableRef:o.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:o.toRef(e,"onBeforeLeave"),activateTab:fe,handleClose:ee,handleAdd:Ie}),ra(()=>{O(),V()}),o.watchEffect(()=>{const{value:B}=u;if(!B)return;const{value:F}=l,X=`${F}-tabs-nav-scroll-wrapper--shadow-start`,z=`${F}-tabs-nav-scroll-wrapper--shadow-end`;x.value?B.classList.remove(X):B.classList.add(X),y.value?B.classList.remove(z):B.classList.add(z)});const ke={syncBarPosition:()=>{O()}},Y=()=>{re({transitionDisabled:!0})},A=o.computed(()=>{const{value:B}=b,{type:F}=e,X={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[F],z=`${B}${X}`,{self:{barColor:C,closeIconColor:_,closeIconColorHover:ne,closeIconColorPressed:xe,tabColor:ze,tabBorderColor:Ne,paneTextColor:Ae,tabFontWeight:Be,tabBorderRadius:qe,tabFontWeightActive:st,colorSegment:Je,fontWeightStrong:it,tabColorSegment:v,closeSize:L,closeIconSize:Z,closeColorHover:ae,closeColorPressed:se,closeBorderRadius:ce,[Q("panePadding",B)]:ue,[Q("tabPadding",z)]:ge,[Q("tabPaddingVertical",z)]:Te,[Q("tabGap",z)]:ut,[Q("tabGap",`${z}Vertical`)]:Yt,[Q("tabTextColor",F)]:wn,[Q("tabTextColorActive",F)]:Zt,[Q("tabTextColorHover",F)]:Jt,[Q("tabTextColorDisabled",F)]:ho,[Q("tabFontSize",B)]:po},common:{cubicBezierEaseInOut:Dn}}=d.value;return{"--n-bezier":Dn,"--n-color-segment":Je,"--n-bar-color":C,"--n-tab-font-size":po,"--n-tab-text-color":wn,"--n-tab-text-color-active":Zt,"--n-tab-text-color-disabled":ho,"--n-tab-text-color-hover":Jt,"--n-pane-text-color":Ae,"--n-tab-border-color":Ne,"--n-tab-border-radius":qe,"--n-close-size":L,"--n-close-icon-size":Z,"--n-close-color-hover":ae,"--n-close-color-pressed":se,"--n-close-border-radius":ce,"--n-close-icon-color":_,"--n-close-icon-color-hover":ne,"--n-close-icon-color-pressed":xe,"--n-tab-color":ze,"--n-tab-font-weight":Be,"--n-tab-font-weight-active":st,"--n-tab-padding":ge,"--n-tab-padding-vertical":Te,"--n-tab-gap":ut,"--n-tab-gap-vertical":Yt,"--n-pane-padding-left":dt(ue,"left"),"--n-pane-padding-right":dt(ue,"right"),"--n-pane-padding-top":dt(ue,"top"),"--n-pane-padding-bottom":dt(ue,"bottom"),"--n-font-weight-strong":it,"--n-tab-color-segment":v}}),te=s?et("tabs",o.computed(()=>`${b.value[0]}${e.type[0]}`),A,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:we,tabsPaneWrapperRef:j,tabsElRef:c,barElRef:f,addTabInstRef:g,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Me,tabWrapperStyle:M,handleNavResize:le,mergedSize:b,handleScroll:Ue,handleTabsResize:Le,cssVars:s?void 0:A,themeClass:te==null?void 0:te.themeClass,animationDirection:ie,renderNameListRef:pe,yScrollElRef:h,handleSegmentResize:Y,onAnimationBeforeLeave:U,onAnimationEnter:q,onAnimationAfterEnter:oe,onRender:te==null?void 0:te.onRender},ke)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:g}}=this;s==null||s();const m=f?zn(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?zn(f()).filter(k=>k.type.__TAB__===!0):[],x=!h.length,y=t==="card",b=t==="segment",P=!y&&!b&&this.justifyContent;l.value=[];const H=()=>{const k=o.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),x?m.map((M,p)=>(l.value.push(M.props.name),zi(o.h(ki,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:p!==0&&(!P||P==="center"||P==="start"||P==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,p)=>(l.value.push(M.props.name),zi(p!==0&&!P?Is(M):M))),!r&&i&&y?Ms(i,(x?m.length:h.length)!==0):null,P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return o.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},y&&i?o.h(jt,{onResize:this.handleTabsResize},{default:()=>k}):k,y?o.h("div",{class:`${e}-tabs-pad`}):null,y?null:o.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=b?"top":n;return o.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,P&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},o.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Oe(u,k=>k&&o.h("div",{class:`${e}-tabs-nav__prefix`},k)),b?o.h(jt,{onResize:this.handleSegmentResize},{default:()=>o.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},o.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},o.h("div",{class:`${e}-tabs-wrapper`},o.h("div",{class:`${e}-tabs-tab`}))),x?m.map((k,M)=>(l.value.push(k.props.name),o.h(ki,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(l.value.push(k.props.name),M===0?k:Is(k))))}):o.h(jt,{onResize:this.handleNavResize},{default:()=>o.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?o.h(Oc,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:H}):o.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},H()))}),r&&i&&y?Ms(i,!0):null,Oe(g,k=>k&&o.h("div",{class:`${e}-tabs-nav__suffix`},k))),x&&(this.animated&&($==="top"||$==="bottom")?o.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Es(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Es(m,this.mergedValue,this.renderedNames)))}});function Es(e,t,n,r,i,a,l){const s=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,g=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||g("show")||g("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!g("if");s.push(h?o.withDirectives(d,[[o.vShow,m]]):d)}}),l?o.h(o.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function Ms(e,t){return o.h(ki,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Is(e){const t=o.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function zi(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function Os(e,t,n){try{const{data:r}=await en().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){go(r)}}async function E0(e,t,n,r){try{if(t)await As(t,n,r);else return await Os(e,n,r)}catch(i){go(i)}}async function As(e,t,n){try{await en().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){go(r)}}function Fs(e){const t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value??null:console.debug("Warning: Detected input element with no name.")}),t}const M0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},I0=o.defineComponent({__name:"InputConditional",props:o.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:o.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=o.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const l=o.useModel(e,"value");(!l.value||!(a in l.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,l.value);const s=o.ref(g()),d=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=Fs(x.inputs),h[x.value][a]=x.value;return h}),c=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=x.inputs;return h}),f=o.computed(()=>c.value[s.value]),u=o.computed({get(){return s.value==="true"},set(h){s.value=String(h)}});function g(){return l.value&&l.value[a]}function m(h){let x={...d.value[s.value]};if(h){const y={};f.value.forEach(b=>{y[b.name]=h[b.name]}),x={...x,...h}}r("update:value",x)}return o.watch(()=>l.value,()=>{s.value=g()}),o.watch(()=>s.value,()=>{m()}),(h,x)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[i.value.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:u.value,"onUpdate:value":x[0]||(x[0]=y=>u.value=y)},null,8,["value"])):(o.openBlock(),o.createBlock(o.unref(rr),{key:1,value:s.value,"onUpdate:value":x[1]||(x[1]=y=>s.value=y),options:i.value.data},null,8,["value","options"])),f.value?(o.openBlock(),o.createElementBlock("div",M0,[o.createVNode(Ti,{"dataset-id":h.datasetId,inputs:f.value,values:l.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):o.createCommentVNode("",!0)],64))}}),O0={key:0,class:"mb-1"},A0={key:1,class:"text-red-600 mb-1"},F0=o.createElementVNode("span",null,"Please select a dataset.",-1),D0=100,V0=o.defineComponent({__name:"InputData",props:o.mergeModels({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value"),i=o.ref(!1),a=o.ref(null);async function l(d){i.value=!0;try{const c=t.extension?`q=extension-eq&qv=${t.extension}`:"",f=d?`q=name-contains&qv=${d}`:"",{data:u}=await en().GET(`/api/datasets?limit=${D0}&${c}&${f}`);if(u&&u.length>0){const g=u.map(m=>({label:m.name,value:{id:m.id,name:m.name}}));g.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&g.unshift({label:"-- Clear Selection --",value:null}),n.value=g}}catch(c){console.log(c)}finally{i.value=!1}}function s(){r.value=a.value,a.value=null}return l(),(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[r.value?(o.openBlock(),o.createElementBlock("div",O0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Vi))]),_:1}),o.createElementVNode("span",null,"Selected: "+o.toDisplayString(r.value.name),1)])):d.optional?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",A0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi))]),_:1}),F0])),o.createVNode(o.unref(rr),{value:a.value,"onUpdate:value":[c[0]||(c[0]=f=>a.value=f),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}});function H0(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const l in a)(r&&["int","float"].includes(a[l])||n&&a[l]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const L0=o.defineComponent({__name:"InputDataColumn",props:o.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await en().GET(`/api/datasets/${t.datasetId}`),s=H0(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column input disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),o.watch(()=>r.value,()=>a()),(l,s)=>(o.openBlock(),o.createBlock(o.unref(rr),{value:r.value,"onUpdate:value":s[0]||(s[0]=d=>r.value=d),options:n.value},null,8,["value","options"]))}});function fo(e){return String(e).toLowerCase()==="true"}const N0={class:"overflow-auto select-none"},W0={class:"font-bold pb-1"},j0={key:0,class:"text-xs pb-1"},U0={key:5},Ds=.01,Ti=o.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(a());function a(){const s={...n.values};return n.inputs.forEach(d=>{s[d.name]===void 0&&(s[d.name]=null)}),s}function l(){r("update:values",i.value)}return o.watch(()=>n.values,()=>{i.value=a()}),(s,d)=>(o.openBlock(),o.createElementBlock("div",N0,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.inputs,(c,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"pb-2"},[o.createElementVNode("div",W0,o.toDisplayString(c.label||c.name),1),c.help?(o.openBlock(),o.createElementBlock("div",j0,o.toDisplayString(c.help),1)):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>l())]},null,8,["value","onUpdate:value"])):c.type==="color"?(o.openBlock(),o.createBlock(o.unref(Dv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[1]||(d[1]=u=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(o.openBlock(),o.createBlock(I0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[2]||(d[2]=u=>l())],"dataset-id":s.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(o.openBlock(),o.createBlock(V0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[3]||(d[3]=u=>l())],extension:c.extension,optional:o.unref(fo)(c.optional)},null,8,["value","onUpdate:value","extension","optional"])):c.type==="data_column"?(o.openBlock(),o.createBlock(L0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[4]||(d[4]=u=>l())],"dataset-id":s.datasetId,"is-auto":o.unref(fo)(c.is_auto),"is-text":o.unref(fo)(c.is_text),"is-number":o.unref(fo)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):c.type==="float"?(o.openBlock(),o.createElementBlock("div",U0,[c.min!==void 0&&c.max!==void 0?(o.openBlock(),o.createBlock(o.unref(k0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[5]||(d[5]=u=>l())],min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])):o.createCommentVNode("",!0),o.createVNode(o.unref(w0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[6]||(d[6]=u=>l())],size:"small",min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])])):c.type==="select"?(o.openBlock(),o.createBlock(o.unref(rr),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[7]||(d[7]=u=>l())],options:c.data},null,8,["value","onUpdate:value","options"])):c.type==="textarea"?(o.openBlock(),o.createBlock(o.unref(lo),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[8]||(d[8]=u=>l())],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(o.openBlock(),o.createBlock(o.unref(lo),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[9]||(d[9]=u=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}}),G0=o.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),K0={class:"border border-dotted border-green-600 rounded p-2"},q0={class:"flex text-green-600 my-1"},X0={class:"mx-1"},Y0=o.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=o.computed(()=>Fs(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),r("update:values-array",d)}function l(d){const c=[...n.valuesArray];c.splice(d,1),r("update:values-array",c)}function s(d,c){const f=[...n.valuesArray];f[d]={...c},r("update:values-array",f)}return(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(It),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ks))]),_:1}),G0]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.valuesArray,(f,u)=>(o.openBlock(),o.createElementBlock("div",{key:u,class:"my-2"},[o.createElementVNode("div",K0,[o.createVNode(Ti,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":g=>s(u,g)},null,8,["dataset-id","inputs","values","onUpdate:values"]),o.createElementVNode("div",q0,[o.createVNode(o.unref(It),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:d.valuesArray.length<=1,onClick:g=>l(u)},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Xs))]),_:1}),o.createElementVNode("span",X0,"Remove Track "+o.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}}),Z0=2e3,J0=o.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return o.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),Z0)}),(a,l)=>a.message?(o.openBlock(),o.createBlock(o.unref(ps),{key:0,type:a.messageType,class:"m-4"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.message),1)]),_:1},8,["type"])):o.createCommentVNode("",!0)}}),Q0={class:"text-xs"},ex=o.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1),tx=o.defineComponent({__name:"ApiStatus",setup(e){const t=o.ref("...");async function n(){try{const{data:r}=await en().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(o.openBlock(),o.createBlock(o.unref(Cs),{key:0,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Vi),{class:"text-green-600"})]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Q0,"Connected to Galaxy Version "+o.toDisplayString(t.value)+".",1)]),_:1})):(o.openBlock(),o.createBlock(o.unref(Cs),{key:1,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi),{class:"text-red-600"})]),_:1})]),default:o.withCtx(()=>[ex]),_:1}))}}),nx={class:"overflow-auto select-none bg-white z-10"},ox={class:"flex p-2"},rx={class:"flex-1 font-thin text-lg p-1 p-2"},ix=o.createElementVNode("span",null,"Charts",-1),ax={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},lx={class:"md:flex"},sx={class:"flex justify-center center-items"},dx={class:"m-2"},cx=["src"],ux={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},fx=[o.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),o.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],hx={class:"overflow-hidden break-words p-1"},px={class:"font-bold"},bx=["innerHTML"],gx={class:"px-4 pb-2"},mx=o.createElementVNode("div",{class:"font-bold"},"Title",-1),vx=o.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),xx=o.createElementVNode("span",{class:"mx-1"},"Tracks",-1),yx=o.createElementVNode("span",{class:"mx-1"},"Settings",-1),wx=o.defineComponent({__name:"SidePanel",props:{datasetId:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(""),a=o.ref("info"),l=o.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await As(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",a.value="success";else{const u=await Os(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",r("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Ii(u),a.value="error"}}function d(u){r("update:settings",u)}function c(u){r("update:tracks",u)}function f(u){r("update:visualization-title",u)}return(u,g)=>(o.openBlock(),o.createElementBlock("div",nx,[o.createElementVNode("div",ox,[o.createElementVNode("div",rx,[ix,o.createVNode(tx)]),o.createElementVNode("div",null,[o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:s},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Gs))]),_:1})]),_:1}),o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:g[0]||(g[0]=m=>r("toggle"))},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Us))]),_:1})]),_:1})])]),o.createVNode(J0,{message:i.value,"message-type":a.value,onTimeout:g[1]||(g[1]=m=>i.value=""),class:"m-4"},null,8,["message","message-type"]),o.createElementVNode("div",ax,[o.createElementVNode("div",lx,[o.createElementVNode("div",sx,[o.createElementVNode("div",dx,[n.logoUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,cx)):(o.openBlock(),o.createElementBlock("svg",ux,fx))])]),o.createElementVNode("div",hx,[o.createElementVNode("span",px,o.toDisplayString(u.html),1),o.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,bx)])])]),o.createElementVNode("div",gx,[mx,vx,o.createVNode(o.unref(lo),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),o.createVNode(o.unref(B0),{type:"line",animated:"",class:"px-4","tab-class":l.value?"!hidden":""},{default:o.withCtx(()=>[u.trackInputs.length>0?(o.openBlock(),o.createBlock(o.unref(Bs),{key:0,name:"tracks"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(qs))]),_:1}),xx]),default:o.withCtx(()=>[o.createVNode(Y0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):o.createCommentVNode("",!0),u.settingInputs.length>0?(o.openBlock(),o.createBlock(o.unref(Bs),{key:1,name:"settings"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ns))]),_:1}),yx]),default:o.withCtx(()=>[o.createVNode(Ti,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});async function Cx(e,t={}){const n=Pi(e.settings,t.settings),r=e.specs,i=kx(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function Sx(e,t){let n=t??e.value;return e.type==="float"?n=Number(n):e.type==="boolean"&&(n=fo(n)),n}function $x(e,t={}){var i,a,l;const n=t,r=(i=e.test_param)==null?void 0:i.name;if(!r)console.error(`Test parameter has no name: ${e.name}.`);else{const s=n[r]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===s&&(n[r]=s,(l=d.inputs)!=null&&l.length&&Pi(d.inputs,n))}return n}function Pi(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=$x(r,n[r.name]):n[r.name]=Sx(r,n[r.name])}),n}function kx(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=Pi(e,r)})),n}function zx(e){if(e===void 0){const l=document.getElementById("app");e=JSON.parse((l==null?void 0:l.getAttribute("data-incoming"))||"{}")}const t=(e==null?void 0:e.root)??"/",n=(e==null?void 0:e.visualization_config)??{},r=(e==null?void 0:e.visualization_id)??null,i=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:t,visualizationConfig:n,visualizationId:r,visualizationPlugin:i,visualizationTitle:a}}const Tx={key:1,class:"m-2"},Px=o.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),Rx={key:0},_x=o.defineComponent({__name:"GalaxyCharts",props:{credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}=zx(t.incoming),s=o.ref(!1),d=o.ref(""),c=o.ref(""),f=o.ref(""),u=o.ref(""),g=o.ref(!0),m=o.ref(""),h=o.ref(""),x=o.ref([]),y=o.ref({}),b=o.ref({}),P=o.ref([]),H=o.ref([]),$=o.ref(i),k=o.ref(l),M=Fi();M.setCredentials(t.credentials||"include"),M.setRoot(n||"/"),Cx(a,r).then(({plugin:U,settings:q,specs:oe,tracks:pe})=>{c.value=U.description||"",u.value=U.html||"",g.value=!1,m.value=U.logo||"",h.value=U.name||"",x.value=U.settings||[],y.value=q,b.value=oe||{},P.value=U.tracks||[],H.value=pe});const p=r.dataset_id||"";r.dataset_url?(d.value=r.dataset_url,console.debug(`GalaxyCharts: Evaluating dataset url: ${d.value}.`)):p?(d.value=Hs(p),console.debug(`GalaxyCharts: Built dataset url from dataset id: ${d.value}.`)):f.value="Visualization requires `dataset_id` or `dataset_url`.";const S=o.computed(()=>m.value&&`${n}${m.value}`),E=o.computed(()=>x.value.length===0&&P.value.length===0);async function D(){s.value=!s.value,await o.nextTick(),window.dispatchEvent(new Event("resize"))}function O(U){y.value={...U}}function V(U){H.value=[...U]}function j(U){$.value=U}function J(U){k.value=U}async function N(U){O({...y.value,...U});try{const q=await E0(h.value,i,l,{dataset_id:p,settings:y.value,tracks:H.value});q&&j(q)}catch(q){console.error(q)}}return(U,q)=>f.value?(o.openBlock(),o.createBlock(o.unref(ps),{key:0,title:"Visualization Error!",type:"error",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.value),1)]),_:1})):g.value?(o.openBlock(),o.createElementBlock("div",Tx,[o.createElementVNode("span",null,[o.createVNode(o.unref(Ws),{class:"animate-spin size-4 inline mx-1"})]),Px])):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["grid h-screen",{"grid-cols-[70%_30%]":!s.value&&!E.value}])},[o.renderSlot(U.$slots,"default",{datasetId:o.unref(p),datasetUrl:d.value,root:o.unref(n),settings:y.value,specs:b.value,tracks:H.value,save:N}),s.value&&!E.value?(o.openBlock(),o.createElementBlock("div",Rx,[o.createVNode(o.unref(g0),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2",top:0,right:0,onClick:D},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(js))]),_:1})]),_:1})])):E.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(wx,{key:1,"dataset-id":o.unref(p),description:c.value,html:u.value,"logo-url":S.value,name:h.value,"setting-inputs":x.value,"setting-values":y.value,"track-inputs":P.value,"track-values":H.value,"visualization-id":$.value,"visualization-title":k.value,"onUpdate:settings":O,"onUpdate:tracks":V,"onUpdate:visualizationId":j,"onUpdate:visualizationTitle":J,onToggle:D},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))}});We.GalaxyApi=en,We.GalaxyCharts=_x,We.useColumnsStore=Ls,Object.defineProperty(We,Symbol.toStringTag,{value:"Module"})});
|
|
2068
|
+
`)])])])]),_0=Object.assign(Object.assign({},ye.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),B0=o.defineComponent({name:"Tabs",props:_0,setup(e,{slots:t}){var n,r,i,a;process.env.NODE_ENV!=="production"&&o.watchEffect(()=>{e.labelSize!==void 0&&tt("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&tt("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&tt("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:l,inlineThemeDisabled:s}=Ke(e),d=ye("Tabs","-tabs",R0,l0,e,l),c=o.ref(null),f=o.ref(null),u=o.ref(null),g=o.ref(null),m=o.ref(null),h=o.ref(null),x=o.ref(!0),y=o.ref(!0),b=To(e,["labelSize","size"]),P=To(e,["activeName","value"]),H=o.ref((r=(n=P.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(a=(i=Tn(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=vt(P,H),k={id:0},M=o.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});o.watch($,()=>{k.id=0,O(),V()});function p(){var B;const{value:F}=$;return F===null?null:(B=c.value)===null||B===void 0?void 0:B.querySelector(`[data-name="${F}"]`)}function S(B){if(e.type==="card")return;const{value:F}=f;if(!F)return;const X=F.style.opacity==="0";if(B){const z=`${l.value}-tabs-bar--disabled`,{barWidth:C,placement:_}=e;if(B.dataset.disabled==="true"?F.classList.add(z):F.classList.remove(z),["top","bottom"].includes(_)){if(D(["top","maxHeight","height"]),typeof C=="number"&&B.offsetWidth>=C){const ne=Math.floor((B.offsetWidth-C)/2)+B.offsetLeft;F.style.left=`${ne}px`,F.style.maxWidth=`${C}px`}else F.style.left=`${B.offsetLeft}px`,F.style.maxWidth=`${B.offsetWidth}px`;F.style.width="8192px",X&&(F.style.transition="none"),F.offsetWidth,X&&(F.style.transition="",F.style.opacity="1")}else{if(D(["left","maxWidth","width"]),typeof C=="number"&&B.offsetHeight>=C){const ne=Math.floor((B.offsetHeight-C)/2)+B.offsetTop;F.style.top=`${ne}px`,F.style.maxHeight=`${C}px`}else F.style.top=`${B.offsetTop}px`,F.style.maxHeight=`${B.offsetHeight}px`;F.style.height="8192px",X&&(F.style.transition="none"),F.offsetHeight,X&&(F.style.transition="",F.style.opacity="1")}}}function E(){if(e.type==="card")return;const{value:B}=f;B&&(B.style.opacity="0")}function D(B){const{value:F}=f;if(F)for(const X of B)F.style[X]=""}function O(){if(e.type==="card")return;const B=p();B?S(B):E()}function V(){var B;const F=(B=m.value)===null||B===void 0?void 0:B.$el;if(!F)return;const X=p();if(!X)return;const{scrollLeft:z,offsetWidth:C}=F,{offsetLeft:_,offsetWidth:ne}=X;z>_?F.scrollTo({top:0,left:_,behavior:"smooth"}):_+ne>z+C&&F.scrollTo({top:0,left:_+ne-C,behavior:"smooth"})}const j=o.ref(null);let J=0,N=null;function U(B){const F=j.value;if(F){J=B.getBoundingClientRect().height;const X=`${J}px`,z=()=>{F.style.height=X,F.style.maxHeight=X};N?(z(),N(),N=null):N=z}}function q(B){const F=j.value;if(F){const X=B.getBoundingClientRect().height,z=()=>{document.body.offsetHeight,F.style.maxHeight=`${X}px`,F.style.height=`${Math.max(J,X)}px`};N?(N(),N=null,z()):N=z}}function oe(){const B=j.value;if(B){B.style.maxHeight="",B.style.height="";const{paneWrapperStyle:F}=e;if(typeof F=="string")B.style.cssText=F;else if(F){const{maxHeight:X,height:z}=F;X!==void 0&&(B.style.maxHeight=X),z!==void 0&&(B.style.height=z)}}}const pe={value:[]},ie=o.ref("next");function fe(B){const F=$.value;let X="next";for(const z of pe.value){if(z===F)break;if(z===B){X="prev";break}}ie.value=X,G(B)}function G(B){const{onActiveNameChange:F,onUpdateValue:X,"onUpdate:value":z}=e;F&&de(F,B),X&&de(X,B),z&&de(z,B),H.value=B}function ee(B){const{onClose:F}=e;F&&de(F,B)}function ve(){const{value:B}=f;if(!B)return;const F="transition-disabled";B.classList.add(F),O(),B.classList.remove(F)}const we=o.ref(null);function re({transitionDisabled:B}){const F=c.value;if(!F)return;B&&F.classList.add("transition-disabled");const X=p();X&&we.value&&(we.value.style.width=`${X.offsetWidth}px`,we.value.style.height=`${X.offsetHeight}px`,we.value.style.transform=`translateX(${X.offsetLeft-ot(getComputedStyle(F).paddingLeft)}px)`,B&&we.value.offsetWidth),B&&F.classList.remove("transition-disabled")}o.watch([$],()=>{e.type==="segment"&&o.nextTick(()=>{re({transitionDisabled:!1})})}),o.onMounted(()=>{e.type==="segment"&&re({transitionDisabled:!0})});let Se=0;function Ce(B){var F;if(B.contentRect.width===0&&B.contentRect.height===0||Se===B.contentRect.width)return;Se=B.contentRect.width;const{type:X}=e;if((X==="line"||X==="bar")&&ve(),X!=="segment"){const{placement:z}=e;De((z==="top"||z==="bottom"?(F=m.value)===null||F===void 0?void 0:F.$el:h.value)||null)}}const le=ri(Ce,64);o.watch([()=>e.justifyContent,()=>e.size],()=>{o.nextTick(()=>{const{type:B}=e;(B==="line"||B==="bar")&&ve()})});const Me=o.ref(!1);function Re(B){var F;const{target:X,contentRect:{width:z}}=B,C=X.parentElement.offsetWidth;if(!Me.value)C<z&&(Me.value=!0);else{const{value:_}=g;if(!_)return;C-z>_.$el.offsetWidth&&(Me.value=!1)}De(((F=m.value)===null||F===void 0?void 0:F.$el)||null)}const Le=ri(Re,64);function Ie(){const{onAdd:B}=e;B&&B(),o.nextTick(()=>{const F=p(),{value:X}=m;!F||!X||X.scrollTo({left:F.offsetLeft,top:0,behavior:"smooth"})})}function De(B){if(!B)return;const{placement:F}=e;if(F==="top"||F==="bottom"){const{scrollLeft:X,scrollWidth:z,offsetWidth:C}=B;x.value=X<=0,y.value=X+C>=z}else{const{scrollTop:X,scrollHeight:z,offsetHeight:C}=B;x.value=X<=0,y.value=X+C>=z}}const Ue=ri(B=>{De(B.target)},64);o.provide($i,{triggerRef:o.toRef(e,"trigger"),tabStyleRef:o.toRef(e,"tabStyle"),tabClassRef:o.toRef(e,"tabClass"),addTabStyleRef:o.toRef(e,"addTabStyle"),addTabClassRef:o.toRef(e,"addTabClass"),paneClassRef:o.toRef(e,"paneClass"),paneStyleRef:o.toRef(e,"paneStyle"),mergedClsPrefixRef:l,typeRef:o.toRef(e,"type"),closableRef:o.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:o.toRef(e,"onBeforeLeave"),activateTab:fe,handleClose:ee,handleAdd:Ie}),ra(()=>{O(),V()}),o.watchEffect(()=>{const{value:B}=u;if(!B)return;const{value:F}=l,X=`${F}-tabs-nav-scroll-wrapper--shadow-start`,z=`${F}-tabs-nav-scroll-wrapper--shadow-end`;x.value?B.classList.remove(X):B.classList.add(X),y.value?B.classList.remove(z):B.classList.add(z)});const ke={syncBarPosition:()=>{O()}},Y=()=>{re({transitionDisabled:!0})},A=o.computed(()=>{const{value:B}=b,{type:F}=e,X={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[F],z=`${B}${X}`,{self:{barColor:C,closeIconColor:_,closeIconColorHover:ne,closeIconColorPressed:xe,tabColor:ze,tabBorderColor:Ne,paneTextColor:Ae,tabFontWeight:Be,tabBorderRadius:qe,tabFontWeightActive:st,colorSegment:Je,fontWeightStrong:it,tabColorSegment:v,closeSize:L,closeIconSize:Z,closeColorHover:ae,closeColorPressed:se,closeBorderRadius:ce,[Q("panePadding",B)]:ue,[Q("tabPadding",z)]:ge,[Q("tabPaddingVertical",z)]:Te,[Q("tabGap",z)]:ut,[Q("tabGap",`${z}Vertical`)]:Yt,[Q("tabTextColor",F)]:wn,[Q("tabTextColorActive",F)]:Zt,[Q("tabTextColorHover",F)]:Jt,[Q("tabTextColorDisabled",F)]:po,[Q("tabFontSize",B)]:bo},common:{cubicBezierEaseInOut:Vn}}=d.value;return{"--n-bezier":Vn,"--n-color-segment":Je,"--n-bar-color":C,"--n-tab-font-size":bo,"--n-tab-text-color":wn,"--n-tab-text-color-active":Zt,"--n-tab-text-color-disabled":po,"--n-tab-text-color-hover":Jt,"--n-pane-text-color":Ae,"--n-tab-border-color":Ne,"--n-tab-border-radius":qe,"--n-close-size":L,"--n-close-icon-size":Z,"--n-close-color-hover":ae,"--n-close-color-pressed":se,"--n-close-border-radius":ce,"--n-close-icon-color":_,"--n-close-icon-color-hover":ne,"--n-close-icon-color-pressed":xe,"--n-tab-color":ze,"--n-tab-font-weight":Be,"--n-tab-font-weight-active":st,"--n-tab-padding":ge,"--n-tab-padding-vertical":Te,"--n-tab-gap":ut,"--n-tab-gap-vertical":Yt,"--n-pane-padding-left":dt(ue,"left"),"--n-pane-padding-right":dt(ue,"right"),"--n-pane-padding-top":dt(ue,"top"),"--n-pane-padding-bottom":dt(ue,"bottom"),"--n-font-weight-strong":it,"--n-tab-color-segment":v}}),te=s?et("tabs",o.computed(()=>`${b.value[0]}${e.type[0]}`),A,e):void 0;return Object.assign({mergedClsPrefix:l,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:we,tabsPaneWrapperRef:j,tabsElRef:c,barElRef:f,addTabInstRef:g,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Me,tabWrapperStyle:M,handleNavResize:le,mergedSize:b,handleScroll:Ue,handleTabsResize:Le,cssVars:s?void 0:A,themeClass:te==null?void 0:te.themeClass,animationDirection:ie,renderNameListRef:pe,yScrollElRef:h,handleSegmentResize:Y,onAnimationBeforeLeave:U,onAnimationEnter:q,onAnimationAfterEnter:oe,onRender:te==null?void 0:te.onRender},ke)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:l,onRender:s,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:g}}=this;s==null||s();const m=f?Tn(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?Tn(f()).filter(k=>k.type.__TAB__===!0):[],x=!h.length,y=t==="card",b=t==="segment",P=!y&&!b&&this.justifyContent;l.value=[];const H=()=>{const k=o.h("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),x?m.map((M,p)=>(l.value.push(M.props.name),zi(o.h(ki,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:p!==0&&(!P||P==="center"||P==="start"||P==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,p)=>(l.value.push(M.props.name),zi(p!==0&&!P?Is(M):M))),!r&&i&&y?Ms(i,(x?m.length:h.length)!==0):null,P?null:o.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return o.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},y&&i?o.h(jt,{onResize:this.handleTabsResize},{default:()=>k}):k,y?o.h("div",{class:`${e}-tabs-pad`}):null,y?null:o.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=b?"top":n;return o.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,P&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},o.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Oe(u,k=>k&&o.h("div",{class:`${e}-tabs-nav__prefix`},k)),b?o.h(jt,{onResize:this.handleSegmentResize},{default:()=>o.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},o.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},o.h("div",{class:`${e}-tabs-wrapper`},o.h("div",{class:`${e}-tabs-tab`}))),x?m.map((k,M)=>(l.value.push(k.props.name),o.h(ki,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(l.value.push(k.props.name),M===0?k:Is(k))))}):o.h(jt,{onResize:this.handleNavResize},{default:()=>o.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?o.h(Oc,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:H}):o.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},H()))}),r&&i&&y?Ms(i,!0):null,Oe(g,k=>k&&o.h("div",{class:`${e}-tabs-nav__suffix`},k))),x&&(this.animated&&($==="top"||$==="bottom")?o.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Es(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Es(m,this.mergedValue,this.renderedNames)))}});function Es(e,t,n,r,i,a,l){const s=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,g=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||g("show")||g("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!g("if");s.push(h?o.withDirectives(d,[[o.vShow,m]]):d)}}),l?o.h(o.TransitionGroup,{name:`${l}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:a},{default:()=>s}):s}function Ms(e,t){return o.h(ki,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Is(e){const t=o.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function zi(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function Os(e,t,n){try{const{data:r}=await en().POST("/api/visualizations",{type:e,title:t,config:n});return r.id}catch(r){$n(r)}}async function E0(e,t,n,r){try{if(t)await As(t,n,r);else return await Os(e,n,r)}catch(i){$n(i)}}async function As(e,t,n){try{await en().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(r){$n(r)}}function Fs(e){const t={};return e&&e.forEach(n=>{n.name?t[n.name]=n.value??null:console.debug("Warning: Detected input element with no name.")}),t}const M0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},I0=o.defineComponent({__name:"InputConditional",props:o.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:o.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,r=t;if(!n.input.test_param)throw`The conditional '${n.input.name}' is missing a test parameter.`;if(!n.input.cases||n.input.cases.length===0)throw`The conditional '${n.input.name}' is missing a cases.`;const i=o.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const l=o.useModel(e,"value");(!l.value||!(a in l.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,l.value);const s=o.ref(g()),d=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=Fs(x.inputs),h[x.value][a]=x.value;return h}),c=o.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const x of n.input.cases)h[x.value]=x.inputs;return h}),f=o.computed(()=>c.value[s.value]),u=o.computed({get(){return s.value==="true"},set(h){s.value=String(h)}});function g(){return l.value&&l.value[a]}function m(h){let x={...d.value[s.value]};if(h){const y={};f.value.forEach(b=>{y[b.name]=h[b.name]}),x={...x,...h}}r("update:value",x)}return o.watch(()=>l.value,()=>{s.value=g()}),o.watch(()=>s.value,()=>{m()}),(h,x)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[i.value.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:u.value,"onUpdate:value":x[0]||(x[0]=y=>u.value=y)},null,8,["value"])):(o.openBlock(),o.createBlock(o.unref(rr),{key:1,value:s.value,"onUpdate:value":x[1]||(x[1]=y=>s.value=y),options:i.value.data},null,8,["value","options"])),f.value?(o.openBlock(),o.createElementBlock("div",M0,[o.createVNode(Ti,{"dataset-id":h.datasetId,inputs:f.value,values:l.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):o.createCommentVNode("",!0)],64))}}),O0={key:0,class:"mb-1"},A0={key:1,class:"text-red-600 mb-1"},F0=o.createElementVNode("span",null,"Please select a dataset.",-1),D0=100,V0=o.defineComponent({__name:"InputData",props:o.mergeModels({extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value"),i=o.ref(!1),a=o.ref(null);async function l(d){i.value=!0;try{const c=t.extension?`q=extension-eq&qv=${t.extension}`:"",f=d?`q=name-contains&qv=${d}`:"",{data:u}=await en().GET(`/api/datasets?limit=${D0}&${c}&${f}`);if(u&&u.length>0){const g=u.map(m=>({label:m.name,value:{id:m.id,name:m.name}}));g.push({label:"...filter for more",value:null,disabled:!0}),t.optional&&g.unshift({label:"-- Clear Selection --",value:null}),n.value=g}}catch(c){console.log(c)}finally{i.value=!1}}function s(){r.value=a.value,a.value=null}return l(),(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[r.value?(o.openBlock(),o.createElementBlock("div",O0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Vi))]),_:1}),o.createElementVNode("span",null,"Selected: "+o.toDisplayString(r.value.name),1)])):d.optional?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",A0,[o.createVNode(o.unref(yt),{class:"size-3 mr-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi))]),_:1}),F0])),o.createVNode(o.unref(rr),{value:a.value,"onUpdate:value":[c[0]||(c[0]=f=>a.value=f),s],filterable:"",placeholder:"Select a Dataset",loading:i.value,options:n.value,onSearch:l},null,8,["value","loading","options"])],64))}});function H0(e,t,n,r){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const l in a)(r&&["int","float"].includes(a[l])||n&&a[l]==="str"||!r&&!n)&&i.push({label:"Column: "+(parseInt(l)+1),value:l});return i}const L0=o.defineComponent({__name:"InputDataColumn",props:o.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=o.ref([]),r=o.useModel(e,"value");async function i(){if(t.datasetId)try{const{data:l}=await en().GET(`/api/datasets/${t.datasetId}`),s=H0(l,t.isAuto,t.isText,t.isNumber);n.value=s,a()}catch(l){console.log(l)}else console.log("Data column input disabled, since `datasetId` is unavailable.")}function a(){n.value.length>0&&r.value===null&&(r.value=n.value[0].value)}return i(),o.watch(()=>r.value,()=>a()),(l,s)=>(o.openBlock(),o.createBlock(o.unref(rr),{value:r.value,"onUpdate:value":s[0]||(s[0]=d=>r.value=d),options:n.value},null,8,["value","options"]))}});function ho(e){return String(e).toLowerCase()==="true"}const N0={class:"overflow-auto select-none"},W0={class:"font-bold pb-1"},j0={key:0,class:"text-xs pb-1"},U0={key:5},Ds=.01,Ti=o.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(a());function a(){const s={...n.values};return n.inputs.forEach(d=>{s[d.name]===void 0&&(s[d.name]=null)}),s}function l(){r("update:values",i.value)}return o.watch(()=>n.values,()=>{i.value=a()}),(s,d)=>(o.openBlock(),o.createElementBlock("div",N0,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.inputs,(c,f)=>(o.openBlock(),o.createElementBlock("div",{key:f,class:"pb-2"},[o.createElementVNode("div",W0,o.toDisplayString(c.label||c.name),1),c.help?(o.openBlock(),o.createElementBlock("div",j0,o.toDisplayString(c.help),1)):o.createCommentVNode("",!0),o.createElementVNode("div",null,[c.type==="boolean"?(o.openBlock(),o.createBlock(o.unref(Rs),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>l())]},null,8,["value","onUpdate:value"])):c.type==="color"?(o.openBlock(),o.createBlock(o.unref(Dv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[1]||(d[1]=u=>l())],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(o.openBlock(),o.createBlock(I0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[2]||(d[2]=u=>l())],"dataset-id":s.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(o.openBlock(),o.createBlock(V0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[3]||(d[3]=u=>l())],extension:c.extension,optional:o.unref(ho)(c.optional)},null,8,["value","onUpdate:value","extension","optional"])):c.type==="data_column"?(o.openBlock(),o.createBlock(L0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[4]||(d[4]=u=>l())],"dataset-id":s.datasetId,"is-auto":o.unref(ho)(c.is_auto),"is-text":o.unref(ho)(c.is_text),"is-number":o.unref(ho)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):c.type==="float"?(o.openBlock(),o.createElementBlock("div",U0,[c.min!==void 0&&c.max!==void 0?(o.openBlock(),o.createBlock(o.unref(k0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[5]||(d[5]=u=>l())],min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])):o.createCommentVNode("",!0),o.createVNode(o.unref(w0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[6]||(d[6]=u=>l())],size:"small",min:Number(c.min),max:Number(c.max),step:Ds},null,8,["value","onUpdate:value","min","max"])])):c.type==="select"?(o.openBlock(),o.createBlock(o.unref(rr),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[7]||(d[7]=u=>l())],options:c.data},null,8,["value","onUpdate:value","options"])):c.type==="textarea"?(o.openBlock(),o.createBlock(o.unref(so),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[8]||(d[8]=u=>l())],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(o.openBlock(),o.createBlock(o.unref(so),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[9]||(d[9]=u=>l())]},null,8,["value","onUpdate:value"]))])]))),128))]))}}),G0=o.createElementVNode("span",{class:"mx-1"},"Add New Track",-1),K0={class:"border border-dotted border-green-600 rounded p-2"},q0={class:"flex text-green-600 my-1"},X0={class:"mx-1"},Y0=o.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,r=t,i=o.computed(()=>Fs(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),r("update:values-array",d)}function l(d){const c=[...n.valuesArray];c.splice(d,1),r("update:values-array",c)}function s(d,c){const f=[...n.valuesArray];f[d]={...c},r("update:values-array",f)}return(d,c)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(It),{size:"tiny",type:"primary",class:"mb-2",onClick:a},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ks))]),_:1}),G0]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.valuesArray,(f,u)=>(o.openBlock(),o.createElementBlock("div",{key:u,class:"my-2"},[o.createElementVNode("div",K0,[o.createVNode(Ti,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":g=>s(u,g)},null,8,["dataset-id","inputs","values","onUpdate:values"]),o.createElementVNode("div",q0,[o.createVNode(o.unref(It),{class:"text-green-600 w-full",size:"tiny",round:"",disabled:d.valuesArray.length<=1,onClick:g=>l(u)},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Xs))]),_:1}),o.createElementVNode("span",X0,"Remove Track "+o.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])])]))),128))],64))}}),Z0=2e3,J0=o.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,r=t;let i=null;return o.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>r("timeout"),Z0)}),(a,l)=>a.message?(o.openBlock(),o.createBlock(o.unref(ps),{key:0,type:a.messageType,class:"m-4"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.message),1)]),_:1},8,["type"])):o.createCommentVNode("",!0)}}),Q0={class:"text-xs"},ex=o.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1),tx=o.defineComponent({__name:"ApiStatus",setup(e){const t=o.ref("...");async function n(){try{const{data:r}=await en().GET("/api/version");t.value=r.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(r,i)=>t.value?(o.openBlock(),o.createBlock(o.unref(Cs),{key:0,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Vi),{class:"text-green-600"})]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("span",Q0,"Connected to Galaxy Version "+o.toDisplayString(t.value)+".",1)]),_:1})):(o.openBlock(),o.createBlock(o.unref(Cs),{key:1,class:"mx-1",trigger:"hover"},{trigger:o.withCtx(()=>[o.createVNode(o.unref(yt),{class:"mx-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(Hi),{class:"text-red-600"})]),_:1})]),default:o.withCtx(()=>[ex]),_:1}))}}),nx={class:"overflow-auto select-none bg-white z-10"},ox={class:"flex p-2"},rx={class:"flex-1 font-thin text-lg p-1 p-2"},ix=o.createElementVNode("span",null,"Charts",-1),ax={class:"m-4 mt-0 p-2 bg-sky-50 text-sky-900 rounded"},lx={class:"md:flex"},sx={class:"flex justify-center center-items"},dx={class:"m-2"},cx=["src"],ux={key:1,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"},fx=[o.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),o.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)],hx={class:"overflow-hidden break-words p-1"},px={class:"font-bold"},bx=["innerHTML"],gx={class:"px-4 pb-2"},mx=o.createElementVNode("div",{class:"font-bold"},"Title",-1),vx=o.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1),xx=o.createElementVNode("span",{class:"mx-1"},"Tracks",-1),yx=o.createElementVNode("span",{class:"mx-1"},"Settings",-1),wx=o.defineComponent({__name:"SidePanel",props:{datasetId:{},description:{},logoUrl:{},html:{},name:{},settingInputs:{},settingValues:{},trackInputs:{},trackValues:{},visualizationId:{},visualizationTitle:{}},emits:["update:tracks","update:settings","update:visualization-id","update:visualization-title","toggle"],setup(e,{emit:t}){const n=e,r=t,i=o.ref(""),a=o.ref("info"),l=o.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function s(){try{if(n.visualizationId)await As(n.visualizationId,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues}),i.value="Successfully saved.",a.value="success";else{const u=await Os(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",r("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Ii(u),a.value="error"}}function d(u){r("update:settings",u)}function c(u){r("update:tracks",u)}function f(u){r("update:visualization-title",u)}return(u,g)=>(o.openBlock(),o.createElementBlock("div",nx,[o.createElementVNode("div",ox,[o.createElementVNode("div",rx,[ix,o.createVNode(tx)]),o.createElementVNode("div",null,[o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:s},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Gs))]),_:1})]),_:1}),o.createVNode(o.unref(It),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-1",onClick:g[0]||(g[0]=m=>r("toggle"))},{icon:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Us))]),_:1})]),_:1})])]),o.createVNode(J0,{message:i.value,"message-type":a.value,onTimeout:g[1]||(g[1]=m=>i.value=""),class:"m-4"},null,8,["message","message-type"]),o.createElementVNode("div",ax,[o.createElementVNode("div",lx,[o.createElementVNode("div",sx,[o.createElementVNode("div",dx,[n.logoUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,cx)):(o.openBlock(),o.createElementBlock("svg",ux,fx))])]),o.createElementVNode("div",hx,[o.createElementVNode("span",px,o.toDisplayString(u.html),1),o.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,bx)])])]),o.createElementVNode("div",gx,[mx,vx,o.createVNode(o.unref(so),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),o.createVNode(o.unref(B0),{type:"line",animated:"",class:"px-4","tab-class":l.value?"!hidden":""},{default:o.withCtx(()=>[u.trackInputs.length>0?(o.openBlock(),o.createBlock(o.unref(Bs),{key:0,name:"tracks"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(qs))]),_:1}),xx]),default:o.withCtx(()=>[o.createVNode(Y0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):o.createCommentVNode("",!0),u.settingInputs.length>0?(o.openBlock(),o.createBlock(o.unref(Bs),{key:1,name:"settings"},{tab:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ns))]),_:1}),yx]),default:o.withCtx(()=>[o.createVNode(Ti,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});async function Cx(e,t={}){const n=Pi(e.settings,t.settings),r=e.specs,i=kx(e.tracks,t.tracks);return{plugin:e,settings:n,specs:r,tracks:i}}function Sx(e,t){let n=t??e.value;return e.type==="float"?n=Number(n):e.type==="boolean"&&(n=ho(n)),n}function $x(e,t={}){var i,a,l;const n=t,r=(i=e.test_param)==null?void 0:i.name;if(!r)console.error(`Test parameter has no name: ${e.name}.`);else{const s=n[r]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===s&&(n[r]=s,(l=d.inputs)!=null&&l.length&&Pi(d.inputs,n))}return n}function Pi(e,t){const n=t||{};return e==null||e.forEach(r=>{r.type==="conditional"?n[r.name]=$x(r,n[r.name]):n[r.name]=Sx(r,n[r.name])}),n}function kx(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((r,i)=>{n[i]=Pi(e,r)})),n}function zx(e){if(e===void 0){const l=document.getElementById("app");e=JSON.parse((l==null?void 0:l.getAttribute("data-incoming"))||"{}")}const t=(e==null?void 0:e.root)??"/",n=(e==null?void 0:e.visualization_config)??{},r=(e==null?void 0:e.visualization_id)??null,i=(e==null?void 0:e.visualization_plugin)??{},a=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:t,visualizationConfig:n,visualizationId:r,visualizationPlugin:i,visualizationTitle:a}}const Tx={key:1,class:"m-2"},Px=o.createElementVNode("span",{class:"text-xs"},"Please wait...",-1),Rx={key:0},_x=o.defineComponent({__name:"GalaxyCharts",props:{credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:r,visualizationId:i,visualizationPlugin:a,visualizationTitle:l}=zx(t.incoming),s=o.ref(!1),d=o.ref(""),c=o.ref(""),f=o.ref(""),u=o.ref(""),g=o.ref(!0),m=o.ref(""),h=o.ref(""),x=o.ref([]),y=o.ref({}),b=o.ref({}),P=o.ref([]),H=o.ref([]),$=o.ref(i),k=o.ref(l),M=Fi();M.setCredentials(t.credentials||"include"),M.setRoot(n||"/"),Cx(a,r).then(({plugin:U,settings:q,specs:oe,tracks:pe})=>{c.value=U.description||"",u.value=U.html||"",g.value=!1,m.value=U.logo||"",h.value=U.name||"",x.value=U.settings||[],y.value=q,b.value=oe||{},P.value=U.tracks||[],H.value=pe});const p=r.dataset_id||"";r.dataset_url?(d.value=r.dataset_url,console.debug(`GalaxyCharts: Evaluating dataset url: ${d.value}.`)):p?(d.value=Hs(p),console.debug(`GalaxyCharts: Built dataset url from dataset id: ${d.value}.`)):f.value="Visualization requires `dataset_id` or `dataset_url`.";const S=o.computed(()=>m.value&&`${n}${m.value}`),E=o.computed(()=>x.value.length===0&&P.value.length===0);async function D(){s.value=!s.value,await o.nextTick(),window.dispatchEvent(new Event("resize"))}function O(U){y.value={...U}}function V(U){H.value=[...U]}function j(U){$.value=U}function J(U){k.value=U}async function N(U){O({...y.value,...U});try{const q=await E0(h.value,i,l,{dataset_id:p,settings:y.value,tracks:H.value});q&&j(q)}catch(q){console.error(q)}}return(U,q)=>f.value?(o.openBlock(),o.createBlock(o.unref(ps),{key:0,title:"Visualization Error!",type:"error",class:"m-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(f.value),1)]),_:1})):g.value?(o.openBlock(),o.createElementBlock("div",Tx,[o.createElementVNode("span",null,[o.createVNode(o.unref(Ws),{class:"animate-spin size-4 inline mx-1"})]),Px])):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["grid h-screen",{"grid-cols-[70%_30%]":!s.value&&!E.value}])},[o.renderSlot(U.$slots,"default",{datasetId:o.unref(p),datasetUrl:d.value,root:o.unref(n),settings:y.value,specs:b.value,tracks:H.value,save:N}),s.value&&!E.value?(o.openBlock(),o.createElementBlock("div",Rx,[o.createVNode(o.unref(g0),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2",top:0,right:0,onClick:D},{default:o.withCtx(()=>[o.createVNode(o.unref(yt),null,{default:o.withCtx(()=>[o.createVNode(o.unref(js))]),_:1})]),_:1})])):E.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(wx,{key:1,"dataset-id":o.unref(p),description:c.value,html:u.value,"logo-url":S.value,name:h.value,"setting-inputs":x.value,"setting-values":y.value,"track-inputs":P.value,"track-values":H.value,"visualization-id":$.value,"visualization-title":k.value,"onUpdate:settings":O,"onUpdate:tracks":V,"onUpdate:visualizationId":j,"onUpdate:visualizationTitle":J,onToggle:D},null,8,["dataset-id","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]))],2))}});We.GalaxyApi=en,We.GalaxyCharts=_x,We.useColumnsStore=Ls,Object.defineProperty(We,Symbol.toStringTag,{value:"Module"})});
|