@clickhouse/click-ui 0.0.234-sc-deprecation.4 → 0.0.234-sc-deprecation.5
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/bin/click-ui.js +0 -0
- package/dist/click-ui.bundled.es.js +754 -755
- package/dist/click-ui.bundled.umd.js +1 -1
- package/dist/click-ui.es.js +754 -755
- package/dist/click-ui.umd.js +1 -1
- package/dist/theme/types.d.ts +4 -3
- package/package.json +4 -4
|
@@ -46,7 +46,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
46
46
|
`)};if(G===0){var X=b.slice(m+1,k).concat(sc({children:[Y],className:D.properties.className})),ue=L(X,q);C.push(ue)}else if(G===U.length-1){var ee=b[k+1]&&b[k+1].children&&b[k+1].children[0],ae={type:"text",value:"".concat(j)};if(ee){var de=sc({children:[ae],className:D.properties.className});b.splice(k+1,0,de)}else{var re=[ae],be=L(re,q,D.properties.className);C.push(be)}}else{var me=[Y],Me=L(me,q,D.properties.className);C.push(Me)}}),m=k}k++};k<b.length;)E();if(m!==b.length-1){var A=b.slice(m+1,b.length);if(A&&A.length){var I=r&&C.length+u,O=L(A,I);C.push(O)}}return n?C:(g=[]).concat.apply(g,C)}function x_(e){var n=e.rows,t=e.stylesheet,r=e.useInlineStyles;return n.map(function(o,u){return R3({node:o,stylesheet:t,useInlineStyles:r,key:"code-segement".concat(u)})})}function H6(e){return e&&typeof e.highlightAuto<"u"}function M_(e){var n=e.astGenerator,t=e.language,r=e.code,o=e.defaultCodeValue;if(H6(n)){var u=b_(n,t);return t==="text"?{value:o,language:"text"}:u?n.highlight(t,r):n.highlightAuto(r)}try{return t&&t!=="text"?{value:n.highlight(r,t)}:{value:o}}catch{return{value:o}}}function E_(e,n){return function(r){var o=r.language,u=r.children,s=r.style,c=s===void 0?n:s,d=r.customStyle,g=d===void 0?{}:d,b=r.codeTagProps,C=b===void 0?{className:o?"language-".concat(o):void 0,style:Tr(Tr({},c['code[class*="language-"]']),c['code[class*="language-'.concat(o,'"]')])}:b,m=r.useInlineStyles,k=m===void 0?!0:m,x=r.showLineNumbers,_=x===void 0?!1:x,L=r.showInlineLineNumbers,E=L===void 0?!0:L,A=r.startingLineNumber,I=A===void 0?1:A,O=r.lineNumberContainerStyle,H=r.lineNumberStyle,D=H===void 0?{}:H,M=r.wrapLines,V=r.wrapLongLines,U=V===void 0?!1:V,j=r.lineProps,G=j===void 0?{}:j,q=r.renderer,Y=r.PreTag,X=Y===void 0?"pre":Y,ue=r.CodeTag,ee=ue===void 0?"code":ue,ae=r.code,de=ae===void 0?(Array.isArray(u)?u[0]:u)||"":ae,re=r.astGenerator,be=i_(r,m_);re=re||e;var me=_?p.createElement(__,{containerStyle:O,codeStyle:C.style||{},numberStyle:D,startingLineNumber:I,codeString:de}):null,Me=c.hljs||c['pre[class*="language-"]']||{backgroundColor:"#fff"},le=H6(re)?"hljs":"prismjs",fe=k?Object.assign({},be,{style:Object.assign({},Me,g)}):Object.assign({},be,{className:be.className?"".concat(le," ").concat(be.className):le,style:Object.assign({},g)});if(U?C.style=Tr(Tr({},C.style),{},{whiteSpace:"pre-wrap"}):C.style=Tr(Tr({},C.style),{},{whiteSpace:"pre"}),!re)return p.createElement(X,fe,me,p.createElement(ee,C,de));(M===void 0&&q||U)&&(M=!0),q=q||x_;var we=[{type:"text",value:de}],ye=M_({astGenerator:re,language:o,code:de,defaultCodeValue:we});ye.language===null&&(ye.value=we);var Be=ye.value.length+I,sl=L_(ye,M,G,_,E,I,Be,D,U);return p.createElement(X,fe,p.createElement(ee,C,!E&&me,q({rows:sl,stylesheet:c,useInlineStyles:k})))}}var L1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function A6(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),t}var x1={};function e0(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(n){var t=e[n];typeof t=="object"&&!Object.isFrozen(t)&&e0(t)}),e}var P6=e0,F_=e0;P6.default=F_;class O6{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function $i(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ao(e,...n){const t=Object.create(null);for(const r in e)t[r]=e[r];return n.forEach(function(r){for(const o in r)t[o]=r[o]}),t}const $_="</span>",N6=e=>!!e.kind;class T_{constructor(n,t){this.buffer="",this.classPrefix=t.classPrefix,n.walk(this)}addText(n){this.buffer+=$i(n)}openNode(n){if(!N6(n))return;let t=n.kind;n.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(n){N6(n)&&(this.buffer+=$_)}value(){return this.buffer}span(n){this.buffer+=`<span class="${n}">`}}class l0{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const t={kind:n,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,t){return typeof t=="string"?n.addText(t):t.children&&(n.openNode(t),t.children.forEach(r=>this._walk(n,r)),n.closeNode(t)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(t=>typeof t=="string")?n.children=[n.children.join("")]:n.children.forEach(t=>{l0._collapse(t)}))}}class I_ extends l0{constructor(n){super(),this.options=n}addKeyword(n,t){n!==""&&(this.openNode(t),this.addText(n),this.closeNode())}addText(n){n!==""&&this.add(n)}addSublanguage(n,t){const r=n.root;r.kind=t,r.sublanguage=!0,this.add(r)}toHTML(){return new T_(this,this.options).value()}finalize(){return!0}}function D_(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function ga(e){return e?typeof e=="string"?e:e.source:null}function H_(...e){return e.map(t=>ga(t)).join("")}function A_(...e){return"("+e.map(t=>ga(t)).join("|")+")"}function P_(e){return new RegExp(e.toString()+"|").exec("").length-1}function O_(e,n){const t=e&&e.exec(n);return t&&t.index===0}const N_=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B_(e,n="|"){let t=0;return e.map(r=>{t+=1;const o=t;let u=ga(r),s="";for(;u.length>0;){const c=N_.exec(u);if(!c){s+=u;break}s+=u.substring(0,c.index),u=u.substring(c.index+c[0].length),c[0][0]==="\\"&&c[1]?s+="\\"+String(Number(c[1])+o):(s+=c[0],c[0]==="("&&t++)}return s}).map(r=>`(${r})`).join(n)}const V_=/\b\B/,B6="[a-zA-Z]\\w*",n0="[a-zA-Z_]\\w*",t0="\\b\\d+(\\.\\d+)?",V6="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",W6="\\b(0b[01]+)",W_="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Z_=(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=H_(n,/.*\b/,e.binary,/\b.*/)),Ao({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(t,r)=>{t.index!==0&&r.ignoreMatch()}},e)},Ca={begin:"\\\\[\\s\\S]",relevance:0},U_={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ca]},z_={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ca]},Z6={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},cc=function(e,n,t={}){const r=Ao({className:"comment",begin:e,end:n,contains:[]},t);return r.contains.push(Z6),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},j_=cc("//","$"),G_=cc("/\\*","\\*/"),X_=cc("#","$"),Y_={className:"number",begin:t0,relevance:0},q_={className:"number",begin:V6,relevance:0},K_={className:"number",begin:W6,relevance:0},J_={className:"number",begin:t0+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},Q_={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[Ca,{begin:/\[/,end:/\]/,relevance:0,contains:[Ca]}]}]},R_={className:"title",begin:B6,relevance:0},ek={className:"title",begin:n0,relevance:0},lk={begin:"\\.\\s*"+n0,relevance:0};var dc=Object.freeze({__proto__:null,MATCH_NOTHING_RE:V_,IDENT_RE:B6,UNDERSCORE_IDENT_RE:n0,NUMBER_RE:t0,C_NUMBER_RE:V6,BINARY_NUMBER_RE:W6,RE_STARTERS_RE:W_,SHEBANG:Z_,BACKSLASH_ESCAPE:Ca,APOS_STRING_MODE:U_,QUOTE_STRING_MODE:z_,PHRASAL_WORDS_MODE:Z6,COMMENT:cc,C_LINE_COMMENT_MODE:j_,C_BLOCK_COMMENT_MODE:G_,HASH_COMMENT_MODE:X_,NUMBER_MODE:Y_,C_NUMBER_MODE:q_,BINARY_NUMBER_MODE:K_,CSS_NUMBER_MODE:J_,REGEXP_MODE:Q_,TITLE_MODE:R_,UNDERSCORE_TITLE_MODE:ek,METHOD_GUARD:lk,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(n,t)=>{t.data._beginMatch=n[1]},"on:end":(n,t)=>{t.data._beginMatch!==n[1]&&t.ignoreMatch()}})}});function nk(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function tk(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=nk,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function rk(e,n){Array.isArray(e.illegal)&&(e.illegal=A_(...e.illegal))}function ok(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ik(e,n){e.relevance===void 0&&(e.relevance=1)}const uk=["of","and","for","in","not","or","if","then","parent","list","value"],ak="keyword";function U6(e,n,t=ak){const r={};return typeof e=="string"?o(t,e.split(" ")):Array.isArray(e)?o(t,e):Object.keys(e).forEach(function(u){Object.assign(r,U6(e[u],n,u))}),r;function o(u,s){n&&(s=s.map(c=>c.toLowerCase())),s.forEach(function(c){const d=c.split("|");r[d[0]]=[u,sk(d[0],d[1])]})}}function sk(e,n){return n?Number(n):ck(e)?0:1}function ck(e){return uk.includes(e.toLowerCase())}function dk(e,{plugins:n}){function t(c,d){return new RegExp(ga(c),"m"+(e.case_insensitive?"i":"")+(d?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(d,g){g.position=this.position++,this.matchIndexes[this.matchAt]=g,this.regexes.push([g,d]),this.matchAt+=P_(d)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const d=this.regexes.map(g=>g[1]);this.matcherRe=t(B_(d),!0),this.lastIndex=0}exec(d){this.matcherRe.lastIndex=this.lastIndex;const g=this.matcherRe.exec(d);if(!g)return null;const b=g.findIndex((m,k)=>k>0&&m!==void 0),C=this.matchIndexes[b];return g.splice(0,b),Object.assign(g,C)}}class o{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(d){if(this.multiRegexes[d])return this.multiRegexes[d];const g=new r;return this.rules.slice(d).forEach(([b,C])=>g.addRule(b,C)),g.compile(),this.multiRegexes[d]=g,g}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(d,g){this.rules.push([d,g]),g.type==="begin"&&this.count++}exec(d){const g=this.getMatcher(this.regexIndex);g.lastIndex=this.lastIndex;let b=g.exec(d);if(this.resumingScanAtSamePosition()&&!(b&&b.index===this.lastIndex)){const C=this.getMatcher(0);C.lastIndex=this.lastIndex+1,b=C.exec(d)}return b&&(this.regexIndex+=b.position+1,this.regexIndex===this.count&&this.considerAll()),b}}function u(c){const d=new o;return c.contains.forEach(g=>d.addRule(g.begin,{rule:g,type:"begin"})),c.terminatorEnd&&d.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&d.addRule(c.illegal,{type:"illegal"}),d}function s(c,d){const g=c;if(c.isCompiled)return g;[ok].forEach(C=>C(c,d)),e.compilerExtensions.forEach(C=>C(c,d)),c.__beforeBegin=null,[tk,rk,ik].forEach(C=>C(c,d)),c.isCompiled=!0;let b=null;if(typeof c.keywords=="object"&&(b=c.keywords.$pattern,delete c.keywords.$pattern),c.keywords&&(c.keywords=U6(c.keywords,e.case_insensitive)),c.lexemes&&b)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return b=b||c.lexemes||/\w+/,g.keywordPatternRe=t(b,!0),d&&(c.begin||(c.begin=/\B|\b/),g.beginRe=t(c.begin),c.endSameAsBegin&&(c.end=c.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(g.endRe=t(c.end)),g.terminatorEnd=ga(c.end)||"",c.endsWithParent&&d.terminatorEnd&&(g.terminatorEnd+=(c.end?"|":"")+d.terminatorEnd)),c.illegal&&(g.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(C){return fk(C==="self"?c:C)})),c.contains.forEach(function(C){s(C,g)}),c.starts&&s(c.starts,d),g.matcher=u(g),g}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ao(e.classNameAliases||{}),s(e)}function z6(e){return e?e.endsWithParent||z6(e.starts):!1}function fk(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return Ao(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:z6(e)?Ao(e,{starts:e.starts?Ao(e.starts):null}):Object.isFrozen(e)?Ao(e):e}var hk="10.7.3";function pk(e){return!!(e||e==="")}function gk(e){const n={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,$i(this.code);let r={};return this.autoDetect?(r=e.highlightAuto(this.code),this.detectedLanguage=r.language):(r=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),r.value},autoDetect(){return!this.language||pk(this.autodetect)},ignoreIllegals(){return!0}},render(r){return r("pre",{},[r("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:n,VuePlugin:{install(r){r.component("highlightjs",n)}}}}const Ck={"after:highlightElement":({el:e,result:n,text:t})=>{const r=j6(e);if(!r.length)return;const o=document.createElement("div");o.innerHTML=n.value,n.value=vk(r,j6(o),t)}};function r0(e){return e.nodeName.toLowerCase()}function j6(e){const n=[];return function t(r,o){for(let u=r.firstChild;u;u=u.nextSibling)u.nodeType===3?o+=u.nodeValue.length:u.nodeType===1&&(n.push({event:"start",offset:o,node:u}),o=t(u,o),r0(u).match(/br|hr|img|input/)||n.push({event:"stop",offset:o,node:u}));return o}(e,0),n}function vk(e,n,t){let r=0,o="";const u=[];function s(){return!e.length||!n.length?e.length?e:n:e[0].offset!==n[0].offset?e[0].offset<n[0].offset?e:n:n[0].event==="start"?e:n}function c(b){function C(m){return" "+m.nodeName+'="'+$i(m.value)+'"'}o+="<"+r0(b)+[].map.call(b.attributes,C).join("")+">"}function d(b){o+="</"+r0(b)+">"}function g(b){(b.event==="start"?c:d)(b.node)}for(;e.length||n.length;){let b=s();if(o+=$i(t.substring(r,b[0].offset)),r=b[0].offset,b===e){u.reverse().forEach(d);do g(b.splice(0,1)[0]),b=s();while(b===e&&b.length&&b[0].offset===r);u.reverse().forEach(c)}else b[0].event==="start"?u.push(b[0].node):u.pop(),g(b.splice(0,1)[0])}return o+$i(t.substr(r))}const G6={},o0=e=>{console.error(e)},X6=(e,...n)=>{console.log(`WARN: ${e}`,...n)},Dt=(e,n)=>{G6[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),G6[`${e}/${n}`]=!0)},i0=$i,Y6=Ao,q6=Symbol("nomatch");var bk=function(e){const n=Object.create(null),t=Object.create(null),r=[];let o=!0;const u=/(^(<[^>]+>|\t|)+|\n)/gm,s="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let d={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:I_};function g(le){return d.noHighlightRe.test(le)}function b(le){let fe=le.className+" ";fe+=le.parentNode?le.parentNode.className:"";const we=d.languageDetectRe.exec(fe);if(we){const ye=ue(we[1]);return ye||(X6(s.replace("{}",we[1])),X6("Falling back to no-highlight mode for this block.",le)),ye?we[1]:"no-highlight"}return fe.split(/\s+/).find(ye=>g(ye)||ue(ye))}function C(le,fe,we,ye){let Be="",sl="";typeof fe=="object"?(Be=le,we=fe.ignoreIllegals,sl=fe.language,ye=void 0):(Dt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Dt("10.7.0",`Please use highlight(code, options) instead.
|
|
47
47
|
https://github.com/highlightjs/highlight.js/issues/2277`),sl=le,Be=fe);const Pe={code:Be,language:sl};be("before:highlight",Pe);const ll=Pe.result?Pe.result:m(Pe.language,Pe.code,we,ye);return ll.code=Pe.code,be("after:highlight",ll),ll}function m(le,fe,we,ye){function Be(Fe,Ie){const ze=dl.case_insensitive?Ie[0].toLowerCase():Ie[0];return Object.prototype.hasOwnProperty.call(Fe.keywords,ze)&&Fe.keywords[ze]}function sl(){if(!Ne.keywords){Ve.addText(vl);return}let Fe=0;Ne.keywordPatternRe.lastIndex=0;let Ie=Ne.keywordPatternRe.exec(vl),ze="";for(;Ie;){ze+=vl.substring(Fe,Ie.index);const Re=Be(Ne,Ie);if(Re){const[El,Mn]=Re;if(Ve.addText(ze),ze="",Nn+=Mn,El.startsWith("_"))ze+=Ie[0];else{const cn=dl.classNameAliases[El]||El;Ve.addKeyword(Ie[0],cn)}}else ze+=Ie[0];Fe=Ne.keywordPatternRe.lastIndex,Ie=Ne.keywordPatternRe.exec(vl)}ze+=vl.substr(Fe),Ve.addText(ze)}function Pe(){if(vl==="")return;let Fe=null;if(typeof Ne.subLanguage=="string"){if(!n[Ne.subLanguage]){Ve.addText(vl);return}Fe=m(Ne.subLanguage,vl,!0,gl[Ne.subLanguage]),gl[Ne.subLanguage]=Fe.top}else Fe=x(vl,Ne.subLanguage.length?Ne.subLanguage:null);Ne.relevance>0&&(Nn+=Fe.relevance),Ve.addSublanguage(Fe.emitter,Fe.language)}function ll(){Ne.subLanguage!=null?Pe():sl(),vl=""}function nl(Fe){return Fe.className&&Ve.openNode(dl.classNameAliases[Fe.className]||Fe.className),Ne=Object.create(Fe,{parent:{value:Ne}}),Ne}function fl(Fe,Ie,ze){let Re=O_(Fe.endRe,ze);if(Re){if(Fe["on:end"]){const El=new O6(Fe);Fe["on:end"](Ie,El),El.isMatchIgnored&&(Re=!1)}if(Re){for(;Fe.endsParent&&Fe.parent;)Fe=Fe.parent;return Fe}}if(Fe.endsWithParent)return fl(Fe.parent,Ie,ze)}function rl(Fe){return Ne.matcher.regexIndex===0?(vl+=Fe[0],1):(xn=!0,0)}function cl(Fe){const Ie=Fe[0],ze=Fe.rule,Re=new O6(ze),El=[ze.__beforeBegin,ze["on:begin"]];for(const Mn of El)if(Mn&&(Mn(Fe,Re),Re.isMatchIgnored))return rl(Ie);return ze&&ze.endSameAsBegin&&(ze.endRe=D_(Ie)),ze.skip?vl+=Ie:(ze.excludeBegin&&(vl+=Ie),ll(),!ze.returnBegin&&!ze.excludeBegin&&(vl=Ie)),nl(ze),ze.returnBegin?0:Ie.length}function _e(Fe){const Ie=Fe[0],ze=fe.substr(Fe.index),Re=fl(Ne,Fe,ze);if(!Re)return q6;const El=Ne;El.skip?vl+=Ie:(El.returnEnd||El.excludeEnd||(vl+=Ie),ll(),El.excludeEnd&&(vl=Ie));do Ne.className&&Ve.closeNode(),!Ne.skip&&!Ne.subLanguage&&(Nn+=Ne.relevance),Ne=Ne.parent;while(Ne!==Re.parent);return Re.starts&&(Re.endSameAsBegin&&(Re.starts.endRe=Re.endRe),nl(Re.starts)),El.returnEnd?0:Ie.length}function He(){const Fe=[];for(let Ie=Ne;Ie!==dl;Ie=Ie.parent)Ie.className&&Fe.unshift(Ie.className);Fe.forEach(Ie=>Ve.openNode(Ie))}let kl={};function qe(Fe,Ie){const ze=Ie&&Ie[0];if(vl+=Fe,ze==null)return ll(),0;if(kl.type==="begin"&&Ie.type==="end"&&kl.index===Ie.index&&ze===""){if(vl+=fe.slice(Ie.index,Ie.index+1),!o){const Re=new Error("0 width match regex");throw Re.languageName=le,Re.badRule=kl.rule,Re}return 1}if(kl=Ie,Ie.type==="begin")return cl(Ie);if(Ie.type==="illegal"&&!we){const Re=new Error('Illegal lexeme "'+ze+'" for mode "'+(Ne.className||"<unnamed>")+'"');throw Re.mode=Ne,Re}else if(Ie.type==="end"){const Re=_e(Ie);if(Re!==q6)return Re}if(Ie.type==="illegal"&&ze==="")return 1;if(Ml>1e5&&Ml>Ie.index*3)throw new Error("potential infinite loop, way more iterations than matches");return vl+=ze,ze.length}const dl=ue(le);if(!dl)throw o0(s.replace("{}",le)),new Error('Unknown language: "'+le+'"');const Cl=dk(dl,{plugins:r});let Vl="",Ne=ye||Cl;const gl={},Ve=new d.__emitter(d);He();let vl="",Nn=0,sn=0,Ml=0,xn=!1;try{for(Ne.matcher.considerAll();;){Ml++,xn?xn=!1:Ne.matcher.considerAll(),Ne.matcher.lastIndex=sn;const Fe=Ne.matcher.exec(fe);if(!Fe)break;const Ie=fe.substring(sn,Fe.index),ze=qe(Ie,Fe);sn=Fe.index+ze}return qe(fe.substr(sn)),Ve.closeAllNodes(),Ve.finalize(),Vl=Ve.toHTML(),{relevance:Math.floor(Nn),value:Vl,language:le,illegal:!1,emitter:Ve,top:Ne}}catch(Fe){if(Fe.message&&Fe.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:Fe.message,context:fe.slice(sn-100,sn+100),mode:Fe.mode},sofar:Vl,relevance:0,value:i0(fe),emitter:Ve};if(o)return{illegal:!1,relevance:0,value:i0(fe),emitter:Ve,language:le,top:Ne,errorRaised:Fe};throw Fe}}function k(le){const fe={relevance:0,emitter:new d.__emitter(d),value:i0(le),illegal:!1,top:c};return fe.emitter.addText(le),fe}function x(le,fe){fe=fe||d.languages||Object.keys(n);const we=k(le),ye=fe.filter(ue).filter(ae).map(nl=>m(nl,le,!1));ye.unshift(we);const Be=ye.sort((nl,fl)=>{if(nl.relevance!==fl.relevance)return fl.relevance-nl.relevance;if(nl.language&&fl.language){if(ue(nl.language).supersetOf===fl.language)return 1;if(ue(fl.language).supersetOf===nl.language)return-1}return 0}),[sl,Pe]=Be,ll=sl;return ll.second_best=Pe,ll}function _(le){return d.tabReplace||d.useBR?le.replace(u,fe=>fe===`
|
|
48
48
|
`?d.useBR?"<br>":fe:d.tabReplace?fe.replace(/\t/g,d.tabReplace):fe):le}function L(le,fe,we){const ye=fe?t[fe]:we;le.classList.add("hljs"),ye&&le.classList.add(ye)}const E={"before:highlightElement":({el:le})=>{d.useBR&&(le.innerHTML=le.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,`
|
|
49
|
-
`))},"after:highlightElement":({result:le})=>{d.useBR&&(le.value=le.value.replace(/\n/g,"<br>"))}},A=/^(<[^>]+>|\t)+/gm,I={"after:highlightElement":({result:le})=>{d.tabReplace&&(le.value=le.value.replace(A,fe=>fe.replace(/\t/g,d.tabReplace)))}};function O(le){let fe=null;const we=b(le);if(g(we))return;be("before:highlightElement",{el:le,language:we}),fe=le;const ye=fe.textContent,Be=we?C(ye,{language:we,ignoreIllegals:!0}):x(ye);be("after:highlightElement",{el:le,result:Be,text:ye}),le.innerHTML=Be.value,L(le,we,Be.language),le.result={language:Be.language,re:Be.relevance,relavance:Be.relevance},Be.second_best&&(le.second_best={language:Be.second_best.language,re:Be.second_best.relevance,relavance:Be.second_best.relevance})}function H(le){le.useBR&&(Dt("10.3.0","'useBR' will be removed entirely in v11.0"),Dt("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),d=Y6(d,le)}const D=()=>{if(D.called)return;D.called=!0,Dt("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(O)};function M(){Dt("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),V=!0}let V=!1;function U(){if(document.readyState==="loading"){V=!0;return}document.querySelectorAll("pre code").forEach(O)}function j(){V&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",j,!1);function G(le,fe){let we=null;try{we=fe(e)}catch(ye){if(o0("Language definition for '{}' could not be registered.".replace("{}",le)),o)o0(ye);else throw ye;we=c}we.name||(we.name=le),n[le]=we,we.rawDefinition=fe.bind(null,e),we.aliases&&ee(we.aliases,{languageName:le})}function q(le){delete n[le];for(const fe of Object.keys(t))t[fe]===le&&delete t[fe]}function Y(){return Object.keys(n)}function X(le){Dt("10.4.0","requireLanguage will be removed entirely in v11."),Dt("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const fe=ue(le);if(fe)return fe;throw new Error("The '{}' language is required, but not loaded.".replace("{}",le))}function ue(le){return le=(le||"").toLowerCase(),n[le]||n[t[le]]}function ee(le,{languageName:fe}){typeof le=="string"&&(le=[le]),le.forEach(we=>{t[we.toLowerCase()]=fe})}function ae(le){const fe=ue(le);return fe&&!fe.disableAutodetect}function de(le){le["before:highlightBlock"]&&!le["before:highlightElement"]&&(le["before:highlightElement"]=fe=>{le["before:highlightBlock"](Object.assign({block:fe.el},fe))}),le["after:highlightBlock"]&&!le["after:highlightElement"]&&(le["after:highlightElement"]=fe=>{le["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function re(le){de(le),r.push(le)}function be(le,fe){const we=le;r.forEach(function(ye){ye[we]&&ye[we](fe)})}function me(le){return Dt("10.2.0","fixMarkup will be removed entirely in v11.0"),Dt("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),_(le)}function Me(le){return Dt("10.7.0","highlightBlock will be removed entirely in v12.0"),Dt("10.7.0","Please use highlightElement now."),O(le)}Object.assign(e,{highlight:C,highlightAuto:x,highlightAll:U,fixMarkup:me,highlightElement:O,highlightBlock:Me,configure:H,initHighlighting:D,initHighlightingOnLoad:M,registerLanguage:G,unregisterLanguage:q,listLanguages:Y,getLanguage:ue,registerAliases:ee,requireLanguage:X,autoDetection:ae,inherit:Y6,addPlugin:re,vuePlugin:gk(e).VuePlugin}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=hk;for(const le in dc)typeof dc[le]=="object"&&P6(dc[le]);return Object.assign(e,dc),e.addPlugin(E),e.addPlugin(Ck),e.addPlugin(I),e}({}),mk=bk,K6={exports:{}};(function(e){(function(){var n;n=e.exports=o,n.format=o,n.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(n.printf=t);function t(){console.log(o.apply(null,arguments))}function r(u,s){return o.apply(null,[u].concat(s))}function o(u){for(var s=1,c=[].slice.call(arguments),d=0,g=u.length,b="",C,m=!1,k,x,_=!1,L,E=function(){return c[s++]},A=function(){for(var I="";/\d/.test(u[d]);)I+=u[d++],C=u[d];return I.length>0?parseInt(I):null};d<g;++d)if(C=u[d],m)switch(m=!1,C=="."?(_=!1,C=u[++d]):C=="0"&&u[d+1]=="."?(_=!0,d+=2,C=u[d]):_=!0,L=A(),C){case"b":b+=parseInt(E(),10).toString(2);break;case"c":k=E(),typeof k=="string"||k instanceof String?b+=k:b+=String.fromCharCode(parseInt(k,10));break;case"d":b+=parseInt(E(),10);break;case"f":x=String(parseFloat(E()).toFixed(L||6)),b+=_?x:x.replace(/^0/,"");break;case"j":b+=JSON.stringify(E());break;case"o":b+="0"+parseInt(E(),10).toString(8);break;case"s":b+=E();break;case"x":b+="0x"+parseInt(E(),10).toString(16);break;case"X":b+="0x"+parseInt(E(),10).toString(16).toUpperCase();break;default:b+=C;break}else C==="%"?m=!0:b+=C;return b}})()})(K6);var wk=K6.exports,yk=wk,Po=Oo(Error),Sk=Po;Po.eval=Oo(EvalError),Po.range=Oo(RangeError),Po.reference=Oo(ReferenceError),Po.syntax=Oo(SyntaxError),Po.type=Oo(TypeError),Po.uri=Oo(URIError),Po.create=Oo;function Oo(e){return n.displayName=e.displayName||e.name,n;function n(t){return t&&(t=yk.apply(null,arguments)),new e(t)}}var Ir=mk,fc=Sk;x1.highlight=J6,x1.highlightAuto=kk,x1.registerLanguage=Lk,x1.listLanguages=xk,x1.registerAlias=Mk,ro.prototype.addText=$k,ro.prototype.addKeyword=Ek,ro.prototype.addSublanguage=Fk,ro.prototype.openNode=Tk,ro.prototype.closeNode=Ik,ro.prototype.closeAllNodes=Q6,ro.prototype.finalize=Q6,ro.prototype.toHTML=Dk;var _k="hljs-";function J6(e,n,t){var r=Ir.configure({}),o=t||{},u=o.prefix,s;if(typeof e!="string")throw fc("Expected `string` for name, got `%s`",e);if(!Ir.getLanguage(e))throw fc("Unknown language: `%s` is not registered",e);if(typeof n!="string")throw fc("Expected `string` for value, got `%s`",n);if(u==null&&(u=_k),Ir.configure({__emitter:ro,classPrefix:u}),s=Ir.highlight(n,{language:e,ignoreIllegals:!0}),Ir.configure(r||{}),s.errorRaised)throw s.errorRaised;return{relevance:s.relevance,language:s.language,value:s.emitter.rootNode.children}}function kk(e,n){var t=n||{},r=t.subset||Ir.listLanguages();t.prefix;var o=r.length,u=-1,s,c,d,g;if(typeof e!="string")throw fc("Expected `string` for value, got `%s`",e);for(c={relevance:0,language:null,value:[]},s={relevance:0,language:null,value:[]};++u<o;)g=r[u],Ir.getLanguage(g)&&(d=J6(g,e,n),d.language=g,d.relevance>c.relevance&&(c=d),d.relevance>s.relevance&&(c=s,s=d));return c.language&&(s.secondBest=c),s}function Lk(e,n){Ir.registerLanguage(e,n)}function xk(){return Ir.listLanguages()}function Mk(e,n){var t=e,r;n&&(t={},t[e]=n);for(r in t)Ir.registerAliases(t[r],{languageName:r})}function ro(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function Ek(e,n){this.openNode(n),this.addText(e),this.closeNode()}function Fk(e,n){var t=this.stack,r=t[t.length-1],o=e.rootNode.children,u=n?{type:"element",tagName:"span",properties:{className:[n]},children:o}:o;r.children=r.children.concat(u)}function $k(e){var n=this.stack,t,r;e!==""&&(t=n[n.length-1],r=t.children[t.children.length-1],r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e}))}function Tk(e){var n=this.stack,t=this.options.classPrefix+e,r=n[n.length-1],o={type:"element",tagName:"span",properties:{className:[t]},children:[]};r.children.push(o),n.push(o)}function Ik(){this.stack.pop()}function Dk(){return""}function Q6(){}var u0,R6;function Hk(){if(R6)return u0;R6=1;function e(r){return r?typeof r=="string"?r:r.source:null}function n(...r){return r.map(u=>e(u)).join("")}function t(r){const o={},u={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[o]}]};Object.assign(o,{className:"variable",variants:[{begin:n(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},u]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[r.BACKSLASH_ESCAPE]},c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[r.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,o,s]};s.contains.push(d);const g={className:"",begin:/\\"/},b={className:"string",begin:/'/,end:/'/},C={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},r.NUMBER_MODE,o]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],k=r.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),x={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[r.inherit(r.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"},contains:[k,r.SHEBANG(),x,C,r.HASH_COMMENT_MODE,c,d,g,b,o]}}return u0=t,u0}var a0,e8;function Ak(){if(e8)return a0;e8=1;function e(n){const t={literal:"true false null"},r=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],o=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],u={end:",",endsWithParent:!0,excludeEnd:!0,contains:o,keywords:t},s={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(u,{begin:/:/})].concat(r),illegal:"\\S"},c={begin:"\\[",end:"\\]",contains:[n.inherit(u)],illegal:"\\S"};return o.push(s,c),r.forEach(function(d){o.push(d)}),{name:"JSON",contains:o,keywords:t,illegal:"\\S"}}return a0=e,a0}var s0,l8;function Pk(){if(l8)return s0;l8=1;function e(o){return o?typeof o=="string"?o:o.source:null}function n(...o){return o.map(s=>e(s)).join("")}function t(...o){return"("+o.map(s=>e(s)).join("|")+")"}function r(o){const u=o.COMMENT("--","$"),s={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},c={begin:/"/,end:/"/,contains:[{begin:/""/}]},d=["true","false","unknown"],g=["double precision","large object","with timezone","without timezone"],b=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],C=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],k=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],_=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],L=k,E=[...m,...C].filter(D=>!k.includes(D)),A={className:"variable",begin:/@[a-z0-9]+/},I={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},O={begin:n(/\b/,t(...L),/\s*\(/),keywords:{built_in:L}};function H(D,{exceptions:M,when:V}={}){const U=V;return M=M||[],D.map(j=>j.match(/\|\d+$/)||M.includes(j)?j:U(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:H(E,{when:D=>D.length<3}),literal:d,type:b,built_in:x},contains:[{begin:t(..._),keywords:{$pattern:/[\w\.]+/,keyword:E.concat(_),literal:d,type:b}},{className:"type",begin:t(...g)},O,A,s,c,o.C_NUMBER_MODE,o.C_BLOCK_COMMENT_MODE,u,I]}}return s0=r,s0}var c0,n8;function Ok(){if(n8)return c0;n8=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],t=["true","false","null","undefined","NaN","Infinity"],r=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],o=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],u=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(u,s,r,o);function d(k){return k?typeof k=="string"?k:k.source:null}function g(k){return b("(?=",k,")")}function b(...k){return k.map(_=>d(_)).join("")}function C(k){const x=(ae,{after:de})=>{const re="</"+ae[0].slice(1);return ae.input.indexOf(re,de)!==-1},_=e,L={begin:"<>",end:"</>"},E={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,de)=>{const re=ae[0].length+ae.index,be=ae.input[re];if(be==="<"){de.ignoreMatch();return}be===">"&&(x(ae,{after:re})||de.ignoreMatch())}},A={$pattern:e,keyword:n,literal:t,built_in:c},I="[0-9](_?[0-9])*",O=`\\.(${I})`,H="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",D={className:"number",variants:[{begin:`(\\b(${H})((${O})|\\.)?|(${O}))[eE][+-]?(${I})\\b`},{begin:`\\b(${H})\\b((${O})\\b|\\.)?|(${O})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},M={className:"subst",begin:"\\$\\{",end:"\\}",keywords:A,contains:[]},V={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[k.BACKSLASH_ESCAPE,M],subLanguage:"xml"}},U={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[k.BACKSLASH_ESCAPE,M],subLanguage:"css"}},j={className:"string",begin:"`",end:"`",contains:[k.BACKSLASH_ESCAPE,M]},q={className:"comment",variants:[k.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:_+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),k.C_BLOCK_COMMENT_MODE,k.C_LINE_COMMENT_MODE]},Y=[k.APOS_STRING_MODE,k.QUOTE_STRING_MODE,V,U,j,D,k.REGEXP_MODE];M.contains=Y.concat({begin:/\{/,end:/\}/,keywords:A,contains:["self"].concat(Y)});const X=[].concat(q,M.contains),ue=X.concat([{begin:/\(/,end:/\)/,keywords:A,contains:["self"].concat(X)}]),ee={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:ue};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:A,exports:{PARAMS_CONTAINS:ue},illegal:/#(?![$_A-z])/,contains:[k.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},k.APOS_STRING_MODE,k.QUOTE_STRING_MODE,V,U,j,q,D,{begin:b(/[{,\n]\s*/,g(b(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,_+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:_+g("\\s*:"),relevance:0}]},{begin:"("+k.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[q,k.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+k.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:k.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:ue}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:L.begin,end:L.end},{begin:E.begin,"on:begin":E.isTrulyOpeningTag,end:E.end}],subLanguage:"xml",contains:[{begin:E.begin,end:E.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:A,contains:["self",k.inherit(k.TITLE_MODE,{begin:_}),ee],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:k.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[ee,k.inherit(k.TITLE_MODE,{begin:_})]},{variants:[{begin:"\\."+_},{begin:"\\$"+_}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},k.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[k.inherit(k.TITLE_MODE,{begin:_}),"self",ee]},{begin:"(get|set)\\s+(?="+_+"\\()",end:/\{/,keywords:"get set",contains:[k.inherit(k.TITLE_MODE,{begin:_}),{begin:/\(\)/},ee]},{begin:/\$[(.]/}]}}function m(k){const x=e,_={beginKeywords:"namespace",end:/\{/,excludeEnd:!0},L={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},E={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},A=["any","void","number","boolean","string","object","never","enum"],I=["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"],O={$pattern:e,keyword:n.concat(I),literal:t,built_in:c.concat(A)},H={className:"meta",begin:"@"+x},D=(U,j,G)=>{const q=U.contains.findIndex(Y=>Y.label===j);if(q===-1)throw new Error("can not find mode to replace");U.contains.splice(q,1,G)},M=C(k);Object.assign(M.keywords,O),M.exports.PARAMS_CONTAINS.push(H),M.contains=M.contains.concat([H,_,L]),D(M,"shebang",k.SHEBANG()),D(M,"use_strict",E);const V=M.contains.find(U=>U.className==="function");return V.relevance=0,Object.assign(M,{name:"TypeScript",aliases:["ts","tsx"]}),M}return c0=m,c0}function d0(e,n){return d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},d0(e,n)}function t8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ti=E_(x1,{});Ti.registerLanguage=x1.registerLanguage;const Nk=e=>{const{resolvedTheme:n}=Pa(),t=e??(n==="dark"?"dark":"light");return{hljs:{display:"block",overflowX:"auto",padding:"var(--click-code-block-space-all) var(--click-code-block-space-all)",color:"var(--click-codeblock-color-text-default)",background:"var(--click-codeblock-color-background-default)",borderRadius:"var(--click-codeblock-radii-all)",font:"var(--click-codeblock-typography-text-default)"},"hljs-comment":{color:t==="dark"?"#999999":"#656e77"},"hljs-keyword":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-tag":{color:t==="dark"?"#88aece":"#015692"},"hljs-meta-keyword":{color:t==="dark"?"#88aece":"#015692"},"hljs-doctag":{color:t==="dark"?"#88aece":"#015692"},"hljs-section":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-class":{color:t==="dark"?"#88aece":"#015692"},"hljs-meta":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-pseudo":{color:t==="dark"?"#88aece":"#015692"},"hljs-attr":{color:t==="dark"?"#88aece":"#015692"},"hljs-attribute":{color:t==="dark"?"#c59bc1":"#803378"},"hljs-name":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-type":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-number":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-selector-id":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-quote":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-template-tag":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-built_in":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-title":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-literal":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-string":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-regexp":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-symbol":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-variable":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-template-variable":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-link":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-selector-attr":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-meta-string":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-bullet":{color:t==="dark"?"#cccccc":"#535a60"},"hljs-code":{color:t==="dark"?"#cccccc":"#535a60"},"hljs-deletion":{color:t==="dark"?"#de7176":"#c02d2e"},"hljs-addition":{color:t==="dark"?"#76c490":"#2f6f44"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},or={cuiCodeBlockContainer:"_cuiCodeBlockContainer_1a3fj_1",linenumber:"_linenumber_1a3fj_9",cuiLightMode:"_cuiLightMode_1a3fj_12",cuiDarkMode:"_cuiDarkMode_1a3fj_15",cuiCodeButton:"_cuiCodeButton_1a3fj_19",cuiCopied:"_cuiCopied_1a3fj_23",cuiError:"_cuiError_1a3fj_26",cuiNormal:"_cuiNormal_1a3fj_29",cuiHighlighter:"_cuiHighlighter_1a3fj_33",cuiCodeContent:"_cuiCodeContent_1a3fj_39",cuiButtonContainer:"_cuiButtonContainer_1a3fj_44"};var r8={},o8={exports:{}};(function(e){function n(t){return t&&t.__esModule?t:{default:t}}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(o8);var hc=o8.exports;(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Pk()),r=t.default;e.default=r})(r8);const Bk=rr(r8);var i8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Hk()),r=t.default;e.default=r})(i8);const Vk=rr(i8);var u8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ak()),r=t.default;e.default=r})(u8);const Wk=rr(u8);var a8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ok()),r=t.default;e.default=r})(a8);const Zk=rr(a8);Ti.registerLanguage("sql",Bk),Ti.registerLanguage("bash",Vk),Ti.registerLanguage("json",Wk),Ti.registerLanguage("tsx",Zk);const s8=({children:e,language:n,theme:t,showLineNumbers:r,showWrapButton:o=!1,wrapLines:u=!1,onCopy:s,onCopyError:c,className:d,...g})=>{const[b,C]=p.useState(!1),[m,k]=p.useState(!1),[x,_]=p.useState(u),L=t??"light",E=Nk(L),A=D=>or[`cui${D.charAt(0).toUpperCase()+D.slice(1)}Mode`],I=async()=>{try{await navigator.clipboard.writeText(e),typeof s=="function"&&s(e),C(!0),setTimeout(()=>C(!1),2e3)}catch(D){let M="Unable to copy code";D instanceof Error&&(M=D.message),k(!0),typeof c=="function"&&c(M),setTimeout(()=>k(!1),2e3)}},O=()=>{_(D=>!D)},H=D=>l.jsx("code",{...D,className:or.cuiCodeContent});return l.jsxs("div",{className:Q(or.cuiCodeBlockContainer,A(L),d),...g,children:[l.jsxs("div",{className:or.cuiButtonContainer,children:[o&&l.jsx(Fs,{className:Q(or.cuiCodeButton,or.cuiNormal),onClick:O,children:l.jsx(kn,{icon:"document"})}),l.jsx(Fs,{className:Q(or.cuiCodeButton,{[or.cuiCopied]:b,[or.cuiError]:m,[or.cuiNormal]:!b&&!m}),onClick:I,children:l.jsx(kn,{icon:b?"check":m?"warning":"copy"})})]}),l.jsx(Ti,{language:n,style:E,CodeTag:H,className:or.cuiHighlighter,renderer:({rows:D,stylesheet:M,useInlineStyles:V})=>D.map((U,j)=>{const G=U.children,q=G==null?void 0:G.shift();return q&&(U.children=[q,{children:G,properties:{className:[]},tagName:"span",type:"element"}]),R3({node:U,stylesheet:M,useInlineStyles:V,key:j})}),showLineNumbers:r,wrapLines:x||u,wrapLongLines:x||u,children:e})]})},c8={cuiLabelContainer:"_cuiLabelContainer_l67lt_1",cuiEllipsisContainer:"_cuiEllipsisContainer_l67lt_14"},d8=({icon:e,iconDir:n="start",children:t})=>l.jsxs("span",{className:c8.cuiLabelContainer,children:[e&&n==="start"&&l.jsx(Te,{name:e,size:"sm"}),l.jsx("span",{className:c8.cuiEllipsisContainer,children:t}),e&&n==="end"&&l.jsx(Te,{name:e,size:"sm"})]}),No={cuiCollapsibleContainer:"_cuiCollapsibleContainer_hn4f9_1",cuiHeaderContainer:"_cuiHeaderContainer_hn4f9_15",cuiIndicatorStart:"_cuiIndicatorStart_hn4f9_18",cuiIndicatorEnd:"_cuiIndicatorEnd_hn4f9_21",cuiTriggerButton:"_cuiTriggerButton_hn4f9_25",cuiContentWrapper:"_cuiContentWrapper_hn4f9_36"},pc=p.createContext({open:!1,onOpenChange:()=>null}),ir=({open:e,onOpenChange:n,children:t,...r})=>{const[o,u]=p.useState(e??!1),s=()=>{u(d=>(typeof n=="function"&&n(!d),!d))};p.useEffect(()=>{u(d=>e??d)},[e]);const c={open:e??o,onOpenChange:s};return l.jsx("div",{className:No.cuiCollapsibleContainer,...r,children:l.jsx(pc.Provider,{value:c,children:t})})},f8=p.forwardRef(({indicatorDir:e="start",icon:n,iconDir:t,children:r,wrapInTrigger:o,onClick:u,...s},c)=>{const{onOpenChange:d}=p.useContext(pc);return l.jsxs("div",{ref:c,onClick:g=>{o&&typeof d=="function"&&d(),typeof u=="function"&&u(g)},"data-collapsible-header":!0,className:Q(No.cuiHeaderContainer,{[No.cuiIndicatorStart]:e==="start",[No.cuiIndicatorEnd]:e==="end"}),...s,children:[e==="start"&&l.jsx(ir.Trigger,{}),r&&l.jsx(d8,{icon:n,iconDir:t,children:r}),e==="end"&&l.jsx(ir.Trigger,{})]})});f8.displayName="CollapsibleHeader",ir.Header=f8;const h8=({onClick:e,children:n,indicatorDir:t="start",icon:r,iconDir:o="start",...u})=>{const{open:s,onOpenChange:c}=p.useContext(pc),d=g=>{g.preventDefault(),g.stopPropagation(),e&&e(g),c()};return l.jsxs(Fs,{onClick:d,"aria-label":"trigger children",className:No.cuiTriggerButton,...u,children:[t==="start"&&l.jsx(Te,{"data-trigger-icon":!0,name:"chevron-right","data-open":s.toString(),size:"sm"}),n&&l.jsx(d8,{icon:r,iconDir:o,children:n}),t==="end"&&l.jsx(Te,{"data-trigger-icon":!0,name:"chevron-right","data-open":s.toString(),size:"sm"})]})};h8.displayName="CollapsibleTrigger",ir.Trigger=h8;const p8=({indicatorDir:e,...n})=>{const{open:t}=p.useContext(pc);if(t)return l.jsx("div",{className:Q(No.cuiContentWrapper,{[No.cuiIndicatorStart]:e==="start",[No.cuiIndicatorEnd]:e==="end"}),...n})};p8.displayName="CollapsibleContent",ir.Content=p8;const g8={cuiActionsWrapper:"_cuiActionsWrapper_6pc4q_1",cuiDialogContent:"_cuiDialogContent_6pc4q_12"},Uk=({children:e,disabled:n,loading:t,message:r,onCancel:o,onConfirm:u,open:s,primaryActionLabel:c="Confirm",primaryActionType:d="primary",secondaryActionLabel:g="Cancel",showClose:b,title:C,...m})=>{if(e&&r)throw new Error("You can't pass children and message props at the same time");return l.jsx(Bo,{open:s,onOpenChange:k=>{!k&&o&&o()},children:l.jsxs(Bo.Content,{...m,className:Q(g8.cuiDialogContent,m.className),title:C,showClose:b,children:[l.jsx(xl,{overflow:"auto",grow:"1",orientation:"vertical",children:e||l.jsx(_l,{children:r})}),l.jsx(Uo,{size:"xl"}),l.jsxs("div",{className:g8.cuiActionsWrapper,children:[l.jsx(Bo.Close,{label:g,"data-testid":"cancel-action-button"}),l.jsx(Bo.Close,{loading:!!t,disabled:!!n||!!t,type:d,label:c,autoFocus:s,onClick:()=>{u&&u()},"data-testid":"confirm-action-button"})]})]})})},C8="ContextMenu",[zk,oO]=dn(C8,[nc]),Dr=nc(),[jk,v8]=zk(C8),Gk=e=>{const{__scopeContextMenu:n,children:t,onOpenChange:r,dir:o,modal:u=!0}=e,[s,c]=p.useState(!1),d=Dr(n),g=Sn(r),b=p.useCallback(C=>{c(C),g(C)},[g]);return p.createElement(jk,{scope:n,open:s,onOpenChange:b,modal:u},p.createElement(B7,ie({},d,{dir:o,open:s,onOpenChange:b,modal:u}),t))},Xk="ContextMenuTrigger",Yk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,disabled:r=!1,...o}=e,u=v8(Xk,t),s=Dr(t),c=p.useRef({x:0,y:0}),d=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),g=p.useRef(0),b=p.useCallback(()=>window.clearTimeout(g.current),[]),C=m=>{c.current={x:m.clientX,y:m.clientY},u.onOpenChange(!0)};return p.useEffect(()=>b,[b]),p.useEffect(()=>void(r&&b()),[r,b]),p.createElement(p.Fragment,null,p.createElement(V7,ie({},s,{virtualRef:d})),p.createElement(Ye.span,ie({"data-state":u.open?"open":"closed","data-disabled":r?"":void 0},o,{ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:ke(e.onContextMenu,m=>{b(),C(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:ke(e.onPointerDown,gc(m=>{b(),g.current=window.setTimeout(()=>C(m),700)})),onPointerMove:r?e.onPointerMove:ke(e.onPointerMove,gc(b)),onPointerCancel:r?e.onPointerCancel:ke(e.onPointerCancel,gc(b)),onPointerUp:r?e.onPointerUp:ke(e.onPointerUp,gc(b))})))}),qk=e=>{const{__scopeContextMenu:n,...t}=e,r=Dr(n);return p.createElement(W7,ie({},r,t))},Kk="ContextMenuContent",Jk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=v8(Kk,t),u=Dr(t),s=p.useRef(!1);return p.createElement(Z7,ie({},u,r,{ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var d;(d=e.onCloseAutoFocus)===null||d===void 0||d.call(e,c),!c.defaultPrevented&&s.current&&c.preventDefault(),s.current=!1},onInteractOutside:c=>{var d;(d=e.onInteractOutside)===null||d===void 0||d.call(e,c),!c.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Qk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(U7,ie({},o,r,{ref:n}))}),Rk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(z7,ie({},o,r,{ref:n}))}),eL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(j7,ie({},o,r,{ref:n}))}),lL=e=>{const{__scopeContextMenu:n,children:t,onOpenChange:r,open:o,defaultOpen:u}=e,s=Dr(n),[c,d]=Hn({prop:o,defaultProp:u,onChange:r});return p.createElement(G7,ie({},s,{open:c,onOpenChange:d}),t)},nL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(X7,ie({},o,r,{ref:n}))}),tL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(Y7,ie({},o,r,{ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))});function gc(e){return n=>n.pointerType!=="mouse"?e(n):void 0}const rL=Gk,oL=Yk,iL=qk,uL=Jk,aL=Qk,sL=Rk,cL=eL,dL=lL,fL=nL,hL=tL,oo={cuiRightMenuContent:"_cuiRightMenuContent_rhffw_1",cuiShowArrow:"_cuiShowArrow_rhffw_5",cuiPopoverArrow:"_cuiPopoverArrow_rhffw_14",cuiRightMenuGroup:"_cuiRightMenuGroup_rhffw_24",cuiRightMenuSub:"_cuiRightMenuSub_rhffw_29"},ur=e=>l.jsx(rL,{...e}),b8=p.forwardRef(({disabled:e,...n},t)=>l.jsx(oL,{asChild:!0,disabled:e,children:l.jsx("div",{ref:t,...n})}));b8.displayName="ContextMenuTrigger",ur.Trigger=b8;const m8=({icon:e,iconDir:n,children:t,...r})=>l.jsxs(fL,{className:oo.cuiGenericMenuItem,...r,children:[l.jsx(rt,{icon:e,iconDir:n,children:t}),l.jsx("div",{className:"dropdown-arrow",children:l.jsx(Te,{name:"chevron-right"})})]});m8.displayName="ContextMenuSubTrigger",ur.SubTrigger=m8;const w8=({sub:e,children:n,showArrow:t,...r})=>{const o=e?hL:uL;return l.jsx(iL,{children:l.jsxs(o,{className:Q(oo.cuiGenericMenuPanel,oo.cuiContextMenu,oo.cuiRightMenuContent,{[oo.cuiShowArrow]:t}),...r,children:[t&&l.jsx(cL,{className:oo.cuiArrow,width:20,height:10}),n]})})};w8.displayName="ContextMenuContent",ur.Content=w8;const y8=e=>l.jsx(aL,{className:oo.cuiRightMenuGroup,...e});y8.displayName="ContextMenuGroup",ur.Group=y8;const S8=({...e})=>l.jsx(dL,{className:oo.cuiRightMenuSub,...e});S8.displayName="ContextMenuSub",ur.Sub=S8;const _8=({icon:e,iconDir:n,children:t,...r})=>l.jsx(sL,{className:oo.cuiGenericMenuItem,...r,children:l.jsx(rt,{icon:e,iconDir:n,children:t})});_8.displayName="ContextMenuItem",ur.Item=_8;var k8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r){var o=r.prototype,u=o.format;o.format=function(s){var c=this,d=this.$locale();if(!this.isValid())return u.bind(this)(s);var g=this.$utils(),b=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(C){switch(C){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return d.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return d.ordinal(c.week(),"W");case"w":case"ww":return g.s(c.week(),C==="w"?1:2,"0");case"W":case"WW":return g.s(c.isoWeek(),C==="W"?1:2,"0");case"k":case"kk":return g.s(String(c.$H===0?24:c.$H),C==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return C}});return u.bind(this)(b)}}})})(k8);var pL=k8.exports;const gL=rr(pL);var L8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t,r,o=1e3,u=6e4,s=36e5,c=864e5,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g=31536e6,b=2628e6,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:g,months:b,days:c,hours:s,minutes:u,seconds:o,milliseconds:1,weeks:6048e5},k=function(D){return D instanceof O},x=function(D,M,V){return new O(D,V,M.$l)},_=function(D){return r.p(D)+"s"},L=function(D){return D<0},E=function(D){return L(D)?Math.ceil(D):Math.floor(D)},A=function(D){return Math.abs(D)},I=function(D,M){return D?L(D)?{negative:!0,format:""+A(D)+M}:{negative:!1,format:""+D+M}:{negative:!1,format:""}},O=function(){function D(V,U,j){var G=this;if(this.$d={},this.$l=j,V===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return x(V*m[_(U)],this);if(typeof V=="number")return this.$ms=V,this.parseFromMilliseconds(),this;if(typeof V=="object")return Object.keys(V).forEach(function(X){G.$d[_(X)]=V[X]}),this.calMilliseconds(),this;if(typeof V=="string"){var q=V.match(C);if(q){var Y=q.slice(2).map(function(X){return X!=null?Number(X):0});return this.$d.years=Y[0],this.$d.months=Y[1],this.$d.weeks=Y[2],this.$d.days=Y[3],this.$d.hours=Y[4],this.$d.minutes=Y[5],this.$d.seconds=Y[6],this.calMilliseconds(),this}}return this}var M=D.prototype;return M.calMilliseconds=function(){var V=this;this.$ms=Object.keys(this.$d).reduce(function(U,j){return U+(V.$d[j]||0)*m[j]},0)},M.parseFromMilliseconds=function(){var V=this.$ms;this.$d.years=E(V/g),V%=g,this.$d.months=E(V/b),V%=b,this.$d.days=E(V/c),V%=c,this.$d.hours=E(V/s),V%=s,this.$d.minutes=E(V/u),V%=u,this.$d.seconds=E(V/o),V%=o,this.$d.milliseconds=V},M.toISOString=function(){var V=I(this.$d.years,"Y"),U=I(this.$d.months,"M"),j=+this.$d.days||0;this.$d.weeks&&(j+=7*this.$d.weeks);var G=I(j,"D"),q=I(this.$d.hours,"H"),Y=I(this.$d.minutes,"M"),X=this.$d.seconds||0;this.$d.milliseconds&&(X+=this.$d.milliseconds/1e3,X=Math.round(1e3*X)/1e3);var ue=I(X,"S"),ee=V.negative||U.negative||G.negative||q.negative||Y.negative||ue.negative,ae=q.format||Y.format||ue.format?"T":"",de=(ee?"-":"")+"P"+V.format+U.format+G.format+ae+q.format+Y.format+ue.format;return de==="P"||de==="-P"?"P0D":de},M.toJSON=function(){return this.toISOString()},M.format=function(V){var U=V||"YYYY-MM-DDTHH:mm:ss",j={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(d,function(G,q){return q||String(j[G])})},M.as=function(V){return this.$ms/m[_(V)]},M.get=function(V){var U=this.$ms,j=_(V);return j==="milliseconds"?U%=1e3:U=j==="weeks"?E(U/m[j]):this.$d[j],U||0},M.add=function(V,U,j){var G;return G=U?V*m[_(U)]:k(V)?V.$ms:x(V,this).$ms,x(this.$ms+G*(j?-1:1),this)},M.subtract=function(V,U){return this.add(V,U,!0)},M.locale=function(V){var U=this.clone();return U.$l=V,U},M.clone=function(){return x(this.$ms,this)},M.humanize=function(V){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!V)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},D}(),H=function(D,M,V){return D.add(M.years()*V,"y").add(M.months()*V,"M").add(M.days()*V,"d").add(M.hours()*V,"h").add(M.minutes()*V,"m").add(M.seconds()*V,"s").add(M.milliseconds()*V,"ms")};return function(D,M,V){t=V,r=V().$utils(),V.duration=function(G,q){var Y=V.locale();return x(G,{$l:Y},q)},V.isDuration=k;var U=M.prototype.add,j=M.prototype.subtract;M.prototype.add=function(G,q){return k(G)?H(this,G,1):U.bind(this)(G,q)},M.prototype.subtract=function(G,q){return k(G)?H(this,G,-1):j.bind(this)(G,q)}}})})(L8);var CL=L8.exports;const vL=rr(CL);var x8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,u){var s=o.prototype,c=s.format;u.en.formats=t,s.format=function(d){d===void 0&&(d="YYYY-MM-DDTHH:mm:ssZ");var g=this.$locale().formats,b=function(C,m){return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,x,_){var L=_&&_.toUpperCase();return x||m[_]||t[_]||m[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(E,A,I){return A||I.slice(1)})})}(d,g===void 0?{}:g);return c.call(this,b)}}})})(x8);var bL=x8.exports;const mL=rr(bL);var M8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r,o){t=t||{};var u=r.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(g,b,C,m){return u.fromToBase(g,b,C,m)}o.en.relativeTime=s,u.fromToBase=function(g,b,C,m,k){for(var x,_,L,E=C.$locale().relativeTime||s,A=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],I=A.length,O=0;O<I;O+=1){var H=A[O];H.d&&(x=m?o(g).diff(C,H.d,!0):C.diff(g,H.d,!0));var D=(t.rounding||Math.round)(Math.abs(x));if(L=x>0,D<=H.r||!H.r){D<=1&&O>0&&(H=A[O-1]);var M=E[H.l];k&&(D=k(""+D)),_=typeof M=="string"?M.replace("%d",D):M(D,b,H.l,L);break}}if(b)return _;var V=L?E.future:E.past;return typeof V=="function"?V(_):V.replace("%s",_)},u.to=function(g,b){return c(g,b,this,!0)},u.from=function(g,b){return c(g,b,this)};var d=function(g){return g.$u?o.utc():o()};u.toNow=function(g){return this.to(d(this),g)},u.fromNow=function(g){return this.from(d(this),g)}}})})(M8);var wL=M8.exports;const yL=rr(wL);var E8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(o,u,s){var c,d=function(m,k,x){x===void 0&&(x={});var _=new Date(m),L=function(E,A){A===void 0&&(A={});var I=A.timeZoneName||"short",O=E+"|"+I,H=r[O];return H||(H=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:E,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:I}),r[O]=H),H}(k,x);return L.formatToParts(_)},g=function(m,k){for(var x=d(m,k),_=[],L=0;L<x.length;L+=1){var E=x[L],A=E.type,I=E.value,O=t[A];O>=0&&(_[O]=parseInt(I,10))}var H=_[3],D=H===24?0:H,M=_[0]+"-"+_[1]+"-"+_[2]+" "+D+":"+_[4]+":"+_[5]+":000",V=+m;return(s.utc(M).valueOf()-(V-=V%1e3))/6e4},b=u.prototype;b.tz=function(m,k){m===void 0&&(m=c);var x,_=this.utcOffset(),L=this.toDate(),E=L.toLocaleString("en-US",{timeZone:m}),A=Math.round((L-new Date(E))/1e3/60),I=15*-Math.round(L.getTimezoneOffset()/15)-A;if(!Number(I))x=this.utcOffset(0,k);else if(x=s(E,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),k){var O=x.utcOffset();x=x.add(_-O,"minute")}return x.$x.$timezone=m,x},b.offsetName=function(m){var k=this.$x.$timezone||s.tz.guess(),x=d(this.valueOf(),k,{timeZoneName:m}).find(function(_){return _.type.toLowerCase()==="timezonename"});return x&&x.value};var C=b.startOf;b.startOf=function(m,k){if(!this.$x||!this.$x.$timezone)return C.call(this,m,k);var x=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return C.call(x,m,k).tz(this.$x.$timezone,!0)},s.tz=function(m,k,x){var _=x&&k,L=x||k||c,E=g(+s(),L);if(typeof m!="string")return s(m).tz(L);var A=function(D,M,V){var U=D-60*M*1e3,j=g(U,V);if(M===j)return[U,M];var G=g(U-=60*(j-M)*1e3,V);return j===G?[U,j]:[D-60*Math.min(j,G)*1e3,Math.max(j,G)]}(s.utc(m,_).valueOf(),E,L),I=A[0],O=A[1],H=s(I).utcOffset(O);return H.$x.$timezone=L,H},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(m){c=m}}})})(E8);var SL=E8.exports;const _L=rr(SL);var F8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r,o){o.updateLocale=function(u,s){var c=o.Ls[u];if(c)return(s?Object.keys(s):[]).forEach(function(d){c[d]=s[d]}),c}}})})(F8);var kL=F8.exports;const LL=rr(kL);var $8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(u,s,c){var d=s.prototype;c.utc=function(_){var L={date:_,utc:!0,args:arguments};return new s(L)},d.utc=function(_){var L=c(this.toDate(),{locale:this.$L,utc:!0});return _?L.add(this.utcOffset(),t):L},d.local=function(){return c(this.toDate(),{locale:this.$L,utc:!1})};var g=d.parse;d.parse=function(_){_.utc&&(this.$u=!0),this.$utils().u(_.$offset)||(this.$offset=_.$offset),g.call(this,_)};var b=d.init;d.init=function(){if(this.$u){var _=this.$d;this.$y=_.getUTCFullYear(),this.$M=_.getUTCMonth(),this.$D=_.getUTCDate(),this.$W=_.getUTCDay(),this.$H=_.getUTCHours(),this.$m=_.getUTCMinutes(),this.$s=_.getUTCSeconds(),this.$ms=_.getUTCMilliseconds()}else b.call(this)};var C=d.utcOffset;d.utcOffset=function(_,L){var E=this.$utils().u;if(E(_))return this.$u?0:E(this.$offset)?C.call(this):this.$offset;if(typeof _=="string"&&(_=function(H){H===void 0&&(H="");var D=H.match(r);if(!D)return null;var M=(""+D[0]).match(o)||["-",0,0],V=M[0],U=60*+M[1]+ +M[2];return U===0?0:V==="+"?U:-U}(_),_===null))return this;var A=Math.abs(_)<=16?60*_:_,I=this;if(L)return I.$offset=A,I.$u=_===0,I;if(_!==0){var O=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(I=this.local().add(A+O,t)).$offset=A,I.$x.$localOffset=O}else I=this.utc();return I};var m=d.format;d.format=function(_){var L=_||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,L)},d.valueOf=function(){var _=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*_},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var k=d.toDate;d.toDate=function(_){return _==="s"&&this.$offset?c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():k.call(this)};var x=d.diff;d.diff=function(_,L,E){if(_&&this.$u===_.$u)return x.call(this,_,L,E);var A=this.local(),I=c(_).local();return x.call(A,I,L,E)}}})})($8);var xL=$8.exports;const ML=rr(xL),Cc={cuiTrigger:"_cuiTrigger_1byb5_1",cuiMenuPanel:"_cuiMenuPanel_1byb5_10",cuiShowClose:"_cuiShowClose_1byb5_18",cuiCloseButton:"_cuiCloseButton_1byb5_22"},Ii=({children:e,...n})=>l.jsx(V3,{...n,children:e}),T8=({anchor:e,children:n,...t})=>l.jsxs(l.Fragment,{children:[l.jsx(W3,{className:Cc.cuiTrigger,asChild:!0,...t,children:l.jsx("div",{children:n})}),e&&l.jsx(mS,{asChild:!0,children:e})]});T8.displayName="PopoverTrigger",Ii.Trigger=T8;const I8=({children:e,showArrow:n,showClose:t,forceMount:r,container:o,...u})=>l.jsx(Z3,{forceMount:r,container:o,children:l.jsxs(U3,{className:Q(Cc.cuiMenuPanel,{[Cc.cuiShowClose]:t}),sideOffset:4,...u,children:[t&&l.jsx(wS,{className:Cc.cuiCloseButton,asChild:!0,children:l.jsx(Fs,{children:l.jsx(Te,{name:"cross"})})}),n&&l.jsx(yS,{width:20,height:10,asChild:!0,children:l.jsx(D3,{})}),e]})});I8.displayName="PopoverContent",Ii.Content=I8;const Ht={cuiGridContainer:"_cuiGridContainer_k3q98_1",cuiInline:"_cuiInline_k3q98_4",cuiFillWidth:"_cuiFillWidth_k3q98_7",cuiWidthAuto:"_cuiWidthAuto_k3q98_10",cuiAlignItemsStart:"_cuiAlignItemsStart_k3q98_13",cuiAlignItemsCenter:"_cuiAlignItemsCenter_k3q98_16",cuiAlignItemsEnd:"_cuiAlignItemsEnd_k3q98_19",cuiAlignItemsStretch:"_cuiAlignItemsStretch_k3q98_22",cuiAlignContentCenter:"_cuiAlignContentCenter_k3q98_25",cuiAlignContentSpaceBetween:"_cuiAlignContentSpaceBetween_k3q98_28",cuiAlignContentSpaceAround:"_cuiAlignContentSpaceAround_k3q98_31",cuiAlignContentSpaceEvenly:"_cuiAlignContentSpaceEvenly_k3q98_34",cuiAlignContentStart:"_cuiAlignContentStart_k3q98_37",cuiAlignContentStretch:"_cuiAlignContentStretch_k3q98_40",cuiAlignContentEnd:"_cuiAlignContentEnd_k3q98_43",cuiAlignContentLeft:"_cuiAlignContentLeft_k3q98_46",cuiAlignContentRight:"_cuiAlignContentRight_k3q98_49",cuiJustifyContentCenter:"_cuiJustifyContentCenter_k3q98_52",cuiJustifyContentSpaceBetween:"_cuiJustifyContentSpaceBetween_k3q98_55",cuiJustifyContentSpaceAround:"_cuiJustifyContentSpaceAround_k3q98_58",cuiJustifyContentSpaceEvenly:"_cuiJustifyContentSpaceEvenly_k3q98_61",cuiJustifyContentStart:"_cuiJustifyContentStart_k3q98_64",cuiJustifyContentStretch:"_cuiJustifyContentStretch_k3q98_67",cuiJustifyContentEnd:"_cuiJustifyContentEnd_k3q98_70",cuiJustifyContentLeft:"_cuiJustifyContentLeft_k3q98_73",cuiJustifyContentRight:"_cuiJustifyContentRight_k3q98_76",cuiJustifyItemsStart:"_cuiJustifyItemsStart_k3q98_79",cuiJustifyItemsCenter:"_cuiJustifyItemsCenter_k3q98_82",cuiJustifyItemsEnd:"_cuiJustifyItemsEnd_k3q98_85",cuiJustifyItemsStretch:"_cuiJustifyItemsStretch_k3q98_88",cuiGapNone:"_cuiGapNone_k3q98_91",cuiGapXxs:"_cuiGapXxs_k3q98_94",cuiGapXs:"_cuiGapXs_k3q98_97",cuiGapSm:"_cuiGapSm_k3q98_100",cuiGapMd:"_cuiGapMd_k3q98_103",cuiGapLg:"_cuiGapLg_k3q98_106",cuiGapXl:"_cuiGapXl_k3q98_109",cuiGapXxl:"_cuiGapXxl_k3q98_112",cuiGapUnset:"_cuiGapUnset_k3q98_115",cuiColumnGapNone:"_cuiColumnGapNone_k3q98_118",cuiColumnGapXxs:"_cuiColumnGapXxs_k3q98_121",cuiColumnGapXs:"_cuiColumnGapXs_k3q98_124",cuiColumnGapSm:"_cuiColumnGapSm_k3q98_127",cuiColumnGapMd:"_cuiColumnGapMd_k3q98_130",cuiColumnGapLg:"_cuiColumnGapLg_k3q98_133",cuiColumnGapXl:"_cuiColumnGapXl_k3q98_136",cuiColumnGapXxl:"_cuiColumnGapXxl_k3q98_139",cuiColumnGapUnset:"_cuiColumnGapUnset_k3q98_142",cuiRowGapNone:"_cuiRowGapNone_k3q98_145",cuiRowGapXxs:"_cuiRowGapXxs_k3q98_148",cuiRowGapXs:"_cuiRowGapXs_k3q98_151",cuiRowGapSm:"_cuiRowGapSm_k3q98_154",cuiRowGapMd:"_cuiRowGapMd_k3q98_157",cuiRowGapLg:"_cuiRowGapLg_k3q98_160",cuiRowGapXl:"_cuiRowGapXl_k3q98_163",cuiRowGapXxl:"_cuiRowGapXxl_k3q98_166",cuiRowGapUnset:"_cuiRowGapUnset_k3q98_169",cuiResponsive:"_cuiResponsive_k3q98_173"},EL=({alignItems:e="stretch",alignContent:n="stretch",children:t,columnGap:r,gap:o,gridAutoColumns:u,gridAutoFlow:s,gridAutoRows:c,gridTemplateAreas:d,gridTemplateColumns:g,gridTemplateRows:b,gridTemplate:C,inline:m=!1,isResponsive:k=!0,justifyContent:x="stretch",justifyItems:_="stretch",rowGap:L,height:E,maxHeight:A,minHeight:I,fillWidth:O=!0,maxWidth:H,minWidth:D,overflow:M,component:V,...U},j)=>{const G=V??"div",q=Q(Ht.cuiGridContainer,{[Ht.cuiInline]:m,[Ht.cuiFillWidth]:O,[Ht.cuiWidthAuto]:!O,[Ht.cuiResponsive]:k,[Ht[`cuiAlignItems${e.charAt(0).toUpperCase()+e.slice(1)}`]]:e!=="stretch",[Ht[`cuiAlignContent${n.charAt(0).toUpperCase()+n.slice(1)}`]]:n!=="stretch",[Ht[`cuiJustifyContent${x.charAt(0).toUpperCase()+x.slice(1)}`]]:x!=="stretch",[Ht[`cuiJustifyItems${_.charAt(0).toUpperCase()+_.slice(1)}`]]:_!=="stretch",[Ht[`cuiGap${o?o.charAt(0).toUpperCase()+o.slice(1):""}`]]:o,[Ht[`cuiColumnGap${r?r.charAt(0).toUpperCase()+r.slice(1):""}`]]:r,[Ht[`cuiRowGap${L?L.charAt(0).toUpperCase()+L.slice(1):""}`]]:L}),Y={...u&&{gridAutoColumns:u},...s&&{gridAutoFlow:s},...c&&{gridAutoRows:c},...d&&{gridTemplateAreas:d},...g&&{gridTemplateColumns:g},...b&&{gridTemplateRows:b},...C&&{gridTemplate:C},...E&&{height:E},...A&&{maxHeight:A},...I&&{minHeight:I},...H&&{maxWidth:H},...D&&{minWidth:D},...M&&{overflow:M}};return l.jsx(G,{className:q,style:Y,"data-testid":"grid-container",ref:j,...U,children:t})},D8=p.forwardRef(EL),FL={cuiUnderlinedTrigger:"_cuiUnderlinedTrigger_1nc50_1"};yn.extend(gL),yn.extend(vL),yn.extend(mL),yn.extend(_L),yn.extend(LL),yn.extend(ML);const $L=[{l:"s",r:1,d:"second"},{l:"ss",r:56,d:"second"},{l:"m",r:90,d:"second"},{l:"mm",r:55,d:"minute"},{l:"h",r:90,d:"minute"},{l:"hh",r:22,d:"hour"},{l:"d",r:40,d:"hour"},{l:"dd",r:31,d:"day"},{l:"M",r:45,d:"day"},{l:"MM",r:11,d:"month"},{l:"y",r:17,d:"month"},{l:"yy",r:2,d:"year"}];yn.extend(yL,{thresholds:$L}),yn.updateLocale("en",{relativeTime:{future:"In %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"1 minute",mm:"%d minutes",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",w:"1 week",ww:"%d weeks",M:"1 month",MM:"%d months",y:"1 year",yy:"%d years"}});const f0=(e,n)=>{const t=yn().year()===e.year(),r="MMM D, h:mm a",o="MMM D, YYYY, h:mm a";return t?n?e.tz(n).format(r).replace("am","a.m.").replace("pm","p.m."):e.format(r).replace("am","a.m.").replace("pm","p.m."):n?e.tz(n).format(o).replace("am","a.m.").replace("pm","p.m."):e.format(o).replace("am","a.m.").replace("pm","p.m.")},H8=(e,n)=>{var t;return((t=new Intl.DateTimeFormat(void 0,{timeZone:n,timeZoneName:"short"}).formatToParts(e.toDate()).find(r=>r.type==="timeZoneName"))==null?void 0:t.value)??e.format("z")},TL=({date:e,side:n="top",size:t="sm",systemTimeZone:r,weight:o="normal"})=>{const u=yn(e);let s;if(r)try{s=u.tz(r)}catch{s=u.tz("America/New_York")}return l.jsxs(Ii,{children:[l.jsx(Ii.Trigger,{className:FL.cuiUnderlinedTrigger,children:l.jsx(_l,{size:t,weight:o,children:yn.utc(e).fromNow()})}),l.jsx(Ii.Content,{side:n,showArrow:!0,children:l.jsxs(D8,{columnGap:"xl",gridTemplateColumns:"repeat(2, auto)",gap:"sm",children:[l.jsx(_l,{color:"muted",size:"sm",children:"Local"}),l.jsx(xl,{justifyContent:"end",children:l.jsxs(_l,{size:"sm",children:[f0(u)," (",H8(u,yn.tz.guess()),")"]})}),s&&l.jsxs(l.Fragment,{children:[l.jsx(_l,{color:"muted",size:"sm",children:"System"}),l.jsx(xl,{justifyContent:"end",children:l.jsxs(_l,{size:"sm",children:[f0(s,r)," (",H8(s,r),")"]})})]}),l.jsx(_l,{color:"muted",size:"sm",children:"UTC"}),l.jsx(xl,{justifyContent:"end",children:l.jsx(_l,{size:"sm",children:f0(u.utc(),"UTC")})}),l.jsx(_l,{color:"muted",size:"sm",children:"Unix"}),l.jsx(xl,{justifyContent:"end",children:l.jsx(_l,{size:"sm",children:Math.round(e.getTime()/1e3)})})]})})]})},A8=Symbol.for("constructDateFrom");function Di(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&A8 in e?e[A8](n):e instanceof Date?new e.constructor(n):new Date(n)}function Un(e,n){return Di(n||e,e)}function vc(e,n,t){const r=Un(e,t==null?void 0:t.in);return isNaN(n)?Di(e,NaN):(n&&r.setDate(r.getDate()+n),r)}function P8(e,n,t){const r=Un(e,t==null?void 0:t.in);if(isNaN(n))return Di(e,NaN);if(!n)return r;const o=r.getDate(),u=Di(e,r.getTime());u.setMonth(r.getMonth()+n+1,0);const s=u.getDate();return o>=s?u:(r.setFullYear(u.getFullYear(),u.getMonth(),o),r)}function IL(e,n){const t=Un(e,n==null?void 0:n.in).getDay();return t===0||t===6}let DL={};function O8(){return DL}function N8(e,n){var c,d,g,b;const t=O8(),r=(n==null?void 0:n.weekStartsOn)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??t.weekStartsOn??((b=(g=t.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,o=Un(e,n==null?void 0:n.in),u=o.getDay(),s=(u<r?7:0)+u-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function B8(e,...n){const t=Di.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function V8(e,n,t){return vc(e,n*7,t)}function h0(e,n){const t=Un(e,n==null?void 0:n.in);return t.setDate(1),t.setHours(0,0,0,0),t}function HL(e,n){return Un(e,n==null?void 0:n.in).getDate()}function AL(e,n){return Un(e,n==null?void 0:n.in).getDay()}function PL(e,n){const t=Un(e,n==null?void 0:n.in),r=t.getFullYear(),o=t.getMonth(),u=Di(t,0);return u.setFullYear(r,o+1,0),u.setHours(0,0,0,0),u.getDate()}function OL(e,n){return+Un(e)==+Un(n)}function NL(e,n,t){var C,m;const r=O8(),o=r.weekStartsOn??((m=(C=r.locale)==null?void 0:C.options)==null?void 0:m.weekStartsOn)??0,u=Un(e,t==null?void 0:t.in),s=u.getDay(),d=(n%7+7)%7,g=7-o,b=n<0||n>6?n-(s+g)%7:(d+g)%7-(s+g)%7;return vc(u,b,t)}function BL(e,n,t){const[r,o]=B8(t==null?void 0:t.in,e,n);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function VL(e,n,t){const[r,o]=B8(t==null?void 0:t.in,e,n);return r.getFullYear()===o.getFullYear()}function WL(e,n,t){return vc(e,-n,t)}function ZL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setHours(n),r}function UL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setMilliseconds(n),r}function zL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setMinutes(n),r}function jL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setSeconds(n),r}function GL(e,n,t){return P8(e,-n,t)}function XL(e,n,t){return V8(e,-n,t)}var W8=(e=>(e.Month="month",e.Week="week",e.Day="day",e))(W8||{}),fn=W8;function p0(e){return[...new Array(e).keys()]}var g0=0,bc=new Map;function C0(e){if(bc.has(e)){const t=bc.get(e)+1;bc.set(e,t),g0=t}else bc.set(e,1),g0=1;return`${e}-${g0}`}function Z8(e){return ZL(zL(jL(UL(e,0),0),0),0)}function Hr(e,n){const t=Z8(e),r=Z8(n);return OL(t,r)}function YL(e,n){return BL(n,e)&&VL(n,e)}function qL(e){return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}}function KL(...e){return(...n)=>e.reduce((t,r,o)=>r(...o===0?t:[t]),n)}function JL(e,...n){return KL(...n)(e)}function U8(e,n){return e.map(t=>({...t,key:C0(n)}))}function QL(e,n){return function(t){const{value:r}=t,o=YL(n,r),u=Hr(e,r),s=IL(r);return{...t,date:HL(r),isCurrentMonth:o,isCurrentDate:u,isWeekend:s}}}function RL(e){return function(n){return{...n,key:C0(e)}}}function ex(e,{weekStartsOn:n}){const{year:t,month:r,day:o}=qL(e),u=lx(e,n),s=nx(e,u),c=p0(7).map(g=>({value:NL(e,g+n)})),d=(g,b)=>{const C=g*7+b-u+1;return{value:new Date(t,r,C)}};return{cursorDate:e,year:t,month:r,day:o,weekStartsOn:n,startWeekdayInMonth:u,weeksInMonth:s,weekendDays:c,today:{weekIndex:tx(o,u),dateIndex:AL(e)},getDateCellByIndex:d}}function lx(e,n){const t=(h0(e).getDay()-n)%7;return t<0?t+7:t}function nx(e,n){const t=PL(e);return Math.ceil((n+t)/7)}function tx(e,n){return(e+n)%7>0?Math.floor((e+n)/7):Math.floor((e+n)/7)-1}function rx(){const[e,n]=p.useState(!1);return p.useEffect(()=>{n(!0)},[]),e}function ox({defaultDate:e,defaultWeekStart:n=0,defaultViewType:t=fn.Month}={}){const r=rx(),o=p.useMemo(()=>e!=null?new Date(e):new Date,[e,r]),[u,s]=p.useState(n),[c,d]=p.useState(o),[g,b]=p.useState(t),C=ex(c,{weekStartsOn:u}),{weekendDays:m,weeksInMonth:k,today:x,getDateCellByIndex:_}=C,L=p.useCallback(H=>{switch(H){case fn.Month:case fn.Week:return{weekDays:U8(m,"weekdays")};case fn.Day:default:return{weekDays:U8([{value:c}],"weekdays")}}},[c,m]),E=p.useCallback(H=>({value:p0(H).map(D=>({key:C0("weeks"),value:p0(7).map(M=>JL(_(D,M),QL(o,c),RL("days")))}))}),[o,c,_]),A=p.useCallback(H=>{var U;const D=E(k),{weekIndex:M,dateIndex:V}=x;return{[fn.Month]:D,[fn.Week]:{value:[D.value[M]]},[fn.Day]:{value:[{key:"week-day-type",value:[(U=D.value[M])==null?void 0:U.value[V]]}]}}[H]},[E,x,k]),I=p.useMemo(()=>{switch(g){case fn.Month:return H=>P8(h0(H),1);case fn.Week:return H=>V8(N8(H,{weekStartsOn:u}),1);case fn.Day:return H=>vc(H,1)}},[g,u]),O=p.useMemo(()=>{switch(g){case fn.Month:return H=>GL(h0(H),1);case fn.Week:return H=>XL(N8(H,{weekStartsOn:u}),1);case fn.Day:return H=>WL(H,1)}},[g,u]);return p.useMemo(()=>({...C,headers:L(g),body:A(g),navigation:{toNext:()=>d(H=>I(H)),toPrev:()=>d(H=>O(H)),setToday:()=>d(new Date),setDate:H=>d(H)},view:{type:g,setViewType:b,setWeekStartsOn:s,isMonthView:g===fn.Month,isWeekView:g===fn.Week,isDayView:g===fn.Day,showMonthView:()=>b(fn.Month),showWeekView:()=>b(fn.Week),showDayView:()=>b(fn.Day)}}),[C,A,L,I,O,g])}const Ol={cuiWrapper:"_cuiWrapper_1e7yg_1",disabled:"_disabled_1e7yg_49",cuiError:"_cuiError_1e7yg_63",cuiResizeVertical:"_cuiResizeVertical_1e7yg_92",cuiResizeHorizontal:"_cuiResizeHorizontal_1e7yg_97",cuiResizeBoth:"_cuiResizeBoth_1e7yg_102",cuiFormRoot:"_cuiFormRoot_1e7yg_107",cuiVertical:"_cuiVertical_1e7yg_117",cuiVerticalReversed:"_cuiVerticalReversed_1e7yg_122",cuiHorizontal:"_cuiHorizontal_1e7yg_127",cuiHorizontalReversed:"_cuiHorizontalReversed_1e7yg_132",cuiLabelPadding:"_cuiLabelPadding_1e7yg_137",cuiFormElementContainer:"_cuiFormElementContainer_1e7yg_142",cuiErrorMessage:"_cuiErrorMessage_1e7yg_153",cuiInputElement:"_cuiInputElement_1e7yg_158",cuiNumberInputElement:"_cuiNumberInputElement_1e7yg_158",cuiInputWithStartContent:"_cuiInputWithStartContent_1e7yg_174",cuiInputWithEndContent:"_cuiInputWithEndContent_1e7yg_178",cuiInputNoPadding:"_cuiInputNoPadding_1e7yg_182",cuiInputWithPadding:"_cuiInputWithPadding_1e7yg_187",cuiHideNumberControls:"_cuiHideNumberControls_1e7yg_192",cuiTextareaElement:"_cuiTextareaElement_1e7yg_200",cuiIconButton:"_cuiIconButton_1e7yg_218",cuiIconWrapper:"_cuiIconWrapper_1e7yg_229",cuiInputStartContent:"_cuiInputStartContent_1e7yg_236",cuiInputEndContent:"_cuiInputEndContent_1e7yg_245"},ix=({children:e,orientation:n="vertical",dir:t="start",addLabelPadding:r})=>{const o=()=>n==="horizontal"?t==="start"?"row-reverse":"row":t==="start"?"column-reverse":"column";return l.jsx("div",{className:Q(Ol.cuiFormRoot,{[Ol.cuiVertical]:n==="vertical"&&t==="end",[Ol.cuiVerticalReversed]:n==="vertical"&&t==="start",[Ol.cuiHorizontal]:n==="horizontal"&&t==="end",[Ol.cuiHorizontalReversed]:n==="horizontal"&&t==="start",[Ol.cuiLabelPadding]:r&&n==="horizontal"}),style:{flexDirection:o()},children:e})},ux=({children:e})=>l.jsx("div",{className:Ol.cuiFormElementContainer,children:e}),ax=({children:e})=>l.jsx("div",{className:Ol.cuiErrorMessage,children:e}),Hi=({className:e,id:n,label:t="",labelColor:r,error:o,disabled:u,children:s,orientation:c,dir:d,resize:g="none"})=>l.jsxs(ix,{orientation:c,dir:d,addLabelPadding:!0,children:[l.jsxs(ux,{children:[l.jsx("div",{className:Q(Ol.cuiWrapper,e,{[Ol.cuiError]:!!o,[Ol.cuiDisabled]:u,[Ol.cuiResizeVertical]:g==="vertical",[Ol.cuiResizeHorizontal]:g==="horizontal",[Ol.cuiResizeBoth]:g==="both"}),"data-resize":g,children:s}),!!o&&o!==!0&&l.jsx(ax,{children:o})]}),t&&l.jsx(na,{htmlFor:n,disabled:u,error:!!o,className:Ol.cuiLabel,style:r?{color:r}:void 0,children:t})]}),mc=p.forwardRef(({hasStartContent:e,hasEndContent:n,className:t,...r},o)=>l.jsx("input",{className:Q(Ol.cuiInputElement,t,{[Ol.cuiInputWithStartContent]:e&&!n,[Ol.cuiInputWithEndContent]:!e&&n,[Ol.cuiInputNoPadding]:e&&n,[Ol.cuiInputWithPadding]:!e&&!n}),ref:o,...r})),sx=p.forwardRef(({hideControls:e,className:n,...t},r)=>l.jsx(mc,{...t,ref:r,type:"number",className:Q(Ol.cuiNumberInputElement,n,{[Ol.cuiHideNumberControls]:e})})),cx=p.forwardRef(({className:e,...n},t)=>l.jsx("textarea",{className:Q(Ol.cuiTextareaElement,e),ref:t,...n})),z8=({className:e,...n})=>l.jsx("button",{className:Q(Ol.cuiIconButton,e),...n}),v0=({className:e,...n})=>l.jsx("div",{className:Q(Ol.cuiInputStartContent,e),...n}),j8=({className:e,...n})=>l.jsx("div",{className:Q(Ol.cuiInputEndContent,e),...n}),b0="en-US",Ai=new Intl.DateTimeFormat(b0,{day:"2-digit",month:"short",year:"numeric"}),dx=new Intl.DateTimeFormat(b0,{weekday:"short"}),fx=new Intl.DateTimeFormat(b0,{month:"short",year:"numeric"}),hx=e=>{const n=yn();if(e<0){const r=[];for(let o=0;o<Math.abs(e);o++){const u=n.subtract(o,"month");u.date()===1&&u.month()===n.month()||r.push({startDate:u.startOf("month").toDate(),endDate:o===0?n.toDate():u.endOf("month").toDate()})}return r.reverse()}const t=[];for(let r=0;r<e;r++){const o=n.add(r,"month");t.push({startDate:o.startOf("month").toDate(),endDate:o.endOf("month").toDate()})}return t},px=(e,n,t)=>Math.abs(yn(e).diff(yn(n),"days"))<=t,gx=({startDate:e,endDate:n})=>{if(e.getMonth()!==n.getMonth())return!1;const t=yn(e),r=yn(n),o=t.isSame(t.startOf("month"),"day"),u=r.isSame(r.endOf("month"),"day");return o&&u},zn={cuiHighlightedInputWrapper:"_cuiHighlightedInputWrapper_13poj_1",cuiActive:"_cuiActive_13poj_4",cuiInactive:"_cuiInactive_13poj_7",cuiDatePickerContainer:"_cuiDatePickerContainer_13poj_11",cuiUnselectableTitle:"_cuiUnselectableTitle_13poj_15",cuiDateTable:"_cuiDateTable_13poj_21",cuiDateTableHeader:"_cuiDateTableHeader_13poj_40",cuiDateTableCell:"_cuiDateTableCell_13poj_46",cuiNotCurrentMonth:"_cuiNotCurrentMonth_13poj_52",cuiDisabled:"_cuiDisabled_13poj_52",cuiSelected:"_cuiSelected_13poj_56",cuiToday:"_cuiToday_13poj_60"},Cx=({isActive:e,disabled:n,id:t,placeholder:r,selectedDate:o})=>{const u=p.useId(),s=o instanceof Date?Ai.format(o):"";return l.jsxs(Hi,{className:Q(zn.cuiHighlightedInputWrapper,{[zn.cuiActive]:e,[zn.cuiInactive]:!e}),disabled:n,id:t??u,children:[l.jsx(v0,{children:l.jsx(Te,{name:"calendar"})}),l.jsx(mc,{hasStartContent:!0,"data-testid":"datepicker-input",placeholder:r,readOnly:!0,value:s})]})},vx=({isActive:e,disabled:n,id:t,placeholder:r,selectedEndDate:o,selectedStartDate:u})=>{const s=p.useId();let c=l.jsx(_l,{color:"muted",component:"span",children:r??""});return u&&(o?c=l.jsxs("span",{children:[Ai.format(u)," –"," ",Ai.format(o)]}):c=l.jsxs("span",{children:[Ai.format(u)," ",l.jsx(_l,{color:"muted",component:"span",children:"– end date"})]})),l.jsxs(Hi,{className:Q(zn.cuiHighlightedInputWrapper,{[zn.cuiActive]:e,[zn.cuiInactive]:!e}),disabled:n,id:t??s,children:[l.jsx(v0,{children:l.jsx(Te,{name:"calendar"})}),l.jsx("div",{className:"input-element-wrapper","data-testid":"daterangepicker-input",style:{width:"100%",display:"flex",alignItems:"center",padding:"var(--click-input-space-y) var(--click-input-space-x)",minHeight:"var(--click-input-size-height-md)",backgroundColor:"var(--click-input-color-background-default)",border:"var(--click-input-stroke-border-default)",borderRadius:"var(--click-input-radii-all)",fontSize:"var(--click-input-typography-text-default)"},children:c})]})},G8=({$isCurrentMonth:e,$isDisabled:n,$isSelected:t,$isToday:r,children:o,onClick:u,onMouseEnter:s,onMouseLeave:c,...d})=>l.jsx("td",{className:Q(zn.cuiDateTableCell,{[zn.cuiNotCurrentMonth]:!e,[zn.cuiDisabled]:n,[zn.cuiSelected]:t,[zn.cuiToday]:r}),onClick:u,onMouseEnter:s,onMouseLeave:c,...d,children:o}),m0=({calendarOptions:e={},children:n,...t})=>{const{body:r,headers:o,month:u,navigation:s,year:c}=ox({defaultWeekStart:1,...e}),d=p.useCallback(()=>{s.toNext()},[s]),g=p.useCallback(()=>{s.toPrev()},[s]),b=new Date;return b.setMonth(u),b.setFullYear(c),l.jsxs(xl,{className:zn.cuiDatePickerContainer,"data-testid":"datepicker-calendar-container",isResponsive:!1,fillWidth:!1,orientation:"vertical",padding:"sm",...t,children:[l.jsxs(xl,{isResponsive:!1,justifyContent:"space-between",orientation:"horizontal",children:[l.jsx(kn,{"data-testid":"calendar-previous-month",icon:"chevron-left",onClick:g,size:"sm",type:"ghost"}),l.jsx("h2",{className:zn.cuiUnselectableTitle,children:fx.format(b)}),l.jsx(kn,{"data-testid":"calendar-next-month",icon:"chevron-right",onClick:d,size:"sm",type:"ghost"})]}),l.jsxs("table",{className:zn.cuiDateTable,children:[l.jsx("thead",{children:l.jsx("tr",{children:o.weekDays.map(({key:C,value:m})=>l.jsx("th",{className:zn.cuiDateTableHeader,children:dx.format(m)},C))})}),l.jsx("tbody",{children:n(r)})]})]})},bx=({calendarBody:e,closeDatepicker:n,futureDatesDisabled:t,selectedDate:r,setSelectedDate:o})=>e.value.map(({key:u,value:s})=>l.jsx("tr",{children:s.map(({date:c,isCurrentMonth:d,key:g,value:b})=>{const C=r?Hr(r,b):!1,m=new Date,k=Hr(m,b),x=t?b>m:!1,_=()=>{if(x)return!1;o(b),n()};return l.jsx(G8,{$isCurrentMonth:d,$isDisabled:x,$isSelected:C,$isToday:k,onClick:_,children:c},g)})},u)),mx=({date:e,disabled:n=!1,futureDatesDisabled:t=!1,onSelectDate:r,placeholder:o})=>{const[u,s]=p.useState(!1),[c,d]=p.useState(),g={};c&&(g.defaultDate=c),p.useEffect(()=>{e&&d(e)},[e]);const b=()=>{s(!1)},C=m=>{d(m),r(m)};return l.jsxs(Rl,{onOpenChange:s,open:u,children:[l.jsx(Rl.Trigger,{disabled:n,children:l.jsx(Cx,{"data-testid":"datepicker-input-container",disabled:n,isActive:u,placeholder:o,selectedDate:c})}),l.jsx(Rl.Content,{align:"start",children:l.jsx(m0,{calendarOptions:g,children:m=>l.jsx(bx,{calendarBody:m,closeDatepicker:b,futureDatesDisabled:t,selectedDate:c,setSelectedDate:C})})})]})},Pi={cuiPredefinedCalendarContainer:"_cuiPredefinedCalendarContainer_8yeob_1",cuiPredefinedDatesContainer:"_cuiPredefinedDatesContainer_8yeob_6",cuiCalendarRendererContainer:"_cuiCalendarRendererContainer_8yeob_10",cuiStyledCalendarRenderer:"_cuiStyledCalendarRenderer_8yeob_19",cuiStyledDropdownItem:"_cuiStyledDropdownItem_8yeob_24",cuiScrollableContainer:"_cuiScrollableContainer_8yeob_28",cuiDateRangeTableCell:"_cuiDateRangeTableCell_8yeob_33",cuiShowRangeIndicator:"_cuiShowRangeIndicator_8yeob_33"},X8=({calendarBody:e,closeDatepicker:n,futureDatesDisabled:t,futureStartDatesDisabled:r,maxRangeLength:o,setSelectedDate:u,startDate:s,endDate:c})=>e.value.map(({key:d,value:g})=>l.jsx("tr",{children:g.map(({date:b,isCurrentMonth:C,key:m,value:k})=>{const x=s&&Hr(s,k)||c&&Hr(c,k),_=new Date,L=Hr(_,k);let E=!1;t&&k>_&&(E=!0),r&&!s&&k>_&&(E=!0),o>1&&s&&!px(s,k,o)&&(E=!0);const A=()=>{},I=()=>{},O=()=>{if(E)return!1;if(u(k),!(s&&c)&&!(s&&k<s)&&s&&!Hr(k,s)){n();return}};return l.jsx(G8,{$isCurrentMonth:C,$isDisabled:E,$isSelected:x,$isToday:L,onClick:O,onMouseEnter:A,onMouseLeave:I,children:b},m)})},d)),wx="en-US",yx=new Intl.DateTimeFormat(wx,{month:"short",year:"numeric"}),Sx=({onSelectDateRange:e,predefinedDatesList:n,selectedEndDate:t,selectedStartDate:r,setEndDate:o,setStartDate:u,shouldShowCustomRange:s,showCustomDateRange:c})=>{const d=g=>{g.preventDefault(),c(!s)};return l.jsxs(xl,{className:Pi.cuiPredefinedDatesContainer,"data-testid":"predefined-dates-list",isResponsive:!1,orientation:"vertical",children:[l.jsx(xl,{className:Pi.cuiScrollableContainer,orientation:"vertical",children:n.map(({startDate:g,endDate:b})=>{const C=()=>{u(g),o(b),e(g,b)},m=t&&Hr(t,b)&&r&&Hr(r,g),x=gx({startDate:g,endDate:b})?yx.format(g):`${Ai.format(g)} - ${Ai.format(b)}`.trim();return l.jsx(Rl.Item,{className:Pi.cuiStyledDropdownItem,"data-testid":`predefined-date-${g.getTime()}`,onClick:C,children:l.jsxs(xl,{"data-selected":m,"data-testid":x,justifyContent:"space-between",orientation:"horizontal",children:[x,m&&l.jsx(Te,{name:"check"})]})},g.toISOString())})}),l.jsx(Rl.Item,{className:Pi.cuiStyledDropdownItem,onClick:d,children:l.jsxs(xl,{justifyContent:"space-between",orientation:"horizontal",children:["Custom time period ",l.jsx(Te,{name:"chevron-right"})]})})]})},_x=({endDate:e,startDate:n,disabled:t=!1,futureDatesDisabled:r=!1,futureStartDatesDisabled:o=!1,maxRangeLength:u=-1,onSelectDateRange:s,placeholder:c="start date – end date",predefinedDatesList:d})=>{const[g,b]=p.useState(!1),[C,m]=p.useState(),[k,x]=p.useState(),[_,L]=p.useState(!1),E={};C&&(E.defaultDate=C),p.useEffect(()=>{n&&m(n)},[n]),p.useEffect(()=>{e&&x(e)},[e]);const A=p.useCallback(()=>{b(!1),L(!1)},[]),I=D=>{b(D),D||L(!1)},O=p.useCallback(D=>{if(C&&k){if(o&&D>new Date){x(void 0);return}m(D),x(void 0);return}if(C){if(Hr(C,D)){m(void 0);return}if(D<C){m(D);return}x(D),s(C,D),L(!1);return}m(D)},[o,s,k,C]),H=d!==void 0&&d.length>0;return l.jsxs(Rl,{onOpenChange:I,open:g,children:[l.jsx(Rl.Trigger,{disabled:t,children:l.jsx(vx,{"data-testid":"datepicker-input-container",disabled:t,isActive:g,placeholder:c,selectedEndDate:k,selectedStartDate:C})}),l.jsx(Rl.Content,{align:"start",children:H?l.jsxs(ef,{className:Pi.cuiPredefinedCalendarContainer,gap:"none",orientation:"horizontal",padding:"none",children:[l.jsx(Sx,{onSelectDateRange:s,predefinedDatesList:d,selectedEndDate:k,selectedStartDate:C,setEndDate:x,setStartDate:m,shouldShowCustomRange:_,showCustomDateRange:L}),_&&l.jsx("div",{className:Pi.cuiCalendarRendererContainer,children:l.jsx(m0,{calendarOptions:E,children:D=>l.jsx(X8,{calendarBody:D,closeDatepicker:A,futureDatesDisabled:r,futureStartDatesDisabled:o,maxRangeLength:u,setSelectedDate:O,startDate:C,endDate:k})})})]}):l.jsx(m0,{calendarOptions:E,children:D=>l.jsx(X8,{calendarBody:D,closeDatepicker:A,futureDatesDisabled:r,futureStartDatesDisabled:o,maxRangeLength:u,setSelectedDate:O,startDate:C,endDate:k})})})]})},Y8="Dialog",[q8,fB]=dn(Y8),[kx,ar]=q8(Y8),K8=e=>{const{__scopeDialog:n,children:t,open:r,defaultOpen:o,onOpenChange:u,modal:s=!0}=e,c=p.useRef(null),d=p.useRef(null),[g=!1,b]=Hn({prop:r,defaultProp:o,onChange:u});return p.createElement(kx,{scope:n,triggerRef:c,contentRef:d,contentId:bt(),titleId:bt(),descriptionId:bt(),open:g,onOpenChange:b,onOpenToggle:p.useCallback(()=>b(C=>!C),[b]),modal:s},t)},Lx="DialogTrigger",J8=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(Lx,t),u=Tl(n,o.triggerRef);return p.createElement(Ye.button,ie({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":S0(o.open)},r,{ref:u,onClick:ke(e.onClick,o.onOpenToggle)}))}),Q8="DialogPortal",[xx,R8]=q8(Q8,{forceMount:void 0}),e9=e=>{const{__scopeDialog:n,forceMount:t,children:r,container:o}=e,u=ar(Q8,n);return p.createElement(xx,{scope:n,forceMount:t},p.Children.map(r,s=>p.createElement(_n,{present:t||u.open},p.createElement(_i,{asChild:!0,container:o},s))))},w0="DialogOverlay",l9=p.forwardRef((e,n)=>{const t=R8(w0,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,u=ar(w0,e.__scopeDialog);return u.modal?p.createElement(_n,{present:r||u.open},p.createElement(Mx,ie({},o,{ref:n}))):null}),Mx=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(w0,t);return p.createElement(ec,{as:v1,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Ye.div,ie({"data-state":S0(o.open)},r,{ref:n,style:{pointerEvents:"auto",...r.style}})))}),Oi="DialogContent",y0=p.forwardRef((e,n)=>{const t=R8(Oi,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,u=ar(Oi,e.__scopeDialog);return p.createElement(_n,{present:r||u.open},u.modal?p.createElement(Ex,ie({},o,{ref:n})):p.createElement(Fx,ie({},o,{ref:n})))}),Ex=p.forwardRef((e,n)=>{const t=ar(Oi,e.__scopeDialog),r=p.useRef(null),o=Tl(n,t.contentRef,r);return p.useEffect(()=>{const u=r.current;if(u)return k3(u)},[]),p.createElement(n9,ie({},e,{ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,u=>{var s;u.preventDefault(),(s=t.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,u=>{const s=u.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&u.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,u=>u.preventDefault())}))}),Fx=p.forwardRef((e,n)=>{const t=ar(Oi,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return p.createElement(n9,ie({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,u),!u.defaultPrevented){var c;r.current||(c=t.triggerRef.current)===null||c===void 0||c.focus(),u.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:u=>{var s,c;(s=e.onInteractOutside)===null||s===void 0||s.call(e,u),u.defaultPrevented||(r.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=u.target;((c=t.triggerRef.current)===null||c===void 0?void 0:c.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}}))}),n9=p.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:u,...s}=e,c=ar(Oi,t),d=p.useRef(null),g=Tl(n,d);return p3(),p.createElement(p.Fragment,null,p.createElement(v3,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:u},p.createElement(Yu,ie({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":S0(c.open)},s,{ref:g,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),t9="DialogTitle",r9=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(t9,t);return p.createElement(Ye.h2,ie({id:o.titleId},r,{ref:n}))}),o9="DialogDescription",i9=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(o9,t);return p.createElement(Ye.p,ie({id:o.descriptionId},r,{ref:n}))}),u9="DialogClose",va=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(u9,t);return p.createElement(Ye.button,ie({type:"button"},r,{ref:n,onClick:ke(e.onClick,()=>o.onOpenChange(!1))}))});function S0(e){return e?"open":"closed"}const $x=K8,a9=J8,Tx=e9,Ix=l9,Dx=y0,s9=va,io={cuiTrigger:"_cuiTrigger_zul0q_19",cuiDialogOverlay:"_cuiDialogOverlay_zul0q_26",overlayShow:"_overlayShow_zul0q_1",cuiContentArea:"_cuiContentArea_zul0q_33",contentShow:"_contentShow_zul0q_1",cuiRegularPadding:"_cuiRegularPadding_zul0q_49",cuiReducedPadding:"_cuiReducedPadding_zul0q_53",cuiTitleArea:"_cuiTitleArea_zul0q_65",cuiSpaceBetween:"_cuiSpaceBetween_zul0q_70",cuiFlexEnd:"_cuiFlexEnd_zul0q_73",cuiTitle:"_cuiTitle_zul0q_65"},Bo=({children:e,...n})=>l.jsx($x,{...n,children:e}),c9=({children:e,asChild:n,className:t,...r})=>n?l.jsx(a9,{asChild:!0,...r,children:e}):l.jsx(a9,{className:Q(io.cuiTrigger,t),...r,children:e});c9.displayName="DialogTrigger",Bo.Trigger=c9;const d9=({label:e="Close",type:n="secondary",...t})=>l.jsx(s9,{asChild:!0,children:l.jsx(to,{type:n,label:e,...t})});d9.displayName="DialogClose",Bo.Close=d9;const Hx=({onClose:e})=>l.jsx(s9,{asChild:!0,children:l.jsx(V2,{onClick:e,children:l.jsx(Te,{name:"cross",size:"lg"})})}),f9=({title:e,children:n,showClose:t,onClose:r,forceMount:o,container:u,showOverlay:s=!0,reducePadding:c=!1,className:d,...g})=>l.jsxs(Tx,{forceMount:o,container:u,children:[s&&l.jsx(Ix,{className:io.cuiDialogOverlay}),l.jsxs(Dx,{"data-testid":"click-dialog-contentarea",className:Q(io.cuiContentArea,{[io.cuiRegularPadding]:!c,[io.cuiReducedPadding]:c},d),...g,children:[(e||t)&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Q(io.cuiTitleArea,{[io.cuiSpaceBetween]:!t||e,[io.cuiFlexEnd]:t&&!e}),children:[e&&l.jsx("h2",{className:io.cuiTitle,"data-testid":"click-dialog-title",children:e}),t&&l.jsx(Hx,{"data-testid":"click-dialog-close",onClose:r})]}),l.jsx(Gi,{size:"sm"})]}),n]})]});f9.displayName="DialogContent",Bo.Content=f9;const h9=(e,n=40,t="~")=>{if(e.length<=n)return e;if(e.startsWith("."))return`${e.slice(0,n)}${t}`;const r=e.lastIndexOf(".")!==-1?e.slice(e.lastIndexOf(".")):"";return(r?e.slice(0,e.lastIndexOf(".")):e).slice(0,n)+t+r},Kl={cuiUploadArea:"_cuiUploadArea_1hgfo_1",cuiHasFile:"_cuiHasFile_1hgfo_14",cuiSmall:"_cuiSmall_1hgfo_21",cuiDraggable:"_cuiDraggable_1hgfo_27",cuiDragging:"_cuiDragging_1hgfo_31",cuiError:"_cuiError_1hgfo_35",cuiFileUploadTitle:"_cuiFileUploadTitle_1hgfo_40",cuiNotSupported:"_cuiNotSupported_1hgfo_44",cuiFileUploadDescription:"_cuiFileUploadDescription_1hgfo_48",cuiDocumentIcon:"_cuiDocumentIcon_1hgfo_53",cuiUploadIcon:"_cuiUploadIcon_1hgfo_59",cuiUploadText:"_cuiUploadText_1hgfo_65",cuiCentered:"_cuiCentered_1hgfo_72",cuiFileInfoHeader:"_cuiFileInfoHeader_1hgfo_79",cuiFileInfo:"_cuiFileInfo_1hgfo_79",cuiFileDetails:"_cuiFileDetails_1hgfo_93",cuiFileActions:"_cuiFileActions_1hgfo_99",cuiProgressContainer:"_cuiProgressContainer_1hgfo_106",cuiProgressBarContainer:"_cuiProgressBarContainer_1hgfo_114",cuiProgressPercentage:"_cuiProgressPercentage_1hgfo_119"},Ax=e=>e<1024?`${e.toFixed(1)} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,Px=(e,n)=>{if(!n.length)return!0;const t=e.toLowerCase().slice(e.lastIndexOf("."));return n.some(r=>r.toLowerCase()===t.toLowerCase())},Ox=({title:e,supportedFileTypes:n=[".txt",".sql"],size:t="sm",onFileSelect:r,onRetry:o,progress:u=0,failureMessage:s="Upload failed",showProgress:c=!1,showSuccess:d=!1,onFileFailure:g,onFileClose:b})=>{const[C,m]=p.useState(!1),[k,x]=p.useState(!1),[_,L]=p.useState(null),E=p.useRef(null),A=p.useRef(0);p.useEffect(()=>{let Y;return k&&(Y=setTimeout(()=>{x(!1)},2e3)),()=>{Y&&clearTimeout(Y)}},[k]);const I=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),A.current+=1,m(!0)},[]),O=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),A.current-=1,A.current<=0&&(m(!1),A.current=0)},[]),H=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation()},[]);p.useEffect(()=>{const Y=()=>{m(!1),A.current=0};return window.addEventListener("dragend",Y),document.addEventListener("drop",Y),document.addEventListener("mouseleave",Y),()=>{window.removeEventListener("dragend",Y),document.removeEventListener("drop",Y),document.removeEventListener("mouseleave",Y)}},[]);const D=p.useCallback(Y=>{if(!Px(Y.name,n)){x(!0),g&&g();return}const X={name:Y.name,size:Y.size};L(X),x(!1),r&&r(Y)},[r,n,g]),M=p.useCallback(Y=>{if(Y.preventDefault(),Y.stopPropagation(),m(!1),A.current=0,Y.dataTransfer.files&&Y.dataTransfer.files.length>0){const X=Y.dataTransfer.files[0];D(X)}},[D]),V=p.useCallback(Y=>{if(Y.target.files&&Y.target.files.length>0){const X=Y.target.files[0];D(X)}},[D]),U=p.useCallback(()=>{E.current&&E.current.click()},[]),j=p.useCallback(()=>{L(null),E.current&&(E.current.value=""),b&&b()},[b]),G=p.useCallback(()=>{o&&o()},[o]),q=n.join(",");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Q(Kl.cuiUploadArea,{[Kl.cuiHasFile]:!!_,[Kl.cuiSmall]:t==="sm",[Kl.cuiDraggable]:!_,[Kl.cuiDragging]:C&&!_,[Kl.cuiError]:!!_&&!d&&!c}),onDragEnter:I,onDragLeave:O,onDragOver:H,onDrop:M,onClick:_?void 0:U,children:_?l.jsxs("div",{className:Kl.cuiFileInfo,children:[l.jsxs("div",{className:Kl.cuiFileInfoHeader,children:[l.jsx(Te,{name:"document",className:Kl.cuiDocumentIcon}),l.jsxs("div",{className:Kl.cuiFileDetails,children:[l.jsx(_l,{size:"md",children:h9(_.name)}),(d||c)&&l.jsx(_l,{size:"md",color:"muted",children:Ax(_.size)}),!c&&!d&&l.jsx(_l,{size:"md",color:"danger",children:s}),d&&l.jsx(Te,{size:"xs",state:"success",name:"check"})]}),l.jsxs("div",{className:Kl.cuiFileActions,children:[!c&&!d&&l.jsx(kn,{size:"sm",icon:"refresh",type:"ghost",onClick:G}),l.jsx(kn,{size:"sm",icon:"cross",type:"ghost",onClick:j})]})]}),c&&l.jsxs("div",{className:Kl.cuiProgressContainer,children:[l.jsx("div",{className:Kl.cuiProgressBarContainer,children:l.jsx(D0,{progress:u,type:"small"})}),l.jsxs(_l,{size:"sm",color:"muted",className:Kl.cuiProgressPercentage,children:[u,"%"]})]})]}):l.jsxs(l.Fragment,{children:[l.jsx(Te,{name:"upload",className:Kl.cuiUploadIcon}),l.jsxs("div",{className:Q(Kl.cuiUploadText,{[Kl.cuiSmall]:t==="sm",[Kl.cuiCentered]:t==="md"}),children:[k?l.jsx(_1,{type:"h1",className:Q(Kl.cuiFileUploadTitle,Kl.cuiNotSupported),children:"Unsupported file type"}):l.jsx(_1,{type:"h1",className:Q(Kl.cuiFileUploadTitle,{[Kl.cuiNotSupported]:k}),children:e}),l.jsxs(_l,{className:Kl.cuiFileUploadDescription,children:["Files supported: ",n.join(", ")]})]}),l.jsx(to,{type:"secondary",onClick:Y=>{Y.stopPropagation(),U()},children:"Browse file"})]})}),l.jsx("input",{type:"file",ref:E,accept:q,onChange:V,style:{display:"none"}})]})},un={cuiUploadArea:"_cuiUploadArea_z8sog_1",cuiDragging:"_cuiDragging_z8sog_16",cuiFileUploadTitle:"_cuiFileUploadTitle_z8sog_21",cuiNotSupported:"_cuiNotSupported_z8sog_25",cuiFileUploadDescription:"_cuiFileUploadDescription_z8sog_29",cuiUploadIcon:"_cuiUploadIcon_z8sog_34",cuiUploadText:"_cuiUploadText_z8sog_40",cuiFilesList:"_cuiFilesList_z8sog_48",cuiFileItem:"_cuiFileItem_z8sog_56",cuiError:"_cuiError_z8sog_67",cuiDocumentIcon:"_cuiDocumentIcon_z8sog_72",cuiFileInfoHeader:"_cuiFileInfoHeader_z8sog_78",cuiFileInfo:"_cuiFileInfo_z8sog_78",cuiFileDetails:"_cuiFileDetails_z8sog_92",cuiFileActions:"_cuiFileActions_z8sog_98",cuiProgressContainer:"_cuiProgressContainer_z8sog_105",cuiProgressBarContainer:"_cuiProgressBarContainer_z8sog_113",cuiProgressPercentage:"_cuiProgressPercentage_z8sog_118"},Nx=e=>e<1024?`${e.toFixed(1)} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,Bx=(e,n)=>{if(!n.length)return!0;const t=e.toLowerCase().slice(e.lastIndexOf("."));return n.some(r=>r.toLowerCase()===t.toLowerCase())},Vx=({title:e,supportedFileTypes:n=[".txt",".sql"],files:t,onFileSelect:r,onFileRetry:o,onFileRemove:u,onFileFailure:s})=>{const[c,d]=p.useState(!1),[g,b]=p.useState(!0),C=p.useRef(null),m=p.useRef(0);p.useEffect(()=>{let M;return g||(M=setTimeout(()=>{b(!0)},2e3)),()=>{M&&clearTimeout(M)}},[g]);const k=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current+=1,d(!0)},[]),x=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current-=1,m.current<=0&&(d(!1),m.current=0)},[]),_=p.useCallback(M=>{M.preventDefault(),M.stopPropagation()},[]);p.useEffect(()=>{const M=()=>{d(!1),m.current=0};return window.addEventListener("dragend",M),document.addEventListener("drop",M),document.addEventListener("mouseleave",M),()=>{window.removeEventListener("dragend",M),document.removeEventListener("drop",M),document.removeEventListener("mouseleave",M)}},[]);const L=p.useCallback(M=>{if(!Bx(M.name,n)){b(!1),s&&s();return}b(!0),r&&r(M)},[r,n,s]),E=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),d(!1),m.current=0,M.dataTransfer.files&&M.dataTransfer.files.length>0&&Array.from(M.dataTransfer.files).forEach(V=>{L(V)})},[L]),A=p.useCallback(M=>{M.target.files&&M.target.files.length>0&&Array.from(M.target.files).forEach(V=>{L(V)})},[L]),I=p.useCallback(()=>{C.current&&C.current.click()},[]),O=p.useCallback(M=>{u&&u(M)},[u]),H=p.useCallback(M=>{o&&o(M)},[o]),D=n.join(",");return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Q(un.cuiUploadArea,{[un.cuiDragging]:c}),onDragEnter:k,onDragLeave:x,onDragOver:_,onDrop:E,onClick:I,children:[l.jsx(Te,{name:"upload",className:un.cuiUploadIcon}),l.jsxs("div",{className:un.cuiUploadText,children:[g?l.jsx(_1,{type:"h1",className:Q(un.cuiFileUploadTitle,{[un.cuiNotSupported]:!g}),children:e}):l.jsx(_1,{type:"h1",className:Q(un.cuiFileUploadTitle,un.cuiNotSupported),children:"Unsupported file type"}),l.jsxs(_l,{className:un.cuiFileUploadDescription,children:["Files supported: ",n.join(", ")]})]}),l.jsx(to,{type:"secondary",onClick:M=>{M.stopPropagation(),I()},children:"Browse files"})]}),t.length>0&&l.jsx("div",{className:un.cuiFilesList,children:t.map(M=>l.jsx("div",{className:Q(un.cuiFileItem,{[un.cuiError]:M.status==="error"}),children:l.jsxs("div",{className:un.cuiFileInfo,children:[l.jsxs("div",{className:un.cuiFileInfoHeader,children:[l.jsx(Te,{name:"document",className:un.cuiDocumentIcon}),l.jsxs("div",{className:un.cuiFileDetails,children:[l.jsx(_l,{size:"md",children:h9(M.name)}),(M.status==="success"||M.status==="uploading")&&l.jsx(_l,{size:"md",color:"muted",children:Nx(M.size)}),M.status==="error"&&l.jsx(_l,{size:"md",color:"danger",children:M.errorMessage||"Upload failed"}),M.status==="success"&&l.jsx(Te,{size:"xs",state:"success",name:"check"})]}),l.jsxs("div",{className:un.cuiFileActions,children:[M.status==="error"&&l.jsx(kn,{size:"sm",icon:"refresh",type:"ghost",onClick:()=>H(M.id)}),l.jsx(kn,{size:"sm",icon:"cross",type:"ghost",onClick:()=>O(M.id)})]})]}),M.status==="uploading"&&l.jsxs("div",{className:un.cuiProgressContainer,children:[l.jsx("div",{className:un.cuiProgressBarContainer,children:l.jsx(D0,{progress:M.progress,type:"small"})}),l.jsxs(_l,{size:"sm",color:"muted",className:un.cuiProgressPercentage,children:[M.progress,"%"]})]})]})},M.id))}),l.jsx("input",{type:"file",ref:C,accept:D,onChange:A,multiple:!0,style:{display:"none"}})]})},ul={cuiFlyoutContent:"_cuiFlyoutContent_1ebo7_9",animationWidth:"_animationWidth_1ebo7_1",cuiSizeDefault:"_cuiSizeDefault_1ebo7_20",sizeNarrow:"_sizeNarrow_1ebo7_23",sizeWide:"_sizeWide_1ebo7_26",sizeWidest:"_sizeWidest_1ebo7_29",strategyRelative:"_strategyRelative_1ebo7_32",strategyAbsolute:"_strategyAbsolute_1ebo7_36",strategyFixed:"_strategyFixed_1ebo7_40",typeDefault:"_typeDefault_1ebo7_44",typeInline:"_typeInline_1ebo7_48",alignStart:"_alignStart_1ebo7_52",alignEnd:"_alignEnd_1ebo7_57",active:"_active_1ebo7_76",cuiFlyoutContainer:"_cuiFlyoutContainer_1ebo7_89",cuiFlyoutElement:"_cuiFlyoutElement_1ebo7_98",cuiFlyoutHeaderContainer:"_cuiFlyoutHeaderContainer_1ebo7_113",cuiFlyoutTitle:"_cuiFlyoutTitle_1ebo7_124",cuiFlyoutDescription:"_cuiFlyoutDescription_1ebo7_137",cuiFlyoutBody:"_cuiFlyoutBody_1ebo7_150",alignTop:"_alignTop_1ebo7_154",alignDefault:"_alignDefault_1ebo7_157",cuiFlyoutFooter:"_cuiFlyoutFooter_1ebo7_161",cuiFooterContainer:"_cuiFooterContainer_1ebo7_172",cuiCustomCodeBlock:"_cuiCustomCodeBlock_1ebo7_177"},uo=({modal:e=!1,...n})=>l.jsx(K8,{modal:e,...n}),p9=({children:e,...n})=>l.jsx(J8,{asChild:!0,...n,children:l.jsx("div",{children:e})});p9.displayName="Flyout.Trigger",uo.Trigger=p9;const g9=({showOverlay:e=!1,children:n,container:t,strategy:r="relative",size:o="default",type:u="default",closeOnInteractOutside:s=!1,width:c,align:d="end",onInteractOutside:g,...b})=>{const C=c?{"--flyout-width":c}:{};return l.jsxs(e9,{container:t,children:[e&&l.jsx(l9,{className:"DialogOverlay"}),l.jsx(y0,{className:Q(ul.cuiFlyoutContent,{[ul.cuiSizeDefault]:o==="default"&&!c,[ul.cuiSizeNarrow]:o==="narrow"&&!c,[ul.cuiSizeWide]:o==="wide"&&!c,[ul.cuiSizeWidest]:o==="widest"&&!c,[ul.cuiCustomWidth]:!!c,[ul.cuiStrategyRelative]:r==="relative",[ul.cuiStrategyAbsolute]:r==="absolute",[ul.cuiStrategyFixed]:r==="fixed",[ul.cuiTypeDefault]:u==="default",[ul.cuiTypeInline]:u==="inline",[ul.cuiAlignStart]:d==="start",[ul.cuiAlignEnd]:d==="end"}),style:C,onInteractOutside:m=>{s||m.preventDefault(),typeof g=="function"&&g(m)},...b,children:n})]})};g9.displayName="Flyout.Content",uo.Content=g9;const _0=({type:e="default",...n})=>l.jsx(xl,{orientation:"vertical",padding:"none",gap:"none",className:Q(ul.cuiFlyoutElement,{[ul.cuiTypeDefault]:e==="default",[ul.cuiTypeInline]:e==="inline"}),...n});_0.displayName="Flyout.Element",uo.Element=_0;const C9=({title:e,description:n,type:t="default",children:r,showClose:o=!0,showSeparator:u=!0,...s})=>r?l.jsxs("div",{className:ul.cuiFlyoutContainer,children:[l.jsxs(xl,{className:Q(ul.cuiFlyoutHeaderContainer,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),justifyContent:"space-between",alignItems:"start",padding:"none",gap:"none",fillWidth:!1,isResponsive:!1,...s,children:[l.jsx(xl,{padding:"none",gap:"none",orientation:"vertical",grow:"1",children:r}),o&&l.jsx(va,{asChild:!0,children:l.jsx(V2,{"data-testid":"flyout-header-close-btn",children:l.jsx(Te,{name:"cross",size:t==="inline"?"md":"lg"})})})]}),u&&l.jsx(Uo,{"data-testid":"flyout-header-separator",size:"lg"})]}):l.jsxs("div",{className:ul.cuiFlyoutContainer,children:[l.jsxs(xl,{className:Q(ul.cuiFlyoutHeaderContainer,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),justifyContent:"space-between",alignItems:"start",fillWidth:!1,isResponsive:!1,...s,children:[l.jsxs(xl,{padding:"none",gap:"none",orientation:"vertical",grow:"1",children:[l.jsx(r9,{className:Q(ul.cuiFlyoutTitle,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),children:e}),n&&l.jsx(i9,{className:Q(ul.cuiFlyoutDescription,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),children:n})]}),o&&l.jsx(va,{asChild:!0,children:l.jsx(V2,{"data-testid":"flyout-header-close-btn",children:l.jsx(Te,{name:"cross",size:t==="inline"?"md":"lg"})})})]}),u&&l.jsx(Uo,{"data-testid":"flyout-header-separator",size:"lg"})]});C9.displayName="Flyout.Header",uo.Header=C9;const v9=({align:e="default",...n})=>l.jsx(xl,{overflow:"auto",orientation:"vertical",grow:"1",className:Q(ul.cuiFlyoutBody,{[ul.cuiAlignTop]:e==="top",[ul.cuiAlignDefault]:e==="default"}),...n});v9.displayName="Flyout.Body",uo.Body=v9;const b9=({children:e,...n})=>l.jsx(va,{asChild:!0,children:e??l.jsx(to,{type:"secondary",...n})});b9.displayName="Flyout.Close",uo.Close=b9;const m9=({type:e="default",...n})=>l.jsxs(xl,{gap:"none",orientation:"vertical",alignItems:"end",className:ul.cuiFooterContainer,children:[l.jsx(Uo,{size:"xs"}),l.jsx(xl,{justifyContent:"end",gap:"none",padding:"none",isResponsive:!1,wrap:"wrap",className:Q(ul.cuiFlyoutFooter,{[ul.cuiTypeDefault]:e==="default",[ul.cuiTypeInline]:e==="inline"}),...n})]});m9.displayName="Flyout.Footer",uo.Footer=m9;const Wx=({statement:e,language:n,wrapLines:t,showLineNumbers:r,showWrapButton:o,onCopy:u,onCopyError:s,...c})=>l.jsxs(_0,{fillHeight:!0,...c,children:[l.jsx(s8,{wrapLines:t,language:n,showLineNumbers:r,showWrapButton:o,onCopy:u,onCopyError:s,className:ul.cuiCustomCodeBlock,children:e}),l.jsx(Gi,{size:"xs"})]});uo.CodeBlock=Wx;const Zx=({id:e,label:n,orientation:t,dir:r,error:o,children:u,addLabelPadding:s,...c})=>l.jsxs(Es,{orientation:t,dir:r,addLabelPadding:s,...c,children:[l.jsxs(Z2,{children:[u,!!o&&o!==!0&&l.jsx(B2,{children:o})]}),n&&l.jsx(na,{htmlFor:e,error:!!o,children:n})]}),Ux={cuiInlineContainer:"_cuiInlineContainer_1i0m0_1"},zx=e=>l.jsx("span",{className:Ux.cuiInlineContainer,...e});function jx(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,d0(e,n)}var w9=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function Gx(e,n){return!!(e===n||w9(e)&&w9(n))}function Xx(e,n){if(e.length!==n.length)return!1;for(var t=0;t<e.length;t++)if(!Gx(e[t],n[t]))return!1;return!0}function k0(e,n){n===void 0&&(n=Xx);var t,r=[],o,u=!1;function s(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return u&&t===this&&n(c,r)||(o=e.apply(this,c),u=!0,t=this,r=c),o}return s}var Yx=typeof performance=="object"&&typeof performance.now=="function",y9=Yx?function(){return performance.now()}:function(){return Date.now()};function S9(e){cancelAnimationFrame(e.id)}function qx(e,n){var t=y9();function r(){y9()-t>=n?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var L0=-1;function Kx(e){if(e===void 0&&(e=!1),L0===-1||e){var n=document.createElement("div"),t=n.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(n),L0=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return L0}var Ni=null;function _9(e){if(e===void 0&&(e=!1),Ni===null||e){var n=document.createElement("div"),t=n.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",n.appendChild(r),document.body.appendChild(n),n.scrollLeft>0?Ni="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?Ni="negative":Ni="positive-ascending"),document.body.removeChild(n),Ni}return Ni}var Jx=150,Qx=function(n){var t=n.columnIndex;n.data;var r=n.rowIndex;return r+":"+t},wc=null,yc=null,Sc=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(wc=new WeakSet,yc=new WeakSet,Sc=new WeakSet);function Rx(e){var n,t=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,u=e.getColumnWidth,s=e.getEstimatedTotalHeight,c=e.getEstimatedTotalWidth,d=e.getOffsetForColumnAndAlignment,g=e.getOffsetForRowAndAlignment,b=e.getRowHeight,C=e.getRowOffset,m=e.getRowStartIndexForOffset,k=e.getRowStopIndexForStartIndex,x=e.initInstanceProps,_=e.shouldResetStyleCacheOnItemSizeChange,L=e.validateProps;return n=function(E){jx(A,E);function A(O){var H;return H=E.call(this,O)||this,H._instanceProps=x(H.props,t8(H)),H._resetIsScrollingTimeoutId=null,H._outerRef=void 0,H.state={instance:t8(H),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:typeof H.props.initialScrollLeft=="number"?H.props.initialScrollLeft:0,scrollTop:typeof H.props.initialScrollTop=="number"?H.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},H._callOnItemsRendered=void 0,H._callOnItemsRendered=k0(function(D,M,V,U,j,G,q,Y){return H.props.onItemsRendered({overscanColumnStartIndex:D,overscanColumnStopIndex:M,overscanRowStartIndex:V,overscanRowStopIndex:U,visibleColumnStartIndex:j,visibleColumnStopIndex:G,visibleRowStartIndex:q,visibleRowStopIndex:Y})}),H._callOnScroll=void 0,H._callOnScroll=k0(function(D,M,V,U,j){return H.props.onScroll({horizontalScrollDirection:V,scrollLeft:D,scrollTop:M,verticalScrollDirection:U,scrollUpdateWasRequested:j})}),H._getItemStyle=void 0,H._getItemStyle=function(D,M){var V=H.props,U=V.columnWidth,j=V.direction,G=V.rowHeight,q=H._getItemStyleCache(_&&U,_&&j,_&&G),Y=D+":"+M,X;if(q.hasOwnProperty(Y))X=q[Y];else{var ue=t(H.props,M,H._instanceProps),ee=j==="rtl";q[Y]=X={position:"absolute",left:ee?void 0:ue,right:ee?ue:void 0,top:C(H.props,D,H._instanceProps),height:b(H.props,D,H._instanceProps),width:u(H.props,M,H._instanceProps)}}return X},H._getItemStyleCache=void 0,H._getItemStyleCache=k0(function(D,M,V){return{}}),H._onScroll=function(D){var M=D.currentTarget,V=M.clientHeight,U=M.clientWidth,j=M.scrollLeft,G=M.scrollTop,q=M.scrollHeight,Y=M.scrollWidth;H.setState(function(X){if(X.scrollLeft===j&&X.scrollTop===G)return null;var ue=H.props.direction,ee=j;if(ue==="rtl")switch(_9()){case"negative":ee=-j;break;case"positive-descending":ee=Y-U-j;break}ee=Math.max(0,Math.min(ee,Y-U));var ae=Math.max(0,Math.min(G,q-V));return{isScrolling:!0,horizontalScrollDirection:X.scrollLeft<j?"forward":"backward",scrollLeft:ee,scrollTop:ae,verticalScrollDirection:X.scrollTop<G?"forward":"backward",scrollUpdateWasRequested:!1}},H._resetIsScrollingDebounced)},H._outerRefSetter=function(D){var M=H.props.outerRef;H._outerRef=D,typeof M=="function"?M(D):M!=null&&typeof M=="object"&&M.hasOwnProperty("current")&&(M.current=D)},H._resetIsScrollingDebounced=function(){H._resetIsScrollingTimeoutId!==null&&S9(H._resetIsScrollingTimeoutId),H._resetIsScrollingTimeoutId=qx(H._resetIsScrolling,Jx)},H._resetIsScrolling=function(){H._resetIsScrollingTimeoutId=null,H.setState({isScrolling:!1},function(){H._getItemStyleCache(-1)})},H}A.getDerivedStateFromProps=function(H,D){return eM(H,D),L(H),null};var I=A.prototype;return I.scrollTo=function(H){var D=H.scrollLeft,M=H.scrollTop;D!==void 0&&(D=Math.max(0,D)),M!==void 0&&(M=Math.max(0,M)),this.setState(function(V){return D===void 0&&(D=V.scrollLeft),M===void 0&&(M=V.scrollTop),V.scrollLeft===D&&V.scrollTop===M?null:{horizontalScrollDirection:V.scrollLeft<D?"forward":"backward",scrollLeft:D,scrollTop:M,scrollUpdateWasRequested:!0,verticalScrollDirection:V.scrollTop<M?"forward":"backward"}},this._resetIsScrollingDebounced)},I.scrollToItem=function(H){var D=H.align,M=D===void 0?"auto":D,V=H.columnIndex,U=H.rowIndex,j=this.props,G=j.columnCount,q=j.height,Y=j.rowCount,X=j.width,ue=this.state,ee=ue.scrollLeft,ae=ue.scrollTop,de=Kx();V!==void 0&&(V=Math.max(0,Math.min(V,G-1))),U!==void 0&&(U=Math.max(0,Math.min(U,Y-1)));var re=s(this.props,this._instanceProps),be=c(this.props,this._instanceProps),me=be>X?de:0,Me=re>q?de:0;this.scrollTo({scrollLeft:V!==void 0?d(this.props,V,M,ee,this._instanceProps,Me):ee,scrollTop:U!==void 0?g(this.props,U,M,ae,this._instanceProps,me):ae})},I.componentDidMount=function(){var H=this.props,D=H.initialScrollLeft,M=H.initialScrollTop;if(this._outerRef!=null){var V=this._outerRef;typeof D=="number"&&(V.scrollLeft=D),typeof M=="number"&&(V.scrollTop=M)}this._callPropsCallbacks()},I.componentDidUpdate=function(){var H=this.props.direction,D=this.state,M=D.scrollLeft,V=D.scrollTop,U=D.scrollUpdateWasRequested;if(U&&this._outerRef!=null){var j=this._outerRef;if(H==="rtl")switch(_9()){case"negative":j.scrollLeft=-M;break;case"positive-ascending":j.scrollLeft=M;break;default:var G=j.clientWidth,q=j.scrollWidth;j.scrollLeft=q-G-M;break}else j.scrollLeft=Math.max(0,M);j.scrollTop=Math.max(0,V)}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&S9(this._resetIsScrollingTimeoutId)},I.render=function(){var H=this.props,D=H.children,M=H.className,V=H.columnCount,U=H.direction,j=H.height,G=H.innerRef,q=H.innerElementType,Y=H.innerTagName,X=H.itemData,ue=H.itemKey,ee=ue===void 0?Qx:ue,ae=H.outerElementType,de=H.outerTagName,re=H.rowCount,be=H.style,me=H.useIsScrolling,Me=H.width,le=this.state.isScrolling,fe=this._getHorizontalRangeToRender(),we=fe[0],ye=fe[1],Be=this._getVerticalRangeToRender(),sl=Be[0],Pe=Be[1],ll=[];if(V>0&&re)for(var nl=sl;nl<=Pe;nl++)for(var fl=we;fl<=ye;fl++)ll.push(p.createElement(D,{columnIndex:fl,data:X,isScrolling:me?le:void 0,key:ee({columnIndex:fl,data:X,rowIndex:nl}),rowIndex:nl,style:this._getItemStyle(nl,fl)}));var rl=s(this.props,this._instanceProps),cl=c(this.props,this._instanceProps);return p.createElement(ae||de||"div",{className:M,onScroll:this._onScroll,ref:this._outerRefSetter,style:ie({position:"relative",height:j,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:U},be)},p.createElement(q||Y||"div",{children:ll,ref:G,style:{height:rl,pointerEvents:le?"none":void 0,width:cl}}))},I._callPropsCallbacks=function(){var H=this.props,D=H.columnCount,M=H.onItemsRendered,V=H.onScroll,U=H.rowCount;if(typeof M=="function"&&D>0&&U>0){var j=this._getHorizontalRangeToRender(),G=j[0],q=j[1],Y=j[2],X=j[3],ue=this._getVerticalRangeToRender(),ee=ue[0],ae=ue[1],de=ue[2],re=ue[3];this._callOnItemsRendered(G,q,ee,ae,Y,X,de,re)}if(typeof V=="function"){var be=this.state,me=be.horizontalScrollDirection,Me=be.scrollLeft,le=be.scrollTop,fe=be.scrollUpdateWasRequested,we=be.verticalScrollDirection;this._callOnScroll(Me,le,me,we,fe)}},I._getHorizontalRangeToRender=function(){var H=this.props,D=H.columnCount,M=H.overscanColumnCount,V=H.overscanColumnsCount,U=H.overscanCount,j=H.rowCount,G=this.state,q=G.horizontalScrollDirection,Y=G.isScrolling,X=G.scrollLeft,ue=M||V||U||1;if(D===0||j===0)return[0,0,0,0];var ee=r(this.props,X,this._instanceProps),ae=o(this.props,ee,X,this._instanceProps),de=!Y||q==="backward"?Math.max(1,ue):1,re=!Y||q==="forward"?Math.max(1,ue):1;return[Math.max(0,ee-de),Math.max(0,Math.min(D-1,ae+re)),ee,ae]},I._getVerticalRangeToRender=function(){var H=this.props,D=H.columnCount,M=H.overscanCount,V=H.overscanRowCount,U=H.overscanRowsCount,j=H.rowCount,G=this.state,q=G.isScrolling,Y=G.verticalScrollDirection,X=G.scrollTop,ue=V||U||M||1;if(D===0||j===0)return[0,0,0,0];var ee=m(this.props,X,this._instanceProps),ae=k(this.props,ee,X,this._instanceProps),de=!q||Y==="backward"?Math.max(1,ue):1,re=!q||Y==="forward"?Math.max(1,ue):1;return[Math.max(0,ee-de),Math.max(0,Math.min(j-1,ae+re)),ee,ae]},A}(p.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},n}var eM=function(n,t){var r=n.children,o=n.direction,u=n.height,s=n.innerTagName,c=n.outerTagName,d=n.overscanColumnsCount,g=n.overscanCount,b=n.overscanRowsCount,C=n.width,m=t.instance;if(process.env.NODE_ENV!=="production"){if(typeof g=="number"&&wc&&!wc.has(m)&&(wc.add(m),console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")),(typeof d=="number"||typeof b=="number")&&yc&&!yc.has(m)&&(yc.add(m),console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")),(s!=null||c!=null)&&Sc&&!Sc.has(m)&&(Sc.add(m),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")),r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));switch(o){case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}if(typeof C!="number")throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. '+('"'+(C===null?"null":typeof C)+'" was specified.'));if(typeof u!="number")throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. '+('"'+(u===null?"null":typeof u)+'" was specified.'))}},k9=50,L9=function(n,t){var r=n.rowCount,o=t.rowMetadataMap,u=t.estimatedRowHeight,s=t.lastMeasuredRowIndex,c=0;if(s>=r&&(s=r-1),s>=0){var d=o[s];c=d.offset+d.size}var g=r-s-1,b=g*u;return c+b},x9=function(n,t){var r=n.columnCount,o=t.columnMetadataMap,u=t.estimatedColumnWidth,s=t.lastMeasuredColumnIndex,c=0;if(s>=r&&(s=r-1),s>=0){var d=o[s];c=d.offset+d.size}var g=r-s-1,b=g*u;return c+b},ao=function(n,t,r,o){var u,s,c;if(n==="column"?(u=o.columnMetadataMap,s=t.columnWidth,c=o.lastMeasuredColumnIndex):(u=o.rowMetadataMap,s=t.rowHeight,c=o.lastMeasuredRowIndex),r>c){var d=0;if(c>=0){var g=u[c];d=g.offset+g.size}for(var b=c+1;b<=r;b++){var C=s(b);u[b]={offset:d,size:C},d+=C}n==="column"?o.lastMeasuredColumnIndex=r:o.lastMeasuredRowIndex=r}return u[r]},M9=function(n,t,r,o){var u,s;n==="column"?(u=r.columnMetadataMap,s=r.lastMeasuredColumnIndex):(u=r.rowMetadataMap,s=r.lastMeasuredRowIndex);var c=s>0?u[s].offset:0;return c>=o?E9(n,t,r,s,0,o):lM(n,t,r,Math.max(0,s),o)},E9=function(n,t,r,o,u,s){for(;u<=o;){var c=u+Math.floor((o-u)/2),d=ao(n,t,c,r).offset;if(d===s)return c;d<s?u=c+1:d>s&&(o=c-1)}return u>0?u-1:0},lM=function(n,t,r,o,u){for(var s=n==="column"?t.columnCount:t.rowCount,c=1;o<s&&ao(n,t,o,r).offset<u;)o+=c,c*=2;return E9(n,t,r,Math.min(o,s-1),Math.floor(o/2),u)},F9=function(n,t,r,o,u,s,c){var d=n==="column"?t.width:t.height,g=ao(n,t,r,s),b=n==="column"?x9(t,s):L9(t,s),C=Math.max(0,Math.min(b-d,g.offset)),m=Math.max(0,g.offset-d+c+g.size);switch(o==="smart"&&(u>=m-d&&u<=C+d?o="auto":o="center"),o){case"start":return C;case"end":return m;case"center":return Math.round(m+(C-m)/2);case"auto":default:return u>=m&&u<=C?u:m>C||u<m?m:C}},nM=Rx({getColumnOffset:function(n,t,r){return ao("column",n,t,r).offset},getColumnStartIndexForOffset:function(n,t,r){return M9("column",n,r,t)},getColumnStopIndexForStartIndex:function(n,t,r,o){for(var u=n.columnCount,s=n.width,c=ao("column",n,t,o),d=r+s,g=c.offset+c.size,b=t;b<u-1&&g<d;)b++,g+=ao("column",n,b,o).size;return b},getColumnWidth:function(n,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:L9,getEstimatedTotalWidth:x9,getOffsetForColumnAndAlignment:function(n,t,r,o,u,s){return F9("column",n,t,r,o,u,s)},getOffsetForRowAndAlignment:function(n,t,r,o,u,s){return F9("row",n,t,r,o,u,s)},getRowOffset:function(n,t,r){return ao("row",n,t,r).offset},getRowHeight:function(n,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(n,t,r){return M9("row",n,r,t)},getRowStopIndexForStartIndex:function(n,t,r,o){for(var u=n.rowCount,s=n.height,c=ao("row",n,t,o),d=r+s,g=c.offset+c.size,b=t;b<u-1&&g<d;)b++,g+=ao("row",n,b,o).size;return b},initInstanceProps:function(n,t){var r=n,o=r.estimatedColumnWidth,u=r.estimatedRowHeight,s={columnMetadataMap:{},estimatedColumnWidth:o||k9,estimatedRowHeight:u||k9,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(c,d){d===void 0&&(d=!0),t.resetAfterIndices({columnIndex:c,shouldForceUpdate:d})},t.resetAfterRowIndex=function(c,d){d===void 0&&(d=!0),t.resetAfterIndices({rowIndex:c,shouldForceUpdate:d})},t.resetAfterIndices=function(c){var d=c.columnIndex,g=c.rowIndex,b=c.shouldForceUpdate,C=b===void 0?!0:b;typeof d=="number"&&(s.lastMeasuredColumnIndex=Math.min(s.lastMeasuredColumnIndex,d-1)),typeof g=="number"&&(s.lastMeasuredRowIndex=Math.min(s.lastMeasuredRowIndex,g-1)),t._getItemStyleCache(-1),C&&t.forceUpdate()},s},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(n){var t=n.columnWidth,r=n.rowHeight;if(process.env.NODE_ENV!=="production"){if(typeof t!="function")throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. '+('"'+(t===null?"null":typeof t)+'" was specified.'));if(typeof r!="function")throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. '+('"'+(r===null?"null":typeof r)+'" was specified.'))}}});process.env.NODE_ENV;function $9(e,n){for(var t in e)if(!(t in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1}var tM=["style"],rM=["style"];function oM(e,n){var t=e.style,r=K3(e,tM),o=n.style,u=K3(n,rM);return!$9(t,o)&&!$9(r,u)}let At;typeof window<"u"?At=window:typeof self<"u"?At=self:At=global;let x0=null,M0=null;const T9=20,E0=At.clearTimeout,I9=At.setTimeout,F0=At.cancelAnimationFrame||At.mozCancelAnimationFrame||At.webkitCancelAnimationFrame,D9=At.requestAnimationFrame||At.mozRequestAnimationFrame||At.webkitRequestAnimationFrame;F0==null||D9==null?(x0=E0,M0=function(n){return I9(n,T9)}):(x0=function([n,t]){F0(n),E0(t)},M0=function(n){const t=D9(function(){E0(r),n()}),r=I9(function(){F0(t),n()},T9);return[t,r]});function iM(e){let n,t,r,o,u,s,c;const d=typeof document<"u"&&document.attachEvent;if(!d){s=function(E){const A=E.__resizeTriggers__,I=A.firstElementChild,O=A.lastElementChild,H=I.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,H.style.width=I.offsetWidth+1+"px",H.style.height=I.offsetHeight+1+"px",I.scrollLeft=I.scrollWidth,I.scrollTop=I.scrollHeight},u=function(E){return E.offsetWidth!==E.__resizeLast__.width||E.offsetHeight!==E.__resizeLast__.height},c=function(E){if(E.target.className&&typeof E.target.className.indexOf=="function"&&E.target.className.indexOf("contract-trigger")<0&&E.target.className.indexOf("expand-trigger")<0)return;const A=this;s(this),this.__resizeRAF__&&x0(this.__resizeRAF__),this.__resizeRAF__=M0(function(){u(A)&&(A.__resizeLast__.width=A.offsetWidth,A.__resizeLast__.height=A.offsetHeight,A.__resizeListeners__.forEach(function(H){H.call(A,E)}))})};let m=!1,k="";r="animationstart";const x="Webkit Moz O ms".split(" ");let _="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const E=document.createElement("fakeelement");if(E.style.animationName!==void 0&&(m=!0),m===!1){for(let A=0;A<x.length;A++)if(E.style[x[A]+"AnimationName"]!==void 0){L=x[A],k="-"+L.toLowerCase()+"-",r=_[A],m=!0;break}}}t="resizeanim",n="@"+k+"keyframes "+t+" { from { opacity: 0; } to { opacity: 0; } } ",o=k+"animation: 1ms "+t+"; "}const g=function(m){if(!m.getElementById("detectElementResize")){const k=(n||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',x=m.head||m.getElementsByTagName("head")[0],_=m.createElement("style");_.id="detectElementResize",_.type="text/css",e!=null&&_.setAttribute("nonce",e),_.styleSheet?_.styleSheet.cssText=k:_.appendChild(m.createTextNode(k)),x.appendChild(_)}};return{addResizeListener:function(m,k){if(d)m.attachEvent("onresize",k);else{if(!m.__resizeTriggers__){const x=m.ownerDocument,_=At.getComputedStyle(m);_&&_.position==="static"&&(m.style.position="relative"),g(x),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=x.createElement("div")).className="resize-triggers";const L=x.createElement("div");L.className="expand-trigger",L.appendChild(x.createElement("div"));const E=x.createElement("div");E.className="contract-trigger",m.__resizeTriggers__.appendChild(L),m.__resizeTriggers__.appendChild(E),m.appendChild(m.__resizeTriggers__),s(m),m.addEventListener("scroll",c,!0),r&&(m.__resizeTriggers__.__animationListener__=function(I){I.animationName===t&&s(m)},m.__resizeTriggers__.addEventListener(r,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(k)}},removeResizeListener:function(m,k){if(d)m.detachEvent("onresize",k);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(k),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",c,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(r,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}}}}class uM extends p.Component{constructor(...n){super(...n),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:t,disableWidth:r,onResize:o}=this.props;if(this._parentNode){const u=window.getComputedStyle(this._parentNode)||{},s=parseFloat(u.paddingLeft||"0"),c=parseFloat(u.paddingRight||"0"),d=parseFloat(u.paddingTop||"0"),g=parseFloat(u.paddingBottom||"0"),b=this._parentNode.getBoundingClientRect(),C=b.height-d-g,m=b.width-s-c,k=this._parentNode.offsetHeight-d-g,x=this._parentNode.offsetWidth-s-c;(!t&&(this.state.height!==k||this.state.scaledHeight!==C)||!r&&(this.state.width!==x||this.state.scaledWidth!==m))&&(this.setState({height:k,width:x,scaledHeight:C,scaledWidth:m}),typeof o=="function"&&o({height:k,scaledHeight:C,scaledWidth:m,width:x}))}},this._setRef=t=>{this._autoSizer=t}}componentDidMount(){const{nonce:n}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(t!=null&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const r=t.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)):(this._detectElementResize=iM(n),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:n,defaultHeight:t,defaultWidth:r,disableHeight:o=!1,disableWidth:u=!1,doNotBailOutOnEmptyChildren:s=!1,nonce:c,onResize:d,style:g={},tagName:b="div",...C}=this.props,{height:m,scaledHeight:k,scaledWidth:x,width:_}=this.state,L={overflow:"visible"},E={};let A=!1;return o||(m===0&&(A=!0),L.height=0,E.height=m,E.scaledHeight=k),u||(_===0&&(A=!0),L.width=0,E.width=_,E.scaledWidth=x),s&&(A=!1),p.createElement(b,{ref:this._setRef,style:{...L,...g},...C},!A&&n(E))}}const tn={cuiStyledCell:"_cuiStyledCell_1mfpc_1",cuiHeightFixed:"_cuiHeightFixed_1mfpc_15",cuiHeightAuto:"_cuiHeightAuto_1mfpc_19",cuiTypeBody:"_cuiTypeBody_1mfpc_25",cuiSelectionDefault:"_cuiSelectionDefault_1mfpc_25",cuiSelectionSelectIndirect:"_cuiSelectionSelectIndirect_1mfpc_33",cuiSelectionSelectDirect:"_cuiSelectionSelectDirect_1mfpc_41",cuiTypeHeader:"_cuiTypeHeader_1mfpc_50",cuiFocused:"_cuiFocused_1mfpc_75",cuiBorderNone:"_cuiBorderNone_1mfpc_82",cuiBorderRightNone:"_cuiBorderRightNone_1mfpc_86",cuiBorderBottomNone:"_cuiBorderBottomNone_1mfpc_90",cuiLastRowBorder:"_cuiLastRowBorder_1mfpc_94",selectionDefault:"_selectionDefault_1mfpc_97",focused:"_focused_1mfpc_97",selectionSelectIndirect:"_selectionSelectIndirect_1mfpc_100",selectionSelectDirect:"_selectionSelectDirect_1mfpc_103",cuiLastColumnBorder:"_cuiLastColumnBorder_1mfpc_119",cuiHeaderNoBorder:"_cuiHeaderNoBorder_1mfpc_144",cuiPseudoBorder:"_cuiPseudoBorder_1mfpc_151",cuiSelectedTop:"_cuiSelectedTop_1mfpc_161",cuiSelectedLeft:"_cuiSelectedLeft_1mfpc_168",cuiSelectedBottomDirect:"_cuiSelectedBottomDirect_1mfpc_175",cuiSelectedRightDirect:"_cuiSelectedRightDirect_1mfpc_182",cuiPseudoBorderNone:"_cuiPseudoBorderNone_1mfpc_189"},ba=p.forwardRef(({$isFocused:e,$selectionType:n,$isSelectedTop:t,$isSelectedLeft:r,$isLastRow:o,$isLastColumn:u,$height:s,$type:c="body",$showBorder:d,$rowAutoHeight:g,className:b,style:C,...m},k)=>{const x=t||r||n==="selectDirect"&&(o||u)||g,_=Q(tn.cuiStyledCell,{[tn.cuiHeightFixed]:!g,[tn.cuiHeightAuto]:g,[tn.cuiTypeBody]:c==="body",[tn.cuiTypeHeader]:c==="header",[tn.cuiSelectionDefault]:n==="default",[tn.cuiSelectionSelectIndirect]:n==="selectIndirect",[tn.cuiSelectionSelectDirect]:n==="selectDirect",[tn.cuiFocused]:e,[tn.cuiBorderNone]:g,[tn.cuiBorderRightNone]:!u,[tn.cuiBorderBottomNone]:!o,[tn.cuiLastRowBorder]:o,[tn.cuiLastColumnBorder]:u,[tn.cuiHeaderNoBorder]:c==="header"&&!d,[tn.cuiPseudoBorder]:x,[tn.cuiSelectedTop]:t,[tn.cuiSelectedLeft]:r,[tn.cuiSelectedBottomDirect]:n==="selectDirect"&&o,[tn.cuiSelectedRightDirect]:n==="selectDirect"&&u,[tn.cuiPseudoBorderNone]:g},b),L={height:g?"100%":`${s}px`,...C};return l.jsx("div",{ref:k,className:_,style:L,...m})});ba.displayName="StyledCell";const _c={cuiRowNumberColumnContainer:"_cuiRowNumberColumnContainer_18t1l_1",cuiScrolledHorizontal:"_cuiScrolledHorizontal_18t1l_6",cuiRowNumberCell:"_cuiRowNumberCell_18t1l_10",cuiAutoHeight:"_cuiAutoHeight_18t1l_18"},aM=({rowIndex:e,rowHeight:n,getSelectionType:t,isLastRow:r,isFirstRow:o,showBorder:u,rowStart:s,rowAutoHeight:c})=>{const d=e+s,g=t({row:d,type:"row"}),b=g==="selectDirect",C=t({row:d-1,type:"row"}),m=(C==="selectDirect"||b)&&C!==g;return l.jsx("div",{className:Q(_c.cuiRowNumberCell,{[_c.cuiAutoHeight]:c}),style:{top:`${n*e}px`,height:c?"100%":`${n}px`},children:l.jsx(ba,{$height:n,$isLastColumn:!1,$selectionType:g,$isFirstColumn:!0,$type:"header",$isFirstRow:o,$isFocused:!1,$isLastRow:r,$isSelectedLeft:b,$isSelectedTop:m,$rowAutoHeight:c,"data-selected":b,"data-grid-row":d,"data-grid-column":-1,"data-testid":`header-cell-${d}-x`,$showBorder:u,"data-align":"right",children:d})})},sM=({minRow:e,maxRow:n,rowHeight:t,headerHeight:r,rowWidth:o,getSelectionType:u,rowCount:s,showHeader:c,scrolledHorizontal:d,rowStart:g=0,showBorder:b,rowAutoHeight:C})=>l.jsx("div",{className:Q(_c.cuiRowNumberColumnContainer,{[_c.cuiScrolledHorizontal]:d}),style:{top:`${r}px`,width:`${o}px`},children:Array.from({length:n-e+1},(m,k)=>e+k).map(m=>l.jsx(aM,{getSelectionType:u,rowHeight:t,rowIndex:m,isLastRow:m===s,isFirstRow:!c&&m===0,showBorder:b,rowStart:g,rowAutoHeight:C},`row-number-${m}`))}),kc={left:"calc(100% - 4px)",top:"0"},cM=()=>{const[e,n]=p.useState(-1),[t,r]=p.useState(null),[o,u]=p.useState(kc),[s,c]=p.useState(0),d=p.useCallback(C=>e===C,[e]),g=p.useCallback((C,m)=>{m?(n(C),c(Date.now())):n(-1)},[]),b=p.useCallback(C=>e!==C?kc:o,[o,e]);return{pointer:t,setPointer:r,getIsPressed:d,setIsPressed:g,getPosition:b,setPosition:u,lastPressedTimestamp:s}},H9={cuiResizeSpan:"_cuiResizeSpan_kkd5c_1",cuiPressed:"_cuiPressed_kkd5c_11"},dM=(e,n,t={})=>{let r=null,o=0;const{leading:u=!0,trailing:s=!0}=t;return(...c)=>{const d=Date.now();!o&&!u&&(o=d);const g=n-(d-o);g<=0||g>n?(r&&(clearTimeout(r),r=null),o=d,e(...c)):!r&&s&&(r=setTimeout(()=>{o=u?Date.now():0,r=null,e(...c)},g))}},fM=300,hM=({height:e,onColumnResize:n,columnIndex:t,getResizerPosition:r,columnWidth:o,resizingState:u})=>{const s=p.useRef(null),{pointer:c,setPointer:d,getIsPressed:g,setIsPressed:b,getPosition:C,setPosition:m,lastPressedTimestamp:k}=u,x=g(t),_=C(t),L=dM(n,1e3);p.useEffect(()=>{const I=s.current;if(!x||!I||!c)return;const O=c.pointerId;try{return I.setPointerCapture(O),()=>{I.hasPointerCapture(O)&&I.releasePointerCapture(O)}}catch(H){console.error(H)}},[c,x,t]);const E=p.useCallback(I=>{if(I.stopPropagation(),I.preventDefault(),s.current){k>Date.now()-fM&&L(t,0,"auto"),d({pointerId:I.pointerId,initialClientX:I.clientX,width:o}),b(t,!0);const O=r(I.clientX,o,t);m(O)}},[k,d,o,b,t,r,m,L]),A=p.useCallback(I=>{if(I.stopPropagation(),I.preventDefault(),x&&c){const O=o+(I.clientX-c.initialClientX),H=r(I.clientX,O,t);m(H),c.width=Math.max(O,50)}},[c,x,o,r,t,m]);return l.jsx("div",{ref:s,className:Q(H9.cuiResizeSpan,{[H9.cuiPressed]:x}),style:{height:`${e}px`,top:_.top,left:_.left},onPointerDown:E,onPointerUp:I=>{I.preventDefault(),I.stopPropagation(),s.current&&(c!=null&&c.pointerId||(c==null?void 0:c.pointerId)===0)&&(I.clientX!==c.initialClientX&&L(t,c.width,"manual"),m(kc),d(null),b(t,!1))},onPointerMove:A,onPointerCancel:I=>{I.preventDefault(),I.stopPropagation(),m(kc),d(null),b(t,!1)},onClick:I=>I.stopPropagation(),"data-resize":!0})},M1={cuiHeaderContainer:"_cuiHeaderContainer_1is3q_1",cuiScrolledVertical:"_cuiScrolledVertical_1is3q_8",cuiScrollableHeaderContainer:"_cuiScrollableHeaderContainer_1is3q_12",cuiHeaderCellContainer:"_cuiHeaderCellContainer_1is3q_16",cuiRowColumnContainer:"_cuiRowColumnContainer_1is3q_24",cuiScrolledHorizontal:"_cuiScrolledHorizontal_1is3q_31",cuiRowColumn:"_cuiRowColumn_1is3q_24"},pM=({columnIndex:e,cell:n,getColumnWidth:t,getColumnHorizontalPosition:r,getSelectionType:o,isFirstColumn:u,isLastColumn:s,onColumnResize:c,height:d,getResizerPosition:g,showBorder:b,resizingState:C})=>{const m=o({column:e,type:"column"}),k=o({column:e-1,type:"column"}),x=r(e),_=m==="selectDirect",L=(k==="selectDirect"||_)&&k!==m,E=t(e);return l.jsxs("div",{className:M1.cuiHeaderCellContainer,style:{width:typeof E=="string"?E:`${E}px`,height:`${d}px`,left:`${x}px`},"data-header":e,children:[l.jsx(ba,{$type:"header",$isFirstColumn:u,$selectionType:m,$isLastColumn:s,$isFocused:!1,$isSelectedLeft:L,$isSelectedTop:_,$isLastRow:!1,$isFirstRow:!0,$height:d,"data-grid-row":-1,"data-grid-column":e,"data-selected":_,$showBorder:b,children:p.createElement(n,{columnIndex:e,type:"header-cell",width:E})}),l.jsx(hM,{height:d,onColumnResize:c,columnIndex:e,getResizerPosition:g,columnWidth:E,resizingState:C})]})},gM=({scrolledVertical:e,scrolledHorizontal:n,showRowNumber:t,rowNumberWidth:r,minColumn:o,maxColumn:u,height:s,getColumnWidth:c,cell:d,columnCount:g,getSelectionType:b,onColumnResize:C,getColumnHorizontalPosition:m,getResizerPosition:k,showBorder:x,resizingState:_})=>{const L=b({type:"all"});return l.jsxs("div",{className:Q(M1.cuiHeaderContainer,{[M1.cuiScrolledVertical]:e}),style:{height:`${s}px`},children:[l.jsx("div",{className:M1.cuiScrollableHeaderContainer,style:{left:`${r}px`},children:Array.from({length:u-o+1},(E,A)=>o+A).map(E=>l.jsx(pM,{getSelectionType:b,columnIndex:E,getColumnWidth:c,getColumnHorizontalPosition:m,cell:d,isFirstColumn:E===0&&!t,isLastColumn:E+1===g,onColumnResize:C,height:s,getResizerPosition:k,showBorder:x,resizingState:_},`header-${E}`))}),t&&l.jsx("div",{className:Q(M1.cuiRowColumnContainer,{[M1.cuiScrolledHorizontal]:n}),style:{width:typeof r=="string"?r:`${r}px`,height:`${s}px`,left:"0px"},children:l.jsx(ba,{className:M1.cuiRowColumn,"data-selected":L==="selectDirect",$type:"header",$isFirstRow:!0,$isFirstColumn:!0,$selectionType:L,$isLastRow:!1,$isLastColumn:!1,$height:s,$isFocused:!1,$isSelectedLeft:!1,$isSelectedTop:!1,"data-grid-row":-1,"data-grid-column":-1,$showBorder:x,children:"#"})})]})},Pt={cuiGridContainer:"_cuiGridContainer_kf4j1_1",cuiGridDataContainer:"_cuiGridDataContainer_kf4j1_8",cuiContextMenuTrigger:"_cuiContextMenuTrigger_kf4j1_14",cuiFixedHeight:"_cuiFixedHeight_kf4j1_20",cuiRoundedNone:"_cuiRoundedNone_kf4j1_23",cuiRoundedSm:"_cuiRoundedSm_kf4j1_26",cuiRoundedMd:"_cuiRoundedMd_kf4j1_29",cuiRoundedLg:"_cuiRoundedLg_kf4j1_32",cuiRoundedXl:"_cuiRoundedXl_kf4j1_35",cuiShowBorder:"_cuiShowBorder_kf4j1_38",cuiHideBorder:"_cuiHideBorder_kf4j1_41"},A9=(e,n,t,r)=>{const o=Math.min(e,t),u=Math.max(e,t),s=Math.min(n,r),c=Math.max(n,r);return{left:o,right:u,top:s,bottom:c}},Lc=(e,n,t,r,o)=>{const{left:u,right:s,top:c,bottom:d}=A9(n,t,r,o);switch(e.type){case"columns":for(let g=u;g<=s;++g)if(!e.columns.has(g))return!1;return!0;case"rows":for(let g=c;g<=d;++g)if(!e.rows.has(g))return!1;return!0;case"rectangle":return e.bounds.left<=u&&e.bounds.right>=s&&e.bounds.top<=c&&e.bounds.bottom>=d;default:return!1}},P9=(e,n)=>({type:"rows",rows:new Set(e),anchorRow:n}),O9=(e,n)=>({type:"columns",columns:new Set(e),anchorColumn:n}),CM=(e,n,t,r)=>e===t&&r===n?N9():{type:"rectangle",bounds:A9(e,n,t,r),anchor:{column:e,row:n}},N9=()=>({type:"empty"}),vM=(e,n)=>e.type==="columns"||e.type==="rows"&&e.rows.has(n)||e.type==="rectangle"&&e.bounds.top<=n&&e.bounds.bottom>=n,bM=(e,n)=>e.type==="rows"||e.type==="columns"&&e.columns.has(n)||e.type==="rectangle"&&e.bounds.left<=n&&e.bounds.right>=n,$0=(e,n)=>{const t=Math.min(e,n),r=Math.max(e,n),o=[];for(let u=t;u<=r;++u)o.push(u);return o},mM=({onCellSelect:e,focus:n,columnCount:t,rowCount:r,onFocusChange:o,scrollGridTo:u,selection:s,rowStart:c})=>{const d=p.useCallback(I=>{const O={type:"rows",rows:new Set($0(c,r+c-1)),anchorRow:0};u({row:c,column:0}),o(c,0),e(I,O,{row:c,column:0})},[e,o,r,c,u]),g=p.useCallback(I=>{const{row:O,column:H}=I;u({row:O,column:H}),o(O,H);const D=N9();e(I,D,n)},[n,e,o,u]),b=p.useCallback(I=>{const{row:O,column:H}=I,D=CM(H,O,n.column,n.row);u({row:O,column:H}),e(I,D,n)},[n,e,u]),C=p.useCallback(I=>{const O=I.row,H=P9([O],O);u({row:O}),e(I,H,n)},[n,e,u]),m=p.useCallback(I=>{const O=I.row,H=P9($0(n.row,O),O);u({row:O}),e(I,H,n)},[n,e,u]),k=p.useCallback(I=>{const O=I.column,H=O9([O],O);u({column:O}),e(I,H,n)},[n,e,u]),x=p.useCallback(I=>{const O=I.column,H=O9($0(n.column,O),O);e(I,H,n),u({column:O})},[n,e,u]),_=p.useCallback(I=>{switch(I.type){case"all":d(I);break;case"normal":g(I);break;case"shiftSelection":b(I);break;case"columnSelection":k(I);break;case"shiftColumnSelection":x(I);break;case"rowSelection":C(I);break;case"shiftRowSelection":m(I);break;default:throw new Error(`Value should not occur ${I}`)}},[d,g,b,k,x,C,m]),L=p.useCallback((I,O,H,D)=>{const M=(U,j,G)=>Math.max(j,Math.min(G,U));let V=null;if(H){if(s.type==="rows")V={type:"shiftRowSelection",row:M(s.anchorRow+O,0,r+c-1),event:D};else if(s.type==="columns")V={type:"shiftColumnSelection",column:M(s.anchorColumn+I,0,t-1),event:D};else if(s.type==="rectangle"){const U=M(s.anchor.row+O,0,r+c-1),j=M(s.anchor.column+I,0,t-1);V={type:"shiftSelection",row:U,column:j,event:D}}}else{const U=M(n.row+O,0,r+c-1),j=M(n.column+I,0,t-1);V={type:"normal",row:U,column:j,event:D}}return V&&_(V),V},[_,t,r,s,n,c]),E=p.useCallback(I=>{if(I.type==="all")return Lc(s,0,c,t-1,r+c-1)?"selectDirect":"default";if(I.type==="column")return Lc(s,I.column,c,I.column,r+c)?"selectDirect":bM(s,I.column)?"selectIndirect":"default";const O=Lc(s,0,I.row,t,I.row),H=n.row===I.row||vM(s,I.row);if(I.type==="cell"&&I.column==-1)return"default";if(O)return"selectDirect";if(!H)return"default";if(I.type==="cell"){const{row:D,column:M}=I;if(D>=r+c||M>=t||D<c||M<0)return"default";if(Lc(s,M,D,M,D))return"selectDirect"}return s.type==="columns"?"default":"selectIndirect"},[t,n.row,r,c,s]),A=p.useCallback((I,O)=>{const H=s.type,D="click";if(!(I===-1&&O==-1)){if(H==="columns"){_({type:"shiftColumnSelection",column:O,event:D});return}if(H==="rows"){_({type:"shiftRowSelection",row:I,event:D});return}if(I===-1){let M=n.row;if(s.type!=="empty"){const{bounds:{top:V,bottom:U}}=s;V<=M?M=V:M=U}_({type:"shiftSelection",row:M,column:O,event:D});return}if(O===-1){let M=n.column;if(s.type!=="empty"){const{bounds:{left:V,right:U}}=s;V<=M?M=V:M=U}_({type:"shiftSelection",row:I,column:M,event:D});return}_({type:"shiftSelection",row:I,column:O,event:D})}},[n.column,n.row,_,s]);return{getSelectionType:E,onSelection:_,mouseMoveCellSelect:A,moveSelection:L}},wM=p.memo(({data:e,rowIndex:n,columnIndex:t,style:r,...o})=>{const{cell:u,getSelectionType:s,focus:c,columnCount:d,rowCount:g,showRowNumber:b,showHeader:C,rowHeight:m,rowStart:k,rowAutoHeight:x,updateRowHeight:_}=e,L=n+k,{row:E,column:A}=c,I=t===A&&L===E,O=t-1===A&&L===E,H=t===A&&L-1===E,D=s({row:L,column:t,type:"cell"}),M=s({row:L,column:t-1,type:"cell"}),V=s({row:L-1,column:t,type:"cell"}),U=(D==="selectDirect"||M==="selectDirect")&&D!==M,j=(D==="selectDirect"||V==="selectDirect")&&D!==V,G=U||O||I,q=j||H||I,Y=p.useRef(null);p.useEffect(()=>{if(!x||!Y.current)return;const ue=Y.current.getBoundingClientRect().height;_(n,ue)},[_,n,x]);const X={...r,height:"auto"};return l.jsx("div",{style:X,"data-row":L,"data-column":t,ref:Y,children:l.jsx(ba,{"data-selected":I||D==="selectDirect","data-focused":I,$isSelectedTop:q,$isSelectedLeft:G,$isFocused:I,$isLastRow:g-1===n,$isLastColumn:d-1===t,$isFirstColumn:t===0&&!b,$isFirstRow:n===0&&!C,$selectionType:D,$height:m,"data-grid-row":L,"data-grid-column":t,$showBorder:!0,$rowAutoHeight:x,children:p.createElement(u,{rowIndex:L,columnIndex:t,type:"row-cell",...o})})})},oM);var E1={};/**
|
|
49
|
+
`))},"after:highlightElement":({result:le})=>{d.useBR&&(le.value=le.value.replace(/\n/g,"<br>"))}},A=/^(<[^>]+>|\t)+/gm,I={"after:highlightElement":({result:le})=>{d.tabReplace&&(le.value=le.value.replace(A,fe=>fe.replace(/\t/g,d.tabReplace)))}};function O(le){let fe=null;const we=b(le);if(g(we))return;be("before:highlightElement",{el:le,language:we}),fe=le;const ye=fe.textContent,Be=we?C(ye,{language:we,ignoreIllegals:!0}):x(ye);be("after:highlightElement",{el:le,result:Be,text:ye}),le.innerHTML=Be.value,L(le,we,Be.language),le.result={language:Be.language,re:Be.relevance,relavance:Be.relevance},Be.second_best&&(le.second_best={language:Be.second_best.language,re:Be.second_best.relevance,relavance:Be.second_best.relevance})}function H(le){le.useBR&&(Dt("10.3.0","'useBR' will be removed entirely in v11.0"),Dt("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),d=Y6(d,le)}const D=()=>{if(D.called)return;D.called=!0,Dt("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(O)};function M(){Dt("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),V=!0}let V=!1;function U(){if(document.readyState==="loading"){V=!0;return}document.querySelectorAll("pre code").forEach(O)}function j(){V&&U()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",j,!1);function G(le,fe){let we=null;try{we=fe(e)}catch(ye){if(o0("Language definition for '{}' could not be registered.".replace("{}",le)),o)o0(ye);else throw ye;we=c}we.name||(we.name=le),n[le]=we,we.rawDefinition=fe.bind(null,e),we.aliases&&ee(we.aliases,{languageName:le})}function q(le){delete n[le];for(const fe of Object.keys(t))t[fe]===le&&delete t[fe]}function Y(){return Object.keys(n)}function X(le){Dt("10.4.0","requireLanguage will be removed entirely in v11."),Dt("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const fe=ue(le);if(fe)return fe;throw new Error("The '{}' language is required, but not loaded.".replace("{}",le))}function ue(le){return le=(le||"").toLowerCase(),n[le]||n[t[le]]}function ee(le,{languageName:fe}){typeof le=="string"&&(le=[le]),le.forEach(we=>{t[we.toLowerCase()]=fe})}function ae(le){const fe=ue(le);return fe&&!fe.disableAutodetect}function de(le){le["before:highlightBlock"]&&!le["before:highlightElement"]&&(le["before:highlightElement"]=fe=>{le["before:highlightBlock"](Object.assign({block:fe.el},fe))}),le["after:highlightBlock"]&&!le["after:highlightElement"]&&(le["after:highlightElement"]=fe=>{le["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function re(le){de(le),r.push(le)}function be(le,fe){const we=le;r.forEach(function(ye){ye[we]&&ye[we](fe)})}function me(le){return Dt("10.2.0","fixMarkup will be removed entirely in v11.0"),Dt("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),_(le)}function Me(le){return Dt("10.7.0","highlightBlock will be removed entirely in v12.0"),Dt("10.7.0","Please use highlightElement now."),O(le)}Object.assign(e,{highlight:C,highlightAuto:x,highlightAll:U,fixMarkup:me,highlightElement:O,highlightBlock:Me,configure:H,initHighlighting:D,initHighlightingOnLoad:M,registerLanguage:G,unregisterLanguage:q,listLanguages:Y,getLanguage:ue,registerAliases:ee,requireLanguage:X,autoDetection:ae,inherit:Y6,addPlugin:re,vuePlugin:gk(e).VuePlugin}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=hk;for(const le in dc)typeof dc[le]=="object"&&P6(dc[le]);return Object.assign(e,dc),e.addPlugin(E),e.addPlugin(Ck),e.addPlugin(I),e}({}),mk=bk,K6={exports:{}};(function(e){(function(){var n;n=e.exports=o,n.format=o,n.vsprintf=r,typeof console<"u"&&typeof console.log=="function"&&(n.printf=t);function t(){console.log(o.apply(null,arguments))}function r(u,s){return o.apply(null,[u].concat(s))}function o(u){for(var s=1,c=[].slice.call(arguments),d=0,g=u.length,b="",C,m=!1,k,x,_=!1,L,E=function(){return c[s++]},A=function(){for(var I="";/\d/.test(u[d]);)I+=u[d++],C=u[d];return I.length>0?parseInt(I):null};d<g;++d)if(C=u[d],m)switch(m=!1,C=="."?(_=!1,C=u[++d]):C=="0"&&u[d+1]=="."?(_=!0,d+=2,C=u[d]):_=!0,L=A(),C){case"b":b+=parseInt(E(),10).toString(2);break;case"c":k=E(),typeof k=="string"||k instanceof String?b+=k:b+=String.fromCharCode(parseInt(k,10));break;case"d":b+=parseInt(E(),10);break;case"f":x=String(parseFloat(E()).toFixed(L||6)),b+=_?x:x.replace(/^0/,"");break;case"j":b+=JSON.stringify(E());break;case"o":b+="0"+parseInt(E(),10).toString(8);break;case"s":b+=E();break;case"x":b+="0x"+parseInt(E(),10).toString(16);break;case"X":b+="0x"+parseInt(E(),10).toString(16).toUpperCase();break;default:b+=C;break}else C==="%"?m=!0:b+=C;return b}})()})(K6);var wk=K6.exports,yk=wk,Po=Oo(Error),Sk=Po;Po.eval=Oo(EvalError),Po.range=Oo(RangeError),Po.reference=Oo(ReferenceError),Po.syntax=Oo(SyntaxError),Po.type=Oo(TypeError),Po.uri=Oo(URIError),Po.create=Oo;function Oo(e){return n.displayName=e.displayName||e.name,n;function n(t){return t&&(t=yk.apply(null,arguments)),new e(t)}}var Ir=mk,fc=Sk;x1.highlight=J6,x1.highlightAuto=kk,x1.registerLanguage=Lk,x1.listLanguages=xk,x1.registerAlias=Mk,ro.prototype.addText=$k,ro.prototype.addKeyword=Ek,ro.prototype.addSublanguage=Fk,ro.prototype.openNode=Tk,ro.prototype.closeNode=Ik,ro.prototype.closeAllNodes=Q6,ro.prototype.finalize=Q6,ro.prototype.toHTML=Dk;var _k="hljs-";function J6(e,n,t){var r=Ir.configure({}),o=t||{},u=o.prefix,s;if(typeof e!="string")throw fc("Expected `string` for name, got `%s`",e);if(!Ir.getLanguage(e))throw fc("Unknown language: `%s` is not registered",e);if(typeof n!="string")throw fc("Expected `string` for value, got `%s`",n);if(u==null&&(u=_k),Ir.configure({__emitter:ro,classPrefix:u}),s=Ir.highlight(n,{language:e,ignoreIllegals:!0}),Ir.configure(r||{}),s.errorRaised)throw s.errorRaised;return{relevance:s.relevance,language:s.language,value:s.emitter.rootNode.children}}function kk(e,n){var t=n||{},r=t.subset||Ir.listLanguages();t.prefix;var o=r.length,u=-1,s,c,d,g;if(typeof e!="string")throw fc("Expected `string` for value, got `%s`",e);for(c={relevance:0,language:null,value:[]},s={relevance:0,language:null,value:[]};++u<o;)g=r[u],Ir.getLanguage(g)&&(d=J6(g,e,n),d.language=g,d.relevance>c.relevance&&(c=d),d.relevance>s.relevance&&(c=s,s=d));return c.language&&(s.secondBest=c),s}function Lk(e,n){Ir.registerLanguage(e,n)}function xk(){return Ir.listLanguages()}function Mk(e,n){var t=e,r;n&&(t={},t[e]=n);for(r in t)Ir.registerAliases(t[r],{languageName:r})}function ro(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function Ek(e,n){this.openNode(n),this.addText(e),this.closeNode()}function Fk(e,n){var t=this.stack,r=t[t.length-1],o=e.rootNode.children,u=n?{type:"element",tagName:"span",properties:{className:[n]},children:o}:o;r.children=r.children.concat(u)}function $k(e){var n=this.stack,t,r;e!==""&&(t=n[n.length-1],r=t.children[t.children.length-1],r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e}))}function Tk(e){var n=this.stack,t=this.options.classPrefix+e,r=n[n.length-1],o={type:"element",tagName:"span",properties:{className:[t]},children:[]};r.children.push(o),n.push(o)}function Ik(){this.stack.pop()}function Dk(){return""}function Q6(){}var u0,R6;function Hk(){if(R6)return u0;R6=1;function e(r){return r?typeof r=="string"?r:r.source:null}function n(...r){return r.map(u=>e(u)).join("")}function t(r){const o={},u={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[o]}]};Object.assign(o,{className:"variable",variants:[{begin:n(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},u]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[r.BACKSLASH_ESCAPE]},c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[r.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[r.BACKSLASH_ESCAPE,o,s]};s.contains.push(d);const g={className:"",begin:/\\"/},b={className:"string",begin:/'/,end:/'/},C={begin:/\$\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},r.NUMBER_MODE,o]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],k=r.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),x={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[r.inherit(r.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/,keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp"},contains:[k,r.SHEBANG(),x,C,r.HASH_COMMENT_MODE,c,d,g,b,o]}}return u0=t,u0}var a0,e8;function Ak(){if(e8)return a0;e8=1;function e(n){const t={literal:"true false null"},r=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],o=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],u={end:",",endsWithParent:!0,excludeEnd:!0,contains:o,keywords:t},s={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(u,{begin:/:/})].concat(r),illegal:"\\S"},c={begin:"\\[",end:"\\]",contains:[n.inherit(u)],illegal:"\\S"};return o.push(s,c),r.forEach(function(d){o.push(d)}),{name:"JSON",contains:o,keywords:t,illegal:"\\S"}}return a0=e,a0}var s0,l8;function Pk(){if(l8)return s0;l8=1;function e(o){return o?typeof o=="string"?o:o.source:null}function n(...o){return o.map(s=>e(s)).join("")}function t(...o){return"("+o.map(s=>e(s)).join("|")+")"}function r(o){const u=o.COMMENT("--","$"),s={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},c={begin:/"/,end:/"/,contains:[{begin:/""/}]},d=["true","false","unknown"],g=["double precision","large object","with timezone","without timezone"],b=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],C=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],k=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],x=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],_=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],L=k,E=[...m,...C].filter(D=>!k.includes(D)),A={className:"variable",begin:/@[a-z0-9]+/},I={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},O={begin:n(/\b/,t(...L),/\s*\(/),keywords:{built_in:L}};function H(D,{exceptions:M,when:V}={}){const U=V;return M=M||[],D.map(j=>j.match(/\|\d+$/)||M.includes(j)?j:U(j)?`${j}|0`:j)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:H(E,{when:D=>D.length<3}),literal:d,type:b,built_in:x},contains:[{begin:t(..._),keywords:{$pattern:/[\w\.]+/,keyword:E.concat(_),literal:d,type:b}},{className:"type",begin:t(...g)},O,A,s,c,o.C_NUMBER_MODE,o.C_BLOCK_COMMENT_MODE,u,I]}}return s0=r,s0}var c0,n8;function Ok(){if(n8)return c0;n8=1;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],t=["true","false","null","undefined","NaN","Infinity"],r=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],o=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],u=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],s=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(u,s,r,o);function d(k){return k?typeof k=="string"?k:k.source:null}function g(k){return b("(?=",k,")")}function b(...k){return k.map(_=>d(_)).join("")}function C(k){const x=(ae,{after:de})=>{const re="</"+ae[0].slice(1);return ae.input.indexOf(re,de)!==-1},_=e,L={begin:"<>",end:"</>"},E={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ae,de)=>{const re=ae[0].length+ae.index,be=ae.input[re];if(be==="<"){de.ignoreMatch();return}be===">"&&(x(ae,{after:re})||de.ignoreMatch())}},A={$pattern:e,keyword:n,literal:t,built_in:c},I="[0-9](_?[0-9])*",O=`\\.(${I})`,H="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",D={className:"number",variants:[{begin:`(\\b(${H})((${O})|\\.)?|(${O}))[eE][+-]?(${I})\\b`},{begin:`\\b(${H})\\b((${O})\\b|\\.)?|(${O})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},M={className:"subst",begin:"\\$\\{",end:"\\}",keywords:A,contains:[]},V={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[k.BACKSLASH_ESCAPE,M],subLanguage:"xml"}},U={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[k.BACKSLASH_ESCAPE,M],subLanguage:"css"}},j={className:"string",begin:"`",end:"`",contains:[k.BACKSLASH_ESCAPE,M]},q={className:"comment",variants:[k.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:_+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),k.C_BLOCK_COMMENT_MODE,k.C_LINE_COMMENT_MODE]},Y=[k.APOS_STRING_MODE,k.QUOTE_STRING_MODE,V,U,j,D,k.REGEXP_MODE];M.contains=Y.concat({begin:/\{/,end:/\}/,keywords:A,contains:["self"].concat(Y)});const X=[].concat(q,M.contains),ue=X.concat([{begin:/\(/,end:/\)/,keywords:A,contains:["self"].concat(X)}]),ee={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:ue};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:A,exports:{PARAMS_CONTAINS:ue},illegal:/#(?![$_A-z])/,contains:[k.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},k.APOS_STRING_MODE,k.QUOTE_STRING_MODE,V,U,j,q,D,{begin:b(/[{,\n]\s*/,g(b(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,_+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:_+g("\\s*:"),relevance:0}]},{begin:"("+k.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[q,k.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+k.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:k.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:A,contains:ue}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:L.begin,end:L.end},{begin:E.begin,"on:begin":E.isTrulyOpeningTag,end:E.end}],subLanguage:"xml",contains:[{begin:E.begin,end:E.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:A,contains:["self",k.inherit(k.TITLE_MODE,{begin:_}),ee],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:k.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[ee,k.inherit(k.TITLE_MODE,{begin:_})]},{variants:[{begin:"\\."+_},{begin:"\\$"+_}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},k.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[k.inherit(k.TITLE_MODE,{begin:_}),"self",ee]},{begin:"(get|set)\\s+(?="+_+"\\()",end:/\{/,keywords:"get set",contains:[k.inherit(k.TITLE_MODE,{begin:_}),{begin:/\(\)/},ee]},{begin:/\$[(.]/}]}}function m(k){const x=e,_={beginKeywords:"namespace",end:/\{/,excludeEnd:!0},L={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},E={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},A=["any","void","number","boolean","string","object","never","enum"],I=["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"],O={$pattern:e,keyword:n.concat(I),literal:t,built_in:c.concat(A)},H={className:"meta",begin:"@"+x},D=(U,j,G)=>{const q=U.contains.findIndex(Y=>Y.label===j);if(q===-1)throw new Error("can not find mode to replace");U.contains.splice(q,1,G)},M=C(k);Object.assign(M.keywords,O),M.exports.PARAMS_CONTAINS.push(H),M.contains=M.contains.concat([H,_,L]),D(M,"shebang",k.SHEBANG()),D(M,"use_strict",E);const V=M.contains.find(U=>U.className==="function");return V.relevance=0,Object.assign(M,{name:"TypeScript",aliases:["ts","tsx"]}),M}return c0=m,c0}function d0(e,n){return d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},d0(e,n)}function t8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ti=E_(x1,{});Ti.registerLanguage=x1.registerLanguage;const Nk=e=>{const{resolvedTheme:n}=Pa(),t=e??(n==="dark"?"dark":"light");return{hljs:{display:"block",overflowX:"auto",padding:"var(--click-code-block-space-all) var(--click-code-block-space-all)",color:"var(--click-codeblock-color-text-default)",background:"var(--click-codeblock-color-background-default)",borderRadius:"var(--click-codeblock-radii-all)",font:"var(--click-codeblock-typography-text-default)"},"hljs-comment":{color:t==="dark"?"#999999":"#656e77"},"hljs-keyword":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-tag":{color:t==="dark"?"#88aece":"#015692"},"hljs-meta-keyword":{color:t==="dark"?"#88aece":"#015692"},"hljs-doctag":{color:t==="dark"?"#88aece":"#015692"},"hljs-section":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-class":{color:t==="dark"?"#88aece":"#015692"},"hljs-meta":{color:t==="dark"?"#88aece":"#015692"},"hljs-selector-pseudo":{color:t==="dark"?"#88aece":"#015692"},"hljs-attr":{color:t==="dark"?"#88aece":"#015692"},"hljs-attribute":{color:t==="dark"?"#c59bc1":"#803378"},"hljs-name":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-type":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-number":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-selector-id":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-quote":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-template-tag":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-built_in":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-title":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-literal":{color:t==="dark"?"#f08d49":"#b75501"},"hljs-string":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-regexp":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-symbol":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-variable":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-template-variable":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-link":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-selector-attr":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-meta-string":{color:t==="dark"?"#b5bd68":"#54790d"},"hljs-bullet":{color:t==="dark"?"#cccccc":"#535a60"},"hljs-code":{color:t==="dark"?"#cccccc":"#535a60"},"hljs-deletion":{color:t==="dark"?"#de7176":"#c02d2e"},"hljs-addition":{color:t==="dark"?"#76c490":"#2f6f44"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},or={cuiCodeBlockContainer:"_cuiCodeBlockContainer_1a3fj_1",linenumber:"_linenumber_1a3fj_9",cuiLightMode:"_cuiLightMode_1a3fj_12",cuiDarkMode:"_cuiDarkMode_1a3fj_15",cuiCodeButton:"_cuiCodeButton_1a3fj_19",cuiCopied:"_cuiCopied_1a3fj_23",cuiError:"_cuiError_1a3fj_26",cuiNormal:"_cuiNormal_1a3fj_29",cuiHighlighter:"_cuiHighlighter_1a3fj_33",cuiCodeContent:"_cuiCodeContent_1a3fj_39",cuiButtonContainer:"_cuiButtonContainer_1a3fj_44"};var r8={},o8={exports:{}};(function(e){function n(t){return t&&t.__esModule?t:{default:t}}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(o8);var hc=o8.exports;(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Pk()),r=t.default;e.default=r})(r8);const Bk=rr(r8);var i8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Hk()),r=t.default;e.default=r})(i8);const Vk=rr(i8);var u8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ak()),r=t.default;e.default=r})(u8);const Wk=rr(u8);var a8={};(function(e){var n=hc;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(Ok()),r=t.default;e.default=r})(a8);const Zk=rr(a8);Ti.registerLanguage("sql",Bk),Ti.registerLanguage("bash",Vk),Ti.registerLanguage("json",Wk),Ti.registerLanguage("tsx",Zk);const s8=({children:e,language:n,theme:t,showLineNumbers:r,showWrapButton:o=!1,wrapLines:u=!1,onCopy:s,onCopyError:c,className:d,...g})=>{const[b,C]=p.useState(!1),[m,k]=p.useState(!1),[x,_]=p.useState(u),L=t??"light",E=Nk(L),A=D=>or[`cui${D.charAt(0).toUpperCase()+D.slice(1)}Mode`],I=async()=>{try{await navigator.clipboard.writeText(e),typeof s=="function"&&s(e),C(!0),setTimeout(()=>C(!1),2e3)}catch(D){let M="Unable to copy code";D instanceof Error&&(M=D.message),k(!0),typeof c=="function"&&c(M),setTimeout(()=>k(!1),2e3)}},O=()=>{_(D=>!D)},H=D=>l.jsx("code",{...D,className:or.cuiCodeContent});return l.jsxs("div",{className:Q(or.cuiCodeBlockContainer,A(L),d),...g,children:[l.jsxs("div",{className:or.cuiButtonContainer,children:[o&&l.jsx(Fs,{className:Q(or.cuiCodeButton,or.cuiNormal),onClick:O,children:l.jsx(kn,{icon:"document"})}),l.jsx(Fs,{className:Q(or.cuiCodeButton,{[or.cuiCopied]:b,[or.cuiError]:m,[or.cuiNormal]:!b&&!m}),onClick:I,children:l.jsx(kn,{icon:b?"check":m?"warning":"copy"})})]}),l.jsx(Ti,{language:n,style:E,CodeTag:H,className:or.cuiHighlighter,renderer:({rows:D,stylesheet:M,useInlineStyles:V})=>D.map((U,j)=>{const G=U.children,q=G==null?void 0:G.shift();return q&&(U.children=[q,{children:G,properties:{className:[]},tagName:"span",type:"element"}]),R3({node:U,stylesheet:M,useInlineStyles:V,key:j})}),showLineNumbers:r,wrapLines:x||u,wrapLongLines:x||u,children:e})]})},c8={cuiLabelContainer:"_cuiLabelContainer_l67lt_1",cuiEllipsisContainer:"_cuiEllipsisContainer_l67lt_14"},d8=({icon:e,iconDir:n="start",children:t})=>l.jsxs("span",{className:c8.cuiLabelContainer,children:[e&&n==="start"&&l.jsx(Te,{name:e,size:"sm"}),l.jsx("span",{className:c8.cuiEllipsisContainer,children:t}),e&&n==="end"&&l.jsx(Te,{name:e,size:"sm"})]}),No={cuiCollapsibleContainer:"_cuiCollapsibleContainer_hn4f9_1",cuiHeaderContainer:"_cuiHeaderContainer_hn4f9_15",cuiIndicatorStart:"_cuiIndicatorStart_hn4f9_18",cuiIndicatorEnd:"_cuiIndicatorEnd_hn4f9_21",cuiTriggerButton:"_cuiTriggerButton_hn4f9_25",cuiContentWrapper:"_cuiContentWrapper_hn4f9_36"},pc=p.createContext({open:!1,onOpenChange:()=>null}),ir=({open:e,onOpenChange:n,children:t,...r})=>{const[o,u]=p.useState(e??!1),s=()=>{u(d=>(typeof n=="function"&&n(!d),!d))};p.useEffect(()=>{u(d=>e??d)},[e]);const c={open:e??o,onOpenChange:s};return l.jsx("div",{className:No.cuiCollapsibleContainer,...r,children:l.jsx(pc.Provider,{value:c,children:t})})},f8=p.forwardRef(({indicatorDir:e="start",icon:n,iconDir:t,children:r,wrapInTrigger:o,onClick:u,...s},c)=>{const{onOpenChange:d}=p.useContext(pc);return l.jsxs("div",{ref:c,onClick:g=>{o&&typeof d=="function"&&d(),typeof u=="function"&&u(g)},"data-collapsible-header":!0,className:Q(No.cuiHeaderContainer,{[No.cuiIndicatorStart]:e==="start",[No.cuiIndicatorEnd]:e==="end"}),...s,children:[e==="start"&&l.jsx(ir.Trigger,{}),r&&l.jsx(d8,{icon:n,iconDir:t,children:r}),e==="end"&&l.jsx(ir.Trigger,{})]})});f8.displayName="CollapsibleHeader",ir.Header=f8;const h8=({onClick:e,children:n,indicatorDir:t="start",icon:r,iconDir:o="start",...u})=>{const{open:s,onOpenChange:c}=p.useContext(pc),d=g=>{g.preventDefault(),g.stopPropagation(),e&&e(g),c()};return l.jsxs(Fs,{onClick:d,"aria-label":"trigger children",className:No.cuiTriggerButton,...u,children:[t==="start"&&l.jsx(Te,{"data-trigger-icon":!0,name:"chevron-right","data-open":s.toString(),size:"sm"}),n&&l.jsx(d8,{icon:r,iconDir:o,children:n}),t==="end"&&l.jsx(Te,{"data-trigger-icon":!0,name:"chevron-right","data-open":s.toString(),size:"sm"})]})};h8.displayName="CollapsibleTrigger",ir.Trigger=h8;const p8=({indicatorDir:e,...n})=>{const{open:t}=p.useContext(pc);if(t)return l.jsx("div",{className:Q(No.cuiContentWrapper,{[No.cuiIndicatorStart]:e==="start",[No.cuiIndicatorEnd]:e==="end"}),...n})};p8.displayName="CollapsibleContent",ir.Content=p8;const g8={cuiActionsWrapper:"_cuiActionsWrapper_6pc4q_1",cuiDialogContent:"_cuiDialogContent_6pc4q_12"},Uk=({children:e,disabled:n,loading:t,message:r,onCancel:o,onConfirm:u,open:s,primaryActionLabel:c="Confirm",primaryActionType:d="primary",secondaryActionLabel:g="Cancel",showClose:b,title:C,...m})=>{if(e&&r)throw new Error("You can't pass children and message props at the same time");return l.jsx(Bo,{open:s,onOpenChange:k=>{!k&&o&&o()},children:l.jsxs(Bo.Content,{...m,className:Q(g8.cuiDialogContent,m.className),title:C,showClose:b,children:[l.jsx(xl,{overflow:"auto",grow:"1",orientation:"vertical",children:e||l.jsx(_l,{children:r})}),l.jsx(Uo,{size:"xl"}),l.jsxs("div",{className:g8.cuiActionsWrapper,children:[l.jsx(Bo.Close,{label:g,"data-testid":"cancel-action-button"}),l.jsx(Bo.Close,{loading:!!t,disabled:!!n||!!t,type:d,label:c,autoFocus:s,onClick:()=>{u&&u()},"data-testid":"confirm-action-button"})]})]})})},C8="ContextMenu",[zk,oO]=dn(C8,[nc]),Dr=nc(),[jk,v8]=zk(C8),Gk=e=>{const{__scopeContextMenu:n,children:t,onOpenChange:r,dir:o,modal:u=!0}=e,[s,c]=p.useState(!1),d=Dr(n),g=Sn(r),b=p.useCallback(C=>{c(C),g(C)},[g]);return p.createElement(jk,{scope:n,open:s,onOpenChange:b,modal:u},p.createElement(B7,ie({},d,{dir:o,open:s,onOpenChange:b,modal:u}),t))},Xk="ContextMenuTrigger",Yk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,disabled:r=!1,...o}=e,u=v8(Xk,t),s=Dr(t),c=p.useRef({x:0,y:0}),d=p.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),g=p.useRef(0),b=p.useCallback(()=>window.clearTimeout(g.current),[]),C=m=>{c.current={x:m.clientX,y:m.clientY},u.onOpenChange(!0)};return p.useEffect(()=>b,[b]),p.useEffect(()=>void(r&&b()),[r,b]),p.createElement(p.Fragment,null,p.createElement(V7,ie({},s,{virtualRef:d})),p.createElement(Ye.span,ie({"data-state":u.open?"open":"closed","data-disabled":r?"":void 0},o,{ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:ke(e.onContextMenu,m=>{b(),C(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:ke(e.onPointerDown,gc(m=>{b(),g.current=window.setTimeout(()=>C(m),700)})),onPointerMove:r?e.onPointerMove:ke(e.onPointerMove,gc(b)),onPointerCancel:r?e.onPointerCancel:ke(e.onPointerCancel,gc(b)),onPointerUp:r?e.onPointerUp:ke(e.onPointerUp,gc(b))})))}),qk=e=>{const{__scopeContextMenu:n,...t}=e,r=Dr(n);return p.createElement(W7,ie({},r,t))},Kk="ContextMenuContent",Jk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=v8(Kk,t),u=Dr(t),s=p.useRef(!1);return p.createElement(Z7,ie({},u,r,{ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var d;(d=e.onCloseAutoFocus)===null||d===void 0||d.call(e,c),!c.defaultPrevented&&s.current&&c.preventDefault(),s.current=!1},onInteractOutside:c=>{var d;(d=e.onInteractOutside)===null||d===void 0||d.call(e,c),!c.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Qk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(U7,ie({},o,r,{ref:n}))}),Rk=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(z7,ie({},o,r,{ref:n}))}),eL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(j7,ie({},o,r,{ref:n}))}),lL=e=>{const{__scopeContextMenu:n,children:t,onOpenChange:r,open:o,defaultOpen:u}=e,s=Dr(n),[c,d]=Hn({prop:o,defaultProp:u,onChange:r});return p.createElement(G7,ie({},s,{open:c,onOpenChange:d}),t)},nL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(X7,ie({},o,r,{ref:n}))}),tL=p.forwardRef((e,n)=>{const{__scopeContextMenu:t,...r}=e,o=Dr(t);return p.createElement(Y7,ie({},o,r,{ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))});function gc(e){return n=>n.pointerType!=="mouse"?e(n):void 0}const rL=Gk,oL=Yk,iL=qk,uL=Jk,aL=Qk,sL=Rk,cL=eL,dL=lL,fL=nL,hL=tL,oo={cuiRightMenuContent:"_cuiRightMenuContent_rhffw_1",cuiShowArrow:"_cuiShowArrow_rhffw_5",cuiPopoverArrow:"_cuiPopoverArrow_rhffw_14",cuiRightMenuGroup:"_cuiRightMenuGroup_rhffw_24",cuiRightMenuSub:"_cuiRightMenuSub_rhffw_29"},ur=e=>l.jsx(rL,{...e}),b8=p.forwardRef(({disabled:e,...n},t)=>l.jsx(oL,{asChild:!0,disabled:e,children:l.jsx("div",{ref:t,...n})}));b8.displayName="ContextMenuTrigger",ur.Trigger=b8;const m8=({icon:e,iconDir:n,children:t,...r})=>l.jsxs(fL,{className:oo.cuiGenericMenuItem,...r,children:[l.jsx(rt,{icon:e,iconDir:n,children:t}),l.jsx("div",{className:"dropdown-arrow",children:l.jsx(Te,{name:"chevron-right"})})]});m8.displayName="ContextMenuSubTrigger",ur.SubTrigger=m8;const w8=({sub:e,children:n,showArrow:t,...r})=>{const o=e?hL:uL;return l.jsx(iL,{children:l.jsxs(o,{className:Q(oo.cuiGenericMenuPanel,oo.cuiContextMenu,oo.cuiRightMenuContent,{[oo.cuiShowArrow]:t}),...r,children:[t&&l.jsx(cL,{className:oo.cuiArrow,width:20,height:10}),n]})})};w8.displayName="ContextMenuContent",ur.Content=w8;const y8=e=>l.jsx(aL,{className:oo.cuiRightMenuGroup,...e});y8.displayName="ContextMenuGroup",ur.Group=y8;const S8=({...e})=>l.jsx(dL,{className:oo.cuiRightMenuSub,...e});S8.displayName="ContextMenuSub",ur.Sub=S8;const _8=({icon:e,iconDir:n,children:t,...r})=>l.jsx(sL,{className:oo.cuiGenericMenuItem,...r,children:l.jsx(rt,{icon:e,iconDir:n,children:t})});_8.displayName="ContextMenuItem",ur.Item=_8;var k8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r){var o=r.prototype,u=o.format;o.format=function(s){var c=this,d=this.$locale();if(!this.isValid())return u.bind(this)(s);var g=this.$utils(),b=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(C){switch(C){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return d.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return d.ordinal(c.week(),"W");case"w":case"ww":return g.s(c.week(),C==="w"?1:2,"0");case"W":case"WW":return g.s(c.isoWeek(),C==="W"?1:2,"0");case"k":case"kk":return g.s(String(c.$H===0?24:c.$H),C==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return C}});return u.bind(this)(b)}}})})(k8);var pL=k8.exports;const gL=rr(pL);var L8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t,r,o=1e3,u=6e4,s=36e5,c=864e5,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g=31536e6,b=2628e6,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,m={years:g,months:b,days:c,hours:s,minutes:u,seconds:o,milliseconds:1,weeks:6048e5},k=function(D){return D instanceof O},x=function(D,M,V){return new O(D,V,M.$l)},_=function(D){return r.p(D)+"s"},L=function(D){return D<0},E=function(D){return L(D)?Math.ceil(D):Math.floor(D)},A=function(D){return Math.abs(D)},I=function(D,M){return D?L(D)?{negative:!0,format:""+A(D)+M}:{negative:!1,format:""+D+M}:{negative:!1,format:""}},O=function(){function D(V,U,j){var G=this;if(this.$d={},this.$l=j,V===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return x(V*m[_(U)],this);if(typeof V=="number")return this.$ms=V,this.parseFromMilliseconds(),this;if(typeof V=="object")return Object.keys(V).forEach(function(X){G.$d[_(X)]=V[X]}),this.calMilliseconds(),this;if(typeof V=="string"){var q=V.match(C);if(q){var Y=q.slice(2).map(function(X){return X!=null?Number(X):0});return this.$d.years=Y[0],this.$d.months=Y[1],this.$d.weeks=Y[2],this.$d.days=Y[3],this.$d.hours=Y[4],this.$d.minutes=Y[5],this.$d.seconds=Y[6],this.calMilliseconds(),this}}return this}var M=D.prototype;return M.calMilliseconds=function(){var V=this;this.$ms=Object.keys(this.$d).reduce(function(U,j){return U+(V.$d[j]||0)*m[j]},0)},M.parseFromMilliseconds=function(){var V=this.$ms;this.$d.years=E(V/g),V%=g,this.$d.months=E(V/b),V%=b,this.$d.days=E(V/c),V%=c,this.$d.hours=E(V/s),V%=s,this.$d.minutes=E(V/u),V%=u,this.$d.seconds=E(V/o),V%=o,this.$d.milliseconds=V},M.toISOString=function(){var V=I(this.$d.years,"Y"),U=I(this.$d.months,"M"),j=+this.$d.days||0;this.$d.weeks&&(j+=7*this.$d.weeks);var G=I(j,"D"),q=I(this.$d.hours,"H"),Y=I(this.$d.minutes,"M"),X=this.$d.seconds||0;this.$d.milliseconds&&(X+=this.$d.milliseconds/1e3,X=Math.round(1e3*X)/1e3);var ue=I(X,"S"),ee=V.negative||U.negative||G.negative||q.negative||Y.negative||ue.negative,ae=q.format||Y.format||ue.format?"T":"",de=(ee?"-":"")+"P"+V.format+U.format+G.format+ae+q.format+Y.format+ue.format;return de==="P"||de==="-P"?"P0D":de},M.toJSON=function(){return this.toISOString()},M.format=function(V){var U=V||"YYYY-MM-DDTHH:mm:ss",j={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(d,function(G,q){return q||String(j[G])})},M.as=function(V){return this.$ms/m[_(V)]},M.get=function(V){var U=this.$ms,j=_(V);return j==="milliseconds"?U%=1e3:U=j==="weeks"?E(U/m[j]):this.$d[j],U||0},M.add=function(V,U,j){var G;return G=U?V*m[_(U)]:k(V)?V.$ms:x(V,this).$ms,x(this.$ms+G*(j?-1:1),this)},M.subtract=function(V,U){return this.add(V,U,!0)},M.locale=function(V){var U=this.clone();return U.$l=V,U},M.clone=function(){return x(this.$ms,this)},M.humanize=function(V){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!V)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},D}(),H=function(D,M,V){return D.add(M.years()*V,"y").add(M.months()*V,"M").add(M.days()*V,"d").add(M.hours()*V,"h").add(M.minutes()*V,"m").add(M.seconds()*V,"s").add(M.milliseconds()*V,"ms")};return function(D,M,V){t=V,r=V().$utils(),V.duration=function(G,q){var Y=V.locale();return x(G,{$l:Y},q)},V.isDuration=k;var U=M.prototype.add,j=M.prototype.subtract;M.prototype.add=function(G,q){return k(G)?H(this,G,1):U.bind(this)(G,q)},M.prototype.subtract=function(G,q){return k(G)?H(this,G,-1):j.bind(this)(G,q)}}})})(L8);var CL=L8.exports;const vL=rr(CL);var x8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,u){var s=o.prototype,c=s.format;u.en.formats=t,s.format=function(d){d===void 0&&(d="YYYY-MM-DDTHH:mm:ssZ");var g=this.$locale().formats,b=function(C,m){return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,x,_){var L=_&&_.toUpperCase();return x||m[_]||t[_]||m[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(E,A,I){return A||I.slice(1)})})}(d,g===void 0?{}:g);return c.call(this,b)}}})})(x8);var bL=x8.exports;const mL=rr(bL);var M8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r,o){t=t||{};var u=r.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(g,b,C,m){return u.fromToBase(g,b,C,m)}o.en.relativeTime=s,u.fromToBase=function(g,b,C,m,k){for(var x,_,L,E=C.$locale().relativeTime||s,A=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],I=A.length,O=0;O<I;O+=1){var H=A[O];H.d&&(x=m?o(g).diff(C,H.d,!0):C.diff(g,H.d,!0));var D=(t.rounding||Math.round)(Math.abs(x));if(L=x>0,D<=H.r||!H.r){D<=1&&O>0&&(H=A[O-1]);var M=E[H.l];k&&(D=k(""+D)),_=typeof M=="string"?M.replace("%d",D):M(D,b,H.l,L);break}}if(b)return _;var V=L?E.future:E.past;return typeof V=="function"?V(_):V.replace("%s",_)},u.to=function(g,b){return c(g,b,this,!0)},u.from=function(g,b){return c(g,b,this)};var d=function(g){return g.$u?o.utc():o()};u.toNow=function(g){return this.to(d(this),g)},u.fromNow=function(g){return this.from(d(this),g)}}})})(M8);var wL=M8.exports;const yL=rr(wL);var E8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(o,u,s){var c,d=function(m,k,x){x===void 0&&(x={});var _=new Date(m),L=function(E,A){A===void 0&&(A={});var I=A.timeZoneName||"short",O=E+"|"+I,H=r[O];return H||(H=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:E,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:I}),r[O]=H),H}(k,x);return L.formatToParts(_)},g=function(m,k){for(var x=d(m,k),_=[],L=0;L<x.length;L+=1){var E=x[L],A=E.type,I=E.value,O=t[A];O>=0&&(_[O]=parseInt(I,10))}var H=_[3],D=H===24?0:H,M=_[0]+"-"+_[1]+"-"+_[2]+" "+D+":"+_[4]+":"+_[5]+":000",V=+m;return(s.utc(M).valueOf()-(V-=V%1e3))/6e4},b=u.prototype;b.tz=function(m,k){m===void 0&&(m=c);var x,_=this.utcOffset(),L=this.toDate(),E=L.toLocaleString("en-US",{timeZone:m}),A=Math.round((L-new Date(E))/1e3/60),I=15*-Math.round(L.getTimezoneOffset()/15)-A;if(!Number(I))x=this.utcOffset(0,k);else if(x=s(E,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),k){var O=x.utcOffset();x=x.add(_-O,"minute")}return x.$x.$timezone=m,x},b.offsetName=function(m){var k=this.$x.$timezone||s.tz.guess(),x=d(this.valueOf(),k,{timeZoneName:m}).find(function(_){return _.type.toLowerCase()==="timezonename"});return x&&x.value};var C=b.startOf;b.startOf=function(m,k){if(!this.$x||!this.$x.$timezone)return C.call(this,m,k);var x=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return C.call(x,m,k).tz(this.$x.$timezone,!0)},s.tz=function(m,k,x){var _=x&&k,L=x||k||c,E=g(+s(),L);if(typeof m!="string")return s(m).tz(L);var A=function(D,M,V){var U=D-60*M*1e3,j=g(U,V);if(M===j)return[U,M];var G=g(U-=60*(j-M)*1e3,V);return j===G?[U,j]:[D-60*Math.min(j,G)*1e3,Math.max(j,G)]}(s.utc(m,_).valueOf(),E,L),I=A[0],O=A[1],H=s(I).utcOffset(O);return H.$x.$timezone=L,H},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(m){c=m}}})})(E8);var SL=E8.exports;const _L=rr(SL);var F8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){return function(t,r,o){o.updateLocale=function(u,s){var c=o.Ls[u];if(c)return(s?Object.keys(s):[]).forEach(function(d){c[d]=s[d]}),c}}})})(F8);var kL=F8.exports;const LL=rr(kL);var $8={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(L1,function(){var t="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(u,s,c){var d=s.prototype;c.utc=function(_){var L={date:_,utc:!0,args:arguments};return new s(L)},d.utc=function(_){var L=c(this.toDate(),{locale:this.$L,utc:!0});return _?L.add(this.utcOffset(),t):L},d.local=function(){return c(this.toDate(),{locale:this.$L,utc:!1})};var g=d.parse;d.parse=function(_){_.utc&&(this.$u=!0),this.$utils().u(_.$offset)||(this.$offset=_.$offset),g.call(this,_)};var b=d.init;d.init=function(){if(this.$u){var _=this.$d;this.$y=_.getUTCFullYear(),this.$M=_.getUTCMonth(),this.$D=_.getUTCDate(),this.$W=_.getUTCDay(),this.$H=_.getUTCHours(),this.$m=_.getUTCMinutes(),this.$s=_.getUTCSeconds(),this.$ms=_.getUTCMilliseconds()}else b.call(this)};var C=d.utcOffset;d.utcOffset=function(_,L){var E=this.$utils().u;if(E(_))return this.$u?0:E(this.$offset)?C.call(this):this.$offset;if(typeof _=="string"&&(_=function(H){H===void 0&&(H="");var D=H.match(r);if(!D)return null;var M=(""+D[0]).match(o)||["-",0,0],V=M[0],U=60*+M[1]+ +M[2];return U===0?0:V==="+"?U:-U}(_),_===null))return this;var A=Math.abs(_)<=16?60*_:_;if(A===0)return this.utc(L);var I=this.clone();if(L)return I.$offset=A,I.$u=!1,I;var O=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(I=this.local().add(A+O,t)).$offset=A,I.$x.$localOffset=O,I};var m=d.format;d.format=function(_){var L=_||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,L)},d.valueOf=function(){var _=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*_},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var k=d.toDate;d.toDate=function(_){return _==="s"&&this.$offset?c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():k.call(this)};var x=d.diff;d.diff=function(_,L,E){if(_&&this.$u===_.$u)return x.call(this,_,L,E);var A=this.local(),I=c(_).local();return x.call(A,I,L,E)}}})})($8);var xL=$8.exports;const ML=rr(xL),Cc={cuiTrigger:"_cuiTrigger_1byb5_1",cuiMenuPanel:"_cuiMenuPanel_1byb5_10",cuiShowClose:"_cuiShowClose_1byb5_18",cuiCloseButton:"_cuiCloseButton_1byb5_22"},Ii=({children:e,...n})=>l.jsx(V3,{...n,children:e}),T8=({anchor:e,children:n,...t})=>l.jsxs(l.Fragment,{children:[l.jsx(W3,{className:Cc.cuiTrigger,asChild:!0,...t,children:l.jsx("div",{children:n})}),e&&l.jsx(mS,{asChild:!0,children:e})]});T8.displayName="PopoverTrigger",Ii.Trigger=T8;const I8=({children:e,showArrow:n,showClose:t,forceMount:r,container:o,...u})=>l.jsx(Z3,{forceMount:r,container:o,children:l.jsxs(U3,{className:Q(Cc.cuiMenuPanel,{[Cc.cuiShowClose]:t}),sideOffset:4,...u,children:[t&&l.jsx(wS,{className:Cc.cuiCloseButton,asChild:!0,children:l.jsx(Fs,{children:l.jsx(Te,{name:"cross"})})}),n&&l.jsx(yS,{width:20,height:10,asChild:!0,children:l.jsx(D3,{})}),e]})});I8.displayName="PopoverContent",Ii.Content=I8;const Ht={cuiGridContainer:"_cuiGridContainer_k3q98_1",cuiInline:"_cuiInline_k3q98_4",cuiFillWidth:"_cuiFillWidth_k3q98_7",cuiWidthAuto:"_cuiWidthAuto_k3q98_10",cuiAlignItemsStart:"_cuiAlignItemsStart_k3q98_13",cuiAlignItemsCenter:"_cuiAlignItemsCenter_k3q98_16",cuiAlignItemsEnd:"_cuiAlignItemsEnd_k3q98_19",cuiAlignItemsStretch:"_cuiAlignItemsStretch_k3q98_22",cuiAlignContentCenter:"_cuiAlignContentCenter_k3q98_25",cuiAlignContentSpaceBetween:"_cuiAlignContentSpaceBetween_k3q98_28",cuiAlignContentSpaceAround:"_cuiAlignContentSpaceAround_k3q98_31",cuiAlignContentSpaceEvenly:"_cuiAlignContentSpaceEvenly_k3q98_34",cuiAlignContentStart:"_cuiAlignContentStart_k3q98_37",cuiAlignContentStretch:"_cuiAlignContentStretch_k3q98_40",cuiAlignContentEnd:"_cuiAlignContentEnd_k3q98_43",cuiAlignContentLeft:"_cuiAlignContentLeft_k3q98_46",cuiAlignContentRight:"_cuiAlignContentRight_k3q98_49",cuiJustifyContentCenter:"_cuiJustifyContentCenter_k3q98_52",cuiJustifyContentSpaceBetween:"_cuiJustifyContentSpaceBetween_k3q98_55",cuiJustifyContentSpaceAround:"_cuiJustifyContentSpaceAround_k3q98_58",cuiJustifyContentSpaceEvenly:"_cuiJustifyContentSpaceEvenly_k3q98_61",cuiJustifyContentStart:"_cuiJustifyContentStart_k3q98_64",cuiJustifyContentStretch:"_cuiJustifyContentStretch_k3q98_67",cuiJustifyContentEnd:"_cuiJustifyContentEnd_k3q98_70",cuiJustifyContentLeft:"_cuiJustifyContentLeft_k3q98_73",cuiJustifyContentRight:"_cuiJustifyContentRight_k3q98_76",cuiJustifyItemsStart:"_cuiJustifyItemsStart_k3q98_79",cuiJustifyItemsCenter:"_cuiJustifyItemsCenter_k3q98_82",cuiJustifyItemsEnd:"_cuiJustifyItemsEnd_k3q98_85",cuiJustifyItemsStretch:"_cuiJustifyItemsStretch_k3q98_88",cuiGapNone:"_cuiGapNone_k3q98_91",cuiGapXxs:"_cuiGapXxs_k3q98_94",cuiGapXs:"_cuiGapXs_k3q98_97",cuiGapSm:"_cuiGapSm_k3q98_100",cuiGapMd:"_cuiGapMd_k3q98_103",cuiGapLg:"_cuiGapLg_k3q98_106",cuiGapXl:"_cuiGapXl_k3q98_109",cuiGapXxl:"_cuiGapXxl_k3q98_112",cuiGapUnset:"_cuiGapUnset_k3q98_115",cuiColumnGapNone:"_cuiColumnGapNone_k3q98_118",cuiColumnGapXxs:"_cuiColumnGapXxs_k3q98_121",cuiColumnGapXs:"_cuiColumnGapXs_k3q98_124",cuiColumnGapSm:"_cuiColumnGapSm_k3q98_127",cuiColumnGapMd:"_cuiColumnGapMd_k3q98_130",cuiColumnGapLg:"_cuiColumnGapLg_k3q98_133",cuiColumnGapXl:"_cuiColumnGapXl_k3q98_136",cuiColumnGapXxl:"_cuiColumnGapXxl_k3q98_139",cuiColumnGapUnset:"_cuiColumnGapUnset_k3q98_142",cuiRowGapNone:"_cuiRowGapNone_k3q98_145",cuiRowGapXxs:"_cuiRowGapXxs_k3q98_148",cuiRowGapXs:"_cuiRowGapXs_k3q98_151",cuiRowGapSm:"_cuiRowGapSm_k3q98_154",cuiRowGapMd:"_cuiRowGapMd_k3q98_157",cuiRowGapLg:"_cuiRowGapLg_k3q98_160",cuiRowGapXl:"_cuiRowGapXl_k3q98_163",cuiRowGapXxl:"_cuiRowGapXxl_k3q98_166",cuiRowGapUnset:"_cuiRowGapUnset_k3q98_169",cuiResponsive:"_cuiResponsive_k3q98_173"},EL=({alignItems:e="stretch",alignContent:n="stretch",children:t,columnGap:r,gap:o,gridAutoColumns:u,gridAutoFlow:s,gridAutoRows:c,gridTemplateAreas:d,gridTemplateColumns:g,gridTemplateRows:b,gridTemplate:C,inline:m=!1,isResponsive:k=!0,justifyContent:x="stretch",justifyItems:_="stretch",rowGap:L,height:E,maxHeight:A,minHeight:I,fillWidth:O=!0,maxWidth:H,minWidth:D,overflow:M,component:V,...U},j)=>{const G=V??"div",q=Q(Ht.cuiGridContainer,{[Ht.cuiInline]:m,[Ht.cuiFillWidth]:O,[Ht.cuiWidthAuto]:!O,[Ht.cuiResponsive]:k,[Ht[`cuiAlignItems${e.charAt(0).toUpperCase()+e.slice(1)}`]]:e!=="stretch",[Ht[`cuiAlignContent${n.charAt(0).toUpperCase()+n.slice(1)}`]]:n!=="stretch",[Ht[`cuiJustifyContent${x.charAt(0).toUpperCase()+x.slice(1)}`]]:x!=="stretch",[Ht[`cuiJustifyItems${_.charAt(0).toUpperCase()+_.slice(1)}`]]:_!=="stretch",[Ht[`cuiGap${o?o.charAt(0).toUpperCase()+o.slice(1):""}`]]:o,[Ht[`cuiColumnGap${r?r.charAt(0).toUpperCase()+r.slice(1):""}`]]:r,[Ht[`cuiRowGap${L?L.charAt(0).toUpperCase()+L.slice(1):""}`]]:L}),Y={...u&&{gridAutoColumns:u},...s&&{gridAutoFlow:s},...c&&{gridAutoRows:c},...d&&{gridTemplateAreas:d},...g&&{gridTemplateColumns:g},...b&&{gridTemplateRows:b},...C&&{gridTemplate:C},...E&&{height:E},...A&&{maxHeight:A},...I&&{minHeight:I},...H&&{maxWidth:H},...D&&{minWidth:D},...M&&{overflow:M}};return l.jsx(G,{className:q,style:Y,"data-testid":"grid-container",ref:j,...U,children:t})},D8=p.forwardRef(EL),FL={cuiUnderlinedTrigger:"_cuiUnderlinedTrigger_1nc50_1"};yn.extend(gL),yn.extend(vL),yn.extend(mL),yn.extend(_L),yn.extend(LL),yn.extend(ML);const $L=[{l:"s",r:1,d:"second"},{l:"ss",r:56,d:"second"},{l:"m",r:90,d:"second"},{l:"mm",r:55,d:"minute"},{l:"h",r:90,d:"minute"},{l:"hh",r:22,d:"hour"},{l:"d",r:40,d:"hour"},{l:"dd",r:31,d:"day"},{l:"M",r:45,d:"day"},{l:"MM",r:11,d:"month"},{l:"y",r:17,d:"month"},{l:"yy",r:2,d:"year"}];yn.extend(yL,{thresholds:$L}),yn.updateLocale("en",{relativeTime:{future:"In %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"1 minute",mm:"%d minutes",h:"1 hour",hh:"%d hours",d:"1 day",dd:"%d days",w:"1 week",ww:"%d weeks",M:"1 month",MM:"%d months",y:"1 year",yy:"%d years"}});const f0=(e,n)=>{const t=yn().year()===e.year(),r="MMM D, h:mm a",o="MMM D, YYYY, h:mm a";return t?n?e.tz(n).format(r).replace("am","a.m.").replace("pm","p.m."):e.format(r).replace("am","a.m.").replace("pm","p.m."):n?e.tz(n).format(o).replace("am","a.m.").replace("pm","p.m."):e.format(o).replace("am","a.m.").replace("pm","p.m.")},H8=(e,n)=>{var t;return((t=new Intl.DateTimeFormat(void 0,{timeZone:n,timeZoneName:"short"}).formatToParts(e.toDate()).find(r=>r.type==="timeZoneName"))==null?void 0:t.value)??e.format("z")},TL=({date:e,side:n="top",size:t="sm",systemTimeZone:r,weight:o="normal"})=>{const u=yn(e);let s;if(r)try{s=u.tz(r)}catch{s=u.tz("America/New_York")}return l.jsxs(Ii,{children:[l.jsx(Ii.Trigger,{className:FL.cuiUnderlinedTrigger,children:l.jsx(_l,{size:t,weight:o,children:yn.utc(e).fromNow()})}),l.jsx(Ii.Content,{side:n,showArrow:!0,children:l.jsxs(D8,{columnGap:"xl",gridTemplateColumns:"repeat(2, auto)",gap:"sm",children:[l.jsx(_l,{color:"muted",size:"sm",children:"Local"}),l.jsx(xl,{justifyContent:"end",children:l.jsxs(_l,{size:"sm",children:[f0(u)," (",H8(u,yn.tz.guess()),")"]})}),s&&l.jsxs(l.Fragment,{children:[l.jsx(_l,{color:"muted",size:"sm",children:"System"}),l.jsx(xl,{justifyContent:"end",children:l.jsxs(_l,{size:"sm",children:[f0(s,r)," (",H8(s,r),")"]})})]}),l.jsx(_l,{color:"muted",size:"sm",children:"UTC"}),l.jsx(xl,{justifyContent:"end",children:l.jsx(_l,{size:"sm",children:f0(u.utc(),"UTC")})}),l.jsx(_l,{color:"muted",size:"sm",children:"Unix"}),l.jsx(xl,{justifyContent:"end",children:l.jsx(_l,{size:"sm",children:Math.round(e.getTime()/1e3)})})]})})]})},A8=Symbol.for("constructDateFrom");function Di(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&A8 in e?e[A8](n):e instanceof Date?new e.constructor(n):new Date(n)}function Un(e,n){return Di(n||e,e)}function vc(e,n,t){const r=Un(e,t==null?void 0:t.in);return isNaN(n)?Di(e,NaN):(n&&r.setDate(r.getDate()+n),r)}function P8(e,n,t){const r=Un(e,t==null?void 0:t.in);if(isNaN(n))return Di(e,NaN);if(!n)return r;const o=r.getDate(),u=Di(e,r.getTime());u.setMonth(r.getMonth()+n+1,0);const s=u.getDate();return o>=s?u:(r.setFullYear(u.getFullYear(),u.getMonth(),o),r)}function IL(e,n){const t=Un(e,n==null?void 0:n.in).getDay();return t===0||t===6}let DL={};function O8(){return DL}function N8(e,n){var c,d,g,b;const t=O8(),r=(n==null?void 0:n.weekStartsOn)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??t.weekStartsOn??((b=(g=t.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,o=Un(e,n==null?void 0:n.in),u=o.getDay(),s=(u<r?7:0)+u-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function B8(e,...n){const t=Di.bind(null,n.find(r=>typeof r=="object"));return n.map(t)}function V8(e,n,t){return vc(e,n*7,t)}function h0(e,n){const t=Un(e,n==null?void 0:n.in);return t.setDate(1),t.setHours(0,0,0,0),t}function HL(e,n){return Un(e,n==null?void 0:n.in).getDate()}function AL(e,n){return Un(e,n==null?void 0:n.in).getDay()}function PL(e,n){const t=Un(e,n==null?void 0:n.in),r=t.getFullYear(),o=t.getMonth(),u=Di(t,0);return u.setFullYear(r,o+1,0),u.setHours(0,0,0,0),u.getDate()}function OL(e,n){return+Un(e)==+Un(n)}function NL(e,n,t){var C,m;const r=O8(),o=r.weekStartsOn??((m=(C=r.locale)==null?void 0:C.options)==null?void 0:m.weekStartsOn)??0,u=Un(e,t==null?void 0:t.in),s=u.getDay(),d=(n%7+7)%7,g=7-o,b=n<0||n>6?n-(s+g)%7:(d+g)%7-(s+g)%7;return vc(u,b,t)}function BL(e,n,t){const[r,o]=B8(t==null?void 0:t.in,e,n);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function VL(e,n,t){const[r,o]=B8(t==null?void 0:t.in,e,n);return r.getFullYear()===o.getFullYear()}function WL(e,n,t){return vc(e,-n,t)}function ZL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setHours(n),r}function UL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setMilliseconds(n),r}function zL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setMinutes(n),r}function jL(e,n,t){const r=Un(e,t==null?void 0:t.in);return r.setSeconds(n),r}function GL(e,n,t){return P8(e,-n,t)}function XL(e,n,t){return V8(e,-n,t)}var W8=(e=>(e.Month="month",e.Week="week",e.Day="day",e))(W8||{}),fn=W8;function p0(e){return[...new Array(e).keys()]}var g0=0,bc=new Map;function C0(e){if(bc.has(e)){const t=bc.get(e)+1;bc.set(e,t),g0=t}else bc.set(e,1),g0=1;return`${e}-${g0}`}function Z8(e){return ZL(zL(jL(UL(e,0),0),0),0)}function Hr(e,n){const t=Z8(e),r=Z8(n);return OL(t,r)}function YL(e,n){return BL(n,e)&&VL(n,e)}function qL(e){return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}}function KL(...e){return(...n)=>e.reduce((t,r,o)=>r(...o===0?t:[t]),n)}function JL(e,...n){return KL(...n)(e)}function U8(e,n){return e.map(t=>({...t,key:C0(n)}))}function QL(e,n){return function(t){const{value:r}=t,o=YL(n,r),u=Hr(e,r),s=IL(r);return{...t,date:HL(r),isCurrentMonth:o,isCurrentDate:u,isWeekend:s}}}function RL(e){return function(n){return{...n,key:C0(e)}}}function ex(e,{weekStartsOn:n}){const{year:t,month:r,day:o}=qL(e),u=lx(e,n),s=nx(e,u),c=p0(7).map(g=>({value:NL(e,g+n)})),d=(g,b)=>{const C=g*7+b-u+1;return{value:new Date(t,r,C)}};return{cursorDate:e,year:t,month:r,day:o,weekStartsOn:n,startWeekdayInMonth:u,weeksInMonth:s,weekendDays:c,today:{weekIndex:tx(o,u),dateIndex:AL(e)},getDateCellByIndex:d}}function lx(e,n){const t=(h0(e).getDay()-n)%7;return t<0?t+7:t}function nx(e,n){const t=PL(e);return Math.ceil((n+t)/7)}function tx(e,n){return(e+n)%7>0?Math.floor((e+n)/7):Math.floor((e+n)/7)-1}function rx(){const[e,n]=p.useState(!1);return p.useEffect(()=>{n(!0)},[]),e}function ox({defaultDate:e,defaultWeekStart:n=0,defaultViewType:t=fn.Month}={}){const r=rx(),o=p.useMemo(()=>e!=null?new Date(e):new Date,[e,r]),[u,s]=p.useState(n),[c,d]=p.useState(o),[g,b]=p.useState(t),C=ex(c,{weekStartsOn:u}),{weekendDays:m,weeksInMonth:k,today:x,getDateCellByIndex:_}=C,L=p.useCallback(H=>{switch(H){case fn.Month:case fn.Week:return{weekDays:U8(m,"weekdays")};case fn.Day:default:return{weekDays:U8([{value:c}],"weekdays")}}},[c,m]),E=p.useCallback(H=>({value:p0(H).map(D=>({key:C0("weeks"),value:p0(7).map(M=>JL(_(D,M),QL(o,c),RL("days")))}))}),[o,c,_]),A=p.useCallback(H=>{var U;const D=E(k),{weekIndex:M,dateIndex:V}=x;return{[fn.Month]:D,[fn.Week]:{value:[D.value[M]]},[fn.Day]:{value:[{key:"week-day-type",value:[(U=D.value[M])==null?void 0:U.value[V]]}]}}[H]},[E,x,k]),I=p.useMemo(()=>{switch(g){case fn.Month:return H=>P8(h0(H),1);case fn.Week:return H=>V8(N8(H,{weekStartsOn:u}),1);case fn.Day:return H=>vc(H,1)}},[g,u]),O=p.useMemo(()=>{switch(g){case fn.Month:return H=>GL(h0(H),1);case fn.Week:return H=>XL(N8(H,{weekStartsOn:u}),1);case fn.Day:return H=>WL(H,1)}},[g,u]);return p.useMemo(()=>({...C,headers:L(g),body:A(g),navigation:{toNext:()=>d(H=>I(H)),toPrev:()=>d(H=>O(H)),setToday:()=>d(new Date),setDate:H=>d(H)},view:{type:g,setViewType:b,setWeekStartsOn:s,isMonthView:g===fn.Month,isWeekView:g===fn.Week,isDayView:g===fn.Day,showMonthView:()=>b(fn.Month),showWeekView:()=>b(fn.Week),showDayView:()=>b(fn.Day)}}),[C,A,L,I,O,g])}const Ol={cuiWrapper:"_cuiWrapper_1e7yg_1",disabled:"_disabled_1e7yg_49",cuiError:"_cuiError_1e7yg_63",cuiResizeVertical:"_cuiResizeVertical_1e7yg_92",cuiResizeHorizontal:"_cuiResizeHorizontal_1e7yg_97",cuiResizeBoth:"_cuiResizeBoth_1e7yg_102",cuiFormRoot:"_cuiFormRoot_1e7yg_107",cuiVertical:"_cuiVertical_1e7yg_117",cuiVerticalReversed:"_cuiVerticalReversed_1e7yg_122",cuiHorizontal:"_cuiHorizontal_1e7yg_127",cuiHorizontalReversed:"_cuiHorizontalReversed_1e7yg_132",cuiLabelPadding:"_cuiLabelPadding_1e7yg_137",cuiFormElementContainer:"_cuiFormElementContainer_1e7yg_142",cuiErrorMessage:"_cuiErrorMessage_1e7yg_153",cuiInputElement:"_cuiInputElement_1e7yg_158",cuiNumberInputElement:"_cuiNumberInputElement_1e7yg_158",cuiInputWithStartContent:"_cuiInputWithStartContent_1e7yg_174",cuiInputWithEndContent:"_cuiInputWithEndContent_1e7yg_178",cuiInputNoPadding:"_cuiInputNoPadding_1e7yg_182",cuiInputWithPadding:"_cuiInputWithPadding_1e7yg_187",cuiHideNumberControls:"_cuiHideNumberControls_1e7yg_192",cuiTextareaElement:"_cuiTextareaElement_1e7yg_200",cuiIconButton:"_cuiIconButton_1e7yg_218",cuiIconWrapper:"_cuiIconWrapper_1e7yg_229",cuiInputStartContent:"_cuiInputStartContent_1e7yg_236",cuiInputEndContent:"_cuiInputEndContent_1e7yg_245"},ix=({children:e,orientation:n="vertical",dir:t="start",addLabelPadding:r})=>{const o=()=>n==="horizontal"?t==="start"?"row-reverse":"row":t==="start"?"column-reverse":"column";return l.jsx("div",{className:Q(Ol.cuiFormRoot,{[Ol.cuiVertical]:n==="vertical"&&t==="end",[Ol.cuiVerticalReversed]:n==="vertical"&&t==="start",[Ol.cuiHorizontal]:n==="horizontal"&&t==="end",[Ol.cuiHorizontalReversed]:n==="horizontal"&&t==="start",[Ol.cuiLabelPadding]:r&&n==="horizontal"}),style:{flexDirection:o()},children:e})},ux=({children:e})=>l.jsx("div",{className:Ol.cuiFormElementContainer,children:e}),ax=({children:e})=>l.jsx("div",{className:Ol.cuiErrorMessage,children:e}),Hi=({className:e,id:n,label:t="",labelColor:r,error:o,disabled:u,children:s,orientation:c,dir:d,resize:g="none"})=>l.jsxs(ix,{orientation:c,dir:d,addLabelPadding:!0,children:[l.jsxs(ux,{children:[l.jsx("div",{className:Q(Ol.cuiWrapper,e,{[Ol.cuiError]:!!o,[Ol.cuiDisabled]:u,[Ol.cuiResizeVertical]:g==="vertical",[Ol.cuiResizeHorizontal]:g==="horizontal",[Ol.cuiResizeBoth]:g==="both"}),"data-resize":g,children:s}),!!o&&o!==!0&&l.jsx(ax,{children:o})]}),t&&l.jsx(na,{htmlFor:n,disabled:u,error:!!o,className:Ol.cuiLabel,style:r?{color:r}:void 0,children:t})]}),mc=p.forwardRef(({hasStartContent:e,hasEndContent:n,className:t,...r},o)=>l.jsx("input",{className:Q(Ol.cuiInputElement,t,{[Ol.cuiInputWithStartContent]:e&&!n,[Ol.cuiInputWithEndContent]:!e&&n,[Ol.cuiInputNoPadding]:e&&n,[Ol.cuiInputWithPadding]:!e&&!n}),ref:o,...r})),sx=p.forwardRef(({hideControls:e,className:n,...t},r)=>l.jsx(mc,{...t,ref:r,type:"number",className:Q(Ol.cuiNumberInputElement,n,{[Ol.cuiHideNumberControls]:e})})),cx=p.forwardRef(({className:e,...n},t)=>l.jsx("textarea",{className:Q(Ol.cuiTextareaElement,e),ref:t,...n})),z8=({className:e,...n})=>l.jsx("button",{className:Q(Ol.cuiIconButton,e),...n}),v0=({className:e,...n})=>l.jsx("div",{className:Q(Ol.cuiInputStartContent,e),...n}),j8=({className:e,...n})=>l.jsx("div",{className:Q(Ol.cuiInputEndContent,e),...n}),b0="en-US",Ai=new Intl.DateTimeFormat(b0,{day:"2-digit",month:"short",year:"numeric"}),dx=new Intl.DateTimeFormat(b0,{weekday:"short"}),fx=new Intl.DateTimeFormat(b0,{month:"short",year:"numeric"}),hx=e=>{const n=yn();if(e<0){const r=[];for(let o=0;o<Math.abs(e);o++){const u=n.subtract(o,"month");u.date()===1&&u.month()===n.month()||r.push({startDate:u.startOf("month").toDate(),endDate:o===0?n.toDate():u.endOf("month").toDate()})}return r.reverse()}const t=[];for(let r=0;r<e;r++){const o=n.add(r,"month");t.push({startDate:o.startOf("month").toDate(),endDate:o.endOf("month").toDate()})}return t},px=(e,n,t)=>Math.abs(yn(e).diff(yn(n),"days"))<=t,gx=({startDate:e,endDate:n})=>{if(e.getMonth()!==n.getMonth())return!1;const t=yn(e),r=yn(n),o=t.isSame(t.startOf("month"),"day"),u=r.isSame(r.endOf("month"),"day");return o&&u},zn={cuiHighlightedInputWrapper:"_cuiHighlightedInputWrapper_13poj_1",cuiActive:"_cuiActive_13poj_4",cuiInactive:"_cuiInactive_13poj_7",cuiDatePickerContainer:"_cuiDatePickerContainer_13poj_11",cuiUnselectableTitle:"_cuiUnselectableTitle_13poj_15",cuiDateTable:"_cuiDateTable_13poj_21",cuiDateTableHeader:"_cuiDateTableHeader_13poj_40",cuiDateTableCell:"_cuiDateTableCell_13poj_46",cuiNotCurrentMonth:"_cuiNotCurrentMonth_13poj_52",cuiDisabled:"_cuiDisabled_13poj_52",cuiSelected:"_cuiSelected_13poj_56",cuiToday:"_cuiToday_13poj_60"},Cx=({isActive:e,disabled:n,id:t,placeholder:r,selectedDate:o})=>{const u=p.useId(),s=o instanceof Date?Ai.format(o):"";return l.jsxs(Hi,{className:Q(zn.cuiHighlightedInputWrapper,{[zn.cuiActive]:e,[zn.cuiInactive]:!e}),disabled:n,id:t??u,children:[l.jsx(v0,{children:l.jsx(Te,{name:"calendar"})}),l.jsx(mc,{hasStartContent:!0,"data-testid":"datepicker-input",placeholder:r,readOnly:!0,value:s})]})},vx=({isActive:e,disabled:n,id:t,placeholder:r,selectedEndDate:o,selectedStartDate:u})=>{const s=p.useId();let c=l.jsx(_l,{color:"muted",component:"span",children:r??""});return u&&(o?c=l.jsxs("span",{children:[Ai.format(u)," –"," ",Ai.format(o)]}):c=l.jsxs("span",{children:[Ai.format(u)," ",l.jsx(_l,{color:"muted",component:"span",children:"– end date"})]})),l.jsxs(Hi,{className:Q(zn.cuiHighlightedInputWrapper,{[zn.cuiActive]:e,[zn.cuiInactive]:!e}),disabled:n,id:t??s,children:[l.jsx(v0,{children:l.jsx(Te,{name:"calendar"})}),l.jsx("div",{className:"input-element-wrapper","data-testid":"daterangepicker-input",style:{width:"100%",display:"flex",alignItems:"center",padding:"var(--click-input-space-y) var(--click-input-space-x)",minHeight:"var(--click-input-size-height-md)",backgroundColor:"var(--click-input-color-background-default)",border:"var(--click-input-stroke-border-default)",borderRadius:"var(--click-input-radii-all)",fontSize:"var(--click-input-typography-text-default)"},children:c})]})},G8=({$isCurrentMonth:e,$isDisabled:n,$isSelected:t,$isToday:r,children:o,onClick:u,onMouseEnter:s,onMouseLeave:c,...d})=>l.jsx("td",{className:Q(zn.cuiDateTableCell,{[zn.cuiNotCurrentMonth]:!e,[zn.cuiDisabled]:n,[zn.cuiSelected]:t,[zn.cuiToday]:r}),onClick:u,onMouseEnter:s,onMouseLeave:c,...d,children:o}),m0=({calendarOptions:e={},children:n,...t})=>{const{body:r,headers:o,month:u,navigation:s,year:c}=ox({defaultWeekStart:1,...e}),d=p.useCallback(()=>{s.toNext()},[s]),g=p.useCallback(()=>{s.toPrev()},[s]),b=new Date;return b.setMonth(u),b.setFullYear(c),l.jsxs(xl,{className:zn.cuiDatePickerContainer,"data-testid":"datepicker-calendar-container",isResponsive:!1,fillWidth:!1,orientation:"vertical",padding:"sm",...t,children:[l.jsxs(xl,{isResponsive:!1,justifyContent:"space-between",orientation:"horizontal",children:[l.jsx(kn,{"data-testid":"calendar-previous-month",icon:"chevron-left",onClick:g,size:"sm",type:"ghost"}),l.jsx("h2",{className:zn.cuiUnselectableTitle,children:fx.format(b)}),l.jsx(kn,{"data-testid":"calendar-next-month",icon:"chevron-right",onClick:d,size:"sm",type:"ghost"})]}),l.jsxs("table",{className:zn.cuiDateTable,children:[l.jsx("thead",{children:l.jsx("tr",{children:o.weekDays.map(({key:C,value:m})=>l.jsx("th",{className:zn.cuiDateTableHeader,children:dx.format(m)},C))})}),l.jsx("tbody",{children:n(r)})]})]})},bx=({calendarBody:e,closeDatepicker:n,futureDatesDisabled:t,selectedDate:r,setSelectedDate:o})=>e.value.map(({key:u,value:s})=>l.jsx("tr",{children:s.map(({date:c,isCurrentMonth:d,key:g,value:b})=>{const C=r?Hr(r,b):!1,m=new Date,k=Hr(m,b),x=t?b>m:!1,_=()=>{if(x)return!1;o(b),n()};return l.jsx(G8,{$isCurrentMonth:d,$isDisabled:x,$isSelected:C,$isToday:k,onClick:_,children:c},g)})},u)),mx=({date:e,disabled:n=!1,futureDatesDisabled:t=!1,onSelectDate:r,placeholder:o})=>{const[u,s]=p.useState(!1),[c,d]=p.useState(),g={};c&&(g.defaultDate=c),p.useEffect(()=>{e&&d(e)},[e]);const b=()=>{s(!1)},C=m=>{d(m),r(m)};return l.jsxs(Rl,{onOpenChange:s,open:u,children:[l.jsx(Rl.Trigger,{disabled:n,children:l.jsx(Cx,{"data-testid":"datepicker-input-container",disabled:n,isActive:u,placeholder:o,selectedDate:c})}),l.jsx(Rl.Content,{align:"start",children:l.jsx(m0,{calendarOptions:g,children:m=>l.jsx(bx,{calendarBody:m,closeDatepicker:b,futureDatesDisabled:t,selectedDate:c,setSelectedDate:C})})})]})},Pi={cuiPredefinedCalendarContainer:"_cuiPredefinedCalendarContainer_8yeob_1",cuiPredefinedDatesContainer:"_cuiPredefinedDatesContainer_8yeob_6",cuiCalendarRendererContainer:"_cuiCalendarRendererContainer_8yeob_10",cuiStyledCalendarRenderer:"_cuiStyledCalendarRenderer_8yeob_19",cuiStyledDropdownItem:"_cuiStyledDropdownItem_8yeob_24",cuiScrollableContainer:"_cuiScrollableContainer_8yeob_28",cuiDateRangeTableCell:"_cuiDateRangeTableCell_8yeob_33",cuiShowRangeIndicator:"_cuiShowRangeIndicator_8yeob_33"},X8=({calendarBody:e,closeDatepicker:n,futureDatesDisabled:t,futureStartDatesDisabled:r,maxRangeLength:o,setSelectedDate:u,startDate:s,endDate:c})=>e.value.map(({key:d,value:g})=>l.jsx("tr",{children:g.map(({date:b,isCurrentMonth:C,key:m,value:k})=>{const x=s&&Hr(s,k)||c&&Hr(c,k),_=new Date,L=Hr(_,k);let E=!1;t&&k>_&&(E=!0),r&&!s&&k>_&&(E=!0),o>1&&s&&!px(s,k,o)&&(E=!0);const A=()=>{},I=()=>{},O=()=>{if(E)return!1;if(u(k),!(s&&c)&&!(s&&k<s)&&s&&!Hr(k,s)){n();return}};return l.jsx(G8,{$isCurrentMonth:C,$isDisabled:E,$isSelected:x,$isToday:L,onClick:O,onMouseEnter:A,onMouseLeave:I,children:b},m)})},d)),wx="en-US",yx=new Intl.DateTimeFormat(wx,{month:"short",year:"numeric"}),Sx=({onSelectDateRange:e,predefinedDatesList:n,selectedEndDate:t,selectedStartDate:r,setEndDate:o,setStartDate:u,shouldShowCustomRange:s,showCustomDateRange:c})=>{const d=g=>{g.preventDefault(),c(!s)};return l.jsxs(xl,{className:Pi.cuiPredefinedDatesContainer,"data-testid":"predefined-dates-list",isResponsive:!1,orientation:"vertical",children:[l.jsx(xl,{className:Pi.cuiScrollableContainer,orientation:"vertical",children:n.map(({startDate:g,endDate:b})=>{const C=()=>{u(g),o(b),e(g,b)},m=t&&Hr(t,b)&&r&&Hr(r,g),x=gx({startDate:g,endDate:b})?yx.format(g):`${Ai.format(g)} - ${Ai.format(b)}`.trim();return l.jsx(Rl.Item,{className:Pi.cuiStyledDropdownItem,"data-testid":`predefined-date-${g.getTime()}`,onClick:C,children:l.jsxs(xl,{"data-selected":m,"data-testid":x,justifyContent:"space-between",orientation:"horizontal",children:[x,m&&l.jsx(Te,{name:"check"})]})},g.toISOString())})}),l.jsx(Rl.Item,{className:Pi.cuiStyledDropdownItem,onClick:d,children:l.jsxs(xl,{justifyContent:"space-between",orientation:"horizontal",children:["Custom time period ",l.jsx(Te,{name:"chevron-right"})]})})]})},_x=({endDate:e,startDate:n,disabled:t=!1,futureDatesDisabled:r=!1,futureStartDatesDisabled:o=!1,maxRangeLength:u=-1,onSelectDateRange:s,placeholder:c="start date – end date",predefinedDatesList:d})=>{const[g,b]=p.useState(!1),[C,m]=p.useState(),[k,x]=p.useState(),[_,L]=p.useState(!1),E={};C&&(E.defaultDate=C),p.useEffect(()=>{n&&m(n)},[n]),p.useEffect(()=>{e&&x(e)},[e]);const A=p.useCallback(()=>{b(!1),L(!1)},[]),I=D=>{b(D),D||L(!1)},O=p.useCallback(D=>{if(C&&k){if(o&&D>new Date){x(void 0);return}m(D),x(void 0);return}if(C){if(Hr(C,D)){m(void 0);return}if(D<C){m(D);return}x(D),s(C,D),L(!1);return}m(D)},[o,s,k,C]),H=d!==void 0&&d.length>0;return l.jsxs(Rl,{onOpenChange:I,open:g,children:[l.jsx(Rl.Trigger,{disabled:t,children:l.jsx(vx,{"data-testid":"datepicker-input-container",disabled:t,isActive:g,placeholder:c,selectedEndDate:k,selectedStartDate:C})}),l.jsx(Rl.Content,{align:"start",children:H?l.jsxs(ef,{className:Pi.cuiPredefinedCalendarContainer,gap:"none",orientation:"horizontal",padding:"none",children:[l.jsx(Sx,{onSelectDateRange:s,predefinedDatesList:d,selectedEndDate:k,selectedStartDate:C,setEndDate:x,setStartDate:m,shouldShowCustomRange:_,showCustomDateRange:L}),_&&l.jsx("div",{className:Pi.cuiCalendarRendererContainer,children:l.jsx(m0,{calendarOptions:E,children:D=>l.jsx(X8,{calendarBody:D,closeDatepicker:A,futureDatesDisabled:r,futureStartDatesDisabled:o,maxRangeLength:u,setSelectedDate:O,startDate:C,endDate:k})})})]}):l.jsx(m0,{calendarOptions:E,children:D=>l.jsx(X8,{calendarBody:D,closeDatepicker:A,futureDatesDisabled:r,futureStartDatesDisabled:o,maxRangeLength:u,setSelectedDate:O,startDate:C,endDate:k})})})]})},Y8="Dialog",[q8,fB]=dn(Y8),[kx,ar]=q8(Y8),K8=e=>{const{__scopeDialog:n,children:t,open:r,defaultOpen:o,onOpenChange:u,modal:s=!0}=e,c=p.useRef(null),d=p.useRef(null),[g=!1,b]=Hn({prop:r,defaultProp:o,onChange:u});return p.createElement(kx,{scope:n,triggerRef:c,contentRef:d,contentId:bt(),titleId:bt(),descriptionId:bt(),open:g,onOpenChange:b,onOpenToggle:p.useCallback(()=>b(C=>!C),[b]),modal:s},t)},Lx="DialogTrigger",J8=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(Lx,t),u=Tl(n,o.triggerRef);return p.createElement(Ye.button,ie({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":S0(o.open)},r,{ref:u,onClick:ke(e.onClick,o.onOpenToggle)}))}),Q8="DialogPortal",[xx,R8]=q8(Q8,{forceMount:void 0}),e9=e=>{const{__scopeDialog:n,forceMount:t,children:r,container:o}=e,u=ar(Q8,n);return p.createElement(xx,{scope:n,forceMount:t},p.Children.map(r,s=>p.createElement(_n,{present:t||u.open},p.createElement(_i,{asChild:!0,container:o},s))))},w0="DialogOverlay",l9=p.forwardRef((e,n)=>{const t=R8(w0,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,u=ar(w0,e.__scopeDialog);return u.modal?p.createElement(_n,{present:r||u.open},p.createElement(Mx,ie({},o,{ref:n}))):null}),Mx=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(w0,t);return p.createElement(ec,{as:v1,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Ye.div,ie({"data-state":S0(o.open)},r,{ref:n,style:{pointerEvents:"auto",...r.style}})))}),Oi="DialogContent",y0=p.forwardRef((e,n)=>{const t=R8(Oi,e.__scopeDialog),{forceMount:r=t.forceMount,...o}=e,u=ar(Oi,e.__scopeDialog);return p.createElement(_n,{present:r||u.open},u.modal?p.createElement(Ex,ie({},o,{ref:n})):p.createElement(Fx,ie({},o,{ref:n})))}),Ex=p.forwardRef((e,n)=>{const t=ar(Oi,e.__scopeDialog),r=p.useRef(null),o=Tl(n,t.contentRef,r);return p.useEffect(()=>{const u=r.current;if(u)return k3(u)},[]),p.createElement(n9,ie({},e,{ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,u=>{var s;u.preventDefault(),(s=t.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,u=>{const s=u.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&u.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,u=>u.preventDefault())}))}),Fx=p.forwardRef((e,n)=>{const t=ar(Oi,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return p.createElement(n9,ie({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,u),!u.defaultPrevented){var c;r.current||(c=t.triggerRef.current)===null||c===void 0||c.focus(),u.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:u=>{var s,c;(s=e.onInteractOutside)===null||s===void 0||s.call(e,u),u.defaultPrevented||(r.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=u.target;((c=t.triggerRef.current)===null||c===void 0?void 0:c.contains(d))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}}))}),n9=p.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:u,...s}=e,c=ar(Oi,t),d=p.useRef(null),g=Tl(n,d);return p3(),p.createElement(p.Fragment,null,p.createElement(v3,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:u},p.createElement(Yu,ie({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":S0(c.open)},s,{ref:g,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),t9="DialogTitle",r9=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(t9,t);return p.createElement(Ye.h2,ie({id:o.titleId},r,{ref:n}))}),o9="DialogDescription",i9=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(o9,t);return p.createElement(Ye.p,ie({id:o.descriptionId},r,{ref:n}))}),u9="DialogClose",va=p.forwardRef((e,n)=>{const{__scopeDialog:t,...r}=e,o=ar(u9,t);return p.createElement(Ye.button,ie({type:"button"},r,{ref:n,onClick:ke(e.onClick,()=>o.onOpenChange(!1))}))});function S0(e){return e?"open":"closed"}const $x=K8,a9=J8,Tx=e9,Ix=l9,Dx=y0,s9=va,io={cuiTrigger:"_cuiTrigger_zul0q_19",cuiDialogOverlay:"_cuiDialogOverlay_zul0q_26",overlayShow:"_overlayShow_zul0q_1",cuiContentArea:"_cuiContentArea_zul0q_33",contentShow:"_contentShow_zul0q_1",cuiRegularPadding:"_cuiRegularPadding_zul0q_49",cuiReducedPadding:"_cuiReducedPadding_zul0q_53",cuiTitleArea:"_cuiTitleArea_zul0q_65",cuiSpaceBetween:"_cuiSpaceBetween_zul0q_70",cuiFlexEnd:"_cuiFlexEnd_zul0q_73",cuiTitle:"_cuiTitle_zul0q_65"},Bo=({children:e,...n})=>l.jsx($x,{...n,children:e}),c9=({children:e,asChild:n,className:t,...r})=>n?l.jsx(a9,{asChild:!0,...r,children:e}):l.jsx(a9,{className:Q(io.cuiTrigger,t),...r,children:e});c9.displayName="DialogTrigger",Bo.Trigger=c9;const d9=({label:e="Close",type:n="secondary",...t})=>l.jsx(s9,{asChild:!0,children:l.jsx(to,{type:n,label:e,...t})});d9.displayName="DialogClose",Bo.Close=d9;const Hx=({onClose:e})=>l.jsx(s9,{asChild:!0,children:l.jsx(V2,{onClick:e,children:l.jsx(Te,{name:"cross",size:"lg"})})}),f9=({title:e,children:n,showClose:t,onClose:r,forceMount:o,container:u,showOverlay:s=!0,reducePadding:c=!1,className:d,...g})=>l.jsxs(Tx,{forceMount:o,container:u,children:[s&&l.jsx(Ix,{className:io.cuiDialogOverlay}),l.jsxs(Dx,{"data-testid":"click-dialog-contentarea",className:Q(io.cuiContentArea,{[io.cuiRegularPadding]:!c,[io.cuiReducedPadding]:c},d),...g,children:[(e||t)&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Q(io.cuiTitleArea,{[io.cuiSpaceBetween]:!t||e,[io.cuiFlexEnd]:t&&!e}),children:[e&&l.jsx("h2",{className:io.cuiTitle,"data-testid":"click-dialog-title",children:e}),t&&l.jsx(Hx,{"data-testid":"click-dialog-close",onClose:r})]}),l.jsx(Gi,{size:"sm"})]}),n]})]});f9.displayName="DialogContent",Bo.Content=f9;const h9=(e,n=40,t="~")=>{if(e.length<=n)return e;if(e.startsWith("."))return`${e.slice(0,n)}${t}`;const r=e.lastIndexOf(".")!==-1?e.slice(e.lastIndexOf(".")):"";return(r?e.slice(0,e.lastIndexOf(".")):e).slice(0,n)+t+r},Kl={cuiUploadArea:"_cuiUploadArea_1hgfo_1",cuiHasFile:"_cuiHasFile_1hgfo_14",cuiSmall:"_cuiSmall_1hgfo_21",cuiDraggable:"_cuiDraggable_1hgfo_27",cuiDragging:"_cuiDragging_1hgfo_31",cuiError:"_cuiError_1hgfo_35",cuiFileUploadTitle:"_cuiFileUploadTitle_1hgfo_40",cuiNotSupported:"_cuiNotSupported_1hgfo_44",cuiFileUploadDescription:"_cuiFileUploadDescription_1hgfo_48",cuiDocumentIcon:"_cuiDocumentIcon_1hgfo_53",cuiUploadIcon:"_cuiUploadIcon_1hgfo_59",cuiUploadText:"_cuiUploadText_1hgfo_65",cuiCentered:"_cuiCentered_1hgfo_72",cuiFileInfoHeader:"_cuiFileInfoHeader_1hgfo_79",cuiFileInfo:"_cuiFileInfo_1hgfo_79",cuiFileDetails:"_cuiFileDetails_1hgfo_93",cuiFileActions:"_cuiFileActions_1hgfo_99",cuiProgressContainer:"_cuiProgressContainer_1hgfo_106",cuiProgressBarContainer:"_cuiProgressBarContainer_1hgfo_114",cuiProgressPercentage:"_cuiProgressPercentage_1hgfo_119"},Ax=e=>e<1024?`${e.toFixed(1)} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,Px=(e,n)=>{if(!n.length)return!0;const t=e.toLowerCase().slice(e.lastIndexOf("."));return n.some(r=>r.toLowerCase()===t.toLowerCase())},Ox=({title:e,supportedFileTypes:n=[".txt",".sql"],size:t="sm",onFileSelect:r,onRetry:o,progress:u=0,failureMessage:s="Upload failed",showProgress:c=!1,showSuccess:d=!1,onFileFailure:g,onFileClose:b})=>{const[C,m]=p.useState(!1),[k,x]=p.useState(!1),[_,L]=p.useState(null),E=p.useRef(null),A=p.useRef(0);p.useEffect(()=>{let Y;return k&&(Y=setTimeout(()=>{x(!1)},2e3)),()=>{Y&&clearTimeout(Y)}},[k]);const I=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),A.current+=1,m(!0)},[]),O=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation(),A.current-=1,A.current<=0&&(m(!1),A.current=0)},[]),H=p.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation()},[]);p.useEffect(()=>{const Y=()=>{m(!1),A.current=0};return window.addEventListener("dragend",Y),document.addEventListener("drop",Y),document.addEventListener("mouseleave",Y),()=>{window.removeEventListener("dragend",Y),document.removeEventListener("drop",Y),document.removeEventListener("mouseleave",Y)}},[]);const D=p.useCallback(Y=>{if(!Px(Y.name,n)){x(!0),g&&g();return}const X={name:Y.name,size:Y.size};L(X),x(!1),r&&r(Y)},[r,n,g]),M=p.useCallback(Y=>{if(Y.preventDefault(),Y.stopPropagation(),m(!1),A.current=0,Y.dataTransfer.files&&Y.dataTransfer.files.length>0){const X=Y.dataTransfer.files[0];D(X)}},[D]),V=p.useCallback(Y=>{if(Y.target.files&&Y.target.files.length>0){const X=Y.target.files[0];D(X)}},[D]),U=p.useCallback(()=>{E.current&&E.current.click()},[]),j=p.useCallback(()=>{L(null),E.current&&(E.current.value=""),b&&b()},[b]),G=p.useCallback(()=>{o&&o()},[o]),q=n.join(",");return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Q(Kl.cuiUploadArea,{[Kl.cuiHasFile]:!!_,[Kl.cuiSmall]:t==="sm",[Kl.cuiDraggable]:!_,[Kl.cuiDragging]:C&&!_,[Kl.cuiError]:!!_&&!d&&!c}),onDragEnter:I,onDragLeave:O,onDragOver:H,onDrop:M,onClick:_?void 0:U,children:_?l.jsxs("div",{className:Kl.cuiFileInfo,children:[l.jsxs("div",{className:Kl.cuiFileInfoHeader,children:[l.jsx(Te,{name:"document",className:Kl.cuiDocumentIcon}),l.jsxs("div",{className:Kl.cuiFileDetails,children:[l.jsx(_l,{size:"md",children:h9(_.name)}),(d||c)&&l.jsx(_l,{size:"md",color:"muted",children:Ax(_.size)}),!c&&!d&&l.jsx(_l,{size:"md",color:"danger",children:s}),d&&l.jsx(Te,{size:"xs",state:"success",name:"check"})]}),l.jsxs("div",{className:Kl.cuiFileActions,children:[!c&&!d&&l.jsx(kn,{size:"sm",icon:"refresh",type:"ghost",onClick:G}),l.jsx(kn,{size:"sm",icon:"cross",type:"ghost",onClick:j})]})]}),c&&l.jsxs("div",{className:Kl.cuiProgressContainer,children:[l.jsx("div",{className:Kl.cuiProgressBarContainer,children:l.jsx(D0,{progress:u,type:"small"})}),l.jsxs(_l,{size:"sm",color:"muted",className:Kl.cuiProgressPercentage,children:[u,"%"]})]})]}):l.jsxs(l.Fragment,{children:[l.jsx(Te,{name:"upload",className:Kl.cuiUploadIcon}),l.jsxs("div",{className:Q(Kl.cuiUploadText,{[Kl.cuiSmall]:t==="sm",[Kl.cuiCentered]:t==="md"}),children:[k?l.jsx(_1,{type:"h1",className:Q(Kl.cuiFileUploadTitle,Kl.cuiNotSupported),children:"Unsupported file type"}):l.jsx(_1,{type:"h1",className:Q(Kl.cuiFileUploadTitle,{[Kl.cuiNotSupported]:k}),children:e}),l.jsxs(_l,{className:Kl.cuiFileUploadDescription,children:["Files supported: ",n.join(", ")]})]}),l.jsx(to,{type:"secondary",onClick:Y=>{Y.stopPropagation(),U()},children:"Browse file"})]})}),l.jsx("input",{type:"file",ref:E,accept:q,onChange:V,style:{display:"none"}})]})},un={cuiUploadArea:"_cuiUploadArea_z8sog_1",cuiDragging:"_cuiDragging_z8sog_16",cuiFileUploadTitle:"_cuiFileUploadTitle_z8sog_21",cuiNotSupported:"_cuiNotSupported_z8sog_25",cuiFileUploadDescription:"_cuiFileUploadDescription_z8sog_29",cuiUploadIcon:"_cuiUploadIcon_z8sog_34",cuiUploadText:"_cuiUploadText_z8sog_40",cuiFilesList:"_cuiFilesList_z8sog_48",cuiFileItem:"_cuiFileItem_z8sog_56",cuiError:"_cuiError_z8sog_67",cuiDocumentIcon:"_cuiDocumentIcon_z8sog_72",cuiFileInfoHeader:"_cuiFileInfoHeader_z8sog_78",cuiFileInfo:"_cuiFileInfo_z8sog_78",cuiFileDetails:"_cuiFileDetails_z8sog_92",cuiFileActions:"_cuiFileActions_z8sog_98",cuiProgressContainer:"_cuiProgressContainer_z8sog_105",cuiProgressBarContainer:"_cuiProgressBarContainer_z8sog_113",cuiProgressPercentage:"_cuiProgressPercentage_z8sog_118"},Nx=e=>e<1024?`${e.toFixed(1)} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,Bx=(e,n)=>{if(!n.length)return!0;const t=e.toLowerCase().slice(e.lastIndexOf("."));return n.some(r=>r.toLowerCase()===t.toLowerCase())},Vx=({title:e,supportedFileTypes:n=[".txt",".sql"],files:t,onFileSelect:r,onFileRetry:o,onFileRemove:u,onFileFailure:s})=>{const[c,d]=p.useState(!1),[g,b]=p.useState(!0),C=p.useRef(null),m=p.useRef(0);p.useEffect(()=>{let M;return g||(M=setTimeout(()=>{b(!0)},2e3)),()=>{M&&clearTimeout(M)}},[g]);const k=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current+=1,d(!0)},[]),x=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current-=1,m.current<=0&&(d(!1),m.current=0)},[]),_=p.useCallback(M=>{M.preventDefault(),M.stopPropagation()},[]);p.useEffect(()=>{const M=()=>{d(!1),m.current=0};return window.addEventListener("dragend",M),document.addEventListener("drop",M),document.addEventListener("mouseleave",M),()=>{window.removeEventListener("dragend",M),document.removeEventListener("drop",M),document.removeEventListener("mouseleave",M)}},[]);const L=p.useCallback(M=>{if(!Bx(M.name,n)){b(!1),s&&s();return}b(!0),r&&r(M)},[r,n,s]),E=p.useCallback(M=>{M.preventDefault(),M.stopPropagation(),d(!1),m.current=0,M.dataTransfer.files&&M.dataTransfer.files.length>0&&Array.from(M.dataTransfer.files).forEach(V=>{L(V)})},[L]),A=p.useCallback(M=>{M.target.files&&M.target.files.length>0&&Array.from(M.target.files).forEach(V=>{L(V)})},[L]),I=p.useCallback(()=>{C.current&&C.current.click()},[]),O=p.useCallback(M=>{u&&u(M)},[u]),H=p.useCallback(M=>{o&&o(M)},[o]),D=n.join(",");return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:Q(un.cuiUploadArea,{[un.cuiDragging]:c}),onDragEnter:k,onDragLeave:x,onDragOver:_,onDrop:E,onClick:I,children:[l.jsx(Te,{name:"upload",className:un.cuiUploadIcon}),l.jsxs("div",{className:un.cuiUploadText,children:[g?l.jsx(_1,{type:"h1",className:Q(un.cuiFileUploadTitle,{[un.cuiNotSupported]:!g}),children:e}):l.jsx(_1,{type:"h1",className:Q(un.cuiFileUploadTitle,un.cuiNotSupported),children:"Unsupported file type"}),l.jsxs(_l,{className:un.cuiFileUploadDescription,children:["Files supported: ",n.join(", ")]})]}),l.jsx(to,{type:"secondary",onClick:M=>{M.stopPropagation(),I()},children:"Browse files"})]}),t.length>0&&l.jsx("div",{className:un.cuiFilesList,children:t.map(M=>l.jsx("div",{className:Q(un.cuiFileItem,{[un.cuiError]:M.status==="error"}),children:l.jsxs("div",{className:un.cuiFileInfo,children:[l.jsxs("div",{className:un.cuiFileInfoHeader,children:[l.jsx(Te,{name:"document",className:un.cuiDocumentIcon}),l.jsxs("div",{className:un.cuiFileDetails,children:[l.jsx(_l,{size:"md",children:h9(M.name)}),(M.status==="success"||M.status==="uploading")&&l.jsx(_l,{size:"md",color:"muted",children:Nx(M.size)}),M.status==="error"&&l.jsx(_l,{size:"md",color:"danger",children:M.errorMessage||"Upload failed"}),M.status==="success"&&l.jsx(Te,{size:"xs",state:"success",name:"check"})]}),l.jsxs("div",{className:un.cuiFileActions,children:[M.status==="error"&&l.jsx(kn,{size:"sm",icon:"refresh",type:"ghost",onClick:()=>H(M.id)}),l.jsx(kn,{size:"sm",icon:"cross",type:"ghost",onClick:()=>O(M.id)})]})]}),M.status==="uploading"&&l.jsxs("div",{className:un.cuiProgressContainer,children:[l.jsx("div",{className:un.cuiProgressBarContainer,children:l.jsx(D0,{progress:M.progress,type:"small"})}),l.jsxs(_l,{size:"sm",color:"muted",className:un.cuiProgressPercentage,children:[M.progress,"%"]})]})]})},M.id))}),l.jsx("input",{type:"file",ref:C,accept:D,onChange:A,multiple:!0,style:{display:"none"}})]})},ul={cuiFlyoutContent:"_cuiFlyoutContent_1ebo7_9",animationWidth:"_animationWidth_1ebo7_1",cuiSizeDefault:"_cuiSizeDefault_1ebo7_20",sizeNarrow:"_sizeNarrow_1ebo7_23",sizeWide:"_sizeWide_1ebo7_26",sizeWidest:"_sizeWidest_1ebo7_29",strategyRelative:"_strategyRelative_1ebo7_32",strategyAbsolute:"_strategyAbsolute_1ebo7_36",strategyFixed:"_strategyFixed_1ebo7_40",typeDefault:"_typeDefault_1ebo7_44",typeInline:"_typeInline_1ebo7_48",alignStart:"_alignStart_1ebo7_52",alignEnd:"_alignEnd_1ebo7_57",active:"_active_1ebo7_76",cuiFlyoutContainer:"_cuiFlyoutContainer_1ebo7_89",cuiFlyoutElement:"_cuiFlyoutElement_1ebo7_98",cuiFlyoutHeaderContainer:"_cuiFlyoutHeaderContainer_1ebo7_113",cuiFlyoutTitle:"_cuiFlyoutTitle_1ebo7_124",cuiFlyoutDescription:"_cuiFlyoutDescription_1ebo7_137",cuiFlyoutBody:"_cuiFlyoutBody_1ebo7_150",alignTop:"_alignTop_1ebo7_154",alignDefault:"_alignDefault_1ebo7_157",cuiFlyoutFooter:"_cuiFlyoutFooter_1ebo7_161",cuiFooterContainer:"_cuiFooterContainer_1ebo7_172",cuiCustomCodeBlock:"_cuiCustomCodeBlock_1ebo7_177"},uo=({modal:e=!1,...n})=>l.jsx(K8,{modal:e,...n}),p9=({children:e,...n})=>l.jsx(J8,{asChild:!0,...n,children:l.jsx("div",{children:e})});p9.displayName="Flyout.Trigger",uo.Trigger=p9;const g9=({showOverlay:e=!1,children:n,container:t,strategy:r="relative",size:o="default",type:u="default",closeOnInteractOutside:s=!1,width:c,align:d="end",onInteractOutside:g,...b})=>{const C=c?{"--flyout-width":c}:{};return l.jsxs(e9,{container:t,children:[e&&l.jsx(l9,{className:"DialogOverlay"}),l.jsx(y0,{className:Q(ul.cuiFlyoutContent,{[ul.cuiSizeDefault]:o==="default"&&!c,[ul.cuiSizeNarrow]:o==="narrow"&&!c,[ul.cuiSizeWide]:o==="wide"&&!c,[ul.cuiSizeWidest]:o==="widest"&&!c,[ul.cuiCustomWidth]:!!c,[ul.cuiStrategyRelative]:r==="relative",[ul.cuiStrategyAbsolute]:r==="absolute",[ul.cuiStrategyFixed]:r==="fixed",[ul.cuiTypeDefault]:u==="default",[ul.cuiTypeInline]:u==="inline",[ul.cuiAlignStart]:d==="start",[ul.cuiAlignEnd]:d==="end"}),style:C,onInteractOutside:m=>{s||m.preventDefault(),typeof g=="function"&&g(m)},...b,children:n})]})};g9.displayName="Flyout.Content",uo.Content=g9;const _0=({type:e="default",...n})=>l.jsx(xl,{orientation:"vertical",padding:"none",gap:"none",className:Q(ul.cuiFlyoutElement,{[ul.cuiTypeDefault]:e==="default",[ul.cuiTypeInline]:e==="inline"}),...n});_0.displayName="Flyout.Element",uo.Element=_0;const C9=({title:e,description:n,type:t="default",children:r,showClose:o=!0,showSeparator:u=!0,...s})=>r?l.jsxs("div",{className:ul.cuiFlyoutContainer,children:[l.jsxs(xl,{className:Q(ul.cuiFlyoutHeaderContainer,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),justifyContent:"space-between",alignItems:"start",padding:"none",gap:"none",fillWidth:!1,isResponsive:!1,...s,children:[l.jsx(xl,{padding:"none",gap:"none",orientation:"vertical",grow:"1",children:r}),o&&l.jsx(va,{asChild:!0,children:l.jsx(V2,{"data-testid":"flyout-header-close-btn",children:l.jsx(Te,{name:"cross",size:t==="inline"?"md":"lg"})})})]}),u&&l.jsx(Uo,{"data-testid":"flyout-header-separator",size:"lg"})]}):l.jsxs("div",{className:ul.cuiFlyoutContainer,children:[l.jsxs(xl,{className:Q(ul.cuiFlyoutHeaderContainer,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),justifyContent:"space-between",alignItems:"start",fillWidth:!1,isResponsive:!1,...s,children:[l.jsxs(xl,{padding:"none",gap:"none",orientation:"vertical",grow:"1",children:[l.jsx(r9,{className:Q(ul.cuiFlyoutTitle,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),children:e}),n&&l.jsx(i9,{className:Q(ul.cuiFlyoutDescription,{[ul.cuiTypeDefault]:t==="default",[ul.cuiTypeInline]:t==="inline"}),children:n})]}),o&&l.jsx(va,{asChild:!0,children:l.jsx(V2,{"data-testid":"flyout-header-close-btn",children:l.jsx(Te,{name:"cross",size:t==="inline"?"md":"lg"})})})]}),u&&l.jsx(Uo,{"data-testid":"flyout-header-separator",size:"lg"})]});C9.displayName="Flyout.Header",uo.Header=C9;const v9=({align:e="default",...n})=>l.jsx(xl,{overflow:"auto",orientation:"vertical",grow:"1",className:Q(ul.cuiFlyoutBody,{[ul.cuiAlignTop]:e==="top",[ul.cuiAlignDefault]:e==="default"}),...n});v9.displayName="Flyout.Body",uo.Body=v9;const b9=({children:e,...n})=>l.jsx(va,{asChild:!0,children:e??l.jsx(to,{type:"secondary",...n})});b9.displayName="Flyout.Close",uo.Close=b9;const m9=({type:e="default",...n})=>l.jsxs(xl,{gap:"none",orientation:"vertical",alignItems:"end",className:ul.cuiFooterContainer,children:[l.jsx(Uo,{size:"xs"}),l.jsx(xl,{justifyContent:"end",gap:"none",padding:"none",isResponsive:!1,wrap:"wrap",className:Q(ul.cuiFlyoutFooter,{[ul.cuiTypeDefault]:e==="default",[ul.cuiTypeInline]:e==="inline"}),...n})]});m9.displayName="Flyout.Footer",uo.Footer=m9;const Wx=({statement:e,language:n,wrapLines:t,showLineNumbers:r,showWrapButton:o,onCopy:u,onCopyError:s,...c})=>l.jsxs(_0,{fillHeight:!0,...c,children:[l.jsx(s8,{wrapLines:t,language:n,showLineNumbers:r,showWrapButton:o,onCopy:u,onCopyError:s,className:ul.cuiCustomCodeBlock,children:e}),l.jsx(Gi,{size:"xs"})]});uo.CodeBlock=Wx;const Zx=({id:e,label:n,orientation:t,dir:r,error:o,children:u,addLabelPadding:s,...c})=>l.jsxs(Es,{orientation:t,dir:r,addLabelPadding:s,...c,children:[l.jsxs(Z2,{children:[u,!!o&&o!==!0&&l.jsx(B2,{children:o})]}),n&&l.jsx(na,{htmlFor:e,error:!!o,children:n})]}),Ux={cuiInlineContainer:"_cuiInlineContainer_1i0m0_1"},zx=e=>l.jsx("span",{className:Ux.cuiInlineContainer,...e});function jx(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,d0(e,n)}var w9=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function Gx(e,n){return!!(e===n||w9(e)&&w9(n))}function Xx(e,n){if(e.length!==n.length)return!1;for(var t=0;t<e.length;t++)if(!Gx(e[t],n[t]))return!1;return!0}function k0(e,n){n===void 0&&(n=Xx);var t,r=[],o,u=!1;function s(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return u&&t===this&&n(c,r)||(o=e.apply(this,c),u=!0,t=this,r=c),o}return s}var Yx=typeof performance=="object"&&typeof performance.now=="function",y9=Yx?function(){return performance.now()}:function(){return Date.now()};function S9(e){cancelAnimationFrame(e.id)}function qx(e,n){var t=y9();function r(){y9()-t>=n?e.call(null):o.id=requestAnimationFrame(r)}var o={id:requestAnimationFrame(r)};return o}var L0=-1;function Kx(e){if(e===void 0&&(e=!1),L0===-1||e){var n=document.createElement("div"),t=n.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(n),L0=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return L0}var Ni=null;function _9(e){if(e===void 0&&(e=!1),Ni===null||e){var n=document.createElement("div"),t=n.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",n.appendChild(r),document.body.appendChild(n),n.scrollLeft>0?Ni="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?Ni="negative":Ni="positive-ascending"),document.body.removeChild(n),Ni}return Ni}var Jx=150,Qx=function(n){var t=n.columnIndex;n.data;var r=n.rowIndex;return r+":"+t},wc=null,yc=null,Sc=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(wc=new WeakSet,yc=new WeakSet,Sc=new WeakSet);function Rx(e){var n,t=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,u=e.getColumnWidth,s=e.getEstimatedTotalHeight,c=e.getEstimatedTotalWidth,d=e.getOffsetForColumnAndAlignment,g=e.getOffsetForRowAndAlignment,b=e.getRowHeight,C=e.getRowOffset,m=e.getRowStartIndexForOffset,k=e.getRowStopIndexForStartIndex,x=e.initInstanceProps,_=e.shouldResetStyleCacheOnItemSizeChange,L=e.validateProps;return n=function(E){jx(A,E);function A(O){var H;return H=E.call(this,O)||this,H._instanceProps=x(H.props,t8(H)),H._resetIsScrollingTimeoutId=null,H._outerRef=void 0,H.state={instance:t8(H),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:typeof H.props.initialScrollLeft=="number"?H.props.initialScrollLeft:0,scrollTop:typeof H.props.initialScrollTop=="number"?H.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},H._callOnItemsRendered=void 0,H._callOnItemsRendered=k0(function(D,M,V,U,j,G,q,Y){return H.props.onItemsRendered({overscanColumnStartIndex:D,overscanColumnStopIndex:M,overscanRowStartIndex:V,overscanRowStopIndex:U,visibleColumnStartIndex:j,visibleColumnStopIndex:G,visibleRowStartIndex:q,visibleRowStopIndex:Y})}),H._callOnScroll=void 0,H._callOnScroll=k0(function(D,M,V,U,j){return H.props.onScroll({horizontalScrollDirection:V,scrollLeft:D,scrollTop:M,verticalScrollDirection:U,scrollUpdateWasRequested:j})}),H._getItemStyle=void 0,H._getItemStyle=function(D,M){var V=H.props,U=V.columnWidth,j=V.direction,G=V.rowHeight,q=H._getItemStyleCache(_&&U,_&&j,_&&G),Y=D+":"+M,X;if(q.hasOwnProperty(Y))X=q[Y];else{var ue=t(H.props,M,H._instanceProps),ee=j==="rtl";q[Y]=X={position:"absolute",left:ee?void 0:ue,right:ee?ue:void 0,top:C(H.props,D,H._instanceProps),height:b(H.props,D,H._instanceProps),width:u(H.props,M,H._instanceProps)}}return X},H._getItemStyleCache=void 0,H._getItemStyleCache=k0(function(D,M,V){return{}}),H._onScroll=function(D){var M=D.currentTarget,V=M.clientHeight,U=M.clientWidth,j=M.scrollLeft,G=M.scrollTop,q=M.scrollHeight,Y=M.scrollWidth;H.setState(function(X){if(X.scrollLeft===j&&X.scrollTop===G)return null;var ue=H.props.direction,ee=j;if(ue==="rtl")switch(_9()){case"negative":ee=-j;break;case"positive-descending":ee=Y-U-j;break}ee=Math.max(0,Math.min(ee,Y-U));var ae=Math.max(0,Math.min(G,q-V));return{isScrolling:!0,horizontalScrollDirection:X.scrollLeft<j?"forward":"backward",scrollLeft:ee,scrollTop:ae,verticalScrollDirection:X.scrollTop<G?"forward":"backward",scrollUpdateWasRequested:!1}},H._resetIsScrollingDebounced)},H._outerRefSetter=function(D){var M=H.props.outerRef;H._outerRef=D,typeof M=="function"?M(D):M!=null&&typeof M=="object"&&M.hasOwnProperty("current")&&(M.current=D)},H._resetIsScrollingDebounced=function(){H._resetIsScrollingTimeoutId!==null&&S9(H._resetIsScrollingTimeoutId),H._resetIsScrollingTimeoutId=qx(H._resetIsScrolling,Jx)},H._resetIsScrolling=function(){H._resetIsScrollingTimeoutId=null,H.setState({isScrolling:!1},function(){H._getItemStyleCache(-1)})},H}A.getDerivedStateFromProps=function(H,D){return eM(H,D),L(H),null};var I=A.prototype;return I.scrollTo=function(H){var D=H.scrollLeft,M=H.scrollTop;D!==void 0&&(D=Math.max(0,D)),M!==void 0&&(M=Math.max(0,M)),this.setState(function(V){return D===void 0&&(D=V.scrollLeft),M===void 0&&(M=V.scrollTop),V.scrollLeft===D&&V.scrollTop===M?null:{horizontalScrollDirection:V.scrollLeft<D?"forward":"backward",scrollLeft:D,scrollTop:M,scrollUpdateWasRequested:!0,verticalScrollDirection:V.scrollTop<M?"forward":"backward"}},this._resetIsScrollingDebounced)},I.scrollToItem=function(H){var D=H.align,M=D===void 0?"auto":D,V=H.columnIndex,U=H.rowIndex,j=this.props,G=j.columnCount,q=j.height,Y=j.rowCount,X=j.width,ue=this.state,ee=ue.scrollLeft,ae=ue.scrollTop,de=Kx();V!==void 0&&(V=Math.max(0,Math.min(V,G-1))),U!==void 0&&(U=Math.max(0,Math.min(U,Y-1)));var re=s(this.props,this._instanceProps),be=c(this.props,this._instanceProps),me=be>X?de:0,Me=re>q?de:0;this.scrollTo({scrollLeft:V!==void 0?d(this.props,V,M,ee,this._instanceProps,Me):ee,scrollTop:U!==void 0?g(this.props,U,M,ae,this._instanceProps,me):ae})},I.componentDidMount=function(){var H=this.props,D=H.initialScrollLeft,M=H.initialScrollTop;if(this._outerRef!=null){var V=this._outerRef;typeof D=="number"&&(V.scrollLeft=D),typeof M=="number"&&(V.scrollTop=M)}this._callPropsCallbacks()},I.componentDidUpdate=function(){var H=this.props.direction,D=this.state,M=D.scrollLeft,V=D.scrollTop,U=D.scrollUpdateWasRequested;if(U&&this._outerRef!=null){var j=this._outerRef;if(H==="rtl")switch(_9()){case"negative":j.scrollLeft=-M;break;case"positive-ascending":j.scrollLeft=M;break;default:var G=j.clientWidth,q=j.scrollWidth;j.scrollLeft=q-G-M;break}else j.scrollLeft=Math.max(0,M);j.scrollTop=Math.max(0,V)}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&S9(this._resetIsScrollingTimeoutId)},I.render=function(){var H=this.props,D=H.children,M=H.className,V=H.columnCount,U=H.direction,j=H.height,G=H.innerRef,q=H.innerElementType,Y=H.innerTagName,X=H.itemData,ue=H.itemKey,ee=ue===void 0?Qx:ue,ae=H.outerElementType,de=H.outerTagName,re=H.rowCount,be=H.style,me=H.useIsScrolling,Me=H.width,le=this.state.isScrolling,fe=this._getHorizontalRangeToRender(),we=fe[0],ye=fe[1],Be=this._getVerticalRangeToRender(),sl=Be[0],Pe=Be[1],ll=[];if(V>0&&re)for(var nl=sl;nl<=Pe;nl++)for(var fl=we;fl<=ye;fl++)ll.push(p.createElement(D,{columnIndex:fl,data:X,isScrolling:me?le:void 0,key:ee({columnIndex:fl,data:X,rowIndex:nl}),rowIndex:nl,style:this._getItemStyle(nl,fl)}));var rl=s(this.props,this._instanceProps),cl=c(this.props,this._instanceProps);return p.createElement(ae||de||"div",{className:M,onScroll:this._onScroll,ref:this._outerRefSetter,style:ie({position:"relative",height:j,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:U},be)},p.createElement(q||Y||"div",{children:ll,ref:G,style:{height:rl,pointerEvents:le?"none":void 0,width:cl}}))},I._callPropsCallbacks=function(){var H=this.props,D=H.columnCount,M=H.onItemsRendered,V=H.onScroll,U=H.rowCount;if(typeof M=="function"&&D>0&&U>0){var j=this._getHorizontalRangeToRender(),G=j[0],q=j[1],Y=j[2],X=j[3],ue=this._getVerticalRangeToRender(),ee=ue[0],ae=ue[1],de=ue[2],re=ue[3];this._callOnItemsRendered(G,q,ee,ae,Y,X,de,re)}if(typeof V=="function"){var be=this.state,me=be.horizontalScrollDirection,Me=be.scrollLeft,le=be.scrollTop,fe=be.scrollUpdateWasRequested,we=be.verticalScrollDirection;this._callOnScroll(Me,le,me,we,fe)}},I._getHorizontalRangeToRender=function(){var H=this.props,D=H.columnCount,M=H.overscanColumnCount,V=H.overscanColumnsCount,U=H.overscanCount,j=H.rowCount,G=this.state,q=G.horizontalScrollDirection,Y=G.isScrolling,X=G.scrollLeft,ue=M||V||U||1;if(D===0||j===0)return[0,0,0,0];var ee=r(this.props,X,this._instanceProps),ae=o(this.props,ee,X,this._instanceProps),de=!Y||q==="backward"?Math.max(1,ue):1,re=!Y||q==="forward"?Math.max(1,ue):1;return[Math.max(0,ee-de),Math.max(0,Math.min(D-1,ae+re)),ee,ae]},I._getVerticalRangeToRender=function(){var H=this.props,D=H.columnCount,M=H.overscanCount,V=H.overscanRowCount,U=H.overscanRowsCount,j=H.rowCount,G=this.state,q=G.isScrolling,Y=G.verticalScrollDirection,X=G.scrollTop,ue=V||U||M||1;if(D===0||j===0)return[0,0,0,0];var ee=m(this.props,X,this._instanceProps),ae=k(this.props,ee,X,this._instanceProps),de=!q||Y==="backward"?Math.max(1,ue):1,re=!q||Y==="forward"?Math.max(1,ue):1;return[Math.max(0,ee-de),Math.max(0,Math.min(j-1,ae+re)),ee,ae]},A}(p.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},n}var eM=function(n,t){var r=n.children,o=n.direction,u=n.height,s=n.innerTagName,c=n.outerTagName,d=n.overscanColumnsCount,g=n.overscanCount,b=n.overscanRowsCount,C=n.width,m=t.instance;if(process.env.NODE_ENV!=="production"){if(typeof g=="number"&&wc&&!wc.has(m)&&(wc.add(m),console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")),(typeof d=="number"||typeof b=="number")&&yc&&!yc.has(m)&&(yc.add(m),console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")),(s!=null||c!=null)&&Sc&&!Sc.has(m)&&(Sc.add(m),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")),r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));switch(o){case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}if(typeof C!="number")throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. '+('"'+(C===null?"null":typeof C)+'" was specified.'));if(typeof u!="number")throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. '+('"'+(u===null?"null":typeof u)+'" was specified.'))}},k9=50,L9=function(n,t){var r=n.rowCount,o=t.rowMetadataMap,u=t.estimatedRowHeight,s=t.lastMeasuredRowIndex,c=0;if(s>=r&&(s=r-1),s>=0){var d=o[s];c=d.offset+d.size}var g=r-s-1,b=g*u;return c+b},x9=function(n,t){var r=n.columnCount,o=t.columnMetadataMap,u=t.estimatedColumnWidth,s=t.lastMeasuredColumnIndex,c=0;if(s>=r&&(s=r-1),s>=0){var d=o[s];c=d.offset+d.size}var g=r-s-1,b=g*u;return c+b},ao=function(n,t,r,o){var u,s,c;if(n==="column"?(u=o.columnMetadataMap,s=t.columnWidth,c=o.lastMeasuredColumnIndex):(u=o.rowMetadataMap,s=t.rowHeight,c=o.lastMeasuredRowIndex),r>c){var d=0;if(c>=0){var g=u[c];d=g.offset+g.size}for(var b=c+1;b<=r;b++){var C=s(b);u[b]={offset:d,size:C},d+=C}n==="column"?o.lastMeasuredColumnIndex=r:o.lastMeasuredRowIndex=r}return u[r]},M9=function(n,t,r,o){var u,s;n==="column"?(u=r.columnMetadataMap,s=r.lastMeasuredColumnIndex):(u=r.rowMetadataMap,s=r.lastMeasuredRowIndex);var c=s>0?u[s].offset:0;return c>=o?E9(n,t,r,s,0,o):lM(n,t,r,Math.max(0,s),o)},E9=function(n,t,r,o,u,s){for(;u<=o;){var c=u+Math.floor((o-u)/2),d=ao(n,t,c,r).offset;if(d===s)return c;d<s?u=c+1:d>s&&(o=c-1)}return u>0?u-1:0},lM=function(n,t,r,o,u){for(var s=n==="column"?t.columnCount:t.rowCount,c=1;o<s&&ao(n,t,o,r).offset<u;)o+=c,c*=2;return E9(n,t,r,Math.min(o,s-1),Math.floor(o/2),u)},F9=function(n,t,r,o,u,s,c){var d=n==="column"?t.width:t.height,g=ao(n,t,r,s),b=n==="column"?x9(t,s):L9(t,s),C=Math.max(0,Math.min(b-d,g.offset)),m=Math.max(0,g.offset-d+c+g.size);switch(o==="smart"&&(u>=m-d&&u<=C+d?o="auto":o="center"),o){case"start":return C;case"end":return m;case"center":return Math.round(m+(C-m)/2);case"auto":default:return u>=m&&u<=C?u:m>C||u<m?m:C}},nM=Rx({getColumnOffset:function(n,t,r){return ao("column",n,t,r).offset},getColumnStartIndexForOffset:function(n,t,r){return M9("column",n,r,t)},getColumnStopIndexForStartIndex:function(n,t,r,o){for(var u=n.columnCount,s=n.width,c=ao("column",n,t,o),d=r+s,g=c.offset+c.size,b=t;b<u-1&&g<d;)b++,g+=ao("column",n,b,o).size;return b},getColumnWidth:function(n,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:L9,getEstimatedTotalWidth:x9,getOffsetForColumnAndAlignment:function(n,t,r,o,u,s){return F9("column",n,t,r,o,u,s)},getOffsetForRowAndAlignment:function(n,t,r,o,u,s){return F9("row",n,t,r,o,u,s)},getRowOffset:function(n,t,r){return ao("row",n,t,r).offset},getRowHeight:function(n,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(n,t,r){return M9("row",n,r,t)},getRowStopIndexForStartIndex:function(n,t,r,o){for(var u=n.rowCount,s=n.height,c=ao("row",n,t,o),d=r+s,g=c.offset+c.size,b=t;b<u-1&&g<d;)b++,g+=ao("row",n,b,o).size;return b},initInstanceProps:function(n,t){var r=n,o=r.estimatedColumnWidth,u=r.estimatedRowHeight,s={columnMetadataMap:{},estimatedColumnWidth:o||k9,estimatedRowHeight:u||k9,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(c,d){d===void 0&&(d=!0),t.resetAfterIndices({columnIndex:c,shouldForceUpdate:d})},t.resetAfterRowIndex=function(c,d){d===void 0&&(d=!0),t.resetAfterIndices({rowIndex:c,shouldForceUpdate:d})},t.resetAfterIndices=function(c){var d=c.columnIndex,g=c.rowIndex,b=c.shouldForceUpdate,C=b===void 0?!0:b;typeof d=="number"&&(s.lastMeasuredColumnIndex=Math.min(s.lastMeasuredColumnIndex,d-1)),typeof g=="number"&&(s.lastMeasuredRowIndex=Math.min(s.lastMeasuredRowIndex,g-1)),t._getItemStyleCache(-1),C&&t.forceUpdate()},s},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(n){var t=n.columnWidth,r=n.rowHeight;if(process.env.NODE_ENV!=="production"){if(typeof t!="function")throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. '+('"'+(t===null?"null":typeof t)+'" was specified.'));if(typeof r!="function")throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. '+('"'+(r===null?"null":typeof r)+'" was specified.'))}}});process.env.NODE_ENV;function $9(e,n){for(var t in e)if(!(t in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1}var tM=["style"],rM=["style"];function oM(e,n){var t=e.style,r=K3(e,tM),o=n.style,u=K3(n,rM);return!$9(t,o)&&!$9(r,u)}let At;typeof window<"u"?At=window:typeof self<"u"?At=self:At=global;let x0=null,M0=null;const T9=20,E0=At.clearTimeout,I9=At.setTimeout,F0=At.cancelAnimationFrame||At.mozCancelAnimationFrame||At.webkitCancelAnimationFrame,D9=At.requestAnimationFrame||At.mozRequestAnimationFrame||At.webkitRequestAnimationFrame;F0==null||D9==null?(x0=E0,M0=function(n){return I9(n,T9)}):(x0=function([n,t]){F0(n),E0(t)},M0=function(n){const t=D9(function(){E0(r),n()}),r=I9(function(){F0(t),n()},T9);return[t,r]});function iM(e){let n,t,r,o,u,s,c;const d=typeof document<"u"&&document.attachEvent;if(!d){s=function(E){const A=E.__resizeTriggers__,I=A.firstElementChild,O=A.lastElementChild,H=I.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,H.style.width=I.offsetWidth+1+"px",H.style.height=I.offsetHeight+1+"px",I.scrollLeft=I.scrollWidth,I.scrollTop=I.scrollHeight},u=function(E){return E.offsetWidth!==E.__resizeLast__.width||E.offsetHeight!==E.__resizeLast__.height},c=function(E){if(E.target.className&&typeof E.target.className.indexOf=="function"&&E.target.className.indexOf("contract-trigger")<0&&E.target.className.indexOf("expand-trigger")<0)return;const A=this;s(this),this.__resizeRAF__&&x0(this.__resizeRAF__),this.__resizeRAF__=M0(function(){u(A)&&(A.__resizeLast__.width=A.offsetWidth,A.__resizeLast__.height=A.offsetHeight,A.__resizeListeners__.forEach(function(H){H.call(A,E)}))})};let m=!1,k="";r="animationstart";const x="Webkit Moz O ms".split(" ");let _="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const E=document.createElement("fakeelement");if(E.style.animationName!==void 0&&(m=!0),m===!1){for(let A=0;A<x.length;A++)if(E.style[x[A]+"AnimationName"]!==void 0){L=x[A],k="-"+L.toLowerCase()+"-",r=_[A],m=!0;break}}}t="resizeanim",n="@"+k+"keyframes "+t+" { from { opacity: 0; } to { opacity: 0; } } ",o=k+"animation: 1ms "+t+"; "}const g=function(m){if(!m.getElementById("detectElementResize")){const k=(n||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',x=m.head||m.getElementsByTagName("head")[0],_=m.createElement("style");_.id="detectElementResize",_.type="text/css",e!=null&&_.setAttribute("nonce",e),_.styleSheet?_.styleSheet.cssText=k:_.appendChild(m.createTextNode(k)),x.appendChild(_)}};return{addResizeListener:function(m,k){if(d)m.attachEvent("onresize",k);else{if(!m.__resizeTriggers__){const x=m.ownerDocument,_=At.getComputedStyle(m);_&&_.position==="static"&&(m.style.position="relative"),g(x),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=x.createElement("div")).className="resize-triggers";const L=x.createElement("div");L.className="expand-trigger",L.appendChild(x.createElement("div"));const E=x.createElement("div");E.className="contract-trigger",m.__resizeTriggers__.appendChild(L),m.__resizeTriggers__.appendChild(E),m.appendChild(m.__resizeTriggers__),s(m),m.addEventListener("scroll",c,!0),r&&(m.__resizeTriggers__.__animationListener__=function(I){I.animationName===t&&s(m)},m.__resizeTriggers__.addEventListener(r,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(k)}},removeResizeListener:function(m,k){if(d)m.detachEvent("onresize",k);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(k),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",c,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(r,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}}}}class uM extends p.Component{constructor(...n){super(...n),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:t,disableWidth:r,onResize:o}=this.props;if(this._parentNode){const u=window.getComputedStyle(this._parentNode)||{},s=parseFloat(u.paddingLeft||"0"),c=parseFloat(u.paddingRight||"0"),d=parseFloat(u.paddingTop||"0"),g=parseFloat(u.paddingBottom||"0"),b=this._parentNode.getBoundingClientRect(),C=b.height-d-g,m=b.width-s-c,k=this._parentNode.offsetHeight-d-g,x=this._parentNode.offsetWidth-s-c;(!t&&(this.state.height!==k||this.state.scaledHeight!==C)||!r&&(this.state.width!==x||this.state.scaledWidth!==m))&&(this.setState({height:k,width:x,scaledHeight:C,scaledWidth:m}),typeof o=="function"&&o({height:k,scaledHeight:C,scaledWidth:m,width:x}))}},this._setRef=t=>{this._autoSizer=t}}componentDidMount(){const{nonce:n}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(t!=null&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const r=t.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)):(this._detectElementResize=iM(n),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:n,defaultHeight:t,defaultWidth:r,disableHeight:o=!1,disableWidth:u=!1,doNotBailOutOnEmptyChildren:s=!1,nonce:c,onResize:d,style:g={},tagName:b="div",...C}=this.props,{height:m,scaledHeight:k,scaledWidth:x,width:_}=this.state,L={overflow:"visible"},E={};let A=!1;return o||(m===0&&(A=!0),L.height=0,E.height=m,E.scaledHeight=k),u||(_===0&&(A=!0),L.width=0,E.width=_,E.scaledWidth=x),s&&(A=!1),p.createElement(b,{ref:this._setRef,style:{...L,...g},...C},!A&&n(E))}}const tn={cuiStyledCell:"_cuiStyledCell_1mfpc_1",cuiHeightFixed:"_cuiHeightFixed_1mfpc_15",cuiHeightAuto:"_cuiHeightAuto_1mfpc_19",cuiTypeBody:"_cuiTypeBody_1mfpc_25",cuiSelectionDefault:"_cuiSelectionDefault_1mfpc_25",cuiSelectionSelectIndirect:"_cuiSelectionSelectIndirect_1mfpc_33",cuiSelectionSelectDirect:"_cuiSelectionSelectDirect_1mfpc_41",cuiTypeHeader:"_cuiTypeHeader_1mfpc_50",cuiFocused:"_cuiFocused_1mfpc_75",cuiBorderNone:"_cuiBorderNone_1mfpc_82",cuiBorderRightNone:"_cuiBorderRightNone_1mfpc_86",cuiBorderBottomNone:"_cuiBorderBottomNone_1mfpc_90",cuiLastRowBorder:"_cuiLastRowBorder_1mfpc_94",selectionDefault:"_selectionDefault_1mfpc_97",focused:"_focused_1mfpc_97",selectionSelectIndirect:"_selectionSelectIndirect_1mfpc_100",selectionSelectDirect:"_selectionSelectDirect_1mfpc_103",cuiLastColumnBorder:"_cuiLastColumnBorder_1mfpc_119",cuiHeaderNoBorder:"_cuiHeaderNoBorder_1mfpc_144",cuiPseudoBorder:"_cuiPseudoBorder_1mfpc_151",cuiSelectedTop:"_cuiSelectedTop_1mfpc_161",cuiSelectedLeft:"_cuiSelectedLeft_1mfpc_168",cuiSelectedBottomDirect:"_cuiSelectedBottomDirect_1mfpc_175",cuiSelectedRightDirect:"_cuiSelectedRightDirect_1mfpc_182",cuiPseudoBorderNone:"_cuiPseudoBorderNone_1mfpc_189"},ba=p.forwardRef(({$isFocused:e,$selectionType:n,$isSelectedTop:t,$isSelectedLeft:r,$isLastRow:o,$isLastColumn:u,$height:s,$type:c="body",$showBorder:d,$rowAutoHeight:g,className:b,style:C,...m},k)=>{const x=t||r||n==="selectDirect"&&(o||u)||g,_=Q(tn.cuiStyledCell,{[tn.cuiHeightFixed]:!g,[tn.cuiHeightAuto]:g,[tn.cuiTypeBody]:c==="body",[tn.cuiTypeHeader]:c==="header",[tn.cuiSelectionDefault]:n==="default",[tn.cuiSelectionSelectIndirect]:n==="selectIndirect",[tn.cuiSelectionSelectDirect]:n==="selectDirect",[tn.cuiFocused]:e,[tn.cuiBorderNone]:g,[tn.cuiBorderRightNone]:!u,[tn.cuiBorderBottomNone]:!o,[tn.cuiLastRowBorder]:o,[tn.cuiLastColumnBorder]:u,[tn.cuiHeaderNoBorder]:c==="header"&&!d,[tn.cuiPseudoBorder]:x,[tn.cuiSelectedTop]:t,[tn.cuiSelectedLeft]:r,[tn.cuiSelectedBottomDirect]:n==="selectDirect"&&o,[tn.cuiSelectedRightDirect]:n==="selectDirect"&&u,[tn.cuiPseudoBorderNone]:g},b),L={height:g?"100%":`${s}px`,...C};return l.jsx("div",{ref:k,className:_,style:L,...m})});ba.displayName="StyledCell";const _c={cuiRowNumberColumnContainer:"_cuiRowNumberColumnContainer_18t1l_1",cuiScrolledHorizontal:"_cuiScrolledHorizontal_18t1l_6",cuiRowNumberCell:"_cuiRowNumberCell_18t1l_10",cuiAutoHeight:"_cuiAutoHeight_18t1l_18"},aM=({rowIndex:e,rowHeight:n,getSelectionType:t,isLastRow:r,isFirstRow:o,showBorder:u,rowStart:s,rowAutoHeight:c})=>{const d=e+s,g=t({row:d,type:"row"}),b=g==="selectDirect",C=t({row:d-1,type:"row"}),m=(C==="selectDirect"||b)&&C!==g;return l.jsx("div",{className:Q(_c.cuiRowNumberCell,{[_c.cuiAutoHeight]:c}),style:{top:`${n*e}px`,height:c?"100%":`${n}px`},children:l.jsx(ba,{$height:n,$isLastColumn:!1,$selectionType:g,$isFirstColumn:!0,$type:"header",$isFirstRow:o,$isFocused:!1,$isLastRow:r,$isSelectedLeft:b,$isSelectedTop:m,$rowAutoHeight:c,"data-selected":b,"data-grid-row":d,"data-grid-column":-1,"data-testid":`header-cell-${d}-x`,$showBorder:u,"data-align":"right",children:d})})},sM=({minRow:e,maxRow:n,rowHeight:t,headerHeight:r,rowWidth:o,getSelectionType:u,rowCount:s,showHeader:c,scrolledHorizontal:d,rowStart:g=0,showBorder:b,rowAutoHeight:C})=>l.jsx("div",{className:Q(_c.cuiRowNumberColumnContainer,{[_c.cuiScrolledHorizontal]:d}),style:{top:`${r}px`,width:`${o}px`},children:Array.from({length:n-e+1},(m,k)=>e+k).map(m=>l.jsx(aM,{getSelectionType:u,rowHeight:t,rowIndex:m,isLastRow:m===s,isFirstRow:!c&&m===0,showBorder:b,rowStart:g,rowAutoHeight:C},`row-number-${m}`))}),kc={left:"calc(100% - 4px)",top:"0"},cM=()=>{const[e,n]=p.useState(-1),[t,r]=p.useState(null),[o,u]=p.useState(kc),[s,c]=p.useState(0),d=p.useCallback(C=>e===C,[e]),g=p.useCallback((C,m)=>{m?(n(C),c(Date.now())):n(-1)},[]),b=p.useCallback(C=>e!==C?kc:o,[o,e]);return{pointer:t,setPointer:r,getIsPressed:d,setIsPressed:g,getPosition:b,setPosition:u,lastPressedTimestamp:s}},H9={cuiResizeSpan:"_cuiResizeSpan_kkd5c_1",cuiPressed:"_cuiPressed_kkd5c_11"},dM=(e,n,t={})=>{let r=null,o=0;const{leading:u=!0,trailing:s=!0}=t;return(...c)=>{const d=Date.now();!o&&!u&&(o=d);const g=n-(d-o);g<=0||g>n?(r&&(clearTimeout(r),r=null),o=d,e(...c)):!r&&s&&(r=setTimeout(()=>{o=u?Date.now():0,r=null,e(...c)},g))}},fM=300,hM=({height:e,onColumnResize:n,columnIndex:t,getResizerPosition:r,columnWidth:o,resizingState:u})=>{const s=p.useRef(null),{pointer:c,setPointer:d,getIsPressed:g,setIsPressed:b,getPosition:C,setPosition:m,lastPressedTimestamp:k}=u,x=g(t),_=C(t),L=dM(n,1e3);p.useEffect(()=>{const I=s.current;if(!x||!I||!c)return;const O=c.pointerId;try{return I.setPointerCapture(O),()=>{I.hasPointerCapture(O)&&I.releasePointerCapture(O)}}catch(H){console.error(H)}},[c,x,t]);const E=p.useCallback(I=>{if(I.stopPropagation(),I.preventDefault(),s.current){k>Date.now()-fM&&L(t,0,"auto"),d({pointerId:I.pointerId,initialClientX:I.clientX,width:o}),b(t,!0);const O=r(I.clientX,o,t);m(O)}},[k,d,o,b,t,r,m,L]),A=p.useCallback(I=>{if(I.stopPropagation(),I.preventDefault(),x&&c){const O=o+(I.clientX-c.initialClientX),H=r(I.clientX,O,t);m(H),c.width=Math.max(O,50)}},[c,x,o,r,t,m]);return l.jsx("div",{ref:s,className:Q(H9.cuiResizeSpan,{[H9.cuiPressed]:x}),style:{height:`${e}px`,top:_.top,left:_.left},onPointerDown:E,onPointerUp:I=>{I.preventDefault(),I.stopPropagation(),s.current&&(c!=null&&c.pointerId||(c==null?void 0:c.pointerId)===0)&&(I.clientX!==c.initialClientX&&L(t,c.width,"manual"),m(kc),d(null),b(t,!1))},onPointerMove:A,onPointerCancel:I=>{I.preventDefault(),I.stopPropagation(),m(kc),d(null),b(t,!1)},onClick:I=>I.stopPropagation(),"data-resize":!0})},M1={cuiHeaderContainer:"_cuiHeaderContainer_1is3q_1",cuiScrolledVertical:"_cuiScrolledVertical_1is3q_8",cuiScrollableHeaderContainer:"_cuiScrollableHeaderContainer_1is3q_12",cuiHeaderCellContainer:"_cuiHeaderCellContainer_1is3q_16",cuiRowColumnContainer:"_cuiRowColumnContainer_1is3q_24",cuiScrolledHorizontal:"_cuiScrolledHorizontal_1is3q_31",cuiRowColumn:"_cuiRowColumn_1is3q_24"},pM=({columnIndex:e,cell:n,getColumnWidth:t,getColumnHorizontalPosition:r,getSelectionType:o,isFirstColumn:u,isLastColumn:s,onColumnResize:c,height:d,getResizerPosition:g,showBorder:b,resizingState:C})=>{const m=o({column:e,type:"column"}),k=o({column:e-1,type:"column"}),x=r(e),_=m==="selectDirect",L=(k==="selectDirect"||_)&&k!==m,E=t(e);return l.jsxs("div",{className:M1.cuiHeaderCellContainer,style:{width:typeof E=="string"?E:`${E}px`,height:`${d}px`,left:`${x}px`},"data-header":e,children:[l.jsx(ba,{$type:"header",$isFirstColumn:u,$selectionType:m,$isLastColumn:s,$isFocused:!1,$isSelectedLeft:L,$isSelectedTop:_,$isLastRow:!1,$isFirstRow:!0,$height:d,"data-grid-row":-1,"data-grid-column":e,"data-selected":_,$showBorder:b,children:p.createElement(n,{columnIndex:e,type:"header-cell",width:E})}),l.jsx(hM,{height:d,onColumnResize:c,columnIndex:e,getResizerPosition:g,columnWidth:E,resizingState:C})]})},gM=({scrolledVertical:e,scrolledHorizontal:n,showRowNumber:t,rowNumberWidth:r,minColumn:o,maxColumn:u,height:s,getColumnWidth:c,cell:d,columnCount:g,getSelectionType:b,onColumnResize:C,getColumnHorizontalPosition:m,getResizerPosition:k,showBorder:x,resizingState:_})=>{const L=b({type:"all"});return l.jsxs("div",{className:Q(M1.cuiHeaderContainer,{[M1.cuiScrolledVertical]:e}),style:{height:`${s}px`},children:[l.jsx("div",{className:M1.cuiScrollableHeaderContainer,style:{left:`${r}px`},children:Array.from({length:u-o+1},(E,A)=>o+A).map(E=>l.jsx(pM,{getSelectionType:b,columnIndex:E,getColumnWidth:c,getColumnHorizontalPosition:m,cell:d,isFirstColumn:E===0&&!t,isLastColumn:E+1===g,onColumnResize:C,height:s,getResizerPosition:k,showBorder:x,resizingState:_},`header-${E}`))}),t&&l.jsx("div",{className:Q(M1.cuiRowColumnContainer,{[M1.cuiScrolledHorizontal]:n}),style:{width:typeof r=="string"?r:`${r}px`,height:`${s}px`,left:"0px"},children:l.jsx(ba,{className:M1.cuiRowColumn,"data-selected":L==="selectDirect",$type:"header",$isFirstRow:!0,$isFirstColumn:!0,$selectionType:L,$isLastRow:!1,$isLastColumn:!1,$height:s,$isFocused:!1,$isSelectedLeft:!1,$isSelectedTop:!1,"data-grid-row":-1,"data-grid-column":-1,$showBorder:x,children:"#"})})]})},Pt={cuiGridContainer:"_cuiGridContainer_kf4j1_1",cuiGridDataContainer:"_cuiGridDataContainer_kf4j1_8",cuiContextMenuTrigger:"_cuiContextMenuTrigger_kf4j1_14",cuiFixedHeight:"_cuiFixedHeight_kf4j1_20",cuiRoundedNone:"_cuiRoundedNone_kf4j1_23",cuiRoundedSm:"_cuiRoundedSm_kf4j1_26",cuiRoundedMd:"_cuiRoundedMd_kf4j1_29",cuiRoundedLg:"_cuiRoundedLg_kf4j1_32",cuiRoundedXl:"_cuiRoundedXl_kf4j1_35",cuiShowBorder:"_cuiShowBorder_kf4j1_38",cuiHideBorder:"_cuiHideBorder_kf4j1_41"},A9=(e,n,t,r)=>{const o=Math.min(e,t),u=Math.max(e,t),s=Math.min(n,r),c=Math.max(n,r);return{left:o,right:u,top:s,bottom:c}},Lc=(e,n,t,r,o)=>{const{left:u,right:s,top:c,bottom:d}=A9(n,t,r,o);switch(e.type){case"columns":for(let g=u;g<=s;++g)if(!e.columns.has(g))return!1;return!0;case"rows":for(let g=c;g<=d;++g)if(!e.rows.has(g))return!1;return!0;case"rectangle":return e.bounds.left<=u&&e.bounds.right>=s&&e.bounds.top<=c&&e.bounds.bottom>=d;default:return!1}},P9=(e,n)=>({type:"rows",rows:new Set(e),anchorRow:n}),O9=(e,n)=>({type:"columns",columns:new Set(e),anchorColumn:n}),CM=(e,n,t,r)=>e===t&&r===n?N9():{type:"rectangle",bounds:A9(e,n,t,r),anchor:{column:e,row:n}},N9=()=>({type:"empty"}),vM=(e,n)=>e.type==="columns"||e.type==="rows"&&e.rows.has(n)||e.type==="rectangle"&&e.bounds.top<=n&&e.bounds.bottom>=n,bM=(e,n)=>e.type==="rows"||e.type==="columns"&&e.columns.has(n)||e.type==="rectangle"&&e.bounds.left<=n&&e.bounds.right>=n,$0=(e,n)=>{const t=Math.min(e,n),r=Math.max(e,n),o=[];for(let u=t;u<=r;++u)o.push(u);return o},mM=({onCellSelect:e,focus:n,columnCount:t,rowCount:r,onFocusChange:o,scrollGridTo:u,selection:s,rowStart:c})=>{const d=p.useCallback(I=>{const O={type:"rows",rows:new Set($0(c,r+c-1)),anchorRow:0};u({row:c,column:0}),o(c,0),e(I,O,{row:c,column:0})},[e,o,r,c,u]),g=p.useCallback(I=>{const{row:O,column:H}=I;u({row:O,column:H}),o(O,H);const D=N9();e(I,D,n)},[n,e,o,u]),b=p.useCallback(I=>{const{row:O,column:H}=I,D=CM(H,O,n.column,n.row);u({row:O,column:H}),e(I,D,n)},[n,e,u]),C=p.useCallback(I=>{const O=I.row,H=P9([O],O);u({row:O}),e(I,H,n)},[n,e,u]),m=p.useCallback(I=>{const O=I.row,H=P9($0(n.row,O),O);u({row:O}),e(I,H,n)},[n,e,u]),k=p.useCallback(I=>{const O=I.column,H=O9([O],O);u({column:O}),e(I,H,n)},[n,e,u]),x=p.useCallback(I=>{const O=I.column,H=O9($0(n.column,O),O);e(I,H,n),u({column:O})},[n,e,u]),_=p.useCallback(I=>{switch(I.type){case"all":d(I);break;case"normal":g(I);break;case"shiftSelection":b(I);break;case"columnSelection":k(I);break;case"shiftColumnSelection":x(I);break;case"rowSelection":C(I);break;case"shiftRowSelection":m(I);break;default:throw new Error(`Value should not occur ${I}`)}},[d,g,b,k,x,C,m]),L=p.useCallback((I,O,H,D)=>{const M=(U,j,G)=>Math.max(j,Math.min(G,U));let V=null;if(H){if(s.type==="rows")V={type:"shiftRowSelection",row:M(s.anchorRow+O,0,r+c-1),event:D};else if(s.type==="columns")V={type:"shiftColumnSelection",column:M(s.anchorColumn+I,0,t-1),event:D};else if(s.type==="rectangle"){const U=M(s.anchor.row+O,0,r+c-1),j=M(s.anchor.column+I,0,t-1);V={type:"shiftSelection",row:U,column:j,event:D}}}else{const U=M(n.row+O,0,r+c-1),j=M(n.column+I,0,t-1);V={type:"normal",row:U,column:j,event:D}}return V&&_(V),V},[_,t,r,s,n,c]),E=p.useCallback(I=>{if(I.type==="all")return Lc(s,0,c,t-1,r+c-1)?"selectDirect":"default";if(I.type==="column")return Lc(s,I.column,c,I.column,r+c)?"selectDirect":bM(s,I.column)?"selectIndirect":"default";const O=Lc(s,0,I.row,t,I.row),H=n.row===I.row||vM(s,I.row);if(I.type==="cell"&&I.column==-1)return"default";if(O)return"selectDirect";if(!H)return"default";if(I.type==="cell"){const{row:D,column:M}=I;if(D>=r+c||M>=t||D<c||M<0)return"default";if(Lc(s,M,D,M,D))return"selectDirect"}return s.type==="columns"?"default":"selectIndirect"},[t,n.row,r,c,s]),A=p.useCallback((I,O)=>{const H=s.type,D="click";if(!(I===-1&&O==-1)){if(H==="columns"){_({type:"shiftColumnSelection",column:O,event:D});return}if(H==="rows"){_({type:"shiftRowSelection",row:I,event:D});return}if(I===-1){let M=n.row;if(s.type!=="empty"){const{bounds:{top:V,bottom:U}}=s;V<=M?M=V:M=U}_({type:"shiftSelection",row:M,column:O,event:D});return}if(O===-1){let M=n.column;if(s.type!=="empty"){const{bounds:{left:V,right:U}}=s;V<=M?M=V:M=U}_({type:"shiftSelection",row:I,column:M,event:D});return}_({type:"shiftSelection",row:I,column:O,event:D})}},[n.column,n.row,_,s]);return{getSelectionType:E,onSelection:_,mouseMoveCellSelect:A,moveSelection:L}},wM=p.memo(({data:e,rowIndex:n,columnIndex:t,style:r,...o})=>{const{cell:u,getSelectionType:s,focus:c,columnCount:d,rowCount:g,showRowNumber:b,showHeader:C,rowHeight:m,rowStart:k,rowAutoHeight:x,updateRowHeight:_}=e,L=n+k,{row:E,column:A}=c,I=t===A&&L===E,O=t-1===A&&L===E,H=t===A&&L-1===E,D=s({row:L,column:t,type:"cell"}),M=s({row:L,column:t-1,type:"cell"}),V=s({row:L-1,column:t,type:"cell"}),U=(D==="selectDirect"||M==="selectDirect")&&D!==M,j=(D==="selectDirect"||V==="selectDirect")&&D!==V,G=U||O||I,q=j||H||I,Y=p.useRef(null);p.useEffect(()=>{if(!x||!Y.current)return;const ue=Y.current.getBoundingClientRect().height;_(n,ue)},[_,n,x]);const X={...r,height:"auto"};return l.jsx("div",{style:X,"data-row":L,"data-column":t,ref:Y,children:l.jsx(ba,{"data-selected":I||D==="selectDirect","data-focused":I,$isSelectedTop:q,$isSelectedLeft:G,$isFocused:I,$isLastRow:g-1===n,$isLastColumn:d-1===t,$isFirstColumn:t===0&&!b,$isFirstRow:n===0&&!C,$selectionType:D,$height:m,"data-grid-row":L,"data-grid-column":t,$showBorder:!0,$rowAutoHeight:x,children:p.createElement(u,{rowIndex:L,columnIndex:t,type:"row-cell",...o})})})},oM);var E1={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-dom-server-legacy.browser.production.min.js
|
|
52
52
|
*
|