galaxy-charts 0.0.74 → 0.0.75
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 +148 -147
- package/dist/galaxy-charts.umd.cjs +20 -20
- package/dist/types.d.ts +18 -17
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(je,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(je=typeof globalThis<"u"?globalThis:je||self,r(je.GalaxyCharts={},je.vue))})(this,function(je,r){"use strict";var Oi=document.createElement("style");Oi.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: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.m-2{margin:.5rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.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}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.contents{display:contents}.\\!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%}.w-screen{width:100vw}.min-w-14{min-width:3.5rem}.max-w-14{max-width:3.5rem}.max-w-full{max-width:100%}.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-\\[1fr_17rem\\]{grid-template-columns:1fr 17rem}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.\\!overflow-visible{overflow:visible!important}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.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}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.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)}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Oi);function Di(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(Di(e))}const Vi=r.ref("/"),Li=r.ref("include");function Hi(){function e(){return Li.value}function t(i){Li.value=i}function n(){return Vi.value}function o(i){Vi.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:o}}let Ni=Promise.resolve();async function so(e,t){const n=Hi(),o=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(o,{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 co(e){const t=Ni.then(()=>e());return Ni=t.then(()=>{},()=>{}),t}function tn(){function e(o){return co(()=>so(o,{method:"GET"}))}function t(o,i){return co(()=>so(o,{body:JSON.stringify(i),method:"POST"}))}function n(o,i){return co(()=>so(o,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}async function Xs(e,t){const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString();try{const{data:o}=await tn().GET(`/api/datasets/${e}?${n}`);if(o.data&&o.data.length>0){const i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const s of o.data)for(const l in s){const d=Number(l),c=s[l];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}else return[]}catch(o){$n(o)}}function Ys(e,t){return`${e}api/datasets/${t}/display`}const Wi=["auto"],
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Oi);function Di(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(Di(e))}const Vi=r.ref("/"),Li=r.ref("include");function Hi(){function e(){return Li.value}function t(i){Li.value=i}function n(){return Vi.value}function o(i){Vi.value=i}return{getCredentials:e,setCredentials:t,getRoot:n,setRoot:o}}let Ni=Promise.resolve();async function so(e,t){const n=Hi(),o=`${n.getRoot()}${e.substring(1)}`;try{const i=await fetch(o,{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 co(e){const t=Ni.then(()=>e());return Ni=t.then(()=>{},()=>{}),t}function tn(){function e(o){return co(()=>so(o,{method:"GET"}))}function t(o,i){return co(()=>so(o,{body:JSON.stringify(i),method:"POST"}))}function n(o,i){return co(()=>so(o,{body:JSON.stringify(i),method:"PUT"}))}return{GET:e,POST:t,PUT:n}}async function Xs(e,t){const n=new URLSearchParams({data_type:"raw_data",provider:"dataset-column",indeces:t.toString()}).toString();try{const{data:o}=await tn().GET(`/api/datasets/${e}?${n}`);if(o.data&&o.data.length>0){const i=t.length,a=new Array(i).fill(null).map(()=>[]);for(const s of o.data)for(const l in s){const d=Number(l),c=s[l];c!==void 0&&c!=2147483647&&d<i&&a[d].push(c)}return a}else return[]}catch(o){$n(o)}}function Ys(e,t){return`${e}api/datasets/${t}/display`}const Wi=["auto"],Wn=r.ref({});function Zs(){function e(o,i){return o.every(a=>i.every(s=>typeof a[s]=="string"&&a[s].trim()!==""))}function t(o,i){const a=[];for(const s of o)for(const l of i){const d=s[l];d&&![...a,...Wi].includes(d)&&a.push(d)}return a}async function n(o,i,a){if(a.length>0&&e(i,a)){Wn.value[o]=Wn.value[o]||{};const s=Object.keys(Wn.value[o]),l=t(i,a).filter(c=>!s.includes(c));if(l.length>0){const c=await Xs(o,l);if(c)for(const[f,u]of l.entries())Wn.value[o][u]=c[f]}const d=[];return i.forEach(c=>{const f={};a.forEach(u=>{const p=c[u];p&&!Wi.includes(p)&&(f[u]=Wn.value[o][p])}),d.push(f)}),d}else return[]}return{checkColumns:e,fetchColumns:n,getColumns:t}}function Js(e,t){return r.openBlock(),r.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"},[r.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 Qs(e,t){return r.openBlock(),r.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"},[r.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 ed(e,t){return r.openBlock(),r.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"},[r.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 td(e,t){return r.openBlock(),r.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"},[r.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 nd(e,t){return r.openBlock(),r.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"},[r.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 rd(e,t){return r.openBlock(),r.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"},[r.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 ji(e,t){return r.openBlock(),r.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"},[r.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 Ui(e,t){return r.openBlock(),r.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"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function od(e,t){return r.openBlock(),r.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"},[r.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 id(e,t){return r.openBlock(),r.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"},[r.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"})])}function ad(e){let t=".",n="__",o="--",i;if(e){let h=e.blockPrefix;h&&(t=h),h=e.elementPrefix,h&&(n=h),h=e.modifierPrefix,h&&(o=h)}const a={install(h){i=h.c;const y=h.context;y.bem={},y.bem.b=null,y.bem.els=null}};function s(h){let y,w;return{before(g){y=g.bem.b,w=g.bem.els,g.bem.els=null},after(g){g.bem.b=y,g.bem.els=w},$({context:g,props:z}){return h=typeof h=="string"?h:h({context:g,props:z}),g.bem.b=h,`${(z==null?void 0:z.bPrefix)||t}${g.bem.b}`}}}function l(h){let y;return{before(w){y=w.bem.els},after(w){w.bem.els=y},$({context:w,props:g}){return h=typeof h=="string"?h:h({context:w,props:g}),w.bem.els=h.split(",").map(z=>z.trim()),w.bem.els.map(z=>`${(g==null?void 0:g.bPrefix)||t}${w.bem.b}${n}${z}`).join(", ")}}}function d(h){return{$({context:y,props:w}){h=typeof h=="string"?h:h({context:y,props:w});const g=h.split(",").map($=>$.trim());function z($){return g.map(k=>`&${(w==null?void 0:w.bPrefix)||t}${y.bem.b}${$!==void 0?`${n}${$}`:""}${o}${k}`).join(", ")}const F=y.bem.els;if(F!==null){if(process.env.NODE_ENV!=="production"&&F.length>=2)throw Error(`[css-render/plugin-bem]: m(${h}) is invalid, using modifier inside multiple elements is not allowed`);return z(F[0])}else return z()}}}function c(h){return{$({context:y,props:w}){h=typeof h=="string"?h:h({context:y,props:w});const g=y.bem.els;if(process.env.NODE_ENV!=="production"&&g!==null&&g.length>=2)throw Error(`[css-render/plugin-bem]: notM(${h}) is invalid, using modifier inside multiple elements is not allowed`);return`&:not(${(w==null?void 0:w.bPrefix)||t}${y.bem.b}${g!==null&&g.length>0?`${n}${g[0]}`:""}${o}${h})`}}}return Object.assign(a,{cB:(...h)=>i(s(h[0]),h[1],h[2]),cE:(...h)=>i(l(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}function ld(e){let t=0;for(let n=0;n<e.length;++n)e[n]==="&"&&++t;return t}const Gi=/\s*,(?![^(]*\))\s*/g,sd=/\s+/g;function dd(e,t){const n=[];return t.split(Gi).forEach(o=>{let i=ld(o);if(i){if(i===1){e.forEach(s=>{n.push(o.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+o)});return}let a=[o];for(;i--;){const s=[];a.forEach(l=>{e.forEach(d=>{s.push(l.replace("&",d))})}),a=s}a.forEach(s=>n.push(s))}),n}function cd(e,t){const n=[];return t.split(Gi).forEach(o=>{e.forEach(i=>{n.push((i&&i+" ")+o)})}),n}function ud(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=dd(t,n):t=cd(t,n))}),t.join(", ").replace(sd," ")}function Ki(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function mr(e,t){return(t??document.head).querySelector(`style[cssr-id="${e}"]`)}function fd(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function vr(e){return e?/^\s*@(s|m)/.test(e):!1}const hd=/[A-Z]/g;function qi(e){return e.replace(hd,t=>"-"+t.toLowerCase())}function pd(e,t=" "){return typeof e=="object"&&e!==null?` {
|
|
3
3
|
`+Object.entries(e).map(n=>t+` ${qi(n[0])}: ${n[1]};`).join(`
|
|
4
4
|
`)+`
|
|
5
5
|
`+t+"}":`: ${e};`}function bd(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function Xi(e,t,n,o){if(!t)return"";const i=bd(t,n,o);if(!i)return"";if(typeof i=="string")return`${e} {
|
|
@@ -10,9 +10,9 @@ ${i}
|
|
|
10
10
|
`);return}l=qi(l),d!=null&&s.push(` ${l}${pd(d)}`)}),e&&s.push("}"),s.join(`
|
|
11
11
|
`)}function uo(e,t,n){e&&e.forEach(o=>{if(Array.isArray(o))uo(o,t,n);else if(typeof o=="function"){const i=o(t);Array.isArray(i)?uo(i,t,n):i&&n(i)}else o&&n(o)})}function Yi(e,t,n,o,i){const a=e.$;let s="";if(!a||typeof a=="string")vr(a)?s=a:t.push(a);else if(typeof a=="function"){const c=a({context:o.context,props:i});vr(c)?s=c:t.push(c)}else if(a.before&&a.before(o.context),!a.$||typeof a.$=="string")vr(a.$)?s=a.$:t.push(a.$);else if(a.$){const c=a.$({context:o.context,props:i});vr(c)?s=c:t.push(c)}const l=ud(t),d=Xi(l,e.props,o,i);s?n.push(`${s} {`):d.length&&n.push(d),e.children&&uo(e.children,{context:o.context,props:i},c=>{if(typeof c=="string"){const f=Xi(l,{raw:c},o,i);n.push(f)}else Yi(c,t,n,o,i)}),t.pop(),s&&n.push("}"),a&&a.after&&a.after(o.context)}function gd(e,t,n){const o=[];return Yi(e,[],o,t,n),o.join(`
|
|
12
12
|
|
|
13
|
-
`)}function fo(e){for(var t=0,n,o=0,i=e.length;i>=4;++o,i-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&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(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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 md(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(Ki),t.els=[];else{const a=mr(n,o);a&&i.includes(a)&&(Ki(a),t.els=i.filter(s=>s!==a))}}function Zi(e,t){e.push(t)}function vd(e,t,n,o,i,a,s,l,d){let c;if(n===void 0&&(c=t.render(o),n=fo(c)),d){d.adapter(n,c??t.render(o));return}l===void 0&&(l=document.head);const f=mr(n,l);if(f!==null&&!a)return f;const u=f??fd(n);if(c===void 0&&(c=t.render(o)),u.textContent=c,f!==null)return f;if(s){const p=l.querySelector(`meta[name="${s}"]`);if(p)return l.insertBefore(u,p),Zi(t.els,u),u}return i?l.insertBefore(u,l.querySelector("style, link")):l.appendChild(u),Zi(t.els,u),u}function xd(e){return gd(this,this.instance,e)}function yd(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:a=!1,anchorMetaName:s,parent:l}=e;return vd(this.instance,this,t,o,i,a,s,l,n)}function wd(e={}){const{id:t,parent:n}=e;md(this.instance,this,t,n)}const xr=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:xd,mount:yd,unmount:wd}},Cd=function(e,t,n,o){return Array.isArray(t)?xr(e,{$:null},null,t):Array.isArray(n)?xr(e,t,null,n):Array.isArray(o)?xr(e,t,n,o):xr(e,t,n,null)};function Ji(e={}){const t={c:(...n)=>Cd(t,...n),use:(n,...o)=>n.install(t,...o),find:mr,context:{},config:e};return t}function Sd(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return mr(e)!==null}const yr=".n-",$d="__",kd="--",Qi=Ji(),ea=ad({blockPrefix:yr,elementPrefix:$d,modifierPrefix:kd});Qi.use(ea);const{c:V,find:Jx}=Qi,{cB:x,cE:R,cM:N,cNotM:Ue}=ea;function Td(e){return V(({props:{bPrefix:t}})=>`${t||yr}modal, ${t||yr}drawer`,[e])}function zd(e){return V(({props:{bPrefix:t}})=>`${t||yr}popover`,[e])}const Pd=(...e)=>V(">",[x(...e)]);function Q(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let wr=[];const ta=new WeakMap;function Rd(){wr.forEach(e=>e(...ta.get(e))),wr=[]}function na(e,...t){ta.set(e,t),!wr.includes(e)&&wr.push(e)===1&&requestAnimationFrame(Rd)}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 Vt(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),o={top:n[0]};switch(n.length){case 1:o.right=n[0],o.bottom=n[0],o.left=n[0];break;case 2:o.right=n[1],o.left=n[1],o.bottom=n[0];break;case 3:o.right=n[1],o.bottom=n[2],o.left=n[1];break;case 4:o.right=n[1],o.bottom=n[2],o.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?o:o[t]}const ra={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function oa(e,t,n){t/=100,n/=100;const o=t*Math.min(n,1-n)+n;return[e,o?(2-2*n/o)*100:0,o*100]}function Cr(e,t,n){t/=100,n/=100;const o=n-n*t/2,i=Math.min(o,1-o);return[e,i?(n-o)/i*100:0,o*100]}function Et(e,t,n){t/=100,n/=100;let o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5)*255,o(3)*255,o(1)*255]}function ho(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o&&i/o*100,o*100]}function po(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=1-Math.abs(o+o-i-1),s=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(s<0?s+6:s),a?i/a*100:0,(o+o-i)*50]}function Sr(e,t,n){t/=100,n/=100;let o=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-o*Math.max(Math.min(s-3,9-s,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const vt="^\\s*",xt="\\s*$",Lt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",ct="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",nn="([0-9A-Fa-f])",rn="([0-9A-Fa-f]{2})",ia=new RegExp(`${vt}hsl\\s*\\(${ct},${Lt},${Lt}\\)${xt}`),aa=new RegExp(`${vt}hsv\\s*\\(${ct},${Lt},${Lt}\\)${xt}`),la=new RegExp(`${vt}hsla\\s*\\(${ct},${Lt},${Lt},${ct}\\)${xt}`),sa=new RegExp(`${vt}hsva\\s*\\(${ct},${Lt},${Lt},${ct}\\)${xt}`),Ed=new RegExp(`${vt}rgb\\s*\\(${ct},${ct},${ct}\\)${xt}`),Bd=new RegExp(`${vt}rgba\\s*\\(${ct},${ct},${ct},${ct}\\)${xt}`),bo=new RegExp(`${vt}#${nn}${nn}${nn}${xt}`),go=new RegExp(`${vt}#${rn}${rn}${rn}${xt}`),mo=new RegExp(`${vt}#${nn}${nn}${nn}${nn}${xt}`),vo=new RegExp(`${vt}#${rn}${rn}${rn}${rn}${xt}`);function lt(e){return parseInt(e,16)}function on(e){try{let t;if(t=la.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),Bt(t[13])];if(t=ia.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Ht(e){try{let t;if(t=sa.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),Bt(t[13])];if(t=aa.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Ze(e){try{let t;if(t=go.exec(e))return[lt(t[1]),lt(t[2]),lt(t[3]),1];if(t=Ed.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),1];if(t=Bd.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),Bt(t[13])];if(t=bo.exec(e))return[lt(t[1]+t[1]),lt(t[2]+t[2]),lt(t[3]+t[3]),1];if(t=vo.exec(e))return[lt(t[1]),lt(t[2]),lt(t[3]),Bt(lt(t[4])/255)];if(t=mo.exec(e))return[lt(t[1]+t[1]),lt(t[2]+t[2]),lt(t[3]+t[3]),Bt(lt(t[4]+t[4])/255)];if(e in ra)return Ze(ra[e]);if(ia.test(e)||la.test(e)){const[n,o,i,a]=on(e);return[...Sr(n,o,i),a]}else if(aa.test(e)||sa.test(e)){const[n,o,i,a]=Ht(e);return[...Et(n,o,i),a]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function _d(e){return e>1?1:e<0?0:e}function Md(e,t,n){return`rgb(${Le(e)}, ${Le(t)}, ${Le(n)})`}function xo(e,t,n,o){return`rgba(${Le(e)}, ${Le(t)}, ${Le(n)}, ${_d(o)})`}function yo(e,t,n,o,i){return Le((e*t*(1-o)+n*o)/i)}function ut(e,t){Array.isArray(e)||(e=Ze(e)),Array.isArray(t)||(t=Ze(t));const n=e[3],o=t[3],i=Bt(n+o-n*o);return xo(yo(e[0],n,t[0],o,i),yo(e[1],n,t[1],o,i),yo(e[2],n,t[2],o,i),i)}function ve(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e);return typeof t.alpha=="number"?xo(n,o,i,t.alpha):xo(n,o,i,a)}function $r(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e),{lightness:s=1,alpha:l=1}=t;return wt([n*s,o*s,i*s,a*l])}function Bt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function yt(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Le(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ke(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function wo(e){const[t,n,o]=Array.isArray(e)?e:Ze(e);return Md(t,n,o)}function wt(e){const[t,n,o]=e;return 3 in e?`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, ${Bt(e[3])})`:`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, 1)`}function Co(e){return`hsv(${yt(e[0])}, ${Ke(e[1])}%, ${Ke(e[2])}%)`}function an(e){const[t,n,o]=e;return 3 in e?`hsva(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, ${Bt(e[3])})`:`hsva(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, 1)`}function So(e){return`hsl(${yt(e[0])}, ${Ke(e[1])}%, ${Ke(e[2])}%)`}function Nt(e){const[t,n,o]=e;return 3 in e?`hsla(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, ${Bt(e[3])})`:`hsla(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, 1)`}function Wt(e){if(typeof e=="string"){let o;if(o=go.exec(e))return`${o[0]}FF`;if(o=vo.exec(e))return o[0];if(o=bo.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}FF`;if(o=mo.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}${o[4]}${o[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(o=>Le(o).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Le(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function jn(e){if(typeof e=="string"){let t;if(t=go.exec(e))return t[0];if(t=vo.exec(e))return t[0].slice(0,7);if(t=bo.exec(e)||mo.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=>Le(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function Fd(e=8){return Math.random().toString(16).slice(2,2+e)}function kr(e){return e.composedPath()[0]}const Id={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Ad(e,t,n){if(e==="mousemoveoutside"){const o=i=>{t.contains(kr(i))||n(i)};return{mousemove:o,touchstart:o}}else if(e==="clickoutside"){let o=!1;const i=s=>{o=!t.contains(kr(s))},a=s=>{o&&(t.contains(kr(s))||n(s))};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 da(e,t,n){const o=Id[e];let i=o.get(t);i===void 0&&o.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=Ad(e,t,n)),a}function Od(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=da(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],o)}),!0}return!1}function Dd(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=da(e,t,n);return Object.keys(i).forEach(a=>{ke(a,document,i[a],o)}),!0}return!1}function Vd(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function o(){e.set(this,!0),t.set(this,!0)}function i(b,S,_){const D=b[S];return b[S]=function(){return _.apply(b,arguments),D.apply(b,arguments)},b}function a(b,S){b[S]=Event.prototype[S]}const s=new WeakMap,l=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var b;return(b=s.get(this))!==null&&b!==void 0?b:null}function c(b,S){l!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:S??l.get})}const f={bubble:{},capture:{}},u={};function p(){const b=function(S){const{type:_,eventPhase:D,bubbles:q}=S,G=kr(S);if(D===2)return;const O=D===1?"capture":"bubble";let W=G;const L=[];for(;W===null&&(W=window),L.push(W),W!==window;)W=W.parentNode||null;const Z=f.capture[_],Y=f.bubble[_];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",o),c(S,d),O==="capture"){if(Z===void 0)return;for(let ie=L.length-1;ie>=0&&!e.has(S);--ie){const oe=L[ie],te=Z.get(oe);if(te!==void 0){s.set(S,oe);for(const ce of te){if(t.has(S))break;ce(S)}}if(ie===0&&!q&&Y!==void 0){const ce=Y.get(oe);if(ce!==void 0)for(const j of ce){if(t.has(S))break;j(S)}}}}else if(O==="bubble"){if(Y===void 0)return;for(let ie=0;ie<L.length&&!e.has(S);++ie){const oe=L[ie],te=Y.get(oe);if(te!==void 0){s.set(S,oe);for(const ce of te){if(t.has(S))break;ce(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return b.displayName="evtdUnifiedHandler",b}function m(){const b=function(S){const{type:_,eventPhase:D}=S;if(D!==2)return;const q=u[_];q!==void 0&&q.forEach(G=>G(S))};return b.displayName="evtdUnifiedWindowEventHandler",b}const h=p(),y=m();function w(b,S){const _=f[b];return _[S]===void 0&&(_[S]=new Map,window.addEventListener(S,h,b==="capture")),_[S]}function g(b){return u[b]===void 0&&(u[b]=new Set,window.addEventListener(b,y)),u[b]}function z(b,S){let _=b.get(S);return _===void 0&&b.set(S,_=new Set),_}function F(b,S,_,D){const q=f[S][_];if(q!==void 0){const G=q.get(b);if(G!==void 0&&G.has(D))return!0}return!1}function $(b,S){const _=u[b];return!!(_!==void 0&&_.has(S))}function k(b,S,_,D){let q;if(typeof D=="object"&&D.once===!0?q=Z=>{M(b,S,q,D),_(Z)}:q=_,Od(b,S,q,D))return;const O=D===!0||typeof D=="object"&&D.capture===!0?"capture":"bubble",W=w(O,b),L=z(W,S);if(L.has(q)||L.add(q),S===window){const Z=g(b);Z.has(q)||Z.add(q)}}function M(b,S,_,D){if(Dd(b,S,_,D))return;const G=D===!0||typeof D=="object"&&D.capture===!0,O=G?"capture":"bubble",W=w(O,b),L=z(W,S);if(S===window&&!F(S,G?"bubble":"capture",b,_)&&$(b,_)){const Y=u[b];Y.delete(_),Y.size===0&&(window.removeEventListener(b,y),u[b]=void 0)}L.has(_)&&L.delete(_),L.size===0&&W.delete(S),W.size===0&&(window.removeEventListener(b,h,O==="capture"),f[O][b]=void 0)}return{on:k,off:M}}const{on:Pe,off:ke}=Vd();function Ld(e){const t=r.ref(!!e.value);if(t.value)return r.readonly(t);const n=r.watch(e,o=>{o&&(t.value=!0,n())});return r.readonly(t)}function He(e){const t=r.computed(e),n=r.ref(t.value);return r.watch(t,o=>{n.value=o}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(o){e.set(o)}}}const Hd=typeof window<"u";let Tn,Un;(()=>{var e,t;Tn=Hd?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Un=!1,Tn!==void 0?Tn.then(()=>{Un=!0}):Un=!0})();function ca(e){if(Un)return;let t=!1;r.onMounted(()=>{Un||Tn==null||Tn.then(()=>{t||e()})}),r.onBeforeUnmount(()=>{t=!0})}function Ct(e,t){return r.watch(e,n=>{n!==void 0&&(t.value=n)}),r.computed(()=>e.value===void 0?t.value:e.value)}function zn(){const e=r.ref(!1);return r.onMounted(()=>{e.value=!0}),r.readonly(e)}function Tr(e,t){return r.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Nd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Wd(){return Nd}function ey(e){return e}const $o="n-internal-select-menu",ua="n-internal-select-menu-body",fa="n-drawer-body",ha="n-modal-body",pa="n-popover-body",ba="__disabled__";function it(e){const t=r.inject(ha,null),n=r.inject(fa,null),o=r.inject(pa,null),i=r.inject(ua,null),a=r.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const s=()=>{a.value=document.fullscreenElement};r.onMounted(()=>{Pe("fullscreenchange",document,s)}),r.onBeforeUnmount(()=>{ke("fullscreenchange",document,s)})}return He(()=>{var s;const{to:l}=e;return l!==void 0?l===!1?ba:l===!0?a.value||"body":l:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:i!=null&&i.value?i.value:l??(a.value||"body")})}it.tdkey=ba,it.propTo={type:[String,Object,Boolean],default:void 0};const zr=typeof document<"u"&&typeof window<"u";function jd(e){const t={isDeactivated:!1};let n=!1;return r.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),r.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function ko(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return o()}function To(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){To(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&To(o.children,t,n)}else o.type!==r.Comment&&n.push(o)}}),n}function ga(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=To(o());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let jt=null;function ma(){if(jt===null&&(jt=document.getElementById("v-binder-view-measurer"),jt===null)){jt=document.createElement("div"),jt.id="v-binder-view-measurer";const{style:e}=jt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(jt)}return jt.getBoundingClientRect()}function Ud(e,t){const n=ma();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function zo(e){const t=e.getBoundingClientRect(),n=ma();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 Gd(e){return e.nodeType===9?null:e.parentNode}function va(e){if(e===null)return null;const t=Gd(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:o,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+o))return t}return va(t)}const Pr=r.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;r.provide("VBinder",(t=r.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=r.inject("VBinder",null),o=r.ref(null),i=g=>{o.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const s=()=>{let g=o.value;for(;g=va(g),g!==null;)a.push(g);for(const z of a)Pe("scroll",z,u,!0)},l=()=>{for(const g of a)ke("scroll",g,u,!0);a=[]},d=new Set,c=g=>{d.size===0&&s(),d.has(g)||d.add(g)},f=g=>{d.has(g)&&d.delete(g),d.size===0&&l()},u=()=>{na(p)},p=()=>{d.forEach(g=>g())},m=new Set,h=g=>{m.size===0&&Pe("resize",window,w),m.has(g)||m.add(g)},y=g=>{m.has(g)&&m.delete(g),m.size===0&&ke("resize",window,w)},w=()=>{m.forEach(g=>g())};return r.onBeforeUnmount(()=>{ke("resize",window,w),l()}),{targetRef:o,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:y}},render(){return ko("binder",this.$slots)}}),Rr=r.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=r.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?r.withDirectives(ga("follower",this.$slots),[[t]]):ga("follower",this.$slots)}}),Pn="@@mmoContext",Kd={mounted(e,{value:t}){e[Pn]={handler:void 0},typeof t=="function"&&(e[Pn].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Pn];typeof t=="function"?n.handler?n.handler!==t&&(ke("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[Pn].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&(ke("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Pn];t&&ke("mousemoveoutside",e,t),e[Pn].handler=void 0}},Rn="@@coContext",Gn={mounted(e,{value:t,modifiers:n}){e[Rn]={handler:void 0},typeof t=="function"&&(e[Rn].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const o=e[Rn];typeof t=="function"?o.handler?o.handler!==t&&(ke("clickoutside",e,o.handler,{capture:n.capture}),o.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[Rn].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):o.handler&&(ke("clickoutside",e,o.handler,{capture:n.capture}),o.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Rn];n&&ke("clickoutside",e,n,{capture:t.capture}),e[Rn].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:o}=this;if(n!==void 0){t.style.zIndex=`${n}`,o.delete(t);return}const{nextZIndex:i}=this;o.has(t)&&o.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,o.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:o}=this;o.has(t)?o.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,o)=>n[1]-o[1]),this.nextZIndex=2e3,t.forEach(n=>{const o=n[0],i=this.nextZIndex++;`${i}`!==o.style.zIndex&&(o.style.zIndex=`${i}`)})}}const Po=new Xd,En="@@ziContext",xa={mounted(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n;e[En]={enabled:!!i,initialized:!1},i&&(Po.ensureZIndex(e,o),e[En].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n,a=e[En].enabled;i&&!a&&(Po.ensureZIndex(e,o),e[En].initialized=!0),e[En].enabled=!!i},unmounted(e,t){if(!e[En].initialized)return;const{value:n={}}=t,{zIndex:o}=n;Po.unregister(e,o)}},Yd="@css-render/vue3-ssr";function Zd(e,t){return`<style cssr-id="${e}">
|
|
13
|
+
`)}function fo(e){for(var t=0,n,o=0,i=e.length;i>=4;++o,i-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&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(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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 md(e,t,n,o){const{els:i}=t;if(n===void 0)i.forEach(Ki),t.els=[];else{const a=mr(n,o);a&&i.includes(a)&&(Ki(a),t.els=i.filter(s=>s!==a))}}function Zi(e,t){e.push(t)}function vd(e,t,n,o,i,a,s,l,d){let c;if(n===void 0&&(c=t.render(o),n=fo(c)),d){d.adapter(n,c??t.render(o));return}l===void 0&&(l=document.head);const f=mr(n,l);if(f!==null&&!a)return f;const u=f??fd(n);if(c===void 0&&(c=t.render(o)),u.textContent=c,f!==null)return f;if(s){const p=l.querySelector(`meta[name="${s}"]`);if(p)return l.insertBefore(u,p),Zi(t.els,u),u}return i?l.insertBefore(u,l.querySelector("style, link")):l.appendChild(u),Zi(t.els,u),u}function xd(e){return gd(this,this.instance,e)}function yd(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:a=!1,anchorMetaName:s,parent:l}=e;return vd(this.instance,this,t,o,i,a,s,l,n)}function wd(e={}){const{id:t,parent:n}=e;md(this.instance,this,t,n)}const xr=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:xd,mount:yd,unmount:wd}},Cd=function(e,t,n,o){return Array.isArray(t)?xr(e,{$:null},null,t):Array.isArray(n)?xr(e,t,null,n):Array.isArray(o)?xr(e,t,n,o):xr(e,t,n,null)};function Ji(e={}){const t={c:(...n)=>Cd(t,...n),use:(n,...o)=>n.install(t,...o),find:mr,context:{},config:e};return t}function Sd(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return mr(e)!==null}const yr=".n-",$d="__",kd="--",Qi=Ji(),ea=ad({blockPrefix:yr,elementPrefix:$d,modifierPrefix:kd});Qi.use(ea);const{c:V,find:Jx}=Qi,{cB:x,cE:R,cM:N,cNotM:Ue}=ea;function Td(e){return V(({props:{bPrefix:t}})=>`${t||yr}modal, ${t||yr}drawer`,[e])}function zd(e){return V(({props:{bPrefix:t}})=>`${t||yr}popover`,[e])}const Pd=(...e)=>V(">",[x(...e)]);function Q(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}let wr=[];const ta=new WeakMap;function Rd(){wr.forEach(e=>e(...ta.get(e))),wr=[]}function na(e,...t){ta.set(e,t),!wr.includes(e)&&wr.push(e)===1&&requestAnimationFrame(Rd)}function jn(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 Vt(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),o={top:n[0]};switch(n.length){case 1:o.right=n[0],o.bottom=n[0],o.left=n[0];break;case 2:o.right=n[1],o.left=n[1],o.bottom=n[0];break;case 3:o.right=n[1],o.bottom=n[2],o.left=n[1];break;case 4:o.right=n[1],o.bottom=n[2],o.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?o:o[t]}const ra={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#0FF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000",blanchedalmond:"#FFEBCD",blue:"#00F",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#0FF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#F0F",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#0F0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#F0F",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#F00",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFF",whitesmoke:"#F5F5F5",yellow:"#FF0",yellowgreen:"#9ACD32",transparent:"#0000"};function oa(e,t,n){t/=100,n/=100;const o=t*Math.min(n,1-n)+n;return[e,o?(2-2*n/o)*100:0,o*100]}function Cr(e,t,n){t/=100,n/=100;const o=n-n*t/2,i=Math.min(o,1-o);return[e,i?(n-o)/i*100:0,o*100]}function Et(e,t,n){t/=100,n/=100;let o=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[o(5)*255,o(3)*255,o(1)*255]}function ho(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(a<0?a+6:a),o&&i/o*100,o*100]}function po(e,t,n){e/=255,t/=255,n/=255;let o=Math.max(e,t,n),i=o-Math.min(e,t,n),a=1-Math.abs(o+o-i-1),s=i&&(o==e?(t-n)/i:o==t?2+(n-e)/i:4+(e-t)/i);return[60*(s<0?s+6:s),a?i/a*100:0,(o+o-i)*50]}function Sr(e,t,n){t/=100,n/=100;let o=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-o*Math.max(Math.min(s-3,9-s,1),-1);return[i(0)*255,i(8)*255,i(4)*255]}const vt="^\\s*",xt="\\s*$",Lt="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",ct="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",nn="([0-9A-Fa-f])",rn="([0-9A-Fa-f]{2})",ia=new RegExp(`${vt}hsl\\s*\\(${ct},${Lt},${Lt}\\)${xt}`),aa=new RegExp(`${vt}hsv\\s*\\(${ct},${Lt},${Lt}\\)${xt}`),la=new RegExp(`${vt}hsla\\s*\\(${ct},${Lt},${Lt},${ct}\\)${xt}`),sa=new RegExp(`${vt}hsva\\s*\\(${ct},${Lt},${Lt},${ct}\\)${xt}`),Ed=new RegExp(`${vt}rgb\\s*\\(${ct},${ct},${ct}\\)${xt}`),Bd=new RegExp(`${vt}rgba\\s*\\(${ct},${ct},${ct},${ct}\\)${xt}`),bo=new RegExp(`${vt}#${nn}${nn}${nn}${xt}`),go=new RegExp(`${vt}#${rn}${rn}${rn}${xt}`),mo=new RegExp(`${vt}#${nn}${nn}${nn}${nn}${xt}`),vo=new RegExp(`${vt}#${rn}${rn}${rn}${rn}${xt}`);function lt(e){return parseInt(e,16)}function on(e){try{let t;if(t=la.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),Bt(t[13])];if(t=ia.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),1];throw new Error(`[seemly/hsla]: Invalid color value ${e}.`)}catch(t){throw t}}function Ht(e){try{let t;if(t=sa.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),Bt(t[13])];if(t=aa.exec(e))return[yt(t[1]),Ke(t[5]),Ke(t[9]),1];throw new Error(`[seemly/hsva]: Invalid color value ${e}.`)}catch(t){throw t}}function Ze(e){try{let t;if(t=go.exec(e))return[lt(t[1]),lt(t[2]),lt(t[3]),1];if(t=Ed.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),1];if(t=Bd.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),Bt(t[13])];if(t=bo.exec(e))return[lt(t[1]+t[1]),lt(t[2]+t[2]),lt(t[3]+t[3]),1];if(t=vo.exec(e))return[lt(t[1]),lt(t[2]),lt(t[3]),Bt(lt(t[4])/255)];if(t=mo.exec(e))return[lt(t[1]+t[1]),lt(t[2]+t[2]),lt(t[3]+t[3]),Bt(lt(t[4]+t[4])/255)];if(e in ra)return Ze(ra[e]);if(ia.test(e)||la.test(e)){const[n,o,i,a]=on(e);return[...Sr(n,o,i),a]}else if(aa.test(e)||sa.test(e)){const[n,o,i,a]=Ht(e);return[...Et(n,o,i),a]}throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function _d(e){return e>1?1:e<0?0:e}function Md(e,t,n){return`rgb(${Le(e)}, ${Le(t)}, ${Le(n)})`}function xo(e,t,n,o){return`rgba(${Le(e)}, ${Le(t)}, ${Le(n)}, ${_d(o)})`}function yo(e,t,n,o,i){return Le((e*t*(1-o)+n*o)/i)}function ut(e,t){Array.isArray(e)||(e=Ze(e)),Array.isArray(t)||(t=Ze(t));const n=e[3],o=t[3],i=Bt(n+o-n*o);return xo(yo(e[0],n,t[0],o,i),yo(e[1],n,t[1],o,i),yo(e[2],n,t[2],o,i),i)}function ve(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e);return typeof t.alpha=="number"?xo(n,o,i,t.alpha):xo(n,o,i,a)}function $r(e,t){const[n,o,i,a=1]=Array.isArray(e)?e:Ze(e),{lightness:s=1,alpha:l=1}=t;return wt([n*s,o*s,i*s,a*l])}function Bt(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function yt(e){const t=Math.round(Number(e));return t>=360||t<0?0:t}function Le(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ke(e){const t=Math.round(Number(e));return t>100?100:t<0?0:t}function wo(e){const[t,n,o]=Array.isArray(e)?e:Ze(e);return Md(t,n,o)}function wt(e){const[t,n,o]=e;return 3 in e?`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, ${Bt(e[3])})`:`rgba(${Le(t)}, ${Le(n)}, ${Le(o)}, 1)`}function Co(e){return`hsv(${yt(e[0])}, ${Ke(e[1])}%, ${Ke(e[2])}%)`}function an(e){const[t,n,o]=e;return 3 in e?`hsva(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, ${Bt(e[3])})`:`hsva(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, 1)`}function So(e){return`hsl(${yt(e[0])}, ${Ke(e[1])}%, ${Ke(e[2])}%)`}function Nt(e){const[t,n,o]=e;return 3 in e?`hsla(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, ${Bt(e[3])})`:`hsla(${yt(t)}, ${Ke(n)}%, ${Ke(o)}%, 1)`}function Wt(e){if(typeof e=="string"){let o;if(o=go.exec(e))return`${o[0]}FF`;if(o=vo.exec(e))return o[0];if(o=bo.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}FF`;if(o=mo.exec(e))return`#${o[1]}${o[1]}${o[2]}${o[2]}${o[3]}${o[3]}${o[4]}${o[4]}`;throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`)}const t=`#${e.slice(0,3).map(o=>Le(o).toString(16).toUpperCase().padStart(2,"0")).join("")}`,n=e.length===3?"FF":Le(e[3]*255).toString(16).padStart(2,"0").toUpperCase();return t+n}function Un(e){if(typeof e=="string"){let t;if(t=go.exec(e))return t[0];if(t=vo.exec(e))return t[0].slice(0,7);if(t=bo.exec(e)||mo.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=>Le(t).toString(16).toUpperCase().padStart(2,"0")).join("")}`}function Fd(e=8){return Math.random().toString(16).slice(2,2+e)}function kr(e){return e.composedPath()[0]}const Id={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Ad(e,t,n){if(e==="mousemoveoutside"){const o=i=>{t.contains(kr(i))||n(i)};return{mousemove:o,touchstart:o}}else if(e==="clickoutside"){let o=!1;const i=s=>{o=!t.contains(kr(s))},a=s=>{o&&(t.contains(kr(s))||n(s))};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 da(e,t,n){const o=Id[e];let i=o.get(t);i===void 0&&o.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=Ad(e,t,n)),a}function Od(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=da(e,t,n);return Object.keys(i).forEach(a=>{Pe(a,document,i[a],o)}),!0}return!1}function Dd(e,t,n,o){if(e==="mousemoveoutside"||e==="clickoutside"){const i=da(e,t,n);return Object.keys(i).forEach(a=>{ke(a,document,i[a],o)}),!0}return!1}function Vd(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function o(){e.set(this,!0),t.set(this,!0)}function i(b,S,_){const D=b[S];return b[S]=function(){return _.apply(b,arguments),D.apply(b,arguments)},b}function a(b,S){b[S]=Event.prototype[S]}const s=new WeakMap,l=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var b;return(b=s.get(this))!==null&&b!==void 0?b:null}function c(b,S){l!==void 0&&Object.defineProperty(b,"currentTarget",{configurable:!0,enumerable:!0,get:S??l.get})}const f={bubble:{},capture:{}},u={};function p(){const b=function(S){const{type:_,eventPhase:D,bubbles:q}=S,G=kr(S);if(D===2)return;const O=D===1?"capture":"bubble";let W=G;const L=[];for(;W===null&&(W=window),L.push(W),W!==window;)W=W.parentNode||null;const Z=f.capture[_],Y=f.bubble[_];if(i(S,"stopPropagation",n),i(S,"stopImmediatePropagation",o),c(S,d),O==="capture"){if(Z===void 0)return;for(let ie=L.length-1;ie>=0&&!e.has(S);--ie){const oe=L[ie],te=Z.get(oe);if(te!==void 0){s.set(S,oe);for(const ce of te){if(t.has(S))break;ce(S)}}if(ie===0&&!q&&Y!==void 0){const ce=Y.get(oe);if(ce!==void 0)for(const j of ce){if(t.has(S))break;j(S)}}}}else if(O==="bubble"){if(Y===void 0)return;for(let ie=0;ie<L.length&&!e.has(S);++ie){const oe=L[ie],te=Y.get(oe);if(te!==void 0){s.set(S,oe);for(const ce of te){if(t.has(S))break;ce(S)}}}}a(S,"stopPropagation"),a(S,"stopImmediatePropagation"),c(S)};return b.displayName="evtdUnifiedHandler",b}function m(){const b=function(S){const{type:_,eventPhase:D}=S;if(D!==2)return;const q=u[_];q!==void 0&&q.forEach(G=>G(S))};return b.displayName="evtdUnifiedWindowEventHandler",b}const h=p(),y=m();function w(b,S){const _=f[b];return _[S]===void 0&&(_[S]=new Map,window.addEventListener(S,h,b==="capture")),_[S]}function g(b){return u[b]===void 0&&(u[b]=new Set,window.addEventListener(b,y)),u[b]}function z(b,S){let _=b.get(S);return _===void 0&&b.set(S,_=new Set),_}function F(b,S,_,D){const q=f[S][_];if(q!==void 0){const G=q.get(b);if(G!==void 0&&G.has(D))return!0}return!1}function $(b,S){const _=u[b];return!!(_!==void 0&&_.has(S))}function k(b,S,_,D){let q;if(typeof D=="object"&&D.once===!0?q=Z=>{M(b,S,q,D),_(Z)}:q=_,Od(b,S,q,D))return;const O=D===!0||typeof D=="object"&&D.capture===!0?"capture":"bubble",W=w(O,b),L=z(W,S);if(L.has(q)||L.add(q),S===window){const Z=g(b);Z.has(q)||Z.add(q)}}function M(b,S,_,D){if(Dd(b,S,_,D))return;const G=D===!0||typeof D=="object"&&D.capture===!0,O=G?"capture":"bubble",W=w(O,b),L=z(W,S);if(S===window&&!F(S,G?"bubble":"capture",b,_)&&$(b,_)){const Y=u[b];Y.delete(_),Y.size===0&&(window.removeEventListener(b,y),u[b]=void 0)}L.has(_)&&L.delete(_),L.size===0&&W.delete(S),W.size===0&&(window.removeEventListener(b,h,O==="capture"),f[O][b]=void 0)}return{on:k,off:M}}const{on:Pe,off:ke}=Vd();function Ld(e){const t=r.ref(!!e.value);if(t.value)return r.readonly(t);const n=r.watch(e,o=>{o&&(t.value=!0,n())});return r.readonly(t)}function He(e){const t=r.computed(e),n=r.ref(t.value);return r.watch(t,o=>{n.value=o}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(o){e.set(o)}}}const Hd=typeof window<"u";let Tn,Gn;(()=>{var e,t;Tn=Hd?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Gn=!1,Tn!==void 0?Tn.then(()=>{Gn=!0}):Gn=!0})();function ca(e){if(Gn)return;let t=!1;r.onMounted(()=>{Gn||Tn==null||Tn.then(()=>{t||e()})}),r.onBeforeUnmount(()=>{t=!0})}function Ct(e,t){return r.watch(e,n=>{n!==void 0&&(t.value=n)}),r.computed(()=>e.value===void 0?t.value:e.value)}function zn(){const e=r.ref(!1);return r.onMounted(()=>{e.value=!0}),r.readonly(e)}function Tr(e,t){return r.computed(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Nd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Wd(){return Nd}function ey(e){return e}const $o="n-internal-select-menu",ua="n-internal-select-menu-body",fa="n-drawer-body",ha="n-modal-body",pa="n-popover-body",ba="__disabled__";function it(e){const t=r.inject(ha,null),n=r.inject(fa,null),o=r.inject(pa,null),i=r.inject(ua,null),a=r.ref();if(typeof document<"u"){a.value=document.fullscreenElement;const s=()=>{a.value=document.fullscreenElement};r.onMounted(()=>{Pe("fullscreenchange",document,s)}),r.onBeforeUnmount(()=>{ke("fullscreenchange",document,s)})}return He(()=>{var s;const{to:l}=e;return l!==void 0?l===!1?ba:l===!0?a.value||"body":l:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:n!=null&&n.value?n.value:o!=null&&o.value?o.value:i!=null&&i.value?i.value:l??(a.value||"body")})}it.tdkey=ba,it.propTo={type:[String,Object,Boolean],default:void 0};const zr=typeof document<"u"&&typeof window<"u";function jd(e){const t={isDeactivated:!1};let n=!1;return r.onActivated(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),r.onDeactivated(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function ko(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return o()}function To(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){To(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&To(o.children,t,n)}else o.type!==r.Comment&&n.push(o)}}),n}function ga(e,t,n="default"){const o=t[n];if(o===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const i=To(o());if(i.length===1)return i[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let jt=null;function ma(){if(jt===null&&(jt=document.getElementById("v-binder-view-measurer"),jt===null)){jt=document.createElement("div"),jt.id="v-binder-view-measurer";const{style:e}=jt;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(jt)}return jt.getBoundingClientRect()}function Ud(e,t){const n=ma();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function zo(e){const t=e.getBoundingClientRect(),n=ma();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 Gd(e){return e.nodeType===9?null:e.parentNode}function va(e){if(e===null)return null;const t=Gd(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:o,overflowY:i}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+i+o))return t}return va(t)}const Pr=r.defineComponent({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;r.provide("VBinder",(t=r.getCurrentInstance())===null||t===void 0?void 0:t.proxy);const n=r.inject("VBinder",null),o=r.ref(null),i=g=>{o.value=g,n&&e.syncTargetWithParent&&n.setTargetRef(g)};let a=[];const s=()=>{let g=o.value;for(;g=va(g),g!==null;)a.push(g);for(const z of a)Pe("scroll",z,u,!0)},l=()=>{for(const g of a)ke("scroll",g,u,!0);a=[]},d=new Set,c=g=>{d.size===0&&s(),d.has(g)||d.add(g)},f=g=>{d.has(g)&&d.delete(g),d.size===0&&l()},u=()=>{na(p)},p=()=>{d.forEach(g=>g())},m=new Set,h=g=>{m.size===0&&Pe("resize",window,w),m.has(g)||m.add(g)},y=g=>{m.has(g)&&m.delete(g),m.size===0&&ke("resize",window,w)},w=()=>{m.forEach(g=>g())};return r.onBeforeUnmount(()=>{ke("resize",window,w),l()}),{targetRef:o,setTargetRef:i,addScrollListener:c,removeScrollListener:f,addResizeListener:h,removeResizeListener:y}},render(){return ko("binder",this.$slots)}}),Rr=r.defineComponent({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=r.inject("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?r.withDirectives(ga("follower",this.$slots),[[t]]):ga("follower",this.$slots)}}),Pn="@@mmoContext",Kd={mounted(e,{value:t}){e[Pn]={handler:void 0},typeof t=="function"&&(e[Pn].handler=t,Pe("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Pn];typeof t=="function"?n.handler?n.handler!==t&&(ke("mousemoveoutside",e,n.handler),n.handler=t,Pe("mousemoveoutside",e,t)):(e[Pn].handler=t,Pe("mousemoveoutside",e,t)):n.handler&&(ke("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Pn];t&&ke("mousemoveoutside",e,t),e[Pn].handler=void 0}},Rn="@@coContext",Kn={mounted(e,{value:t,modifiers:n}){e[Rn]={handler:void 0},typeof t=="function"&&(e[Rn].handler=t,Pe("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const o=e[Rn];typeof t=="function"?o.handler?o.handler!==t&&(ke("clickoutside",e,o.handler,{capture:n.capture}),o.handler=t,Pe("clickoutside",e,t,{capture:n.capture})):(e[Rn].handler=t,Pe("clickoutside",e,t,{capture:n.capture})):o.handler&&(ke("clickoutside",e,o.handler,{capture:n.capture}),o.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Rn];n&&ke("clickoutside",e,n,{capture:t.capture}),e[Rn].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:o}=this;if(n!==void 0){t.style.zIndex=`${n}`,o.delete(t);return}const{nextZIndex:i}=this;o.has(t)&&o.get(t)+1===this.nextZIndex||(t.style.zIndex=`${i}`,o.set(t,i),this.nextZIndex=i+1,this.squashState())}unregister(t,n){const{elementZIndex:o}=this;o.has(t)?o.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,o)=>n[1]-o[1]),this.nextZIndex=2e3,t.forEach(n=>{const o=n[0],i=this.nextZIndex++;`${i}`!==o.style.zIndex&&(o.style.zIndex=`${i}`)})}}const Po=new Xd,En="@@ziContext",xa={mounted(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n;e[En]={enabled:!!i,initialized:!1},i&&(Po.ensureZIndex(e,o),e[En].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:o,enabled:i}=n,a=e[En].enabled;i&&!a&&(Po.ensureZIndex(e,o),e[En].initialized=!0),e[En].enabled=!!i},unmounted(e,t){if(!e[En].initialized)return;const{value:n={}}=t,{zIndex:o}=n;Po.unregister(e,o)}},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:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Zd(e,t)))}const Qd=typeof document<"u";function Ut(){if(Qd)return;const e=r.inject(Yd,null);if(e!==null)return{adapter:(t,n)=>Jd(t,n,e),context:e}}function ya(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:St}=Ji(),Er="vueuc-style";function wa(e){return e&-e}class Ca{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let i=0;i<t+1;++i)o[i]=0;this.ft=o}add(t,n){if(n===0)return;const{l:o,ft:i}=this;for(t+=1;t<=o;)i[t]+=n,t+=wa(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:o,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*o;for(;t>0;)a+=n[t],t-=wa(t);return a}getBound(t){let n=0,o=this.l;for(;o>n;){const i=Math.floor((n+o)/2),a=this.sum(i);if(a>t){o=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 Sa(e){return typeof e=="string"?document.querySelector(e):e()}const ec=r.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Ld(r.toRef(e,"show")),mergedTo:r.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ko("lazy-teleport",this.$slots):r.h(r.Teleport,{disabled:this.disabled,to:this.mergedTo},ko("lazy-teleport",this.$slots)):null}}),Br={top:"bottom",bottom:"top",left:"right",right:"left"},$a={start:"end",center:"center",end:"start"},Ro={top:"height",bottom:"height",left:"width",right:"width"},tc={"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"},nc={"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"},ka={top:!0,bottom:!1,left:!0,right:!1},Ta={top:"end",bottom:"start",left:"end",right:"start"};function oc(e,t,n,o,i,a){if(!i||a)return{placement:e,top:0,left:0};const[s,l]=e.split("-");let d=l??"center",c={top:0,left:0};const f=(m,h,y)=>{let w=0,g=0;const z=n[m]-t[h]-t[m];return z>0&&o&&(y?g=ka[h]?z:-z:w=ka[h]?z:-z),{left:w,top:g}},u=s==="left"||s==="right";if(d!=="center"){const m=rc[e],h=Br[m],y=Ro[m];if(n[y]>t[y]){if(t[m]+t[y]<n[y]){const w=(n[y]-t[y])/2;t[m]<w||t[h]<w?t[m]<t[h]?(d=$a[l],c=f(y,h,u)):c=f(y,m,u):d="center"}}else n[y]<t[y]&&t[h]<0&&t[m]>t[h]&&(d=$a[l])}else{const m=s==="bottom"||s==="top"?"left":"top",h=Br[m],y=Ro[m],w=(n[y]-t[y])/2;(t[m]<w||t[h]<w)&&(t[m]>t[h]?(d=Ta[m],c=f(y,m,u)):(d=Ta[h],c=f(y,h,u)))}let p=s;return t[s]<n[Ro[s]]&&t[s]<t[Br[s]]&&(p=Br[s]),{placement:d!=="center"?`${p}-${d}`:p,left:c.left,top:c.top}}function ic(e,t){return t?nc[e]:tc[e]}function ac(e,t,n,o,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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+o)}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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const lc=St([St(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),St(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[St("> *",{pointerEvents:"all"})])]),_r=r.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=r.inject("VBinder"),n=He(()=>e.enabled!==void 0?e.enabled:e.show),o=r.ref(null),i=r.ref(null),a=()=>{const{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(d),p.includes("resize")&&t.addResizeListener(d)},s=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};r.onMounted(()=>{n.value&&(d(),a())});const l=Ut();lc.mount({id:"vueuc/binder",head:!0,anchorMetaName:Er,ssr:l}),r.onBeforeUnmount(()=>{s()}),ca(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const p=o.value;if(p===null)return;const m=t.targetRef,{x:h,y,overlap:w}=e,g=h!==void 0&&y!==void 0?Ud(h,y):zo(m);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:z,minWidth:F,placement:$,internalShift:k,flip:M}=e;p.setAttribute("v-placement",$),w?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");const{style:b}=p;z==="target"?b.width=`${g.width}px`:z!==void 0?b.width=z:b.width="",F==="target"?b.minWidth=`${g.width}px`:F!==void 0?b.minWidth=F:b.minWidth="";const S=zo(p),_=zo(i.value),{left:D,top:q,placement:G}=oc($,g,S,k,M,w),O=ic(G,w),{left:W,top:L,transform:Z}=ac(G,_,g,q,D,w);p.setAttribute("v-placement",G),p.style.setProperty("--v-offset-left",`${Math.round(D)}px`),p.style.setProperty("--v-offset-top",`${Math.round(q)}px`),p.style.transform=`translateX(${W}) translateY(${L}) ${Z}`,p.style.setProperty("--v-transform-origin",O),p.style.transformOrigin=O};r.watch(n,p=>{p?(a(),c()):s()});const c=()=>{r.nextTick().then(d).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{r.watch(r.toRef(e,p),d)}),["teleportDisabled"].forEach(p=>{r.watch(r.toRef(e,p),c)}),r.watch(r.toRef(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),p.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=zn(),u=He(()=>{const{to:p}=e;if(p!==void 0)return p;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:o,mergedTo:u,syncPosition:d}},render(){return r.h(ec,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=r.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[r.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?r.withDirectives(n,[[xa,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var ln=[],sc=function(){return ln.some(function(e){return e.activeTargets.length>0})},dc=function(){return ln.some(function(e){return e.skippedTargets.length>0})},za="ResizeObserver loop completed with undelivered notifications.",cc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:za}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=za),window.dispatchEvent(e)},Kn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Kn||(Kn={}));var sn=function(e){return Object.freeze(e)},uc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,sn(this)}return e}(),Pa=function(){function e(t,n,o,i){return this.x=t,this.y=n,this.width=o,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,sn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,o=t.y,i=t.top,a=t.right,s=t.bottom,l=t.left,d=t.width,c=t.height;return{x:n,y:o,top:i,right:a,bottom:s,left:l,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Eo=function(e){return e instanceof SVGElement&&"getBBox"in e},Ra=function(e){if(Eo(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var i=e,a=i.offsetWidth,s=i.offsetHeight;return!(a||s||e.getClientRects().length)},Ea=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)},fc=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},qn=typeof window<"u"?window:{},Mr=new WeakMap,Ba=/auto|scroll/,hc=/^tb|vertical/,pc=/msie|trident/i.test(qn.navigator&&qn.navigator.userAgent),$t=function(e){return parseFloat(e||"0")},Bn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new uc((n?t:e)||0,(n?e:t)||0)},_a=sn({devicePixelContentBoxSize:Bn(),borderBoxSize:Bn(),contentBoxSize:Bn(),contentRect:new Pa(0,0,0,0)}),Ma=function(e,t){if(t===void 0&&(t=!1),Mr.has(e)&&!t)return Mr.get(e);if(Ra(e))return Mr.set(e,_a),_a;var n=getComputedStyle(e),o=Eo(e)&&e.ownerSVGElement&&e.getBBox(),i=!pc&&n.boxSizing==="border-box",a=hc.test(n.writingMode||""),s=!o&&Ba.test(n.overflowY||""),l=!o&&Ba.test(n.overflowX||""),d=o?0:$t(n.paddingTop),c=o?0:$t(n.paddingRight),f=o?0:$t(n.paddingBottom),u=o?0:$t(n.paddingLeft),p=o?0:$t(n.borderTopWidth),m=o?0:$t(n.borderRightWidth),h=o?0:$t(n.borderBottomWidth),y=o?0:$t(n.borderLeftWidth),w=u+c,g=d+f,z=y+m,F=p+h,$=l?e.offsetHeight-F-e.clientHeight:0,k=s?e.offsetWidth-z-e.clientWidth:0,M=i?w+z:0,b=i?g+F:0,S=o?o.width:$t(n.width)-M-k,_=o?o.height:$t(n.height)-b-$,D=S+w+k+z,q=_+g+$+F,G=sn({devicePixelContentBoxSize:Bn(Math.round(S*devicePixelRatio),Math.round(_*devicePixelRatio),a),borderBoxSize:Bn(D,q,a),contentBoxSize:Bn(S,_,a),contentRect:new Pa(u,d,S,_)});return Mr.set(e,G),G},Fa=function(e,t,n){var o=Ma(e,n),i=o.borderBoxSize,a=o.contentBoxSize,s=o.devicePixelContentBoxSize;switch(t){case Kn.DEVICE_PIXEL_CONTENT_BOX:return s;case Kn.BORDER_BOX:return i;default:return a}},bc=function(){function e(t){var n=Ma(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=sn([n.borderBoxSize]),this.contentBoxSize=sn([n.contentBoxSize]),this.devicePixelContentBoxSize=sn([n.devicePixelContentBoxSize])}return e}(),Ia=function(e){if(Ra(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},gc=function(){var e=1/0,t=[];ln.forEach(function(s){if(s.activeTargets.length!==0){var l=[];s.activeTargets.forEach(function(c){var f=new bc(c.target),u=Ia(c.target);l.push(f),c.lastReportedSize=Fa(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){s.callback.call(s.observer,l,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,o=t;n<o.length;n++){var i=o[n];i()}return e},Aa=function(e){ln.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ia(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},mc=function(){var e=0;for(Aa(e);sc();)e=gc(),Aa(e);return dc()&&cc(),e>0},Bo,Oa=[],vc=function(){return Oa.splice(0).forEach(function(e){return e()})},xc=function(e){if(!Bo){var t=0,n=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return vc()}).observe(n,o),Bo=function(){n.textContent="".concat(t?t--:t++)}}Oa.push(e),Bo()},yc=function(e){xc(function(){requestAnimationFrame(e)})},Fr=0,wc=function(){return!!Fr},Cc=250,Sc={attributes:!0,characterData:!0,childList:!0,subtree:!0},Da=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Va=function(e){return e===void 0&&(e=0),Date.now()+e},_o=!1,$c=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=Cc),!_o){_o=!0;var o=Va(t);yc(function(){var i=!1;try{i=mc()}finally{if(_o=!1,t=o-Va(),!wc())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,Sc)};document.body?n():qn.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Da.forEach(function(n){return qn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Da.forEach(function(n){return qn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Mo=new $c,La=function(e){!Fr&&e>0&&Mo.start(),Fr+=e,!Fr&&Mo.stop()},kc=function(e){return!Eo(e)&&!fc(e)&&getComputedStyle(e).display==="inline"},Tc=function(){function e(t,n){this.target=t,this.observedBox=n||Kn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Fa(this.target,this.observedBox,!0);return kc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),zc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ir=new WeakMap,Ha=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ar=function(){function e(){}return e.connect=function(t,n){var o=new zc(t,n);Ir.set(t,o)},e.observe=function(t,n,o){var i=Ir.get(t),a=i.observationTargets.length===0;Ha(i.observationTargets,n)<0&&(a&&ln.push(i),i.observationTargets.push(new Tc(n,o&&o.box)),La(1),Mo.schedule())},e.unobserve=function(t,n){var o=Ir.get(t),i=Ha(o.observationTargets,n),a=o.observationTargets.length===1;i>=0&&(a&&ln.splice(ln.indexOf(o),1),o.observationTargets.splice(i,1),La(-1))},e.disconnect=function(t){var n=this,o=Ir.get(t);o.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),o.activeTargets.splice(0,o.activeTargets.length)},e}(),Pc=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.");Ar.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(!Ea(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.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(!Ea(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.unobserve(this,t)},e.prototype.disconnect=function(){Ar.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class Rc{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Pc)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const o=this.elHandlersMap.get(n.target);o!==void 0&&o(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 Or=new Rc,Gt=r.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=r.getCurrentInstance().proxy;function o(i){const{onResize:a}=e;a!==void 0&&a(i)}r.onMounted(()=>{const i=n.$el;if(i===void 0){ya("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ya("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Or.registerHandler(i.nextElementSibling,o),t=!0)}),r.onBeforeUnmount(()=>{t&&Or.unregisterHandler(n.$el.nextElementSibling)})},render(){return r.renderSlot(this.$slots,"default")}});let Dr;function Ec(){return typeof document>"u"?!1:(Dr===void 0&&("matchMedia"in window?Dr=window.matchMedia("(pointer:coarse)").matches:Dr=!1),Dr)}let Fo;function Na(){return typeof document>"u"?1:(Fo===void 0&&(Fo="chrome"in window?window.devicePixelRatio:1),Fo)}const Wa="VVirtualListXScroll";function Bc({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const o=r.ref(0),i=r.ref(0),a=r.computed(()=>{const c=e.value;if(c.length===0)return null;const f=new Ca(c.length,0);return c.forEach((u,p)=>{f.add(p,u.width)}),f}),s=He(()=>{const c=a.value;return c!==null?Math.max(c.getBound(i.value)-1,0):0}),l=c=>{const f=a.value;return f!==null?f.sum(c):0},d=He(()=>{const c=a.value;return c!==null?Math.min(c.getBound(i.value+o.value)+1,e.value.length-1):0});return r.provide(Wa,{startIndexRef:s,endIndexRef:d,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:l}),{listWidthRef:o,scrollLeftRef:i}}const ja=r.defineComponent({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:o,renderColRef:i,renderItemWithColsRef:a}=r.inject(Wa);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:a,getLeft:o}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:o,renderItemWithCols:i,getLeft:a,item:s}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:s,getLeft:a});if(o!=null){const l=[];for(let d=e;d<=t;++d){const c=n[d];l.push(o({column:c,left:a(d),item:s}))}return l}return null}}),_c=St(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[St("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[St("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Mc=r.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,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=Ut();_c.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Er,ssr:t}),r.onMounted(()=>{const{defaultScrollIndex:O,defaultScrollKey:W}=e;O!=null?w({index:O}):W!=null&&w({key:W})});let n=!1,o=!1;r.onActivated(()=>{if(n=!1,!o){o=!0;return}w({top:m.value,left:s.value})}),r.onDeactivated(()=>{n=!0,o||(o=!0)});const i=He(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let O=0;return e.columns.forEach(W=>{O+=W.width}),O}),a=r.computed(()=>{const O=new Map,{keyField:W}=e;return e.items.forEach((L,Z)=>{O.set(L[W],Z)}),O}),{scrollLeftRef:s,listWidthRef:l}=Bc({columnsRef:r.toRef(e,"columns"),renderColRef:r.toRef(e,"renderCol"),renderItemWithColsRef:r.toRef(e,"renderItemWithCols")}),d=r.ref(null),c=r.ref(void 0),f=new Map,u=r.computed(()=>{const{items:O,itemSize:W,keyField:L}=e,Z=new Ca(O.length,W);return O.forEach((Y,ie)=>{const oe=Y[L],te=f.get(oe);te!==void 0&&Z.add(ie,te)}),Z}),p=r.ref(0),m=r.ref(0),h=He(()=>Math.max(u.value.getBound(m.value-ot(e.paddingTop))-1,0)),y=r.computed(()=>{const{value:O}=c;if(O===void 0)return[];const{items:W,itemSize:L}=e,Z=h.value,Y=Math.min(Z+Math.ceil(O/L+1),W.length-1),ie=[];for(let oe=Z;oe<=Y;++oe)ie.push(W[oe]);return ie}),w=(O,W)=>{if(typeof O=="number"){$(O,W,"auto");return}const{left:L,top:Z,index:Y,key:ie,position:oe,behavior:te,debounce:ce=!0}=O;if(L!==void 0||Z!==void 0)$(L,Z,te);else if(Y!==void 0)F(Y,te,ce);else if(ie!==void 0){const j=a.value.get(ie);j!==void 0&&F(j,te,ce)}else oe==="bottom"?$(0,Number.MAX_SAFE_INTEGER,te):oe==="top"&&$(0,0,te)};let g,z=null;function F(O,W,L){const{value:Z}=u,Y=Z.sum(O)+ot(e.paddingTop);if(!L)d.value.scrollTo({left:0,top:Y,behavior:W});else{g=O,z!==null&&window.clearTimeout(z),z=window.setTimeout(()=>{g=void 0,z=null},16);const{scrollTop:ie,offsetHeight:oe}=d.value;if(Y>ie){const te=Z.get(O);Y+te<=ie+oe||d.value.scrollTo({left:0,top:Y+te-oe,behavior:W})}else d.value.scrollTo({left:0,top:Y,behavior:W})}}function $(O,W,L){d.value.scrollTo({left:O,top:W,behavior:L})}function k(O,W){var L,Z,Y;if(n||e.ignoreItemResize||G(W.target))return;const{value:ie}=u,oe=a.value.get(O),te=ie.get(oe),ce=(Y=(Z=(L=W.borderBoxSize)===null||L===void 0?void 0:L[0])===null||Z===void 0?void 0:Z.blockSize)!==null&&Y!==void 0?Y:W.contentRect.height;if(ce===te)return;ce-e.itemSize===0?f.delete(O):f.set(O,ce-e.itemSize);const ee=ce-te;if(ee===0)return;ie.add(oe,ee);const fe=d.value;if(fe!=null){if(g===void 0){const ye=ie.sum(oe);fe.scrollTop>ye&&fe.scrollBy(0,ee)}else if(oe<g)fe.scrollBy(0,ee);else if(oe===g){const ye=ie.sum(oe);ce+ye>fe.scrollTop+fe.offsetHeight&&fe.scrollBy(0,ee)}q()}p.value++}const M=!Ec();let b=!1;function S(O){var W;(W=e.onScroll)===null||W===void 0||W.call(e,O),(!M||!b)&&q()}function _(O){var W;if((W=e.onWheel)===null||W===void 0||W.call(e,O),M){const L=d.value;if(L!=null){if(O.deltaX===0&&(L.scrollTop===0&&O.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&O.deltaY>=0))return;O.preventDefault(),L.scrollTop+=O.deltaY/Na(),L.scrollLeft+=O.deltaX/Na(),q(),b=!0,na(()=>{b=!1})}}}function D(O){if(n||G(O.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(O.contentRect.height===c.value)return}else if(O.contentRect.height===c.value&&O.contentRect.width===l.value)return;c.value=O.contentRect.height,l.value=O.contentRect.width;const{onResize:W}=e;W!==void 0&&W(O)}function q(){const{value:O}=d;O!=null&&(m.value=O.scrollTop,s.value=O.scrollLeft)}function G(O){let W=O;for(;W!==null;){if(W.style.display==="none")return!0;W=W.parentElement}return!1}return{listHeight:c,listStyle:{overflow:"auto"},keyToIndex:a,itemsStyle:r.computed(()=>{const{itemResizable:O}=e,W=Vt(u.value.sum());return p.value,[e.itemsStyle,{boxSizing:"content-box",width:Vt(i.value),height:O?"":W,minHeight:O?W:"",paddingTop:Vt(e.paddingTop),paddingBottom:Vt(e.paddingBottom)}]}),visibleItemsStyle:r.computed(()=>(p.value,{transform:`translateY(${Vt(u.value.sum(h.value))})`})),viewportItems:y,listElRef:d,itemsElRef:r.ref(null),scrollTo:w,handleListResize:D,handleListScroll:S,handleListWheel:_,handleItemResize:k}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return r.h(Gt,{onResize:this.handleListResize},{default:()=>{var i,a;return r.h("div",r.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?r.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[r.h(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:s,renderItemWithCols:l}=this;return this.viewportItems.map(d=>{const c=d[t],f=n.get(c),u=s!=null?r.h(ja,{index:f,item:d}):void 0,p=l!=null?r.h(ja,{index:f,item:d}):void 0,m=this.$slots.default({item:d,renderedCols:u,renderedItemWithCols:p,index:f})[0];return e?r.h(Gt,{key:c,onResize:h=>this.handleItemResize(c,h)},{default:()=>m}):(m.key=c,m)})}})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Fc=St(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[St("&::-webkit-scrollbar",{width:0,height:0})]),Ic=r.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=r.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=Ut();return Fc.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Er,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return r.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),_t="v-hidden",Ac=St("[v-hidden]",{display:"none!important"}),Ua=r.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=r.ref(null),o=r.ref(null);function i(s){const{value:l}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=o.value,!l||!f)return;f.hasAttribute(_t)&&f.removeAttribute(_t);const{children:u}=l;if(s.showAllItemsBeforeCalculate)for(const F of u)F.hasAttribute(_t)&&F.removeAttribute(_t);const p=l.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let y=h?h.offsetWidth:0,w=!1;const g=l.children.length-(t.tail?1:0);for(let F=0;F<g-1;++F){if(F<0)continue;const $=u[F];if(w){$.hasAttribute(_t)||$.setAttribute(_t,"");continue}else $.hasAttribute(_t)&&$.removeAttribute(_t);const k=$.offsetWidth;if(y+=k,m[F]=k,y>p){const{updateCounter:M}=e;for(let b=F;b>=0;--b){const S=g-1-b;M!==void 0?M(S):f.textContent=`${S}`;const _=f.offsetWidth;if(y-=m[b],y+_<=p||b===0){w=!0,F=b-1,h&&(F===-1?(h.style.maxWidth=`${p-_}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:D}=e;D&&D(S);break}}}}const{onUpdateOverflow:z}=e;w?z!==void 0&&z(!0):(z!==void 0&&z(!1),f.setAttribute(_t,""))}const a=Ut();return Ac.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Er,ssr:a}),r.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:i}},render(){const{$slots:e}=this;return r.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),r.h("div",{class:"v-overflow",ref:"selfRef"},[r.renderSlot(e,"default"),e.counter?e.counter():r.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Ga(e){return e instanceof HTMLElement}function Ka(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Ga(n)&&(Xa(n)||Ka(n)))return!0}return!1}function qa(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Ga(n)&&(Xa(n)||qa(n)))return!0}return!1}function Xa(e){if(!Oc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Oc(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 Xn=[];const Dc=r.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=Fd(),n=r.ref(null),o=r.ref(null);let i=!1,a=!1;const s=typeof document>"u"?null:document.activeElement;function l(){return Xn[Xn.length-1]===t}function d(w){var g;w.code==="Escape"&&l()&&((g=e.onEsc)===null||g===void 0||g.call(e,w))}r.onMounted(()=>{r.watch(()=>e.active,w=>{w?(u(),Pe("keydown",document,d)):(ke("keydown",document,d),i&&p())},{immediate:!0})}),r.onBeforeUnmount(()=>{ke("keydown",document,d),i&&p()});function c(w){if(!a&&l()){const g=f();if(g===null||g.contains(kn(w)))return;m("first")}}function f(){const w=n.value;if(w===null)return null;let g=w;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function u(){var w;if(!e.disabled){if(Xn.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?m("first"):(w=Sa(g))===null||w===void 0||w.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function p(){var w;if(e.disabled||(document.removeEventListener("focus",c,!0),Xn=Xn.filter(z=>z!==t),l()))return;const{finalFocusTo:g}=e;g!==void 0?(w=Sa(g))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&s instanceof HTMLElement&&(a=!0,s.focus({preventScroll:!0}),a=!1)}function m(w){if(l()&&e.active){const g=n.value,z=o.value;if(g!==null&&z!==null){const F=f();if(F==null||F===z){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=w==="first"?Ka(F):qa(F);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(w){if(a)return;const g=f();g!==null&&(w.relatedTarget!==null&&g.contains(w.relatedTarget)?m("last"):m("first"))}function y(w){a||(w.relatedTarget!==null&&w.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:o,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:y}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return r.h(r.Fragment,null,[r.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),r.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function Ya(e,t){t&&(r.onMounted(()=>{const{value:n}=e;n&&Or.registerHandler(n,t)}),r.onBeforeUnmount(()=>{const{value:n}=e;n&&Or.unregisterHandler(n)}))}function Vr(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const Vc=/^(\d|\.)+$/,Za=/(\d|\.)+/;function Lr(e,{c:t=1,offset:n=0,attachPx:o=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(Vc.test(e)){const i=(Number(e)+n)*t;return o?i===0?"0":`${i}px`:`${i}`}else{const i=Za.exec(e);return i?e.replace(Za,String((Number(i[0])+n)*t)):e}return e}function Ja(e){const{left:t,right:n,top:o,bottom:i}=dt(e);return`${o} ${n} ${i} ${t}`}let Io;function Lc(){return Io===void 0&&(Io=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Io}const Hc=new WeakSet;function Nc(e){Hc.add(e)}function Qa(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}const el=new Set;function Qe(e,t){const n=`[naive/${e}]: ${t}`;el.has(n)||(el.add(n),console.error(n))}function Yn(e,t){console.error(`[naive/${e}]: ${t}`)}function Ao(e,t){throw new Error(`[naive/${e}]: ${t}`)}function pe(e,...t){if(Array.isArray(e))e.forEach(n=>pe(n,...t));else return e(...t)}function _n(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){_n(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&_n(o.children,t,n)}else{if(o.type===r.Comment&&t)return;n.push(o)}}}),n}function tl(e,t="default",n=void 0){const o=e[t];if(!o)return Yn("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=_n(o(n));return i.length===1?i[0]:(Yn("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function Wc(e,t=[],n){const o={};return t.forEach(i=>{o[i]=e[i]}),Object.assign(o,n)}function Oo(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}function jc(e,t=[],n){const o={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(o[a]=e[a])}),Object.assign(o,n)}function dn(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?r.createTextVNode(e):typeof e=="number"?r.createTextVNode(String(e)):null}function Zn(e){return e.some(t=>r.isVNode(t)?!(t.type===r.Comment||t.type===r.Fragment&&!Zn(t.children)):!0)?e:null}function kt(e,t){return e&&Zn(e())||t()}function Uc(e,t,n){return e&&Zn(e(t))||n(t)}function Ae(e,t){const n=e&&Zn(e());return t(n||null)}function Mn(e){return!(e&&Zn(e()))}const Do=r.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),cn="n-config-provider",Gc="n";function Je(e={},t={defaultBordered:!0}){const n=r.inject(cn,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:r.computed(()=>{var o,i;const{bordered:a}=e;return a!==void 0?a:(i=(o=n==null?void 0:n.mergedBorderedRef.value)!==null&&o!==void 0?o:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:r.shallowRef(Gc),namespaceRef:r.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function tt(e,t,n,o){n||Ao("useThemeClass","cssVarsRef is not passed");const i=r.inject(cn,null),a=i==null?void 0:i.mergedThemeHashRef,s=i==null?void 0:i.styleMountTarget,l=r.ref(""),d=Ut();let c;const f=`__${e}`,u=()=>{let p=f;const m=t?t.value:void 0,h=a==null?void 0:a.value;h&&(p+=`-${h}`),m&&(p+=`-${m}`);const{themeOverrides:y,builtinThemeOverrides:w}=o;y&&(p+=`-${fo(JSON.stringify(y))}`),w&&(p+=`-${fo(JSON.stringify(w))}`),l.value=p,c=()=>{const g=n.value;let z="";for(const F in g)z+=`${F}: ${g[F]};`;V(`.${p}`,z).mount({id:p,ssr:d,parent:s}),c=void 0}};return r.watchEffect(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}const nl="n-form-item";function un(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:o}={}){const i=r.inject(nl,null);r.provide(nl,null);const a=r.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}),s=r.computed(o?()=>o(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),l=r.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return r.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:s,mergedStatusRef:l,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const Kc={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Vo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Jn(e){return(t,n)=>{const o=n!=null&&n.context?String(n.context):"standalone";let i;if(o==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):s;i=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function Qn(e){return(t,n={})=>{const o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?Xc(l,u=>u.test(s)):qc(l,u=>u.test(s));let c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(s.length);return{value:c,rest:f}}}function qc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Xc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Yc(e){return(t,n={})=>{const o=t.match(e.matchPattern);if(!o)return null;const i=o[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const l=t.slice(i.length);return{value:s,rest:l}}}const Zc={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"}},Jc=(e,t,n)=>{let o;const i=Zc[e];return typeof i=="string"?o=i:t===1?o=i.one:o=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},Qc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eu=(e,t,n,o)=>Qc[e],tu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nu={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ru={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"]},ou={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"]},iu={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"}},au={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"}},lu={ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Jn({values:tu,defaultWidth:"wide"}),quarter:Jn({values:nu,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Jn({values:ru,defaultWidth:"wide"}),day:Jn({values:ou,defaultWidth:"wide"}),dayPeriod:Jn({values:iu,defaultWidth:"wide",formattingValues:au,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,du=/\d+/i,cu={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},uu={any:[/^b/i,/^(a|c)/i]},fu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hu={any:[/1/i,/2/i,/3/i,/4/i]},pu={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},bu={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]},gu={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},mu={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]},vu={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},xu={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}},yu={ordinalNumber:Yc({matchPattern:su,parsePattern:du,valueCallback:e=>parseInt(e,10)}),era:Qn({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:Qn({matchPatterns:fu,defaultMatchWidth:"wide",parsePatterns:hu,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Qn({matchPatterns:pu,defaultMatchWidth:"wide",parsePatterns:bu,defaultParseWidth:"any"}),day:Qn({matchPatterns:gu,defaultMatchWidth:"wide",parsePatterns:mu,defaultParseWidth:"any"}),dayPeriod:Qn({matchPatterns:vu,defaultMatchWidth:"any",parsePatterns:xu,defaultParseWidth:"any"})},wu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Su={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$u={date:Vo({formats:wu,defaultWidth:"full"}),time:Vo({formats:Cu,defaultWidth:"full"}),dateTime:Vo({formats:Su,defaultWidth:"full"})},ku={name:"en-US",locale:{code:"en-US",formatDistance:Jc,formatLong:$u,formatRelative:eu,localize:lu,match:yu,options:{weekStartsOn:0,firstWeekContainsDate:1}}};var rl=typeof global=="object"&&global&&global.Object===Object&&global,Tu=typeof self=="object"&&self&&self.Object===Object&&self,bt=rl||Tu||Function("return this")(),Kt=bt.Symbol,ol=Object.prototype,zu=ol.hasOwnProperty,Pu=ol.toString,er=Kt?Kt.toStringTag:void 0;function Ru(e){var t=zu.call(e,er),n=e[er];try{e[er]=void 0;var o=!0}catch{}var i=Pu.call(e);return o&&(t?e[er]=n:delete e[er]),i}var Eu=Object.prototype,Bu=Eu.toString;function _u(e){return Bu.call(e)}var Mu="[object Null]",Fu="[object Undefined]",il=Kt?Kt.toStringTag:void 0;function fn(e){return e==null?e===void 0?Fu:Mu:il&&il in Object(e)?Ru(e):_u(e)}function qt(e){return e!=null&&typeof e=="object"}var Iu="[object Symbol]";function Hr(e){return typeof e=="symbol"||qt(e)&&fn(e)==Iu}function al(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var ft=Array.isArray,Au=1/0,ll=Kt?Kt.prototype:void 0,sl=ll?ll.toString:void 0;function dl(e){if(typeof e=="string")return e;if(ft(e))return al(e,dl)+"";if(Hr(e))return sl?sl.call(e):"";var t=e+"";return t=="0"&&1/e==-Au?"-0":t}var Ou=/\s/;function Du(e){for(var t=e.length;t--&&Ou.test(e.charAt(t)););return t}var Vu=/^\s+/;function Lu(e){return e&&e.slice(0,Du(e)+1).replace(Vu,"")}function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cl=NaN,Hu=/^[-+]0x[0-9a-f]+$/i,Nu=/^0b[01]+$/i,Wu=/^0o[0-7]+$/i,ju=parseInt;function ul(e){if(typeof e=="number")return e;if(Hr(e))return cl;if(ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Lu(e);var n=Nu.test(e);return n||Wu.test(e)?ju(e.slice(2),n?2:8):Hu.test(e)?cl:+e}function Lo(e){return e}var Uu="[object AsyncFunction]",Gu="[object Function]",Ku="[object GeneratorFunction]",qu="[object Proxy]";function Ho(e){if(!ht(e))return!1;var t=fn(e);return t==Gu||t==Ku||t==Uu||t==qu}var No=bt["__core-js_shared__"],fl=function(){var e=/[^.]+$/.exec(No&&No.keys&&No.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xu(e){return!!fl&&fl in e}var Yu=Function.prototype,Zu=Yu.toString;function hn(e){if(e!=null){try{return Zu.call(e)}catch{}try{return e+""}catch{}}return""}var Ju=/[\\^$.*+?()[\]{}|]/g,Qu=/^\[object .+?Constructor\]$/,ef=Function.prototype,tf=Object.prototype,nf=ef.toString,rf=tf.hasOwnProperty,of=RegExp("^"+nf.call(rf).replace(Ju,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function af(e){if(!ht(e)||Xu(e))return!1;var t=Ho(e)?of:Qu;return t.test(hn(e))}function lf(e,t){return e==null?void 0:e[t]}function pn(e,t){var n=lf(e,t);return af(n)?n:void 0}var Wo=pn(bt,"WeakMap"),hl=Object.create,sf=function(){function e(){}return function(t){if(!ht(t))return{};if(hl)return hl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function df(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 cf(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var uf=800,ff=16,hf=Date.now;function pf(e){var t=0,n=0;return function(){var o=hf(),i=ff-(o-n);if(n=o,i>0){if(++t>=uf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bf(e){return function(){return e}}var Nr=function(){try{var e=pn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),gf=Nr?function(e,t){return Nr(e,"toString",{configurable:!0,enumerable:!1,value:bf(t),writable:!0})}:Lo,mf=pf(gf),vf=9007199254740991,xf=/^(?:0|[1-9]\d*)$/;function jo(e,t){var n=typeof e;return t=t??vf,!!t&&(n=="number"||n!="symbol"&&xf.test(e))&&e>-1&&e%1==0&&e<t}function Uo(e,t,n){t=="__proto__"&&Nr?Nr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function tr(e,t){return e===t||e!==e&&t!==t}var yf=Object.prototype,wf=yf.hasOwnProperty;function Cf(e,t,n){var o=e[t];(!(wf.call(e,t)&&tr(o,n))||n===void 0&&!(t in e))&&Uo(e,t,n)}function Sf(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],d=void 0;d===void 0&&(d=e[l]),i?Uo(n,l,d):Cf(n,l,d)}return n}var pl=Math.max;function $f(e,t,n){return t=pl(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=pl(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=n(s),df(e,this,l)}}function kf(e,t){return mf($f(e,t,Lo),e+"")}var Tf=9007199254740991;function Go(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Tf}function Fn(e){return e!=null&&Go(e.length)&&!Ho(e)}function zf(e,t,n){if(!ht(n))return!1;var o=typeof t;return(o=="number"?Fn(n)&&jo(t,n.length):o=="string"&&t in n)?tr(n[t],e):!1}function Pf(e){return kf(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&zf(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=n[o];l&&e(t,l,o,a)}return t})}var Rf=Object.prototype;function Ko(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Rf;return e===n}function Ef(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Bf="[object Arguments]";function bl(e){return qt(e)&&fn(e)==Bf}var gl=Object.prototype,_f=gl.hasOwnProperty,Mf=gl.propertyIsEnumerable,Wr=bl(function(){return arguments}())?bl:function(e){return qt(e)&&_f.call(e,"callee")&&!Mf.call(e,"callee")};function Ff(){return!1}var ml=typeof je=="object"&&je&&!je.nodeType&&je,vl=ml&&typeof module=="object"&&module&&!module.nodeType&&module,If=vl&&vl.exports===ml,xl=If?bt.Buffer:void 0,Af=xl?xl.isBuffer:void 0,jr=Af||Ff,Of="[object Arguments]",Df="[object Array]",Vf="[object Boolean]",Lf="[object Date]",Hf="[object Error]",Nf="[object Function]",Wf="[object Map]",jf="[object Number]",Uf="[object Object]",Gf="[object RegExp]",Kf="[object Set]",qf="[object String]",Xf="[object WeakMap]",Yf="[object ArrayBuffer]",Zf="[object DataView]",Jf="[object Float32Array]",Qf="[object Float64Array]",eh="[object Int8Array]",th="[object Int16Array]",nh="[object Int32Array]",rh="[object Uint8Array]",oh="[object Uint8ClampedArray]",ih="[object Uint16Array]",ah="[object Uint32Array]",Oe={};Oe[Jf]=Oe[Qf]=Oe[eh]=Oe[th]=Oe[nh]=Oe[rh]=Oe[oh]=Oe[ih]=Oe[ah]=!0,Oe[Of]=Oe[Df]=Oe[Yf]=Oe[Vf]=Oe[Zf]=Oe[Lf]=Oe[Hf]=Oe[Nf]=Oe[Wf]=Oe[jf]=Oe[Uf]=Oe[Gf]=Oe[Kf]=Oe[qf]=Oe[Xf]=!1;function lh(e){return qt(e)&&Go(e.length)&&!!Oe[fn(e)]}function sh(e){return function(t){return e(t)}}var yl=typeof je=="object"&&je&&!je.nodeType&&je,nr=yl&&typeof module=="object"&&module&&!module.nodeType&&module,dh=nr&&nr.exports===yl,qo=dh&&rl.process,wl=function(){try{var e=nr&&nr.require&&nr.require("util").types;return e||qo&&qo.binding&&qo.binding("util")}catch{}}(),Cl=wl&&wl.isTypedArray,Xo=Cl?sh(Cl):lh,ch=Object.prototype,uh=ch.hasOwnProperty;function Sl(e,t){var n=ft(e),o=!n&&Wr(e),i=!n&&!o&&jr(e),a=!n&&!o&&!i&&Xo(e),s=n||o||i||a,l=s?Ef(e.length,String):[],d=l.length;for(var c in e)(t||uh.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jo(c,d)))&&l.push(c);return l}function $l(e,t){return function(n){return e(t(n))}}var fh=$l(Object.keys,Object),hh=Object.prototype,ph=hh.hasOwnProperty;function bh(e){if(!Ko(e))return fh(e);var t=[];for(var n in Object(e))ph.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yo(e){return Fn(e)?Sl(e):bh(e)}function gh(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mh=Object.prototype,vh=mh.hasOwnProperty;function xh(e){if(!ht(e))return gh(e);var t=Ko(e),n=[];for(var o in e)o=="constructor"&&(t||!vh.call(e,o))||n.push(o);return n}function kl(e){return Fn(e)?Sl(e,!0):xh(e)}var yh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/;function Zo(e,t){if(ft(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Hr(e)?!0:wh.test(e)||!yh.test(e)||t!=null&&e in Object(t)}var rr=pn(Object,"create");function Ch(){this.__data__=rr?rr(null):{},this.size=0}function Sh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $h="__lodash_hash_undefined__",kh=Object.prototype,Th=kh.hasOwnProperty;function zh(e){var t=this.__data__;if(rr){var n=t[e];return n===$h?void 0:n}return Th.call(t,e)?t[e]:void 0}var Ph=Object.prototype,Rh=Ph.hasOwnProperty;function Eh(e){var t=this.__data__;return rr?t[e]!==void 0:Rh.call(t,e)}var Bh="__lodash_hash_undefined__";function _h(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rr&&t===void 0?Bh:t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}bn.prototype.clear=Ch,bn.prototype.delete=Sh,bn.prototype.get=zh,bn.prototype.has=Eh,bn.prototype.set=_h;function Mh(){this.__data__=[],this.size=0}function Ur(e,t){for(var n=e.length;n--;)if(tr(e[n][0],t))return n;return-1}var Fh=Array.prototype,Ih=Fh.splice;function Ah(e){var t=this.__data__,n=Ur(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Ih.call(t,n,1),--this.size,!0}function Oh(e){var t=this.__data__,n=Ur(t,e);return n<0?void 0:t[n][1]}function Dh(e){return Ur(this.__data__,e)>-1}function Vh(e,t){var n=this.__data__,o=Ur(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Mt.prototype.clear=Mh,Mt.prototype.delete=Ah,Mt.prototype.get=Oh,Mt.prototype.has=Dh,Mt.prototype.set=Vh;var or=pn(bt,"Map");function Lh(){this.size=0,this.__data__={hash:new bn,map:new(or||Mt),string:new bn}}function Hh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gr(e,t){var n=e.__data__;return Hh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Nh(e){var t=Gr(this,e).delete(e);return this.size-=t?1:0,t}function Wh(e){return Gr(this,e).get(e)}function jh(e){return Gr(this,e).has(e)}function Uh(e,t){var n=Gr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Ft(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ft.prototype.clear=Lh,Ft.prototype.delete=Nh,Ft.prototype.get=Wh,Ft.prototype.has=jh,Ft.prototype.set=Uh;var Gh="Expected a function";function Jo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Gh);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Jo.Cache||Ft),n}Jo.Cache=Ft;var Kh=500;function qh(e){var t=Jo(e,function(o){return n.size===Kh&&n.clear(),o}),n=t.cache;return t}var Xh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yh=/\\(\\)?/g,Zh=qh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Xh,function(n,o,i,a){t.push(i?a.replace(Yh,"$1"):o||n)}),t});function Tl(e){return e==null?"":dl(e)}function zl(e,t){return ft(e)?e:Zo(e,t)?[e]:Zh(Tl(e))}var Jh=1/0;function Kr(e){if(typeof e=="string"||Hr(e))return e;var t=e+"";return t=="0"&&1/e==-Jh?"-0":t}function Pl(e,t){t=zl(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Kr(t[n++])];return n&&n==o?e:void 0}function Qh(e,t,n){var o=e==null?void 0:Pl(e,t);return o===void 0?n:o}function ep(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Rl=$l(Object.getPrototypeOf,Object),tp="[object Object]",np=Function.prototype,rp=Object.prototype,El=np.toString,op=rp.hasOwnProperty,ip=El.call(Object);function ap(e){if(!qt(e)||fn(e)!=tp)return!1;var t=Rl(e);if(t===null)return!0;var n=op.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&El.call(n)==ip}function lp(e,t,n){var o=-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);++o<i;)a[o]=e[o+t];return a}function sp(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:lp(e,t,n)}var dp="\\ud800-\\udfff",cp="\\u0300-\\u036f",up="\\ufe20-\\ufe2f",fp="\\u20d0-\\u20ff",hp=cp+up+fp,pp="\\ufe0e\\ufe0f",bp="\\u200d",gp=RegExp("["+bp+dp+hp+pp+"]");function Bl(e){return gp.test(e)}function mp(e){return e.split("")}var _l="\\ud800-\\udfff",vp="\\u0300-\\u036f",xp="\\ufe20-\\ufe2f",yp="\\u20d0-\\u20ff",wp=vp+xp+yp,Cp="\\ufe0e\\ufe0f",Sp="["+_l+"]",Qo="["+wp+"]",ei="\\ud83c[\\udffb-\\udfff]",$p="(?:"+Qo+"|"+ei+")",Ml="[^"+_l+"]",Fl="(?:\\ud83c[\\udde6-\\uddff]){2}",Il="[\\ud800-\\udbff][\\udc00-\\udfff]",kp="\\u200d",Al=$p+"?",Ol="["+Cp+"]?",Tp="(?:"+kp+"(?:"+[Ml,Fl,Il].join("|")+")"+Ol+Al+")*",zp=Ol+Al+Tp,Pp="(?:"+[Ml+Qo+"?",Qo,Fl,Il,Sp].join("|")+")",Rp=RegExp(ei+"(?="+ei+")|"+Pp+zp,"g");function Ep(e){return e.match(Rp)||[]}function Bp(e){return Bl(e)?Ep(e):mp(e)}function _p(e){return function(t){t=Tl(t);var n=Bl(t)?Bp(t):void 0,o=n?n[0]:t.charAt(0),i=n?sp(n,1).join(""):t.slice(1);return o[e]()+i}}var Mp=_p("toUpperCase");function Fp(){this.__data__=new Mt,this.size=0}function Ip(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ap(e){return this.__data__.get(e)}function Op(e){return this.__data__.has(e)}var Dp=200;function Vp(e,t){var n=this.__data__;if(n instanceof Mt){var o=n.__data__;if(!or||o.length<Dp-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ft(o)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new Mt(e);this.size=t.size}Tt.prototype.clear=Fp,Tt.prototype.delete=Ip,Tt.prototype.get=Ap,Tt.prototype.has=Op,Tt.prototype.set=Vp;var Dl=typeof je=="object"&&je&&!je.nodeType&&je,Vl=Dl&&typeof module=="object"&&module&&!module.nodeType&&module,Lp=Vl&&Vl.exports===Dl,Ll=Lp?bt.Buffer:void 0;Ll&&Ll.allocUnsafe;function Hp(e,t){return e.slice()}function Np(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}function Wp(){return[]}var jp=Object.prototype,Up=jp.propertyIsEnumerable,Hl=Object.getOwnPropertySymbols,Gp=Hl?function(e){return e==null?[]:(e=Object(e),Np(Hl(e),function(t){return Up.call(e,t)}))}:Wp;function Kp(e,t,n){var o=t(e);return ft(e)?o:ep(o,n(e))}function Nl(e){return Kp(e,Yo,Gp)}var ti=pn(bt,"DataView"),ni=pn(bt,"Promise"),ri=pn(bt,"Set"),Wl="[object Map]",qp="[object Object]",jl="[object Promise]",Ul="[object Set]",Gl="[object WeakMap]",Kl="[object DataView]",Xp=hn(ti),Yp=hn(or),Zp=hn(ni),Jp=hn(ri),Qp=hn(Wo),Xt=fn;(ti&&Xt(new ti(new ArrayBuffer(1)))!=Kl||or&&Xt(new or)!=Wl||ni&&Xt(ni.resolve())!=jl||ri&&Xt(new ri)!=Ul||Wo&&Xt(new Wo)!=Gl)&&(Xt=function(e){var t=fn(e),n=t==qp?e.constructor:void 0,o=n?hn(n):"";if(o)switch(o){case Xp:return Kl;case Yp:return Wl;case Zp:return jl;case Jp:return Ul;case Qp:return Gl}return t});var qr=bt.Uint8Array;function eb(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t}function tb(e,t){var n=eb(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function nb(e){return typeof e.constructor=="function"&&!Ko(e)?sf(Rl(e)):{}}var rb="__lodash_hash_undefined__";function ob(e){return this.__data__.set(e,rb),this}function ib(e){return this.__data__.has(e)}function Xr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ft;++t<n;)this.add(e[t])}Xr.prototype.add=Xr.prototype.push=ob,Xr.prototype.has=ib;function ab(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function lb(e,t){return e.has(t)}var sb=1,db=2;function ql(e,t,n,o,i,a){var s=n&sb,l=e.length,d=t.length;if(l!=d&&!(s&&d>l))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,p=!0,m=n&db?new Xr:void 0;for(a.set(e,t),a.set(t,e);++u<l;){var h=e[u],y=t[u];if(o)var w=s?o(y,h,u,t,e,a):o(h,y,u,e,t,a);if(w!==void 0){if(w)continue;p=!1;break}if(m){if(!ab(t,function(g,z){if(!lb(m,z)&&(h===g||i(h,g,n,o,a)))return m.push(z)})){p=!1;break}}else if(!(h===y||i(h,y,n,o,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function cb(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}function ub(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var fb=1,hb=2,pb="[object Boolean]",bb="[object Date]",gb="[object Error]",mb="[object Map]",vb="[object Number]",xb="[object RegExp]",yb="[object Set]",wb="[object String]",Cb="[object Symbol]",Sb="[object ArrayBuffer]",$b="[object DataView]",Xl=Kt?Kt.prototype:void 0,oi=Xl?Xl.valueOf:void 0;function kb(e,t,n,o,i,a,s){switch(n){case $b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Sb:return!(e.byteLength!=t.byteLength||!a(new qr(e),new qr(t)));case pb:case bb:case vb:return tr(+e,+t);case gb:return e.name==t.name&&e.message==t.message;case xb:case wb:return e==t+"";case mb:var l=cb;case yb:var d=o&fb;if(l||(l=ub),e.size!=t.size&&!d)return!1;var c=s.get(e);if(c)return c==t;o|=hb,s.set(e,t);var f=ql(l(e),l(t),o,i,a,s);return s.delete(e),f;case Cb:if(oi)return oi.call(e)==oi.call(t)}return!1}var Tb=1,zb=Object.prototype,Pb=zb.hasOwnProperty;function Rb(e,t,n,o,i,a){var s=n&Tb,l=Nl(e),d=l.length,c=Nl(t),f=c.length;if(d!=f&&!s)return!1;for(var u=d;u--;){var p=l[u];if(!(s?p in t:Pb.call(t,p)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=s;++u<d;){p=l[u];var g=e[p],z=t[p];if(o)var F=s?o(z,g,p,t,e,a):o(g,z,p,e,t,a);if(!(F===void 0?g===z||i(g,z,n,o,a):F)){y=!1;break}w||(w=p=="constructor")}if(y&&!w){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(y=!1)}return a.delete(e),a.delete(t),y}var Eb=1,Yl="[object Arguments]",Zl="[object Array]",Yr="[object Object]",Bb=Object.prototype,Jl=Bb.hasOwnProperty;function _b(e,t,n,o,i,a){var s=ft(e),l=ft(t),d=s?Zl:Xt(e),c=l?Zl:Xt(t);d=d==Yl?Yr:d,c=c==Yl?Yr:c;var f=d==Yr,u=c==Yr,p=d==c;if(p&&jr(e)){if(!jr(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Tt),s||Xo(e)?ql(e,t,n,o,i,a):kb(e,t,d,n,o,i,a);if(!(n&Eb)){var m=f&&Jl.call(e,"__wrapped__"),h=u&&Jl.call(t,"__wrapped__");if(m||h){var y=m?e.value():e,w=h?t.value():t;return a||(a=new Tt),i(y,w,n,o,a)}}return p?(a||(a=new Tt),Rb(e,t,n,o,i,a)):!1}function ii(e,t,n,o,i){return e===t?!0:e==null||t==null||!qt(e)&&!qt(t)?e!==e&&t!==t:_b(e,t,n,o,ii,i)}var Mb=1,Fb=2;function Ib(e,t,n,o){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],d=e[l],c=s[1];if(s[2]){if(d===void 0&&!(l in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ii(c,d,Mb|Fb,o,f):u))return!1}}return!0}function Ql(e){return e===e&&!ht(e)}function Ab(e){for(var t=Yo(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,Ql(i)]}return t}function es(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Ob(e){var t=Ab(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(n){return n===e||Ib(n,e,t)}}function Db(e,t){return e!=null&&t in Object(e)}function Vb(e,t,n){t=zl(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Kr(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Go(i)&&jo(s,i)&&(ft(e)||Wr(e)))}function Lb(e,t){return e!=null&&Vb(e,t,Db)}var Hb=1,Nb=2;function Wb(e,t){return Zo(e)&&Ql(t)?es(Kr(e),t):function(n){var o=Qh(n,e);return o===void 0&&o===t?Lb(n,e):ii(t,o,Hb|Nb)}}function jb(e){return function(t){return t==null?void 0:t[e]}}function Ub(e){return function(t){return Pl(t,e)}}function Gb(e){return Zo(e)?jb(Kr(e)):Ub(e)}function Kb(e){return typeof e=="function"?e:e==null?Lo:typeof e=="object"?ft(e)?Wb(e[0],e[1]):Ob(e):Gb(e)}function qb(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var d=s[++i];if(n(a[d],d,a)===!1)break}return t}}var ts=qb();function Xb(e,t){return e&&ts(e,t,Yo)}function Yb(e,t){return function(n,o){if(n==null)return n;if(!Fn(n))return e(n,o);for(var i=n.length,a=-1,s=Object(n);++a<i&&o(s[a],a,s)!==!1;);return n}}var Zb=Yb(Xb),ai=function(){return bt.Date.now()},Jb="Expected a function",Qb=Math.max,eg=Math.min;function tg(e,t,n){var o,i,a,s,l,d,c=0,f=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(Jb);t=ul(t)||0,ht(n)&&(f=!!n.leading,u="maxWait"in n,a=u?Qb(ul(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function m(M){var b=o,S=i;return o=i=void 0,c=M,s=e.apply(S,b),s}function h(M){return c=M,l=setTimeout(g,t),f?m(M):s}function y(M){var b=M-d,S=M-c,_=t-b;return u?eg(_,a-S):_}function w(M){var b=M-d,S=M-c;return d===void 0||b>=t||b<0||u&&S>=a}function g(){var M=ai();if(w(M))return z(M);l=setTimeout(g,y(M))}function z(M){return l=void 0,p&&o?m(M):(o=i=void 0,s)}function F(){l!==void 0&&clearTimeout(l),c=0,o=d=i=l=void 0}function $(){return l===void 0?s:z(ai())}function k(){var M=ai(),b=w(M);if(o=arguments,i=this,d=M,b){if(l===void 0)return h(d);if(u)return clearTimeout(l),l=setTimeout(g,t),m(d)}return l===void 0&&(l=setTimeout(g,t)),s}return k.cancel=F,k.flush=$,k}function li(e,t,n){(n!==void 0&&!tr(e[t],n)||n===void 0&&!(t in e))&&Uo(e,t,n)}function ng(e){return qt(e)&&Fn(e)}function si(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function rg(e){return Sf(e,kl(e))}function og(e,t,n,o,i,a,s){var l=si(e,n),d=si(t,n),c=s.get(d);if(c){li(e,n,c);return}var f=a?a(l,d,n+"",e,t,s):void 0,u=f===void 0;if(u){var p=ft(d),m=!p&&jr(d),h=!p&&!m&&Xo(d);f=d,p||m||h?ft(l)?f=l:ng(l)?f=cf(l):m?(u=!1,f=Hp(d)):h?(u=!1,f=tb(d)):f=[]:ap(d)||Wr(d)?(f=l,Wr(l)?f=rg(l):(!ht(l)||Ho(l))&&(f=nb(d))):u=!1}u&&(s.set(d,f),i(f,d,o,a,s),s.delete(d)),li(e,n,f)}function ns(e,t,n,o,i){e!==t&&ts(t,function(a,s){if(i||(i=new Tt),ht(a))og(e,t,s,n,ns,o,i);else{var l=o?o(si(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),li(e,s,l)}},kl)}function ig(e,t){var n=-1,o=Fn(e)?Array(e.length):[];return Zb(e,function(i,a,s){o[++n]=t(i,a,s)}),o}function ag(e,t){var n=ft(e)?al:ig;return n(e,Kb(t))}var Zr=Pf(function(e,t,n){ns(e,t,n)}),lg="Expected a function";function di(e,t,n){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(lg);return ht(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),tg(e,t,{leading:o,maxWait:t,trailing:i})}function ir(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=r.inject(cn,null)||{},o=r.computed(()=>{var a,s;return(s=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&s!==void 0?s:Kc[e]});return{dateLocaleRef:r.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:ku}),localeRef:o}}const ar="naive-ui-style";function Yt(e,t,n){if(!t)return;const o=Ut(),i=r.computed(()=>{const{value:l}=t;if(!l)return;const d=l[e];if(d)return d}),a=r.inject(cn,null),s=()=>{r.watchEffect(()=>{const{value:l}=n,d=`${l}${e}Rtl`;if(Sd(d,o))return;const{value:c}=i;c&&c.style.mount({id:d,head:!0,anchorMetaName:ar,props:{bPrefix:l?`.${l}-`:void 0},ssr:o,parent:a==null?void 0:a.styleMountTarget})})};return o?s():r.onBeforeMount(s),i}const gn={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:sg,fontFamily:dg,lineHeight:cg}=gn,rs=V("body",`
|
|
15
|
+
</style>`}function Jd(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Zd(e,t)))}const Qd=typeof document<"u";function Ut(){if(Qd)return;const e=r.inject(Yd,null);if(e!==null)return{adapter:(t,n)=>Jd(t,n,e),context:e}}function ya(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:St}=Ji(),Er="vueuc-style";function wa(e){return e&-e}class Ca{constructor(t,n){this.l=t,this.min=n;const o=new Array(t+1);for(let i=0;i<t+1;++i)o[i]=0;this.ft=o}add(t,n){if(n===0)return;const{l:o,ft:i}=this;for(t+=1;t<=o;)i[t]+=n,t+=wa(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:o,l:i}=this;if(t>i)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let a=t*o;for(;t>0;)a+=n[t],t-=wa(t);return a}getBound(t){let n=0,o=this.l;for(;o>n;){const i=Math.floor((n+o)/2),a=this.sum(i);if(a>t){o=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 Sa(e){return typeof e=="string"?document.querySelector(e):e()}const ec=r.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Ld(r.toRef(e,"show")),mergedTo:r.computed(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?ko("lazy-teleport",this.$slots):r.h(r.Teleport,{disabled:this.disabled,to:this.mergedTo},ko("lazy-teleport",this.$slots)):null}}),Br={top:"bottom",bottom:"top",left:"right",right:"left"},$a={start:"end",center:"center",end:"start"},Ro={top:"height",bottom:"height",left:"width",right:"width"},tc={"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"},nc={"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"},ka={top:!0,bottom:!1,left:!0,right:!1},Ta={top:"end",bottom:"start",left:"end",right:"start"};function oc(e,t,n,o,i,a){if(!i||a)return{placement:e,top:0,left:0};const[s,l]=e.split("-");let d=l??"center",c={top:0,left:0};const f=(m,h,y)=>{let w=0,g=0;const z=n[m]-t[h]-t[m];return z>0&&o&&(y?g=ka[h]?z:-z:w=ka[h]?z:-z),{left:w,top:g}},u=s==="left"||s==="right";if(d!=="center"){const m=rc[e],h=Br[m],y=Ro[m];if(n[y]>t[y]){if(t[m]+t[y]<n[y]){const w=(n[y]-t[y])/2;t[m]<w||t[h]<w?t[m]<t[h]?(d=$a[l],c=f(y,h,u)):c=f(y,m,u):d="center"}}else n[y]<t[y]&&t[h]<0&&t[m]>t[h]&&(d=$a[l])}else{const m=s==="bottom"||s==="top"?"left":"top",h=Br[m],y=Ro[m],w=(n[y]-t[y])/2;(t[m]<w||t[h]<w)&&(t[m]>t[h]?(d=Ta[m],c=f(y,m,u)):(d=Ta[h],c=f(y,h,u)))}let p=s;return t[s]<n[Ro[s]]&&t[s]<t[Br[s]]&&(p=Br[s]),{placement:d!=="center"?`${p}-${d}`:p,left:c.left,top:c.top}}function ic(e,t){return t?nc[e]:tc[e]}function ac(e,t,n,o,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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:""};case"bottom-end":return{top:`${Math.round(n.top-t.top+n.height+o)}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+o)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:"translateY(-100%)"};case"top-end":return{top:`${Math.round(n.top-t.top+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}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+o)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:"translateX(-50%)"}}}const lc=St([St(".v-binder-follower-container",{position:"absolute",left:"0",right:"0",top:"0",height:"0",pointerEvents:"none",zIndex:"auto"}),St(".v-binder-follower-content",{position:"absolute",zIndex:"auto"},[St("> *",{pointerEvents:"all"})])]),_r=r.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=r.inject("VBinder"),n=He(()=>e.enabled!==void 0?e.enabled:e.show),o=r.ref(null),i=r.ref(null),a=()=>{const{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(d),p.includes("resize")&&t.addResizeListener(d)},s=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};r.onMounted(()=>{n.value&&(d(),a())});const l=Ut();lc.mount({id:"vueuc/binder",head:!0,anchorMetaName:Er,ssr:l}),r.onBeforeUnmount(()=>{s()}),ca(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const p=o.value;if(p===null)return;const m=t.targetRef,{x:h,y,overlap:w}=e,g=h!==void 0&&y!==void 0?Ud(h,y):zo(m);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);const{width:z,minWidth:F,placement:$,internalShift:k,flip:M}=e;p.setAttribute("v-placement",$),w?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");const{style:b}=p;z==="target"?b.width=`${g.width}px`:z!==void 0?b.width=z:b.width="",F==="target"?b.minWidth=`${g.width}px`:F!==void 0?b.minWidth=F:b.minWidth="";const S=zo(p),_=zo(i.value),{left:D,top:q,placement:G}=oc($,g,S,k,M,w),O=ic(G,w),{left:W,top:L,transform:Z}=ac(G,_,g,q,D,w);p.setAttribute("v-placement",G),p.style.setProperty("--v-offset-left",`${Math.round(D)}px`),p.style.setProperty("--v-offset-top",`${Math.round(q)}px`),p.style.transform=`translateX(${W}) translateY(${L}) ${Z}`,p.style.setProperty("--v-transform-origin",O),p.style.transformOrigin=O};r.watch(n,p=>{p?(a(),c()):s()});const c=()=>{r.nextTick().then(d).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{r.watch(r.toRef(e,p),d)}),["teleportDisabled"].forEach(p=>{r.watch(r.toRef(e,p),c)}),r.watch(r.toRef(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),p.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const f=zn(),u=He(()=>{const{to:p}=e;if(p!==void 0)return p;f.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:o,mergedTo:u,syncPosition:d}},render(){return r.h(ec,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=r.h("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[r.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?r.withDirectives(n,[[xa,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var ln=[],sc=function(){return ln.some(function(e){return e.activeTargets.length>0})},dc=function(){return ln.some(function(e){return e.skippedTargets.length>0})},za="ResizeObserver loop completed with undelivered notifications.",cc=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:za}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=za),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 sn=function(e){return Object.freeze(e)},uc=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,sn(this)}return e}(),Pa=function(){function e(t,n,o,i){return this.x=t,this.y=n,this.width=o,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,sn(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,o=t.y,i=t.top,a=t.right,s=t.bottom,l=t.left,d=t.width,c=t.height;return{x:n,y:o,top:i,right:a,bottom:s,left:l,width:d,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Eo=function(e){return e instanceof SVGElement&&"getBBox"in e},Ra=function(e){if(Eo(e)){var t=e.getBBox(),n=t.width,o=t.height;return!n&&!o}var i=e,a=i.offsetWidth,s=i.offsetHeight;return!(a||s||e.getClientRects().length)},Ea=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)},fc=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:{},Mr=new WeakMap,Ba=/auto|scroll/,hc=/^tb|vertical/,pc=/msie|trident/i.test(Xn.navigator&&Xn.navigator.userAgent),$t=function(e){return parseFloat(e||"0")},Bn=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new uc((n?t:e)||0,(n?e:t)||0)},_a=sn({devicePixelContentBoxSize:Bn(),borderBoxSize:Bn(),contentBoxSize:Bn(),contentRect:new Pa(0,0,0,0)}),Ma=function(e,t){if(t===void 0&&(t=!1),Mr.has(e)&&!t)return Mr.get(e);if(Ra(e))return Mr.set(e,_a),_a;var n=getComputedStyle(e),o=Eo(e)&&e.ownerSVGElement&&e.getBBox(),i=!pc&&n.boxSizing==="border-box",a=hc.test(n.writingMode||""),s=!o&&Ba.test(n.overflowY||""),l=!o&&Ba.test(n.overflowX||""),d=o?0:$t(n.paddingTop),c=o?0:$t(n.paddingRight),f=o?0:$t(n.paddingBottom),u=o?0:$t(n.paddingLeft),p=o?0:$t(n.borderTopWidth),m=o?0:$t(n.borderRightWidth),h=o?0:$t(n.borderBottomWidth),y=o?0:$t(n.borderLeftWidth),w=u+c,g=d+f,z=y+m,F=p+h,$=l?e.offsetHeight-F-e.clientHeight:0,k=s?e.offsetWidth-z-e.clientWidth:0,M=i?w+z:0,b=i?g+F:0,S=o?o.width:$t(n.width)-M-k,_=o?o.height:$t(n.height)-b-$,D=S+w+k+z,q=_+g+$+F,G=sn({devicePixelContentBoxSize:Bn(Math.round(S*devicePixelRatio),Math.round(_*devicePixelRatio),a),borderBoxSize:Bn(D,q,a),contentBoxSize:Bn(S,_,a),contentRect:new Pa(u,d,S,_)});return Mr.set(e,G),G},Fa=function(e,t,n){var o=Ma(e,n),i=o.borderBoxSize,a=o.contentBoxSize,s=o.devicePixelContentBoxSize;switch(t){case qn.DEVICE_PIXEL_CONTENT_BOX:return s;case qn.BORDER_BOX:return i;default:return a}},bc=function(){function e(t){var n=Ma(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=sn([n.borderBoxSize]),this.contentBoxSize=sn([n.contentBoxSize]),this.devicePixelContentBoxSize=sn([n.devicePixelContentBoxSize])}return e}(),Ia=function(e){if(Ra(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},gc=function(){var e=1/0,t=[];ln.forEach(function(s){if(s.activeTargets.length!==0){var l=[];s.activeTargets.forEach(function(c){var f=new bc(c.target),u=Ia(c.target);l.push(f),c.lastReportedSize=Fa(c.target,c.observedBox),u<e&&(e=u)}),t.push(function(){s.callback.call(s.observer,l,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,o=t;n<o.length;n++){var i=o[n];i()}return e},Aa=function(e){ln.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ia(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},mc=function(){var e=0;for(Aa(e);sc();)e=gc(),Aa(e);return dc()&&cc(),e>0},Bo,Oa=[],vc=function(){return Oa.splice(0).forEach(function(e){return e()})},xc=function(e){if(!Bo){var t=0,n=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return vc()}).observe(n,o),Bo=function(){n.textContent="".concat(t?t--:t++)}}Oa.push(e),Bo()},yc=function(e){xc(function(){requestAnimationFrame(e)})},Fr=0,wc=function(){return!!Fr},Cc=250,Sc={attributes:!0,characterData:!0,childList:!0,subtree:!0},Da=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Va=function(e){return e===void 0&&(e=0),Date.now()+e},_o=!1,$c=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=Cc),!_o){_o=!0;var o=Va(t);yc(function(){var i=!1;try{i=mc()}finally{if(_o=!1,t=o-Va(),!wc())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,Sc)};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(),Da.forEach(function(n){return Xn.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Da.forEach(function(n){return Xn.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),Mo=new $c,La=function(e){!Fr&&e>0&&Mo.start(),Fr+=e,!Fr&&Mo.stop()},kc=function(e){return!Eo(e)&&!fc(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=Fa(this.target,this.observedBox,!0);return kc(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),zc=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Ir=new WeakMap,Ha=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ar=function(){function e(){}return e.connect=function(t,n){var o=new zc(t,n);Ir.set(t,o)},e.observe=function(t,n,o){var i=Ir.get(t),a=i.observationTargets.length===0;Ha(i.observationTargets,n)<0&&(a&&ln.push(i),i.observationTargets.push(new Tc(n,o&&o.box)),La(1),Mo.schedule())},e.unobserve=function(t,n){var o=Ir.get(t),i=Ha(o.observationTargets,n),a=o.observationTargets.length===1;i>=0&&(a&&ln.splice(ln.indexOf(o),1),o.observationTargets.splice(i,1),La(-1))},e.disconnect=function(t){var n=this,o=Ir.get(t);o.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),o.activeTargets.splice(0,o.activeTargets.length)},e}(),Pc=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.");Ar.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(!Ea(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.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(!Ea(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ar.unobserve(this,t)},e.prototype.disconnect=function(){Ar.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class Rc{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Pc)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const o=this.elHandlersMap.get(n.target);o!==void 0&&o(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 Or=new Rc,Gt=r.defineComponent({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=r.getCurrentInstance().proxy;function o(i){const{onResize:a}=e;a!==void 0&&a(i)}r.onMounted(()=>{const i=n.$el;if(i===void 0){ya("resize-observer","$el does not exist.");return}if(i.nextElementSibling!==i.nextSibling&&i.nodeType===3&&i.nodeValue!==""){ya("resize-observer","$el can not be observed (it may be a text node).");return}i.nextElementSibling!==null&&(Or.registerHandler(i.nextElementSibling,o),t=!0)}),r.onBeforeUnmount(()=>{t&&Or.unregisterHandler(n.$el.nextElementSibling)})},render(){return r.renderSlot(this.$slots,"default")}});let Dr;function Ec(){return typeof document>"u"?!1:(Dr===void 0&&("matchMedia"in window?Dr=window.matchMedia("(pointer:coarse)").matches:Dr=!1),Dr)}let Fo;function Na(){return typeof document>"u"?1:(Fo===void 0&&(Fo="chrome"in window?window.devicePixelRatio:1),Fo)}const Wa="VVirtualListXScroll";function Bc({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){const o=r.ref(0),i=r.ref(0),a=r.computed(()=>{const c=e.value;if(c.length===0)return null;const f=new Ca(c.length,0);return c.forEach((u,p)=>{f.add(p,u.width)}),f}),s=He(()=>{const c=a.value;return c!==null?Math.max(c.getBound(i.value)-1,0):0}),l=c=>{const f=a.value;return f!==null?f.sum(c):0},d=He(()=>{const c=a.value;return c!==null?Math.min(c.getBound(i.value+o.value)+1,e.value.length-1):0});return r.provide(Wa,{startIndexRef:s,endIndexRef:d,columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:l}),{listWidthRef:o,scrollLeftRef:i}}const ja=r.defineComponent({name:"VirtualListRow",props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){const{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:o,renderColRef:i,renderItemWithColsRef:a}=r.inject(Wa);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:a,getLeft:o}},render(){const{startIndex:e,endIndex:t,columns:n,renderCol:o,renderItemWithCols:i,getLeft:a,item:s}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:s,getLeft:a});if(o!=null){const l=[];for(let d=e;d<=t;++d){const c=n[d];l.push(o({column:c,left:a(d),item:s}))}return l}return null}}),_c=St(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[St("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[St("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Mc=r.defineComponent({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,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=Ut();_c.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Er,ssr:t}),r.onMounted(()=>{const{defaultScrollIndex:O,defaultScrollKey:W}=e;O!=null?w({index:O}):W!=null&&w({key:W})});let n=!1,o=!1;r.onActivated(()=>{if(n=!1,!o){o=!0;return}w({top:m.value,left:s.value})}),r.onDeactivated(()=>{n=!0,o||(o=!0)});const i=He(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let O=0;return e.columns.forEach(W=>{O+=W.width}),O}),a=r.computed(()=>{const O=new Map,{keyField:W}=e;return e.items.forEach((L,Z)=>{O.set(L[W],Z)}),O}),{scrollLeftRef:s,listWidthRef:l}=Bc({columnsRef:r.toRef(e,"columns"),renderColRef:r.toRef(e,"renderCol"),renderItemWithColsRef:r.toRef(e,"renderItemWithCols")}),d=r.ref(null),c=r.ref(void 0),f=new Map,u=r.computed(()=>{const{items:O,itemSize:W,keyField:L}=e,Z=new Ca(O.length,W);return O.forEach((Y,ie)=>{const oe=Y[L],te=f.get(oe);te!==void 0&&Z.add(ie,te)}),Z}),p=r.ref(0),m=r.ref(0),h=He(()=>Math.max(u.value.getBound(m.value-ot(e.paddingTop))-1,0)),y=r.computed(()=>{const{value:O}=c;if(O===void 0)return[];const{items:W,itemSize:L}=e,Z=h.value,Y=Math.min(Z+Math.ceil(O/L+1),W.length-1),ie=[];for(let oe=Z;oe<=Y;++oe)ie.push(W[oe]);return ie}),w=(O,W)=>{if(typeof O=="number"){$(O,W,"auto");return}const{left:L,top:Z,index:Y,key:ie,position:oe,behavior:te,debounce:ce=!0}=O;if(L!==void 0||Z!==void 0)$(L,Z,te);else if(Y!==void 0)F(Y,te,ce);else if(ie!==void 0){const j=a.value.get(ie);j!==void 0&&F(j,te,ce)}else oe==="bottom"?$(0,Number.MAX_SAFE_INTEGER,te):oe==="top"&&$(0,0,te)};let g,z=null;function F(O,W,L){const{value:Z}=u,Y=Z.sum(O)+ot(e.paddingTop);if(!L)d.value.scrollTo({left:0,top:Y,behavior:W});else{g=O,z!==null&&window.clearTimeout(z),z=window.setTimeout(()=>{g=void 0,z=null},16);const{scrollTop:ie,offsetHeight:oe}=d.value;if(Y>ie){const te=Z.get(O);Y+te<=ie+oe||d.value.scrollTo({left:0,top:Y+te-oe,behavior:W})}else d.value.scrollTo({left:0,top:Y,behavior:W})}}function $(O,W,L){d.value.scrollTo({left:O,top:W,behavior:L})}function k(O,W){var L,Z,Y;if(n||e.ignoreItemResize||G(W.target))return;const{value:ie}=u,oe=a.value.get(O),te=ie.get(oe),ce=(Y=(Z=(L=W.borderBoxSize)===null||L===void 0?void 0:L[0])===null||Z===void 0?void 0:Z.blockSize)!==null&&Y!==void 0?Y:W.contentRect.height;if(ce===te)return;ce-e.itemSize===0?f.delete(O):f.set(O,ce-e.itemSize);const ee=ce-te;if(ee===0)return;ie.add(oe,ee);const fe=d.value;if(fe!=null){if(g===void 0){const ye=ie.sum(oe);fe.scrollTop>ye&&fe.scrollBy(0,ee)}else if(oe<g)fe.scrollBy(0,ee);else if(oe===g){const ye=ie.sum(oe);ce+ye>fe.scrollTop+fe.offsetHeight&&fe.scrollBy(0,ee)}q()}p.value++}const M=!Ec();let b=!1;function S(O){var W;(W=e.onScroll)===null||W===void 0||W.call(e,O),(!M||!b)&&q()}function _(O){var W;if((W=e.onWheel)===null||W===void 0||W.call(e,O),M){const L=d.value;if(L!=null){if(O.deltaX===0&&(L.scrollTop===0&&O.deltaY<=0||L.scrollTop+L.offsetHeight>=L.scrollHeight&&O.deltaY>=0))return;O.preventDefault(),L.scrollTop+=O.deltaY/Na(),L.scrollLeft+=O.deltaX/Na(),q(),b=!0,na(()=>{b=!1})}}}function D(O){if(n||G(O.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(O.contentRect.height===c.value)return}else if(O.contentRect.height===c.value&&O.contentRect.width===l.value)return;c.value=O.contentRect.height,l.value=O.contentRect.width;const{onResize:W}=e;W!==void 0&&W(O)}function q(){const{value:O}=d;O!=null&&(m.value=O.scrollTop,s.value=O.scrollLeft)}function G(O){let W=O;for(;W!==null;){if(W.style.display==="none")return!0;W=W.parentElement}return!1}return{listHeight:c,listStyle:{overflow:"auto"},keyToIndex:a,itemsStyle:r.computed(()=>{const{itemResizable:O}=e,W=Vt(u.value.sum());return p.value,[e.itemsStyle,{boxSizing:"content-box",width:Vt(i.value),height:O?"":W,minHeight:O?W:"",paddingTop:Vt(e.paddingTop),paddingBottom:Vt(e.paddingBottom)}]}),visibleItemsStyle:r.computed(()=>(p.value,{transform:`translateY(${Vt(u.value.sum(h.value))})`})),viewportItems:y,listElRef:d,itemsElRef:r.ref(null),scrollTo:w,handleListResize:D,handleListScroll:S,handleListWheel:_,handleItemResize:k}},render(){const{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:o}=this;return r.h(Gt,{onResize:this.handleListResize},{default:()=>{var i,a;return r.h("div",r.mergeProps(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:"listElRef"}),[this.items.length!==0?r.h("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[r.h(o,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{const{renderCol:s,renderItemWithCols:l}=this;return this.viewportItems.map(d=>{const c=d[t],f=n.get(c),u=s!=null?r.h(ja,{index:f,item:d}):void 0,p=l!=null?r.h(ja,{index:f,item:d}):void 0,m=this.$slots.default({item:d,renderedCols:u,renderedItemWithCols:p,index:f})[0];return e?r.h(Gt,{key:c,onResize:h=>this.handleItemResize(c,h)},{default:()=>m}):(m.key=c,m)})}})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Fc=St(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[St("&::-webkit-scrollbar",{width:0,height:0})]),Ic=r.defineComponent({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=r.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=Ut();return Fc.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:Er,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...i){var a;(a=e.value)===null||a===void 0||a.scrollTo(...i)}})},render(){return r.h("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}}),_t="v-hidden",Ac=St("[v-hidden]",{display:"none!important"}),Ua=r.defineComponent({name:"Overflow",props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){const n=r.ref(null),o=r.ref(null);function i(s){const{value:l}=n,{getCounter:d,getTail:c}=e;let f;if(d!==void 0?f=d():f=o.value,!l||!f)return;f.hasAttribute(_t)&&f.removeAttribute(_t);const{children:u}=l;if(s.showAllItemsBeforeCalculate)for(const F of u)F.hasAttribute(_t)&&F.removeAttribute(_t);const p=l.offsetWidth,m=[],h=t.tail?c==null?void 0:c():null;let y=h?h.offsetWidth:0,w=!1;const g=l.children.length-(t.tail?1:0);for(let F=0;F<g-1;++F){if(F<0)continue;const $=u[F];if(w){$.hasAttribute(_t)||$.setAttribute(_t,"");continue}else $.hasAttribute(_t)&&$.removeAttribute(_t);const k=$.offsetWidth;if(y+=k,m[F]=k,y>p){const{updateCounter:M}=e;for(let b=F;b>=0;--b){const S=g-1-b;M!==void 0?M(S):f.textContent=`${S}`;const _=f.offsetWidth;if(y-=m[b],y+_<=p||b===0){w=!0,F=b-1,h&&(F===-1?(h.style.maxWidth=`${p-_}px`,h.style.boxSizing="border-box"):h.style.maxWidth="");const{onUpdateCount:D}=e;D&&D(S);break}}}}const{onUpdateOverflow:z}=e;w?z!==void 0&&z(!0):(z!==void 0&&z(!1),f.setAttribute(_t,""))}const a=Ut();return Ac.mount({id:"vueuc/overflow",head:!0,anchorMetaName:Er,ssr:a}),r.onMounted(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:o,sync:i}},render(){const{$slots:e}=this;return r.nextTick(()=>this.sync({showAllItemsBeforeCalculate:!1})),r.h("div",{class:"v-overflow",ref:"selfRef"},[r.renderSlot(e,"default"),e.counter?e.counter():r.h("span",{style:{display:"inline-block"},ref:"counterRef"}),e.tail?e.tail():null])}});function Ga(e){return e instanceof HTMLElement}function Ka(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Ga(n)&&(Xa(n)||Ka(n)))return!0}return!1}function qa(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Ga(n)&&(Xa(n)||qa(n)))return!0}return!1}function Xa(e){if(!Oc(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Oc(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=r.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=Fd(),n=r.ref(null),o=r.ref(null);let i=!1,a=!1;const s=typeof document>"u"?null:document.activeElement;function l(){return Yn[Yn.length-1]===t}function d(w){var g;w.code==="Escape"&&l()&&((g=e.onEsc)===null||g===void 0||g.call(e,w))}r.onMounted(()=>{r.watch(()=>e.active,w=>{w?(u(),Pe("keydown",document,d)):(ke("keydown",document,d),i&&p())},{immediate:!0})}),r.onBeforeUnmount(()=>{ke("keydown",document,d),i&&p()});function c(w){if(!a&&l()){const g=f();if(g===null||g.contains(kn(w)))return;m("first")}}function f(){const w=n.value;if(w===null)return null;let g=w;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function u(){var w;if(!e.disabled){if(Yn.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?m("first"):(w=Sa(g))===null||w===void 0||w.focus({preventScroll:!0})}i=!0,document.addEventListener("focus",c,!0)}}function p(){var w;if(e.disabled||(document.removeEventListener("focus",c,!0),Yn=Yn.filter(z=>z!==t),l()))return;const{finalFocusTo:g}=e;g!==void 0?(w=Sa(g))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&s instanceof HTMLElement&&(a=!0,s.focus({preventScroll:!0}),a=!1)}function m(w){if(l()&&e.active){const g=n.value,z=o.value;if(g!==null&&z!==null){const F=f();if(F==null||F===z){a=!0,g.focus({preventScroll:!0}),a=!1;return}a=!0;const $=w==="first"?Ka(F):qa(F);a=!1,$||(a=!0,g.focus({preventScroll:!0}),a=!1)}}}function h(w){if(a)return;const g=f();g!==null&&(w.relatedTarget!==null&&g.contains(w.relatedTarget)?m("last"):m("first"))}function y(w){a||(w.relatedTarget!==null&&w.relatedTarget===n.value?m("last"):m("first"))}return{focusableStartRef:n,focusableEndRef:o,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:h,handleEndFocus:y}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return r.h(r.Fragment,null,[r.h("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),r.h("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function Ya(e,t){t&&(r.onMounted(()=>{const{value:n}=e;n&&Or.registerHandler(n,t)}),r.onBeforeUnmount(()=>{const{value:n}=e;n&&Or.unregisterHandler(n)}))}function Vr(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const Vc=/^(\d|\.)+$/,Za=/(\d|\.)+/;function Lr(e,{c:t=1,offset:n=0,attachPx:o=!0}={}){if(typeof e=="number"){const i=(e+n)*t;return i===0?"0":`${i}px`}else if(typeof e=="string")if(Vc.test(e)){const i=(Number(e)+n)*t;return o?i===0?"0":`${i}px`:`${i}`}else{const i=Za.exec(e);return i?e.replace(Za,String((Number(i[0])+n)*t)):e}return e}function Ja(e){const{left:t,right:n,top:o,bottom:i}=dt(e);return`${o} ${n} ${i} ${t}`}let Io;function Lc(){return Io===void 0&&(Io=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Io}const Hc=new WeakSet;function Nc(e){Hc.add(e)}function Qa(e){switch(typeof e){case"string":return e||void 0;case"number":return String(e);default:return}}const el=new Set;function Qe(e,t){const n=`[naive/${e}]: ${t}`;el.has(n)||(el.add(n),console.error(n))}function Zn(e,t){console.error(`[naive/${e}]: ${t}`)}function Ao(e,t){throw new Error(`[naive/${e}]: ${t}`)}function pe(e,...t){if(Array.isArray(e))e.forEach(n=>pe(n,...t));else return e(...t)}function _n(e,t=!0,n=[]){return e.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&n.push(r.createTextVNode(String(o)));return}if(Array.isArray(o)){_n(o,t,n);return}if(o.type===r.Fragment){if(o.children===null)return;Array.isArray(o.children)&&_n(o.children,t,n)}else{if(o.type===r.Comment&&t)return;n.push(o)}}}),n}function tl(e,t="default",n=void 0){const o=e[t];if(!o)return Zn("getFirstSlotVNode",`slot[${t}] is empty`),null;const i=_n(o(n));return i.length===1?i[0]:(Zn("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function Wc(e,t=[],n){const o={};return t.forEach(i=>{o[i]=e[i]}),Object.assign(o,n)}function Oo(e){const t=e.filter(n=>n!==void 0);if(t.length!==0)return t.length===1?t[0]:n=>{e.forEach(o=>{o&&o(n)})}}function jc(e,t=[],n){const o={};return Object.getOwnPropertyNames(e).forEach(a=>{t.includes(a)||(o[a]=e[a])}),Object.assign(o,n)}function dn(e,...t){return typeof e=="function"?e(...t):typeof e=="string"?r.createTextVNode(e):typeof e=="number"?r.createTextVNode(String(e)):null}function Jn(e){return e.some(t=>r.isVNode(t)?!(t.type===r.Comment||t.type===r.Fragment&&!Jn(t.children)):!0)?e:null}function kt(e,t){return e&&Jn(e())||t()}function Uc(e,t,n){return e&&Jn(e(t))||n(t)}function Ae(e,t){const n=e&&Jn(e());return t(n||null)}function Mn(e){return!(e&&Jn(e()))}const Do=r.defineComponent({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),cn="n-config-provider",Gc="n";function Je(e={},t={defaultBordered:!0}){const n=r.inject(cn,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:r.computed(()=>{var o,i;const{bordered:a}=e;return a!==void 0?a:(i=(o=n==null?void 0:n.mergedBorderedRef.value)!==null&&o!==void 0?o:t.defaultBordered)!==null&&i!==void 0?i:!0}),mergedClsPrefixRef:n?n.mergedClsPrefixRef:r.shallowRef(Gc),namespaceRef:r.computed(()=>n==null?void 0:n.mergedNamespaceRef.value)}}function tt(e,t,n,o){n||Ao("useThemeClass","cssVarsRef is not passed");const i=r.inject(cn,null),a=i==null?void 0:i.mergedThemeHashRef,s=i==null?void 0:i.styleMountTarget,l=r.ref(""),d=Ut();let c;const f=`__${e}`,u=()=>{let p=f;const m=t?t.value:void 0,h=a==null?void 0:a.value;h&&(p+=`-${h}`),m&&(p+=`-${m}`);const{themeOverrides:y,builtinThemeOverrides:w}=o;y&&(p+=`-${fo(JSON.stringify(y))}`),w&&(p+=`-${fo(JSON.stringify(w))}`),l.value=p,c=()=>{const g=n.value;let z="";for(const F in g)z+=`${F}: ${g[F]};`;V(`.${p}`,z).mount({id:p,ssr:d,parent:s}),c=void 0}};return r.watchEffect(()=>{u()}),{themeClass:l,onRender:()=>{c==null||c()}}}const nl="n-form-item";function un(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:o}={}){const i=r.inject(nl,null);r.provide(nl,null);const a=r.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}),s=r.computed(o?()=>o(i):()=>{const{disabled:d}=e;return d!==void 0?d:i?i.disabled.value:!1}),l=r.computed(()=>{const{status:d}=e;return d||(i==null?void 0:i.mergedValidationStatus.value)});return r.onBeforeUnmount(()=>{i&&i.restoreValidation()}),{mergedSizeRef:a,mergedDisabledRef:s,mergedStatusRef:l,nTriggerFormBlur(){i&&i.handleContentBlur()},nTriggerFormChange(){i&&i.handleContentChange()},nTriggerFormFocus(){i&&i.handleContentFocus()},nTriggerFormInput(){i&&i.handleContentInput()}}}const Kc={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function Vo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Qn(e){return(t,n)=>{const o=n!=null&&n.context?String(n.context):"standalone";let i;if(o==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):s;i=e.formattingValues[l]||e.formattingValues[s]}else{const s=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function er(e){return(t,n={})=>{const o=n.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(l)?Xc(l,u=>u.test(s)):qc(l,u=>u.test(s));let c;c=e.valueCallback?e.valueCallback(d):d,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(s.length);return{value:c,rest:f}}}function qc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Xc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Yc(e){return(t,n={})=>{const o=t.match(e.matchPattern);if(!o)return null;const i=o[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const l=t.slice(i.length);return{value:s,rest:l}}}const Zc={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"}},Jc=(e,t,n)=>{let o;const i=Zc[e];return typeof i=="string"?o=i:t===1?o=i.one:o=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},Qc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eu=(e,t,n,o)=>Qc[e],tu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nu={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ru={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"]},ou={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"]},iu={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"}},au={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"}},lu={ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Qn({values:tu,defaultWidth:"wide"}),quarter:Qn({values:nu,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qn({values:ru,defaultWidth:"wide"}),day:Qn({values:ou,defaultWidth:"wide"}),dayPeriod:Qn({values:iu,defaultWidth:"wide",formattingValues:au,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,du=/\d+/i,cu={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},uu={any:[/^b/i,/^(a|c)/i]},fu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hu={any:[/1/i,/2/i,/3/i,/4/i]},pu={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},bu={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]},gu={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},mu={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]},vu={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},xu={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}},yu={ordinalNumber:Yc({matchPattern:su,parsePattern:du,valueCallback:e=>parseInt(e,10)}),era:er({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:er({matchPatterns:fu,defaultMatchWidth:"wide",parsePatterns:hu,defaultParseWidth:"any",valueCallback:e=>e+1}),month:er({matchPatterns:pu,defaultMatchWidth:"wide",parsePatterns:bu,defaultParseWidth:"any"}),day:er({matchPatterns:gu,defaultMatchWidth:"wide",parsePatterns:mu,defaultParseWidth:"any"}),dayPeriod:er({matchPatterns:vu,defaultMatchWidth:"any",parsePatterns:xu,defaultParseWidth:"any"})},wu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Su={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$u={date:Vo({formats:wu,defaultWidth:"full"}),time:Vo({formats:Cu,defaultWidth:"full"}),dateTime:Vo({formats:Su,defaultWidth:"full"})},ku={name:"en-US",locale:{code:"en-US",formatDistance:Jc,formatLong:$u,formatRelative:eu,localize:lu,match:yu,options:{weekStartsOn:0,firstWeekContainsDate:1}}};var rl=typeof global=="object"&&global&&global.Object===Object&&global,Tu=typeof self=="object"&&self&&self.Object===Object&&self,bt=rl||Tu||Function("return this")(),Kt=bt.Symbol,ol=Object.prototype,zu=ol.hasOwnProperty,Pu=ol.toString,tr=Kt?Kt.toStringTag:void 0;function Ru(e){var t=zu.call(e,tr),n=e[tr];try{e[tr]=void 0;var o=!0}catch{}var i=Pu.call(e);return o&&(t?e[tr]=n:delete e[tr]),i}var Eu=Object.prototype,Bu=Eu.toString;function _u(e){return Bu.call(e)}var Mu="[object Null]",Fu="[object Undefined]",il=Kt?Kt.toStringTag:void 0;function fn(e){return e==null?e===void 0?Fu:Mu:il&&il in Object(e)?Ru(e):_u(e)}function qt(e){return e!=null&&typeof e=="object"}var Iu="[object Symbol]";function Hr(e){return typeof e=="symbol"||qt(e)&&fn(e)==Iu}function al(e,t){for(var n=-1,o=e==null?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}var ft=Array.isArray,Au=1/0,ll=Kt?Kt.prototype:void 0,sl=ll?ll.toString:void 0;function dl(e){if(typeof e=="string")return e;if(ft(e))return al(e,dl)+"";if(Hr(e))return sl?sl.call(e):"";var t=e+"";return t=="0"&&1/e==-Au?"-0":t}var Ou=/\s/;function Du(e){for(var t=e.length;t--&&Ou.test(e.charAt(t)););return t}var Vu=/^\s+/;function Lu(e){return e&&e.slice(0,Du(e)+1).replace(Vu,"")}function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cl=NaN,Hu=/^[-+]0x[0-9a-f]+$/i,Nu=/^0b[01]+$/i,Wu=/^0o[0-7]+$/i,ju=parseInt;function ul(e){if(typeof e=="number")return e;if(Hr(e))return cl;if(ht(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ht(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Lu(e);var n=Nu.test(e);return n||Wu.test(e)?ju(e.slice(2),n?2:8):Hu.test(e)?cl:+e}function Lo(e){return e}var Uu="[object AsyncFunction]",Gu="[object Function]",Ku="[object GeneratorFunction]",qu="[object Proxy]";function Ho(e){if(!ht(e))return!1;var t=fn(e);return t==Gu||t==Ku||t==Uu||t==qu}var No=bt["__core-js_shared__"],fl=function(){var e=/[^.]+$/.exec(No&&No.keys&&No.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xu(e){return!!fl&&fl in e}var Yu=Function.prototype,Zu=Yu.toString;function hn(e){if(e!=null){try{return Zu.call(e)}catch{}try{return e+""}catch{}}return""}var Ju=/[\\^$.*+?()[\]{}|]/g,Qu=/^\[object .+?Constructor\]$/,ef=Function.prototype,tf=Object.prototype,nf=ef.toString,rf=tf.hasOwnProperty,of=RegExp("^"+nf.call(rf).replace(Ju,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function af(e){if(!ht(e)||Xu(e))return!1;var t=Ho(e)?of:Qu;return t.test(hn(e))}function lf(e,t){return e==null?void 0:e[t]}function pn(e,t){var n=lf(e,t);return af(n)?n:void 0}var Wo=pn(bt,"WeakMap"),hl=Object.create,sf=function(){function e(){}return function(t){if(!ht(t))return{};if(hl)return hl(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function df(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 cf(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var uf=800,ff=16,hf=Date.now;function pf(e){var t=0,n=0;return function(){var o=hf(),i=ff-(o-n);if(n=o,i>0){if(++t>=uf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function bf(e){return function(){return e}}var Nr=function(){try{var e=pn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),gf=Nr?function(e,t){return Nr(e,"toString",{configurable:!0,enumerable:!1,value:bf(t),writable:!0})}:Lo,mf=pf(gf),vf=9007199254740991,xf=/^(?:0|[1-9]\d*)$/;function jo(e,t){var n=typeof e;return t=t??vf,!!t&&(n=="number"||n!="symbol"&&xf.test(e))&&e>-1&&e%1==0&&e<t}function Uo(e,t,n){t=="__proto__"&&Nr?Nr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function nr(e,t){return e===t||e!==e&&t!==t}var yf=Object.prototype,wf=yf.hasOwnProperty;function Cf(e,t,n){var o=e[t];(!(wf.call(e,t)&&nr(o,n))||n===void 0&&!(t in e))&&Uo(e,t,n)}function Sf(e,t,n,o){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var l=t[a],d=void 0;d===void 0&&(d=e[l]),i?Uo(n,l,d):Cf(n,l,d)}return n}var pl=Math.max;function $f(e,t,n){return t=pl(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=pl(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=n(s),df(e,this,l)}}function kf(e,t){return mf($f(e,t,Lo),e+"")}var Tf=9007199254740991;function Go(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Tf}function Fn(e){return e!=null&&Go(e.length)&&!Ho(e)}function zf(e,t,n){if(!ht(n))return!1;var o=typeof t;return(o=="number"?Fn(n)&&jo(t,n.length):o=="string"&&t in n)?nr(n[t],e):!1}function Pf(e){return kf(function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&zf(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=n[o];l&&e(t,l,o,a)}return t})}var Rf=Object.prototype;function Ko(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Rf;return e===n}function Ef(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Bf="[object Arguments]";function bl(e){return qt(e)&&fn(e)==Bf}var gl=Object.prototype,_f=gl.hasOwnProperty,Mf=gl.propertyIsEnumerable,Wr=bl(function(){return arguments}())?bl:function(e){return qt(e)&&_f.call(e,"callee")&&!Mf.call(e,"callee")};function Ff(){return!1}var ml=typeof je=="object"&&je&&!je.nodeType&&je,vl=ml&&typeof module=="object"&&module&&!module.nodeType&&module,If=vl&&vl.exports===ml,xl=If?bt.Buffer:void 0,Af=xl?xl.isBuffer:void 0,jr=Af||Ff,Of="[object Arguments]",Df="[object Array]",Vf="[object Boolean]",Lf="[object Date]",Hf="[object Error]",Nf="[object Function]",Wf="[object Map]",jf="[object Number]",Uf="[object Object]",Gf="[object RegExp]",Kf="[object Set]",qf="[object String]",Xf="[object WeakMap]",Yf="[object ArrayBuffer]",Zf="[object DataView]",Jf="[object Float32Array]",Qf="[object Float64Array]",eh="[object Int8Array]",th="[object Int16Array]",nh="[object Int32Array]",rh="[object Uint8Array]",oh="[object Uint8ClampedArray]",ih="[object Uint16Array]",ah="[object Uint32Array]",Oe={};Oe[Jf]=Oe[Qf]=Oe[eh]=Oe[th]=Oe[nh]=Oe[rh]=Oe[oh]=Oe[ih]=Oe[ah]=!0,Oe[Of]=Oe[Df]=Oe[Yf]=Oe[Vf]=Oe[Zf]=Oe[Lf]=Oe[Hf]=Oe[Nf]=Oe[Wf]=Oe[jf]=Oe[Uf]=Oe[Gf]=Oe[Kf]=Oe[qf]=Oe[Xf]=!1;function lh(e){return qt(e)&&Go(e.length)&&!!Oe[fn(e)]}function sh(e){return function(t){return e(t)}}var yl=typeof je=="object"&&je&&!je.nodeType&&je,rr=yl&&typeof module=="object"&&module&&!module.nodeType&&module,dh=rr&&rr.exports===yl,qo=dh&&rl.process,wl=function(){try{var e=rr&&rr.require&&rr.require("util").types;return e||qo&&qo.binding&&qo.binding("util")}catch{}}(),Cl=wl&&wl.isTypedArray,Xo=Cl?sh(Cl):lh,ch=Object.prototype,uh=ch.hasOwnProperty;function Sl(e,t){var n=ft(e),o=!n&&Wr(e),i=!n&&!o&&jr(e),a=!n&&!o&&!i&&Xo(e),s=n||o||i||a,l=s?Ef(e.length,String):[],d=l.length;for(var c in e)(t||uh.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jo(c,d)))&&l.push(c);return l}function $l(e,t){return function(n){return e(t(n))}}var fh=$l(Object.keys,Object),hh=Object.prototype,ph=hh.hasOwnProperty;function bh(e){if(!Ko(e))return fh(e);var t=[];for(var n in Object(e))ph.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yo(e){return Fn(e)?Sl(e):bh(e)}function gh(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var mh=Object.prototype,vh=mh.hasOwnProperty;function xh(e){if(!ht(e))return gh(e);var t=Ko(e),n=[];for(var o in e)o=="constructor"&&(t||!vh.call(e,o))||n.push(o);return n}function kl(e){return Fn(e)?Sl(e,!0):xh(e)}var yh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/;function Zo(e,t){if(ft(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Hr(e)?!0:wh.test(e)||!yh.test(e)||t!=null&&e in Object(t)}var or=pn(Object,"create");function Ch(){this.__data__=or?or(null):{},this.size=0}function Sh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var $h="__lodash_hash_undefined__",kh=Object.prototype,Th=kh.hasOwnProperty;function zh(e){var t=this.__data__;if(or){var n=t[e];return n===$h?void 0:n}return Th.call(t,e)?t[e]:void 0}var Ph=Object.prototype,Rh=Ph.hasOwnProperty;function Eh(e){var t=this.__data__;return or?t[e]!==void 0:Rh.call(t,e)}var Bh="__lodash_hash_undefined__";function _h(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=or&&t===void 0?Bh:t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}bn.prototype.clear=Ch,bn.prototype.delete=Sh,bn.prototype.get=zh,bn.prototype.has=Eh,bn.prototype.set=_h;function Mh(){this.__data__=[],this.size=0}function Ur(e,t){for(var n=e.length;n--;)if(nr(e[n][0],t))return n;return-1}var Fh=Array.prototype,Ih=Fh.splice;function Ah(e){var t=this.__data__,n=Ur(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Ih.call(t,n,1),--this.size,!0}function Oh(e){var t=this.__data__,n=Ur(t,e);return n<0?void 0:t[n][1]}function Dh(e){return Ur(this.__data__,e)>-1}function Vh(e,t){var n=this.__data__,o=Ur(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Mt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Mt.prototype.clear=Mh,Mt.prototype.delete=Ah,Mt.prototype.get=Oh,Mt.prototype.has=Dh,Mt.prototype.set=Vh;var ir=pn(bt,"Map");function Lh(){this.size=0,this.__data__={hash:new bn,map:new(ir||Mt),string:new bn}}function Hh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gr(e,t){var n=e.__data__;return Hh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Nh(e){var t=Gr(this,e).delete(e);return this.size-=t?1:0,t}function Wh(e){return Gr(this,e).get(e)}function jh(e){return Gr(this,e).has(e)}function Uh(e,t){var n=Gr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Ft(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ft.prototype.clear=Lh,Ft.prototype.delete=Nh,Ft.prototype.get=Wh,Ft.prototype.has=jh,Ft.prototype.set=Uh;var Gh="Expected a function";function Jo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Gh);var n=function(){var o=arguments,i=t?t.apply(this,o):o[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return n.cache=a.set(i,s)||a,s};return n.cache=new(Jo.Cache||Ft),n}Jo.Cache=Ft;var Kh=500;function qh(e){var t=Jo(e,function(o){return n.size===Kh&&n.clear(),o}),n=t.cache;return t}var Xh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yh=/\\(\\)?/g,Zh=qh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Xh,function(n,o,i,a){t.push(i?a.replace(Yh,"$1"):o||n)}),t});function Tl(e){return e==null?"":dl(e)}function zl(e,t){return ft(e)?e:Zo(e,t)?[e]:Zh(Tl(e))}var Jh=1/0;function Kr(e){if(typeof e=="string"||Hr(e))return e;var t=e+"";return t=="0"&&1/e==-Jh?"-0":t}function Pl(e,t){t=zl(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Kr(t[n++])];return n&&n==o?e:void 0}function Qh(e,t,n){var o=e==null?void 0:Pl(e,t);return o===void 0?n:o}function ep(e,t){for(var n=-1,o=t.length,i=e.length;++n<o;)e[i+n]=t[n];return e}var Rl=$l(Object.getPrototypeOf,Object),tp="[object Object]",np=Function.prototype,rp=Object.prototype,El=np.toString,op=rp.hasOwnProperty,ip=El.call(Object);function ap(e){if(!qt(e)||fn(e)!=tp)return!1;var t=Rl(e);if(t===null)return!0;var n=op.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&El.call(n)==ip}function lp(e,t,n){var o=-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);++o<i;)a[o]=e[o+t];return a}function sp(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:lp(e,t,n)}var dp="\\ud800-\\udfff",cp="\\u0300-\\u036f",up="\\ufe20-\\ufe2f",fp="\\u20d0-\\u20ff",hp=cp+up+fp,pp="\\ufe0e\\ufe0f",bp="\\u200d",gp=RegExp("["+bp+dp+hp+pp+"]");function Bl(e){return gp.test(e)}function mp(e){return e.split("")}var _l="\\ud800-\\udfff",vp="\\u0300-\\u036f",xp="\\ufe20-\\ufe2f",yp="\\u20d0-\\u20ff",wp=vp+xp+yp,Cp="\\ufe0e\\ufe0f",Sp="["+_l+"]",Qo="["+wp+"]",ei="\\ud83c[\\udffb-\\udfff]",$p="(?:"+Qo+"|"+ei+")",Ml="[^"+_l+"]",Fl="(?:\\ud83c[\\udde6-\\uddff]){2}",Il="[\\ud800-\\udbff][\\udc00-\\udfff]",kp="\\u200d",Al=$p+"?",Ol="["+Cp+"]?",Tp="(?:"+kp+"(?:"+[Ml,Fl,Il].join("|")+")"+Ol+Al+")*",zp=Ol+Al+Tp,Pp="(?:"+[Ml+Qo+"?",Qo,Fl,Il,Sp].join("|")+")",Rp=RegExp(ei+"(?="+ei+")|"+Pp+zp,"g");function Ep(e){return e.match(Rp)||[]}function Bp(e){return Bl(e)?Ep(e):mp(e)}function _p(e){return function(t){t=Tl(t);var n=Bl(t)?Bp(t):void 0,o=n?n[0]:t.charAt(0),i=n?sp(n,1).join(""):t.slice(1);return o[e]()+i}}var Mp=_p("toUpperCase");function Fp(){this.__data__=new Mt,this.size=0}function Ip(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ap(e){return this.__data__.get(e)}function Op(e){return this.__data__.has(e)}var Dp=200;function Vp(e,t){var n=this.__data__;if(n instanceof Mt){var o=n.__data__;if(!ir||o.length<Dp-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ft(o)}return n.set(e,t),this.size=n.size,this}function Tt(e){var t=this.__data__=new Mt(e);this.size=t.size}Tt.prototype.clear=Fp,Tt.prototype.delete=Ip,Tt.prototype.get=Ap,Tt.prototype.has=Op,Tt.prototype.set=Vp;var Dl=typeof je=="object"&&je&&!je.nodeType&&je,Vl=Dl&&typeof module=="object"&&module&&!module.nodeType&&module,Lp=Vl&&Vl.exports===Dl,Ll=Lp?bt.Buffer:void 0;Ll&&Ll.allocUnsafe;function Hp(e,t){return e.slice()}function Np(e,t){for(var n=-1,o=e==null?0:e.length,i=0,a=[];++n<o;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}function Wp(){return[]}var jp=Object.prototype,Up=jp.propertyIsEnumerable,Hl=Object.getOwnPropertySymbols,Gp=Hl?function(e){return e==null?[]:(e=Object(e),Np(Hl(e),function(t){return Up.call(e,t)}))}:Wp;function Kp(e,t,n){var o=t(e);return ft(e)?o:ep(o,n(e))}function Nl(e){return Kp(e,Yo,Gp)}var ti=pn(bt,"DataView"),ni=pn(bt,"Promise"),ri=pn(bt,"Set"),Wl="[object Map]",qp="[object Object]",jl="[object Promise]",Ul="[object Set]",Gl="[object WeakMap]",Kl="[object DataView]",Xp=hn(ti),Yp=hn(ir),Zp=hn(ni),Jp=hn(ri),Qp=hn(Wo),Xt=fn;(ti&&Xt(new ti(new ArrayBuffer(1)))!=Kl||ir&&Xt(new ir)!=Wl||ni&&Xt(ni.resolve())!=jl||ri&&Xt(new ri)!=Ul||Wo&&Xt(new Wo)!=Gl)&&(Xt=function(e){var t=fn(e),n=t==qp?e.constructor:void 0,o=n?hn(n):"";if(o)switch(o){case Xp:return Kl;case Yp:return Wl;case Zp:return jl;case Jp:return Ul;case Qp:return Gl}return t});var qr=bt.Uint8Array;function eb(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t}function tb(e,t){var n=eb(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function nb(e){return typeof e.constructor=="function"&&!Ko(e)?sf(Rl(e)):{}}var rb="__lodash_hash_undefined__";function ob(e){return this.__data__.set(e,rb),this}function ib(e){return this.__data__.has(e)}function Xr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ft;++t<n;)this.add(e[t])}Xr.prototype.add=Xr.prototype.push=ob,Xr.prototype.has=ib;function ab(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function lb(e,t){return e.has(t)}var sb=1,db=2;function ql(e,t,n,o,i,a){var s=n&sb,l=e.length,d=t.length;if(l!=d&&!(s&&d>l))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var u=-1,p=!0,m=n&db?new Xr:void 0;for(a.set(e,t),a.set(t,e);++u<l;){var h=e[u],y=t[u];if(o)var w=s?o(y,h,u,t,e,a):o(h,y,u,e,t,a);if(w!==void 0){if(w)continue;p=!1;break}if(m){if(!ab(t,function(g,z){if(!lb(m,z)&&(h===g||i(h,g,n,o,a)))return m.push(z)})){p=!1;break}}else if(!(h===y||i(h,y,n,o,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function cb(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}function ub(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var fb=1,hb=2,pb="[object Boolean]",bb="[object Date]",gb="[object Error]",mb="[object Map]",vb="[object Number]",xb="[object RegExp]",yb="[object Set]",wb="[object String]",Cb="[object Symbol]",Sb="[object ArrayBuffer]",$b="[object DataView]",Xl=Kt?Kt.prototype:void 0,oi=Xl?Xl.valueOf:void 0;function kb(e,t,n,o,i,a,s){switch(n){case $b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Sb:return!(e.byteLength!=t.byteLength||!a(new qr(e),new qr(t)));case pb:case bb:case vb:return nr(+e,+t);case gb:return e.name==t.name&&e.message==t.message;case xb:case wb:return e==t+"";case mb:var l=cb;case yb:var d=o&fb;if(l||(l=ub),e.size!=t.size&&!d)return!1;var c=s.get(e);if(c)return c==t;o|=hb,s.set(e,t);var f=ql(l(e),l(t),o,i,a,s);return s.delete(e),f;case Cb:if(oi)return oi.call(e)==oi.call(t)}return!1}var Tb=1,zb=Object.prototype,Pb=zb.hasOwnProperty;function Rb(e,t,n,o,i,a){var s=n&Tb,l=Nl(e),d=l.length,c=Nl(t),f=c.length;if(d!=f&&!s)return!1;for(var u=d;u--;){var p=l[u];if(!(s?p in t:Pb.call(t,p)))return!1}var m=a.get(e),h=a.get(t);if(m&&h)return m==t&&h==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=s;++u<d;){p=l[u];var g=e[p],z=t[p];if(o)var F=s?o(z,g,p,t,e,a):o(g,z,p,e,t,a);if(!(F===void 0?g===z||i(g,z,n,o,a):F)){y=!1;break}w||(w=p=="constructor")}if(y&&!w){var $=e.constructor,k=t.constructor;$!=k&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof k=="function"&&k instanceof k)&&(y=!1)}return a.delete(e),a.delete(t),y}var Eb=1,Yl="[object Arguments]",Zl="[object Array]",Yr="[object Object]",Bb=Object.prototype,Jl=Bb.hasOwnProperty;function _b(e,t,n,o,i,a){var s=ft(e),l=ft(t),d=s?Zl:Xt(e),c=l?Zl:Xt(t);d=d==Yl?Yr:d,c=c==Yl?Yr:c;var f=d==Yr,u=c==Yr,p=d==c;if(p&&jr(e)){if(!jr(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Tt),s||Xo(e)?ql(e,t,n,o,i,a):kb(e,t,d,n,o,i,a);if(!(n&Eb)){var m=f&&Jl.call(e,"__wrapped__"),h=u&&Jl.call(t,"__wrapped__");if(m||h){var y=m?e.value():e,w=h?t.value():t;return a||(a=new Tt),i(y,w,n,o,a)}}return p?(a||(a=new Tt),Rb(e,t,n,o,i,a)):!1}function ii(e,t,n,o,i){return e===t?!0:e==null||t==null||!qt(e)&&!qt(t)?e!==e&&t!==t:_b(e,t,n,o,ii,i)}var Mb=1,Fb=2;function Ib(e,t,n,o){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],d=e[l],c=s[1];if(s[2]){if(d===void 0&&!(l in e))return!1}else{var f=new Tt,u;if(!(u===void 0?ii(c,d,Mb|Fb,o,f):u))return!1}}return!0}function Ql(e){return e===e&&!ht(e)}function Ab(e){for(var t=Yo(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,Ql(i)]}return t}function es(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Ob(e){var t=Ab(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(n){return n===e||Ib(n,e,t)}}function Db(e,t){return e!=null&&t in Object(e)}function Vb(e,t,n){t=zl(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Kr(t[o]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Go(i)&&jo(s,i)&&(ft(e)||Wr(e)))}function Lb(e,t){return e!=null&&Vb(e,t,Db)}var Hb=1,Nb=2;function Wb(e,t){return Zo(e)&&Ql(t)?es(Kr(e),t):function(n){var o=Qh(n,e);return o===void 0&&o===t?Lb(n,e):ii(t,o,Hb|Nb)}}function jb(e){return function(t){return t==null?void 0:t[e]}}function Ub(e){return function(t){return Pl(t,e)}}function Gb(e){return Zo(e)?jb(Kr(e)):Ub(e)}function Kb(e){return typeof e=="function"?e:e==null?Lo:typeof e=="object"?ft(e)?Wb(e[0],e[1]):Ob(e):Gb(e)}function qb(e){return function(t,n,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var d=s[++i];if(n(a[d],d,a)===!1)break}return t}}var ts=qb();function Xb(e,t){return e&&ts(e,t,Yo)}function Yb(e,t){return function(n,o){if(n==null)return n;if(!Fn(n))return e(n,o);for(var i=n.length,a=-1,s=Object(n);++a<i&&o(s[a],a,s)!==!1;);return n}}var Zb=Yb(Xb),ai=function(){return bt.Date.now()},Jb="Expected a function",Qb=Math.max,eg=Math.min;function tg(e,t,n){var o,i,a,s,l,d,c=0,f=!1,u=!1,p=!0;if(typeof e!="function")throw new TypeError(Jb);t=ul(t)||0,ht(n)&&(f=!!n.leading,u="maxWait"in n,a=u?Qb(ul(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function m(M){var b=o,S=i;return o=i=void 0,c=M,s=e.apply(S,b),s}function h(M){return c=M,l=setTimeout(g,t),f?m(M):s}function y(M){var b=M-d,S=M-c,_=t-b;return u?eg(_,a-S):_}function w(M){var b=M-d,S=M-c;return d===void 0||b>=t||b<0||u&&S>=a}function g(){var M=ai();if(w(M))return z(M);l=setTimeout(g,y(M))}function z(M){return l=void 0,p&&o?m(M):(o=i=void 0,s)}function F(){l!==void 0&&clearTimeout(l),c=0,o=d=i=l=void 0}function $(){return l===void 0?s:z(ai())}function k(){var M=ai(),b=w(M);if(o=arguments,i=this,d=M,b){if(l===void 0)return h(d);if(u)return clearTimeout(l),l=setTimeout(g,t),m(d)}return l===void 0&&(l=setTimeout(g,t)),s}return k.cancel=F,k.flush=$,k}function li(e,t,n){(n!==void 0&&!nr(e[t],n)||n===void 0&&!(t in e))&&Uo(e,t,n)}function ng(e){return qt(e)&&Fn(e)}function si(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function rg(e){return Sf(e,kl(e))}function og(e,t,n,o,i,a,s){var l=si(e,n),d=si(t,n),c=s.get(d);if(c){li(e,n,c);return}var f=a?a(l,d,n+"",e,t,s):void 0,u=f===void 0;if(u){var p=ft(d),m=!p&&jr(d),h=!p&&!m&&Xo(d);f=d,p||m||h?ft(l)?f=l:ng(l)?f=cf(l):m?(u=!1,f=Hp(d)):h?(u=!1,f=tb(d)):f=[]:ap(d)||Wr(d)?(f=l,Wr(l)?f=rg(l):(!ht(l)||Ho(l))&&(f=nb(d))):u=!1}u&&(s.set(d,f),i(f,d,o,a,s),s.delete(d)),li(e,n,f)}function ns(e,t,n,o,i){e!==t&&ts(t,function(a,s){if(i||(i=new Tt),ht(a))og(e,t,s,n,ns,o,i);else{var l=o?o(si(e,s),a,s+"",e,t,i):void 0;l===void 0&&(l=a),li(e,s,l)}},kl)}function ig(e,t){var n=-1,o=Fn(e)?Array(e.length):[];return Zb(e,function(i,a,s){o[++n]=t(i,a,s)}),o}function ag(e,t){var n=ft(e)?al:ig;return n(e,Kb(t))}var Zr=Pf(function(e,t,n){ns(e,t,n)}),lg="Expected a function";function di(e,t,n){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(lg);return ht(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),tg(e,t,{leading:o,maxWait:t,trailing:i})}function ar(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=r.inject(cn,null)||{},o=r.computed(()=>{var a,s;return(s=(a=t==null?void 0:t.value)===null||a===void 0?void 0:a[e])!==null&&s!==void 0?s:Kc[e]});return{dateLocaleRef:r.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:ku}),localeRef:o}}const lr="naive-ui-style";function Yt(e,t,n){if(!t)return;const o=Ut(),i=r.computed(()=>{const{value:l}=t;if(!l)return;const d=l[e];if(d)return d}),a=r.inject(cn,null),s=()=>{r.watchEffect(()=>{const{value:l}=n,d=`${l}${e}Rtl`;if(Sd(d,o))return;const{value:c}=i;c&&c.style.mount({id:d,head:!0,anchorMetaName:lr,props:{bPrefix:l?`.${l}-`:void 0},ssr:o,parent:a==null?void 0:a.styleMountTarget})})};return o?s():r.onBeforeMount(s),i}const gn={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:sg,fontFamily:dg,lineHeight:cg}=gn,rs=V("body",`
|
|
16
16
|
margin: 0;
|
|
17
17
|
font-size: ${sg};
|
|
18
18
|
font-family: ${dg};
|
|
@@ -22,7 +22,7 @@ ${t}
|
|
|
22
22
|
`,[V("input",`
|
|
23
23
|
font-family: inherit;
|
|
24
24
|
font-size: inherit;
|
|
25
|
-
`)]);function mn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&Ao("use-style","No style is specified.");return}const o=Ut(),i=r.inject(cn,null),a=()=>{const s=n.value;t.mount({id:s===void 0?e:s+e,head:!0,anchorMetaName:
|
|
25
|
+
`)]);function mn(e,t,n){if(!t){process.env.NODE_ENV!=="production"&&Ao("use-style","No style is specified.");return}const o=Ut(),i=r.inject(cn,null),a=()=>{const s=n.value;t.mount({id:s===void 0?e:s+e,head:!0,anchorMetaName:lr,props:{bPrefix:s?`.${s}-`:void 0},ssr:o,parent:i==null?void 0:i.styleMountTarget}),i!=null&&i.preflightStyleDisabled||rs.mount({id:"n-global",head:!0,anchorMetaName:lr,ssr:o,parent:i==null?void 0:i.styleMountTarget})};o?a():r.onBeforeMount(a)}function ry(e){return e}function Ce(e,t,n,o,i,a){const s=Ut(),l=r.inject(cn,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:lr,ssr:s,parent:l==null?void 0:l.styleMountTarget}),l!=null&&l.preflightStyleDisabled||rs.mount({id:"n-global",head:!0,anchorMetaName:lr,ssr:s,parent:l==null?void 0:l.styleMountTarget})};s?c():r.onBeforeMount(c)}return r.computed(()=>{var c;const{theme:{common:f,self:u,peers:p={}}={},themeOverrides:m={},builtinThemeOverrides:h={}}=i,{common:y,peers:w}=m,{common:g=void 0,[e]:{common:z=void 0,self:F=void 0,peers:$={}}={}}=(l==null?void 0:l.mergedThemeRef.value)||{},{common:k=void 0,[e]:M={}}=(l==null?void 0:l.mergedThemeOverridesRef.value)||{},{common:b,peers:S={}}=M,_=Zr({},f||z||g||o.common,k,b,y),D=Zr((c=u||F||o.self)===null||c===void 0?void 0:c(_),h,M,m);return{common:_,self:D,peers:Zr({},o.peers,$,p),peerOverrides:Zr({},h.peers,S,w)}})}Ce.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const ug=x("base-icon",`
|
|
26
26
|
height: 1em;
|
|
27
27
|
width: 1em;
|
|
28
28
|
line-height: 1em;
|
|
@@ -211,7 +211,7 @@ ${t}
|
|
|
211
211
|
transition: color .3s var(--n-bezier);
|
|
212
212
|
margin-top: 12px;
|
|
213
213
|
color: var(--n-extra-text-color);
|
|
214
|
-
`)]),hm=Object.assign(Object.assign({},Ce.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),pm=r.defineComponent({name:"Empty",props:hm,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:o}=Je(e),i=Ce("Empty","-empty",fm,ps,e,t),{localeRef:a}=
|
|
214
|
+
`)]),hm=Object.assign(Object.assign({},Ce.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),pm=r.defineComponent({name:"Empty",props:hm,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:o}=Je(e),i=Ce("Empty","-empty",fm,ps,e,t),{localeRef:a}=ar("Empty"),s=r.computed(()=>{var f,u,p;return(f=e.description)!==null&&f!==void 0?f:(p=(u=o==null?void 0:o.value)===null||u===void 0?void 0:u.Empty)===null||p===void 0?void 0:p.description}),l=r.computed(()=>{var f,u;return((u=(f=o==null?void 0:o.value)===null||f===void 0?void 0:f.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>r.h(gg,null))}),d=r.computed(()=>{const{size:f}=e,{common:{cubicBezierEaseInOut:u},self:{[Q("iconSize",f)]:p,[Q("fontSize",f)]:m,textColor:h,iconColor:y,extraTextColor:w}}=i.value;return{"--n-icon-size":p,"--n-font-size":m,"--n-bezier":u,"--n-text-color":h,"--n-icon-color":y,"--n-extra-text-color":w}}),c=n?tt("empty",r.computed(()=>{let f="";const{size:u}=e;return f+=u[0],f}),d,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:l,localizedDescription:r.computed(()=>s.value||a.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(),r.h("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?r.h("div",{class:`${t}-empty__icon`},e.icon?e.icon():r.h(gt,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?r.h("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?r.h("div",{class:`${t}-empty__extra`},e.extra()):null)}}),bm={height:"calc(var(--n-option-height) * 7.6)",paddingTiny:"4px 0",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingTiny:"0 12px",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};function gm(e){const{borderRadius:t,popoverColor:n,textColor3:o,dividerColor:i,textColor2:a,primaryColorPressed:s,textColorDisabled:l,primaryColor:d,opacityDisabled:c,hoverColor:f,fontSizeTiny:u,fontSizeSmall:p,fontSizeMedium:m,fontSizeLarge:h,fontSizeHuge:y,heightTiny:w,heightSmall:g,heightMedium:z,heightLarge:F,heightHuge:$}=e;return Object.assign(Object.assign({},bm),{optionFontSizeTiny:u,optionFontSizeSmall:p,optionFontSizeMedium:m,optionFontSizeLarge:h,optionFontSizeHuge:y,optionHeightTiny:w,optionHeightSmall:g,optionHeightMedium:z,optionHeightLarge:F,optionHeightHuge:$,borderRadius:t,color:n,groupHeaderTextColor:o,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:s,optionTextColorDisabled:l,optionTextColorActive:d,optionOpacityDisabled:c,optionCheckColor:d,optionColorPending:f,optionColorActive:"rgba(0, 0, 0, 0)",optionColorActivePending:f,actionTextColor:a,loadingColor:d})}const bs={name:"InternalSelectMenu",common:et,peers:{Scrollbar:ds,Empty:ps},self:gm},gs=r.defineComponent({name:"NBaseSelectGroupHeader",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){const{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:o}=r.inject($o);return{labelField:n,nodeProps:o,renderLabel:e,renderOption:t}},render(){const{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:o,tmNode:{rawNode:i}}=this,a=o==null?void 0:o(i),s=t?t(i,!1):dn(i[this.labelField],i,!1),l=r.h("div",Object.assign({},a,{class:[`${e}-base-select-group-header`,a==null?void 0:a.class]}),s);return i.render?i.render({node:l,option:i}):n?n({node:l,option:i,selected:!1}):l}});function mm(e,t){return r.h(r.Transition,{name:"fade-in-scale-up-transition"},{default:()=>e?r.h(gt,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>r.h(fg)}):null})}const ms=r.defineComponent({name:"NBaseSelectOption",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){const{valueRef:t,pendingTmNodeRef:n,multipleRef:o,valueSetRef:i,renderLabelRef:a,renderOptionRef:s,labelFieldRef:l,valueFieldRef:d,showCheckmarkRef:c,nodePropsRef:f,handleOptionClick:u,handleOptionMouseEnter:p}=r.inject($o),m=He(()=>{const{value:g}=n;return g?e.tmNode.key===g.key:!1});function h(g){const{tmNode:z}=e;z.disabled||u(g,z)}function y(g){const{tmNode:z}=e;z.disabled||p(g,z)}function w(g){const{tmNode:z}=e,{value:F}=m;z.disabled||F||p(g,z)}return{multiple:o,isGrouped:He(()=>{const{tmNode:g}=e,{parent:z}=g;return z&&z.rawNode.type==="group"}),showCheckmark:c,nodeProps:f,isPending:m,isSelected:He(()=>{const{value:g}=t,{value:z}=o;if(g===null)return!1;const F=e.tmNode.rawNode[d.value];if(z){const{value:$}=i;return $.has(F)}else return g===F}),labelField:l,renderLabel:a,renderOption:s,handleMouseMove:w,handleMouseEnter:y,handleClick:h}},render(){const{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:o,isGrouped:i,showCheckmark:a,nodeProps:s,renderOption:l,renderLabel:d,handleClick:c,handleMouseEnter:f,handleMouseMove:u}=this,p=mm(n,e),m=d?[d(t,n),a&&p]:[dn(t[this.labelField],t,n),a&&p],h=s==null?void 0:s(t),y=r.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`]:o,[`${e}-base-select-option--show-checkmark`]:a}],style:[(h==null?void 0:h.style)||"",t.style||""],onClick:Oo([c,h==null?void 0:h.onClick]),onMouseenter:Oo([f,h==null?void 0:h.onMouseenter]),onMousemove:Oo([u,h==null?void 0:h.onMousemove])}),r.h("div",{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:y,option:t,selected:n}):l?l({node:y,option:t,selected:n}):y}}),{cubicBezierEaseIn:vs,cubicBezierEaseOut:xs}=gn;function sr({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:o="",originalTransition:i=""}={}){return[V("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${vs}, transform ${t} ${vs} ${i&&`,${i}`}`}),V("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${xs}, transform ${t} ${xs} ${i&&`,${i}`}`}),V("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${o} scale(${n})`}),V("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${o} scale(1)`})]}const vm=x("base-select-menu",`
|
|
215
215
|
line-height: 1.5;
|
|
216
216
|
outline: none;
|
|
217
217
|
z-index: 0;
|
|
@@ -318,7 +318,7 @@ ${t}
|
|
|
318
318
|
top: calc(50% - 7px);
|
|
319
319
|
color: var(--n-option-check-color);
|
|
320
320
|
transition: color .3s var(--n-bezier);
|
|
321
|
-
`,[
|
|
321
|
+
`,[sr({enterScale:"0.5"})])])]),xm=r.defineComponent({name:"InternalSelectMenu",props:Object.assign(Object.assign({},Ce.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}=Je(e),o=Yt("InternalSelectMenu",n,t),i=Ce("InternalSelectMenu","-internal-select-menu",vm,bs,e,r.toRef(e,"clsPrefix")),a=r.ref(null),s=r.ref(null),l=r.ref(null),d=r.computed(()=>e.treeMate.getFlattenedNodes()),c=r.computed(()=>Yg(d.value)),f=r.ref(null);function u(){const{treeMate:j}=e;let ee=null;const{value:fe}=e;fe===null?ee=j.getFirstAvailableNode():(e.multiple?ee=j.getNode((fe||[])[(fe||[]).length-1]):ee=j.getNode(fe),(!ee||ee.disabled)&&(ee=j.getFirstAvailableNode())),W(ee||null)}function p(){const{value:j}=f;j&&!e.treeMate.getNode(j.key)&&(f.value=null)}let m;r.watch(()=>e.show,j=>{j?m=r.watch(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?u():p(),r.nextTick(L)):p()},{immediate:!0}):m==null||m()},{immediate:!0}),r.onBeforeUnmount(()=>{m==null||m()});const h=r.computed(()=>ot(i.value.self[Q("optionHeight",e.size)])),y=r.computed(()=>dt(i.value.self[Q("padding",e.size)])),w=r.computed(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),g=r.computed(()=>{const j=d.value;return j&&j.length===0});function z(j){const{onToggle:ee}=e;ee&&ee(j)}function F(j){const{onScroll:ee}=e;ee&&ee(j)}function $(j){var ee;(ee=l.value)===null||ee===void 0||ee.sync(),F(j)}function k(){var j;(j=l.value)===null||j===void 0||j.sync()}function M(){const{value:j}=f;return j||null}function b(j,ee){ee.disabled||W(ee,!1)}function S(j,ee){ee.disabled||z(ee)}function _(j){var ee;jn(j,"action")||(ee=e.onKeyup)===null||ee===void 0||ee.call(e,j)}function D(j){var ee;jn(j,"action")||(ee=e.onKeydown)===null||ee===void 0||ee.call(e,j)}function q(j){var ee;(ee=e.onMousedown)===null||ee===void 0||ee.call(e,j),!e.focusable&&j.preventDefault()}function G(){const{value:j}=f;j&&W(j.getNext({loop:!0}),!0)}function O(){const{value:j}=f;j&&W(j.getPrev({loop:!0}),!0)}function W(j,ee=!1){f.value=j,ee&&L()}function L(){var j,ee;const fe=f.value;if(!fe)return;const ye=c.value(fe.key);ye!==null&&(e.virtualScroll?(j=s.value)===null||j===void 0||j.scrollTo({index:ye}):(ee=l.value)===null||ee===void 0||ee.scrollTo({index:ye,elSize:h.value}))}function Z(j){var ee,fe;!((ee=a.value)===null||ee===void 0)&&ee.contains(j.target)&&((fe=e.onFocus)===null||fe===void 0||fe.call(e,j))}function Y(j){var ee,fe;!((ee=a.value)===null||ee===void 0)&&ee.contains(j.relatedTarget)||(fe=e.onBlur)===null||fe===void 0||fe.call(e,j)}r.provide($o,{handleOptionMouseEnter:b,handleOptionClick:S,valueSetRef:w,pendingTmNodeRef:f,nodePropsRef:r.toRef(e,"nodeProps"),showCheckmarkRef:r.toRef(e,"showCheckmark"),multipleRef:r.toRef(e,"multiple"),valueRef:r.toRef(e,"value"),renderLabelRef:r.toRef(e,"renderLabel"),renderOptionRef:r.toRef(e,"renderOption"),labelFieldRef:r.toRef(e,"labelField"),valueFieldRef:r.toRef(e,"valueField")}),r.provide(ua,a),r.onMounted(()=>{const{value:j}=l;j&&j.sync()});const ie=r.computed(()=>{const{size:j}=e,{common:{cubicBezierEaseInOut:ee},self:{height:fe,borderRadius:ye,color:ae,groupHeaderTextColor:$e,actionDividerColor:we,optionTextColorPressed:se,optionTextColor:Re,optionTextColorDisabled:Ee,optionTextColorActive:Ne,optionOpacityDisabled:Fe,optionCheckColor:De,actionTextColor:Ge,optionColorPending:Te,optionColorActive:X,loadingColor:I,loadingSize:ne,optionColorActivePending:B,[Q("optionFontSize",j)]:A,[Q("optionHeight",j)]:K,[Q("optionPadding",j)]:T}}=i.value;return{"--n-height":fe,"--n-action-divider-color":we,"--n-action-text-color":Ge,"--n-bezier":ee,"--n-border-radius":ye,"--n-color":ae,"--n-option-font-size":A,"--n-group-header-text-color":$e,"--n-option-check-color":De,"--n-option-color-pending":Te,"--n-option-color-active":X,"--n-option-color-active-pending":B,"--n-option-height":K,"--n-option-opacity-disabled":Fe,"--n-option-text-color":Re,"--n-option-text-color-active":Ne,"--n-option-text-color-disabled":Ee,"--n-option-text-color-pressed":se,"--n-option-padding":T,"--n-option-padding-left":dt(T,"left"),"--n-option-padding-right":dt(T,"right"),"--n-loading-color":I,"--n-loading-size":ne}}),{inlineThemeDisabled:oe}=e,te=oe?tt("internal-select-menu",r.computed(()=>e.size[0]),ie,e):void 0,ce={selfRef:a,next:G,prev:O,getPendingTmNode:M};return Ya(a,e.onResize),Object.assign({mergedTheme:i,mergedClsPrefix:t,rtlEnabled:o,virtualListRef:s,scrollbarRef:l,itemSize:h,padding:y,flattenedNodes:d,empty:g,virtualListContainer(){const{value:j}=s;return j==null?void 0:j.listElRef},virtualListContent(){const{value:j}=s;return j==null?void 0:j.itemsElRef},doScroll:F,handleFocusin:Z,handleFocusout:Y,handleKeyUp:_,handleKeyDown:D,handleMouseDown:q,handleVirtualListResize:k,handleVirtualListScroll:$,cssVars:oe?void 0:ie,themeClass:te==null?void 0:te.themeClass,onRender:te==null?void 0:te.onRender},ce)},render(){const{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:o,themeClass:i,onRender:a}=this;return a==null||a(),r.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},Ae(e.header,s=>s&&r.h("div",{class:`${n}-base-select-menu__header`,"data-header":!0,key:"header"},s)),this.loading?r.h("div",{class:`${n}-base-select-menu__loading`},r.h(Qr,{clsPrefix:n,strokeWidth:20})):this.empty?r.h("div",{class:`${n}-base-select-menu__empty`,"data-empty":!0},kt(e.empty,()=>[r.h(pm,{theme:o.peers.Empty,themeOverrides:o.peerOverrides.Empty,size:this.size})])):r.h(hi,{ref:"scrollbarRef",theme:o.peers.Scrollbar,themeOverrides:o.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?r.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:s})=>s.isGroup?r.h(gs,{key:s.key,clsPrefix:n,tmNode:s}):s.ignored?null:r.h(ms,{clsPrefix:n,key:s.key,tmNode:s})}):r.h("div",{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(s=>s.isGroup?r.h(gs,{key:s.key,clsPrefix:n,tmNode:s}):r.h(ms,{clsPrefix:n,key:s.key,tmNode:s})))}),Ae(e.action,s=>s&&[r.h("div",{class:`${n}-base-select-menu__action`,"data-action":!0,key:"action"},s),r.h(zg,{onFocus:this.onTabOut,key:"focus-detector"})]))}}),ym={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};function wm(e){const{boxShadow2:t,popoverColor:n,textColor2:o,borderRadius:i,fontSize:a,dividerColor:s}=e;return Object.assign(Object.assign({},ym),{fontSize:a,borderRadius:i,color:n,dividerColor:s,textColor:o,boxShadow:t})}const xi={name:"Popover",common:et,self:wm},yi={top:"bottom",bottom:"top",left:"right",right:"left"},Xe="var(--n-arrow-height) * 1.414",Cm=V([x("popover",`
|
|
322
322
|
transition:
|
|
323
323
|
box-shadow .3s var(--n-bezier),
|
|
324
324
|
background-color .3s var(--n-bezier),
|
|
@@ -434,7 +434,7 @@ ${t}
|
|
|
434
434
|
${n}: 100%;
|
|
435
435
|
${yi[n]}: auto;
|
|
436
436
|
${o}
|
|
437
|
-
`,[x("popover-arrow",t)])])])}const ys=Object.assign(Object.assign({},Ce.props),{to:it.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 Sm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:o,clsPrefix:i}){return r.h("div",{key:"__popover-arrow__",style:o,class:[`${i}-popover-arrow-wrapper`,n]},r.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const $m=r.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:ys,setup(e,{slots:t,attrs:n}){const{namespaceRef:o,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Je(e),s=Ce("Popover","-popover",Cm,xi,e,i),l=r.ref(null),d=r.inject("NPopover"),c=r.ref(null),f=r.ref(e.show),u=r.ref(!1);r.watchEffect(()=>{const{show:b}=e;b&&!Lc()&&!e.internalDeactivateImmediately&&(u.value=!0)});const p=r.computed(()=>{const{trigger:b,onClickoutside:S}=e,_=[],{positionManuallyRef:{value:D}}=d;return D||(b==="click"&&!S&&_.push([Gn,$,void 0,{capture:!0}]),b==="hover"&&_.push([Kd,F])),S&&_.push([Gn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&_.push([r.vShow,e.show]),_}),m=r.computed(()=>{const{common:{cubicBezierEaseInOut:b,cubicBezierEaseIn:S,cubicBezierEaseOut:_},self:{space:D,spaceArrow:q,padding:G,fontSize:O,textColor:W,dividerColor:L,color:Z,boxShadow:Y,borderRadius:ie,arrowHeight:oe,arrowOffset:te,arrowOffsetVertical:ce}}=s.value;return{"--n-box-shadow":Y,"--n-bezier":b,"--n-bezier-ease-in":S,"--n-bezier-ease-out":_,"--n-font-size":O,"--n-text-color":W,"--n-color":Z,"--n-divider-color":L,"--n-border-radius":ie,"--n-arrow-height":oe,"--n-arrow-offset":te,"--n-arrow-offset-vertical":ce,"--n-padding":G,"--n-space":D,"--n-space-arrow":q}}),h=r.computed(()=>{const b=e.width==="trigger"?void 0:Lr(e.width),S=[];b&&S.push({width:b});const{maxWidth:_,minWidth:D}=e;return _&&S.push({maxWidth:Lr(_)}),D&&S.push({maxWidth:Lr(D)}),a||S.push(m.value),S}),y=a?tt("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:w}),r.onBeforeUnmount(()=>{d.setBodyInstance(null)}),r.watch(r.toRef(e,"show"),b=>{e.animated||(b?f.value=!0:f.value=!1)});function w(){var b;(b=l.value)===null||b===void 0||b.syncPosition()}function g(b){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(b)}function z(b){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(b)}function F(b){e.trigger==="hover"&&!k().contains(kn(b))&&d.handleMouseMoveOutside(b)}function $(b){(e.trigger==="click"&&!k().contains(kn(b))||e.onClickoutside)&&d.handleClickOutside(b)}function k(){return d.getTriggerElement()}r.provide(pa,c),r.provide(fa,null),r.provide(ha,null);function M(){if(y==null||y.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const _=d.internalRenderBodyRef.value,{value:D}=i;if(_)S=_([`${D}-popover-shared`,y==null?void 0:y.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,g,z);else{const{value:q}=d.extraClassRef,{internalTrapFocus:G}=e,O=!Mn(t.header)||!Mn(t.footer),W=()=>{var L,Z;const Y=O?r.h(r.Fragment,null,Ae(t.header,te=>te?r.h("div",{class:[`${D}-popover__header`,e.headerClass],style:e.headerStyle},te):null),Ae(t.default,te=>te?r.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Ae(t.footer,te=>te?r.h("div",{class:[`${D}-popover__footer`,e.footerClass],style:e.footerStyle},te):null)):e.scrollable?(L=t.default)===null||L===void 0?void 0:L.call(t):r.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t),ie=e.scrollable?r.h(Og,{contentClass:O?void 0:`${D}-popover__content ${(Z=e.contentClass)!==null&&Z!==void 0?Z:""}`,contentStyle:O?void 0:e.contentStyle},{default:()=>Y}):Y,oe=e.showArrow?Sm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:D}):null;return[ie,oe]};S=r.h("div",r.mergeProps({class:[`${D}-popover`,`${D}-popover-shared`,y==null?void 0:y.themeClass.value,q.map(L=>`${D}-${L}`),{[`${D}-popover--scrollable`]:e.scrollable,[`${D}-popover--show-header-or-footer`]:O,[`${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:g,onMouseleave:z},n),G?r.h(Dc,{active:e.show,autoFocus:!0},{default:W}):W())}return r.withDirectives(S,p.value)}return{displayed:u,namespace:o,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:l,adjustedTo:it(e),followerEnabled:f,renderContentNode:M}},render(){return r.h(_r,{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===it.tdkey},{default:()=>this.animated?r.h(r.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()})}}),km=Object.keys(ys),Tm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function zm(e,t,n){Tm[t].forEach(o=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[o],a=n[o];i?e.props[o]=(...s)=>{i(...s),a(...s)}:e.props[o]=a})}const ws={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:it.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},Pm=Object.assign(Object.assign(Object.assign({},Ce.props),ws),{internalOnAfterLeave:Function,internalRenderBody:Function}),Cs=r.defineComponent({name:"Popover",inheritAttrs:!1,props:Pm,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.maxWidth!==void 0&&Qe("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&Qe("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&Qe("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&Qe("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&Qe("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=zn(),n=r.ref(null),o=r.computed(()=>e.show),i=r.ref(e.defaultShow),a=Ct(o,i),s=He(()=>e.disabled?!1:a.value),l=()=>{if(e.disabled)return!0;const{getDisabled:L}=e;return!!(L!=null&&L())},d=()=>l()?!1:a.value,c=Tr(e,["arrow","showArrow"]),f=r.computed(()=>e.overlap?!1:c.value);let u=null;const p=r.ref(null),m=r.ref(null),h=He(()=>e.x!==void 0&&e.y!==void 0);function y(L){const{"onUpdate:show":Z,onUpdateShow:Y,onShow:ie,onHide:oe}=e;i.value=L,Z&&pe(Z,L),Y&&pe(Y,L),L&&ie&&pe(ie,!0),L&&oe&&pe(oe,!1)}function w(){u&&u.syncPosition()}function g(){const{value:L}=p;L&&(window.clearTimeout(L),p.value=null)}function z(){const{value:L}=m;L&&(window.clearTimeout(L),m.value=null)}function F(){const L=l();if(e.trigger==="focus"&&!L){if(d())return;y(!0)}}function $(){const L=l();if(e.trigger==="focus"&&!L){if(!d())return;y(!1)}}function k(){const L=l();if(e.trigger==="hover"&&!L){if(z(),p.value!==null||d())return;const Z=()=>{y(!0),p.value=null},{delay:Y}=e;Y===0?Z():p.value=window.setTimeout(Z,Y)}}function M(){const L=l();if(e.trigger==="hover"&&!L){if(g(),m.value!==null||!d())return;const Z=()=>{y(!1),m.value=null},{duration:Y}=e;Y===0?Z():m.value=window.setTimeout(Z,Y)}}function b(){M()}function S(L){var Z;d()&&(e.trigger==="click"&&(g(),z(),y(!1)),(Z=e.onClickoutside)===null||Z===void 0||Z.call(e,L))}function _(){if(e.trigger==="click"&&!l()){g(),z();const L=!d();y(L)}}function D(L){e.internalTrapFocus&&L.key==="Escape"&&(g(),z(),y(!1))}function q(L){i.value=L}function G(){var L;return(L=n.value)===null||L===void 0?void 0:L.targetRef}function O(L){u=L}return r.provide("NPopover",{getTriggerElement:G,handleKeydown:D,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:b,setBodyInstance:O,positionManuallyRef:h,isMountedRef:t,zIndexRef:r.toRef(e,"zIndex"),extraClassRef:r.toRef(e,"internalExtraClass"),internalRenderBodyRef:r.toRef(e,"internalRenderBody")}),r.watchEffect(()=>{a.value&&l()&&y(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:s,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:q,handleClick:_,handleMouseEnter:k,handleMouseLeave:M,handleFocus:F,handleBlur:$,syncPosition:w}},render(){var e;const{positionManually:t,$slots:n}=this;let o,i=!1;if(!t&&(n.activator?o=tl(n,"activator"):o=tl(n,"trigger"),o)){o=r.cloneVNode(o),o=o.type===r.Text?r.h("span",[o]):o;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=o.type)===null||e===void 0)&&e.__popover__)i=!0,o.props||(o.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),o.props.internalSyncTargetWithParent=!0,o.props.internalInheritedEventHandlers?o.props.internalInheritedEventHandlers=[a,...o.props.internalInheritedEventHandlers]:o.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:s}=this,l=[a,...s],d={onBlur:c=>{l.forEach(f=>{f.onBlur(c)})},onFocus:c=>{l.forEach(f=>{f.onFocus(c)})},onClick:c=>{l.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{l.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{l.forEach(f=>{f.onMouseleave(c)})}};zm(o,s?"nested":t?"manual":this.trigger,d)}}return r.h(Pr,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?r.withDirectives(r.h("div",{style:{position:"fixed",inset:0}}),[[xa,{enabled:a,zIndex:this.zIndex}]]):null,t?null:r.h(Rr,null,{default:()=>o}),r.h($m,Wc(this.$props,km,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var s,l;return(l=(s=this.$slots).default)===null||l===void 0?void 0:l.call(s)},header:()=>{var s,l;return(l=(s=this.$slots).header)===null||l===void 0?void 0:l.call(s)},footer:()=>{var s,l;return(l=(s=this.$slots).footer)===null||l===void 0?void 0:l.call(s)}})]}})}}),Rm={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 Em(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:o,primaryColor:i,infoColor:a,successColor:s,warningColor:l,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:y,borderRadiusSmall:w,fontSizeMini:g,fontSizeTiny:z,fontSizeSmall:F,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:b,heightMedium:S,closeColorHover:_,closeColorPressed:D,buttonColor2Hover:q,buttonColor2Pressed:G,fontWeightStrong:O}=e;return Object.assign(Object.assign({},Rm),{closeBorderRadius:w,heightTiny:k,heightSmall:M,heightMedium:b,heightLarge:S,borderRadius:w,opacityDisabled:u,fontSizeTiny:g,fontSizeSmall:z,fontSizeMedium:F,fontSizeLarge:$,fontWeightStrong:O,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:q,colorPressedCheckable:G,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:o,border:`1px solid ${f}`,textColor:t,color:p,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:y,closeColorHover:_,closeColorPressed:D,borderPrimary:`1px solid ${ve(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:ve(i,{alpha:.12}),colorBorderedPrimary:ve(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:ve(i,{alpha:.12}),closeColorPressedPrimary:ve(i,{alpha:.18}),borderInfo:`1px solid ${ve(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ve(a,{alpha:.12}),colorBorderedInfo:ve(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ve(a,{alpha:.12}),closeColorPressedInfo:ve(a,{alpha:.18}),borderSuccess:`1px solid ${ve(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:ve(s,{alpha:.12}),colorBorderedSuccess:ve(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:ve(s,{alpha:.12}),closeColorPressedSuccess:ve(s,{alpha:.18}),borderWarning:`1px solid ${ve(l,{alpha:.35})}`,textColorWarning:l,colorWarning:ve(l,{alpha:.15}),colorBorderedWarning:ve(l,{alpha:.12}),closeIconColorWarning:l,closeIconColorHoverWarning:l,closeIconColorPressedWarning:l,closeColorHoverWarning:ve(l,{alpha:.12}),closeColorPressedWarning:ve(l,{alpha:.18}),borderError:`1px solid ${ve(d,{alpha:.23})}`,textColorError:d,colorError:ve(d,{alpha:.1}),colorBorderedError:ve(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:ve(d,{alpha:.12}),closeColorPressedError:ve(d,{alpha:.18})})}const Bm={name:"Tag",common:et,self:Em},_m={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Mm=x("tag",`
|
|
437
|
+
`,[x("popover-arrow",t)])])])}const ys=Object.assign(Object.assign({},Ce.props),{to:it.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 Sm({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:o,clsPrefix:i}){return r.h("div",{key:"__popover-arrow__",style:o,class:[`${i}-popover-arrow-wrapper`,n]},r.h("div",{class:[`${i}-popover-arrow`,e],style:t}))}const $m=r.defineComponent({name:"PopoverBody",inheritAttrs:!1,props:ys,setup(e,{slots:t,attrs:n}){const{namespaceRef:o,mergedClsPrefixRef:i,inlineThemeDisabled:a}=Je(e),s=Ce("Popover","-popover",Cm,xi,e,i),l=r.ref(null),d=r.inject("NPopover"),c=r.ref(null),f=r.ref(e.show),u=r.ref(!1);r.watchEffect(()=>{const{show:b}=e;b&&!Lc()&&!e.internalDeactivateImmediately&&(u.value=!0)});const p=r.computed(()=>{const{trigger:b,onClickoutside:S}=e,_=[],{positionManuallyRef:{value:D}}=d;return D||(b==="click"&&!S&&_.push([Kn,$,void 0,{capture:!0}]),b==="hover"&&_.push([Kd,F])),S&&_.push([Kn,$,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&u.value)&&_.push([r.vShow,e.show]),_}),m=r.computed(()=>{const{common:{cubicBezierEaseInOut:b,cubicBezierEaseIn:S,cubicBezierEaseOut:_},self:{space:D,spaceArrow:q,padding:G,fontSize:O,textColor:W,dividerColor:L,color:Z,boxShadow:Y,borderRadius:ie,arrowHeight:oe,arrowOffset:te,arrowOffsetVertical:ce}}=s.value;return{"--n-box-shadow":Y,"--n-bezier":b,"--n-bezier-ease-in":S,"--n-bezier-ease-out":_,"--n-font-size":O,"--n-text-color":W,"--n-color":Z,"--n-divider-color":L,"--n-border-radius":ie,"--n-arrow-height":oe,"--n-arrow-offset":te,"--n-arrow-offset-vertical":ce,"--n-padding":G,"--n-space":D,"--n-space-arrow":q}}),h=r.computed(()=>{const b=e.width==="trigger"?void 0:Lr(e.width),S=[];b&&S.push({width:b});const{maxWidth:_,minWidth:D}=e;return _&&S.push({maxWidth:Lr(_)}),D&&S.push({maxWidth:Lr(D)}),a||S.push(m.value),S}),y=a?tt("popover",void 0,m,e):void 0;d.setBodyInstance({syncPosition:w}),r.onBeforeUnmount(()=>{d.setBodyInstance(null)}),r.watch(r.toRef(e,"show"),b=>{e.animated||(b?f.value=!0:f.value=!1)});function w(){var b;(b=l.value)===null||b===void 0||b.syncPosition()}function g(b){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(b)}function z(b){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(b)}function F(b){e.trigger==="hover"&&!k().contains(kn(b))&&d.handleMouseMoveOutside(b)}function $(b){(e.trigger==="click"&&!k().contains(kn(b))||e.onClickoutside)&&d.handleClickOutside(b)}function k(){return d.getTriggerElement()}r.provide(pa,c),r.provide(fa,null),r.provide(ha,null);function M(){if(y==null||y.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&u.value))return null;let S;const _=d.internalRenderBodyRef.value,{value:D}=i;if(_)S=_([`${D}-popover-shared`,y==null?void 0:y.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,g,z);else{const{value:q}=d.extraClassRef,{internalTrapFocus:G}=e,O=!Mn(t.header)||!Mn(t.footer),W=()=>{var L,Z;const Y=O?r.h(r.Fragment,null,Ae(t.header,te=>te?r.h("div",{class:[`${D}-popover__header`,e.headerClass],style:e.headerStyle},te):null),Ae(t.default,te=>te?r.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Ae(t.footer,te=>te?r.h("div",{class:[`${D}-popover__footer`,e.footerClass],style:e.footerStyle},te):null)):e.scrollable?(L=t.default)===null||L===void 0?void 0:L.call(t):r.h("div",{class:[`${D}-popover__content`,e.contentClass],style:e.contentStyle},t),ie=e.scrollable?r.h(Og,{contentClass:O?void 0:`${D}-popover__content ${(Z=e.contentClass)!==null&&Z!==void 0?Z:""}`,contentStyle:O?void 0:e.contentStyle},{default:()=>Y}):Y,oe=e.showArrow?Sm({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:D}):null;return[ie,oe]};S=r.h("div",r.mergeProps({class:[`${D}-popover`,`${D}-popover-shared`,y==null?void 0:y.themeClass.value,q.map(L=>`${D}-${L}`),{[`${D}-popover--scrollable`]:e.scrollable,[`${D}-popover--show-header-or-footer`]:O,[`${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:g,onMouseleave:z},n),G?r.h(Dc,{active:e.show,autoFocus:!0},{default:W}):W())}return r.withDirectives(S,p.value)}return{displayed:u,namespace:o,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:l,adjustedTo:it(e),followerEnabled:f,renderContentNode:M}},render(){return r.h(_r,{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===it.tdkey},{default:()=>this.animated?r.h(r.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()})}}),km=Object.keys(ys),Tm={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function zm(e,t,n){Tm[t].forEach(o=>{e.props?e.props=Object.assign({},e.props):e.props={};const i=e.props[o],a=n[o];i?e.props[o]=(...s)=>{i(...s),a(...s)}:e.props[o]=a})}const ws={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:it.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},Pm=Object.assign(Object.assign(Object.assign({},Ce.props),ws),{internalOnAfterLeave:Function,internalRenderBody:Function}),Cs=r.defineComponent({name:"Popover",inheritAttrs:!1,props:Pm,__popover__:!0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.maxWidth!==void 0&&Qe("popover","`max-width` is deprecated, please use `style` instead."),e.minWidth!==void 0&&Qe("popover","`min-width` is deprecated, please use `style` instead."),e.arrow!==void 0&&Qe("popover","`arrow` is deprecated, please use `showArrow` instead."),e.onHide!==void 0&&Qe("popover","`on-hide` is deprecated, please use `on-update:show` instead."),e.onShow!==void 0&&Qe("popover","`on-show` is deprecated, please use `on-update:show` instead.")});const t=zn(),n=r.ref(null),o=r.computed(()=>e.show),i=r.ref(e.defaultShow),a=Ct(o,i),s=He(()=>e.disabled?!1:a.value),l=()=>{if(e.disabled)return!0;const{getDisabled:L}=e;return!!(L!=null&&L())},d=()=>l()?!1:a.value,c=Tr(e,["arrow","showArrow"]),f=r.computed(()=>e.overlap?!1:c.value);let u=null;const p=r.ref(null),m=r.ref(null),h=He(()=>e.x!==void 0&&e.y!==void 0);function y(L){const{"onUpdate:show":Z,onUpdateShow:Y,onShow:ie,onHide:oe}=e;i.value=L,Z&&pe(Z,L),Y&&pe(Y,L),L&&ie&&pe(ie,!0),L&&oe&&pe(oe,!1)}function w(){u&&u.syncPosition()}function g(){const{value:L}=p;L&&(window.clearTimeout(L),p.value=null)}function z(){const{value:L}=m;L&&(window.clearTimeout(L),m.value=null)}function F(){const L=l();if(e.trigger==="focus"&&!L){if(d())return;y(!0)}}function $(){const L=l();if(e.trigger==="focus"&&!L){if(!d())return;y(!1)}}function k(){const L=l();if(e.trigger==="hover"&&!L){if(z(),p.value!==null||d())return;const Z=()=>{y(!0),p.value=null},{delay:Y}=e;Y===0?Z():p.value=window.setTimeout(Z,Y)}}function M(){const L=l();if(e.trigger==="hover"&&!L){if(g(),m.value!==null||!d())return;const Z=()=>{y(!1),m.value=null},{duration:Y}=e;Y===0?Z():m.value=window.setTimeout(Z,Y)}}function b(){M()}function S(L){var Z;d()&&(e.trigger==="click"&&(g(),z(),y(!1)),(Z=e.onClickoutside)===null||Z===void 0||Z.call(e,L))}function _(){if(e.trigger==="click"&&!l()){g(),z();const L=!d();y(L)}}function D(L){e.internalTrapFocus&&L.key==="Escape"&&(g(),z(),y(!1))}function q(L){i.value=L}function G(){var L;return(L=n.value)===null||L===void 0?void 0:L.targetRef}function O(L){u=L}return r.provide("NPopover",{getTriggerElement:G,handleKeydown:D,handleMouseEnter:k,handleMouseLeave:M,handleClickOutside:S,handleMouseMoveOutside:b,setBodyInstance:O,positionManuallyRef:h,isMountedRef:t,zIndexRef:r.toRef(e,"zIndex"),extraClassRef:r.toRef(e,"internalExtraClass"),internalRenderBodyRef:r.toRef(e,"internalRenderBody")}),r.watchEffect(()=>{a.value&&l()&&y(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:s,uncontrolledShow:i,mergedShowArrow:f,getMergedShow:d,setShow:q,handleClick:_,handleMouseEnter:k,handleMouseLeave:M,handleFocus:F,handleBlur:$,syncPosition:w}},render(){var e;const{positionManually:t,$slots:n}=this;let o,i=!1;if(!t&&(n.activator?o=tl(n,"activator"):o=tl(n,"trigger"),o)){o=r.cloneVNode(o),o=o.type===r.Text?r.h("span",[o]):o;const a={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=o.type)===null||e===void 0)&&e.__popover__)i=!0,o.props||(o.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),o.props.internalSyncTargetWithParent=!0,o.props.internalInheritedEventHandlers?o.props.internalInheritedEventHandlers=[a,...o.props.internalInheritedEventHandlers]:o.props.internalInheritedEventHandlers=[a];else{const{internalInheritedEventHandlers:s}=this,l=[a,...s],d={onBlur:c=>{l.forEach(f=>{f.onBlur(c)})},onFocus:c=>{l.forEach(f=>{f.onFocus(c)})},onClick:c=>{l.forEach(f=>{f.onClick(c)})},onMouseenter:c=>{l.forEach(f=>{f.onMouseenter(c)})},onMouseleave:c=>{l.forEach(f=>{f.onMouseleave(c)})}};zm(o,s?"nested":t?"manual":this.trigger,d)}}return r.h(Pr,{ref:"binderInstRef",syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const a=this.getMergedShow();return[this.internalTrapFocus&&a?r.withDirectives(r.h("div",{style:{position:"fixed",inset:0}}),[[xa,{enabled:a,zIndex:this.zIndex}]]):null,t?null:r.h(Rr,null,{default:()=>o}),r.h($m,Wc(this.$props,km,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:a})),{default:()=>{var s,l;return(l=(s=this.$slots).default)===null||l===void 0?void 0:l.call(s)},header:()=>{var s,l;return(l=(s=this.$slots).header)===null||l===void 0?void 0:l.call(s)},footer:()=>{var s,l;return(l=(s=this.$slots).footer)===null||l===void 0?void 0:l.call(s)}})]}})}}),Rm={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 Em(e){const{textColor2:t,primaryColorHover:n,primaryColorPressed:o,primaryColor:i,infoColor:a,successColor:s,warningColor:l,errorColor:d,baseColor:c,borderColor:f,opacityDisabled:u,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:y,borderRadiusSmall:w,fontSizeMini:g,fontSizeTiny:z,fontSizeSmall:F,fontSizeMedium:$,heightMini:k,heightTiny:M,heightSmall:b,heightMedium:S,closeColorHover:_,closeColorPressed:D,buttonColor2Hover:q,buttonColor2Pressed:G,fontWeightStrong:O}=e;return Object.assign(Object.assign({},Rm),{closeBorderRadius:w,heightTiny:k,heightSmall:M,heightMedium:b,heightLarge:S,borderRadius:w,opacityDisabled:u,fontSizeTiny:g,fontSizeSmall:z,fontSizeMedium:F,fontSizeLarge:$,fontWeightStrong:O,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:q,colorPressedCheckable:G,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:o,border:`1px solid ${f}`,textColor:t,color:p,colorBordered:"rgb(250, 250, 252)",closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:y,closeColorHover:_,closeColorPressed:D,borderPrimary:`1px solid ${ve(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:ve(i,{alpha:.12}),colorBorderedPrimary:ve(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:ve(i,{alpha:.12}),closeColorPressedPrimary:ve(i,{alpha:.18}),borderInfo:`1px solid ${ve(a,{alpha:.3})}`,textColorInfo:a,colorInfo:ve(a,{alpha:.12}),colorBorderedInfo:ve(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:ve(a,{alpha:.12}),closeColorPressedInfo:ve(a,{alpha:.18}),borderSuccess:`1px solid ${ve(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:ve(s,{alpha:.12}),colorBorderedSuccess:ve(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:ve(s,{alpha:.12}),closeColorPressedSuccess:ve(s,{alpha:.18}),borderWarning:`1px solid ${ve(l,{alpha:.35})}`,textColorWarning:l,colorWarning:ve(l,{alpha:.15}),colorBorderedWarning:ve(l,{alpha:.12}),closeIconColorWarning:l,closeIconColorHoverWarning:l,closeIconColorPressedWarning:l,closeColorHoverWarning:ve(l,{alpha:.12}),closeColorPressedWarning:ve(l,{alpha:.18}),borderError:`1px solid ${ve(d,{alpha:.23})}`,textColorError:d,colorError:ve(d,{alpha:.1}),colorBorderedError:ve(d,{alpha:.08}),closeIconColorError:d,closeIconColorHoverError:d,closeIconColorPressedError:d,closeColorHoverError:ve(d,{alpha:.12}),closeColorPressedError:ve(d,{alpha:.18})})}const Bm={name:"Tag",common:et,self:Em},_m={color:Object,type:{type:String,default:"default"},round:Boolean,size:{type:String,default:"medium"},closable:Boolean,disabled:{type:Boolean,default:void 0}},Mm=x("tag",`
|
|
438
438
|
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
|
439
439
|
white-space: nowrap;
|
|
440
440
|
position: relative;
|
|
@@ -704,7 +704,7 @@ ${t}
|
|
|
704
704
|
line-height: 1.25;
|
|
705
705
|
text-overflow: ellipsis;
|
|
706
706
|
overflow: hidden;
|
|
707
|
-
`)])])]),Vm=r.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},Ce.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}=Je(e),o=Yt("InternalSelection",n,t),i=r.ref(null),a=r.ref(null),s=r.ref(null),l=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=r.ref(null),h=r.ref(!1),y=r.ref(!1),w=r.ref(!1),g=Ce("InternalSelection","-internal-selection",Dm,$s,e,r.toRef(e,"clsPrefix")),z=r.computed(()=>e.clearable&&!e.disabled&&(w.value||e.active)),F=r.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):dn(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=r.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=r.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:E}=i;if(E){const{value:re}=a;re&&(re.style.width=`${E.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=p.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function b(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}r.watch(r.toRef(e,"active"),C=>{C||b()}),r.watch(r.toRef(e,"pattern"),()=>{e.multiple&&r.nextTick(M)});function _(C){const{onFocus:E}=e;E&&E(C)}function D(C){const{onBlur:E}=e;E&&E(C)}function q(C){const{onDeleteOption:E}=e;E&&E(C)}function G(C){const{onClear:E}=e;E&&E(C)}function O(C){const{onPatternInput:E}=e;E&&E(C)}function W(C){var E;(!C.relatedTarget||!(!((E=s.value)===null||E===void 0)&&E.contains(C.relatedTarget)))&&_(C)}function L(C){var E;!((E=s.value)===null||E===void 0)&&E.contains(C.relatedTarget)||D(C)}function Z(C){G(C)}function Y(){w.value=!0}function ie(){w.value=!1}function oe(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function te(C){q(C)}const ce=r.ref(!1);function j(C){if(C.key==="Backspace"&&!ce.value&&!e.pattern.length){const{selectedOptions:E}=e;E!=null&&E.length&&te(E[E.length-1])}}let ee=null;function fe(C){const{value:E}=i;if(E){const re=C.target.value;E.textContent=re,M()}e.ignoreComposition&&ce.value?ee=C:O(C)}function ye(){ce.value=!0}function ae(){ce.value=!1,e.ignoreComposition&&O(ee),ee=null}function $e(C){var E;y.value=!0,(E=e.onPatternFocus)===null||E===void 0||E.call(e,C)}function we(C){var E;y.value=!1,(E=e.onPatternBlur)===null||E===void 0||E.call(e,C)}function se(){var C,E;if(e.filterable)y.value=!1,(C=c.value)===null||C===void 0||C.blur(),(E=a.value)===null||E===void 0||E.blur();else if(e.multiple){const{value:re}=l;re==null||re.blur()}else{const{value:re}=d;re==null||re.blur()}}function Re(){var C,E,re;e.filterable?(y.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(E=l.value)===null||E===void 0||E.focus():(re=d.value)===null||re===void 0||re.focus()}function Ee(){const{value:C}=a;C&&(S(),C.focus())}function Ne(){const{value:C}=a;C&&C.blur()}function Fe(C){const{value:E}=f;E&&E.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ge(){return a.value}let Te=null;function X(){Te!==null&&window.clearTimeout(Te)}function I(){e.active||(X(),Te=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function ne(){X()}function B(C){C||(X(),h.value=!1)}r.watch(k,C=>{C||(h.value=!1)}),r.onMounted(()=>{r.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=y.value?-1:0)})}),Ya(s,e.onResize);const{inlineThemeDisabled:A}=e,K=r.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:E},self:{fontWeight:re,borderRadius:xe,color:Se,placeholderColor:We,textColor:Ie,paddingSingle:Be,paddingMultiple:qe,caretColor:st,colorDisabled:Ye,textColorDisabled:at,placeholderColorDisabled:v,colorActive:H,boxShadowFocus:J,boxShadowActive:le,boxShadowHover:de,border:ue,borderFocus:he,borderHover:me,borderActive:ze,arrowColor:rt,arrowColorDisabled:Rt,loadingColor:wn,colorActiveWarning:Jt,boxShadowFocusWarning:Qt,boxShadowActiveWarning:pr,boxShadowHoverWarning:br,borderWarning:Vn,borderFocusWarning:en,borderHoverWarning:P,borderActiveWarning:U,colorActiveError:ge,boxShadowFocusError:Me,boxShadowActiveError:Ve,boxShadowHoverError:_e,borderError:At,borderFocusError:Ot,borderHoverError:Dt,borderActiveError:Cn,clearColor:Sn,clearColorHover:gr,clearColorPressed:_i,clearSize:Mi,arrowSize:Fi,[Q("height",C)]:Ii,[Q("fontSize",C)]:Ai}}=g.value,Ln=dt(Be),Hn=dt(qe);return{"--n-bezier":E,"--n-border":ue,"--n-border-active":ze,"--n-border-focus":he,"--n-border-hover":me,"--n-border-radius":xe,"--n-box-shadow-active":le,"--n-box-shadow-focus":J,"--n-box-shadow-hover":de,"--n-caret-color":st,"--n-color":Se,"--n-color-active":H,"--n-color-disabled":Ye,"--n-font-size":Ai,"--n-height":Ii,"--n-padding-single-top":Ln.top,"--n-padding-multiple-top":Hn.top,"--n-padding-single-right":Ln.right,"--n-padding-multiple-right":Hn.right,"--n-padding-single-left":Ln.left,"--n-padding-multiple-left":Hn.left,"--n-padding-single-bottom":Ln.bottom,"--n-padding-multiple-bottom":Hn.bottom,"--n-placeholder-color":We,"--n-placeholder-color-disabled":v,"--n-text-color":Ie,"--n-text-color-disabled":at,"--n-arrow-color":rt,"--n-arrow-color-disabled":Rt,"--n-loading-color":wn,"--n-color-active-warning":Jt,"--n-box-shadow-focus-warning":Qt,"--n-box-shadow-active-warning":pr,"--n-box-shadow-hover-warning":br,"--n-border-warning":Vn,"--n-border-focus-warning":en,"--n-border-hover-warning":P,"--n-border-active-warning":U,"--n-color-active-error":ge,"--n-box-shadow-focus-error":Me,"--n-box-shadow-active-error":Ve,"--n-box-shadow-hover-error":_e,"--n-border-error":At,"--n-border-focus-error":Ot,"--n-border-hover-error":Dt,"--n-border-active-error":Cn,"--n-clear-size":Mi,"--n-clear-color":Sn,"--n-clear-color-hover":gr,"--n-clear-color-pressed":_i,"--n-arrow-size":Fi,"--n-font-weight":re}}),T=A?tt("internal-selection",r.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:z,mergedClsPrefix:t,rtlEnabled:o,patternInputFocused:y,filterablePlaceholder:F,label:$,selected:k,showTagsPanel:h,isComposing:ce,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:s,multipleElRef:l,singleElRef:d,patternInputWrapperRef:c,overflowRef:p,inputTagElRef:m,handleMouseDown:oe,handleFocusin:W,handleClear:Z,handleMouseEnter:Y,handleMouseLeave:ie,handleDeleteOption:te,handlePatternKeyDown:j,handlePatternInputInput:fe,handlePatternInputBlur:we,handlePatternInputFocus:$e,handleMouseEnterCounter:I,handleMouseLeaveCounter:ne,handleFocusout:L,handleCompositionEnd:ae,handleCompositionStart:ye,onPopoverUpdateShow:B,focus:Re,focusInput:Ee,blur:se,blurInput:Ne,updateCounter:Fe,getCounter:De,getTail:Ge,renderLabel:e.renderLabel,cssVars:A?void 0:K,themeClass:T==null?void 0:T.themeClass,onRender:T==null?void 0:T.onRender}},render(){const{status:e,multiple:t,size:n,disabled:o,filterable:i,maxTagCount:a,bordered:s,clsPrefix:l,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const p=a==="responsive",m=typeof a=="number",h=p||m,y=r.h(Do,null,{default:()=>r.h(Ss,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,z;return(z=(g=this.$slots).arrow)===null||z===void 0?void 0:z.call(g)}})});let w;if(t){const{labelField:g}=this,z=O=>r.h("div",{class:`${l}-base-selection-tag-wrapper`,key:O.value},f?f({option:O,handleClose:()=>{this.handleDeleteOption(O)}}):r.h(wi,{size:n,closable:!O.disabled,disabled:o,onClose:()=>{this.handleDeleteOption(O)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(O,!0):dn(O[g],O,!0)})),F=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(z),$=i?r.h("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:o,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r.h("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,k=p?()=>r.h("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},r.h(wi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:o})):void 0;let M;if(m){const O=this.selectedOptions.length-a;O>0&&(M=r.h("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},r.h(wi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:o},{default:()=>`+${O}`})))}const b=p?i?r.h(Ua,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:F,counter:k,tail:()=>$}):r.h(Ua,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:F,counter:k}):m&&M?F().concat(M):F(),S=h?()=>r.h("div",{class:`${l}-base-selection-popover`},p?F():this.selectedOptions.map(z)):void 0,_=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,q=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},r.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,G=i?r.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},b,p?null:$,y):r.h("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:o?void 0:0},b,y);w=r.h(r.Fragment,null,h?r.h(Cs,Object.assign({},_,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>G,default:S}):G,q)}else if(i){const g=this.pattern||this.isComposing,z=this.active?!g:!this.selected,F=this.active?!1:this.selected;w=r.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`,title:this.patternInputFocused?void 0:Qa(this.label)},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:o,disabled:o,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),F?r.h("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},r.h("div",{class:`${l}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):dn(this.label,this.selectedOption,!0))):null,z?r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,y)}else w=r.h("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?r.h("div",{class:`${l}-base-selection-input`,title:Qa(this.label),key:"input"},r.h("div",{class:`${l}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):dn(this.label,this.selectedOption,!0))):r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),y);return r.h("div",{ref:"selfRef",class:[`${l}-base-selection`,this.rtlEnabled&&`${l}-base-selection--rtl`,this.themeClass,e&&`${l}-base-selection--${e}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-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},w,s?r.h("div",{class:`${l}-base-selection__border`}):null,s?r.h("div",{class:`${l}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Zt}=gn;function Lm({duration:e=".2s",delay:t=".1s"}={}){return[V("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),V("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
707
|
+
`)])])]),Vm=r.defineComponent({name:"InternalSelection",props:Object.assign(Object.assign({},Ce.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}=Je(e),o=Yt("InternalSelection",n,t),i=r.ref(null),a=r.ref(null),s=r.ref(null),l=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=r.ref(null),h=r.ref(!1),y=r.ref(!1),w=r.ref(!1),g=Ce("InternalSelection","-internal-selection",Dm,$s,e,r.toRef(e,"clsPrefix")),z=r.computed(()=>e.clearable&&!e.disabled&&(w.value||e.active)),F=r.computed(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):dn(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),$=r.computed(()=>{const C=e.selectedOption;if(C)return C[e.labelField]}),k=r.computed(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function M(){var C;const{value:E}=i;if(E){const{value:re}=a;re&&(re.style.width=`${E.offsetWidth}px`,e.maxTagCount!=="responsive"&&((C=p.value)===null||C===void 0||C.sync({showAllItemsBeforeCalculate:!1})))}}function b(){const{value:C}=m;C&&(C.style.display="none")}function S(){const{value:C}=m;C&&(C.style.display="inline-block")}r.watch(r.toRef(e,"active"),C=>{C||b()}),r.watch(r.toRef(e,"pattern"),()=>{e.multiple&&r.nextTick(M)});function _(C){const{onFocus:E}=e;E&&E(C)}function D(C){const{onBlur:E}=e;E&&E(C)}function q(C){const{onDeleteOption:E}=e;E&&E(C)}function G(C){const{onClear:E}=e;E&&E(C)}function O(C){const{onPatternInput:E}=e;E&&E(C)}function W(C){var E;(!C.relatedTarget||!(!((E=s.value)===null||E===void 0)&&E.contains(C.relatedTarget)))&&_(C)}function L(C){var E;!((E=s.value)===null||E===void 0)&&E.contains(C.relatedTarget)||D(C)}function Z(C){G(C)}function Y(){w.value=!0}function ie(){w.value=!1}function oe(C){!e.active||!e.filterable||C.target!==a.value&&C.preventDefault()}function te(C){q(C)}const ce=r.ref(!1);function j(C){if(C.key==="Backspace"&&!ce.value&&!e.pattern.length){const{selectedOptions:E}=e;E!=null&&E.length&&te(E[E.length-1])}}let ee=null;function fe(C){const{value:E}=i;if(E){const re=C.target.value;E.textContent=re,M()}e.ignoreComposition&&ce.value?ee=C:O(C)}function ye(){ce.value=!0}function ae(){ce.value=!1,e.ignoreComposition&&O(ee),ee=null}function $e(C){var E;y.value=!0,(E=e.onPatternFocus)===null||E===void 0||E.call(e,C)}function we(C){var E;y.value=!1,(E=e.onPatternBlur)===null||E===void 0||E.call(e,C)}function se(){var C,E;if(e.filterable)y.value=!1,(C=c.value)===null||C===void 0||C.blur(),(E=a.value)===null||E===void 0||E.blur();else if(e.multiple){const{value:re}=l;re==null||re.blur()}else{const{value:re}=d;re==null||re.blur()}}function Re(){var C,E,re;e.filterable?(y.value=!1,(C=c.value)===null||C===void 0||C.focus()):e.multiple?(E=l.value)===null||E===void 0||E.focus():(re=d.value)===null||re===void 0||re.focus()}function Ee(){const{value:C}=a;C&&(S(),C.focus())}function Ne(){const{value:C}=a;C&&C.blur()}function Fe(C){const{value:E}=f;E&&E.setTextContent(`+${C}`)}function De(){const{value:C}=u;return C}function Ge(){return a.value}let Te=null;function X(){Te!==null&&window.clearTimeout(Te)}function I(){e.active||(X(),Te=window.setTimeout(()=>{k.value&&(h.value=!0)},100))}function ne(){X()}function B(C){C||(X(),h.value=!1)}r.watch(k,C=>{C||(h.value=!1)}),r.onMounted(()=>{r.watchEffect(()=>{const C=c.value;C&&(e.disabled?C.removeAttribute("tabindex"):C.tabIndex=y.value?-1:0)})}),Ya(s,e.onResize);const{inlineThemeDisabled:A}=e,K=r.computed(()=>{const{size:C}=e,{common:{cubicBezierEaseInOut:E},self:{fontWeight:re,borderRadius:xe,color:Se,placeholderColor:We,textColor:Ie,paddingSingle:Be,paddingMultiple:qe,caretColor:st,colorDisabled:Ye,textColorDisabled:at,placeholderColorDisabled:v,colorActive:H,boxShadowFocus:J,boxShadowActive:le,boxShadowHover:de,border:ue,borderFocus:he,borderHover:me,borderActive:ze,arrowColor:rt,arrowColorDisabled:Rt,loadingColor:wn,colorActiveWarning:Jt,boxShadowFocusWarning:Qt,boxShadowActiveWarning:pr,boxShadowHoverWarning:br,borderWarning:Ln,borderFocusWarning:en,borderHoverWarning:P,borderActiveWarning:U,colorActiveError:ge,boxShadowFocusError:Me,boxShadowActiveError:Ve,boxShadowHoverError:_e,borderError:At,borderFocusError:Ot,borderHoverError:Dt,borderActiveError:Cn,clearColor:Sn,clearColorHover:gr,clearColorPressed:_i,clearSize:Mi,arrowSize:Fi,[Q("height",C)]:Ii,[Q("fontSize",C)]:Ai}}=g.value,Hn=dt(Be),Nn=dt(qe);return{"--n-bezier":E,"--n-border":ue,"--n-border-active":ze,"--n-border-focus":he,"--n-border-hover":me,"--n-border-radius":xe,"--n-box-shadow-active":le,"--n-box-shadow-focus":J,"--n-box-shadow-hover":de,"--n-caret-color":st,"--n-color":Se,"--n-color-active":H,"--n-color-disabled":Ye,"--n-font-size":Ai,"--n-height":Ii,"--n-padding-single-top":Hn.top,"--n-padding-multiple-top":Nn.top,"--n-padding-single-right":Hn.right,"--n-padding-multiple-right":Nn.right,"--n-padding-single-left":Hn.left,"--n-padding-multiple-left":Nn.left,"--n-padding-single-bottom":Hn.bottom,"--n-padding-multiple-bottom":Nn.bottom,"--n-placeholder-color":We,"--n-placeholder-color-disabled":v,"--n-text-color":Ie,"--n-text-color-disabled":at,"--n-arrow-color":rt,"--n-arrow-color-disabled":Rt,"--n-loading-color":wn,"--n-color-active-warning":Jt,"--n-box-shadow-focus-warning":Qt,"--n-box-shadow-active-warning":pr,"--n-box-shadow-hover-warning":br,"--n-border-warning":Ln,"--n-border-focus-warning":en,"--n-border-hover-warning":P,"--n-border-active-warning":U,"--n-color-active-error":ge,"--n-box-shadow-focus-error":Me,"--n-box-shadow-active-error":Ve,"--n-box-shadow-hover-error":_e,"--n-border-error":At,"--n-border-focus-error":Ot,"--n-border-hover-error":Dt,"--n-border-active-error":Cn,"--n-clear-size":Mi,"--n-clear-color":Sn,"--n-clear-color-hover":gr,"--n-clear-color-pressed":_i,"--n-arrow-size":Fi,"--n-font-weight":re}}),T=A?tt("internal-selection",r.computed(()=>e.size[0]),K,e):void 0;return{mergedTheme:g,mergedClearable:z,mergedClsPrefix:t,rtlEnabled:o,patternInputFocused:y,filterablePlaceholder:F,label:$,selected:k,showTagsPanel:h,isComposing:ce,counterRef:f,counterWrapperRef:u,patternInputMirrorRef:i,patternInputRef:a,selfRef:s,multipleElRef:l,singleElRef:d,patternInputWrapperRef:c,overflowRef:p,inputTagElRef:m,handleMouseDown:oe,handleFocusin:W,handleClear:Z,handleMouseEnter:Y,handleMouseLeave:ie,handleDeleteOption:te,handlePatternKeyDown:j,handlePatternInputInput:fe,handlePatternInputBlur:we,handlePatternInputFocus:$e,handleMouseEnterCounter:I,handleMouseLeaveCounter:ne,handleFocusout:L,handleCompositionEnd:ae,handleCompositionStart:ye,onPopoverUpdateShow:B,focus:Re,focusInput:Ee,blur:se,blurInput:Ne,updateCounter:Fe,getCounter:De,getTail:Ge,renderLabel:e.renderLabel,cssVars:A?void 0:K,themeClass:T==null?void 0:T.themeClass,onRender:T==null?void 0:T.onRender}},render(){const{status:e,multiple:t,size:n,disabled:o,filterable:i,maxTagCount:a,bordered:s,clsPrefix:l,ellipsisTagPopoverProps:d,onRender:c,renderTag:f,renderLabel:u}=this;c==null||c();const p=a==="responsive",m=typeof a=="number",h=p||m,y=r.h(Do,null,{default:()=>r.h(Ss,{clsPrefix:l,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var g,z;return(z=(g=this.$slots).arrow)===null||z===void 0?void 0:z.call(g)}})});let w;if(t){const{labelField:g}=this,z=O=>r.h("div",{class:`${l}-base-selection-tag-wrapper`,key:O.value},f?f({option:O,handleClose:()=>{this.handleDeleteOption(O)}}):r.h(wi,{size:n,closable:!O.disabled,disabled:o,onClose:()=>{this.handleDeleteOption(O)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>u?u(O,!0):dn(O[g],O,!0)})),F=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(z),$=i?r.h("div",{class:`${l}-base-selection-input-tag`,ref:"inputTagElRef",key:"__input-tag__"},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",tabindex:-1,disabled:o,value:this.pattern,autofocus:this.autofocus,class:`${l}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),r.h("span",{ref:"patternInputMirrorRef",class:`${l}-base-selection-input-tag__mirror`},this.pattern)):null,k=p?()=>r.h("div",{class:`${l}-base-selection-tag-wrapper`,ref:"counterWrapperRef"},r.h(wi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:o})):void 0;let M;if(m){const O=this.selectedOptions.length-a;O>0&&(M=r.h("div",{class:`${l}-base-selection-tag-wrapper`,key:"__counter__"},r.h(wi,{size:n,ref:"counterRef",onMouseenter:this.handleMouseEnterCounter,disabled:o},{default:()=>`+${O}`})))}const b=p?i?r.h(Ua,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:F,counter:k,tail:()=>$}):r.h(Ua,{ref:"overflowRef",updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:F,counter:k}):m&&M?F().concat(M):F(),S=h?()=>r.h("div",{class:`${l}-base-selection-popover`},p?F():this.selectedOptions.map(z)):void 0,_=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,q=(this.selected?!1:this.active?!this.pattern&&!this.isComposing:!0)?r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`},r.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)):null,G=i?r.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-tags`},b,p?null:$,y):r.h("div",{ref:"multipleElRef",class:`${l}-base-selection-tags`,tabindex:o?void 0:0},b,y);w=r.h(r.Fragment,null,h?r.h(Cs,Object.assign({},_,{scrollable:!0,style:"max-height: calc(var(--v-target-height) * 6.6);"}),{trigger:()=>G,default:S}):G,q)}else if(i){const g=this.pattern||this.isComposing,z=this.active?!g:!this.selected,F=this.active?!1:this.selected;w=r.h("div",{ref:"patternInputWrapperRef",class:`${l}-base-selection-label`,title:this.patternInputFocused?void 0:Qa(this.label)},r.h("input",Object.assign({},this.inputProps,{ref:"patternInputRef",class:`${l}-base-selection-input`,value:this.active?this.pattern:"",placeholder:"",readonly:o,disabled:o,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),F?r.h("div",{class:`${l}-base-selection-label__render-label ${l}-base-selection-overlay`,key:"input"},r.h("div",{class:`${l}-base-selection-overlay__wrapper`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):dn(this.label,this.selectedOption,!0))):null,z?r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${l}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,y)}else w=r.h("div",{ref:"singleElRef",class:`${l}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label!==void 0?r.h("div",{class:`${l}-base-selection-input`,title:Qa(this.label),key:"input"},r.h("div",{class:`${l}-base-selection-input__content`},f?f({option:this.selectedOption,handleClose:()=>{}}):u?u(this.selectedOption,!0):dn(this.label,this.selectedOption,!0))):r.h("div",{class:`${l}-base-selection-placeholder ${l}-base-selection-overlay`,key:"placeholder"},r.h("div",{class:`${l}-base-selection-placeholder__inner`},this.placeholder)),y);return r.h("div",{ref:"selfRef",class:[`${l}-base-selection`,this.rtlEnabled&&`${l}-base-selection--rtl`,this.themeClass,e&&`${l}-base-selection--${e}-status`,{[`${l}-base-selection--active`]:this.active,[`${l}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${l}-base-selection--disabled`]:this.disabled,[`${l}-base-selection--multiple`]:this.multiple,[`${l}-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},w,s?r.h("div",{class:`${l}-base-selection__border`}):null,s?r.h("div",{class:`${l}-base-selection__state-border`}):null)}}),{cubicBezierEaseInOut:Zt}=gn;function Lm({duration:e=".2s",delay:t=".1s"}={}){return[V("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),V("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
|
|
708
708
|
opacity: 0!important;
|
|
709
709
|
margin-left: 0!important;
|
|
710
710
|
margin-right: 0!important;
|
|
@@ -1031,8 +1031,8 @@ ${t}
|
|
|
1031
1031
|
border: var(--n-border-focus-${e});
|
|
1032
1032
|
`)])])]))]),tv=x("input",[N("disabled",[R("input-el, textarea-el",`
|
|
1033
1033
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1034
|
-
`)])]);function nv(e){let t=0;for(const n of e)t++;return t}function to(e){return e===""||e==null}function rv(e){const t=r.ref(null);function n(){const{value:a}=e;if(!(a!=null&&a.focus)){i();return}const{selectionStart:s,selectionEnd:l,value:d}=a;if(s==null||l==null){i();return}t.value={start:s,end:l,beforeText:d.slice(0,s),afterText:d.slice(l)}}function o(){var a;const{value:s}=t,{value:l}=e;if(!s||!l)return;const{value:d}=l,{start:c,beforeText:f,afterText:u}=s;let p=d.length;if(d.endsWith(u))p=d.length-u.length;else if(d.startsWith(f))p=f.length;else{const m=f[c-1],h=d.indexOf(m,c-1);h!==-1&&(p=h+1)}(a=l.setSelectionRange)===null||a===void 0||a.call(l,p,p)}function i(){t.value=null}return r.watch(e,i),{recordCursor:n,restoreCursor:o}}const Ps=r.defineComponent({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:o,mergedClsPrefixRef:i,countGraphemesRef:a}=r.inject(zs),s=r.computed(()=>{const{value:l}=n;return l===null||Array.isArray(l)?0:(a.value||nv)(l)});return()=>{const{value:l}=o,{value:d}=n;return r.h("span",{class:`${i.value}-input-word-count`},Uc(t.default,{value:d===null||Array.isArray(d)?"":d},()=>[l===void 0?s.value:`${s.value} / ${l}`]))}}}),ov=Object.assign(Object.assign({},Ce.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}),On=r.defineComponent({name:"Input",props:ov,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.showPasswordToggle&&Qe("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=Je(e),a=Ce("Input","-input",ev,Ci,e,t);Ts&&mn("-input-safari",tv,t);const s=r.ref(null),l=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=rv(p),h=r.ref(null),{localeRef:y}=
|
|
1035
|
-
`)}else{const{value:Ve}=c;Ve&&(P?Ve.textContent=P:Ve.innerHTML=" ")}}function rt(){ce()}const Rt=r.ref({top:"0"});function wn(P){var U;const{scrollTop:ge}=P.target;Rt.value.top=`${-ge}px`,(U=h.value)===null||U===void 0||U.syncUnifiedContainer()}let Jt=null;r.watchEffect(()=>{const{autosize:P,type:U}=e;P&&U==="textarea"?Jt=r.watch(z,ge=>{!Array.isArray(ge)&&ge!==q&&ze(ge)}):Jt==null||Jt()});let Qt=null;r.watchEffect(()=>{e.type==="textarea"?Qt=r.watch(z,P=>{var U;!Array.isArray(P)&&P!==q&&((U=h.value)===null||U===void 0||U.syncUnifiedContainer())}):Qt==null||Qt()}),r.provide(zs,{mergedValueRef:z,maxlengthRef:j,mergedClsPrefixRef:t,countGraphemesRef:r.toRef(e,"countGraphemes")});const pr={wrapperElRef:s,inputElRef:f,textareaElRef:l,isCompositing:_,clear:Se,focus:J,blur:le,select:de,deactivate:he,activate:ue,scrollTo:me},br=Yt("Input",i,t),Vn=r.computed(()=>{const{value:P}=$,{common:{cubicBezierEaseInOut:U},self:{color:ge,borderRadius:Me,textColor:Ve,caretColor:_e,caretColorError:At,caretColorWarning:Ot,textDecorationColor:Dt,border:Cn,borderDisabled:Sn,borderHover:gr,borderFocus:_i,placeholderColor:Mi,placeholderColorDisabled:Fi,lineHeightTextarea:Ii,colorDisabled:Ai,colorFocus:Ln,textColorDisabled:Hn,boxShadowFocus:xx,iconSize:yx,colorFocusWarning:wx,boxShadowFocusWarning:Cx,borderWarning:Sx,borderFocusWarning:$x,borderHoverWarning:kx,colorFocusError:Tx,boxShadowFocusError:zx,borderError:Px,borderFocusError:Rx,borderHoverError:Ex,clearSize:Bx,clearColor:_x,clearColorHover:Mx,clearColorPressed:Fx,iconColor:Ix,iconColorDisabled:Ax,suffixTextColor:Ox,countTextColor:Dx,countTextColorDisabled:Vx,iconColorHover:Lx,iconColorPressed:Hx,loadingColor:Nx,loadingColorError:Wx,loadingColorWarning:jx,fontWeight:Ux,[Q("padding",P)]:Gx,[Q("fontSize",P)]:Kx,[Q("height",P)]:qx}}=a.value,{left:Xx,right:Yx}=dt(Gx);return{"--n-bezier":U,"--n-count-text-color":Dx,"--n-count-text-color-disabled":Vx,"--n-color":ge,"--n-font-size":Kx,"--n-font-weight":Ux,"--n-border-radius":Me,"--n-height":qx,"--n-padding-left":Xx,"--n-padding-right":Yx,"--n-text-color":Ve,"--n-caret-color":_e,"--n-text-decoration-color":Dt,"--n-border":Cn,"--n-border-disabled":Sn,"--n-border-hover":gr,"--n-border-focus":_i,"--n-placeholder-color":Mi,"--n-placeholder-color-disabled":Fi,"--n-icon-size":yx,"--n-line-height-textarea":Ii,"--n-color-disabled":Ai,"--n-color-focus":Ln,"--n-text-color-disabled":Hn,"--n-box-shadow-focus":xx,"--n-loading-color":Nx,"--n-caret-color-warning":Ot,"--n-color-focus-warning":wx,"--n-box-shadow-focus-warning":Cx,"--n-border-warning":Sx,"--n-border-focus-warning":$x,"--n-border-hover-warning":kx,"--n-loading-color-warning":jx,"--n-caret-color-error":At,"--n-color-focus-error":Tx,"--n-box-shadow-focus-error":zx,"--n-border-error":Px,"--n-border-focus-error":Rx,"--n-border-hover-error":Ex,"--n-loading-color-error":Wx,"--n-clear-color":_x,"--n-clear-size":Bx,"--n-clear-color-hover":Mx,"--n-clear-color-pressed":Fx,"--n-icon-color":Ix,"--n-icon-color-hover":Lx,"--n-icon-color-pressed":Hx,"--n-icon-color-disabled":Ax,"--n-suffix-text-color":Ox}}),en=o?tt("input",r.computed(()=>{const{value:P}=$;return P[0]}),Vn,e):void 0;return Object.assign(Object.assign({},pr),{wrapperElRef:s,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:l,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:br,uncontrolledValue:w,mergedValue:z,passwordVisible:ie,mergedPlaceholder:G,showPlaceholder1:O,showPlaceholder2:W,mergedFocus:L,isComposing:_,activated:D,showClearButton:Z,mergedSize:$,mergedDisabled:k,textDecorationStyle:oe,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Y,placeholderStyle:Rt,mergedStatus:M,textAreaScrollContainerWidth:te,handleTextAreaScroll:wn,handleCompositionStart:Te,handleCompositionEnd:X,handleInput:I,handleInputBlur:B,handleInputFocus:A,handleWrapperBlur:K,handleWrapperFocus:T,handleMouseEnter:Ie,handleMouseLeave:Be,handleMouseDown:We,handleChange:E,handleClick:re,handleClear:xe,handlePasswordToggleClick:qe,handlePasswordToggleMousedown:st,handleWrapperKeydown:at,handleWrapperKeyup:Ye,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>l.value,mergedTheme:a,cssVars:o?void 0:Vn,themeClass:en==null?void 0:en.themeClass,onRender:en==null?void 0:en.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:o,themeClass:i,type:a,countGraphemes:s,onRender:l}=this,d=this.$slots;return l==null||l(),r.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,o&&`${n}-input--${o}-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},r.h("div",{class:`${n}-input-wrapper`},Ae(d.prefix,c=>c&&r.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?r.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,p={width:this.autosize&&u&&`${u}px`};return r.h(r.Fragment,null,r.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:s?void 0:this.maxlength,minlength:s?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,p],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?r.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,p],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?r.h(Gt,{onResize:this.handleTextAreaMirrorResize},{default:()=>r.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):r.h("div",{class:`${n}-input__input`},r.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:s?void 0:this.maxlength,minlength:s?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?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?r.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ae(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?r.h("div",{class:`${n}-input__suffix`},[Ae(d["clear-icon-placeholder"],f=>(this.clearable||f)&&r.h(ci,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,p;return(p=(u=this.$slots)["clear-icon"])===null||p===void 0?void 0:p.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?r.h(Ss,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?r.h(Ps,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"?r.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?kt(d["password-visible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(vg,null)})]):kt(d["password-invisible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(xg,null)})])):null]):null)),this.pair?r.h("span",{class:`${n}-input__separator`},kt(d.separator,()=>[this.separator])):null,this.pair?r.h("div",{class:`${n}-input-wrapper`},r.h("div",{class:`${n}-input__input`},r.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:s?void 0:this.maxlength,minlength:s?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?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[1])):null),Ae(d.suffix,c=>(this.clearable||c)&&r.h("div",{class:`${n}-input__suffix`},[this.clearable&&r.h(ci,{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?r.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?r.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?r.h(Ps,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)}}),iv=x("input-group",`
|
|
1034
|
+
`)])]);function nv(e){let t=0;for(const n of e)t++;return t}function to(e){return e===""||e==null}function rv(e){const t=r.ref(null);function n(){const{value:a}=e;if(!(a!=null&&a.focus)){i();return}const{selectionStart:s,selectionEnd:l,value:d}=a;if(s==null||l==null){i();return}t.value={start:s,end:l,beforeText:d.slice(0,s),afterText:d.slice(l)}}function o(){var a;const{value:s}=t,{value:l}=e;if(!s||!l)return;const{value:d}=l,{start:c,beforeText:f,afterText:u}=s;let p=d.length;if(d.endsWith(u))p=d.length-u.length;else if(d.startsWith(f))p=f.length;else{const m=f[c-1],h=d.indexOf(m,c-1);h!==-1&&(p=h+1)}(a=l.setSelectionRange)===null||a===void 0||a.call(l,p,p)}function i(){t.value=null}return r.watch(e,i),{recordCursor:n,restoreCursor:o}}const Ps=r.defineComponent({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:o,mergedClsPrefixRef:i,countGraphemesRef:a}=r.inject(zs),s=r.computed(()=>{const{value:l}=n;return l===null||Array.isArray(l)?0:(a.value||nv)(l)});return()=>{const{value:l}=o,{value:d}=n;return r.h("span",{class:`${i.value}-input-word-count`},Uc(t.default,{value:d===null||Array.isArray(d)?"":d},()=>[l===void 0?s.value:`${s.value} / ${l}`]))}}}),ov=Object.assign(Object.assign({},Ce.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}),On=r.defineComponent({name:"Input",props:ov,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.showPasswordToggle&&Qe("input",'`show-password-toggle` is deprecated, please use `showPasswordOn="click"` instead')});const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:o,mergedRtlRef:i}=Je(e),a=Ce("Input","-input",ev,Ci,e,t);Ts&&mn("-input-safari",tv,t);const s=r.ref(null),l=r.ref(null),d=r.ref(null),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=rv(p),h=r.ref(null),{localeRef:y}=ar("Input"),w=r.ref(e.defaultValue),g=r.toRef(e,"value"),z=Ct(g,w),F=un(e),{mergedSizeRef:$,mergedDisabledRef:k,mergedStatusRef:M}=F,b=r.ref(!1),S=r.ref(!1),_=r.ref(!1),D=r.ref(!1);let q=null;const G=r.computed(()=>{const{placeholder:P,pair:U}=e;return U?Array.isArray(P)?P:P===void 0?["",""]:[P,P]:P===void 0?[y.value.placeholder]:[P]}),O=r.computed(()=>{const{value:P}=_,{value:U}=z,{value:ge}=G;return!P&&(to(U)||Array.isArray(U)&&to(U[0]))&&ge[0]}),W=r.computed(()=>{const{value:P}=_,{value:U}=z,{value:ge}=G;return!P&&ge[1]&&(to(U)||Array.isArray(U)&&to(U[1]))}),L=He(()=>e.internalForceFocus||b.value),Z=He(()=>{if(k.value||e.readonly||!e.clearable||!L.value&&!S.value)return!1;const{value:P}=z,{value:U}=L;return e.pair?!!(Array.isArray(P)&&(P[0]||P[1]))&&(S.value||U):!!P&&(S.value||U)}),Y=r.computed(()=>{const{showPasswordOn:P}=e;if(P)return P;if(e.showPasswordToggle)return"click"}),ie=r.ref(!1),oe=r.computed(()=>{const{textDecoration:P}=e;return P?Array.isArray(P)?P.map(U=>({textDecoration:U})):[{textDecoration:P}]:["",""]}),te=r.ref(void 0),ce=()=>{var P,U;if(e.type==="textarea"){const{autosize:ge}=e;if(ge&&(te.value=(U=(P=h.value)===null||P===void 0?void 0:P.$el)===null||U===void 0?void 0:U.offsetWidth),!l.value||typeof ge=="boolean")return;const{paddingTop:Me,paddingBottom:Ve,lineHeight:_e}=window.getComputedStyle(l.value),At=Number(Me.slice(0,-2)),Ot=Number(Ve.slice(0,-2)),Dt=Number(_e.slice(0,-2)),{value:Cn}=d;if(!Cn)return;if(ge.minRows){const Sn=Math.max(ge.minRows,1),gr=`${At+Ot+Dt*Sn}px`;Cn.style.minHeight=gr}if(ge.maxRows){const Sn=`${At+Ot+Dt*ge.maxRows}px`;Cn.style.maxHeight=Sn}}},j=r.computed(()=>{const{maxlength:P}=e;return P===void 0?void 0:Number(P)});r.onMounted(()=>{const{value:P}=z;Array.isArray(P)||ze(P)});const ee=r.getCurrentInstance().proxy;function fe(P,U){const{onUpdateValue:ge,"onUpdate:value":Me,onInput:Ve}=e,{nTriggerFormInput:_e}=F;ge&&pe(ge,P,U),Me&&pe(Me,P,U),Ve&&pe(Ve,P,U),w.value=P,_e()}function ye(P,U){const{onChange:ge}=e,{nTriggerFormChange:Me}=F;ge&&pe(ge,P,U),w.value=P,Me()}function ae(P){const{onBlur:U}=e,{nTriggerFormBlur:ge}=F;U&&pe(U,P),ge()}function $e(P){const{onFocus:U}=e,{nTriggerFormFocus:ge}=F;U&&pe(U,P),ge()}function we(P){const{onClear:U}=e;U&&pe(U,P)}function se(P){const{onInputBlur:U}=e;U&&pe(U,P)}function Re(P){const{onInputFocus:U}=e;U&&pe(U,P)}function Ee(){const{onDeactivate:P}=e;P&&pe(P)}function Ne(){const{onActivate:P}=e;P&&pe(P)}function Fe(P){const{onClick:U}=e;U&&pe(U,P)}function De(P){const{onWrapperFocus:U}=e;U&&pe(U,P)}function Ge(P){const{onWrapperBlur:U}=e;U&&pe(U,P)}function Te(){_.value=!0}function X(P){_.value=!1,P.target===u.value?I(P,1):I(P,0)}function I(P,U=0,ge="input"){const Me=P.target.value;if(ze(Me),P instanceof InputEvent&&!P.isComposing&&(_.value=!1),e.type==="textarea"){const{value:_e}=h;_e&&_e.syncUnifiedContainer()}if(q=Me,_.value)return;m.recordCursor();const Ve=ne(Me);if(Ve)if(!e.pair)ge==="input"?fe(Me,{source:U}):ye(Me,{source:U});else{let{value:_e}=z;Array.isArray(_e)?_e=[_e[0],_e[1]]:_e=["",""],_e[U]=Me,ge==="input"?fe(_e,{source:U}):ye(_e,{source:U})}ee.$forceUpdate(),Ve||r.nextTick(m.restoreCursor)}function ne(P){const{countGraphemes:U,maxlength:ge,minlength:Me}=e;if(U){let _e;if(ge!==void 0&&(_e===void 0&&(_e=U(P)),_e>Number(ge))||Me!==void 0&&(_e===void 0&&(_e=U(P)),_e<Number(ge)))return!1}const{allowInput:Ve}=e;return typeof Ve=="function"?Ve(P):!0}function B(P){se(P),P.relatedTarget===s.value&&Ee(),P.relatedTarget!==null&&(P.relatedTarget===f.value||P.relatedTarget===u.value||P.relatedTarget===l.value)||(D.value=!1),C(P,"blur"),p.value=null}function A(P,U){Re(P),b.value=!0,D.value=!0,Ne(),C(P,"focus"),U===0?p.value=f.value:U===1?p.value=u.value:U===2&&(p.value=l.value)}function K(P){e.passivelyActivated&&(Ge(P),C(P,"blur"))}function T(P){e.passivelyActivated&&(b.value=!0,De(P),C(P,"focus"))}function C(P,U){P.relatedTarget!==null&&(P.relatedTarget===f.value||P.relatedTarget===u.value||P.relatedTarget===l.value||P.relatedTarget===s.value)||(U==="focus"?($e(P),b.value=!0):U==="blur"&&(ae(P),b.value=!1))}function E(P,U){I(P,U,"change")}function re(P){Fe(P)}function xe(P){we(P),Se()}function Se(){e.pair?(fe(["",""],{source:"clear"}),ye(["",""],{source:"clear"})):(fe("",{source:"clear"}),ye("",{source:"clear"}))}function We(P){const{onMousedown:U}=e;U&&U(P);const{tagName:ge}=P.target;if(ge!=="INPUT"&&ge!=="TEXTAREA"){if(e.resizable){const{value:Me}=s;if(Me){const{left:Ve,top:_e,width:At,height:Ot}=Me.getBoundingClientRect(),Dt=14;if(Ve+At-Dt<P.clientX&&P.clientX<Ve+At&&_e+Ot-Dt<P.clientY&&P.clientY<_e+Ot)return}}P.preventDefault(),b.value||J()}}function Ie(){var P;S.value=!0,e.type==="textarea"&&((P=h.value)===null||P===void 0||P.handleMouseEnterWrapper())}function Be(){var P;S.value=!1,e.type==="textarea"&&((P=h.value)===null||P===void 0||P.handleMouseLeaveWrapper())}function qe(){k.value||Y.value==="click"&&(ie.value=!ie.value)}function st(P){if(k.value)return;P.preventDefault();const U=Me=>{Me.preventDefault(),ke("mouseup",document,U)};if(Pe("mouseup",document,U),Y.value!=="mousedown")return;ie.value=!0;const ge=()=>{ie.value=!1,ke("mouseup",document,ge)};Pe("mouseup",document,ge)}function Ye(P){e.onKeyup&&pe(e.onKeyup,P)}function at(P){switch(e.onKeydown&&pe(e.onKeydown,P),P.key){case"Escape":H();break;case"Enter":v(P);break}}function v(P){var U,ge;if(e.passivelyActivated){const{value:Me}=D;if(Me){e.internalDeactivateOnEnter&&H();return}P.preventDefault(),e.type==="textarea"?(U=l.value)===null||U===void 0||U.focus():(ge=f.value)===null||ge===void 0||ge.focus()}}function H(){e.passivelyActivated&&(D.value=!1,r.nextTick(()=>{var P;(P=s.value)===null||P===void 0||P.focus()}))}function J(){var P,U,ge;k.value||(e.passivelyActivated?(P=s.value)===null||P===void 0||P.focus():((U=l.value)===null||U===void 0||U.focus(),(ge=f.value)===null||ge===void 0||ge.focus()))}function le(){var P;!((P=s.value)===null||P===void 0)&&P.contains(document.activeElement)&&document.activeElement.blur()}function de(){var P,U;(P=l.value)===null||P===void 0||P.select(),(U=f.value)===null||U===void 0||U.select()}function ue(){k.value||(l.value?l.value.focus():f.value&&f.value.focus())}function he(){const{value:P}=s;P!=null&&P.contains(document.activeElement)&&P!==document.activeElement&&H()}function me(P){if(e.type==="textarea"){const{value:U}=l;U==null||U.scrollTo(P)}else{const{value:U}=f;U==null||U.scrollTo(P)}}function ze(P){const{type:U,pair:ge,autosize:Me}=e;if(!ge&&Me)if(U==="textarea"){const{value:Ve}=d;Ve&&(Ve.textContent=`${P??""}\r
|
|
1035
|
+
`)}else{const{value:Ve}=c;Ve&&(P?Ve.textContent=P:Ve.innerHTML=" ")}}function rt(){ce()}const Rt=r.ref({top:"0"});function wn(P){var U;const{scrollTop:ge}=P.target;Rt.value.top=`${-ge}px`,(U=h.value)===null||U===void 0||U.syncUnifiedContainer()}let Jt=null;r.watchEffect(()=>{const{autosize:P,type:U}=e;P&&U==="textarea"?Jt=r.watch(z,ge=>{!Array.isArray(ge)&&ge!==q&&ze(ge)}):Jt==null||Jt()});let Qt=null;r.watchEffect(()=>{e.type==="textarea"?Qt=r.watch(z,P=>{var U;!Array.isArray(P)&&P!==q&&((U=h.value)===null||U===void 0||U.syncUnifiedContainer())}):Qt==null||Qt()}),r.provide(zs,{mergedValueRef:z,maxlengthRef:j,mergedClsPrefixRef:t,countGraphemesRef:r.toRef(e,"countGraphemes")});const pr={wrapperElRef:s,inputElRef:f,textareaElRef:l,isCompositing:_,clear:Se,focus:J,blur:le,select:de,deactivate:he,activate:ue,scrollTo:me},br=Yt("Input",i,t),Ln=r.computed(()=>{const{value:P}=$,{common:{cubicBezierEaseInOut:U},self:{color:ge,borderRadius:Me,textColor:Ve,caretColor:_e,caretColorError:At,caretColorWarning:Ot,textDecorationColor:Dt,border:Cn,borderDisabled:Sn,borderHover:gr,borderFocus:_i,placeholderColor:Mi,placeholderColorDisabled:Fi,lineHeightTextarea:Ii,colorDisabled:Ai,colorFocus:Hn,textColorDisabled:Nn,boxShadowFocus:xx,iconSize:yx,colorFocusWarning:wx,boxShadowFocusWarning:Cx,borderWarning:Sx,borderFocusWarning:$x,borderHoverWarning:kx,colorFocusError:Tx,boxShadowFocusError:zx,borderError:Px,borderFocusError:Rx,borderHoverError:Ex,clearSize:Bx,clearColor:_x,clearColorHover:Mx,clearColorPressed:Fx,iconColor:Ix,iconColorDisabled:Ax,suffixTextColor:Ox,countTextColor:Dx,countTextColorDisabled:Vx,iconColorHover:Lx,iconColorPressed:Hx,loadingColor:Nx,loadingColorError:Wx,loadingColorWarning:jx,fontWeight:Ux,[Q("padding",P)]:Gx,[Q("fontSize",P)]:Kx,[Q("height",P)]:qx}}=a.value,{left:Xx,right:Yx}=dt(Gx);return{"--n-bezier":U,"--n-count-text-color":Dx,"--n-count-text-color-disabled":Vx,"--n-color":ge,"--n-font-size":Kx,"--n-font-weight":Ux,"--n-border-radius":Me,"--n-height":qx,"--n-padding-left":Xx,"--n-padding-right":Yx,"--n-text-color":Ve,"--n-caret-color":_e,"--n-text-decoration-color":Dt,"--n-border":Cn,"--n-border-disabled":Sn,"--n-border-hover":gr,"--n-border-focus":_i,"--n-placeholder-color":Mi,"--n-placeholder-color-disabled":Fi,"--n-icon-size":yx,"--n-line-height-textarea":Ii,"--n-color-disabled":Ai,"--n-color-focus":Hn,"--n-text-color-disabled":Nn,"--n-box-shadow-focus":xx,"--n-loading-color":Nx,"--n-caret-color-warning":Ot,"--n-color-focus-warning":wx,"--n-box-shadow-focus-warning":Cx,"--n-border-warning":Sx,"--n-border-focus-warning":$x,"--n-border-hover-warning":kx,"--n-loading-color-warning":jx,"--n-caret-color-error":At,"--n-color-focus-error":Tx,"--n-box-shadow-focus-error":zx,"--n-border-error":Px,"--n-border-focus-error":Rx,"--n-border-hover-error":Ex,"--n-loading-color-error":Wx,"--n-clear-color":_x,"--n-clear-size":Bx,"--n-clear-color-hover":Mx,"--n-clear-color-pressed":Fx,"--n-icon-color":Ix,"--n-icon-color-hover":Lx,"--n-icon-color-pressed":Hx,"--n-icon-color-disabled":Ax,"--n-suffix-text-color":Ox}}),en=o?tt("input",r.computed(()=>{const{value:P}=$;return P[0]}),Ln,e):void 0;return Object.assign(Object.assign({},pr),{wrapperElRef:s,inputElRef:f,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:l,textareaMirrorElRef:d,textareaScrollbarInstRef:h,rtlEnabled:br,uncontrolledValue:w,mergedValue:z,passwordVisible:ie,mergedPlaceholder:G,showPlaceholder1:O,showPlaceholder2:W,mergedFocus:L,isComposing:_,activated:D,showClearButton:Z,mergedSize:$,mergedDisabled:k,textDecorationStyle:oe,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:Y,placeholderStyle:Rt,mergedStatus:M,textAreaScrollContainerWidth:te,handleTextAreaScroll:wn,handleCompositionStart:Te,handleCompositionEnd:X,handleInput:I,handleInputBlur:B,handleInputFocus:A,handleWrapperBlur:K,handleWrapperFocus:T,handleMouseEnter:Ie,handleMouseLeave:Be,handleMouseDown:We,handleChange:E,handleClick:re,handleClear:xe,handlePasswordToggleClick:qe,handlePasswordToggleMousedown:st,handleWrapperKeydown:at,handleWrapperKeyup:Ye,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>l.value,mergedTheme:a,cssVars:o?void 0:Ln,themeClass:en==null?void 0:en.themeClass,onRender:en==null?void 0:en.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:o,themeClass:i,type:a,countGraphemes:s,onRender:l}=this,d=this.$slots;return l==null||l(),r.h("div",{ref:"wrapperElRef",class:[`${n}-input`,i,o&&`${n}-input--${o}-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},r.h("div",{class:`${n}-input-wrapper`},Ae(d.prefix,c=>c&&r.h("div",{class:`${n}-input__prefix`},c)),a==="textarea"?r.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,p={width:this.autosize&&u&&`${u}px`};return r.h(r.Fragment,null,r.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:s?void 0:this.maxlength,minlength:s?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,p],onBlur:this.handleInputBlur,onFocus:m=>{this.handleInputFocus(m,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?r.h("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,p],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?r.h(Gt,{onResize:this.handleTextAreaMirrorResize},{default:()=>r.h("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):r.h("div",{class:`${n}-input__input`},r.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:s?void 0:this.maxlength,minlength:s?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?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[0])):null,this.autosize?r.h("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ae(d.suffix,c=>c||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?r.h("div",{class:`${n}-input__suffix`},[Ae(d["clear-icon-placeholder"],f=>(this.clearable||f)&&r.h(ci,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>f,icon:()=>{var u,p;return(p=(u=this.$slots)["clear-icon"])===null||p===void 0?void 0:p.call(u)}})),this.internalLoadingBeforeSuffix?null:c,this.loading!==void 0?r.h(Ss,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?c:null,this.showCount&&this.type!=="textarea"?r.h(Ps,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"?r.h("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?kt(d["password-visible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(vg,null)})]):kt(d["password-invisible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(xg,null)})])):null]):null)),this.pair?r.h("span",{class:`${n}-input__separator`},kt(d.separator,()=>[this.separator])):null,this.pair?r.h("div",{class:`${n}-input-wrapper`},r.h("div",{class:`${n}-input__input`},r.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:s?void 0:this.maxlength,minlength:s?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?r.h("div",{class:`${n}-input__placeholder`},r.h("span",null,this.mergedPlaceholder[1])):null),Ae(d.suffix,c=>(this.clearable||c)&&r.h("div",{class:`${n}-input__suffix`},[this.clearable&&r.h(ci,{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?r.h("div",{class:`${n}-input__border`}):null,this.mergedBordered?r.h("div",{class:`${n}-input__state-border`}):null,this.showCount&&a==="textarea"?r.h(Ps,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)}}),iv=x("input-group",`
|
|
1036
1036
|
display: inline-flex;
|
|
1037
1037
|
width: 100%;
|
|
1038
1038
|
flex-wrap: nowrap;
|
|
@@ -1164,7 +1164,7 @@ ${t}
|
|
|
1164
1164
|
`,[V("~",[R("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),N("block",`
|
|
1165
1165
|
display: flex;
|
|
1166
1166
|
width: 100%;
|
|
1167
|
-
`),N("dashed",[R("border, state-border",{borderStyle:"dashed !important"})]),N("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),V("@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)"}}),V("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),bv=Object.assign(Object.assign({},Ce.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:!Ts}}),Pt=r.defineComponent({name:"Button",props:bv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:b,tertiary:S,quaternary:_}=e;($||k||M)&&(b||S||_)&&Qe("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=r.ref(null),n=r.ref(null),o=r.ref(!1),i=He(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=r.inject(uv,{}),{mergedSizeRef:s}=un({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:b}=$||{};return b?b.value:"medium"}}),l=r.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;l.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&l.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&&pe(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;o.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}o.value=!0}},p=()=>{o.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:y}=Je(e),w=Ce("Button","-button",pv,$i,e,h),g=Yt("Button",y,h),z=r.computed(()=>{const $=w.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:b}=$,{rippleDuration:S,opacityDisabled:_,fontWeight:D,fontWeightStrong:q}=b,G=s.value,{dashed:O,type:W,ghost:L,text:Z,color:Y,round:ie,circle:oe,textColor:te,secondary:ce,tertiary:j,quaternary:ee,strong:fe}=e,ye={"--n-font-weight":fe?q:D};let ae={"--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 $e=W==="tertiary",we=W==="default",se=$e?"default":W;if(Z){const B=te||Y;ae={"--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||b[Q("textColorText",se)],"--n-text-color-hover":B?vn(B):b[Q("textColorTextHover",se)],"--n-text-color-pressed":B?ro(B):b[Q("textColorTextPressed",se)],"--n-text-color-focus":B?vn(B):b[Q("textColorTextHover",se)],"--n-text-color-disabled":B||b[Q("textColorTextDisabled",se)]}}else if(L||O){const B=te||Y;ae={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Y||b[Q("rippleColor",se)],"--n-text-color":B||b[Q("textColorGhost",se)],"--n-text-color-hover":B?vn(B):b[Q("textColorGhostHover",se)],"--n-text-color-pressed":B?ro(B):b[Q("textColorGhostPressed",se)],"--n-text-color-focus":B?vn(B):b[Q("textColorGhostHover",se)],"--n-text-color-disabled":B||b[Q("textColorGhostDisabled",se)]}}else if(ce){const B=we?b.textColor:$e?b.textColorTertiary:b[Q("color",se)],A=Y||B,K=W!=="default"&&W!=="tertiary";ae={"--n-color":K?ve(A,{alpha:Number(b.colorOpacitySecondary)}):b.colorSecondary,"--n-color-hover":K?ve(A,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-pressed":K?ve(A,{alpha:Number(b.colorOpacitySecondaryPressed)}):b.colorSecondaryPressed,"--n-color-focus":K?ve(A,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-disabled":b.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":A,"--n-text-color-hover":A,"--n-text-color-pressed":A,"--n-text-color-focus":A,"--n-text-color-disabled":A}}else if(j||ee){const B=we?b.textColor:$e?b.textColorTertiary:b[Q("color",se)],A=Y||B;j?(ae["--n-color"]=b.colorTertiary,ae["--n-color-hover"]=b.colorTertiaryHover,ae["--n-color-pressed"]=b.colorTertiaryPressed,ae["--n-color-focus"]=b.colorSecondaryHover,ae["--n-color-disabled"]=b.colorTertiary):(ae["--n-color"]=b.colorQuaternary,ae["--n-color-hover"]=b.colorQuaternaryHover,ae["--n-color-pressed"]=b.colorQuaternaryPressed,ae["--n-color-focus"]=b.colorQuaternaryHover,ae["--n-color-disabled"]=b.colorQuaternary),ae["--n-ripple-color"]="#0000",ae["--n-text-color"]=A,ae["--n-text-color-hover"]=A,ae["--n-text-color-pressed"]=A,ae["--n-text-color-focus"]=A,ae["--n-text-color-disabled"]=A}else ae={"--n-color":Y||b[Q("color",se)],"--n-color-hover":Y?vn(Y):b[Q("colorHover",se)],"--n-color-pressed":Y?ro(Y):b[Q("colorPressed",se)],"--n-color-focus":Y?vn(Y):b[Q("colorFocus",se)],"--n-color-disabled":Y||b[Q("colorDisabled",se)],"--n-ripple-color":Y||b[Q("rippleColor",se)],"--n-text-color":te||(Y?b.textColorPrimary:$e?b.textColorTertiary:b[Q("textColor",se)]),"--n-text-color-hover":te||(Y?b.textColorHoverPrimary:b[Q("textColorHover",se)]),"--n-text-color-pressed":te||(Y?b.textColorPressedPrimary:b[Q("textColorPressed",se)]),"--n-text-color-focus":te||(Y?b.textColorFocusPrimary:b[Q("textColorFocus",se)]),"--n-text-color-disabled":te||(Y?b.textColorDisabledPrimary:b[Q("textColorDisabled",se)])};let Re={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Z?Re={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Re={"--n-border":b[Q("border",se)],"--n-border-hover":b[Q("borderHover",se)],"--n-border-pressed":b[Q("borderPressed",se)],"--n-border-focus":b[Q("borderFocus",se)],"--n-border-disabled":b[Q("borderDisabled",se)]};const{[Q("height",G)]:Ee,[Q("fontSize",G)]:Ne,[Q("padding",G)]:Fe,[Q("paddingRound",G)]:De,[Q("iconSize",G)]:Ge,[Q("borderRadius",G)]:Te,[Q("iconMargin",G)]:X,waveOpacity:I}=b,ne={"--n-width":oe&&!Z?Ee:"initial","--n-height":Z?"initial":Ee,"--n-font-size":Ne,"--n-padding":oe||Z?"initial":ie?De:Fe,"--n-icon-size":Ge,"--n-icon-margin":X,"--n-border-radius":Z?"initial":oe||ie?Ee:Te};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":_,"--n-wave-opacity":I},ye),ae),Re),ne)}),F=m?tt("button",r.computed(()=>{let $="";const{dashed:k,type:M,ghost:b,text:S,color:_,round:D,circle:q,textColor:G,secondary:O,tertiary:W,quaternary:L,strong:Z}=e;k&&($+="a"),b&&($+="b"),S&&($+="c"),D&&($+="d"),q&&($+="e"),O&&($+="f"),W&&($+="g"),L&&($+="h"),Z&&($+="i"),_&&($+=`j${Vr(_)}`),G&&($+=`k${Vr(G)}`);const{value:Y}=s;return $+=`l${Y[0]}`,$+=`m${M[0]}`,$}),z,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:l,mergedSize:s,showBorder:i,enterPressed:o,rtlEnabled:g,handleMousedown:d,handleKeydown:u,handleBlur:p,handleKeyup:f,handleClick:c,customColorCssVars:r.computed(()=>{const{color:$}=e;if(!$)return null;const k=vn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":ro($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:z,themeClass:F==null?void 0:F.themeClass,onRender:F==null?void 0:F.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const o=Ae(this.$slots.default,i=>i&&r.h("span",{class:`${e}-button__content`},i));return r.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"&&o,r.h(is,{width:!0},{default:()=>Ae(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&r.h("span",{class:`${e}-button__icon`,style:{margin:Mn(this.$slots.default)?"0":""}},r.h(Jr,null,{default:()=>this.loading?r.h(Qr,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):r.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&o,this.text?null:r.h(Nm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Es=Pt;function gv(e){const{fontSize:t,boxShadow2:n,popoverColor:o,textColor2:i,borderRadius:a,borderColor:s,heightSmall:l,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:o,textColor:i,borderRadius:a,border:`1px solid ${s}`,heightSmall:l,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}}const mv={name:"ColorPicker",common:et,peers:{Input:Ci,Button:$i},self:gv};function vv(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"&&Yn("color-picker","props.modes is invalid."),"#000000"}function sr(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function xv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function yv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const wv={rgb:{hex(e){return Wt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Nt([...po(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return an([...ho(t,n,o),i])}},hex:{rgb(e){return wt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Nt([...po(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return an([...ho(t,n,o),i])}},hsl:{hex(e){const[t,n,o,i]=on(e);return Wt([...Sr(t,n,o),i])},rgb(e){const[t,n,o,i]=on(e);return wt([...Sr(t,n,o),i])},hsv(e){const[t,n,o,i]=on(e);return an([...oa(t,n,o),i])}},hsv:{hex(e){const[t,n,o,i]=Ht(e);return Wt([...Et(t,n,o),i])},rgb(e){const[t,n,o,i]=Ht(e);return wt([...Et(t,n,o),i])},hsl(e){const[t,n,o,i]=Ht(e);return Nt([...Cr(t,n,o),i])}}};function Bs(e,t,n){return n=n||sr(e),n?n===t?e:wv[n][t](e):null}const dr="12px",Cv=12,xn="6px",Sv=r.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=r.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,left:d}=s.getBoundingClientRect(),c=(a.clientX-d)/(l-Cv);e.onUpdateAlpha(yv(c))}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:r.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 r.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:dr,borderRadius:xn},onMousedown:this.handleMouseDown},r.h("div",{style:{borderRadius:xn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},r.h("div",{class:`${e}-color-picker-checkboard`}),r.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&r.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${xn})`,borderRadius:xn,width:dr,height:dr}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:wt(this.rgba),borderRadius:xn,width:dr,height:dr}}))))}}),ki="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 Tv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function zv(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"},_s=r.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=r.ref(""),{themeRef:n}=r.inject(ki,null);r.watchEffect(()=>{t.value=o()});function o(){const{value:s}=e;if(s===null)return"";const{label:l}=e;return l==="HEX"?s:l==="A"?`${Math.floor(s*100)}%`:String(Math.floor(s))}function i(s){t.value=s}function a(s){let l,d;switch(e.label){case"HEX":d=zv(s),d&&e.onUpdateValue(s),t.value=o();break;case"H":l=kv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"S":case"L":case"V":l=Tv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"A":l=Pv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"R":case"G":case"B":l=$v(s),l===!1?t.value=o():e.onUpdateValue(l);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return r.h(On,{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;":""})}}),Ev=r.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:o}=e;if(e.mode==="hex"){e.onUpdateValue((o?Wt: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((o?an:Co)(i));break;case"rgb":i[t]=n,e.onUpdateValue((o?wt:wo)(i));break;case"hsl":i[t]=n,e.onUpdateValue((o?Nt:So)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return r.h("div",{class:`${e}-color-picker-input`},r.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),r.h(lv,null,{default:()=>{const{mode:n,valueArr:o,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=o===null?null:(i?Wt:jn)(o)}catch{}return r.h(_s,{label:"HEX",showAlpha:i,value:a,onUpdateValue:s=>{this.handleUnitUpdateValue(0,s)}})}return(n+(i?"a":"")).split("").map((a,s)=>r.h(_s,{label:a.toUpperCase(),value:o===null?null:o[s],onUpdateValue:l=>{this.handleUnitUpdateValue(s,l)}}))}}))}});function Bv(e,t){if(t==="hsv"){const[n,o,i,a]=Ht(e);return wt([...Et(n,o,i),a])}return e}function _v(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Mv=r.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=r.computed(()=>e.swatches.map(a=>{const s=sr(a);return{value:a,mode:s,legalValue:Bv(a,s)}}));function n(a){const{mode:s}=e;let{value:l,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(l)?l=_v(l):(Yn("color-picker",`color ${l} in swatches is invalid.`),l="#000000")),d===s?l:Bs(l,s,d)}function o(a){e.onUpdateColor(n(a))}function i(a,s){a.key==="Enter"&&o(s)}return{parsedSwatchesRef:t,handleSwatchSelect:o,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>r.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},r.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Fv=r.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}=r.inject(ki,null);return()=>{const{hsla:o,value:i,clsPrefix:a,onClick:s,disabled:l}=e,d=t.label||n.value;return r.h("div",{class:[`${a}-color-picker-trigger`,l&&`${a}-color-picker-trigger--disabled`],onClick:l?void 0:s},r.h("div",{class:`${a}-color-picker-trigger__fill`},r.h("div",{class:`${a}-color-picker-checkboard`}),r.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:o?Nt(o):""}}),i&&o?r.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:o[2]>50||o[3]<.5?"black":"white"}},d?d(i):i):null))}}}),Iv=r.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=sr(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var o;const i=n.target.value;(o=e.onUpdateColor)===null||o===void 0||o.call(e,Bs(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-preview__preview`},r.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),r.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Dn="12px",Av=12,yn="6px",Ov=6,Dv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",Vv=r.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=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,left:d}=s.getBoundingClientRect(),c=xv((a.clientX-d-Ov)/(l-Av)*360);e.onUpdateHue(c)}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-slider`,style:{height:Dn,borderRadius:yn}},r.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:Dv,height:Dn,borderRadius:yn,position:"relative"},onMousedown:this.handleMouseDown},r.h("div",{style:{position:"absolute",left:yn,right:yn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${yn})`,borderRadius:yn,width:Dn,height:Dn}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:yn,width:Dn,height:Dn}})))))}}),oo="12px",io="6px",Lv=r.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=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,height:d,left:c,bottom:f}=s.getBoundingClientRect(),u=(f-a.clientY)/d,p=(a.clientX-c)/l,m=100*(p>1?1:p<0?0:p),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:r.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},r.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),r.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&&r.h("div",{class:`${e}-color-picker-handle`,style:{width:oo,height:oo,borderRadius:io,left:`calc(${this.displayedSv[0]}% - ${io})`,bottom:`calc(${this.displayedSv[1]}% - ${io})`}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:io,width:oo,height:oo}})))}}),Hv=V([x("color-picker",`
|
|
1167
|
+
`),N("dashed",[R("border, state-border",{borderStyle:"dashed !important"})]),N("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),V("@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)"}}),V("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),bv=Object.assign(Object.assign({},Ce.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:!Ts}}),Pt=r.defineComponent({name:"Button",props:bv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{const{dashed:$,ghost:k,text:M,secondary:b,tertiary:S,quaternary:_}=e;($||k||M)&&(b||S||_)&&Qe("button","`dashed`, `ghost` and `text` props can't be used along with `secondary`, `tertiary` and `quaternary` props.")});const t=r.ref(null),n=r.ref(null),o=r.ref(!1),i=He(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),a=r.inject(uv,{}),{mergedSizeRef:s}=un({},{defaultSize:"medium",mergedSize:$=>{const{size:k}=e;if(k)return k;const{size:M}=a;if(M)return M;const{mergedSize:b}=$||{};return b?b.value:"medium"}}),l=r.computed(()=>e.focusable&&!e.disabled),d=$=>{var k;l.value||$.preventDefault(),!e.nativeFocusBehavior&&($.preventDefault(),!e.disabled&&l.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&&pe(M,$),e.text||(k=n.value)===null||k===void 0||k.play()}},f=$=>{switch($.key){case"Enter":if(!e.keyboard)return;o.value=!1}},u=$=>{switch($.key){case"Enter":if(!e.keyboard||e.loading){$.preventDefault();return}o.value=!0}},p=()=>{o.value=!1},{inlineThemeDisabled:m,mergedClsPrefixRef:h,mergedRtlRef:y}=Je(e),w=Ce("Button","-button",pv,$i,e,h),g=Yt("Button",y,h),z=r.computed(()=>{const $=w.value,{common:{cubicBezierEaseInOut:k,cubicBezierEaseOut:M},self:b}=$,{rippleDuration:S,opacityDisabled:_,fontWeight:D,fontWeightStrong:q}=b,G=s.value,{dashed:O,type:W,ghost:L,text:Z,color:Y,round:ie,circle:oe,textColor:te,secondary:ce,tertiary:j,quaternary:ee,strong:fe}=e,ye={"--n-font-weight":fe?q:D};let ae={"--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 $e=W==="tertiary",we=W==="default",se=$e?"default":W;if(Z){const B=te||Y;ae={"--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||b[Q("textColorText",se)],"--n-text-color-hover":B?vn(B):b[Q("textColorTextHover",se)],"--n-text-color-pressed":B?ro(B):b[Q("textColorTextPressed",se)],"--n-text-color-focus":B?vn(B):b[Q("textColorTextHover",se)],"--n-text-color-disabled":B||b[Q("textColorTextDisabled",se)]}}else if(L||O){const B=te||Y;ae={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":Y||b[Q("rippleColor",se)],"--n-text-color":B||b[Q("textColorGhost",se)],"--n-text-color-hover":B?vn(B):b[Q("textColorGhostHover",se)],"--n-text-color-pressed":B?ro(B):b[Q("textColorGhostPressed",se)],"--n-text-color-focus":B?vn(B):b[Q("textColorGhostHover",se)],"--n-text-color-disabled":B||b[Q("textColorGhostDisabled",se)]}}else if(ce){const B=we?b.textColor:$e?b.textColorTertiary:b[Q("color",se)],A=Y||B,K=W!=="default"&&W!=="tertiary";ae={"--n-color":K?ve(A,{alpha:Number(b.colorOpacitySecondary)}):b.colorSecondary,"--n-color-hover":K?ve(A,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-pressed":K?ve(A,{alpha:Number(b.colorOpacitySecondaryPressed)}):b.colorSecondaryPressed,"--n-color-focus":K?ve(A,{alpha:Number(b.colorOpacitySecondaryHover)}):b.colorSecondaryHover,"--n-color-disabled":b.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":A,"--n-text-color-hover":A,"--n-text-color-pressed":A,"--n-text-color-focus":A,"--n-text-color-disabled":A}}else if(j||ee){const B=we?b.textColor:$e?b.textColorTertiary:b[Q("color",se)],A=Y||B;j?(ae["--n-color"]=b.colorTertiary,ae["--n-color-hover"]=b.colorTertiaryHover,ae["--n-color-pressed"]=b.colorTertiaryPressed,ae["--n-color-focus"]=b.colorSecondaryHover,ae["--n-color-disabled"]=b.colorTertiary):(ae["--n-color"]=b.colorQuaternary,ae["--n-color-hover"]=b.colorQuaternaryHover,ae["--n-color-pressed"]=b.colorQuaternaryPressed,ae["--n-color-focus"]=b.colorQuaternaryHover,ae["--n-color-disabled"]=b.colorQuaternary),ae["--n-ripple-color"]="#0000",ae["--n-text-color"]=A,ae["--n-text-color-hover"]=A,ae["--n-text-color-pressed"]=A,ae["--n-text-color-focus"]=A,ae["--n-text-color-disabled"]=A}else ae={"--n-color":Y||b[Q("color",se)],"--n-color-hover":Y?vn(Y):b[Q("colorHover",se)],"--n-color-pressed":Y?ro(Y):b[Q("colorPressed",se)],"--n-color-focus":Y?vn(Y):b[Q("colorFocus",se)],"--n-color-disabled":Y||b[Q("colorDisabled",se)],"--n-ripple-color":Y||b[Q("rippleColor",se)],"--n-text-color":te||(Y?b.textColorPrimary:$e?b.textColorTertiary:b[Q("textColor",se)]),"--n-text-color-hover":te||(Y?b.textColorHoverPrimary:b[Q("textColorHover",se)]),"--n-text-color-pressed":te||(Y?b.textColorPressedPrimary:b[Q("textColorPressed",se)]),"--n-text-color-focus":te||(Y?b.textColorFocusPrimary:b[Q("textColorFocus",se)]),"--n-text-color-disabled":te||(Y?b.textColorDisabledPrimary:b[Q("textColorDisabled",se)])};let Re={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Z?Re={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Re={"--n-border":b[Q("border",se)],"--n-border-hover":b[Q("borderHover",se)],"--n-border-pressed":b[Q("borderPressed",se)],"--n-border-focus":b[Q("borderFocus",se)],"--n-border-disabled":b[Q("borderDisabled",se)]};const{[Q("height",G)]:Ee,[Q("fontSize",G)]:Ne,[Q("padding",G)]:Fe,[Q("paddingRound",G)]:De,[Q("iconSize",G)]:Ge,[Q("borderRadius",G)]:Te,[Q("iconMargin",G)]:X,waveOpacity:I}=b,ne={"--n-width":oe&&!Z?Ee:"initial","--n-height":Z?"initial":Ee,"--n-font-size":Ne,"--n-padding":oe||Z?"initial":ie?De:Fe,"--n-icon-size":Ge,"--n-icon-margin":X,"--n-border-radius":Z?"initial":oe||ie?Ee:Te};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":k,"--n-bezier-ease-out":M,"--n-ripple-duration":S,"--n-opacity-disabled":_,"--n-wave-opacity":I},ye),ae),Re),ne)}),F=m?tt("button",r.computed(()=>{let $="";const{dashed:k,type:M,ghost:b,text:S,color:_,round:D,circle:q,textColor:G,secondary:O,tertiary:W,quaternary:L,strong:Z}=e;k&&($+="a"),b&&($+="b"),S&&($+="c"),D&&($+="d"),q&&($+="e"),O&&($+="f"),W&&($+="g"),L&&($+="h"),Z&&($+="i"),_&&($+=`j${Vr(_)}`),G&&($+=`k${Vr(G)}`);const{value:Y}=s;return $+=`l${Y[0]}`,$+=`m${M[0]}`,$}),z,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:h,mergedFocusable:l,mergedSize:s,showBorder:i,enterPressed:o,rtlEnabled:g,handleMousedown:d,handleKeydown:u,handleBlur:p,handleKeyup:f,handleClick:c,customColorCssVars:r.computed(()=>{const{color:$}=e;if(!$)return null;const k=vn($);return{"--n-border-color":$,"--n-border-color-hover":k,"--n-border-color-pressed":ro($),"--n-border-color-focus":k,"--n-border-color-disabled":$}}),cssVars:m?void 0:z,themeClass:F==null?void 0:F.themeClass,onRender:F==null?void 0:F.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const o=Ae(this.$slots.default,i=>i&&r.h("span",{class:`${e}-button__content`},i));return r.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"&&o,r.h(is,{width:!0},{default:()=>Ae(this.$slots.icon,i=>(this.loading||this.renderIcon||i)&&r.h("span",{class:`${e}-button__icon`,style:{margin:Mn(this.$slots.default)?"0":""}},r.h(Jr,null,{default:()=>this.loading?r.h(Qr,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):r.h("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():i)})))}),this.iconPlacement==="left"&&o,this.text?null:r.h(Nm,{ref:"waveElRef",clsPrefix:e}),this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?r.h("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Es=Pt;function gv(e){const{fontSize:t,boxShadow2:n,popoverColor:o,textColor2:i,borderRadius:a,borderColor:s,heightSmall:l,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}=e;return{panelFontSize:t,boxShadow:n,color:o,textColor:i,borderRadius:a,border:`1px solid ${s}`,heightSmall:l,heightMedium:d,heightLarge:c,fontSizeSmall:f,fontSizeMedium:u,fontSizeLarge:p,dividerColor:m}}const mv={name:"ColorPicker",common:et,peers:{Input:Ci,Button:$i},self:gv};function vv(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"&&Zn("color-picker","props.modes is invalid."),"#000000"}function dr(e){return e===null?null:/^ *#/.test(e)?"hex":e.includes("rgb")?"rgb":e.includes("hsl")?"hsl":e.includes("hsv")?"hsv":null}function xv(e){return e=Math.round(e),e>=360?359:e<0?0:e}function yv(e){return e=Math.round(e*100)/100,e>1?1:e<0?0:e}const wv={rgb:{hex(e){return Wt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Nt([...po(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return an([...ho(t,n,o),i])}},hex:{rgb(e){return wt(Ze(e))},hsl(e){const[t,n,o,i]=Ze(e);return Nt([...po(t,n,o),i])},hsv(e){const[t,n,o,i]=Ze(e);return an([...ho(t,n,o),i])}},hsl:{hex(e){const[t,n,o,i]=on(e);return Wt([...Sr(t,n,o),i])},rgb(e){const[t,n,o,i]=on(e);return wt([...Sr(t,n,o),i])},hsv(e){const[t,n,o,i]=on(e);return an([...oa(t,n,o),i])}},hsv:{hex(e){const[t,n,o,i]=Ht(e);return Wt([...Et(t,n,o),i])},rgb(e){const[t,n,o,i]=Ht(e);return wt([...Et(t,n,o),i])},hsl(e){const[t,n,o,i]=Ht(e);return Nt([...Cr(t,n,o),i])}}};function Bs(e,t,n){return n=n||dr(e),n?n===t?e:wv[n][t](e):null}const cr="12px",Cv=12,xn="6px",Sv=r.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=r.ref(null);function n(a){!t.value||!e.rgba||(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,left:d}=s.getBoundingClientRect(),c=(a.clientX-d)/(l-Cv);e.onUpdateAlpha(yv(c))}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,railBackgroundImage:r.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 r.h("div",{class:`${e}-color-picker-slider`,ref:"railRef",style:{height:cr,borderRadius:xn},onMousedown:this.handleMouseDown},r.h("div",{style:{borderRadius:xn,position:"absolute",left:0,right:0,top:0,bottom:0,overflow:"hidden"}},r.h("div",{class:`${e}-color-picker-checkboard`}),r.h("div",{class:`${e}-color-picker-slider__image`,style:{backgroundImage:this.railBackgroundImage}})),this.rgba&&r.h("div",{style:{position:"absolute",left:xn,right:xn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc(${this.alpha*100}% - ${xn})`,borderRadius:xn,width:cr,height:cr}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:wt(this.rgba),borderRadius:xn,width:cr,height:cr}}))))}}),ki="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 Tv(e){return/^\d{1,3}\.?\d*$/.test(e.trim())?Math.max(0,Math.min(Number.parseInt(e),100)):!1}function zv(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"},_s=r.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=r.ref(""),{themeRef:n}=r.inject(ki,null);r.watchEffect(()=>{t.value=o()});function o(){const{value:s}=e;if(s===null)return"";const{label:l}=e;return l==="HEX"?s:l==="A"?`${Math.floor(s*100)}%`:String(Math.floor(s))}function i(s){t.value=s}function a(s){let l,d;switch(e.label){case"HEX":d=zv(s),d&&e.onUpdateValue(s),t.value=o();break;case"H":l=kv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"S":case"L":case"V":l=Tv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"A":l=Pv(s),l===!1?t.value=o():e.onUpdateValue(l);break;case"R":case"G":case"B":l=$v(s),l===!1?t.value=o():e.onUpdateValue(l);break}}return{mergedTheme:n,inputValue:t,handleInputChange:a,handleInputUpdateValue:i}},render(){const{mergedTheme:e}=this;return r.h(On,{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;":""})}}),Ev=r.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:o}=e;if(e.mode==="hex"){e.onUpdateValue((o?Wt:Un)(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((o?an:Co)(i));break;case"rgb":i[t]=n,e.onUpdateValue((o?wt:wo)(i));break;case"hsl":i[t]=n,e.onUpdateValue((o?Nt:So)(i));break}}}},render(){const{clsPrefix:e,modes:t}=this;return r.h("div",{class:`${e}-color-picker-input`},r.h("div",{class:`${e}-color-picker-input__mode`,onClick:this.onUpdateMode,style:{cursor:t.length===1?"":"pointer"}},this.mode.toUpperCase()+(this.showAlpha?"A":"")),r.h(lv,null,{default:()=>{const{mode:n,valueArr:o,showAlpha:i}=this;if(n==="hex"){let a=null;try{a=o===null?null:(i?Wt:Un)(o)}catch{}return r.h(_s,{label:"HEX",showAlpha:i,value:a,onUpdateValue:s=>{this.handleUnitUpdateValue(0,s)}})}return(n+(i?"a":"")).split("").map((a,s)=>r.h(_s,{label:a.toUpperCase(),value:o===null?null:o[s],onUpdateValue:l=>{this.handleUnitUpdateValue(s,l)}}))}}))}});function Bv(e,t){if(t==="hsv"){const[n,o,i,a]=Ht(e);return wt([...Et(n,o,i),a])}return e}function _v(e){const t=document.createElement("canvas").getContext("2d");return t?(t.fillStyle=e,t.fillStyle):"#000000"}const Mv=r.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=r.computed(()=>e.swatches.map(a=>{const s=dr(a);return{value:a,mode:s,legalValue:Bv(a,s)}}));function n(a){const{mode:s}=e;let{value:l,mode:d}=a;return d||(d="hex",/^[a-zA-Z]+$/.test(l)?l=_v(l):(Zn("color-picker",`color ${l} in swatches is invalid.`),l="#000000")),d===s?l:Bs(l,s,d)}function o(a){e.onUpdateColor(n(a))}function i(a,s){a.key==="Enter"&&o(s)}return{parsedSwatchesRef:t,handleSwatchSelect:o,handleSwatchKeyDown:i}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-swatches`},this.parsedSwatchesRef.map(t=>r.h("div",{class:`${e}-color-picker-swatch`,tabindex:0,onClick:()=>{this.handleSwatchSelect(t)},onKeydown:n=>{this.handleSwatchKeyDown(n,t)}},r.h("div",{class:`${e}-color-picker-swatch__fill`,style:{background:t.legalValue}}))))}}),Fv=r.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}=r.inject(ki,null);return()=>{const{hsla:o,value:i,clsPrefix:a,onClick:s,disabled:l}=e,d=t.label||n.value;return r.h("div",{class:[`${a}-color-picker-trigger`,l&&`${a}-color-picker-trigger--disabled`],onClick:l?void 0:s},r.h("div",{class:`${a}-color-picker-trigger__fill`},r.h("div",{class:`${a}-color-picker-checkboard`}),r.h("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,backgroundColor:o?Nt(o):""}}),i&&o?r.h("div",{class:`${a}-color-picker-trigger__value`,style:{color:o[2]>50||o[3]<.5?"black":"white"}},d?d(i):i):null))}}}),Iv=r.defineComponent({name:"ColorPreview",props:{clsPrefix:{type:String,required:!0},mode:{type:String,required:!0},color:{type:String,default:null,validator:e=>{const t=dr(e);return!!(!e||t&&t!=="hsv")}},onUpdateColor:{type:Function,required:!0}},setup(e){function t(n){var o;const i=n.target.value;(o=e.onUpdateColor)===null||o===void 0||o.call(e,Bs(i.toUpperCase(),e.mode,"hex")),n.stopPropagation()}return{handleChange:t}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-preview__preview`},r.h("span",{class:`${e}-color-picker-preview__fill`,style:{background:this.color||"#000000"}}),r.h("input",{class:`${e}-color-picker-preview__input`,type:"color",value:this.color,onChange:this.handleChange}))}}),Dn="12px",Av=12,yn="6px",Ov=6,Dv="linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)",Vv=r.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=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,left:d}=s.getBoundingClientRect(),c=xv((a.clientX-d-Ov)/(l-Av)*360);e.onUpdateHue(c)}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{railRef:t,handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-slider`,style:{height:Dn,borderRadius:yn}},r.h("div",{ref:"railRef",style:{boxShadow:"inset 0 0 2px 0 rgba(0, 0, 0, .24)",boxSizing:"border-box",backgroundImage:Dv,height:Dn,borderRadius:yn,position:"relative"},onMousedown:this.handleMouseDown},r.h("div",{style:{position:"absolute",left:yn,right:yn,top:0,bottom:0}},r.h("div",{class:`${e}-color-picker-handle`,style:{left:`calc((${this.hue}%) / 359 * 100 - ${yn})`,borderRadius:yn,width:Dn,height:Dn}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:`hsl(${this.hue}, 100%, 50%)`,borderRadius:yn,width:Dn,height:Dn}})))))}}),oo="12px",io="6px",Lv=r.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=r.ref(null);function n(a){t.value&&(Pe("mousemove",document,o),Pe("mouseup",document,i),o(a))}function o(a){const{value:s}=t;if(!s)return;const{width:l,height:d,left:c,bottom:f}=s.getBoundingClientRect(),u=(f-a.clientY)/d,p=(a.clientX-c)/l,m=100*(p>1?1:p<0?0:p),h=100*(u>1?1:u<0?0:u);e.onUpdateSV(m,h)}function i(){var a;ke("mousemove",document,o),ke("mouseup",document,i),(a=e.onComplete)===null||a===void 0||a.call(e)}return{palleteRef:t,handleColor:r.computed(()=>{const{rgba:a}=e;return a?`rgb(${a[0]}, ${a[1]}, ${a[2]})`:""}),handleMouseDown:n}},render(){const{clsPrefix:e}=this;return r.h("div",{class:`${e}-color-picker-pallete`,onMousedown:this.handleMouseDown,ref:"palleteRef"},r.h("div",{class:`${e}-color-picker-pallete__layer`,style:{backgroundImage:`linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`}}),r.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&&r.h("div",{class:`${e}-color-picker-handle`,style:{width:oo,height:oo,borderRadius:io,left:`calc(${this.displayedSv[0]}% - ${io})`,bottom:`calc(${this.displayedSv[1]}% - ${io})`}},r.h("div",{class:`${e}-color-picker-handle__fill`,style:{backgroundColor:this.handleColor,borderRadius:io,width:oo,height:oo}})))}}),Hv=V([x("color-picker",`
|
|
1168
1168
|
display: inline-block;
|
|
1169
1169
|
box-sizing: border-box;
|
|
1170
1170
|
height: var(--n-height);
|
|
@@ -1183,7 +1183,7 @@ ${t}
|
|
|
1183
1183
|
background-color .3s var(--n-bezier);
|
|
1184
1184
|
border-radius: var(--n-border-radius);
|
|
1185
1185
|
box-shadow: var(--n-box-shadow);
|
|
1186
|
-
`,[
|
|
1186
|
+
`,[sr(),x("input",`
|
|
1187
1187
|
text-align: center;
|
|
1188
1188
|
`)]),x("color-picker-checkboard",`
|
|
1189
1189
|
background: white;
|
|
@@ -1344,7 +1344,7 @@ ${t}
|
|
|
1344
1344
|
background: inherit;
|
|
1345
1345
|
filter: blur(2px);
|
|
1346
1346
|
content: "";
|
|
1347
|
-
`)])])])])]),Nv=Object.assign(Object.assign({},Ce.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:it.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]}),Wv=r.defineComponent({name:"ColorPicker",props:Nv,setup(e,{slots:t}){const n=r.ref(null);let o=null;const i=un(e),{mergedSizeRef:a,mergedDisabledRef:s}=i,{localeRef:l}=
|
|
1347
|
+
`)])])])])]),Nv=Object.assign(Object.assign({},Ce.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:it.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]}),Wv=r.defineComponent({name:"ColorPicker",props:Nv,setup(e,{slots:t}){const n=r.ref(null);let o=null;const i=un(e),{mergedSizeRef:a,mergedDisabledRef:s}=i,{localeRef:l}=ar("global"),{mergedClsPrefixRef:d,namespaceRef:c,inlineThemeDisabled:f}=Je(e),u=Ce("ColorPicker","-color-picker",Hv,mv,e,d);r.provide(ki,{themeRef:u,renderLabelRef:r.toRef(e,"renderLabel"),colorPickerSlots:t});const p=r.ref(e.defaultShow),m=Ct(r.toRef(e,"show"),p);function h(I){const{onUpdateShow:ne,"onUpdate:show":B}=e;ne&&pe(ne,I),B&&pe(B,I),p.value=I}const{defaultValue:y}=e,w=r.ref(y===void 0?vv(e.modes,e.showAlpha):y),g=Ct(r.toRef(e,"value"),w),z=r.ref([g.value]),F=r.ref(0),$=r.computed(()=>dr(g.value)),{modes:k}=e,M=r.ref(dr(g.value)||k[0]||"rgb");function b(){const{modes:I}=e,{value:ne}=M,B=I.findIndex(A=>A===ne);~B?M.value=I[(B+1)%I.length]:M.value="rgb"}let S,_,D,q,G,O,W,L;const Z=r.computed(()=>{const{value:I}=g;if(!I)return null;switch($.value){case"hsv":return Ht(I);case"hsl":return[S,_,D,L]=on(I),[...oa(S,_,D),L];case"rgb":case"hex":return[G,O,W,L]=Ze(I),[...ho(G,O,W),L]}}),Y=r.computed(()=>{const{value:I}=g;if(!I)return null;switch($.value){case"rgb":case"hex":return Ze(I);case"hsv":return[S,_,q,L]=Ht(I),[...Et(S,_,q),L];case"hsl":return[S,_,D,L]=on(I),[...Sr(S,_,D),L]}}),ie=r.computed(()=>{const{value:I}=g;if(!I)return null;switch($.value){case"hsl":return on(I);case"hsv":return[S,_,q,L]=Ht(I),[...Cr(S,_,q),L];case"rgb":case"hex":return[G,O,W,L]=Ze(I),[...po(G,O,W),L]}}),oe=r.computed(()=>{switch(M.value){case"rgb":case"hex":return Y.value;case"hsv":return Z.value;case"hsl":return ie.value}}),te=r.ref(0),ce=r.ref(1),j=r.ref([0,0]);function ee(I,ne){const{value:B}=Z,A=te.value,K=B?B[3]:1;j.value=[I,ne];const{showAlpha:T}=e;switch(M.value){case"hsv":ae((T?an:Co)([A,I,ne,K]),"cursor");break;case"hsl":ae((T?Nt:So)([...Cr(A,I,ne),K]),"cursor");break;case"rgb":ae((T?wt:wo)([...Et(A,I,ne),K]),"cursor");break;case"hex":ae((T?Wt:Un)([...Et(A,I,ne),K]),"cursor");break}}function fe(I){te.value=I;const{value:ne}=Z;if(!ne)return;const[,B,A,K]=ne,{showAlpha:T}=e;switch(M.value){case"hsv":ae((T?an:Co)([I,B,A,K]),"cursor");break;case"rgb":ae((T?wt:wo)([...Et(I,B,A),K]),"cursor");break;case"hex":ae((T?Wt:Un)([...Et(I,B,A),K]),"cursor");break;case"hsl":ae((T?Nt:So)([...Cr(I,B,A),K]),"cursor");break}}function ye(I){switch(M.value){case"hsv":[S,_,q]=Z.value,ae(an([S,_,q,I]),"cursor");break;case"rgb":[G,O,W]=Y.value,ae(wt([G,O,W,I]),"cursor");break;case"hex":[G,O,W]=Y.value,ae(Wt([G,O,W,I]),"cursor");break;case"hsl":[S,_,D]=ie.value,ae(Nt([S,_,D,I]),"cursor");break}ce.value=I}function ae(I,ne){ne==="cursor"?o=I:o=null;const{nTriggerFormChange:B,nTriggerFormInput:A}=i,{onUpdateValue:K,"onUpdate:value":T}=e;K&&pe(K,I),T&&pe(T,I),B(),A(),w.value=I}function $e(I){ae(I,"input"),r.nextTick(we)}function we(I=!0){const{value:ne}=g;if(ne){const{nTriggerFormChange:B,nTriggerFormInput:A}=i,{onComplete:K}=e;K&&K(ne);const{value:T}=z,{value:C}=F;I&&(T.splice(C+1,T.length,ne),F.value=C+1),B(),A()}}function se(){const{value:I}=F;I-1<0||(ae(z.value[I-1],"input"),we(!1),F.value=I-1)}function Re(){const{value:I}=F;I<0||I+1>=z.value.length||(ae(z.value[I+1],"input"),we(!1),F.value=I+1)}function Ee(){ae(null,"input");const{onClear:I}=e;I&&I(),h(!1)}function Ne(){const{value:I}=g,{onConfirm:ne}=e;ne&&ne(I),h(!1)}const Fe=r.computed(()=>F.value>=1),De=r.computed(()=>{const{value:I}=z;return I.length>1&&F.value<I.length-1});r.watch(m,I=>{I||(z.value=[g.value],F.value=0)}),r.watchEffect(()=>{if(!(o&&o===g.value)){const{value:I}=Z;I&&(te.value=I[0],ce.value=I[3],j.value=[I[1],I[2]])}o=null});const Ge=r.computed(()=>{const{value:I}=a,{common:{cubicBezierEaseInOut:ne},self:{textColor:B,color:A,panelFontSize:K,boxShadow:T,border:C,borderRadius:E,dividerColor:re,[Q("height",I)]:xe,[Q("fontSize",I)]:Se}}=u.value;return{"--n-bezier":ne,"--n-text-color":B,"--n-color":A,"--n-panel-font-size":K,"--n-font-size":Se,"--n-box-shadow":T,"--n-border":C,"--n-border-radius":E,"--n-height":xe,"--n-divider-color":re}}),Te=f?tt("color-picker",r.computed(()=>a.value[0]),Ge,e):void 0;function X(){var I;const{value:ne}=Y,{value:B}=te,{internalActions:A,modes:K,actions:T}=e,{value:C}=u,{value:E}=d;return r.h("div",{class:[`${E}-color-picker-panel`,Te==null?void 0:Te.themeClass.value],onDragstart:re=>{re.preventDefault()},style:f?void 0:Ge.value},r.h("div",{class:`${E}-color-picker-control`},r.h(Lv,{clsPrefix:E,rgba:ne,displayedHue:B,displayedSv:j.value,onUpdateSV:ee,onComplete:we}),r.h("div",{class:`${E}-color-picker-preview`},r.h("div",{class:`${E}-color-picker-preview__sliders`},r.h(Vv,{clsPrefix:E,hue:B,onUpdateHue:fe,onComplete:we}),e.showAlpha?r.h(Sv,{clsPrefix:E,rgba:ne,alpha:ce.value,onUpdateAlpha:ye,onComplete:we}):null),e.showPreview?r.h(Iv,{clsPrefix:E,mode:M.value,color:Y.value&&Un(Y.value),onUpdateColor:re=>{ae(re,"input")}}):null),r.h(Ev,{clsPrefix:E,showAlpha:e.showAlpha,mode:M.value,modes:K,onUpdateMode:b,value:g.value,valueArr:oe.value,onUpdateValue:$e}),((I=e.swatches)===null||I===void 0?void 0:I.length)&&r.h(Mv,{clsPrefix:E,mode:M.value,swatches:e.swatches,onUpdateColor:re=>{ae(re,"input")}})),T!=null&&T.length?r.h("div",{class:`${E}-color-picker-action`},T.includes("confirm")&&r.h(Pt,{size:"small",onClick:Ne,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>l.value.confirm}),T.includes("clear")&&r.h(Pt,{size:"small",onClick:Ee,disabled:!g.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>l.value.clear})):null,t.action?r.h("div",{class:`${E}-color-picker-action`},{default:t.action}):A?r.h("div",{class:`${E}-color-picker-action`},A.includes("undo")&&r.h(Pt,{size:"small",onClick:se,disabled:!Fe.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>l.value.undo}),A.includes("redo")&&r.h(Pt,{size:"small",onClick:Re,disabled:!De.value,theme:C.peers.Button,themeOverrides:C.peerOverrides.Button},{default:()=>l.value.redo})):null)}return{mergedClsPrefix:d,namespace:c,selfRef:n,hsla:ie,rgba:Y,mergedShow:m,mergedDisabled:s,isMounted:zn(),adjustedTo:it(e),mergedValue:g,handleTriggerClick(){h(!0)},handleClickOutside(I){var ne;!((ne=n.value)===null||ne===void 0)&&ne.contains(kn(I))||h(!1)},renderPanel:X,cssVars:f?void 0:Ge,themeClass:Te==null?void 0:Te.themeClass,onRender:Te==null?void 0:Te.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),r.h("div",{class:[this.themeClass,`${t}-color-picker`],ref:"selfRef",style:this.cssVars},r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h(Fv,{clsPrefix:t,value:this.mergedValue,hsla:this.hsla,disabled:this.mergedDisabled,onClick:this.handleTriggerClick},{label:e.label})}),r.h(_r,{placement:this.placement,show:this.mergedShow,containerClass:this.namespace,teleportDisabled:this.adjustedTo===it.tdkey,to:this.adjustedTo},{default:()=>r.h(r.Transition,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.mergedShow?r.withDirectives(this.renderPanel(),[[Kn,this.handleClickOutside,void 0,{capture:!0}]]):null})})]}))}});function jv(e){const{boxShadow2:t}=e;return{menuBoxShadow:t}}const Uv={name:"Select",common:et,peers:{InternalSelection:$s,InternalSelectMenu:bs},self:jv},Gv=V([x("select",`
|
|
1348
1348
|
z-index: auto;
|
|
1349
1349
|
outline: none;
|
|
1350
1350
|
width: 100%;
|
|
@@ -1353,7 +1353,7 @@ ${t}
|
|
|
1353
1353
|
`),x("select-menu",`
|
|
1354
1354
|
margin: 4px 0;
|
|
1355
1355
|
box-shadow: var(--n-menu-box-shadow);
|
|
1356
|
-
`,[lr({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Kv=Object.assign(Object.assign({},Ce.props),{to:it.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,menuSize:{type: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}),ao=r.defineComponent({name:"Select",props:Kv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.items!==void 0&&Qe("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&Qe("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:o,inlineThemeDisabled:i}=Je(e),a=Ce("Select","-select",Gv,Uv,e,t),s=r.ref(e.defaultValue),l=r.toRef(e,"value"),d=Ct(l,s),c=r.ref(!1),f=r.ref(""),u=Tr(e,["items","options"]),p=r.ref([]),m=r.ref([]),h=r.computed(()=>m.value.concat(p.value).concat(u.value)),y=r.computed(()=>{const{filter:v}=e;if(v)return v;const{labelField:H,valueField:J}=e;return(le,de)=>{if(!de)return!1;const ue=de[H];if(typeof ue=="string")return Si(le,ue);const he=de[J];return typeof he=="string"?Si(le,he):typeof he=="number"?Si(le,String(he)):!1}}),w=r.computed(()=>{if(e.remote)return u.value;{const{value:v}=h,{value:H}=f;return!H.length||!e.filterable?v:dv(v,y.value,H,e.childrenField)}}),g=r.computed(()=>{const{valueField:v,childrenField:H}=e,J=sv(v,H);return dm(w.value,J)}),z=r.computed(()=>cv(h.value,e.valueField,e.childrenField)),F=r.ref(!1),$=Ct(r.toRef(e,"show"),F),k=r.ref(null),M=r.ref(null),b=r.ref(null),{localeRef:S}=ir("Select"),_=r.computed(()=>{var v;return(v=e.placeholder)!==null&&v!==void 0?v:S.value.placeholder}),D=[],q=r.ref(new Map),G=r.computed(()=>{const{fallbackOption:v}=e;if(v===void 0){const{labelField:H,valueField:J}=e;return le=>({[H]:String(le),[J]:le})}return v===!1?!1:H=>Object.assign(v(H),{value:H})});function O(v){const H=e.remote,{value:J}=q,{value:le}=z,{value:de}=G,ue=[];return v.forEach(he=>{if(le.has(he))ue.push(le.get(he));else if(H&&J.has(he))ue.push(J.get(he));else if(de){const me=de(he);me&&ue.push(me)}}),ue}const W=r.computed(()=>{if(e.multiple){const{value:v}=d;return Array.isArray(v)?O(v):[]}return null}),L=r.computed(()=>{const{value:v}=d;return!e.multiple&&!Array.isArray(v)?v===null?null:O([v])[0]||null:null}),Z=un(e),{mergedSizeRef:Y,mergedDisabledRef:ie,mergedStatusRef:oe}=Z;function te(v,H){const{onChange:J,"onUpdate:value":le,onUpdateValue:de}=e,{nTriggerFormChange:ue,nTriggerFormInput:he}=Z;J&&pe(J,v,H),de&&pe(de,v,H),le&&pe(le,v,H),s.value=v,ue(),he()}function ce(v){const{onBlur:H}=e,{nTriggerFormBlur:J}=Z;H&&pe(H,v),J()}function j(){const{onClear:v}=e;v&&pe(v)}function ee(v){const{onFocus:H,showOnFocus:J}=e,{nTriggerFormFocus:le}=Z;H&&pe(H,v),le(),J&&we()}function fe(v){const{onSearch:H}=e;H&&pe(H,v)}function ye(v){const{onScroll:H}=e;H&&pe(H,v)}function ae(){var v;const{remote:H,multiple:J}=e;if(H){const{value:le}=q;if(J){const{valueField:de}=e;(v=W.value)===null||v===void 0||v.forEach(ue=>{le.set(ue[de],ue)})}else{const de=L.value;de&&le.set(de[e.valueField],de)}}}function $e(v){const{onUpdateShow:H,"onUpdate:show":J}=e;H&&pe(H,v),J&&pe(J,v),F.value=v}function we(){ie.value||($e(!0),F.value=!0,e.filterable&&Be())}function se(){$e(!1)}function Re(){f.value="",m.value=D}const Ee=r.ref(!1);function Ne(){e.filterable&&(Ee.value=!0)}function Fe(){e.filterable&&(Ee.value=!1,$.value||Re())}function De(){ie.value||($.value?e.filterable?Be():se():we())}function Ge(v){var H,J;!((J=(H=b.value)===null||H===void 0?void 0:H.selfRef)===null||J===void 0)&&J.contains(v.relatedTarget)||(c.value=!1,ce(v),se())}function Te(v){ee(v),c.value=!0}function X(){c.value=!0}function I(v){var H;!((H=k.value)===null||H===void 0)&&H.$el.contains(v.relatedTarget)||(c.value=!1,ce(v),se())}function ne(){var v;(v=k.value)===null||v===void 0||v.focus(),se()}function B(v){var H;$.value&&(!((H=k.value)===null||H===void 0)&&H.$el.contains(kn(v))||se())}function A(v){if(!Array.isArray(v))return[];if(G.value)return Array.from(v);{const{remote:H}=e,{value:J}=z;if(H){const{value:le}=q;return v.filter(de=>J.has(de)||le.has(de))}else return v.filter(le=>J.has(le))}}function K(v){T(v.rawNode)}function T(v){if(ie.value)return;const{tag:H,remote:J,clearFilterAfterSelect:le,valueField:de}=e;if(H&&!J){const{value:ue}=m,he=ue[0]||null;if(he){const me=p.value;me.length?me.push(he):p.value=[he],m.value=D}}if(J&&q.value.set(v[de],v),e.multiple){const ue=A(d.value),he=ue.findIndex(me=>me===v[de]);if(~he){if(ue.splice(he,1),H&&!J){const me=C(v[de]);~me&&(p.value.splice(me,1),le&&(f.value=""))}}else ue.push(v[de]),le&&(f.value="");te(ue,O(ue))}else{if(H&&!J){const ue=C(v[de]);~ue?p.value=[p.value[ue]]:p.value=D}Ie(),se(),te(v[de],v)}}function C(v){return p.value.findIndex(J=>J[e.valueField]===v)}function E(v){$.value||we();const{value:H}=v.target;f.value=H;const{tag:J,remote:le}=e;if(fe(H),J&&!le){if(!H){m.value=D;return}const{onCreate:de}=e,ue=de?de(H):{[e.labelField]:H,[e.valueField]:H},{valueField:he,labelField:me}=e;u.value.some(ze=>ze[he]===ue[he]||ze[me]===ue[me])||p.value.some(ze=>ze[he]===ue[he]||ze[me]===ue[me])?m.value=D:m.value=[ue]}}function re(v){v.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&se(),j(),H?te([],[]):te(null,null)}function xe(v){!Wn(v,"action")&&!Wn(v,"empty")&&!Wn(v,"header")&&v.preventDefault()}function Se(v){ye(v)}function We(v){var H,J,le,de,ue;if(!e.keyboard){v.preventDefault();return}switch(v.key){case" ":if(e.filterable)break;v.preventDefault();case"Enter":if(!(!((H=k.value)===null||H===void 0)&&H.isComposing)){if($.value){const he=(J=b.value)===null||J===void 0?void 0:J.getPendingTmNode();he?K(he):e.filterable||(se(),Ie())}else if(we(),e.tag&&Ee.value){const he=m.value[0];if(he){const me=he[e.valueField],{value:ze}=d;e.multiple&&Array.isArray(ze)&&ze.includes(me)||T(he)}}}v.preventDefault();break;case"ArrowUp":if(v.preventDefault(),e.loading)return;$.value&&((le=b.value)===null||le===void 0||le.prev());break;case"ArrowDown":if(v.preventDefault(),e.loading)return;$.value?(de=b.value)===null||de===void 0||de.next():we();break;case"Escape":$.value&&(Nc(v),se()),(ue=k.value)===null||ue===void 0||ue.focus();break}}function Ie(){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())}ae(),r.watch(r.toRef(e,"options"),ae);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()}},Ye=r.computed(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),at=i?tt("select",void 0,Ye,e):void 0;return Object.assign(Object.assign({},st),{mergedStatus:oe,mergedClsPrefix:t,mergedBordered:n,namespace:o,treeMate:g,isMounted:zn(),triggerRef:k,menuRef:b,pattern:f,uncontrolledShow:F,mergedShow:$,adjustedTo:it(e),uncontrolledValue:s,mergedValue:d,followerRef:M,localizedPlaceholder:_,selectedOption:L,selectedOptions:W,mergedSize:Y,mergedDisabled:ie,focused:c,activeWithoutMenuOpen:Ee,inlineThemeDisabled:i,onTriggerInputFocus:Ne,onTriggerInputBlur:Fe,handleTriggerOrMenuResize:qe,handleMenuFocus:X,handleMenuBlur:I,handleMenuTabOut:ne,handleTriggerClick:De,handleToggle:K,handleDeleteOption:T,handlePatternInput:E,handleClear:re,handleTriggerBlur:Ge,handleTriggerFocus:Te,handleKeydown:We,handleMenuAfterLeave:Re,handleMenuClickOutside:B,handleMenuScroll:Se,handleMenuKeydown:We,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Ye,themeClass:at==null?void 0:at.themeClass,onRender:at==null?void 0:at.onRender})},render(){return r.h("div",{class:`${this.mergedClsPrefix}-select`},r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h(Vm,{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)]}})}),r.h(_r,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===it.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>r.h(r.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),r.withDirectives(r.h(xm,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:this.menuSize,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 o,i;return[(i=(o=this.$slots).empty)===null||i===void 0?void 0:i.call(o)]},header:()=>{var o,i;return[(i=(o=this.$slots).header)===null||i===void 0?void 0:i.call(o)]},action:()=>{var o,i;return[(i=(o=this.$slots).action)===null||i===void 0?void 0:i.call(o)]}}),this.displayDirective==="show"?[[r.vShow,this.mergedShow],[Gn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Gn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),qv={padding:"8px 14px"};function Xv(e){const{borderRadius:t,boxShadow2:n,baseColor:o}=e;return Object.assign(Object.assign({},qv),{borderRadius:t,boxShadow:n,color:ut(o,"rgba(0, 0, 0, .85)"),textColor:o})}const Yv={name:"Tooltip",common:et,peers:{Popover:xi},self:Xv},Zv=Object.assign(Object.assign({},ws),Ce.props),cr=r.defineComponent({name:"Tooltip",props:Zv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Je(e),n=Ce("Tooltip","-tooltip",void 0,Yv,e,t),o=r.ref(null);return Object.assign(Object.assign({},{syncPosition(){o.value.syncPosition()},setShow(a){o.value.setShow(a)}}),{popoverRef:o,mergedTheme:n,popoverThemeOverrides:r.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return r.h(Cs,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 Jv(e){const{textColorBase:t,opacity1:n,opacity2:o,opacity3:i,opacity4:a,opacity5:s}=e;return{color:t,opacity1Depth:n,opacity2Depth:o,opacity3Depth:i,opacity4Depth:a,opacity5Depth:s}}const Qv={name:"Icon",common:et,self:Jv},e0=x("icon",`
|
|
1356
|
+
`,[sr({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})])]),Kv=Object.assign(Object.assign({},Ce.props),{to:it.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,menuSize:{type: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}),ao=r.defineComponent({name:"Select",props:Kv,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.items!==void 0&&Qe("select","`items` is deprecated, please use `options` instead."),e.onChange!==void 0&&Qe("select","`on-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:o,inlineThemeDisabled:i}=Je(e),a=Ce("Select","-select",Gv,Uv,e,t),s=r.ref(e.defaultValue),l=r.toRef(e,"value"),d=Ct(l,s),c=r.ref(!1),f=r.ref(""),u=Tr(e,["items","options"]),p=r.ref([]),m=r.ref([]),h=r.computed(()=>m.value.concat(p.value).concat(u.value)),y=r.computed(()=>{const{filter:v}=e;if(v)return v;const{labelField:H,valueField:J}=e;return(le,de)=>{if(!de)return!1;const ue=de[H];if(typeof ue=="string")return Si(le,ue);const he=de[J];return typeof he=="string"?Si(le,he):typeof he=="number"?Si(le,String(he)):!1}}),w=r.computed(()=>{if(e.remote)return u.value;{const{value:v}=h,{value:H}=f;return!H.length||!e.filterable?v:dv(v,y.value,H,e.childrenField)}}),g=r.computed(()=>{const{valueField:v,childrenField:H}=e,J=sv(v,H);return dm(w.value,J)}),z=r.computed(()=>cv(h.value,e.valueField,e.childrenField)),F=r.ref(!1),$=Ct(r.toRef(e,"show"),F),k=r.ref(null),M=r.ref(null),b=r.ref(null),{localeRef:S}=ar("Select"),_=r.computed(()=>{var v;return(v=e.placeholder)!==null&&v!==void 0?v:S.value.placeholder}),D=[],q=r.ref(new Map),G=r.computed(()=>{const{fallbackOption:v}=e;if(v===void 0){const{labelField:H,valueField:J}=e;return le=>({[H]:String(le),[J]:le})}return v===!1?!1:H=>Object.assign(v(H),{value:H})});function O(v){const H=e.remote,{value:J}=q,{value:le}=z,{value:de}=G,ue=[];return v.forEach(he=>{if(le.has(he))ue.push(le.get(he));else if(H&&J.has(he))ue.push(J.get(he));else if(de){const me=de(he);me&&ue.push(me)}}),ue}const W=r.computed(()=>{if(e.multiple){const{value:v}=d;return Array.isArray(v)?O(v):[]}return null}),L=r.computed(()=>{const{value:v}=d;return!e.multiple&&!Array.isArray(v)?v===null?null:O([v])[0]||null:null}),Z=un(e),{mergedSizeRef:Y,mergedDisabledRef:ie,mergedStatusRef:oe}=Z;function te(v,H){const{onChange:J,"onUpdate:value":le,onUpdateValue:de}=e,{nTriggerFormChange:ue,nTriggerFormInput:he}=Z;J&&pe(J,v,H),de&&pe(de,v,H),le&&pe(le,v,H),s.value=v,ue(),he()}function ce(v){const{onBlur:H}=e,{nTriggerFormBlur:J}=Z;H&&pe(H,v),J()}function j(){const{onClear:v}=e;v&&pe(v)}function ee(v){const{onFocus:H,showOnFocus:J}=e,{nTriggerFormFocus:le}=Z;H&&pe(H,v),le(),J&&we()}function fe(v){const{onSearch:H}=e;H&&pe(H,v)}function ye(v){const{onScroll:H}=e;H&&pe(H,v)}function ae(){var v;const{remote:H,multiple:J}=e;if(H){const{value:le}=q;if(J){const{valueField:de}=e;(v=W.value)===null||v===void 0||v.forEach(ue=>{le.set(ue[de],ue)})}else{const de=L.value;de&&le.set(de[e.valueField],de)}}}function $e(v){const{onUpdateShow:H,"onUpdate:show":J}=e;H&&pe(H,v),J&&pe(J,v),F.value=v}function we(){ie.value||($e(!0),F.value=!0,e.filterable&&Be())}function se(){$e(!1)}function Re(){f.value="",m.value=D}const Ee=r.ref(!1);function Ne(){e.filterable&&(Ee.value=!0)}function Fe(){e.filterable&&(Ee.value=!1,$.value||Re())}function De(){ie.value||($.value?e.filterable?Be():se():we())}function Ge(v){var H,J;!((J=(H=b.value)===null||H===void 0?void 0:H.selfRef)===null||J===void 0)&&J.contains(v.relatedTarget)||(c.value=!1,ce(v),se())}function Te(v){ee(v),c.value=!0}function X(){c.value=!0}function I(v){var H;!((H=k.value)===null||H===void 0)&&H.$el.contains(v.relatedTarget)||(c.value=!1,ce(v),se())}function ne(){var v;(v=k.value)===null||v===void 0||v.focus(),se()}function B(v){var H;$.value&&(!((H=k.value)===null||H===void 0)&&H.$el.contains(kn(v))||se())}function A(v){if(!Array.isArray(v))return[];if(G.value)return Array.from(v);{const{remote:H}=e,{value:J}=z;if(H){const{value:le}=q;return v.filter(de=>J.has(de)||le.has(de))}else return v.filter(le=>J.has(le))}}function K(v){T(v.rawNode)}function T(v){if(ie.value)return;const{tag:H,remote:J,clearFilterAfterSelect:le,valueField:de}=e;if(H&&!J){const{value:ue}=m,he=ue[0]||null;if(he){const me=p.value;me.length?me.push(he):p.value=[he],m.value=D}}if(J&&q.value.set(v[de],v),e.multiple){const ue=A(d.value),he=ue.findIndex(me=>me===v[de]);if(~he){if(ue.splice(he,1),H&&!J){const me=C(v[de]);~me&&(p.value.splice(me,1),le&&(f.value=""))}}else ue.push(v[de]),le&&(f.value="");te(ue,O(ue))}else{if(H&&!J){const ue=C(v[de]);~ue?p.value=[p.value[ue]]:p.value=D}Ie(),se(),te(v[de],v)}}function C(v){return p.value.findIndex(J=>J[e.valueField]===v)}function E(v){$.value||we();const{value:H}=v.target;f.value=H;const{tag:J,remote:le}=e;if(fe(H),J&&!le){if(!H){m.value=D;return}const{onCreate:de}=e,ue=de?de(H):{[e.labelField]:H,[e.valueField]:H},{valueField:he,labelField:me}=e;u.value.some(ze=>ze[he]===ue[he]||ze[me]===ue[me])||p.value.some(ze=>ze[he]===ue[he]||ze[me]===ue[me])?m.value=D:m.value=[ue]}}function re(v){v.stopPropagation();const{multiple:H}=e;!H&&e.filterable&&se(),j(),H?te([],[]):te(null,null)}function xe(v){!jn(v,"action")&&!jn(v,"empty")&&!jn(v,"header")&&v.preventDefault()}function Se(v){ye(v)}function We(v){var H,J,le,de,ue;if(!e.keyboard){v.preventDefault();return}switch(v.key){case" ":if(e.filterable)break;v.preventDefault();case"Enter":if(!(!((H=k.value)===null||H===void 0)&&H.isComposing)){if($.value){const he=(J=b.value)===null||J===void 0?void 0:J.getPendingTmNode();he?K(he):e.filterable||(se(),Ie())}else if(we(),e.tag&&Ee.value){const he=m.value[0];if(he){const me=he[e.valueField],{value:ze}=d;e.multiple&&Array.isArray(ze)&&ze.includes(me)||T(he)}}}v.preventDefault();break;case"ArrowUp":if(v.preventDefault(),e.loading)return;$.value&&((le=b.value)===null||le===void 0||le.prev());break;case"ArrowDown":if(v.preventDefault(),e.loading)return;$.value?(de=b.value)===null||de===void 0||de.next():we();break;case"Escape":$.value&&(Nc(v),se()),(ue=k.value)===null||ue===void 0||ue.focus();break}}function Ie(){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())}ae(),r.watch(r.toRef(e,"options"),ae);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()}},Ye=r.computed(()=>{const{self:{menuBoxShadow:v}}=a.value;return{"--n-menu-box-shadow":v}}),at=i?tt("select",void 0,Ye,e):void 0;return Object.assign(Object.assign({},st),{mergedStatus:oe,mergedClsPrefix:t,mergedBordered:n,namespace:o,treeMate:g,isMounted:zn(),triggerRef:k,menuRef:b,pattern:f,uncontrolledShow:F,mergedShow:$,adjustedTo:it(e),uncontrolledValue:s,mergedValue:d,followerRef:M,localizedPlaceholder:_,selectedOption:L,selectedOptions:W,mergedSize:Y,mergedDisabled:ie,focused:c,activeWithoutMenuOpen:Ee,inlineThemeDisabled:i,onTriggerInputFocus:Ne,onTriggerInputBlur:Fe,handleTriggerOrMenuResize:qe,handleMenuFocus:X,handleMenuBlur:I,handleMenuTabOut:ne,handleTriggerClick:De,handleToggle:K,handleDeleteOption:T,handlePatternInput:E,handleClear:re,handleTriggerBlur:Ge,handleTriggerFocus:Te,handleKeydown:We,handleMenuAfterLeave:Re,handleMenuClickOutside:B,handleMenuScroll:Se,handleMenuKeydown:We,handleMenuMousedown:xe,mergedTheme:a,cssVars:i?void 0:Ye,themeClass:at==null?void 0:at.themeClass,onRender:at==null?void 0:at.onRender})},render(){return r.h("div",{class:`${this.mergedClsPrefix}-select`},r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.h(Vm,{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)]}})}),r.h(_r,{ref:"followerRef",show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===it.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?"target":void 0,minWidth:"target",placement:this.placement},{default:()=>r.h(r.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),r.withDirectives(r.h(xm,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:this.menuSize,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 o,i;return[(i=(o=this.$slots).empty)===null||i===void 0?void 0:i.call(o)]},header:()=>{var o,i;return[(i=(o=this.$slots).header)===null||i===void 0?void 0:i.call(o)]},action:()=>{var o,i;return[(i=(o=this.$slots).action)===null||i===void 0?void 0:i.call(o)]}}),this.displayDirective==="show"?[[r.vShow,this.mergedShow],[Kn,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[Kn,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),qv={padding:"8px 14px"};function Xv(e){const{borderRadius:t,boxShadow2:n,baseColor:o}=e;return Object.assign(Object.assign({},qv),{borderRadius:t,boxShadow:n,color:ut(o,"rgba(0, 0, 0, .85)"),textColor:o})}const Yv={name:"Tooltip",common:et,peers:{Popover:xi},self:Xv},Zv=Object.assign(Object.assign({},ws),Ce.props),ur=r.defineComponent({name:"Tooltip",props:Zv,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Je(e),n=Ce("Tooltip","-tooltip",void 0,Yv,e,t),o=r.ref(null);return Object.assign(Object.assign({},{syncPosition(){o.value.syncPosition()},setShow(a){o.value.setShow(a)}}),{popoverRef:o,mergedTheme:n,popoverThemeOverrides:r.computed(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return r.h(Cs,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 Jv(e){const{textColorBase:t,opacity1:n,opacity2:o,opacity3:i,opacity4:a,opacity5:s}=e;return{color:t,opacity1Depth:n,opacity2Depth:o,opacity3Depth:i,opacity4Depth:a,opacity5Depth:s}}const Qv={name:"Icon",common:et,self:Jv},e0=x("icon",`
|
|
1357
1357
|
height: 1em;
|
|
1358
1358
|
width: 1em;
|
|
1359
1359
|
line-height: 1em;
|
|
@@ -1362,13 +1362,13 @@ ${t}
|
|
|
1362
1362
|
position: relative;
|
|
1363
1363
|
fill: currentColor;
|
|
1364
1364
|
transform: translateZ(0);
|
|
1365
|
-
`,[N("color-transition",{transition:"color .3s var(--n-bezier)"}),N("depth",{color:"var(--n-color)"},[V("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),V("svg",{height:"1em",width:"1em"})]),t0=Object.assign(Object.assign({},Ce.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),mt=r.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:t0,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Icon","-icon",e0,Qv,e,t),i=r.computed(()=>{const{depth:s}=e,{common:{cubicBezierEaseInOut:l},self:d}=o.value;if(s!==void 0){const{color:c,[`opacity${s}Depth`]:f}=d;return{"--n-bezier":l,"--n-color":c,"--n-opacity":f}}return{"--n-bezier":l,"--n-color":"","--n-opacity":""}}),a=n?tt("icon",r.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:r.computed(()=>{const{size:s,color:l}=e;return{fontSize:Lr(s),color:l}}),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:o,component:i,onRender:a,themeClass:s}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&
|
|
1365
|
+
`,[N("color-transition",{transition:"color .3s var(--n-bezier)"}),N("depth",{color:"var(--n-color)"},[V("svg",{opacity:"var(--n-opacity)",transition:"opacity .3s var(--n-bezier)"})]),V("svg",{height:"1em",width:"1em"})]),t0=Object.assign(Object.assign({},Ce.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),mt=r.defineComponent({_n_icon__:!0,name:"Icon",inheritAttrs:!1,props:t0,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Icon","-icon",e0,Qv,e,t),i=r.computed(()=>{const{depth:s}=e,{common:{cubicBezierEaseInOut:l},self:d}=o.value;if(s!==void 0){const{color:c,[`opacity${s}Depth`]:f}=d;return{"--n-bezier":l,"--n-color":c,"--n-opacity":f}}return{"--n-bezier":l,"--n-color":"","--n-opacity":""}}),a=n?tt("icon",r.computed(()=>`${e.depth||"d"}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:r.computed(()=>{const{size:s,color:l}=e;return{fontSize:Lr(s),color:l}}),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:o,component:i,onRender:a,themeClass:s}=this;return!((e=t==null?void 0:t.$options)===null||e===void 0)&&e._n_icon__&&Zn("icon","don't wrap `n-icon` inside `n-icon`"),a==null||a(),r.h("i",r.mergeProps(this.$attrs,{role:"img",class:[`${o}-icon`,s,{[`${o}-icon--depth`]:n,[`${o}-icon--color-transition`]:n!==void 0}],style:[this.cssVars,this.mergedStyle]}),i?r.h(i):this.$slots)}});function n0(e){const{textColorDisabled:t}=e;return{iconColorDisabled:t}}const r0={name:"InputNumber",common:et,peers:{Button:$i,Input:Ci},self:n0},o0={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};function i0(e){const t="rgba(0, 0, 0, .85)",n="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:o,primaryColor:i,baseColor:a,cardColor:s,modalColor:l,popoverColor:d,borderRadius:c,fontSize:f,opacityDisabled:u}=e;return Object.assign(Object.assign({},o0),{fontSize:f,markFontSize:f,railColor:o,railColorHover:o,fillColor:i,fillColorHover:i,opacityDisabled:u,handleColor:"#FFF",dotColor:s,dotColorModal:l,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 ${o}`,dotBorderActive:`2px solid ${i}`,dotBoxShadow:""})}const a0={name:"Slider",common:et,self:i0},l0={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 s0(e){const{primaryColor:t,opacityDisabled:n,borderRadius:o,textColor3:i}=e;return Object.assign(Object.assign({},l0),{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:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${ve(t,{alpha:.2})}`})}const d0={name:"Switch",common:et,self:s0},c0={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 u0(e){const{textColor2:t,primaryColor:n,textColorDisabled:o,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:s,closeColorHover:l,closeColorPressed:d,tabColor:c,baseColor:f,dividerColor:u,fontWeight:p,textColor1:m,borderRadius:h,fontSize:y,fontWeightStrong:w}=e;return Object.assign(Object.assign({},c0),{colorSegment:c,tabFontSizeCard:y,tabTextColorLine:m,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:o,tabTextColorSegment:m,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:o,tabTextColorBar:m,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:o,tabTextColorCard:m,tabTextColorHoverCard:m,tabTextColorActiveCard:n,tabTextColorDisabledCard:o,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:s,closeColorHover:l,closeColorPressed:d,closeBorderRadius:h,tabColor:c,tabColorSegment:f,tabBorderColor:u,tabFontWeightActive:p,tabFontWeight:p,tabBorderRadius:h,paneTextColor:t,fontWeightStrong:w})}const f0={name:"Tabs",common:et,self:u0},h0=V([x("input-number-suffix",`
|
|
1366
1366
|
display: inline-block;
|
|
1367
1367
|
margin-right: 10px;
|
|
1368
1368
|
`),x("input-number-prefix",`
|
|
1369
1369
|
display: inline-block;
|
|
1370
1370
|
margin-left: 10px;
|
|
1371
|
-
`)]);function p0(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function b0(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function Ti(e){return e==null?!0:!Number.isNaN(e)}function Ms(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function zi(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const Fs=800,Is=100,g0=Object.assign(Object.assign({},Ce.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]}),m0=r.defineComponent({name:"InputNumber",props:g0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onChange!==void 0&&Qe("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:o}=Je(e),i=Ce("InputNumber","-input-number",h0,r0,e,n),{localeRef:a}=
|
|
1371
|
+
`)]);function p0(e){return e==null||typeof e=="string"&&e.trim()===""?null:Number(e)}function b0(e){return e.includes(".")&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e==="-"||e==="-0"}function Ti(e){return e==null?!0:!Number.isNaN(e)}function Ms(e,t){return typeof e!="number"?"":t===void 0?String(e):e.toFixed(t)}function zi(e){if(e===null)return null;if(typeof e=="number")return e;{const t=Number(e);return Number.isNaN(t)?null:t}}const Fs=800,Is=100,g0=Object.assign(Object.assign({},Ce.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]}),m0=r.defineComponent({name:"InputNumber",props:g0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onChange!==void 0&&Qe("input-number","`on-change` is deprecated, please use `on-update:value` instead")});const{mergedBorderedRef:t,mergedClsPrefixRef:n,mergedRtlRef:o}=Je(e),i=Ce("InputNumber","-input-number",h0,r0,e,n),{localeRef:a}=ar("InputNumber"),s=un(e),{mergedSizeRef:l,mergedDisabledRef:d,mergedStatusRef:c}=s,f=r.ref(null),u=r.ref(null),p=r.ref(null),m=r.ref(e.defaultValue),h=r.toRef(e,"value"),y=Ct(h,m),w=r.ref(""),g=X=>{const I=String(X).split(".")[1];return I?I.length:0},z=X=>{const I=[e.min,e.max,e.step,X].map(ne=>ne===void 0?0:g(ne));return Math.max(...I)},F=He(()=>{const{placeholder:X}=e;return X!==void 0?X:a.value.placeholder}),$=He(()=>{const X=zi(e.step);return X!==null?X===0?1:Math.abs(X):1}),k=He(()=>{const X=zi(e.min);return X!==null?X:null}),M=He(()=>{const X=zi(e.max);return X!==null?X:null}),b=()=>{const{value:X}=y;if(Ti(X)){const{format:I,precision:ne}=e;I?w.value=I(X):X===null||ne===void 0||g(X)>ne?w.value=Ms(X,void 0):w.value=Ms(X,ne)}else w.value=String(X)};b();const S=X=>{const{value:I}=y;if(X===I){b();return}const{"onUpdate:value":ne,onUpdateValue:B,onChange:A}=e,{nTriggerFormInput:K,nTriggerFormChange:T}=s;A&&pe(A,X),B&&pe(B,X),ne&&pe(ne,X),m.value=X,K(),T()},_=({offset:X,doUpdateIfValid:I,fixPrecision:ne,isInputing:B})=>{const{value:A}=w;if(B&&b0(A))return!1;const K=(e.parse||p0)(A);if(K===null)return I&&S(null),null;if(Ti(K)){const T=g(K),{precision:C}=e;if(C!==void 0&&C<T&&!ne)return!1;let E=Number.parseFloat((K+X).toFixed(C??z(K)));if(Ti(E)){const{value:re}=M,{value:xe}=k;if(re!==null&&E>re){if(!I||B)return!1;E=re}if(xe!==null&&E<xe){if(!I||B)return!1;E=xe}return e.validator&&!e.validator(E)?!1:(I&&S(E),E)}}return!1},D=He(()=>_({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),q=He(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:I}=$;return _({offset:-I,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),G=He(()=>{const{value:X}=y;if(e.validator&&X===null)return!1;const{value:I}=$;return _({offset:+I,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function O(X){const{onFocus:I}=e,{nTriggerFormFocus:ne}=s;I&&pe(I,X),ne()}function W(X){var I,ne;if(X.target===((I=f.value)===null||I===void 0?void 0:I.wrapperElRef))return;const B=_({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(B!==!1){const T=(ne=f.value)===null||ne===void 0?void 0:ne.inputElRef;T&&(T.value=String(B||"")),y.value===B&&b()}else b();const{onBlur:A}=e,{nTriggerFormBlur:K}=s;A&&pe(A,X),K(),r.nextTick(()=>{b()})}function L(X){const{onClear:I}=e;I&&pe(I,X)}function Z(){const{value:X}=G;if(!X){we();return}const{value:I}=y;if(I===null)e.validator||S(te());else{const{value:ne}=$;_({offset:ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function Y(){const{value:X}=q;if(!X){ae();return}const{value:I}=y;if(I===null)e.validator||S(te());else{const{value:ne}=$;_({offset:-ne,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}const ie=O,oe=W;function te(){if(e.validator)return null;const{value:X}=k,{value:I}=M;return X!==null?Math.max(0,X):I!==null?Math.min(0,I):0}function ce(X){L(X),S(null)}function j(X){var I,ne,B;!((I=p.value)===null||I===void 0)&&I.$el.contains(X.target)&&X.preventDefault(),!((ne=u.value)===null||ne===void 0)&&ne.$el.contains(X.target)&&X.preventDefault(),(B=f.value)===null||B===void 0||B.activate()}let ee=null,fe=null,ye=null;function ae(){ye&&(window.clearTimeout(ye),ye=null),ee&&(window.clearInterval(ee),ee=null)}let $e=null;function we(){$e&&(window.clearTimeout($e),$e=null),fe&&(window.clearInterval(fe),fe=null)}function se(){ae(),ye=window.setTimeout(()=>{ee=window.setInterval(()=>{Y()},Is)},Fs),Pe("mouseup",document,ae,{once:!0})}function Re(){we(),$e=window.setTimeout(()=>{fe=window.setInterval(()=>{Z()},Is)},Fs),Pe("mouseup",document,we,{once:!0})}const Ee=()=>{fe||Z()},Ne=()=>{ee||Y()};function Fe(X){var I,ne;if(X.key==="Enter"){if(X.target===((I=f.value)===null||I===void 0?void 0:I.wrapperElRef))return;_({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((ne=f.value)===null||ne===void 0||ne.deactivate())}else if(X.key==="ArrowUp"){if(!G.value||e.keyboard.ArrowUp===!1)return;X.preventDefault(),_({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Z()}else if(X.key==="ArrowDown"){if(!q.value||e.keyboard.ArrowDown===!1)return;X.preventDefault(),_({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&Y()}}function De(X){w.value=X,e.updateValueOnInput&&!e.format&&!e.parse&&e.precision===void 0&&_({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}r.watch(y,()=>{b()});const Ge={focus:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.focus()},blur:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.blur()},select:()=>{var X;return(X=f.value)===null||X===void 0?void 0:X.select()}},Te=Yt("InputNumber",o,n);return Object.assign(Object.assign({},Ge),{rtlEnabled:Te,inputInstRef:f,minusButtonInstRef:u,addButtonInstRef:p,mergedClsPrefix:n,mergedBordered:t,uncontrolledValue:m,mergedValue:y,mergedPlaceholder:F,displayedValueInvalid:D,mergedSize:l,mergedDisabled:d,displayedValue:w,addable:G,minusable:q,mergedStatus:c,handleFocus:ie,handleBlur:oe,handleClear:ce,handleMouseDown:j,handleAddClick:Ee,handleMinusClick:Ne,handleAddMousedown:Re,handleMinusMousedown:se,handleKeyDown:Fe,handleUpdateDisplayedValue:De,mergedTheme:i,inputThemeOverrides:{paddingSmall:"0 8px 0 10px",paddingMedium:"0 8px 0 12px",paddingLarge:"0 8px 0 14px"},buttonThemeOverrides:r.computed(()=>{const{self:{iconColorDisabled:X}}=i.value,[I,ne,B,A]=Ze(X);return{textColorTextDisabled:`rgb(${I}, ${ne}, ${B})`,opacityDisabled:`${A}`}})})},render(){const{mergedClsPrefix:e,$slots:t}=this,n=()=>r.h(Es,{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:()=>kt(t["minus-icon"],()=>[r.h(gt,{clsPrefix:e},{default:()=>r.h(wg,null)})])}),o=()=>r.h(Es,{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:()=>kt(t["add-icon"],()=>[r.h(gt,{clsPrefix:e},{default:()=>r.h(os,null)})])});return r.h("div",{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},r.h(On,{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(),Ae(t.prefix,a=>a?r.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?[Ae(t.suffix,a=>a?r.h("span",{class:`${e}-input-number-suffix`},a):null),this.buttonPlacement==="right"?n():null,o()]:(i=t.suffix)===null||i===void 0?void 0:i.call(t)}}))}}),v0=V([x("slider",`
|
|
1372
1372
|
display: block;
|
|
1373
1373
|
padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
|
|
1374
1374
|
position: relative;
|
|
@@ -1511,7 +1511,7 @@ ${t}
|
|
|
1511
1511
|
color: var(--n-indicator-text-color);
|
|
1512
1512
|
background-color: var(--n-indicator-color);
|
|
1513
1513
|
box-shadow: var(--n-indicator-box-shadow);
|
|
1514
|
-
`,[
|
|
1514
|
+
`,[sr()]),x("slider-handle-indicator",`
|
|
1515
1515
|
font-size: var(--n-font-size);
|
|
1516
1516
|
padding: 6px 10px;
|
|
1517
1517
|
border-radius: var(--n-indicator-border-radius);
|
|
@@ -1526,7 +1526,7 @@ ${t}
|
|
|
1526
1526
|
margin-top: 12px;
|
|
1527
1527
|
`),N("left",`
|
|
1528
1528
|
margin-right: 12px;
|
|
1529
|
-
`),lr()]),Td(x("slider",[x("slider-dot","background-color: var(--n-dot-color-modal);")])),zd(x("slider",[x("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function As(e){return window.TouchEvent&&e instanceof window.TouchEvent}function Os(){const e=new Map,t=n=>o=>{e.set(n,o)};return r.onBeforeUpdate(()=>{e.clear()}),[e,t]}const x0=0,y0=Object.assign(Object.assign({},Ce.props),{to:it.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]}),w0=r.defineComponent({name:"Slider",props:y0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:o}=Je(e),i=Ce("Slider","-slider",v0,a0,e,t),a=r.ref(null),[s,l]=Os(),[d,c]=Os(),f=r.ref(new Set),u=un(e),{mergedDisabledRef:p}=u,m=r.computed(()=>{const{step:T}=e;if(Number(T)<=0||T==="mark")return 0;const C=T.toString();let E=0;return C.includes(".")&&(E=C.length-C.indexOf(".")-1),E}),h=r.ref(e.defaultValue),y=r.toRef(e,"value"),w=Ct(y,h),g=r.computed(()=>{const{value:T}=w;return(e.range?T:[T]).map(j)}),z=r.computed(()=>g.value.length>2),F=r.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=r.computed(()=>{const{marks:T}=e;return T?Object.keys(T).map(Number.parseFloat):null}),k=r.ref(-1),M=r.ref(-1),b=r.ref(-1),S=r.ref(!1),_=r.ref(!1),D=r.computed(()=>{const{vertical:T,reverse:C}=e;return T?C?"top":"bottom":C?"right":"left"}),q=r.computed(()=>{if(z.value)return;const T=g.value,C=ee(e.range?Math.min(...T):e.min),E=ee(e.range?Math.max(...T):T[0]),{value:re}=D;return e.vertical?{[re]:`${C}%`,height:`${E-C}%`}:{[re]:`${C}%`,width:`${E-C}%`}}),G=r.computed(()=>{const T=[],{marks:C}=e;if(C){const E=g.value.slice();E.sort((Ie,Be)=>Ie-Be);const{value:re}=D,{value:xe}=z,{range:Se}=e,We=xe?()=>!1:Ie=>Se?Ie>=E[0]&&Ie<=E[E.length-1]:Ie<=E[0];for(const Ie of Object.keys(C)){const Be=Number(Ie);T.push({active:We(Be),key:Be,label:C[Ie],style:{[re]:`${ee(Be)}%`}})}}return T});function O(T,C){const E=ee(T),{value:re}=D;return{[re]:`${E}%`,zIndex:C===k.value?1:0}}function W(T){return e.showTooltip||b.value===T||k.value===T&&S.value}function L(T){return S.value?!(k.value===T&&M.value===T):!0}function Z(T){var C;~T&&(k.value=T,(C=s.get(T))===null||C===void 0||C.focus())}function Y(){d.forEach((T,C)=>{W(C)&&T.syncPosition()})}function ie(T){const{"onUpdate:value":C,onUpdateValue:E}=e,{nTriggerFormInput:re,nTriggerFormChange:xe}=u;E&&pe(E,T),C&&pe(C,T),h.value=T,re(),xe()}function oe(T){const{range:C}=e;if(C){if(Array.isArray(T)){const{value:E}=g;T.join()!==E.join()&&ie(T)}}else Array.isArray(T)||g.value[0]!==T&&ie(T)}function te(T,C){if(e.range){const E=g.value.slice();E.splice(C,1,T),oe(E)}else oe(T)}function ce(T,C,E){const re=E!==void 0;E||(E=T-C>0?1:-1);const xe=$.value||[],{step:Se}=e;if(Se==="mark"){const Be=ae(T,xe.concat(C),re?E:void 0);return Be?Be.value:C}if(Se<=0)return C;const{value:We}=m;let Ie;if(re){const Be=Number((C/Se).toFixed(We)),qe=Math.floor(Be),st=Be>qe?qe:qe-1,Ye=Be<qe?qe:qe+1;Ie=ae(C,[Number((st*Se).toFixed(We)),Number((Ye*Se).toFixed(We)),...xe],E)}else{const Be=ye(T);Ie=ae(T,[...xe,Be])}return Ie?j(Ie.value):C}function j(T){return Math.min(e.max,Math.max(e.min,T))}function ee(T){const{max:C,min:E}=e;return(T-E)/(C-E)*100}function fe(T){const{max:C,min:E}=e;return E+(C-E)*T}function ye(T){const{step:C,min:E}=e;if(Number(C)<=0||C==="mark")return T;const re=Math.round((T-E)/C)*C+E;return Number(re.toFixed(m.value))}function ae(T,C=$.value,E){if(!(C!=null&&C.length))return null;let re=null,xe=-1;for(;++xe<C.length;){const Se=C[xe]-T,We=Math.abs(Se);(E===void 0||Se*E>0)&&(re===null||We<re.distance)&&(re={index:xe,distance:We,value:C[xe]})}return re}function $e(T){const C=a.value;if(!C)return;const E=As(T)?T.touches[0]:T,re=C.getBoundingClientRect();let xe;return e.vertical?xe=(re.bottom-E.clientY)/re.height:xe=(E.clientX-re.left)/re.width,e.reverse&&(xe=1-xe),fe(xe)}function we(T){if(p.value||!e.keyboard)return;const{vertical:C,reverse:E}=e;switch(T.key){case"ArrowUp":T.preventDefault(),se(C&&E?-1:1);break;case"ArrowRight":T.preventDefault(),se(!C&&E?-1:1);break;case"ArrowDown":T.preventDefault(),se(C&&E?1:-1);break;case"ArrowLeft":T.preventDefault(),se(!C&&E?1:-1);break}}function se(T){const C=k.value;if(C===-1)return;const{step:E}=e,re=g.value[C],xe=Number(E)<=0||E==="mark"?re:re+E*T;te(ce(xe,re,T>0?1:-1),C)}function Re(T){var C,E;if(p.value||!As(T)&&T.button!==x0)return;const re=$e(T);if(re===void 0)return;const xe=g.value.slice(),Se=e.range?(E=(C=ae(re,xe))===null||C===void 0?void 0:C.index)!==null&&E!==void 0?E:-1:0;Se!==-1&&(T.preventDefault(),Z(Se),Ee(),te(ce(re,g.value[Se]),Se))}function Ee(){S.value||(S.value=!0,e.onDragstart&&pe(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Fe),Pe("mousemove",document,Fe))}function Ne(){S.value&&(S.value=!1,e.onDragend&&pe(e.onDragend),ke("touchend",document,De),ke("mouseup",document,De),ke("touchmove",document,Fe),ke("mousemove",document,Fe))}function Fe(T){const{value:C}=k;if(!S.value||C===-1){Ne();return}const E=$e(T);E!==void 0&&te(ce(E,g.value[C]),C)}function De(){Ne()}function Ge(T){k.value=T,p.value||(b.value=T)}function Te(T){k.value===T&&(k.value=-1,Ne()),b.value===T&&(b.value=-1)}function X(T){b.value=T}function I(T){b.value===T&&(b.value=-1)}r.watch(k,(T,C)=>void r.nextTick(()=>M.value=C)),r.watch(w,()=>{if(e.marks){if(_.value)return;_.value=!0,r.nextTick(()=>{_.value=!1})}r.nextTick(Y)}),r.onBeforeUnmount(()=>{Ne()});const ne=r.computed(()=>{const{self:{markFontSize:T,railColor:C,railColorHover:E,fillColor:re,fillColorHover:xe,handleColor:Se,opacityDisabled:We,dotColor:Ie,dotColorModal:Be,handleBoxShadow:qe,handleBoxShadowHover:st,handleBoxShadowActive:Ye,handleBoxShadowFocus:at,dotBorder:v,dotBoxShadow:H,railHeight:J,railWidthVertical:le,handleSize:de,dotHeight:ue,dotWidth:he,dotBorderRadius:me,fontSize:ze,dotBorderActive:rt,dotColorPopover:Rt},common:{cubicBezierEaseInOut:wn}}=i.value;return{"--n-bezier":wn,"--n-dot-border":v,"--n-dot-border-active":rt,"--n-dot-border-radius":me,"--n-dot-box-shadow":H,"--n-dot-color":Ie,"--n-dot-color-modal":Be,"--n-dot-color-popover":Rt,"--n-dot-height":ue,"--n-dot-width":he,"--n-fill-color":re,"--n-fill-color-hover":xe,"--n-font-size":ze,"--n-handle-box-shadow":qe,"--n-handle-box-shadow-active":Ye,"--n-handle-box-shadow-focus":at,"--n-handle-box-shadow-hover":st,"--n-handle-color":Se,"--n-handle-size":de,"--n-opacity-disabled":We,"--n-rail-color":C,"--n-rail-color-hover":E,"--n-rail-height":J,"--n-rail-width-vertical":le,"--n-mark-font-size":T}}),B=o?tt("slider",void 0,ne,e):void 0,A=r.computed(()=>{const{self:{fontSize:T,indicatorColor:C,indicatorBoxShadow:E,indicatorTextColor:re,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":T,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":E,"--n-indicator-color":C,"--n-indicator-text-color":re}}),K=o?tt("slider-indicator",void 0,A,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:w,mergedDisabled:p,mergedPlacement:F,isMounted:zn(),adjustedTo:it(e),dotTransitionDisabled:_,markInfos:G,isShowTooltip:W,shouldKeepTooltipTransition:L,handleRailRef:a,setHandleRefs:l,setFollowerRefs:c,fillStyle:q,getHandleStyle:O,activeIndex:k,arrifiedValues:g,followerEnabledIndexSet:f,handleRailMouseDown:Re,handleHandleFocus:Ge,handleHandleBlur:Te,handleHandleMouseEnter:X,handleHandleMouseLeave:I,handleRailKeyDown:we,indicatorCssVars:o?void 0:A,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:o?void 0:ne,themeClass:B==null?void 0:B.themeClass,onRender:B==null?void 0:B.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:o}=this;return(e=this.onRender)===null||e===void 0||e.call(this),r.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},r.h("div",{class:`${t}-slider-rail`},r.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?r.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>r.h("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,r.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const s=this.isShowTooltip(a);return r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.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)}},kt(this.$slots.thumb,()=>[r.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&r.h(_r,{ref:this.setFollowerRefs(a),show:s,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===it.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>r.h(r.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 l;return s?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),r.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof o=="function"?o(i):i)):null}})})]})})),this.marks?r.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>r.h("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),C0=x("switch",`
|
|
1529
|
+
`),sr()]),Td(x("slider",[x("slider-dot","background-color: var(--n-dot-color-modal);")])),zd(x("slider",[x("slider-dot","background-color: var(--n-dot-color-popover);")]))]);function As(e){return window.TouchEvent&&e instanceof window.TouchEvent}function Os(){const e=new Map,t=n=>o=>{e.set(n,o)};return r.onBeforeUpdate(()=>{e.clear()}),[e,t]}const x0=0,y0=Object.assign(Object.assign({},Ce.props),{to:it.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]}),w0=r.defineComponent({name:"Slider",props:y0,setup(e){const{mergedClsPrefixRef:t,namespaceRef:n,inlineThemeDisabled:o}=Je(e),i=Ce("Slider","-slider",v0,a0,e,t),a=r.ref(null),[s,l]=Os(),[d,c]=Os(),f=r.ref(new Set),u=un(e),{mergedDisabledRef:p}=u,m=r.computed(()=>{const{step:T}=e;if(Number(T)<=0||T==="mark")return 0;const C=T.toString();let E=0;return C.includes(".")&&(E=C.length-C.indexOf(".")-1),E}),h=r.ref(e.defaultValue),y=r.toRef(e,"value"),w=Ct(y,h),g=r.computed(()=>{const{value:T}=w;return(e.range?T:[T]).map(j)}),z=r.computed(()=>g.value.length>2),F=r.computed(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),$=r.computed(()=>{const{marks:T}=e;return T?Object.keys(T).map(Number.parseFloat):null}),k=r.ref(-1),M=r.ref(-1),b=r.ref(-1),S=r.ref(!1),_=r.ref(!1),D=r.computed(()=>{const{vertical:T,reverse:C}=e;return T?C?"top":"bottom":C?"right":"left"}),q=r.computed(()=>{if(z.value)return;const T=g.value,C=ee(e.range?Math.min(...T):e.min),E=ee(e.range?Math.max(...T):T[0]),{value:re}=D;return e.vertical?{[re]:`${C}%`,height:`${E-C}%`}:{[re]:`${C}%`,width:`${E-C}%`}}),G=r.computed(()=>{const T=[],{marks:C}=e;if(C){const E=g.value.slice();E.sort((Ie,Be)=>Ie-Be);const{value:re}=D,{value:xe}=z,{range:Se}=e,We=xe?()=>!1:Ie=>Se?Ie>=E[0]&&Ie<=E[E.length-1]:Ie<=E[0];for(const Ie of Object.keys(C)){const Be=Number(Ie);T.push({active:We(Be),key:Be,label:C[Ie],style:{[re]:`${ee(Be)}%`}})}}return T});function O(T,C){const E=ee(T),{value:re}=D;return{[re]:`${E}%`,zIndex:C===k.value?1:0}}function W(T){return e.showTooltip||b.value===T||k.value===T&&S.value}function L(T){return S.value?!(k.value===T&&M.value===T):!0}function Z(T){var C;~T&&(k.value=T,(C=s.get(T))===null||C===void 0||C.focus())}function Y(){d.forEach((T,C)=>{W(C)&&T.syncPosition()})}function ie(T){const{"onUpdate:value":C,onUpdateValue:E}=e,{nTriggerFormInput:re,nTriggerFormChange:xe}=u;E&&pe(E,T),C&&pe(C,T),h.value=T,re(),xe()}function oe(T){const{range:C}=e;if(C){if(Array.isArray(T)){const{value:E}=g;T.join()!==E.join()&&ie(T)}}else Array.isArray(T)||g.value[0]!==T&&ie(T)}function te(T,C){if(e.range){const E=g.value.slice();E.splice(C,1,T),oe(E)}else oe(T)}function ce(T,C,E){const re=E!==void 0;E||(E=T-C>0?1:-1);const xe=$.value||[],{step:Se}=e;if(Se==="mark"){const Be=ae(T,xe.concat(C),re?E:void 0);return Be?Be.value:C}if(Se<=0)return C;const{value:We}=m;let Ie;if(re){const Be=Number((C/Se).toFixed(We)),qe=Math.floor(Be),st=Be>qe?qe:qe-1,Ye=Be<qe?qe:qe+1;Ie=ae(C,[Number((st*Se).toFixed(We)),Number((Ye*Se).toFixed(We)),...xe],E)}else{const Be=ye(T);Ie=ae(T,[...xe,Be])}return Ie?j(Ie.value):C}function j(T){return Math.min(e.max,Math.max(e.min,T))}function ee(T){const{max:C,min:E}=e;return(T-E)/(C-E)*100}function fe(T){const{max:C,min:E}=e;return E+(C-E)*T}function ye(T){const{step:C,min:E}=e;if(Number(C)<=0||C==="mark")return T;const re=Math.round((T-E)/C)*C+E;return Number(re.toFixed(m.value))}function ae(T,C=$.value,E){if(!(C!=null&&C.length))return null;let re=null,xe=-1;for(;++xe<C.length;){const Se=C[xe]-T,We=Math.abs(Se);(E===void 0||Se*E>0)&&(re===null||We<re.distance)&&(re={index:xe,distance:We,value:C[xe]})}return re}function $e(T){const C=a.value;if(!C)return;const E=As(T)?T.touches[0]:T,re=C.getBoundingClientRect();let xe;return e.vertical?xe=(re.bottom-E.clientY)/re.height:xe=(E.clientX-re.left)/re.width,e.reverse&&(xe=1-xe),fe(xe)}function we(T){if(p.value||!e.keyboard)return;const{vertical:C,reverse:E}=e;switch(T.key){case"ArrowUp":T.preventDefault(),se(C&&E?-1:1);break;case"ArrowRight":T.preventDefault(),se(!C&&E?-1:1);break;case"ArrowDown":T.preventDefault(),se(C&&E?1:-1);break;case"ArrowLeft":T.preventDefault(),se(!C&&E?1:-1);break}}function se(T){const C=k.value;if(C===-1)return;const{step:E}=e,re=g.value[C],xe=Number(E)<=0||E==="mark"?re:re+E*T;te(ce(xe,re,T>0?1:-1),C)}function Re(T){var C,E;if(p.value||!As(T)&&T.button!==x0)return;const re=$e(T);if(re===void 0)return;const xe=g.value.slice(),Se=e.range?(E=(C=ae(re,xe))===null||C===void 0?void 0:C.index)!==null&&E!==void 0?E:-1:0;Se!==-1&&(T.preventDefault(),Z(Se),Ee(),te(ce(re,g.value[Se]),Se))}function Ee(){S.value||(S.value=!0,e.onDragstart&&pe(e.onDragstart),Pe("touchend",document,De),Pe("mouseup",document,De),Pe("touchmove",document,Fe),Pe("mousemove",document,Fe))}function Ne(){S.value&&(S.value=!1,e.onDragend&&pe(e.onDragend),ke("touchend",document,De),ke("mouseup",document,De),ke("touchmove",document,Fe),ke("mousemove",document,Fe))}function Fe(T){const{value:C}=k;if(!S.value||C===-1){Ne();return}const E=$e(T);E!==void 0&&te(ce(E,g.value[C]),C)}function De(){Ne()}function Ge(T){k.value=T,p.value||(b.value=T)}function Te(T){k.value===T&&(k.value=-1,Ne()),b.value===T&&(b.value=-1)}function X(T){b.value=T}function I(T){b.value===T&&(b.value=-1)}r.watch(k,(T,C)=>void r.nextTick(()=>M.value=C)),r.watch(w,()=>{if(e.marks){if(_.value)return;_.value=!0,r.nextTick(()=>{_.value=!1})}r.nextTick(Y)}),r.onBeforeUnmount(()=>{Ne()});const ne=r.computed(()=>{const{self:{markFontSize:T,railColor:C,railColorHover:E,fillColor:re,fillColorHover:xe,handleColor:Se,opacityDisabled:We,dotColor:Ie,dotColorModal:Be,handleBoxShadow:qe,handleBoxShadowHover:st,handleBoxShadowActive:Ye,handleBoxShadowFocus:at,dotBorder:v,dotBoxShadow:H,railHeight:J,railWidthVertical:le,handleSize:de,dotHeight:ue,dotWidth:he,dotBorderRadius:me,fontSize:ze,dotBorderActive:rt,dotColorPopover:Rt},common:{cubicBezierEaseInOut:wn}}=i.value;return{"--n-bezier":wn,"--n-dot-border":v,"--n-dot-border-active":rt,"--n-dot-border-radius":me,"--n-dot-box-shadow":H,"--n-dot-color":Ie,"--n-dot-color-modal":Be,"--n-dot-color-popover":Rt,"--n-dot-height":ue,"--n-dot-width":he,"--n-fill-color":re,"--n-fill-color-hover":xe,"--n-font-size":ze,"--n-handle-box-shadow":qe,"--n-handle-box-shadow-active":Ye,"--n-handle-box-shadow-focus":at,"--n-handle-box-shadow-hover":st,"--n-handle-color":Se,"--n-handle-size":de,"--n-opacity-disabled":We,"--n-rail-color":C,"--n-rail-color-hover":E,"--n-rail-height":J,"--n-rail-width-vertical":le,"--n-mark-font-size":T}}),B=o?tt("slider",void 0,ne,e):void 0,A=r.computed(()=>{const{self:{fontSize:T,indicatorColor:C,indicatorBoxShadow:E,indicatorTextColor:re,indicatorBorderRadius:xe}}=i.value;return{"--n-font-size":T,"--n-indicator-border-radius":xe,"--n-indicator-box-shadow":E,"--n-indicator-color":C,"--n-indicator-text-color":re}}),K=o?tt("slider-indicator",void 0,A,e):void 0;return{mergedClsPrefix:t,namespace:n,uncontrolledValue:h,mergedValue:w,mergedDisabled:p,mergedPlacement:F,isMounted:zn(),adjustedTo:it(e),dotTransitionDisabled:_,markInfos:G,isShowTooltip:W,shouldKeepTooltipTransition:L,handleRailRef:a,setHandleRefs:l,setFollowerRefs:c,fillStyle:q,getHandleStyle:O,activeIndex:k,arrifiedValues:g,followerEnabledIndexSet:f,handleRailMouseDown:Re,handleHandleFocus:Ge,handleHandleBlur:Te,handleHandleMouseEnter:X,handleHandleMouseLeave:I,handleRailKeyDown:we,indicatorCssVars:o?void 0:A,indicatorThemeClass:K==null?void 0:K.themeClass,indicatorOnRender:K==null?void 0:K.onRender,cssVars:o?void 0:ne,themeClass:B==null?void 0:B.themeClass,onRender:B==null?void 0:B.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:n,formatTooltip:o}=this;return(e=this.onRender)===null||e===void 0||e.call(this),r.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},r.h("div",{class:`${t}-slider-rail`},r.h("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?r.h("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(i=>r.h("div",{key:i.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:i.active}],style:i.style}))):null,r.h("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((i,a)=>{const s=this.isShowTooltip(a);return r.h(Pr,null,{default:()=>[r.h(Rr,null,{default:()=>r.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)}},kt(this.$slots.thumb,()=>[r.h("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&r.h(_r,{ref:this.setFollowerRefs(a),show:s,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(a),teleportDisabled:this.adjustedTo===it.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>r.h(r.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 l;return s?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),r.h("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof o=="function"?o(i):i)):null}})})]})})),this.marks?r.h("div",{class:`${t}-slider-marks`},this.markInfos.map(i=>r.h("div",{key:i.key,class:`${t}-slider-mark`,style:i.style},typeof i.label=="function"?i.label():i.label))):null))}}),C0=x("switch",`
|
|
1530
1530
|
height: var(--n-height);
|
|
1531
1531
|
min-width: var(--n-width);
|
|
1532
1532
|
vertical-align: middle;
|
|
@@ -1627,7 +1627,7 @@ ${t}
|
|
|
1627
1627
|
`)]),N("disabled",[R("rail",`
|
|
1628
1628
|
cursor: not-allowed;
|
|
1629
1629
|
opacity: .5;
|
|
1630
|
-
`)])]),S0=Object.assign(Object.assign({},Ce.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
|
|
1630
|
+
`)])]),S0=Object.assign(Object.assign({},Ce.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 fr;const Ds=r.defineComponent({name:"Switch",props:S0,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.onChange&&Qe("switch","`on-change` is deprecated, please use `on-update:value` instead.")}),fr===void 0&&(typeof CSS<"u"?typeof CSS.supports<"u"?fr=CSS.supports("width","max(1px)"):fr=!1:fr=!0);const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Je(e),o=Ce("Switch","-switch",C0,d0,e,t),i=un(e),{mergedSizeRef:a,mergedDisabledRef:s}=i,l=r.ref(e.defaultValue),d=r.toRef(e,"value"),c=Ct(d,l),f=r.computed(()=>c.value===e.checkedValue),u=r.ref(!1),p=r.ref(!1),m=r.computed(()=>{const{railStyle:S}=e;if(S)return S({focused:p.value,checked:f.value})});function h(S){const{"onUpdate:value":_,onChange:D,onUpdateValue:q}=e,{nTriggerFormInput:G,nTriggerFormChange:O}=i;_&&pe(_,S),q&&pe(q,S),D&&pe(D,S),l.value=S,G(),O()}function y(){const{nTriggerFormFocus:S}=i;S()}function w(){const{nTriggerFormBlur:S}=i;S()}function g(){e.loading||s.value||(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue))}function z(){p.value=!0,y()}function F(){p.value=!1,w(),u.value=!1}function $(S){e.loading||s.value||S.key===" "&&(c.value!==e.checkedValue?h(e.checkedValue):h(e.uncheckedValue),u.value=!1)}function k(S){e.loading||s.value||S.key===" "&&(S.preventDefault(),u.value=!0)}const M=r.computed(()=>{const{value:S}=a,{self:{opacityDisabled:_,railColor:D,railColorActive:q,buttonBoxShadow:G,buttonColor:O,boxShadowFocus:W,loadingColor:L,textColor:Z,iconColor:Y,[Q("buttonHeight",S)]:ie,[Q("buttonWidth",S)]:oe,[Q("buttonWidthPressed",S)]:te,[Q("railHeight",S)]:ce,[Q("railWidth",S)]:j,[Q("railBorderRadius",S)]:ee,[Q("buttonBorderRadius",S)]:fe},common:{cubicBezierEaseInOut:ye}}=o.value;let ae,$e,we;return fr?(ae=`calc((${ce} - ${ie}) / 2)`,$e=`max(${ce}, ${ie})`,we=`max(${j}, calc(${j} + ${ie} - ${ce}))`):(ae=Vt((ot(ce)-ot(ie))/2),$e=Vt(Math.max(ot(ce),ot(ie))),we=ot(ce)>ot(ie)?j:Vt(ot(j)+ot(ie)-ot(ce))),{"--n-bezier":ye,"--n-button-border-radius":fe,"--n-button-box-shadow":G,"--n-button-color":O,"--n-button-width":oe,"--n-button-width-pressed":te,"--n-button-height":ie,"--n-height":$e,"--n-offset":ae,"--n-opacity-disabled":_,"--n-rail-border-radius":ee,"--n-rail-color":D,"--n-rail-color-active":q,"--n-rail-height":ce,"--n-rail-width":j,"--n-width":we,"--n-box-shadow-focus":W,"--n-loading-color":L,"--n-text-color":Z,"--n-icon-color":Y}}),b=n?tt("switch",r.computed(()=>a.value[0]),M,e):void 0;return{handleClick:g,handleBlur:F,handleFocus:z,handleKeyup:$,handleKeydown:k,mergedRailStyle:m,pressed:u,mergedClsPrefix:t,mergedValue:c,checked:f,mergedDisabled:s,cssVars:n?void 0:M,themeClass:b==null?void 0:b.themeClass,onRender:b==null?void 0:b.onRender}},render(){const{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:o,onRender:i,$slots:a}=this;i==null||i();const{checked:s,unchecked:l,icon:d,"checked-icon":c,"unchecked-icon":f}=a,u=!(Mn(d)&&Mn(c)&&Mn(f));return r.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},r.h("div",{class:`${e}-switch__rail`,"aria-hidden":"true",style:o},Ae(s,p=>Ae(l,m=>p||m?r.h("div",{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},r.h("div",{class:`${e}-switch__rail-placeholder`},r.h("div",{class:`${e}-switch__button-placeholder`}),p),r.h("div",{class:`${e}-switch__rail-placeholder`},r.h("div",{class:`${e}-switch__button-placeholder`}),m)):null)),r.h("div",{class:`${e}-switch__button`},Ae(d,p=>Ae(c,m=>Ae(f,h=>r.h(Jr,null,{default:()=>this.loading?r.h(Qr,{key:"loading",clsPrefix:e,strokeWidth:20}):this.checked&&(m||p)?r.h("div",{class:`${e}-switch__button-icon`,key:m?"checked-icon":"icon"},m||p):!this.checked&&(h||p)?r.h("div",{class:`${e}-switch__button-icon`,key:h?"unchecked-icon":"icon"},h||p):null})))),Ae(s,p=>p&&r.h("div",{key:"checked",class:`${e}-switch__checked`},p)),Ae(l,p=>p&&r.h("div",{key:"unchecked",class:`${e}-switch__unchecked`},p)))))}}),Pi="n-tabs",Vs={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]},Ls=r.defineComponent({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:Vs,setup(e){process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.label!==void 0&&Qe("tab-pane","`label` is deprecated, please use `tab` instead.")});const t=r.inject(Pi,null);return t||Ao("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return r.h("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),$0=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},jc(Vs,["displayDirective"])),Ri=r.defineComponent({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:$0,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:o,closableRef:i,tabStyleRef:a,addTabStyleRef:s,tabClassRef:l,addTabClassRef:d,tabChangeIdRef:c,onBeforeLeaveRef:f,triggerRef:u,handleAdd:p,activateTab:m,handleClose:h}=r.inject(Pi);return{trigger:u,mergedClosable:r.computed(()=>{if(e.internalAddable)return!1;const{closable:y}=e;return y===void 0?i.value:y}),style:a,addStyle:s,tabClass:l,addTabClass:d,clsPrefix:t,value:n,type:o,handleClose(y){y.stopPropagation(),!e.disabled&&h(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){p();return}const{name:y}=e,w=++c.id;if(y!==n.value){const{value:g}=f;g?Promise.resolve(g(e.name,n.value)).then(z=>{z&&c.id===w&&m(y)}):m(y)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:o,label:i,tab:a,value:s,mergedClosable:l,trigger:d,$slots:{default:c}}=this,f=i??a;return r.h("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?r.h("div",{class:`${t}-tabs-tab-pad`}):null,r.h("div",Object.assign({key:n,"data-name":n,"data-disabled":o?!0:void 0},r.mergeProps({class:[`${t}-tabs-tab`,s===n&&`${t}-tabs-tab--active`,o&&`${t}-tabs-tab--disabled`,l&&`${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)),r.h("span",{class:`${t}-tabs-tab__label`},e?r.h(r.Fragment,null,r.h("div",{class:`${t}-tabs-tab__height-placeholder`}," "),r.h(gt,{clsPrefix:t},{default:()=>r.h(os,null)})):c?c():typeof f=="object"?f:dn(f??n)),l&&this.type==="card"?r.h(ui,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:o}):null))}}),k0=x("tabs",`
|
|
1631
1631
|
box-sizing: border-box;
|
|
1632
1632
|
width: 100%;
|
|
1633
1633
|
display: flex;
|
|
@@ -1978,4 +1978,4 @@ ${t}
|
|
|
1978
1978
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1979
1979
|
`),x("tabs-pad",`
|
|
1980
1980
|
border-top: 1px solid var(--n-tab-border-color);
|
|
1981
|
-
`)])])])]),T0=Object.assign(Object.assign({},Ce.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]}),z0=r.defineComponent({name:"Tabs",props:T0,setup(e,{slots:t}){var n,o,i,a;process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.labelSize!==void 0&&Qe("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&Qe("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&Qe("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:s,inlineThemeDisabled:l}=Je(e),d=Ce("Tabs","-tabs",k0,f0,e,s),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=r.ref(null),h=r.ref(null),y=r.ref(!0),w=r.ref(!0),g=Tr(e,["labelSize","size"]),z=Tr(e,["activeName","value"]),F=r.ref((o=(n=z.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&o!==void 0?o:t.default?(a=(i=_n(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=Ct(z,F),k={id:0},M=r.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});r.watch($,()=>{k.id=0,q(),G()});function b(){var B;const{value:A}=$;return A===null?null:(B=c.value)===null||B===void 0?void 0:B.querySelector(`[data-name="${A}"]`)}function S(B){if(e.type==="card")return;const{value:A}=f;if(!A)return;const K=A.style.opacity==="0";if(B){const T=`${s.value}-tabs-bar--disabled`,{barWidth:C,placement:E}=e;if(B.dataset.disabled==="true"?A.classList.add(T):A.classList.remove(T),["top","bottom"].includes(E)){if(D(["top","maxHeight","height"]),typeof C=="number"&&B.offsetWidth>=C){const re=Math.floor((B.offsetWidth-C)/2)+B.offsetLeft;A.style.left=`${re}px`,A.style.maxWidth=`${C}px`}else A.style.left=`${B.offsetLeft}px`,A.style.maxWidth=`${B.offsetWidth}px`;A.style.width="8192px",K&&(A.style.transition="none"),A.offsetWidth,K&&(A.style.transition="",A.style.opacity="1")}else{if(D(["left","maxWidth","width"]),typeof C=="number"&&B.offsetHeight>=C){const re=Math.floor((B.offsetHeight-C)/2)+B.offsetTop;A.style.top=`${re}px`,A.style.maxHeight=`${C}px`}else A.style.top=`${B.offsetTop}px`,A.style.maxHeight=`${B.offsetHeight}px`;A.style.height="8192px",K&&(A.style.transition="none"),A.offsetHeight,K&&(A.style.transition="",A.style.opacity="1")}}}function _(){if(e.type==="card")return;const{value:B}=f;B&&(B.style.opacity="0")}function D(B){const{value:A}=f;if(A)for(const K of B)A.style[K]=""}function q(){if(e.type==="card")return;const B=b();B?S(B):_()}function G(){var B;const A=(B=m.value)===null||B===void 0?void 0:B.$el;if(!A)return;const K=b();if(!K)return;const{scrollLeft:T,offsetWidth:C}=A,{offsetLeft:E,offsetWidth:re}=K;T>E?A.scrollTo({top:0,left:E,behavior:"smooth"}):E+re>T+C&&A.scrollTo({top:0,left:E+re-C,behavior:"smooth"})}const O=r.ref(null);let W=0,L=null;function Z(B){const A=O.value;if(A){W=B.getBoundingClientRect().height;const K=`${W}px`,T=()=>{A.style.height=K,A.style.maxHeight=K};L?(T(),L(),L=null):L=T}}function Y(B){const A=O.value;if(A){const K=B.getBoundingClientRect().height,T=()=>{document.body.offsetHeight,A.style.maxHeight=`${K}px`,A.style.height=`${Math.max(W,K)}px`};L?(L(),L=null,T()):L=T}}function ie(){const B=O.value;if(B){B.style.maxHeight="",B.style.height="";const{paneWrapperStyle:A}=e;if(typeof A=="string")B.style.cssText=A;else if(A){const{maxHeight:K,height:T}=A;K!==void 0&&(B.style.maxHeight=K),T!==void 0&&(B.style.height=T)}}}const oe={value:[]},te=r.ref("next");function ce(B){const A=$.value;let K="next";for(const T of oe.value){if(T===A)break;if(T===B){K="prev";break}}te.value=K,j(B)}function j(B){const{onActiveNameChange:A,onUpdateValue:K,"onUpdate:value":T}=e;A&&pe(A,B),K&&pe(K,B),T&&pe(T,B),F.value=B}function ee(B){const{onClose:A}=e;A&&pe(A,B)}function fe(){const{value:B}=f;if(!B)return;const A="transition-disabled";B.classList.add(A),q(),B.classList.remove(A)}const ye=r.ref(null);function ae({transitionDisabled:B}){const A=c.value;if(!A)return;B&&A.classList.add("transition-disabled");const K=b();K&&ye.value&&(ye.value.style.width=`${K.offsetWidth}px`,ye.value.style.height=`${K.offsetHeight}px`,ye.value.style.transform=`translateX(${K.offsetLeft-ot(getComputedStyle(A).paddingLeft)}px)`,B&&ye.value.offsetWidth),B&&A.classList.remove("transition-disabled")}r.watch([$],()=>{e.type==="segment"&&r.nextTick(()=>{ae({transitionDisabled:!1})})}),r.onMounted(()=>{e.type==="segment"&&ae({transitionDisabled:!0})});let $e=0;function we(B){var A;if(B.contentRect.width===0&&B.contentRect.height===0||$e===B.contentRect.width)return;$e=B.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&fe(),K!=="segment"){const{placement:T}=e;De((T==="top"||T==="bottom"?(A=m.value)===null||A===void 0?void 0:A.$el:h.value)||null)}}const se=di(we,64);r.watch([()=>e.justifyContent,()=>e.size],()=>{r.nextTick(()=>{const{type:B}=e;(B==="line"||B==="bar")&&fe()})});const Re=r.ref(!1);function Ee(B){var A;const{target:K,contentRect:{width:T,height:C}}=B,E=K.parentElement.parentElement.offsetWidth,re=K.parentElement.parentElement.offsetHeight,{placement:xe}=e;if(!Re.value)xe==="top"||xe==="bottom"?E<T&&(Re.value=!0):re<C&&(Re.value=!0);else{const{value:Se}=p;if(!Se)return;xe==="top"||xe==="bottom"?E-T>Se.$el.offsetWidth&&(Re.value=!1):re-C>Se.$el.offsetHeight&&(Re.value=!1)}De(((A=m.value)===null||A===void 0?void 0:A.$el)||null)}const Ne=di(Ee,64);function Fe(){const{onAdd:B}=e;B&&B(),r.nextTick(()=>{const A=b(),{value:K}=m;!A||!K||K.scrollTo({left:A.offsetLeft,top:0,behavior:"smooth"})})}function De(B){if(!B)return;const{placement:A}=e;if(A==="top"||A==="bottom"){const{scrollLeft:K,scrollWidth:T,offsetWidth:C}=B;y.value=K<=0,w.value=K+C>=T}else{const{scrollTop:K,scrollHeight:T,offsetHeight:C}=B;y.value=K<=0,w.value=K+C>=T}}const Ge=di(B=>{De(B.target)},64);r.provide(Pi,{triggerRef:r.toRef(e,"trigger"),tabStyleRef:r.toRef(e,"tabStyle"),tabClassRef:r.toRef(e,"tabClass"),addTabStyleRef:r.toRef(e,"addTabStyle"),addTabClassRef:r.toRef(e,"addTabClass"),paneClassRef:r.toRef(e,"paneClass"),paneStyleRef:r.toRef(e,"paneStyle"),mergedClsPrefixRef:s,typeRef:r.toRef(e,"type"),closableRef:r.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:r.toRef(e,"onBeforeLeave"),activateTab:ce,handleClose:ee,handleAdd:Fe}),ca(()=>{q(),G()}),r.watchEffect(()=>{const{value:B}=u;if(!B)return;const{value:A}=s,K=`${A}-tabs-nav-scroll-wrapper--shadow-start`,T=`${A}-tabs-nav-scroll-wrapper--shadow-end`;y.value?B.classList.remove(K):B.classList.add(K),w.value?B.classList.remove(T):B.classList.add(T)});const Te={syncBarPosition:()=>{q()}},X=()=>{ae({transitionDisabled:!0})},I=r.computed(()=>{const{value:B}=g,{type:A}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[A],T=`${B}${K}`,{self:{barColor:C,closeIconColor:E,closeIconColorHover:re,closeIconColorPressed:xe,tabColor:Se,tabBorderColor:We,paneTextColor:Ie,tabFontWeight:Be,tabBorderRadius:qe,tabFontWeightActive:st,colorSegment:Ye,fontWeightStrong:at,tabColorSegment:v,closeSize:H,closeIconSize:J,closeColorHover:le,closeColorPressed:de,closeBorderRadius:ue,[Q("panePadding",B)]:he,[Q("tabPadding",T)]:me,[Q("tabPaddingVertical",T)]:ze,[Q("tabGap",T)]:rt,[Q("tabGap",`${T}Vertical`)]:Rt,[Q("tabTextColor",A)]:wn,[Q("tabTextColorActive",A)]:Jt,[Q("tabTextColorHover",A)]:Qt,[Q("tabTextColorDisabled",A)]:pr,[Q("tabFontSize",B)]:br},common:{cubicBezierEaseInOut:Vn}}=d.value;return{"--n-bezier":Vn,"--n-color-segment":Ye,"--n-bar-color":C,"--n-tab-font-size":br,"--n-tab-text-color":wn,"--n-tab-text-color-active":Jt,"--n-tab-text-color-disabled":pr,"--n-tab-text-color-hover":Qt,"--n-pane-text-color":Ie,"--n-tab-border-color":We,"--n-tab-border-radius":qe,"--n-close-size":H,"--n-close-icon-size":J,"--n-close-color-hover":le,"--n-close-color-pressed":de,"--n-close-border-radius":ue,"--n-close-icon-color":E,"--n-close-icon-color-hover":re,"--n-close-icon-color-pressed":xe,"--n-tab-color":Se,"--n-tab-font-weight":Be,"--n-tab-font-weight-active":st,"--n-tab-padding":me,"--n-tab-padding-vertical":ze,"--n-tab-gap":rt,"--n-tab-gap-vertical":Rt,"--n-pane-padding-left":dt(he,"left"),"--n-pane-padding-right":dt(he,"right"),"--n-pane-padding-top":dt(he,"top"),"--n-pane-padding-bottom":dt(he,"bottom"),"--n-font-weight-strong":at,"--n-tab-color-segment":v}}),ne=l?tt("tabs",r.computed(()=>`${g.value[0]}${e.type[0]}`),I,e):void 0;return Object.assign({mergedClsPrefix:s,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:ye,tabsPaneWrapperRef:O,tabsElRef:c,barElRef:f,addTabInstRef:p,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Re,tabWrapperStyle:M,handleNavResize:se,mergedSize:g,handleScroll:Ge,handleTabsResize:Ne,cssVars:l?void 0:I,themeClass:ne==null?void 0:ne.themeClass,animationDirection:te,renderNameListRef:oe,yScrollElRef:h,handleSegmentResize:X,onAnimationBeforeLeave:Z,onAnimationEnter:Y,onAnimationAfterEnter:ie,onRender:ne==null?void 0:ne.onRender},Te)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:o,addable:i,mergedSize:a,renderNameListRef:s,onRender:l,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:p}}=this;l==null||l();const m=f?_n(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?_n(f()).filter(k=>k.type.__TAB__===!0):[],y=!h.length,w=t==="card",g=t==="segment",z=!w&&!g&&this.justifyContent;s.value=[];const F=()=>{const k=r.h("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},z?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),y?m.map((M,b)=>(s.value.push(M.props.name),Ei(r.h(Ri,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:b!==0&&(!z||z==="center"||z==="start"||z==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,b)=>(s.value.push(M.props.name),Ei(b!==0&&!z?Ws(M):M))),!o&&i&&w?Ns(i,(y?m.length:h.length)!==0):null,z?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return r.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},w&&i?r.h(Gt,{onResize:this.handleTabsResize},{default:()=>k}):k,w?r.h("div",{class:`${e}-tabs-pad`}):null,w?null:r.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return r.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,z&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},r.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Ae(u,k=>k&&r.h("div",{class:`${e}-tabs-nav__prefix`},k)),g?r.h(Gt,{onResize:this.handleSegmentResize},{default:()=>r.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},r.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},r.h("div",{class:`${e}-tabs-wrapper`},r.h("div",{class:`${e}-tabs-tab`}))),y?m.map((k,M)=>(s.value.push(k.props.name),r.h(Ri,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(s.value.push(k.props.name),M===0?k:Ws(k))))}):r.h(Gt,{onResize:this.handleNavResize},{default:()=>r.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?r.h(Ic,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:F}):r.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},F()))}),o&&i&&w?Ns(i,!0):null,Ae(p,k=>k&&r.h("div",{class:`${e}-tabs-nav__suffix`},k))),y&&(this.animated&&($==="top"||$==="bottom")?r.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Hs(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Hs(m,this.mergedValue,this.renderedNames)))}});function Hs(e,t,n,o,i,a,s){const l=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,p=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||p("show")||p("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!p("if");l.push(h?r.withDirectives(d,[[r.vShow,m]]):d)}}),s?r.h(r.TransitionGroup,{name:`${s}-transition`,onBeforeLeave:o,onEnter:i,onAfterEnter:a},{default:()=>l}):l}function Ns(e,t){return r.h(Ri,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Ws(e){const t=r.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function Ei(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function js(e,t,n){try{const{data:o}=await tn().POST("/api/visualizations",{type:e,title:t,config:n});return o.id}catch(o){$n(o)}}async function P0(e,t,n,o){try{if(t)await Us(t,n,o);else return await js(e,n,o)}catch(i){$n(i)}}async function Us(e,t,n){try{await tn().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(o){$n(o)}}function fr(e){return String(e).toLowerCase()==="true"}async function R0(e,t={}){const n=hr(e.settings,t.settings),o=e.specs,i=_0(e.tracks,t.tracks);return{plugin:e,settings:n,specs:o,tracks:i}}function E0(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=fr(n)),n}function B0(e,t={}){var i,a,s;const n=t,o=(i=e.test_param)==null?void 0:i.name;if(!o)console.error(`Test parameter has no name: ${e.name}.`);else{const l=n[o]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===l&&(n[o]=l,(s=d.inputs)!=null&&s.length&&hr(d.inputs,n))}return n}function hr(e,t){const n=t||{};return e==null||e.forEach(o=>{o.type==="conditional"?n[o.name]=B0(o,n[o.name]):n[o.name]=E0(o,n[o.name])}),n}function _0(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((o,i)=>{n[i]=hr(e,o)})),n}const M0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},F0=r.defineComponent({__name:"InputConditional",props:r.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,o=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=r.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const s=r.useModel(e,"value");(!s.value||!(a in s.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,s.value);const l=r.ref(p()),d=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const y of n.input.cases)h[y.value]=hr(y.inputs),h[y.value][a]=y.value;return h}),c=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const y of n.input.cases)h[y.value]=y.inputs;return h}),f=r.computed(()=>c.value[l.value]),u=r.computed({get(){return l.value==="true"},set(h){l.value=String(h)}});function p(){return s.value&&s.value[a]}function m(h){let y={...d.value[l.value]};if(h){const w={};f.value.forEach(g=>{w[g.name]=h[g.name]}),y={...y,...h}}o("update:value",y)}return r.watch(()=>s.value,()=>{l.value=p()}),r.watch(()=>l.value,()=>{m()}),(h,y)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[i.value.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ds),{key:0,value:u.value,"onUpdate:value":y[0]||(y[0]=w=>u.value=w)},null,8,["value"])):(r.openBlock(),r.createBlock(r.unref(ao),{key:1,value:l.value,"onUpdate:value":y[1]||(y[1]=w=>l.value=w),options:i.value.data},null,8,["value","options"])),f.value?(r.openBlock(),r.createElementBlock("div",M0,[r.createVNode(Bi,{"dataset-id":h.datasetId,inputs:f.value,values:s.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):r.createCommentVNode("",!0)],64))}}),lo=r.ref({});function Gs(){async function e(t){return lo.value[t]||(lo.value[t]=tn().GET(`/api/datasets/${t}`).catch(n=>{throw delete lo.value[t],n})),await lo.value[t]}return{getDataset:e}}const I0={key:0},A0={key:0,class:"text-red-600 mb-1"},O0={key:1},Ks=100,D0=r.defineComponent({__name:"InputData",props:r.mergeModels({datasetId:{},extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=Gs(),n=e,o=r.ref([]),i=r.useModel(e,"value"),a=r.ref(!1),s=r.ref(null);async function l(u){if(n.datasetId){a.value=!0;try{const{data:p}=await t(n.datasetId),m=p.history_id,h="v=dev&order=hid&q=deleted&qv=false&q=visible&qv=true&",y=n.extension?`q=extension-eq&qv=${n.extension}&`:"",w=u?`q=name-contains&qv=${u}&`:"",{data:g}=await tn().GET(`/api/histories/${m}/contents?${h}${y}${w}limit=${Ks}`);if(g&&g.length>0){const z=g.map(F=>({label:`${F.hid}: ${F.name}`,value:{id:F.id,hid:F.hid,name:F.name}}));g.length>=Ks&&z.push({label:"...filter for more",value:null,disabled:!0}),n.optional&&z.unshift({label:"-- Clear Selection --",value:null}),o.value=z}}catch(p){console.log(p)}finally{a.value=!1}}else console.debug("Data selector disabled, since `datasetId` is unavailable.")}function d(u){i.value=u}function c(u){return r.h("div",{class:"my-1 whitespace-normal break-all"},[r.h(mt,{class:"size-3 mr-1"},{default:()=>r.h(Ui)}),u.label])}function f({option:u}){return r.h("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},u.label)}return r.watch(()=>i.value,()=>{var u;s.value=((u=i.value)==null?void 0:u.name)||null},{immediate:!0}),l(),(u,p)=>u.datasetId?(r.openBlock(),r.createElementBlock("div",I0,[!u.optional&&!i.value?(r.openBlock(),r.createElementBlock("div",A0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji))]),_:1}),p[0]||(p[0]=r.createElementVNode("span",null,"Please select a dataset.",-1))])):r.createCommentVNode("",!0),r.createVNode(r.unref(ao),{filterable:"",placeholder:"Select a Dataset",loading:a.value,"render-label":c,"render-tag":f,options:o.value,value:s.value,onSearch:l,"onUpdate:value":d},null,8,["loading","options","value"])])):(r.openBlock(),r.createElementBlock("div",O0,"Selection deferred."))}});function V0(e,t,n,o){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const s in a)(o&&["int","float"].includes(a[s])||n&&a[s]==="str"||!o&&!n)&&i.push({label:"Column: "+(parseInt(s)+1),value:s});return i}const L0=r.defineComponent({__name:"InputDataColumn",props:r.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=Gs(),n=e,o=r.ref([]),i=r.useModel(e,"value");async function a(){if(n.datasetId)try{const{data:l}=await t(n.datasetId),d=V0(l,n.isAuto,n.isText,n.isNumber);o.value=d,s()}catch(l){console.debug(l)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function s(){o.value.length>0&&i.value===null&&(i.value=o.value[0].value)}return a(),r.watch(()=>i.value,()=>s()),(l,d)=>l.datasetId?(r.openBlock(),r.createBlock(r.unref(ao),{key:0,value:i.value,"onUpdate:value":d[0]||(d[0]=c=>i.value=c),options:o.value},null,8,["value","options"])):(r.openBlock(),r.createBlock(r.unref(On),{key:1,value:i.value,"onUpdate:value":d[1]||(d[1]=c=>i.value=c)},null,8,["value"]))}}),H0={class:"select-none"},N0={class:"font-bold mb-1"},W0={key:0,class:"text-xs mb-1"},j0={key:5},qs=.01,Bi=r.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(a());function a(){const l={...n.values};return n.inputs.forEach(d=>{l[d.name]===void 0&&(l[d.name]=null)}),l}function s(){o("update:values",i.value)}return r.watch(()=>n.values,()=>{i.value=a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",H0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.inputs,(c,f)=>(r.openBlock(),r.createElementBlock("div",{key:f,class:r.normalizeClass(f<l.inputs.length-1?"pb-2":"")},[r.createElementVNode("div",N0,r.toDisplayString(c.label||c.name),1),c.help?(r.openBlock(),r.createElementBlock("div",W0,r.toDisplayString(c.help),1)):r.createCommentVNode("",!0),r.createElementVNode("div",null,[c.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ds),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s]},null,8,["value","onUpdate:value"])):c.type==="color"?(r.openBlock(),r.createBlock(r.unref(Wv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(r.openBlock(),r.createBlock(F0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(r.openBlock(),r.createBlock(D0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,extension:c.extension,optional:r.unref(fr)(c.optional)},null,8,["value","onUpdate:value","dataset-id","extension","optional"])):c.type==="data_column"?(r.openBlock(),r.createBlock(L0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,"is-auto":r.unref(fr)(c.is_auto),"is-text":r.unref(fr)(c.is_text),"is-number":r.unref(fr)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(c.type)?(r.openBlock(),r.createElementBlock("div",j0,[c.min!==void 0&&c.max!==void 0?(r.openBlock(),r.createBlock(r.unref(w0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],min:Number(c.min),max:Number(c.max),step:c.type==="float"?qs:1},null,8,["value","onUpdate:value","min","max","step"])):r.createCommentVNode("",!0),r.createVNode(r.unref(m0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],size:"small",min:Number(c.min),max:Number(c.max),step:c.type==="float"?qs:1},null,8,["value","onUpdate:value","min","max","step"])])):c.type==="select"?(r.openBlock(),r.createBlock(r.unref(ao),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],options:c.data},null,8,["value","onUpdate:value","options"])):c.type==="textarea"?(r.openBlock(),r.createBlock(r.unref(On),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(r.openBlock(),r.createBlock(r.unref(On),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>s())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),U0={class:"border border-dotted border-green-600 rounded p-2"},G0={class:"mx-1"},K0=r.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>hr(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),o("update:values-array",d)}function s(d){const c=[...n.valuesArray];c.splice(d,1),o("update:values-array",c)}function l(d,c){const f=[...n.valuesArray];f[d]={...c},o("update:values-array",f)}return(d,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Pt),{size:"tiny",type:"primary",onClick:a},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ui))]),_:1}),c[0]||(c[0]=r.createElementVNode("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.valuesArray,(f,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,class:"py-2"},[r.createElementVNode("div",U0,[r.createVNode(Bi,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":p=>l(u,p)},null,8,["dataset-id","inputs","values","onUpdate:values"]),r.createVNode(r.unref(Pt),{class:"w-full mt-2","data-description":"remove repeat block",disabled:d.valuesArray.length<=1,size:"tiny",type:"primary",onClick:p=>s(u)},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(id))]),_:1}),r.createElementVNode("span",G0,"Remove Track "+r.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),q0=2e3,X0=r.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,o=t;let i=null;return r.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>o("timeout"),q0)}),(a,s)=>a.message?(r.openBlock(),r.createBlock(r.unref(ks),{key:0,type:a.messageType},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(a.message),1)]),_:1},8,["type"])):r.createCommentVNode("",!0)}}),Y0={class:"text-xs"},Z0=r.defineComponent({__name:"ApiStatus",setup(e){const t=r.ref("...");async function n(){try{const{data:o}=await tn().GET("/api/version");t.value=o.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(o,i)=>t.value?(r.openBlock(),r.createBlock(r.unref(cr),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ed),{class:"text-green-600"})]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",Y0,"Connected to Galaxy Version "+r.toDisplayString(t.value)+".",1)]),_:1})):(r.openBlock(),r.createBlock(r.unref(cr),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji),{class:"text-red-600"})]),_:1})]),default:r.withCtx(()=>[i[0]||(i[0]=r.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),J0=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Q0={},ex={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function tx(e,t){return r.openBlock(),r.createElementBlock("svg",ex,t[0]||(t[0]=[r.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),r.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const nx=J0(Q0,[["render",tx]]),rx={class:"overflow-auto select-none bg-white z-10 p-2"},ox={key:0,class:"flex"},ix={class:"flex-1 font-thin text-lg mt-1"},ax={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},lx={class:"flex"},sx={class:"flex justify-center center-items"},dx={class:"m-2"},cx=["src"],ux={class:"overflow-hidden break-words p-1"},fx={class:"font-bold"},hx=["innerHTML"],px=r.defineComponent({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},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,o=t,i=r.ref(""),a=r.ref("info"),s=r.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function l(){try{if(n.visualizationId)await Us(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 js(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",o("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Di(u),a.value="error"}}function d(u){o("update:settings",u)}function c(u){o("update:tracks",u)}function f(u){o("update:visualization-title",u)}return(u,p)=>(r.openBlock(),r.createElementBlock("div",rx,[u.datasetUrl?(r.openBlock(),r.createElementBlock("div",ox,[r.createElementVNode("div",ix,[p[2]||(p[2]=r.createElementVNode("span",null,"Charts",-1)),r.createVNode(Z0)]),r.createElementVNode("div",null,[u.datasetId?(r.openBlock(),r.createBlock(r.unref(cr),{key:0,trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:l},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(rd))]),_:1})]),_:1})]),default:r.withCtx(()=>[p[3]||(p[3]=r.createElementVNode("span",{class:"text-xs"},"Save",-1))]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.unref(cr),{trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:p[0]||(p[0]=m=>o("toggle"))},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(nd))]),_:1})]),_:1})]),default:r.withCtx(()=>[p[4]||(p[4]=r.createElementVNode("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):r.createCommentVNode("",!0),r.createVNode(X0,{message:i.value,"message-type":a.value,onTimeout:p[1]||(p[1]=m=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),r.createElementVNode("div",ax,[r.createElementVNode("div",lx,[r.createElementVNode("div",sx,[r.createElementVNode("div",dx,[n.logoUrl?(r.openBlock(),r.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,cx)):(r.openBlock(),r.createBlock(nx,{key:1}))])]),r.createElementVNode("div",ux,[r.createElementVNode("span",fx,r.toDisplayString(u.html),1),r.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,hx)])])]),r.createElementVNode("div",null,[p[5]||(p[5]=r.createElementVNode("div",{class:"font-bold"},"Title",-1)),p[6]||(p[6]=r.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),r.createVNode(r.unref(On),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),r.createVNode(r.unref(z0),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":s.value?"!hidden":""},{default:r.withCtx(()=>[u.trackInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ls),{key:0,name:"tracks"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(od))]),_:1}),p[7]||(p[7]=r.createElementVNode("span",{class:"mx-1"},"Tracks",-1))]),default:r.withCtx(()=>[r.createVNode(K0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):r.createCommentVNode("",!0),u.settingInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ls),{key:1,name:"settings"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Js))]),_:1}),p[8]||(p[8]=r.createElementVNode("span",{class:"mx-1"},"Settings",-1))]),default:r.withCtx(()=>[r.createVNode(Bi,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):r.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});function bx(e,t="app"){if(e===void 0){const l=document.getElementById(t);if(l)e=JSON.parse((l==null?void 0:l.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",o=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,a=(e==null?void 0:e.visualization_plugin)??{},s=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:s}}const gx={key:1,class:"m-2"},mx={key:0,class:"relative max-w-full h-screen overflow-hidden"},vx=r.defineComponent({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:s}=bx(t.incoming,t.container),l=r.ref(!0),d=r.ref(""),c=r.ref(""),f=r.ref(""),u=r.ref(!0),p=r.ref(""),m=r.ref(""),h=r.ref([]),y=r.ref({}),w=r.ref({}),g=r.ref([]),z=r.ref([]),F=r.ref(i),$=r.ref(s),k=Hi();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),R0(a,o).then(({plugin:oe,settings:te,specs:ce,tracks:j})=>{d.value=oe.description||"",f.value=oe.html||"",u.value=!1,p.value=oe.logo||"",m.value=oe.name||"",h.value=oe.settings||[],y.value=te,w.value=ce||{},g.value=oe.tracks||[],z.value=j});const M=r.computed(()=>o.dataset_id||""),b=r.computed(()=>M.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${M.value}.`),Ys(n,M.value)):""),S=r.computed(()=>p.value&&`${n}${p.value}`),_=r.computed(()=>h.value.length===0&&g.value.length===0);async function D(){l.value=!l.value,await r.nextTick(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function q(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(G())),visualization_id:F.value,visualization_title:$.value},"*")}catch(oe){c.value=`Failed to postMessage: ${oe}`}}function G(){return{dataset_id:M.value,settings:y.value,tracks:z.value}}function O(oe){y.value={...oe},q()}function W(oe){z.value=[...oe],q()}function L(oe){F.value=oe,q()}function Z(oe){$.value=oe,q()}async function Y(oe){ie(oe);try{const te=await P0(m.value,F.value,$.value,G());te&&L(te)}catch(te){c.value=`Failed to save: ${te}`}}function ie(oe){O({...y.value,...oe})}return(oe,te)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[c.value?(r.openBlock(),r.createBlock(r.unref(ks),{key:0,type:"error",class:"m-2"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1})):r.createCommentVNode("",!0),u.value?(r.openBlock(),r.createElementBlock("div",gx,[r.createElementVNode("span",null,[r.createVNode(r.unref(Qs),{class:"animate-spin size-4 inline mx-1"})]),te[0]||(te[0]=r.createElementVNode("span",{class:"text-xs"},"Please wait...",-1))])):(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["grid h-screen",{"grid-cols-[1fr_17rem]":!l.value&&!_.value&&b.value}])},[b.value?(r.openBlock(),r.createElementBlock("div",mx,[r.renderSlot(oe.$slots,"default",{datasetId:M.value,datasetUrl:b.value,root:r.unref(n),settings:y.value,specs:w.value,tracks:z.value,save:Y,update:ie})])):r.createCommentVNode("",!0),l.value&&!_.value&&b.value?(r.openBlock(),r.createBlock(r.unref(cr),{key:1,trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:D},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(td))]),_:1})]),_:1})]),default:r.withCtx(()=>[te[1]||(te[1]=r.createElementVNode("span",{class:"text-xs"},"Expand",-1))]),_:1})):r.createCommentVNode("",!0),r.withDirectives(r.createVNode(px,{"dataset-id":M.value,"dataset-url":b.value,description:d.value,html:f.value,"logo-url":S.value,name:m.value,"setting-inputs":h.value,"setting-values":y.value,"track-inputs":g.value,"track-values":z.value,"visualization-id":F.value,"visualization-title":$.value,"onUpdate:settings":O,"onUpdate:tracks":W,"onUpdate:visualizationId":L,"onUpdate:visualizationTitle":Z,onToggle:D},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[r.vShow,!l.value&&!_.value||!b.value]])],2))],64))}});je.GalaxyApi=tn,je.GalaxyCharts=vx,je.useColumnsStore=Zs,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|
|
1981
|
+
`)])])])]),T0=Object.assign(Object.assign({},Ce.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]}),z0=r.defineComponent({name:"Tabs",props:T0,setup(e,{slots:t}){var n,o,i,a;process.env.NODE_ENV!=="production"&&r.watchEffect(()=>{e.labelSize!==void 0&&Qe("tabs","`label-size` is deprecated, please use `size` instead."),e.activeName!==void 0&&Qe("tabs","`active-name` is deprecated, please use `value` instead."),e.onActiveNameChange!==void 0&&Qe("tabs","`on-active-name-change` is deprecated, please use `on-update:value` instead.")});const{mergedClsPrefixRef:s,inlineThemeDisabled:l}=Je(e),d=Ce("Tabs","-tabs",k0,f0,e,s),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),m=r.ref(null),h=r.ref(null),y=r.ref(!0),w=r.ref(!0),g=Tr(e,["labelSize","size"]),z=Tr(e,["activeName","value"]),F=r.ref((o=(n=z.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&o!==void 0?o:t.default?(a=(i=_n(t.default())[0])===null||i===void 0?void 0:i.props)===null||a===void 0?void 0:a.name:null),$=Ct(z,F),k={id:0},M=r.computed(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});r.watch($,()=>{k.id=0,q(),G()});function b(){var B;const{value:A}=$;return A===null?null:(B=c.value)===null||B===void 0?void 0:B.querySelector(`[data-name="${A}"]`)}function S(B){if(e.type==="card")return;const{value:A}=f;if(!A)return;const K=A.style.opacity==="0";if(B){const T=`${s.value}-tabs-bar--disabled`,{barWidth:C,placement:E}=e;if(B.dataset.disabled==="true"?A.classList.add(T):A.classList.remove(T),["top","bottom"].includes(E)){if(D(["top","maxHeight","height"]),typeof C=="number"&&B.offsetWidth>=C){const re=Math.floor((B.offsetWidth-C)/2)+B.offsetLeft;A.style.left=`${re}px`,A.style.maxWidth=`${C}px`}else A.style.left=`${B.offsetLeft}px`,A.style.maxWidth=`${B.offsetWidth}px`;A.style.width="8192px",K&&(A.style.transition="none"),A.offsetWidth,K&&(A.style.transition="",A.style.opacity="1")}else{if(D(["left","maxWidth","width"]),typeof C=="number"&&B.offsetHeight>=C){const re=Math.floor((B.offsetHeight-C)/2)+B.offsetTop;A.style.top=`${re}px`,A.style.maxHeight=`${C}px`}else A.style.top=`${B.offsetTop}px`,A.style.maxHeight=`${B.offsetHeight}px`;A.style.height="8192px",K&&(A.style.transition="none"),A.offsetHeight,K&&(A.style.transition="",A.style.opacity="1")}}}function _(){if(e.type==="card")return;const{value:B}=f;B&&(B.style.opacity="0")}function D(B){const{value:A}=f;if(A)for(const K of B)A.style[K]=""}function q(){if(e.type==="card")return;const B=b();B?S(B):_()}function G(){var B;const A=(B=m.value)===null||B===void 0?void 0:B.$el;if(!A)return;const K=b();if(!K)return;const{scrollLeft:T,offsetWidth:C}=A,{offsetLeft:E,offsetWidth:re}=K;T>E?A.scrollTo({top:0,left:E,behavior:"smooth"}):E+re>T+C&&A.scrollTo({top:0,left:E+re-C,behavior:"smooth"})}const O=r.ref(null);let W=0,L=null;function Z(B){const A=O.value;if(A){W=B.getBoundingClientRect().height;const K=`${W}px`,T=()=>{A.style.height=K,A.style.maxHeight=K};L?(T(),L(),L=null):L=T}}function Y(B){const A=O.value;if(A){const K=B.getBoundingClientRect().height,T=()=>{document.body.offsetHeight,A.style.maxHeight=`${K}px`,A.style.height=`${Math.max(W,K)}px`};L?(L(),L=null,T()):L=T}}function ie(){const B=O.value;if(B){B.style.maxHeight="",B.style.height="";const{paneWrapperStyle:A}=e;if(typeof A=="string")B.style.cssText=A;else if(A){const{maxHeight:K,height:T}=A;K!==void 0&&(B.style.maxHeight=K),T!==void 0&&(B.style.height=T)}}}const oe={value:[]},te=r.ref("next");function ce(B){const A=$.value;let K="next";for(const T of oe.value){if(T===A)break;if(T===B){K="prev";break}}te.value=K,j(B)}function j(B){const{onActiveNameChange:A,onUpdateValue:K,"onUpdate:value":T}=e;A&&pe(A,B),K&&pe(K,B),T&&pe(T,B),F.value=B}function ee(B){const{onClose:A}=e;A&&pe(A,B)}function fe(){const{value:B}=f;if(!B)return;const A="transition-disabled";B.classList.add(A),q(),B.classList.remove(A)}const ye=r.ref(null);function ae({transitionDisabled:B}){const A=c.value;if(!A)return;B&&A.classList.add("transition-disabled");const K=b();K&&ye.value&&(ye.value.style.width=`${K.offsetWidth}px`,ye.value.style.height=`${K.offsetHeight}px`,ye.value.style.transform=`translateX(${K.offsetLeft-ot(getComputedStyle(A).paddingLeft)}px)`,B&&ye.value.offsetWidth),B&&A.classList.remove("transition-disabled")}r.watch([$],()=>{e.type==="segment"&&r.nextTick(()=>{ae({transitionDisabled:!1})})}),r.onMounted(()=>{e.type==="segment"&&ae({transitionDisabled:!0})});let $e=0;function we(B){var A;if(B.contentRect.width===0&&B.contentRect.height===0||$e===B.contentRect.width)return;$e=B.contentRect.width;const{type:K}=e;if((K==="line"||K==="bar")&&fe(),K!=="segment"){const{placement:T}=e;De((T==="top"||T==="bottom"?(A=m.value)===null||A===void 0?void 0:A.$el:h.value)||null)}}const se=di(we,64);r.watch([()=>e.justifyContent,()=>e.size],()=>{r.nextTick(()=>{const{type:B}=e;(B==="line"||B==="bar")&&fe()})});const Re=r.ref(!1);function Ee(B){var A;const{target:K,contentRect:{width:T,height:C}}=B,E=K.parentElement.parentElement.offsetWidth,re=K.parentElement.parentElement.offsetHeight,{placement:xe}=e;if(!Re.value)xe==="top"||xe==="bottom"?E<T&&(Re.value=!0):re<C&&(Re.value=!0);else{const{value:Se}=p;if(!Se)return;xe==="top"||xe==="bottom"?E-T>Se.$el.offsetWidth&&(Re.value=!1):re-C>Se.$el.offsetHeight&&(Re.value=!1)}De(((A=m.value)===null||A===void 0?void 0:A.$el)||null)}const Ne=di(Ee,64);function Fe(){const{onAdd:B}=e;B&&B(),r.nextTick(()=>{const A=b(),{value:K}=m;!A||!K||K.scrollTo({left:A.offsetLeft,top:0,behavior:"smooth"})})}function De(B){if(!B)return;const{placement:A}=e;if(A==="top"||A==="bottom"){const{scrollLeft:K,scrollWidth:T,offsetWidth:C}=B;y.value=K<=0,w.value=K+C>=T}else{const{scrollTop:K,scrollHeight:T,offsetHeight:C}=B;y.value=K<=0,w.value=K+C>=T}}const Ge=di(B=>{De(B.target)},64);r.provide(Pi,{triggerRef:r.toRef(e,"trigger"),tabStyleRef:r.toRef(e,"tabStyle"),tabClassRef:r.toRef(e,"tabClass"),addTabStyleRef:r.toRef(e,"addTabStyle"),addTabClassRef:r.toRef(e,"addTabClass"),paneClassRef:r.toRef(e,"paneClass"),paneStyleRef:r.toRef(e,"paneStyle"),mergedClsPrefixRef:s,typeRef:r.toRef(e,"type"),closableRef:r.toRef(e,"closable"),valueRef:$,tabChangeIdRef:k,onBeforeLeaveRef:r.toRef(e,"onBeforeLeave"),activateTab:ce,handleClose:ee,handleAdd:Fe}),ca(()=>{q(),G()}),r.watchEffect(()=>{const{value:B}=u;if(!B)return;const{value:A}=s,K=`${A}-tabs-nav-scroll-wrapper--shadow-start`,T=`${A}-tabs-nav-scroll-wrapper--shadow-end`;y.value?B.classList.remove(K):B.classList.add(K),w.value?B.classList.remove(T):B.classList.add(T)});const Te={syncBarPosition:()=>{q()}},X=()=>{ae({transitionDisabled:!0})},I=r.computed(()=>{const{value:B}=g,{type:A}=e,K={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[A],T=`${B}${K}`,{self:{barColor:C,closeIconColor:E,closeIconColorHover:re,closeIconColorPressed:xe,tabColor:Se,tabBorderColor:We,paneTextColor:Ie,tabFontWeight:Be,tabBorderRadius:qe,tabFontWeightActive:st,colorSegment:Ye,fontWeightStrong:at,tabColorSegment:v,closeSize:H,closeIconSize:J,closeColorHover:le,closeColorPressed:de,closeBorderRadius:ue,[Q("panePadding",B)]:he,[Q("tabPadding",T)]:me,[Q("tabPaddingVertical",T)]:ze,[Q("tabGap",T)]:rt,[Q("tabGap",`${T}Vertical`)]:Rt,[Q("tabTextColor",A)]:wn,[Q("tabTextColorActive",A)]:Jt,[Q("tabTextColorHover",A)]:Qt,[Q("tabTextColorDisabled",A)]:pr,[Q("tabFontSize",B)]:br},common:{cubicBezierEaseInOut:Ln}}=d.value;return{"--n-bezier":Ln,"--n-color-segment":Ye,"--n-bar-color":C,"--n-tab-font-size":br,"--n-tab-text-color":wn,"--n-tab-text-color-active":Jt,"--n-tab-text-color-disabled":pr,"--n-tab-text-color-hover":Qt,"--n-pane-text-color":Ie,"--n-tab-border-color":We,"--n-tab-border-radius":qe,"--n-close-size":H,"--n-close-icon-size":J,"--n-close-color-hover":le,"--n-close-color-pressed":de,"--n-close-border-radius":ue,"--n-close-icon-color":E,"--n-close-icon-color-hover":re,"--n-close-icon-color-pressed":xe,"--n-tab-color":Se,"--n-tab-font-weight":Be,"--n-tab-font-weight-active":st,"--n-tab-padding":me,"--n-tab-padding-vertical":ze,"--n-tab-gap":rt,"--n-tab-gap-vertical":Rt,"--n-pane-padding-left":dt(he,"left"),"--n-pane-padding-right":dt(he,"right"),"--n-pane-padding-top":dt(he,"top"),"--n-pane-padding-bottom":dt(he,"bottom"),"--n-font-weight-strong":at,"--n-tab-color-segment":v}}),ne=l?tt("tabs",r.computed(()=>`${g.value[0]}${e.type[0]}`),I,e):void 0;return Object.assign({mergedClsPrefix:s,mergedValue:$,renderedNames:new Set,segmentCapsuleElRef:ye,tabsPaneWrapperRef:O,tabsElRef:c,barElRef:f,addTabInstRef:p,xScrollInstRef:m,scrollWrapperElRef:u,addTabFixed:Re,tabWrapperStyle:M,handleNavResize:se,mergedSize:g,handleScroll:Ge,handleTabsResize:Ne,cssVars:l?void 0:I,themeClass:ne==null?void 0:ne.themeClass,animationDirection:te,renderNameListRef:oe,yScrollElRef:h,handleSegmentResize:X,onAnimationBeforeLeave:Z,onAnimationEnter:Y,onAnimationAfterEnter:ie,onRender:ne==null?void 0:ne.onRender},Te)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:o,addable:i,mergedSize:a,renderNameListRef:s,onRender:l,paneWrapperClass:d,paneWrapperStyle:c,$slots:{default:f,prefix:u,suffix:p}}=this;l==null||l();const m=f?_n(f()).filter(k=>k.type.__TAB_PANE__===!0):[],h=f?_n(f()).filter(k=>k.type.__TAB__===!0):[],y=!h.length,w=t==="card",g=t==="segment",z=!w&&!g&&this.justifyContent;s.value=[];const F=()=>{const k=r.h("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},z?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),y?m.map((M,b)=>(s.value.push(M.props.name),Ei(r.h(Ri,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:b!==0&&(!z||z==="center"||z==="start"||z==="end")}),M.children?{default:M.children.tab}:void 0)))):h.map((M,b)=>(s.value.push(M.props.name),Ei(b!==0&&!z?Ws(M):M))),!o&&i&&w?Ns(i,(y?m.length:h.length)!==0):null,z?null:r.h("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return r.h("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},w&&i?r.h(Gt,{onResize:this.handleTabsResize},{default:()=>k}):k,w?r.h("div",{class:`${e}-tabs-pad`}):null,w?null:r.h("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},$=g?"top":n;return r.h("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,z&&`${e}-tabs--flex`,`${e}-tabs--${$}`],style:this.cssVars},r.h("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${$}`,`${e}-tabs-nav`]},Ae(u,k=>k&&r.h("div",{class:`${e}-tabs-nav__prefix`},k)),g?r.h(Gt,{onResize:this.handleSegmentResize},{default:()=>r.h("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},r.h("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},r.h("div",{class:`${e}-tabs-wrapper`},r.h("div",{class:`${e}-tabs-tab`}))),y?m.map((k,M)=>(s.value.push(k.props.name),r.h(Ri,Object.assign({},k.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),k.children?{default:k.children.tab}:void 0))):h.map((k,M)=>(s.value.push(k.props.name),M===0?k:Ws(k))))}):r.h(Gt,{onResize:this.handleNavResize},{default:()=>r.h("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes($)?r.h(Ic,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:F}):r.h("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},F()))}),o&&i&&w?Ns(i,!0):null,Ae(p,k=>k&&r.h("div",{class:`${e}-tabs-nav__suffix`},k))),y&&(this.animated&&($==="top"||$==="bottom")?r.h("div",{ref:"tabsPaneWrapperRef",style:c,class:[`${e}-tabs-pane-wrapper`,d]},Hs(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Hs(m,this.mergedValue,this.renderedNames)))}});function Hs(e,t,n,o,i,a,s){const l=[];return e.forEach(d=>{const{name:c,displayDirective:f,"display-directive":u}=d.props,p=h=>f===h||u===h,m=t===c;if(d.key!==void 0&&(d.key=c),m||p("show")||p("show:lazy")&&n.has(c)){n.has(c)||n.add(c);const h=!p("if");l.push(h?r.withDirectives(d,[[r.vShow,m]]):d)}}),s?r.h(r.TransitionGroup,{name:`${s}-transition`,onBeforeLeave:o,onEnter:i,onAfterEnter:a},{default:()=>l}):l}function Ns(e,t){return r.h(Ri,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Ws(e){const t=r.cloneVNode(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function Ei(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}async function js(e,t,n){try{const{data:o}=await tn().POST("/api/visualizations",{type:e,title:t,config:n});return o.id}catch(o){$n(o)}}async function P0(e,t,n,o){try{if(t)await Us(t,n,o);else return await js(e,n,o)}catch(i){$n(i)}}async function Us(e,t,n){try{await tn().PUT(`/api/visualizations/${e}`,{title:t,config:n})}catch(o){$n(o)}}function Vn(e){return String(e).toLowerCase()==="true"}async function R0(e,t={}){const n=hr(e.settings,t.settings),o=e.specs,i=_0(e.tracks,t.tracks);return{plugin:e,settings:n,specs:o,tracks:i}}function E0(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=Vn(n)),n}function B0(e,t={}){var i,a,s;const n=t,o=(i=e.test_param)==null?void 0:i.name;if(!o)console.error(`Test parameter has no name: ${e.name}.`);else{const l=n[o]??((a=e.test_param)==null?void 0:a.value);for(const d of e.cases||[])d.value===l&&(n[o]=l,(s=d.inputs)!=null&&s.length&&hr(d.inputs,n))}return n}function hr(e,t){const n=t||{};return e==null||e.forEach(o=>{o.type==="conditional"?n[o.name]=B0(o,n[o.name]):n[o.name]=E0(o,n[o.name])}),n}function _0(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((o,i)=>{n[i]=hr(e,o)})),n}const M0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},F0=r.defineComponent({__name:"InputConditional",props:r.mergeModels({datasetId:{},input:{}},{value:{},valueModifiers:{}}),emits:r.mergeModels(["update:value"],["update:value"]),setup(e,{emit:t}){const n=e,o=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=r.ref(n.input.test_param),a=i.value.name;a||console.error(`Test parameter has no name: ${n.input.name}.`);const s=r.useModel(e,"value");(!s.value||!(a in s.value))&&console.error(`Test parameter of conditional not available: ${n.input.name}.`,s.value);const l=r.ref(p()),d=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const y of n.input.cases)h[y.value]=hr(y.inputs),h[y.value][a]=y.value;return h}),c=r.computed(()=>{const h={};if(n.input.cases&&n.input.cases.length>0)for(const y of n.input.cases)h[y.value]=y.inputs;return h}),f=r.computed(()=>c.value[l.value]),u=r.computed({get(){return l.value==="true"},set(h){l.value=String(h)}});function p(){return s.value&&s.value[a]}function m(h){let y={...d.value[l.value]};if(h){const w={};f.value.forEach(g=>{w[g.name]=h[g.name]}),y={...y,...h}}o("update:value",y)}return r.watch(()=>s.value,()=>{l.value=p()}),r.watch(()=>l.value,()=>{m()}),(h,y)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[i.value.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ds),{key:0,value:u.value,"onUpdate:value":y[0]||(y[0]=w=>u.value=w)},null,8,["value"])):(r.openBlock(),r.createBlock(r.unref(ao),{key:1,value:l.value,"onUpdate:value":y[1]||(y[1]=w=>l.value=w),options:i.value.data},null,8,["value","options"])),f.value?(r.openBlock(),r.createElementBlock("div",M0,[r.createVNode(Bi,{"dataset-id":h.datasetId,inputs:f.value,values:s.value,"onUpdate:values":m},null,8,["dataset-id","inputs","values"])])):r.createCommentVNode("",!0)],64))}}),lo=r.ref({});function Gs(){async function e(t){return lo.value[t]||(lo.value[t]=tn().GET(`/api/datasets/${t}`).catch(n=>{throw delete lo.value[t],n})),await lo.value[t]}return{getDataset:e}}const I0={key:0},A0={key:0,class:"text-red-600 mb-1"},O0={key:1},Ks=100,D0=r.defineComponent({__name:"InputData",props:r.mergeModels({datasetId:{},extension:{},optional:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=Gs(),n=e,o=r.ref([]),i=r.useModel(e,"value"),a=r.ref(!1),s=r.ref(null);async function l(u){if(n.datasetId){a.value=!0;try{const{data:p}=await t(n.datasetId),m=p.history_id,h="v=dev&order=hid&q=deleted&qv=false&q=visible&qv=true&",y=n.extension?`q=extension-eq&qv=${n.extension}&`:"",w=u?`q=name-contains&qv=${u}&`:"",{data:g}=await tn().GET(`/api/histories/${m}/contents?${h}${y}${w}limit=${Ks}`);if(g&&g.length>0){const z=g.map(F=>({label:`${F.hid}: ${F.name}`,value:{id:F.id,hid:F.hid,name:F.name}}));g.length>=Ks&&z.push({label:"...filter for more",value:null,disabled:!0}),n.optional&&z.unshift({label:"-- Clear Selection --",value:null}),o.value=z}}catch(p){console.log(p)}finally{a.value=!1}}else console.debug("Data selector disabled, since `datasetId` is unavailable.")}function d(u){i.value=u}function c(u){return r.h("div",{class:"my-1 whitespace-normal break-all"},[r.h(mt,{class:"size-3 mr-1"},{default:()=>r.h(Ui)}),u.label])}function f({option:u}){return r.h("div",{class:"z-[1] whitespace-nowrap text-ellipsis overflow-hidden"},u.label)}return r.watch(()=>i.value,()=>{var u;s.value=((u=i.value)==null?void 0:u.name)||null},{immediate:!0}),l(),(u,p)=>u.datasetId?(r.openBlock(),r.createElementBlock("div",I0,[!u.optional&&!i.value?(r.openBlock(),r.createElementBlock("div",A0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji))]),_:1}),p[0]||(p[0]=r.createElementVNode("span",null,"Please select a dataset.",-1))])):r.createCommentVNode("",!0),r.createVNode(r.unref(ao),{filterable:"",placeholder:"Select a Dataset",loading:a.value,"render-label":c,"render-tag":f,options:o.value,value:s.value,onSearch:l,"onUpdate:value":d},null,8,["loading","options","value"])])):(r.openBlock(),r.createElementBlock("div",O0,"Selection deferred."))}});function V0(e,t,n,o){const i=[];t&&i.push({label:"Column: Default",value:"auto"});const a=e.metadata_column_types;for(const s in a)(o&&["int","float"].includes(a[s])||n&&a[s]==="str"||!o&&!n)&&i.push({label:"Column: "+(parseInt(s)+1),value:s});return i}const L0=r.defineComponent({__name:"InputDataColumn",props:r.mergeModels({datasetId:{},isAuto:{type:Boolean},isText:{type:Boolean},isNumber:{type:Boolean}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(e){const{getDataset:t}=Gs(),n=e,o=r.ref([]),i=r.useModel(e,"value");async function a(){if(n.datasetId)try{const{data:l}=await t(n.datasetId),d=V0(l,n.isAuto,n.isText,n.isNumber);o.value=d,s()}catch(l){console.debug(l)}else console.debug("Data column selector disabled, since `datasetId` is unavailable.")}function s(){o.value.length>0&&i.value===null&&(i.value=o.value[0].value)}return a(),r.watch(()=>i.value,()=>s()),(l,d)=>l.datasetId?(r.openBlock(),r.createBlock(r.unref(ao),{key:0,value:i.value,"onUpdate:value":d[0]||(d[0]=c=>i.value=c),options:o.value},null,8,["value","options"])):(r.openBlock(),r.createBlock(r.unref(On),{key:1,value:i.value,"onUpdate:value":d[1]||(d[1]=c=>i.value=c)},null,8,["value"]))}}),H0={class:"select-none"},N0={class:"font-bold mb-1"},W0={key:0,class:"text-xs mb-1"},j0={key:5},qs=.01,Bi=r.defineComponent({__name:"InputForm",props:{datasetId:{},inputs:{},values:{}},emits:["update:values"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(a());function a(){const l={...n.values};return n.inputs.forEach(d=>{l[d.name]===void 0&&(l[d.name]=null)}),l}function s(){o("update:values",i.value)}return r.watch(()=>n.values,()=>{i.value=a()}),(l,d)=>(r.openBlock(),r.createElementBlock("div",H0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.inputs,(c,f)=>(r.openBlock(),r.createElementBlock("div",{key:f,class:r.normalizeClass(f<l.inputs.length-1?"pb-2":"")},[r.createElementVNode("div",N0,r.toDisplayString(c.label||c.name),1),c.help?(r.openBlock(),r.createElementBlock("div",W0,r.toDisplayString(c.help),1)):r.createCommentVNode("",!0),r.createElementVNode("div",null,[c.type==="boolean"?(r.openBlock(),r.createBlock(r.unref(Ds),{key:0,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s]},null,8,["value","onUpdate:value"])):c.type==="color"?(r.openBlock(),r.createBlock(r.unref(Wv),{key:1,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],modes:["hex"],"show-alpha":!1},null,8,["value","onUpdate:value"])):c.type==="conditional"?(r.openBlock(),r.createBlock(F0,{key:2,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,input:c},null,8,["value","onUpdate:value","dataset-id","input"])):c.type==="data"?(r.openBlock(),r.createBlock(D0,{key:3,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,extension:c.extension,optional:r.unref(Vn)(c.optional)},null,8,["value","onUpdate:value","dataset-id","extension","optional"])):c.type==="data_column"?(r.openBlock(),r.createBlock(L0,{key:4,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],"dataset-id":l.datasetId,"is-auto":r.unref(Vn)(c.is_auto),"is-text":r.unref(Vn)(c.is_text),"is-number":r.unref(Vn)(c.is_number)},null,8,["value","onUpdate:value","dataset-id","is-auto","is-text","is-number"])):["float","integer"].includes(c.type)?(r.openBlock(),r.createElementBlock("div",j0,[c.min!==void 0&&c.max!==void 0?(r.openBlock(),r.createBlock(r.unref(w0),{key:0,class:"mb-2",value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],min:Number(c.min),max:Number(c.max),step:c.type==="float"?qs:1},null,8,["value","onUpdate:value","min","max","step"])):r.createCommentVNode("",!0),r.createVNode(r.unref(m0),{value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],size:"small",min:Number(c.min),max:Number(c.max),step:c.type==="float"?qs:1},null,8,["value","onUpdate:value","min","max","step"])])):c.type==="select"?(r.openBlock(),r.createBlock(r.unref(ao),{key:6,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],filterable:r.unref(Vn)(c.filterable),options:c.data},null,8,["value","onUpdate:value","filterable","options"])):c.type==="textarea"?(r.openBlock(),r.createBlock(r.unref(On),{key:7,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,s],rows:Number(c.rows),type:"textarea"},null,8,["value","onUpdate:value","rows"])):(r.openBlock(),r.createBlock(r.unref(On),{key:8,value:i.value[c.name],"onUpdate:value":[u=>i.value[c.name]=u,d[0]||(d[0]=u=>s())]},null,8,["value","onUpdate:value"]))])],2))),128))]))}}),U0={class:"border border-dotted border-green-600 rounded p-2"},G0={class:"mx-1"},K0=r.defineComponent({__name:"InputRepeats",props:{datasetId:{},inputs:{},valuesArray:{}},emits:["update:values-array"],setup(e,{emit:t}){const n=e,o=t,i=r.computed(()=>hr(n.inputs));function a(){const d=[...n.valuesArray];d.unshift(i.value),o("update:values-array",d)}function s(d){const c=[...n.valuesArray];c.splice(d,1),o("update:values-array",c)}function l(d,c){const f=[...n.valuesArray];f[d]={...c},o("update:values-array",f)}return(d,c)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Pt),{size:"tiny",type:"primary",onClick:a},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Ui))]),_:1}),c[0]||(c[0]=r.createElementVNode("span",{class:"mx-1"},"Add New Track",-1))]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.valuesArray,(f,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,class:"py-2"},[r.createElementVNode("div",U0,[r.createVNode(Bi,{"dataset-id":d.datasetId,inputs:d.inputs,values:f,"onUpdate:values":p=>l(u,p)},null,8,["dataset-id","inputs","values","onUpdate:values"]),r.createVNode(r.unref(Pt),{class:"w-full mt-2","data-description":"remove repeat block",disabled:d.valuesArray.length<=1,size:"tiny",type:"primary",onClick:p=>s(u)},{default:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(id))]),_:1}),r.createElementVNode("span",G0,"Remove Track "+r.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),q0=2e3,X0=r.defineComponent({__name:"AlertNotify",props:{message:{},messageType:{default:"info"}},emits:["timeout"],setup(e,{emit:t}){const n=e,o=t;let i=null;return r.watch(()=>n.message,()=>{i&&clearTimeout(i),i=setTimeout(()=>o("timeout"),q0)}),(a,s)=>a.message?(r.openBlock(),r.createBlock(r.unref(ks),{key:0,type:a.messageType},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(a.message),1)]),_:1},8,["type"])):r.createCommentVNode("",!0)}}),Y0={class:"text-xs"},Z0=r.defineComponent({__name:"ApiStatus",setup(e){const t=r.ref("...");async function n(){try{const{data:o}=await tn().GET("/api/version");t.value=o.version_major}catch{console.log("Unable to connect to Galaxy. Verify Galaxy is running and refer to docs."),t.value=""}}return n(),(o,i)=>t.value?(r.openBlock(),r.createBlock(r.unref(ur),{key:0,class:"mx-1",trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ed),{class:"text-green-600"})]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",Y0,"Connected to Galaxy Version "+r.toDisplayString(t.value)+".",1)]),_:1})):(r.openBlock(),r.createBlock(r.unref(ur),{key:1,class:"mx-1",trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(mt),{class:"mx-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji),{class:"text-red-600"})]),_:1})]),default:r.withCtx(()=>[i[0]||(i[0]=r.createElementVNode("span",{class:"text-xs"},"Galaxy is not accessible!",-1))]),_:1}))}}),J0=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Q0={},ex={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function tx(e,t){return r.openBlock(),r.createElementBlock("svg",ex,t[0]||(t[0]=[r.createElementVNode("circle",{cx:"50",cy:"50",r:"45",stroke:"#E30A17","stroke-width":"5"},null,-1),r.createElementVNode("path",{d:"M 50,5 A 45,45 0 0,1 95,50 L 50,50 Z",fill:"#E30A17"},null,-1)]))}const nx=J0(Q0,[["render",tx]]),rx={class:"overflow-auto select-none bg-white z-10 p-2"},ox={key:0,class:"flex"},ix={class:"flex-1 font-thin text-lg mt-1"},ax={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},lx={class:"flex"},sx={class:"flex justify-center center-items"},dx={class:"m-2"},cx=["src"],ux={class:"overflow-hidden break-words p-1"},fx={class:"font-bold"},hx=["innerHTML"],px=r.defineComponent({__name:"SidePanel",props:{datasetId:{},datasetUrl:{},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,o=t,i=r.ref(""),a=r.ref("info"),s=r.computed(()=>n.settingInputs.length===0||n.trackInputs.length===0);async function l(){try{if(n.visualizationId)await Us(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 js(n.name,n.visualizationTitle,{dataset_id:n.datasetId,settings:n.settingValues,tracks:n.trackValues});u?(i.value="Successfully created.",a.value="success",o("update:visualization-id",u)):(i.value="Something went wrong.",a.value="error")}}catch(u){i.value=Di(u),a.value="error"}}function d(u){o("update:settings",u)}function c(u){o("update:tracks",u)}function f(u){o("update:visualization-title",u)}return(u,p)=>(r.openBlock(),r.createElementBlock("div",rx,[u.datasetUrl?(r.openBlock(),r.createElementBlock("div",ox,[r.createElementVNode("div",ix,[p[2]||(p[2]=r.createElementVNode("span",null,"Charts",-1)),r.createVNode(Z0)]),r.createElementVNode("div",null,[u.datasetId?(r.openBlock(),r.createBlock(r.unref(ur),{key:0,trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 mr-2","data-description":"sidepanel save button",onClick:l},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(rd))]),_:1})]),_:1})]),default:r.withCtx(()=>[p[3]||(p[3]=r.createElementVNode("span",{class:"text-xs"},"Save",-1))]),_:1})):r.createCommentVNode("",!0),r.createVNode(r.unref(ur),{trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100",onClick:p[0]||(p[0]=m=>o("toggle"))},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(nd))]),_:1})]),_:1})]),default:r.withCtx(()=>[p[4]||(p[4]=r.createElementVNode("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):r.createCommentVNode("",!0),r.createVNode(X0,{message:i.value,"message-type":a.value,onTimeout:p[1]||(p[1]=m=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),r.createElementVNode("div",ax,[r.createElementVNode("div",lx,[r.createElementVNode("div",sx,[r.createElementVNode("div",dx,[n.logoUrl?(r.openBlock(),r.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,cx)):(r.openBlock(),r.createBlock(nx,{key:1}))])]),r.createElementVNode("div",ux,[r.createElementVNode("span",fx,r.toDisplayString(u.html),1),r.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,hx)])])]),r.createElementVNode("div",null,[p[5]||(p[5]=r.createElementVNode("div",{class:"font-bold"},"Title",-1)),p[6]||(p[6]=r.createElementVNode("div",{class:"text-xs py-1"},"Specify a visualization title.",-1)),r.createVNode(r.unref(On),{value:u.visualizationTitle,onInput:f},null,8,["value"])]),r.createVNode(r.unref(z0),{type:"line",animated:"",class:"mt-2","pane-wrapper-class":"!overflow-visible","tab-class":s.value?"!hidden":""},{default:r.withCtx(()=>[u.trackInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ls),{key:0,name:"tracks"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(od))]),_:1}),p[7]||(p[7]=r.createElementVNode("span",{class:"mx-1"},"Tracks",-1))]),default:r.withCtx(()=>[r.createVNode(K0,{"dataset-id":u.datasetId,inputs:u.trackInputs,"values-array":u.trackValues,"onUpdate:valuesArray":c},null,8,["dataset-id","inputs","values-array"])]),_:1})):r.createCommentVNode("",!0),u.settingInputs.length>0?(r.openBlock(),r.createBlock(r.unref(Ls),{key:1,name:"settings"},{tab:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(Js))]),_:1}),p[8]||(p[8]=r.createElementVNode("span",{class:"mx-1"},"Settings",-1))]),default:r.withCtx(()=>[r.createVNode(Bi,{"dataset-id":u.datasetId,inputs:u.settingInputs,values:u.settingValues,"onUpdate:values":d},null,8,["dataset-id","inputs","values"])]),_:1})):r.createCommentVNode("",!0)]),_:1},8,["tab-class"])]))}});function bx(e,t="app"){if(e===void 0){const l=document.getElementById(t);if(l)e=JSON.parse((l==null?void 0:l.dataset.incoming)||"{}");else throw new Error(`Container element '${t}' not found.`)}const n=(e==null?void 0:e.root)??"/",o=(e==null?void 0:e.visualization_config)??{},i=(e==null?void 0:e.visualization_id)??null,a=(e==null?void 0:e.visualization_plugin)??{},s=(e==null?void 0:e.visualization_title)??"Unnamed Visualization";return{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:s}}const gx={key:1,class:"m-2"},mx={key:0,class:"relative max-w-full h-screen overflow-hidden"},vx=r.defineComponent({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:s}=bx(t.incoming,t.container),l=r.ref(!0),d=r.ref(""),c=r.ref(""),f=r.ref(""),u=r.ref(!0),p=r.ref(""),m=r.ref(""),h=r.ref([]),y=r.ref({}),w=r.ref({}),g=r.ref([]),z=r.ref([]),F=r.ref(i),$=r.ref(s),k=Hi();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),R0(a,o).then(({plugin:oe,settings:te,specs:ce,tracks:j})=>{d.value=oe.description||"",f.value=oe.html||"",u.value=!1,p.value=oe.logo||"",m.value=oe.name||"",h.value=oe.settings||[],y.value=te,w.value=ce||{},g.value=oe.tracks||[],z.value=j});const M=r.computed(()=>o.dataset_id||""),b=r.computed(()=>M.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${M.value}.`),Ys(n,M.value)):""),S=r.computed(()=>p.value&&`${n}${p.value}`),_=r.computed(()=>h.value.length===0&&g.value.length===0);async function D(){l.value=!l.value,await r.nextTick(),window?window.dispatchEvent(new Event("resize")):console.warn("window unavailable.")}function q(){try{window.postMessage({container:t.container,from:"galaxy-visualization",visualization_config:JSON.parse(JSON.stringify(G())),visualization_id:F.value,visualization_title:$.value},"*")}catch(oe){c.value=`Failed to postMessage: ${oe}`}}function G(){return{dataset_id:M.value,settings:y.value,tracks:z.value}}function O(oe){y.value={...oe},q()}function W(oe){z.value=[...oe],q()}function L(oe){F.value=oe,q()}function Z(oe){$.value=oe,q()}async function Y(oe){ie(oe);try{const te=await P0(m.value,F.value,$.value,G());te&&L(te)}catch(te){c.value=`Failed to save: ${te}`}}function ie(oe){O({...y.value,...oe})}return(oe,te)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[c.value?(r.openBlock(),r.createBlock(r.unref(ks),{key:0,type:"error",class:"m-2"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(c.value),1)]),_:1})):r.createCommentVNode("",!0),u.value?(r.openBlock(),r.createElementBlock("div",gx,[r.createElementVNode("span",null,[r.createVNode(r.unref(Qs),{class:"animate-spin size-4 inline mx-1"})]),te[0]||(te[0]=r.createElementVNode("span",{class:"text-xs"},"Please wait...",-1))])):(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["grid h-screen",{"grid-cols-[1fr_17rem]":!l.value&&!_.value&&b.value}])},[b.value?(r.openBlock(),r.createElementBlock("div",mx,[r.renderSlot(oe.$slots,"default",{datasetId:M.value,datasetUrl:b.value,root:r.unref(n),settings:y.value,specs:w.value,tracks:z.value,save:Y,update:ie})])):r.createCommentVNode("",!0),l.value&&!_.value&&b.value?(r.openBlock(),r.createBlock(r.unref(ur),{key:1,trigger:"hover",to:!1},{trigger:r.withCtx(()=>[r.createVNode(r.unref(Pt),{strong:"",secondary:"",circle:"",class:"bg-sky-100 m-2 absolute right-0",onClick:D},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(td))]),_:1})]),_:1})]),default:r.withCtx(()=>[te[1]||(te[1]=r.createElementVNode("span",{class:"text-xs"},"Expand",-1))]),_:1})):r.createCommentVNode("",!0),r.withDirectives(r.createVNode(px,{"dataset-id":M.value,"dataset-url":b.value,description:d.value,html:f.value,"logo-url":S.value,name:m.value,"setting-inputs":h.value,"setting-values":y.value,"track-inputs":g.value,"track-values":z.value,"visualization-id":F.value,"visualization-title":$.value,"onUpdate:settings":O,"onUpdate:tracks":W,"onUpdate:visualizationId":L,"onUpdate:visualizationTitle":Z,onToggle:D},null,8,["dataset-id","dataset-url","description","html","logo-url","name","setting-inputs","setting-values","track-inputs","track-values","visualization-id","visualization-title"]),[[r.vShow,!l.value&&!_.value||!b.value]])],2))],64))}});je.GalaxyApi=tn,je.GalaxyCharts=vx,je.useColumnsStore=Zs,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|