galaxy-charts 0.0.71 → 0.0.72
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 +159 -160
- package/dist/galaxy-charts.umd.cjs +4 -4
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ ${i}
|
|
|
10
10
|
`);return}l=qi(l),d!=null&&s.push(` ${l}${hd(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=cd(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 bd(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 gd(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 md(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??ud(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 vd(e){return bd(this,this.instance,e)}function xd(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:a=!1,anchorMetaName:s,parent:l}=e;return md(this.instance,this,t,o,i,a,s,l,n)}function yd(e={}){const{id:t,parent:n}=e;gd(this.instance,this,t,n)}const xr=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:vd,mount:xd,unmount:yd}},wd=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)=>wd(t,...n),use:(n,...o)=>n.install(t,...o),find:mr,context:{},config:e};return t}function Cd(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-",Sd="__",$d="--",Qi=Ji(),ea=id({blockPrefix:yr,elementPrefix:Sd,modifierPrefix:$d});Qi.use(ea);const{c:V,find:Yx}=Qi,{cB:x,cE:R,cM:N,cNotM:Ue}=ea;function kd(e){return V(({props:{bPrefix:t}})=>`${t||yr}modal, ${t||yr}drawer`,[e])}function Td(e){return V(({props:{bPrefix:t}})=>`${t||yr}popover`,[e])}const zd=(...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 Pd(){wr.forEach(e=>e(...ta.get(e))),wr=[]}function na(e,...t){ta.set(e,t),!wr.includes(e)&&wr.push(e)===1&&requestAnimationFrame(Pd)}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}`),Rd=new RegExp(`${vt}rgb\\s*\\(${ct},${ct},${ct}\\)${xt}`),Ed=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=Rd.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),1];if(t=Ed.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 Bd(e){return e>1?1:e<0?0:e}function _d(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)}, ${Bd(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 _d(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 Md(e=8){return Math.random().toString(16).slice(2,2+e)}function kr(e){return e.composedPath()[0]}const Fd={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Id(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=Fd[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=Id(e,t,n)),a}function Ad(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 Od(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 Dd(){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 g(){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=g();function w(b,S){const _=f[b];return _[S]===void 0&&(_[S]=new Map,window.addEventListener(S,h,b==="capture")),_[S]}function m(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=_,Ad(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=m(b);Z.has(q)||Z.add(q)}}function M(b,S,_,D){if(Od(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}=Dd();function Vd(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 Ld=typeof window<"u";let Tn,Un;(()=>{var e,t;Tn=Ld?(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 Hd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Nd(){return Hd}function Jx(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 Wd(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 jd(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 Ud(e){return e.nodeType===9?null:e.parentNode}function va(e){if(e===null)return null;const t=Ud(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=m=>{o.value=m,n&&e.syncTargetWithParent&&n.setTargetRef(m)};let a=[];const s=()=>{let m=o.value;for(;m=va(m),m!==null;)a.push(m);for(const z of a)Pe("scroll",z,u,!0)},l=()=>{for(const m of a)ke("scroll",m,u,!0);a=[]},d=new Set,c=m=>{d.size===0&&s(),d.has(m)||d.add(m)},f=m=>{d.has(m)&&d.delete(m),d.size===0&&l()},u=()=>{na(p)},p=()=>{d.forEach(m=>m())},g=new Set,h=m=>{g.size===0&&Pe("resize",window,w),g.has(m)||g.add(m)},y=m=>{g.has(m)&&g.delete(m),g.size===0&&ke("resize",window,w)},w=()=>{g.forEach(m=>m())};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",Gd={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 Kd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class qd{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&&Kd("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 qd,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)}},Xd="@css-render/vue3-ssr";function Yd(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 gd(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 md(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??ud(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 vd(e){return bd(this,this.instance,e)}function xd(e={}){const{id:t,ssr:n,props:o,head:i=!1,force:a=!1,anchorMetaName:s,parent:l}=e;return md(this.instance,this,t,o,i,a,s,l,n)}function yd(e={}){const{id:t,parent:n}=e;gd(this.instance,this,t,n)}const xr=function(e,t,n,o){return{instance:e,$:t,props:n,children:o,els:[],render:vd,mount:xd,unmount:yd}},wd=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)=>wd(t,...n),use:(n,...o)=>n.install(t,...o),find:mr,context:{},config:e};return t}function Cd(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-",Sd="__",$d="--",Qi=Ji(),ea=id({blockPrefix:yr,elementPrefix:Sd,modifierPrefix:$d});Qi.use(ea);const{c:V,find:Jx}=Qi,{cB:x,cE:R,cM:N,cNotM:Ue}=ea;function kd(e){return V(({props:{bPrefix:t}})=>`${t||yr}modal, ${t||yr}drawer`,[e])}function Td(e){return V(({props:{bPrefix:t}})=>`${t||yr}popover`,[e])}const zd=(...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 Pd(){wr.forEach(e=>e(...ta.get(e))),wr=[]}function na(e,...t){ta.set(e,t),!wr.includes(e)&&wr.push(e)===1&&requestAnimationFrame(Pd)}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}`),Rd=new RegExp(`${vt}rgb\\s*\\(${ct},${ct},${ct}\\)${xt}`),Ed=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=Rd.exec(e))return[Le(t[1]),Le(t[5]),Le(t[9]),1];if(t=Ed.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 Bd(e){return e>1?1:e<0?0:e}function _d(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)}, ${Bd(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 _d(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 Md(e=8){return Math.random().toString(16).slice(2,2+e)}function kr(e){return e.composedPath()[0]}const Fd={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Id(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=Fd[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=Id(e,t,n)),a}function Ad(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 Od(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 Dd(){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 g(){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=g();function w(b,S){const _=f[b];return _[S]===void 0&&(_[S]=new Map,window.addEventListener(S,h,b==="capture")),_[S]}function m(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=_,Ad(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=m(b);Z.has(q)||Z.add(q)}}function M(b,S,_,D){if(Od(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}=Dd();function Vd(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 Ld=typeof window<"u";let Tn,Un;(()=>{var e,t;Tn=Ld?(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 Hd=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Nd(){return Hd}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 Wd(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 jd(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 Ud(e){return e.nodeType===9?null:e.parentNode}function va(e){if(e===null)return null;const t=Ud(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=m=>{o.value=m,n&&e.syncTargetWithParent&&n.setTargetRef(m)};let a=[];const s=()=>{let m=o.value;for(;m=va(m),m!==null;)a.push(m);for(const z of a)Pe("scroll",z,u,!0)},l=()=>{for(const m of a)ke("scroll",m,u,!0);a=[]},d=new Set,c=m=>{d.size===0&&s(),d.has(m)||d.add(m)},f=m=>{d.has(m)&&d.delete(m),d.size===0&&l()},u=()=>{na(p)},p=()=>{d.forEach(m=>m())},g=new Set,h=m=>{g.size===0&&Pe("resize",window,w),g.has(m)||g.add(m)},y=m=>{g.has(m)&&g.delete(m),g.size===0&&ke("resize",window,w)},w=()=>{g.forEach(m=>m())};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",Gd={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 Kd(e,t){console.error(`[vdirs/${e}]: ${t}`)}class qd{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&&Kd("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 qd,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)}},Xd="@css-render/vue3-ssr";function Yd(e,t){return`<style cssr-id="${e}">
|
|
14
14
|
${t}
|
|
15
15
|
</style>`}function Zd(e,t,n){const{styles:o,ids:i}=n;i.has(e)||o!==null&&(i.add(e),o.push(Yd(e,t)))}const Jd=typeof document<"u";function Ut(){if(Jd)return;const e=r.inject(Xd,null);if(e!==null)return{adapter:(t,n)=>Zd(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 Qd=r.defineComponent({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Vd(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"},ec={"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"},tc={"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"},nc={"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 rc(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=(g,h,y)=>{let w=0,m=0;const z=n[g]-t[h]-t[g];return z>0&&o&&(y?m=ka[h]?z:-z:w=ka[h]?z:-z),{left:w,top:m}},u=s==="left"||s==="right";if(d!=="center"){const g=nc[e],h=Br[g],y=Ro[g];if(n[y]>t[y]){if(t[g]+t[y]<n[y]){const w=(n[y]-t[y])/2;t[g]<w||t[h]<w?t[g]<t[h]?(d=$a[l],c=f(y,h,u)):c=f(y,g,u):d="center"}}else n[y]<t[y]&&t[h]<0&&t[g]>t[h]&&(d=$a[l])}else{const g=s==="bottom"||s==="top"?"left":"top",h=Br[g],y=Ro[g],w=(n[y]-t[y])/2;(t[g]<w||t[h]<w)&&(t[g]>t[h]?(d=Ta[g],c=f(y,g,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 oc(e,t){return t?tc[e]:ec[e]}function ic(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 ac=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();ac.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 g=t.targetRef,{x:h,y,overlap:w}=e,m=h!==void 0&&y!==void 0?jd(h,y):zo(g);p.style.setProperty("--v-target-width",`${Math.round(m.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(m.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=`${m.width}px`:z!==void 0?b.width=z:b.width="",F==="target"?b.minWidth=`${m.width}px`:F!==void 0?b.minWidth=F:b.minWidth="";const S=zo(p),_=zo(i.value),{left:D,top:q,placement:G}=rc($,m,S,k,M,w),O=oc(G,w),{left:W,top:L,transform:Z}=ic(G,_,m,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(Qd,{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=[],lc=function(){return ln.some(function(e){return e.activeTargets.length>0})},sc=function(){return ln.some(function(e){return e.skippedTargets.length>0})},za="ResizeObserver loop completed with undelivered notifications.",dc=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)},cc=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)},uc=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/,fc=/^tb|vertical/,hc=/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 cc((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=!hc&&n.boxSizing==="border-box",a=fc.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),g=o?0:$t(n.borderRightWidth),h=o?0:$t(n.borderBottomWidth),y=o?0:$t(n.borderLeftWidth),w=u+c,m=d+f,z=y+g,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?m+F:0,S=o?o.width:$t(n.width)-M-k,_=o?o.height:$t(n.height)-b-$,D=S+w+k+z,q=_+m+$+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}},pc=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},bc=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 pc(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))})})},gc=function(){var e=0;for(Aa(e);lc();)e=bc(),Aa(e);return sc()&&dc(),e>0},Bo,Oa=[],mc=function(){return Oa.splice(0).forEach(function(e){return e()})},vc=function(e){if(!Bo){var t=0,n=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return mc()}).observe(n,o),Bo=function(){n.textContent="".concat(t?t--:t++)}}Oa.push(e),Bo()},xc=function(e){vc(function(){requestAnimationFrame(e)})},Fr=0,yc=function(){return!!Fr},wc=250,Cc={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,Sc=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=wc),!_o){_o=!0;var o=Va(t);xc(function(){var i=!1;try{i=gc()}finally{if(_o=!1,t=o-Va(),!yc())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,Cc)};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 Sc,La=function(e){!Fr&&e>0&&Mo.start(),Fr+=e,!Fr&&Mo.stop()},$c=function(e){return!Eo(e)&&!uc(e)&&getComputedStyle(e).display==="inline"},kc=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 $c(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Tc=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 Tc(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 kc(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}(),zc=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 Pc{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||zc)(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 Pc,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 Rc(){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 Ec({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}}),Bc=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"})])]),_c=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();Bc.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:g.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}=Ec({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),g=r.ref(0),h=He(()=>Math.max(u.value.getBound(g.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 m,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{m=O,z!==null&&window.clearTimeout(z),z=window.setTimeout(()=>{m=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(m===void 0){const ye=ie.sum(oe);fe.scrollTop>ye&&fe.scrollBy(0,ee)}else if(oe<m)fe.scrollBy(0,ee);else if(oe===m){const ye=ie.sum(oe);ce+ye>fe.scrollTop+fe.offsetHeight&&fe.scrollBy(0,ee)}q()}p.value++}const M=!Rc();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&&(g.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,g=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:()=>g}):(g.key=c,g)})}})]):(a=(i=this.$slots).empty)===null||a===void 0?void 0:a.call(i)])}})}}),Mc=St(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[St("&::-webkit-scrollbar",{width:0,height:0})]),Fc=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 Mc.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",Ic=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,g=[],h=t.tail?c==null?void 0:c():null;let y=h?h.offsetWidth:0,w=!1;const m=l.children.length-(t.tail?1:0);for(let F=0;F<m-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,g[F]=k,y>p){const{updateCounter:M}=e;for(let b=F;b>=0;--b){const S=m-1-b;M!==void 0?M(S):f.textContent=`${S}`;const _=f.offsetWidth;if(y-=g[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 Ic.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(!Ac(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function Ac(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 Oc=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=Md(),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 m;w.code==="Escape"&&l()&&((m=e.onEsc)===null||m===void 0||m.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 m=f();if(m===null||m.contains(kn(w)))return;g("first")}}function f(){const w=n.value;if(w===null)return null;let m=w;for(;m=m.nextSibling,!(m===null||m instanceof Element&&m.tagName==="DIV"););return m}function u(){var w;if(!e.disabled){if(Xn.push(t),e.autoFocus){const{initialFocusTo:m}=e;m===void 0?g("first"):(w=Sa(m))===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:m}=e;m!==void 0?(w=Sa(m))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&s instanceof HTMLElement&&(a=!0,s.focus({preventScroll:!0}),a=!1)}function g(w){if(l()&&e.active){const m=n.value,z=o.value;if(m!==null&&z!==null){const F=f();if(F==null||F===z){a=!0,m.focus({preventScroll:!0}),a=!1;return}a=!0;const $=w==="first"?Ka(F):qa(F);a=!1,$||(a=!0,m.focus({preventScroll:!0}),a=!1)}}}function h(w){if(a)return;const m=f();m!==null&&(w.relatedTarget!==null&&m.contains(w.relatedTarget)?g("last"):g("first"))}function y(w){a||(w.relatedTarget!==null&&w.relatedTarget===n.value?g("last"):g("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 Dc=/^(\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(Dc.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 Vc(){return Io===void 0&&(Io=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Io}const Lc=new WeakSet;function Hc(e){Lc.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 Nc(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 Wc(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 jc(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",Uc="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(Uc),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 g=t?t.value:void 0,h=a==null?void 0:a.value;h&&(p+=`-${h}`),g&&(p+=`-${g}`);const{themeOverrides:y,builtinThemeOverrides:w}=o;y&&(p+=`-${fo(JSON.stringify(y))}`),w&&(p+=`-${fo(JSON.stringify(w))}`),l.value=p,c=()=>{const m=n.value;let z="";for(const F in m)z+=`${F}: ${m[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 Gc={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)?qc(l,u=>u.test(s)):Kc(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 Kc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function qc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Xc(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 Yc={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"}},Zc=(e,t,n)=>{let o;const i=Yc[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},Jc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Qc=(e,t,n,o)=>Jc[e],eu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tu={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nu={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"]},ru={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"]},ou={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"}},iu={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"}},au={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:eu,defaultWidth:"wide"}),quarter:Jn({values:tu,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Jn({values:nu,defaultWidth:"wide"}),day:Jn({values:ru,defaultWidth:"wide"}),dayPeriod:Jn({values:ou,defaultWidth:"wide",formattingValues:iu,defaultFormattingWidth:"wide"})},lu=/^(\d+)(th|st|nd|rd)?/i,su=/\d+/i,du={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},cu={any:[/^b/i,/^(a|c)/i]},uu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fu={any:[/1/i,/2/i,/3/i,/4/i]},hu={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},pu={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]},bu={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},gu={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]},mu={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},vu={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}},xu={ordinalNumber:Xc({matchPattern:lu,parsePattern:su,valueCallback:e=>parseInt(e,10)}),era:Qn({matchPatterns:du,defaultMatchWidth:"wide",parsePatterns:cu,defaultParseWidth:"any"}),quarter:Qn({matchPatterns:uu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Qn({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),day:Qn({matchPatterns:bu,defaultMatchWidth:"wide",parsePatterns:gu,defaultParseWidth:"any"}),dayPeriod:Qn({matchPatterns:mu,defaultMatchWidth:"any",parsePatterns:vu,defaultParseWidth:"any"})},yu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Su={date:Vo({formats:yu,defaultWidth:"full"}),time:Vo({formats:wu,defaultWidth:"full"}),dateTime:Vo({formats:Cu,defaultWidth:"full"})},$u={name:"en-US",locale:{code:"en-US",formatDistance:Zc,formatLong:Su,formatRelative:Qc,localize:au,match:xu,options:{weekStartsOn:0,firstWeekContainsDate:1}}};var rl=typeof global=="object"&&global&&global.Object===Object&&global,ku=typeof self=="object"&&self&&self.Object===Object&&self,bt=rl||ku||Function("return this")(),Kt=bt.Symbol,ol=Object.prototype,Tu=ol.hasOwnProperty,zu=ol.toString,er=Kt?Kt.toStringTag:void 0;function Pu(e){var t=Tu.call(e,er),n=e[er];try{e[er]=void 0;var o=!0}catch{}var i=zu.call(e);return o&&(t?e[er]=n:delete e[er]),i}var Ru=Object.prototype,Eu=Ru.toString;function Bu(e){return Eu.call(e)}var _u="[object Null]",Mu="[object Undefined]",il=Kt?Kt.toStringTag:void 0;function fn(e){return e==null?e===void 0?Mu:_u:il&&il in Object(e)?Pu(e):Bu(e)}function qt(e){return e!=null&&typeof e=="object"}var Fu="[object Symbol]";function Hr(e){return typeof e=="symbol"||qt(e)&&fn(e)==Fu}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,Iu=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==-Iu?"-0":t}var Au=/\s/;function Ou(e){for(var t=e.length;t--&&Au.test(e.charAt(t)););return t}var Du=/^\s+/;function Vu(e){return e&&e.slice(0,Ou(e)+1).replace(Du,"")}function ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cl=NaN,Lu=/^[-+]0x[0-9a-f]+$/i,Hu=/^0b[01]+$/i,Nu=/^0o[0-7]+$/i,Wu=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=Vu(e);var n=Hu.test(e);return n||Nu.test(e)?Wu(e.slice(2),n?2:8):Lu.test(e)?cl:+e}function Lo(e){return e}var ju="[object AsyncFunction]",Uu="[object Function]",Gu="[object GeneratorFunction]",Ku="[object Proxy]";function Ho(e){if(!ht(e))return!1;var t=fn(e);return t==Uu||t==Gu||t==ju||t==Ku}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 qu(e){return!!fl&&fl in e}var Xu=Function.prototype,Yu=Xu.toString;function hn(e){if(e!=null){try{return Yu.call(e)}catch{}try{return e+""}catch{}}return""}var Zu=/[\\^$.*+?()[\]{}|]/g,Ju=/^\[object .+?Constructor\]$/,Qu=Function.prototype,ef=Object.prototype,tf=Qu.toString,nf=ef.hasOwnProperty,rf=RegExp("^"+tf.call(nf).replace(Zu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function of(e){if(!ht(e)||qu(e))return!1;var t=Ho(e)?rf:Ju;return t.test(hn(e))}function af(e,t){return e==null?void 0:e[t]}function pn(e,t){var n=af(e,t);return of(n)?n:void 0}var Wo=pn(bt,"WeakMap"),hl=Object.create,lf=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 sf(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 df(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var cf=800,uf=16,ff=Date.now;function hf(e){var t=0,n=0;return function(){var o=ff(),i=uf-(o-n);if(n=o,i>0){if(++t>=cf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function pf(e){return function(){return e}}var Nr=function(){try{var e=pn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bf=Nr?function(e,t){return Nr(e,"toString",{configurable:!0,enumerable:!1,value:pf(t),writable:!0})}:Lo,gf=hf(bf),mf=9007199254740991,vf=/^(?:0|[1-9]\d*)$/;function jo(e,t){var n=typeof e;return t=t??mf,!!t&&(n=="number"||n!="symbol"&&vf.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 xf=Object.prototype,yf=xf.hasOwnProperty;function wf(e,t,n){var o=e[t];(!(yf.call(e,t)&&tr(o,n))||n===void 0&&!(t in e))&&Uo(e,t,n)}function Cf(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):wf(n,l,d)}return n}var pl=Math.max;function Sf(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),sf(e,this,l)}}function $f(e,t){return gf(Sf(e,t,Lo),e+"")}var kf=9007199254740991;function Go(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=kf}function Fn(e){return e!=null&&Go(e.length)&&!Ho(e)}function Tf(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 zf(e){return $f(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&&Tf(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 Pf=Object.prototype;function Ko(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Pf;return e===n}function Rf(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var Ef="[object Arguments]";function bl(e){return qt(e)&&fn(e)==Ef}var gl=Object.prototype,Bf=gl.hasOwnProperty,_f=gl.propertyIsEnumerable,Wr=bl(function(){return arguments}())?bl:function(e){return qt(e)&&Bf.call(e,"callee")&&!_f.call(e,"callee")};function Mf(){return!1}var ml=typeof je=="object"&&je&&!je.nodeType&&je,vl=ml&&typeof module=="object"&&module&&!module.nodeType&&module,Ff=vl&&vl.exports===ml,xl=Ff?bt.Buffer:void 0,If=xl?xl.isBuffer:void 0,jr=If||Mf,Af="[object Arguments]",Of="[object Array]",Df="[object Boolean]",Vf="[object Date]",Lf="[object Error]",Hf="[object Function]",Nf="[object Map]",Wf="[object Number]",jf="[object Object]",Uf="[object RegExp]",Gf="[object Set]",Kf="[object String]",qf="[object WeakMap]",Xf="[object ArrayBuffer]",Yf="[object DataView]",Zf="[object Float32Array]",Jf="[object Float64Array]",Qf="[object Int8Array]",eh="[object Int16Array]",th="[object Int32Array]",nh="[object Uint8Array]",rh="[object Uint8ClampedArray]",oh="[object Uint16Array]",ih="[object Uint32Array]",Oe={};Oe[Zf]=Oe[Jf]=Oe[Qf]=Oe[eh]=Oe[th]=Oe[nh]=Oe[rh]=Oe[oh]=Oe[ih]=!0,Oe[Af]=Oe[Of]=Oe[Xf]=Oe[Df]=Oe[Yf]=Oe[Vf]=Oe[Lf]=Oe[Hf]=Oe[Nf]=Oe[Wf]=Oe[jf]=Oe[Uf]=Oe[Gf]=Oe[Kf]=Oe[qf]=!1;function ah(e){return qt(e)&&Go(e.length)&&!!Oe[fn(e)]}function lh(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,sh=nr&&nr.exports===yl,qo=sh&&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?lh(Cl):ah,dh=Object.prototype,ch=dh.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?Rf(e.length,String):[],d=l.length;for(var c in e)(t||ch.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 uh=$l(Object.keys,Object),fh=Object.prototype,hh=fh.hasOwnProperty;function ph(e){if(!Ko(e))return uh(e);var t=[];for(var n in Object(e))hh.call(e,n)&&n!="constructor"&&t.push(n);return t}function Yo(e){return Fn(e)?Sl(e):ph(e)}function bh(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var gh=Object.prototype,mh=gh.hasOwnProperty;function vh(e){if(!ht(e))return bh(e);var t=Ko(e),n=[];for(var o in e)o=="constructor"&&(t||!mh.call(e,o))||n.push(o);return n}function kl(e){return Fn(e)?Sl(e,!0):vh(e)}var xh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yh=/^\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:yh.test(e)||!xh.test(e)||t!=null&&e in Object(t)}var rr=pn(Object,"create");function wh(){this.__data__=rr?rr(null):{},this.size=0}function Ch(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Sh="__lodash_hash_undefined__",$h=Object.prototype,kh=$h.hasOwnProperty;function Th(e){var t=this.__data__;if(rr){var n=t[e];return n===Sh?void 0:n}return kh.call(t,e)?t[e]:void 0}var zh=Object.prototype,Ph=zh.hasOwnProperty;function Rh(e){var t=this.__data__;return rr?t[e]!==void 0:Ph.call(t,e)}var Eh="__lodash_hash_undefined__";function Bh(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rr&&t===void 0?Eh: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=wh,bn.prototype.delete=Ch,bn.prototype.get=Th,bn.prototype.has=Rh,bn.prototype.set=Bh;function _h(){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 Mh=Array.prototype,Fh=Mh.splice;function Ih(e){var t=this.__data__,n=Ur(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Fh.call(t,n,1),--this.size,!0}function Ah(e){var t=this.__data__,n=Ur(t,e);return n<0?void 0:t[n][1]}function Oh(e){return Ur(this.__data__,e)>-1}function Dh(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=_h,Mt.prototype.delete=Ih,Mt.prototype.get=Ah,Mt.prototype.has=Oh,Mt.prototype.set=Dh;var or=pn(bt,"Map");function Vh(){this.size=0,this.__data__={hash:new bn,map:new(or||Mt),string:new bn}}function Lh(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 Lh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Hh(e){var t=Gr(this,e).delete(e);return this.size-=t?1:0,t}function Nh(e){return Gr(this,e).get(e)}function Wh(e){return Gr(this,e).has(e)}function jh(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=Vh,Ft.prototype.delete=Hh,Ft.prototype.get=Nh,Ft.prototype.has=Wh,Ft.prototype.set=jh;var Uh="Expected a function";function Jo(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Uh);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 Gh=500;function Kh(e){var t=Jo(e,function(o){return n.size===Gh&&n.clear(),o}),n=t.cache;return t}var qh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xh=/\\(\\)?/g,Yh=Kh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(qh,function(n,o,i,a){t.push(i?a.replace(Xh,"$1"):o||n)}),t});function Tl(e){return e==null?"":dl(e)}function zl(e,t){return ft(e)?e:Zo(e,t)?[e]:Yh(Tl(e))}var Zh=1/0;function Kr(e){if(typeof e=="string"||Hr(e))return e;var t=e+"";return t=="0"&&1/e==-Zh?"-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 Jh(e,t,n){var o=e==null?void 0:Pl(e,t);return o===void 0?n:o}function Qh(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),ep="[object Object]",tp=Function.prototype,np=Object.prototype,El=tp.toString,rp=np.hasOwnProperty,op=El.call(Object);function ip(e){if(!qt(e)||fn(e)!=ep)return!1;var t=Rl(e);if(t===null)return!0;var n=rp.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&El.call(n)==op}function ap(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 lp(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:ap(e,t,n)}var sp="\\ud800-\\udfff",dp="\\u0300-\\u036f",cp="\\ufe20-\\ufe2f",up="\\u20d0-\\u20ff",fp=dp+cp+up,hp="\\ufe0e\\ufe0f",pp="\\u200d",bp=RegExp("["+pp+sp+fp+hp+"]");function Bl(e){return bp.test(e)}function gp(e){return e.split("")}var _l="\\ud800-\\udfff",mp="\\u0300-\\u036f",vp="\\ufe20-\\ufe2f",xp="\\u20d0-\\u20ff",yp=mp+vp+xp,wp="\\ufe0e\\ufe0f",Cp="["+_l+"]",Qo="["+yp+"]",ei="\\ud83c[\\udffb-\\udfff]",Sp="(?:"+Qo+"|"+ei+")",Ml="[^"+_l+"]",Fl="(?:\\ud83c[\\udde6-\\uddff]){2}",Il="[\\ud800-\\udbff][\\udc00-\\udfff]",$p="\\u200d",Al=Sp+"?",Ol="["+wp+"]?",kp="(?:"+$p+"(?:"+[Ml,Fl,Il].join("|")+")"+Ol+Al+")*",Tp=Ol+Al+kp,zp="(?:"+[Ml+Qo+"?",Qo,Fl,Il,Cp].join("|")+")",Pp=RegExp(ei+"(?="+ei+")|"+zp+Tp,"g");function Rp(e){return e.match(Pp)||[]}function Ep(e){return Bl(e)?Rp(e):gp(e)}function Bp(e){return function(t){t=Tl(t);var n=Bl(t)?Ep(t):void 0,o=n?n[0]:t.charAt(0),i=n?lp(n,1).join(""):t.slice(1);return o[e]()+i}}var _p=Bp("toUpperCase");function Mp(){this.__data__=new Mt,this.size=0}function Fp(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ip(e){return this.__data__.get(e)}function Ap(e){return this.__data__.has(e)}var Op=200;function Dp(e,t){var n=this.__data__;if(n instanceof Mt){var o=n.__data__;if(!or||o.length<Op-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=Mp,Tt.prototype.delete=Fp,Tt.prototype.get=Ip,Tt.prototype.has=Ap,Tt.prototype.set=Dp;var Dl=typeof je=="object"&&je&&!je.nodeType&&je,Vl=Dl&&typeof module=="object"&&module&&!module.nodeType&&module,Vp=Vl&&Vl.exports===Dl,Ll=Vp?bt.Buffer:void 0;Ll&&Ll.allocUnsafe;function Lp(e,t){return e.slice()}function Hp(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 Np(){return[]}var Wp=Object.prototype,jp=Wp.propertyIsEnumerable,Hl=Object.getOwnPropertySymbols,Up=Hl?function(e){return e==null?[]:(e=Object(e),Hp(Hl(e),function(t){return jp.call(e,t)}))}:Np;function Gp(e,t,n){var o=t(e);return ft(e)?o:Qh(o,n(e))}function Nl(e){return Gp(e,Yo,Up)}var ti=pn(bt,"DataView"),ni=pn(bt,"Promise"),ri=pn(bt,"Set"),Wl="[object Map]",Kp="[object Object]",jl="[object Promise]",Ul="[object Set]",Gl="[object WeakMap]",Kl="[object DataView]",qp=hn(ti),Xp=hn(or),Yp=hn(ni),Zp=hn(ri),Jp=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==Kp?e.constructor:void 0,o=n?hn(n):"";if(o)switch(o){case qp:return Kl;case Xp:return Wl;case Yp:return jl;case Zp:return Ul;case Jp:return Gl}return t});var qr=bt.Uint8Array;function Qp(e){var t=new e.constructor(e.byteLength);return new qr(t).set(new qr(e)),t}function eb(e,t){var n=Qp(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function tb(e){return typeof e.constructor=="function"&&!Ko(e)?lf(Rl(e)):{}}var nb="__lodash_hash_undefined__";function rb(e){return this.__data__.set(e,nb),this}function ob(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=rb,Xr.prototype.has=ob;function ib(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 ab(e,t){return e.has(t)}var lb=1,sb=2;function ql(e,t,n,o,i,a){var s=n&lb,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,g=n&sb?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(g){if(!ib(t,function(m,z){if(!ab(g,z)&&(h===m||i(h,m,n,o,a)))return g.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 db(e){var t=-1,n=Array(e.size);return e.forEach(function(o,i){n[++t]=[i,o]}),n}function cb(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var ub=1,fb=2,hb="[object Boolean]",pb="[object Date]",bb="[object Error]",gb="[object Map]",mb="[object Number]",vb="[object RegExp]",xb="[object Set]",yb="[object String]",wb="[object Symbol]",Cb="[object ArrayBuffer]",Sb="[object DataView]",Xl=Kt?Kt.prototype:void 0,oi=Xl?Xl.valueOf:void 0;function $b(e,t,n,o,i,a,s){switch(n){case Sb:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Cb:return!(e.byteLength!=t.byteLength||!a(new qr(e),new qr(t)));case hb:case pb:case mb:return tr(+e,+t);case bb:return e.name==t.name&&e.message==t.message;case vb:case yb:return e==t+"";case gb:var l=db;case xb:var d=o&ub;if(l||(l=cb),e.size!=t.size&&!d)return!1;var c=s.get(e);if(c)return c==t;o|=fb,s.set(e,t);var f=ql(l(e),l(t),o,i,a,s);return s.delete(e),f;case wb:if(oi)return oi.call(e)==oi.call(t)}return!1}var kb=1,Tb=Object.prototype,zb=Tb.hasOwnProperty;function Pb(e,t,n,o,i,a){var s=n&kb,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:zb.call(t,p)))return!1}var g=a.get(e),h=a.get(t);if(g&&h)return g==t&&h==e;var y=!0;a.set(e,t),a.set(t,e);for(var w=s;++u<d;){p=l[u];var m=e[p],z=t[p];if(o)var F=s?o(z,m,p,t,e,a):o(m,z,p,e,t,a);if(!(F===void 0?m===z||i(m,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 Rb=1,Yl="[object Arguments]",Zl="[object Array]",Yr="[object Object]",Eb=Object.prototype,Jl=Eb.hasOwnProperty;function Bb(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):$b(e,t,d,n,o,i,a);if(!(n&Rb)){var g=f&&Jl.call(e,"__wrapped__"),h=u&&Jl.call(t,"__wrapped__");if(g||h){var y=g?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),Pb(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:Bb(e,t,n,o,ii,i)}var _b=1,Mb=2;function Fb(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,_b|Mb,o,f):u))return!1}}return!0}function Ql(e){return e===e&&!ht(e)}function Ib(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 Ab(e){var t=Ib(e);return t.length==1&&t[0][2]?es(t[0][0],t[0][1]):function(n){return n===e||Fb(n,e,t)}}function Ob(e,t){return e!=null&&t in Object(e)}function Db(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 Vb(e,t){return e!=null&&Db(e,t,Ob)}var Lb=1,Hb=2;function Nb(e,t){return Zo(e)&&Ql(t)?es(Kr(e),t):function(n){var o=Jh(n,e);return o===void 0&&o===t?Vb(n,e):ii(t,o,Lb|Hb)}}function Wb(e){return function(t){return t==null?void 0:t[e]}}function jb(e){return function(t){return Pl(t,e)}}function Ub(e){return Zo(e)?Wb(Kr(e)):jb(e)}function Gb(e){return typeof e=="function"?e:e==null?Lo:typeof e=="object"?ft(e)?Nb(e[0],e[1]):Ab(e):Ub(e)}function Kb(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=Kb();function qb(e,t){return e&&ts(e,t,Yo)}function Xb(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 Yb=Xb(qb),ai=function(){return bt.Date.now()},Zb="Expected a function",Jb=Math.max,Qb=Math.min;function eg(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(Zb);t=ul(t)||0,ht(n)&&(f=!!n.leading,u="maxWait"in n,a=u?Jb(ul(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function g(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(m,t),f?g(M):s}function y(M){var b=M-d,S=M-c,_=t-b;return u?Qb(_,a-S):_}function w(M){var b=M-d,S=M-c;return d===void 0||b>=t||b<0||u&&S>=a}function m(){var M=ai();if(w(M))return z(M);l=setTimeout(m,y(M))}function z(M){return l=void 0,p&&o?g(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(m,t),g(d)}return l===void 0&&(l=setTimeout(m,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 tg(e){return qt(e)&&Fn(e)}function si(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ng(e){return Cf(e,kl(e))}function rg(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),g=!p&&jr(d),h=!p&&!g&&Xo(d);f=d,p||g||h?ft(l)?f=l:tg(l)?f=df(l):g?(u=!1,f=Lp(d)):h?(u=!1,f=eb(d)):f=[]:ip(d)||Wr(d)?(f=l,Wr(l)?f=ng(l):(!ht(l)||Ho(l))&&(f=tb(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))rg(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 og(e,t){var n=-1,o=Fn(e)?Array(e.length):[];return Yb(e,function(i,a,s){o[++n]=t(i,a,s)}),o}function ig(e,t){var n=ft(e)?al:og;return n(e,Gb(t))}var Zr=zf(function(e,t,n){ns(e,t,n)}),ag="Expected a function";function di(e,t,n){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(ag);return ht(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),eg(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:Gc[e]});return{dateLocaleRef:r.computed(()=>{var a;return(a=n==null?void 0:n.value)!==null&&a!==void 0?a:$u}),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(Cd(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:lg,fontFamily:sg,lineHeight:dg}=gn,rs=V("body",`
|
|
16
16
|
margin: 0;
|
|
@@ -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:ar,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:ar,ssr:o,parent:i==null?void 0:i.styleMountTarget})};o?a():r.onBeforeMount(a)}function
|
|
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:ar,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:ar,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:ar,ssr:s,parent:l==null?void 0:l.styleMountTarget}),l!=null&&l.preflightStyleDisabled||rs.mount({id:"n-global",head:!0,anchorMetaName:ar,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:g={},builtinThemeOverrides:h={}}=i,{common:y,peers:w}=g,{common:m=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||m||o.common,k,b,y),D=Zr((c=u||F||o.self)===null||c===void 0?void 0:c(_),h,M,g);return{common:_,self:D,peers:Zr({},o.peers,$,p),peerOverrides:Zr({},h.peers,S,w)}})}Ce.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const cg=x("base-icon",`
|
|
26
26
|
height: 1em;
|
|
27
27
|
width: 1em;
|
|
28
28
|
line-height: 1em;
|
|
@@ -1032,7 +1032,7 @@ ${t}
|
|
|
1032
1032
|
`)])])]))]),ev=x("input",[N("disabled",[R("input-el, textarea-el",`
|
|
1033
1033
|
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
1034
1034
|
`)])]);function tv(e){let t=0;for(const n of e)t++;return t}function to(e){return e===""||e==null}function nv(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 g=f[c-1],h=d.indexOf(g,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||tv)(l)});return()=>{const{value:l}=o,{value:d}=n;return r.h("span",{class:`${i.value}-input-word-count`},jc(t.default,{value:d===null||Array.isArray(d)?"":d},()=>[l===void 0?s.value:`${s.value} / ${l}`]))}}}),rv=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:rv,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",Qm,Ci,e,t);Ts&&mn("-input-safari",ev,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),g=nv(p),h=r.ref(null),{localeRef:y}=ir("Input"),w=r.ref(e.defaultValue),m=r.toRef(e,"value"),z=Ct(m,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;g.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(g.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),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:mx,iconSize:vx,colorFocusWarning:xx,boxShadowFocusWarning:yx,borderWarning:wx,borderFocusWarning:Cx,borderHoverWarning:Sx,colorFocusError:$x,boxShadowFocusError:kx,borderError:Tx,borderFocusError:zx,borderHoverError:Px,clearSize:Rx,clearColor:Ex,clearColorHover:Bx,clearColorPressed:_x,iconColor:Mx,iconColorDisabled:Fx,suffixTextColor:Ix,countTextColor:Ax,countTextColorDisabled:Ox,iconColorHover:Dx,iconColorPressed:Vx,loadingColor:Lx,loadingColorError:Hx,loadingColorWarning:Nx,fontWeight:Wx,[Q("padding",P)]:jx,[Q("fontSize",P)]:Ux,[Q("height",P)]:Gx}}=a.value,{left:Kx,right:qx}=dt(jx);return{"--n-bezier":U,"--n-count-text-color":Ax,"--n-count-text-color-disabled":Ox,"--n-color":ge,"--n-font-size":Ux,"--n-font-weight":Wx,"--n-border-radius":Me,"--n-height":Gx,"--n-padding-left":Kx,"--n-padding-right":qx,"--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":vx,"--n-line-height-textarea":Ii,"--n-color-disabled":Ai,"--n-color-focus":Ln,"--n-text-color-disabled":Hn,"--n-box-shadow-focus":mx,"--n-loading-color":Lx,"--n-caret-color-warning":Ot,"--n-color-focus-warning":xx,"--n-box-shadow-focus-warning":yx,"--n-border-warning":wx,"--n-border-focus-warning":Cx,"--n-border-hover-warning":Sx,"--n-loading-color-warning":Nx,"--n-caret-color-error":At,"--n-color-focus-error":$x,"--n-box-shadow-focus-error":kx,"--n-border-error":Tx,"--n-border-focus-error":zx,"--n-border-hover-error":Px,"--n-loading-color-error":Hx,"--n-clear-color":Ex,"--n-clear-size":Rx,"--n-clear-color-hover":Bx,"--n-clear-color-pressed":_x,"--n-icon-color":Mx,"--n-icon-color-hover":Dx,"--n-icon-color-pressed":Vx,"--n-icon-color-disabled":Fx,"--n-suffix-text-color":Ix}}),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:g=>{this.handleInputFocus(g,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(mg,null)})]):kt(d["password-invisible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(vg,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)}}),ov=x("input-group",`
|
|
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:g=>{this.handleInputFocus(g,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(mg,null)})]):kt(d["password-invisible-icon"],()=>[r.h(gt,{clsPrefix:n},{default:()=>r.h(vg,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)}}),ov=x("input-group",`
|
|
1036
1036
|
display: inline-flex;
|
|
1037
1037
|
width: 100%;
|
|
1038
1038
|
flex-wrap: nowrap;
|
|
@@ -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
|
-
`)])])])]),k0=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]}),T0=r.defineComponent({name:"Tabs",props:k0,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",$0,u0,e,s),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),g=r.ref(null),h=r.ref(null),y=r.ref(!0),w=r.ref(!0),m=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=g.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=g.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=g.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}=g;!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}=m,{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(()=>`${m.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:g,scrollWrapperElRef:u,addTabFixed:Re,tabWrapperStyle:M,handleNavResize:se,mergedSize:m,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 g=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",m=t==="segment",z=!w&&!m&&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?g.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?g.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`}))},$=m?"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)),m?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?g.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(Fc,{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(g,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Hs(g,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,g=t===c;if(d.key!==void 0&&(d.key=c),g||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,g]]):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 z0(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 P0(e,t={}){const n=hr(e.settings,t.settings),o=e.specs,i=B0(e.tracks,t.tracks);return{plugin:e,settings:n,specs:o,tracks:i}}function R0(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=fr(n)),n}function E0(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]=E0(o,n[o.name]):n[o.name]=R0(o,n[o.name])}),n}function B0(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((o,i)=>{n[i]=hr(e,o)})),n}const _0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},M0=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 g(h){let y={...d.value[l.value]};if(h){const w={};f.value.forEach(m=>{w[m.name]=h[m.name]}),y={...y,...h}}o("update:value",y)}return r.watch(()=>s.value,()=>{l.value=p()}),r.watch(()=>l.value,()=>{g()}),(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",_0,[r.createVNode(Bi,{"dataset-id":h.datasetId,inputs:f.value,values:s.value,"onUpdate:values":g},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 F0={key:0,class:"text-red-600 mb-1"},I0=100,A0=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),g=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:m}=await tn().GET(`/api/histories/${g}/contents?${h}${y}${w}limit=${I0}`);if(m&&m.length>0){const z=m.map(F=>({label:`${F.hid}: ${F.name}`,value:{id:F.id,hid:F.hid,name:F.name}}));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(){i.value=s.value}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)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[!u.optional&&!i.value?(r.openBlock(),r.createElementBlock("div",F0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji))]),_:1}),p[1]||(p[1]=r.createElementVNode("span",null,"Please select a dataset.",-1))])):r.createCommentVNode("",!0),r.createVNode(r.unref(ao),{value:s.value,"onUpdate:value":[p[0]||(p[0]=g=>s.value=g),d],filterable:"",placeholder:"Select a Dataset",loading:a.value,"render-label":c,"render-tag":f,options:o.value,onSearch:l},null,8,["value","loading","options"])],64))}});function O0(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 D0=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=O0(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"]))}}),V0={class:"select-none"},L0={class:"font-bold mb-1"},H0={key:0,class:"text-xs mb-1"},N0={key:5},Ks=.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",V0,[(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",L0,r.toDisplayString(c.label||c.name),1),c.help?(r.openBlock(),r.createElementBlock("div",H0,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(Nv),{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(M0,{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(A0,{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(D0,{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",N0,[c.min!==void 0&&c.max!==void 0?(r.openBlock(),r.createBlock(r.unref(y0),{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"?Ks:1},null,8,["value","onUpdate:value","min","max","step"])):r.createCommentVNode("",!0),r.createVNode(r.unref(g0),{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"?Ks: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))]))}}),W0={class:"border border-dotted border-green-600 rounded p-2"},j0={class:"mx-1"},U0=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",W0,[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(od))]),_:1}),r.createElementVNode("span",j0,"Remove Track "+r.toDisplayString(d.valuesArray.length-u),1)]),_:2},1032,["disabled","onClick"])])]))),128))],64))}}),G0=2e3,K0=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"),G0)}),(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)}}),q0={class:"text-xs"},X0=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(Qs),{class:"text-green-600"})]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",q0,"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}))}}),Y0=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Z0={},J0={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",class:"size-14"};function Q0(e,t){return r.openBlock(),r.createElementBlock("svg",J0,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 ex=Y0(Z0,[["render",Q0]]),tx={class:"overflow-auto select-none bg-white z-10 p-2"},nx={key:0,class:"flex"},rx={class:"flex-1 font-thin text-lg mt-1"},ox={class:"bg-sky-50 text-sky-900 rounded my-2 p-2"},ix={class:"flex"},ax={class:"flex justify-center center-items"},lx={class:"m-2"},sx=["src"],dx={class:"overflow-hidden break-words p-1"},cx={class:"font-bold"},ux=["innerHTML"],fx=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",tx,[u.datasetUrl?(r.openBlock(),r.createElementBlock("div",nx,[r.createElementVNode("div",rx,[p[2]||(p[2]=r.createElementVNode("span",null,"Charts",-1)),r.createVNode(X0)]),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(nd))]),_: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]=g=>o("toggle"))},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(td))]),_:1})]),_:1})]),default:r.withCtx(()=>[p[4]||(p[4]=r.createElementVNode("span",{class:"text-xs"},"Collapse",-1))]),_:1})])])):r.createCommentVNode("",!0),r.createVNode(K0,{message:i.value,"message-type":a.value,onTimeout:p[1]||(p[1]=g=>i.value=""),class:"mt-2"},null,8,["message","message-type"]),r.createElementVNode("div",ox,[r.createElementVNode("div",ix,[r.createElementVNode("div",ax,[r.createElementVNode("div",lx,[n.logoUrl?(r.openBlock(),r.createElementBlock("img",{key:0,src:n.logoUrl,class:"min-w-14 max-w-14 object-contain"},null,8,sx)):(r.openBlock(),r.createBlock(ex,{key:1}))])]),r.createElementVNode("div",dx,[r.createElementVNode("span",cx,r.toDisplayString(u.html),1),r.createElementVNode("div",{class:"text-xs",innerHTML:u.description},null,8,ux)])])]),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(T0),{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(rd))]),_:1}),p[7]||(p[7]=r.createElementVNode("span",{class:"mx-1"},"Tracks",-1))]),default:r.withCtx(()=>[r.createVNode(U0,{"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(Zs))]),_: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 hx(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 px={key:1,class:"m-2"},bx={key:0,class:"relative max-w-full h-screen overflow-hidden"},gx=r.defineComponent({__name:"GalaxyCharts",props:{container:{},credentials:{},incoming:{}},setup(e){const t=e,{root:n,visualizationConfig:o,visualizationId:i,visualizationPlugin:a,visualizationTitle:s}=hx(t.incoming,t.container),l=r.ref(!0),d=r.ref(""),c=r.ref(""),f=r.ref(""),u=r.ref(!0),p=r.ref(""),g=r.ref(""),h=r.ref([]),y=r.ref({}),w=r.ref({}),m=r.ref([]),z=r.ref([]),F=r.ref(i),$=r.ref(s),k=Hi();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),P0(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||"",g.value=oe.name||"",h.value=oe.settings||[],y.value=te,w.value=ce||{},m.value=oe.tracks||[],z.value=j});const M=r.computed(()=>o.dataset_id||""),b=r.computed(()=>o.dataset_url?(console.debug(`GalaxyCharts: Evaluating dataset url: ${o.dataset_url}.`),o.dataset_url):M.value?(console.debug(`GalaxyCharts: Built dataset url from dataset id: ${M.value}.`),Xs(n,M.value)):""),S=r.computed(()=>p.value&&`${n}${p.value}`),_=r.computed(()=>h.value.length===0&&m.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,dataset_url:b.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 z0(g.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",px,[r.createElementVNode("span",null,[r.createVNode(r.unref(Js),{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",bx,[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(ed))]),_: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(fx,{"dataset-id":M.value,"dataset-url":b.value,description:d.value,html:f.value,"logo-url":S.value,name:g.value,"setting-inputs":h.value,"setting-values":y.value,"track-inputs":m.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=gx,je.useColumnsStore=Ys,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|
|
1981
|
+
`)])])])]),k0=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]}),T0=r.defineComponent({name:"Tabs",props:k0,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",$0,u0,e,s),c=r.ref(null),f=r.ref(null),u=r.ref(null),p=r.ref(null),g=r.ref(null),h=r.ref(null),y=r.ref(!0),w=r.ref(!0),m=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=g.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=g.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=g.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}=g;!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}=m,{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(()=>`${m.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:g,scrollWrapperElRef:u,addTabFixed:Re,tabWrapperStyle:M,handleNavResize:se,mergedSize:m,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 g=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",m=t==="segment",z=!w&&!m&&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?g.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?g.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`}))},$=m?"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)),m?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?g.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(Fc,{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(g,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Hs(g,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,g=t===c;if(d.key!==void 0&&(d.key=c),g||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,g]]):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 z0(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 P0(e,t={}){const n=hr(e.settings,t.settings),o=e.specs,i=B0(e.tracks,t.tracks);return{plugin:e,settings:n,specs:o,tracks:i}}function R0(e,t){let n=t??e.value;return["float","integer"].includes(e.type)?n=Number(n):e.type==="boolean"&&(n=fr(n)),n}function E0(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]=E0(o,n[o.name]):n[o.name]=R0(o,n[o.name])}),n}function B0(e,t){const n=t||[];return e&&(n.length===0&&n.push({}),n.forEach((o,i)=>{n[i]=hr(e,o)})),n}const _0={key:2,class:"border border-dotted border-green-600 rounded mt-2 p-2"},M0=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 g(h){let y={...d.value[l.value]};if(h){const w={};f.value.forEach(m=>{w[m.name]=h[m.name]}),y={...y,...h}}o("update:value",y)}return r.watch(()=>s.value,()=>{l.value=p()}),r.watch(()=>l.value,()=>{g()}),(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",_0,[r.createVNode(Bi,{"dataset-id":h.datasetId,inputs:f.value,values:s.value,"onUpdate:values":g},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 F0={key:0},I0={key:0,class:"text-red-600 mb-1"},A0={key:1},O0=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),g=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:m}=await tn().GET(`/api/histories/${g}/contents?${h}${y}${w}limit=${O0}`);if(m&&m.length>0){const z=m.map(F=>({label:`${F.hid}: ${F.name}`,value:{id:F.id,hid:F.hid,name:F.name}}));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(){i.value=s.value}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",F0,[!u.optional&&!i.value?(r.openBlock(),r.createElementBlock("div",I0,[r.createVNode(r.unref(mt),{class:"size-3 mr-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(ji))]),_:1}),p[1]||(p[1]=r.createElementVNode("span",null,"Please select a dataset.",-1))])):r.createCommentVNode("",!0),r.createVNode(r.unref(ao),{value:s.value,"onUpdate:value":[p[0]||(p[0]=g=>s.value=g),d],filterable:"",placeholder:"Select a Dataset",loading:a.value,"render-label":c,"render-tag":f,options:o.value,onSearch:l},null,8,["value","loading","options"])])):(r.openBlock(),r.createElementBlock("div",A0,"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},Ks=.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(Nv),{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(M0,{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(y0),{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"?Ks:1},null,8,["value","onUpdate:value","min","max","step"])):r.createCommentVNode("",!0),r.createVNode(r.unref(g0),{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"?Ks: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(od))]),_: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(Qs),{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(nd))]),_: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]=g=>o("toggle"))},{icon:r.withCtx(()=>[r.createVNode(r.unref(mt),null,{default:r.withCtx(()=>[r.createVNode(r.unref(td))]),_: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]=g=>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(T0),{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(rd))]),_: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(Zs))]),_: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(""),g=r.ref(""),h=r.ref([]),y=r.ref({}),w=r.ref({}),m=r.ref([]),z=r.ref([]),F=r.ref(i),$=r.ref(s),k=Hi();k.setCredentials(t.credentials||"include"),k.setRoot(n||"/"),P0(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||"",g.value=oe.name||"",h.value=oe.settings||[],y.value=te,w.value=ce||{},m.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}.`),Xs(n,M.value)):""),S=r.computed(()=>p.value&&`${n}${p.value}`),_=r.computed(()=>h.value.length===0&&m.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 z0(g.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(Js),{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(ed))]),_: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:g.value,"setting-inputs":h.value,"setting-values":y.value,"track-inputs":m.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=Ys,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|