@malloy-publisher/server 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/api-doc.yaml +140 -44
- package/dist/app/assets/{EnvironmentPage-D6kQraU3.js → EnvironmentPage-BnxD6uzV.js} +1 -1
- package/dist/app/assets/{HomePage-BZbuE5jv.js → HomePage-D_srvBnZ.js} +1 -1
- package/dist/app/assets/{LightMode-BxZdPcNr.js → LightMode-DCsTKw61.js} +1 -1
- package/dist/app/assets/MainPage-CzHkstrF.js +2 -0
- package/dist/app/assets/ModelPage-CoQ07DHX.js +2 -0
- package/dist/app/assets/PackagePage-CUeUHOnm.js +1 -0
- package/dist/app/assets/RenderedResult-BnPzJ9Jf.es-Dme58kt1.js +116 -0
- package/dist/app/assets/RouteError-gRAhsKGi.js +1 -0
- package/dist/app/assets/ThemeEditorPage-C2gOJTU1.js +1 -0
- package/dist/app/assets/ToggleButtonGroup-CoIPitu6.js +1 -0
- package/dist/app/assets/index-BhkeAzTe.js +453 -0
- package/dist/app/assets/index-BswZnpqD.js +1322 -0
- package/dist/app/assets/index-CRAwrhYM.js +2 -0
- package/dist/app/assets/index-DKvKsj6c.js +442 -0
- package/dist/app/assets/{index-By-g8wiC.js → index-DTfS9vNi.js} +1 -1
- package/dist/app/assets/index-hVLQwLRj.js +1 -0
- package/dist/app/assets/index.es-D0L4_L8o.js +106 -0
- package/dist/app/index.html +1 -1
- package/dist/package_load_worker.mjs +20 -1
- package/dist/server.mjs +1033 -683
- package/package.json +3 -3
- package/dist/app/assets/MainPage-DrczCw4J.js +0 -2
- package/dist/app/assets/MaterializationsPage-BFLHLEuk.js +0 -1
- package/dist/app/assets/ModelPage-CFnfQ6BL.js +0 -1
- package/dist/app/assets/PackagePage-DHsVf_mP.js +0 -1
- package/dist/app/assets/RouteError-CHq8ubhy.js +0 -1
- package/dist/app/assets/ThemeEditorPage-B2y8Y64Y.js +0 -1
- package/dist/app/assets/index-BVv6KQ93.js +0 -557
- package/dist/app/assets/index-Bqrhk3ff.js +0 -2
- package/dist/app/assets/index-CawCwLK3.js +0 -1774
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import{r as u,j as c,a9 as me,R as Vp,aH as Hp,aI as Nt,aJ as Zt}from"./index-DKvKsj6c.js";import{r as w5,a as x5,b as C5,d as Cr}from"./index-BswZnpqD.js";import{d as Y}from"./index-hVLQwLRj.js";import{d as _5}from"./index-DTfS9vNi.js";import{MalloyRenderer as Xp,isCoreVizPluginInstance as k5}from"./index-DSoCUF-f.js";import"./index-w_0OQJgZ.js";import"./index-CRAwrhYM.js";var mr={},Ba={},Of;function S5(){return Of||(Of=1,Object.defineProperty(Ba,"__esModule",{value:!0})),Ba}var Vo={},Ho={},Nf;function E5(){if(Nf)return Ho;Nf=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.queryMetadataProblems=s,Ho.validateQueryMetadata=l;const e=128,t=256,n=20,r=/^[A-Za-z0-9_]+$/;function o(i){for(let a=0;a<i.length;a++){const d=i.charCodeAt(a);if(d<32||d>126||d===34)return!1}return!0}function s(i){const a=[],d=Object.keys(i);d.length>n&&a.push(`more than ${n} properties`);for(const f of d){r.test(f)||a.push(`property name '${f}' must be ASCII alphanumerics and underscore`),f.length>e&&a.push(`property name '${f}' exceeds ${e} characters`);const m=i[f];o(m)||a.push(`property '${f}' value contains characters outside printable ASCII (or ")`),m.length>t&&a.push(`property '${f}' value exceeds ${t} characters`)}return a}function l(i){const a=s(i);if(a.length>0)throw new Error(`Invalid query metadata: ${a.join("; ")}`)}return Ho}var $f;function R5(){if($f)return Vo;$f=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.BaseConnection=void 0;const e=w5(),t=E5(),n=x5();class r{constructor(){this.schemaCache={}}async checkSchemaCache(s,l,i,a){let d=this.schemaCache[s];if(!d||d.schema&&a&&a>d.timestamp)try{const f=await i();if(typeof f=="string")return{error:f};d={schema:f,timestamp:a??Date.now()},this.schemaCache[s]=d}catch(f){return{error:f.message}}return d.error?d:d.schema&&d.schema.type===l?{...d,schema:d.schema}:{error:"Wrong type found in schema cache"}}async fetchSchemaForTables(s,{refreshTimestamp:l}){const i={},a={};for(const[d,f]of Object.entries(s)){const m=(0,n.validateCanonicalTablePath)(this.dialectName,f);if(m!==void 0){a[d]=m;continue}const p=await this.checkSchemaCache(f,"table",async()=>await this.fetchTableSchema(d,f),l);p.schema&&(i[d]=p.schema),p.error&&(a[d]=p.error)}return{schemas:i,errors:a}}async fetchSchemaForSQLStruct(s,{refreshTimestamp:l}){const i=(0,e.sqlKey)(s.connection,s.selectStr),a=await this.checkSchemaCache(i,"sql_select",async()=>await this.fetchSelectSchema(s),l);return a.schema?{structDef:a.schema}:a.error?{error:a.error}:{error:"Unknown schema fetch error"}}queryMetadataBag(s){if(s!==void 0)return(0,t.validateQueryMetadata)(s),Object.keys(s).length>0?s:void 0}queryMetadataComment(s){const l=this.queryMetadataBag(s);return l===void 0?"":`-- ${Object.keys(l).map(a=>`${a}="${l[a]}"`).join(" ")}
|
|
2
|
+
`}sqlWithQueryMetadata(s,l){return this.queryMetadataComment(l)+s}isPool(){return!1}canPersist(){return!1}canStream(){return!1}async close(){}async idle(){}async estimateQueryCost(s){return{}}async fetchMetadata(){return{}}async fetchTableMetadata(s){return{}}}return Vo.BaseConnection=r,Vo}var zf;function j5(){return zf||(zf=1,(function(e){var t=mr&&mr.__createBinding||(Object.create?(function(r,o,s,l){l===void 0&&(l=s);var i=Object.getOwnPropertyDescriptor(o,s);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,l,i)}):(function(r,o,s,l){l===void 0&&(l=s),r[l]=o[s]})),n=mr&&mr.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(S5(),e),n(R5(),e),n(C5(),e)})(mr)),mr}var T5=j5(),L5=Object.defineProperty,M5=Object.getPrototypeOf,A5=Reflect.get,Zp=e=>{throw TypeError(e)},I5=(e,t,n)=>t in e?L5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t,n)=>I5(e,typeof t!="symbol"?t+"":t,n),Pu=(e,t,n)=>t.has(e)||Zp("Cannot "+n),it=(e,t,n)=>(Pu(e,t,"read from private field"),n?n.call(e):t.get(e)),zr=(e,t,n)=>t.has(e)?Zp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Kt=(e,t,n,r)=>(Pu(e,t,"write to private field"),t.set(e,n),n),Ff=(e,t,n)=>(Pu(e,t,"access private method"),n),P5=(e,t,n)=>A5(M5(e),n,t),Fr,yn,pr,Wn,Br,hr,qr,xl,qa,Xo;function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Bf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qi(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Bf(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Bf(e[o],null)}}}}function se(...e){return u.useCallback(qi(...e),e)}function D5(e,t){const n=u.createContext(t),r=s=>{const{children:l,...i}=s,a=u.useMemo(()=>i,Object.values(i));return c.jsx(n.Provider,{value:a,children:l})};r.displayName=e+"Provider";function o(s){const l=u.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Gt(e,t=[]){let n=[];function r(s,l){const i=u.createContext(l),a=n.length;n=[...n,l];const d=m=>{var p;const{scope:h,children:y,...g}=m,v=((p=h?.[e])==null?void 0:p[a])||i,b=u.useMemo(()=>g,Object.values(g));return c.jsx(v.Provider,{value:b,children:y})};d.displayName=s+"Provider";function f(m,p){var h;const y=((h=p?.[e])==null?void 0:h[a])||i,g=u.useContext(y);if(g)return g;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[d,f]}const o=()=>{const s=n.map(l=>u.createContext(l));return function(i){const a=i?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return o.scopeName=e,[r,O5(o,...t)]}function O5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((i,{useScope:a,scopeName:d})=>{const m=a(s)[`__scope${d}`];return{...i,...m}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var nr=u.forwardRef((e,t)=>{const{children:n,...r}=e,o=u.Children.toArray(n),s=o.find(N5);if(s){const l=s.props.children,i=o.map(a=>a===s?u.Children.count(l)>1?u.Children.only(null):u.isValidElement(l)?l.props.children:null:a);return c.jsx(Lc,{...r,ref:t,children:u.isValidElement(l)?u.cloneElement(l,void 0,i):null})}return c.jsx(Lc,{...r,ref:t,children:n})});nr.displayName="Slot";var Lc=u.forwardRef((e,t)=>{const{children:n,...r}=e;if(u.isValidElement(n)){const o=z5(n),s=$5(r,n.props);return n.type!==u.Fragment&&(s.ref=t?qi(t,o):o),u.cloneElement(n,s)}return u.Children.count(n)>1?u.Children.only(null):null});Lc.displayName="SlotClone";var Kp=({children:e})=>c.jsx(c.Fragment,{children:e});function N5(e){return u.isValidElement(e)&&e.type===Kp}function $5(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function z5(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var F5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=F5.reduce((e,t)=>{const n=u.forwardRef((r,o)=>{const{asChild:s,...l}=r,i=s?nr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(i,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Qp(e,t){e&&Nt.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function B5(e,t=globalThis?.document){const n=Ge(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var q5="DismissableLayer",Mc="dismissableLayer.update",W5="dismissableLayer.pointerDownOutside",G5="dismissableLayer.focusOutside",qf,Jp=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wo=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:i,...a}=e,d=u.useContext(Jp),[f,m]=u.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),y=se(t,k=>m(k)),g=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,C=V5(k=>{const R=k.target,j=[...d.branches].some(M=>M.contains(R));!_||j||(o?.(k),l?.(k),k.defaultPrevented||i?.())},p),E=H5(k=>{const R=k.target;[...d.branches].some(M=>M.contains(R))||(s?.(k),l?.(k),k.defaultPrevented||i?.())},p);return B5(k=>{w===d.layers.size-1&&(r?.(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},p),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(qf=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Wf(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qf)}},[f,p,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Wf())},[f,d]),u.useEffect(()=>{const k=()=>h({});return document.addEventListener(Mc,k),()=>document.removeEventListener(Mc,k)},[]),c.jsx(Q.div,{...a,ref:y,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,E.onFocusCapture),onBlurCapture:z(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,C.onPointerDownCapture)})});wo.displayName=q5;var U5="DismissableLayerBranch",Y5=u.forwardRef((e,t)=>{const n=u.useContext(Jp),r=u.useRef(null),o=se(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(Q.div,{...e,ref:o})});Y5.displayName=U5;function V5(e,t=globalThis?.document){const n=Ge(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let a=function(){eh(W5,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function H5(e,t=globalThis?.document){const n=Ge(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&eh(G5,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wf(){const e=new CustomEvent(Mc);document.dispatchEvent(e)}function eh(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Qp(o,s):o.dispatchEvent(s)}var st=globalThis?.document?u.useLayoutEffect:()=>{},X5=Vp.useId||(()=>{}),Z5=0;function Lt(e){const[t,n]=u.useState(X5());return st(()=>{n(r=>r??String(Z5++))},[e]),t?`radix-${t}`:""}const K5=["top","right","bottom","left"],rr=Math.min,yt=Math.max,ai=Math.round,Cl=Math.floor,on=e=>({x:e,y:e}),Q5={left:"right",right:"left",bottom:"top",top:"bottom"},J5={start:"end",end:"start"};function Ac(e,t,n){return yt(e,rr(t,n))}function jn(e,t){return typeof e=="function"?e(t):e}function Tn(e){return e.split("-")[0]}function xo(e){return e.split("-")[1]}function Du(e){return e==="x"?"y":"x"}function Ou(e){return e==="y"?"height":"width"}function or(e){return["top","bottom"].includes(Tn(e))?"y":"x"}function Nu(e){return Du(or(e))}function e3(e,t,n){n===void 0&&(n=!1);const r=xo(e),o=Nu(e),s=Ou(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=ci(l)),[l,ci(l)]}function t3(e){const t=ci(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>J5[t])}function n3(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:l;default:return[]}}function r3(e,t,n,r){const o=xo(e);let s=n3(Tn(e),n==="start",r);return o&&(s=s.map(l=>l+"-"+o),t&&(s=s.concat(s.map(Ic)))),s}function ci(e){return e.replace(/left|right|bottom|top/g,t=>Q5[t])}function o3(e){return{top:0,right:0,bottom:0,left:0,...e}}function th(e){return typeof e!="number"?o3(e):{top:e,right:e,bottom:e,left:e}}function ui(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gf(e,t,n){let{reference:r,floating:o}=e;const s=or(t),l=Nu(t),i=Ou(l),a=Tn(t),d=s==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(a){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(xo(t)){case"start":h[l]-=p*(n&&d?-1:1);break;case"end":h[l]+=p*(n&&d?-1:1);break}return h}const s3=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:l}=n,i=s.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Gf(d,r,a),p=r,h={},y=0;for(let g=0;g<i.length;g++){const{name:v,fn:b}=i[g],{x:w,y:x,data:_,reset:C}=await b({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:d,platform:l,elements:{reference:e,floating:t}});f=w??f,m=x??m,h={...h,[v]:{...h[v],..._}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(d=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:m}=Gf(d,p,a)),g=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:h}};async function Cs(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:l,elements:i,strategy:a}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=jn(t,e),y=th(h),v=i[p?m==="floating"?"reference":"floating":m],b=ui(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:a})),w=m==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),_=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=ui(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:x,strategy:a}):w);return{top:(b.top-C.top+y.top)/_.y,bottom:(C.bottom-b.bottom+y.bottom)/_.y,left:(b.left-C.left+y.left)/_.x,right:(C.right-b.right+y.right)/_.x}}const l3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:l,elements:i,middlewareData:a}=t,{element:d,padding:f=0}=jn(e,t)||{};if(d==null)return{};const m=th(f),p={x:n,y:r},h=Nu(o),y=Ou(h),g=await l.getDimensions(d),v=h==="y",b=v?"top":"left",w=v?"bottom":"right",x=v?"clientHeight":"clientWidth",_=s.reference[y]+s.reference[h]-p[h]-s.floating[y],C=p[h]-s.reference[h],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let k=E?E[x]:0;(!k||!await(l.isElement==null?void 0:l.isElement(E)))&&(k=i.floating[x]||s.floating[y]);const R=_/2-C/2,j=k/2-g[y]/2-1,M=rr(m[b],j),D=rr(m[w],j),$=M,X=k-g[y]-D,A=k/2-g[y]/2+R,Z=Ac($,A,X),q=!a.arrow&&xo(o)!=null&&A!==Z&&s.reference[y]/2-(A<$?M:D)-g[y]/2<0,K=q?A<$?A-$:A-X:0;return{[h]:p[h]+K,data:{[h]:Z,centerOffset:A-Z-K,...q&&{alignmentOffset:K}},reset:q}}}),i3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:l,initialPlacement:i,platform:a,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=jn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=Tn(o),w=or(i),x=Tn(i)===i,_=await(a.isRTL==null?void 0:a.isRTL(d.floating)),C=p||(x||!g?[ci(i)]:t3(i)),E=y!=="none";!p&&E&&C.push(...r3(i,g,y,_));const k=[i,...C],R=await Cs(t,v),j=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&j.push(R[b]),m){const A=e3(o,l,_);j.push(R[A[0]],R[A[1]])}if(M=[...M,{placement:o,overflows:j}],!j.every(A=>A<=0)){var D,$;const A=(((D=s.flip)==null?void 0:D.index)||0)+1,Z=k[A];if(Z)return{data:{index:A,overflows:M},reset:{placement:Z}};let q=($=M.filter(K=>K.overflows[0]<=0).sort((K,H)=>K.overflows[1]-H.overflows[1])[0])==null?void 0:$.placement;if(!q)switch(h){case"bestFit":{var X;const K=(X=M.filter(H=>{if(E){const N=or(H.placement);return N===w||N==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(N=>N>0).reduce((N,oe)=>N+oe,0)]).sort((H,N)=>H[1]-N[1])[0])==null?void 0:X[0];K&&(q=K);break}case"initialPlacement":q=i;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function Uf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yf(e){return K5.some(t=>e[t]>=0)}const a3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=jn(e,t);switch(r){case"referenceHidden":{const s=await Cs(t,{...o,elementContext:"reference"}),l=Uf(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Yf(l)}}}case"escaped":{const s=await Cs(t,{...o,altBoundary:!0}),l=Uf(s,n.floating);return{data:{escapedOffsets:l,escaped:Yf(l)}}}default:return{}}}}};async function c3(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Tn(n),i=xo(n),a=or(n)==="y",d=["left","top"].includes(l)?-1:1,f=s&&a?-1:1,m=jn(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),a?{x:h*f,y:p*d}:{x:p*d,y:h*f}}const u3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:l,middlewareData:i}=t,a=await c3(t,e);return l===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:s+a.y,data:{...a,placement:l}}}}},d3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:i={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...a}=jn(e,t),d={x:n,y:r},f=await Cs(t,a),m=or(Tn(o)),p=Du(m);let h=d[p],y=d[m];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+f[v],x=h-f[b];h=Ac(w,h,x)}if(l){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",w=y+f[v],x=y-f[b];y=Ac(w,y,x)}const g=i.fn({...t,[p]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:s,[m]:l}}}}}},f3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:l}=t,{offset:i=0,mainAxis:a=!0,crossAxis:d=!0}=jn(e,t),f={x:n,y:r},m=or(o),p=Du(m);let h=f[p],y=f[m];const g=jn(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const x=p==="y"?"height":"width",_=s.reference[p]-s.floating[x]+v.mainAxis,C=s.reference[p]+s.reference[x]-v.mainAxis;h<_?h=_:h>C&&(h=C)}if(d){var b,w;const x=p==="y"?"width":"height",_=["top","left"].includes(Tn(o)),C=s.reference[m]-s.floating[x]+(_&&((b=l.offset)==null?void 0:b[m])||0)+(_?0:v.crossAxis),E=s.reference[m]+s.reference[x]+(_?0:((w=l.offset)==null?void 0:w[m])||0)-(_?v.crossAxis:0);y<C?y=C:y>E&&(y=E)}return{[p]:h,[m]:y}}}},m3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:l,elements:i}=t,{apply:a=()=>{},...d}=jn(e,t),f=await Cs(t,d),m=Tn(o),p=xo(o),h=or(o)==="y",{width:y,height:g}=s.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=p===(await(l.isRTL==null?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(b=m,v=p==="end"?"top":"bottom");const w=g-f.top-f.bottom,x=y-f.left-f.right,_=rr(g-f[v],w),C=rr(y-f[b],x),E=!t.middlewareData.shift;let k=_,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),E&&!p){const M=yt(f.left,0),D=yt(f.right,0),$=yt(f.top,0),X=yt(f.bottom,0);h?R=y-2*(M!==0||D!==0?M+D:yt(f.left,f.right)):k=g-2*($!==0||X!==0?$+X:yt(f.top,f.bottom))}await a({...t,availableWidth:R,availableHeight:k});const j=await l.getDimensions(i.floating);return y!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Wi(){return typeof window<"u"}function Co(e){return nh(e)?(e.nodeName||"").toLowerCase():"#document"}function bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function un(e){var t;return(t=(nh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nh(e){return Wi()?e instanceof Node||e instanceof bt(e).Node:!1}function zt(e){return Wi()?e instanceof Element||e instanceof bt(e).Element:!1}function ln(e){return Wi()?e instanceof HTMLElement||e instanceof bt(e).HTMLElement:!1}function Vf(e){return!Wi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bt(e).ShadowRoot}function Ws(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function p3(e){return["table","td","th"].includes(Co(e))}function Gi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function $u(e){const t=zu(),n=zt(e)?Ft(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function h3(e){let t=sr(e);for(;ln(t)&&!fo(t);){if($u(t))return t;if(Gi(t))return null;t=sr(t)}return null}function zu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fo(e){return["html","body","#document"].includes(Co(e))}function Ft(e){return bt(e).getComputedStyle(e)}function Ui(e){return zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sr(e){if(Co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vf(e)&&e.host||un(e);return Vf(t)?t.host:t}function rh(e){const t=sr(e);return fo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ln(t)&&Ws(t)?t:rh(t)}function _s(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=rh(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),l=bt(o);if(s){const i=Pc(l);return t.concat(l,l.visualViewport||[],Ws(o)?o:[],i&&n?_s(i):[])}return t.concat(o,_s(o,[],n))}function Pc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oh(e){const t=Ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ln(e),s=o?e.offsetWidth:n,l=o?e.offsetHeight:r,i=ai(n)!==s||ai(r)!==l;return i&&(n=s,r=l),{width:n,height:r,$:i}}function Fu(e){return zt(e)?e:e.contextElement}function to(e){const t=Fu(e);if(!ln(t))return on(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=oh(t);let l=(s?ai(n.width):n.width)/r,i=(s?ai(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!i||!Number.isFinite(i))&&(i=1),{x:l,y:i}}const g3=on(0);function sh(e){const t=bt(e);return!zu()||!t.visualViewport?g3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==bt(e)?!1:t}function _r(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Fu(e);let l=on(1);t&&(r?zt(r)&&(l=to(r)):l=to(e));const i=y3(s,n,r)?sh(s):on(0);let a=(o.left+i.x)/l.x,d=(o.top+i.y)/l.y,f=o.width/l.x,m=o.height/l.y;if(s){const p=bt(s),h=r&&zt(r)?bt(r):r;let y=p,g=Pc(y);for(;g&&r&&h!==y;){const v=to(g),b=g.getBoundingClientRect(),w=Ft(g),x=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,_=b.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;a*=v.x,d*=v.y,f*=v.x,m*=v.y,a+=x,d+=_,y=bt(g),g=Pc(y)}}return ui({width:f,height:m,x:a,y:d})}function Bu(e,t){const n=Ui(e).scrollLeft;return t?t.left+n:_r(un(e)).left+n}function lh(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Bu(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function v3(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",l=un(r),i=t?Gi(t.floating):!1;if(r===l||i&&s)return n;let a={scrollLeft:0,scrollTop:0},d=on(1);const f=on(0),m=ln(r);if((m||!m&&!s)&&((Co(r)!=="body"||Ws(l))&&(a=Ui(r)),ln(r))){const h=_r(r);d=to(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=l&&!m&&!s?lh(l,a,!0):on(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-a.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-a.scrollTop*d.y+f.y+p.y}}function b3(e){return Array.from(e.getClientRects())}function w3(e){const t=un(e),n=Ui(e),r=e.ownerDocument.body,o=yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bu(e);const i=-n.scrollTop;return Ft(r).direction==="rtl"&&(l+=yt(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:i}}function x3(e,t){const n=bt(e),r=un(e),o=n.visualViewport;let s=r.clientWidth,l=r.clientHeight,i=0,a=0;if(o){s=o.width,l=o.height;const d=zu();(!d||d&&t==="fixed")&&(i=o.offsetLeft,a=o.offsetTop)}return{width:s,height:l,x:i,y:a}}function C3(e,t){const n=_r(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ln(e)?to(e):on(1),l=e.clientWidth*s.x,i=e.clientHeight*s.y,a=o*s.x,d=r*s.y;return{width:l,height:i,x:a,y:d}}function Hf(e,t,n){let r;if(t==="viewport")r=x3(e,n);else if(t==="document")r=w3(un(e));else if(zt(t))r=C3(t,n);else{const o=sh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ui(r)}function ih(e,t){const n=sr(e);return n===t||!zt(n)||fo(n)?!1:Ft(n).position==="fixed"||ih(n,t)}function _3(e,t){const n=t.get(e);if(n)return n;let r=_s(e,[],!1).filter(i=>zt(i)&&Co(i)!=="body"),o=null;const s=Ft(e).position==="fixed";let l=s?sr(e):e;for(;zt(l)&&!fo(l);){const i=Ft(l),a=$u(l);!a&&i.position==="fixed"&&(o=null),(s?!a&&!o:!a&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ws(l)&&!a&&ih(e,l))?r=r.filter(f=>f!==l):o=i,l=sr(l)}return t.set(e,r),r}function k3(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Gi(t)?[]:_3(t,this._c):[].concat(n),r],i=l[0],a=l.reduce((d,f)=>{const m=Hf(t,f,o);return d.top=yt(m.top,d.top),d.right=rr(m.right,d.right),d.bottom=rr(m.bottom,d.bottom),d.left=yt(m.left,d.left),d},Hf(t,i,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function S3(e){const{width:t,height:n}=oh(e);return{width:t,height:n}}function E3(e,t,n){const r=ln(t),o=un(t),s=n==="fixed",l=_r(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const a=on(0);if(r||!r&&!s)if((Co(t)!=="body"||Ws(o))&&(i=Ui(t)),r){const p=_r(t,!0,s,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else o&&(a.x=Bu(o));const d=o&&!r&&!s?lh(o,i):on(0),f=l.left+i.scrollLeft-a.x-d.x,m=l.top+i.scrollTop-a.y-d.y;return{x:f,y:m,width:l.width,height:l.height}}function Wa(e){return Ft(e).position==="static"}function Xf(e,t){if(!ln(e)||Ft(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return un(e)===n&&(n=n.ownerDocument.body),n}function ah(e,t){const n=bt(e);if(Gi(e))return n;if(!ln(e)){let o=sr(e);for(;o&&!fo(o);){if(zt(o)&&!Wa(o))return o;o=sr(o)}return n}let r=Xf(e,t);for(;r&&p3(r)&&Wa(r);)r=Xf(r,t);return r&&fo(r)&&Wa(r)&&!$u(r)?n:r||h3(e)||n}const R3=async function(e){const t=this.getOffsetParent||ah,n=this.getDimensions,r=await n(e.floating);return{reference:E3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function j3(e){return Ft(e).direction==="rtl"}const T3={convertOffsetParentRelativeRectToViewportRelativeRect:v3,getDocumentElement:un,getClippingRect:k3,getOffsetParent:ah,getElementRects:R3,getClientRects:b3,getDimensions:S3,getScale:to,isElement:zt,isRTL:j3};function ch(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L3(e,t){let n=null,r;const o=un(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function l(i,a){i===void 0&&(i=!1),a===void 0&&(a=1),s();const d=e.getBoundingClientRect(),{left:f,top:m,width:p,height:h}=d;if(i||t(),!p||!h)return;const y=Cl(m),g=Cl(o.clientWidth-(f+p)),v=Cl(o.clientHeight-(m+h)),b=Cl(f),x={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:yt(0,rr(1,a))||1};let _=!0;function C(E){const k=E[0].intersectionRatio;if(k!==a){if(!_)return l();k?l(!1,k):r=setTimeout(()=>{l(!1,1e-7)},1e3)}k===1&&!ch(d,e.getBoundingClientRect())&&l(),_=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return l(!0),s}function M3(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,d=Fu(e),f=o||s?[...d?_s(d):[],..._s(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const m=d&&i?L3(d,n):null;let p=-1,h=null;l&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),d&&!a&&h.observe(d),h.observe(t));let y,g=a?_r(e):null;a&&v();function v(){const b=_r(e);g&&!ch(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;f.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),m?.(),(b=h)==null||b.disconnect(),h=null,a&&cancelAnimationFrame(y)}}const A3=u3,I3=d3,P3=i3,D3=m3,O3=a3,Zf=l3,N3=f3,$3=(e,t,n)=>{const r=new Map,o={platform:T3,...n},s={...o.platform,_c:r};return s3(e,t,{...o,platform:s})};var Hl=typeof document<"u"?u.useLayoutEffect:u.useEffect;function di(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!di(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!di(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kf(e,t){const n=uh(e);return Math.round(t*n)/n}function Ga(e){const t=u.useRef(e);return Hl(()=>{t.current=e}),t}function z3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:l}={},transform:i=!0,whileElementsMounted:a,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=u.useState(r);di(p,r)||h(r);const[y,g]=u.useState(null),[v,b]=u.useState(null),w=u.useCallback(H=>{H!==E.current&&(E.current=H,g(H))},[]),x=u.useCallback(H=>{H!==k.current&&(k.current=H,b(H))},[]),_=s||y,C=l||v,E=u.useRef(null),k=u.useRef(null),R=u.useRef(f),j=a!=null,M=Ga(a),D=Ga(o),$=Ga(d),X=u.useCallback(()=>{if(!E.current||!k.current)return;const H={placement:t,strategy:n,middleware:p};D.current&&(H.platform=D.current),$3(E.current,k.current,H).then(N=>{const oe={...N,isPositioned:$.current!==!1};A.current&&!di(R.current,oe)&&(R.current=oe,Nt.flushSync(()=>{m(oe)}))})},[p,t,n,D,$]);Hl(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(H=>({...H,isPositioned:!1})))},[d]);const A=u.useRef(!1);Hl(()=>(A.current=!0,()=>{A.current=!1}),[]),Hl(()=>{if(_&&(E.current=_),C&&(k.current=C),_&&C){if(M.current)return M.current(_,C,X);X()}},[_,C,X,M,j]);const Z=u.useMemo(()=>({reference:E,floating:k,setReference:w,setFloating:x}),[w,x]),q=u.useMemo(()=>({reference:_,floating:C}),[_,C]),K=u.useMemo(()=>{const H={position:n,left:0,top:0};if(!q.floating)return H;const N=Kf(q.floating,f.x),oe=Kf(q.floating,f.y);return i?{...H,transform:"translate("+N+"px, "+oe+"px)",...uh(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:oe}},[n,i,q.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:X,refs:Z,elements:q,floatingStyles:K}),[f,X,Z,q,K])}const F3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Zf({element:r.current,padding:o}).fn(n):{}:r?Zf({element:r,padding:o}).fn(n):{}}}},B3=(e,t)=>({...A3(e),options:[e,t]}),q3=(e,t)=>({...I3(e),options:[e,t]}),W3=(e,t)=>({...N3(e),options:[e,t]}),G3=(e,t)=>({...P3(e),options:[e,t]}),U3=(e,t)=>({...D3(e),options:[e,t]}),Y3=(e,t)=>({...O3(e),options:[e,t]}),V3=(e,t)=>({...F3(e),options:[e,t]});var H3="Arrow",dh=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});dh.displayName=H3;var X3=dh;function Z3(e){const[t,n]=u.useState(void 0);return st(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let l,i;if("borderBoxSize"in s){const a=s.borderBoxSize,d=Array.isArray(a)?a[0]:a;l=d.inlineSize,i=d.blockSize}else l=e.offsetWidth,i=e.offsetHeight;n({width:l,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var qu="Popper",[fh,cr]=Gt(qu),[K3,mh]=fh(qu),ph=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return c.jsx(K3,{scope:t,anchor:r,onAnchorChange:o,children:n})};ph.displayName=qu;var hh="PopperAnchor",gh=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=mh(hh,n),l=u.useRef(null),i=se(t,l);return u.useEffect(()=>{s.onAnchorChange(r?.current||l.current)}),r?null:c.jsx(Q.div,{...o,ref:i})});gh.displayName=hh;var Wu="PopperContent",[Q3,J3]=fh(Wu),yh=u.forwardRef((e,t)=>{var n,r,o,s,l,i;const{__scopePopper:a,side:d="bottom",sideOffset:f=0,align:m="center",alignOffset:p=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:g=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:x="optimized",onPlaced:_,...C}=e,E=mh(Wu,a),[k,R]=u.useState(null),j=se(t,ze=>R(ze)),[M,D]=u.useState(null),$=Z3(M),X=$?.width??0,A=$?.height??0,Z=d+(m!=="center"?"-"+m:""),q=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},K=Array.isArray(g)?g:[g],H=K.length>0,N={padding:q,boundary:K.filter(t2),altBoundary:H},{refs:oe,floatingStyles:Te,placement:pe,isPositioned:ve,middlewareData:we}=z3({strategy:"fixed",placement:Z,whileElementsMounted:(...ze)=>M3(...ze,{animationFrame:x==="always"}),elements:{reference:E.anchor},middleware:[B3({mainAxis:f+A,alignmentAxis:p}),y&&q3({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?W3():void 0,...N}),y&&G3({...N}),U3({...N,apply:({elements:ze,rects:Fe,availableWidth:Ct,availableHeight:_t})=>{const{width:On,height:vl}=Fe.reference,Nn=ze.floating.style;Nn.setProperty("--radix-popper-available-width",`${Ct}px`),Nn.setProperty("--radix-popper-available-height",`${_t}px`),Nn.setProperty("--radix-popper-anchor-width",`${On}px`),Nn.setProperty("--radix-popper-anchor-height",`${vl}px`)}}),M&&V3({element:M,padding:h}),n2({arrowWidth:X,arrowHeight:A}),w&&Y3({strategy:"referenceHidden",...N})]}),[Qe,Ee]=wh(pe),U=Ge(_);st(()=>{ve&&U?.()},[ve,U]);const le=(n=we.arrow)==null?void 0:n.x,ce=(r=we.arrow)==null?void 0:r.y,G=((o=we.arrow)==null?void 0:o.centerOffset)!==0,[fe,ie]=u.useState();return st(()=>{k&&ie(window.getComputedStyle(k).zIndex)},[k]),c.jsx("div",{ref:oe.setFloating,"data-radix-popper-content-wrapper":"",style:{...Te,transform:ve?Te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(s=we.transformOrigin)==null?void 0:s.x,(l=we.transformOrigin)==null?void 0:l.y].join(" "),...((i=we.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Q3,{scope:a,placedSide:Qe,onArrowChange:D,arrowX:le,arrowY:ce,shouldHideArrow:G,children:c.jsx(Q.div,{"data-side":Qe,"data-align":Ee,...C,ref:j,style:{...C.style,animation:ve?void 0:"none"}})})})});yh.displayName=Wu;var vh="PopperArrow",e2={top:"bottom",right:"left",bottom:"top",left:"right"},bh=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=J3(vh,r),l=e2[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(X3,{...o,ref:n,style:{...o.style,display:"block"}})})});bh.displayName=vh;function t2(e){return e!==null}var n2=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:s,rects:l,middlewareData:i}=t,d=((n=i.arrow)==null?void 0:n.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[p,h]=wh(s),y={start:"0%",center:"50%",end:"100%"}[h],g=(((r=i.arrow)==null?void 0:r.x)??0)+f/2,v=(((o=i.arrow)==null?void 0:o.y)??0)+m/2;let b="",w="";return p==="bottom"?(b=d?y:`${g}px`,w=`${-m}px`):p==="top"?(b=d?y:`${g}px`,w=`${l.floating.height+m}px`):p==="right"?(b=`${-m}px`,w=d?y:`${v}px`):p==="left"&&(b=`${l.floating.width+m}px`,w=d?y:`${v}px`),{data:{x:b,y:w}}}});function wh(e){const[t,n="center"]=e.split("-");return[t,n]}var Yi=ph,Gs=gh,Vi=yh,Hi=bh,r2="Portal",_o=u.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[s,l]=u.useState(!1);st(()=>l(!0),[]);const i=r||s&&((n=globalThis?.document)==null?void 0:n.body);return i?Hp.createPortal(c.jsx(Q.div,{...o,ref:t}),i):null});_o.displayName=r2;function o2(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Ke=e=>{const{present:t,children:n}=e,r=s2(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=se(r.ref,l2(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Ke.displayName="Presence";function s2(e){const[t,n]=u.useState(),r=u.useRef({}),o=u.useRef(e),s=u.useRef("none"),l=e?"mounted":"unmounted",[i,a]=o2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=_l(r.current);s.current=i==="mounted"?d:"none"},[i]),st(()=>{const d=r.current,f=o.current;if(f!==e){const p=s.current,h=_l(d);e?a("MOUNT"):h==="none"||d?.display==="none"?a("UNMOUNT"):a(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),st(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=h=>{const g=_l(r.current).includes(h.animationName);if(h.target===t&&g&&(a("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(s.current=_l(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function _l(e){return e?.animationName||"none"}function l2(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function lr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=i2({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r,i=Ge(n),a=u.useCallback(d=>{if(s){const m=typeof d=="function"?d(e):d;m!==e&&i(m)}else o(d)},[s,e,o,i]);return[l,a]}function i2({defaultProp:e,onChange:t}){const n=u.useState(e),[r]=n,o=u.useRef(r),s=Ge(t);return u.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var a2="VisuallyHidden",Gu=u.forwardRef((e,t)=>c.jsx(Q.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Gu.displayName=a2;var c2=Gu,[Xi]=Gt("Tooltip",[cr]),Zi=cr(),xh="TooltipProvider",u2=700,Dc="tooltip.open",[d2,Uu]=Xi(xh),Ch=e=>{const{__scopeTooltip:t,delayDuration:n=u2,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,[l,i]=u.useState(!0),a=u.useRef(!1),d=u.useRef(0);return u.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),c.jsx(d2,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:u.useCallback(f=>{a.current=f},[]),disableHoverableContent:o,children:s})};Ch.displayName=xh;var Ki="Tooltip",[f2,Us]=Xi(Ki),ko=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:s,disableHoverableContent:l,delayDuration:i}=e,a=Uu(Ki,e.__scopeTooltip),d=Zi(t),[f,m]=u.useState(null),p=Lt(),h=u.useRef(0),y=l??a.disableHoverableContent,g=i??a.delayDuration,v=u.useRef(!1),[b=!1,w]=lr({prop:r,defaultProp:o,onChange:k=>{k?(a.onOpen(),document.dispatchEvent(new CustomEvent(Dc))):a.onClose(),s?.(k)}}),x=u.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),_=u.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),C=u.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),E=u.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},g)},[g,w]);return u.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),c.jsx(Yi,{...d,children:c.jsx(f2,{scope:t,contentId:p,open:b,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:u.useCallback(()=>{a.isOpenDelayed?E():_()},[a.isOpenDelayed,E,_]),onTriggerLeave:u.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:_,onClose:C,disableHoverableContent:y,children:n})})};ko.displayName=Ki;var Oc="TooltipTrigger",So=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Us(Oc,n),s=Uu(Oc,n),l=Zi(n),i=u.useRef(null),a=se(t,i,o.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),m=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(Gs,{asChild:!0,...l,children:c.jsx(Q.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:a,onPointerMove:z(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:z(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:z(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:z(e.onBlur,o.onClose),onClick:z(e.onClick,o.onClose)})})});So.displayName=Oc;var Yu="TooltipPortal",[m2,p2]=Xi(Yu,{forceMount:void 0}),Eo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Us(Yu,t);return c.jsx(m2,{scope:t,forceMount:n,children:c.jsx(Ke,{present:n||s.open,children:c.jsx(_o,{asChild:!0,container:o,children:r})})})};Eo.displayName=Yu;var mo="TooltipContent",Ro=u.forwardRef((e,t)=>{const n=p2(mo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,l=Us(mo,e.__scopeTooltip);return c.jsx(Ke,{present:r||l.open,children:l.disableHoverableContent?c.jsx(_h,{side:o,...s,ref:t}):c.jsx(h2,{side:o,...s,ref:t})})}),h2=u.forwardRef((e,t)=>{const n=Us(mo,e.__scopeTooltip),r=Uu(mo,e.__scopeTooltip),o=u.useRef(null),s=se(t,o),[l,i]=u.useState(null),{trigger:a,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,p=u.useCallback(()=>{i(null),m(!1)},[m]),h=u.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},w=b2(b,v.getBoundingClientRect()),x=w2(b,w),_=x2(g.getBoundingClientRect()),C=_2([...x,..._]);i(C),m(!0)},[m]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(a&&f){const y=v=>h(v,f),g=v=>h(v,a);return a.addEventListener("pointerleave",y),f.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",g)}}},[a,f,h,p]),u.useEffect(()=>{if(l){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},w=a?.contains(v)||f?.contains(v),x=!C2(b,l);w?p():x&&(p(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[a,f,l,d,p]),c.jsx(_h,{...e,ref:s})}),[g2,y2]=Xi(Ki,{isInside:!1}),_h=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:l,...i}=e,a=Us(mo,n),d=Zi(n),{onClose:f}=a;return u.useEffect(()=>(document.addEventListener(Dc,f),()=>document.removeEventListener(Dc,f)),[f]),u.useEffect(()=>{if(a.trigger){const m=p=>{const h=p.target;h?.contains(a.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[a.trigger,f]),c.jsx(wo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:c.jsxs(Vi,{"data-state":a.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Kp,{children:r}),c.jsx(g2,{scope:n,isInside:!0,children:c.jsx(c2,{id:a.contentId,role:"tooltip",children:o||r})})]})})});Ro.displayName=mo;var kh="TooltipArrow",v2=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zi(n);return y2(kh,n).isInside?null:c.jsx(Hi,{...o,...r,ref:t})});v2.displayName=kh;function b2(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function w2(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function x2(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function C2(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const i=t[s].x,a=t[s].y,d=t[l].x,f=t[l].y;a>r!=f>r&&n<(d-i)*(r-a)/(f-a)+i&&(o=!o)}return o}function _2(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),k2(t)}function k2(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],l=n[n.length-2];if((s.x-l.x)*(o.y-l.y)>=(s.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var jo=ko,To=So,Lo=Eo,Mo=Ro;const Ut=u.createContext({source:{name:"",schema:{fields:[]}},rootQuery:void 0,setQuery:()=>{},query:void 0});function Sh(e,t){return u.useMemo(()=>{if(typeof t!="string")return new Y.ASTQuery({query:t,source:e})},[e,t])}const Eh=u.createContext({focusMainView:()=>{},isMainViewFocused:!0,focusNestView:()=>{},isNestViewFocused:()=>!1,focusedNestView:null});function S2({rootQuery:e,focusedNestViewPath:t,onFocusedNestViewPathChange:n,children:r}){const o=u.useMemo(()=>{if(t.length===0)return null;if(e){const d=e.definition;if(d instanceof Y.ASTArrowQueryDefinition)return Xl(d.view,[...t].reverse())}return null},[e,t]),s=u.useCallback(()=>{n([])},[n]),l=u.useCallback(d=>{n([...d])},[n]),i=u.useCallback(d=>JSON.stringify(d)===JSON.stringify(t),[t]),a=t.length===0;return c.jsx(Eh.Provider,{value:{focusMainView:s,isMainViewFocused:a,focusNestView:l,isNestViewFocused:i,focusedNestView:o},children:r})}function Ys(){return u.useContext(Eh)}const Xl=(e,t)=>{if(t.length===0)return null;if(e instanceof Y.ASTArrowViewDefinition)return Xl(e.view,t);if(e instanceof Y.ASTSegmentViewDefinition){const n=t.pop(),r=e.operations.items.find(o=>o instanceof Y.ASTNestViewOperation&&o.name===n);return r===void 0?(t.push(n),null):t.length===0?r.view:Xl(r.view.definition,t)}return e instanceof Y.ASTRefinementViewDefinition?Xl(e.refinement,t):null},Rh=u.createContext({updateQuery:()=>{console.warn("Missing <MalloyExplorerProvider>")}});function De(){const{updateQuery:e}=u.useContext(Rh);return e}const jh=u.createContext({});function Th(){const{topValues:e}=u.useContext(jh);return e}const Lh={primary:"var(--mly231nev)",link:"var(--mly883cce)"},E2={$$css:!0,mly16bcggl:"mly4f1hfu mly16bcggl"},R2={$$css:!0,mly182du4u:"mly74xrg6 mly182du4u"},j2={$$css:!0,mlyacbved:"mly1gnh9hh mlyacbved"},T2={$$css:!0,mly112oox9:"mlyfg9r64 mly112oox9"},L2=[E2,R2,j2,T2],Me=u.createContext({});function LP({source:e,query:t,onQueryChange:n=()=>{},focusedNestViewPath:r,onFocusedNestViewPathChange:o,children:s,topValues:l,onDrill:i,theme:a,dark:d,onDownload:f}){const m=Sh(e,t),p=u.useCallback(()=>{n?.(m?.build())},[n,m]);return!a&&d&&(a=L2),c.jsx(Ch,{children:c.jsx(S2,{rootQuery:m,focusedNestViewPath:r,onFocusedNestViewPathChange:o,children:c.jsx(Rh.Provider,{value:{updateQuery:p},children:c.jsx(jh.Provider,{value:{topValues:l},children:c.jsx(Ut.Provider,{value:{source:e,rootQuery:m,setQuery:n,onDrill:i,onDownload:f,query:t},children:c.jsx(Me.Provider,{value:{theme:a,dark:d},children:s})})})})})})}var Zo={},Qf;function M2(){if(Qf)return Zo;Qf=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.styleq=void 0;var e=new WeakMap,t="$$css";function n(o){var s,l,i;return o!=null&&(s=o.disableCache===!0,l=o.disableMix===!0,i=o.transform),function(){for(var d=[],f="",m=null,p=s?null:e,h=new Array(arguments.length),y=0;y<arguments.length;y++)h[y]=arguments[y];for(;h.length>0;){var g=h.pop();if(!(g==null||g===!1)){if(Array.isArray(g)){for(var v=0;v<g.length;v++)h.push(g[v]);continue}var b=i!=null?i(g):g;if(b.$$css){var w="";if(p!=null&&p.has(b)){var x=p.get(b);x!=null&&(w=x[0],d.push.apply(d,x[1]),p=x[2])}else{var _=[];for(var C in b){var E=b[C];C!==t&&(typeof E=="string"||E===null?d.includes(C)||(d.push(C),p!=null&&_.push(C),typeof E=="string"&&(w+=w?" "+E:E)):console.error("styleq: ".concat(C," typeof ").concat(String(E),' is not "string" or "null".')))}if(p!=null){var k=new WeakMap;p.set(b,[w,_,k]),p=k}}w&&(f=f?w+" "+f:w)}else if(l)m==null&&(m={}),m=Object.assign({},b,m);else{var R=null;for(var j in b){var M=b[j];M!==void 0&&(d.includes(j)||(M!=null&&(m==null&&(m={}),R==null&&(R={}),R[j]=M),d.push(j),p=null))}R!=null&&(m=Object.assign(R,m))}}}var D=[f,m];return D}}var r=n();return Zo.styleq=r,r.factory=n,Zo}var Mh=M2();const Lr=e=>new Error(`'stylex.${e}' should never be called at runtime. It should be compiled away by '@stylexjs/babel-plugin'`),ht=e=>Lr(`types.${e}`);function Vu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,o]=Mh.styleq(t),s={};return r!=null&&r!==""&&(s.className=r),o!=null&&Object.keys(o).length>0&&(s.style=o),s}function A2(){const{className:e,style:t}=Vu(...arguments),n={};return e!=null&&e!==""&&(n.class=e),t!=null&&Object.keys(t).length>0&&(n.style=Object.keys(t).map(r=>`${r}:${t[r]};`).join("")),n}function I2(e){throw Lr("create")}function P2(e){throw Lr("defineVars")}const D2=(e,t)=>{throw Lr("createTheme")},O2=e=>{throw Lr("include")},N2=I2,$2=P2,z2=D2,F2=O2,B2={angle:e=>{throw ht("angle")},color:e=>{throw ht("color")},url:e=>{throw ht("url")},image:e=>{throw ht("image")},integer:e=>{throw ht("integer")},lengthPercentage:e=>{throw ht("lengthPercentage")},length:e=>{throw ht("length")},percentage:e=>{throw ht("percentage")},number:e=>{throw ht("number")},resolution:e=>{throw ht("resolution")},time:e=>{throw ht("time")},transformFunction:e=>{throw ht("transformFunction")},transformList:e=>{throw ht("transformList")}},q2=e=>{throw Lr("keyframes")},W2=function(){throw Lr("firstThatWorks")};function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r]=Mh.styleq(t);return r}S.props=Vu;S.attrs=A2;S.create=N2;S.defineVars=$2;S.createTheme=z2;S.include=F2;S.keyframes=q2;S.firstThatWorks=W2;S.types=B2;const Ln={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mlya26k3e",backgroundColor:"mly1pcjto7",maxWidth:"mlyxc7z9f",boxShadow:"mly8dadwf",zIndex:"mlyhtitgo",$$css:!0},card:{width:"mly1g65f5b",maxHeight:"mly1kbvuzt",backgroundColor:"mly1yduej5",boxShadow:"mly8dadwf",zIndex:"mlyhtitgo",$$css:!0}},F={largeBody:{fontFamily:"mly1rj5sg5",color:"mly1ue28sr",fontWeight:"mlyo1l8bm",fontSize:"mly1j61zf2",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},emphasized:{fontFamily:"mly1rj5sg5",color:"mly1ue28sr",fontWeight:"mly1xlr1w8",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly1gu5id8",$$css:!0},body:{fontFamily:"mly1rj5sg5",color:"mly1ue28sr",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},link:{fontFamily:"mly1rj5sg5",color:"mly17rwmdj",fontWeight:"mlyo1l8bm",fontSize:"mlyif65rj",lineHeight:"mly1fc57z9",letterSpacing:"mly12oo3zp",$$css:!0},supporting:{fontFamily:"mly1rj5sg5",color:"mly1ue28sr",fontWeight:"mlyo1l8bm",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly12oo3zp",$$css:!0},badge:{fontFamily:"mly1rj5sg5",color:"mly183j0n7",fontWeight:"mly1s688f",fontSize:"mlyfifm61",lineHeight:"mly1d3mw78",letterSpacing:"mly1gu5id8",$$css:!0},tooltipText:{fontFamily:"mly1rj5sg5",color:"mlya26k3e",fontSize:"mlyif65rj",fontStyle:"mly1j61x8r",fontWeight:"mlyo1l8bm",lineHeight:"mly1fc57z9",$$css:!0}},G2=e=>u.createElement("svg",{width:110,height:110,viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"cahevron_down",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-180.000000) translate(-55.000000, -55.000005) "}))),U2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"chevron_left",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-90.000000) translate(-55.000000, -55.000005) "}))),Y2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"chevron_right",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z",id:"Path",fill:"currentColor",fillRule:"nonzero",transform:"translate(55.000000, 55.000005) rotate(-270.000000) translate(-55.000000, -55.000005) "}))),V2=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24,...e},u.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),u.createElement("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Ah=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"query_clear_hover",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("circle",{className:"circle hoverfill",fill:"transparent",cx:55,cy:55,r:55}),u.createElement("path",{d:"M78.1428571,25 L85,31.8571429 L61.857,55 L85,78.1428571 L78.1428571,85 L55,61.857 L31.8571429,85 L25,78.1428571 L48.142,55 L25,31.8571429 L31.8571429,25 L55,48.143 L78.1428571,25 Z",className:"cross primaryfill",fill:"currentColor"}))),H2=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},u.createElement("path",{d:"M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"})),X2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"query_add",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M75.8285714,28 L82,34.1714286 L61.171,55 L82,75.8285714 L75.8285714,82 L54.999,61.171 L34.1714286,82 L28,75.8285714 L48.828,55 L28,34.1714286 L34.1714286,28 L55,48.829 L75.8285714,28 Z",id:"Combined-Shape-Copy",fill:"currentColor",transform:"translate(55.000000, 55.000000) rotate(-315.000000) translate(-55.000000, -55.000000) ",className:"primaryfill"}))),Z2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_measure",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M64.4079772,43.4952662 C64.4079772,65.775216 64.4079772,77.6781315 64.4079772,79.2040126 C64.4079772,81.4928343 72.4309475,81.4935567 72.4309475,79.2040126 C72.4309475,77.6776499 72.4309475,65.7747344 72.4309475,43.4952662 L82.1242499,53.5032288 C82.9082803,54.3127101 83.9390395,54.7167092 84.9596343,54.7167092 C85.980229,54.7167092 87.0118722,54.3119686 87.7950187,53.5032288 C89.3623612,51.8850077 89.3623612,49.2552488 87.7950187,47.6371608 L71.2655269,30.5703346 C70.8943747,30.1871342 70.4404886,29.8781937 69.9456129,29.6650532 C69.9247535,29.6546561 69.9046123,29.6546561 69.883753,29.6435167 C69.4298852,29.4519166 68.9350096,29.3457171 68.4192709,29.3457171 C67.9035322,29.3457171 67.4086565,29.4519147 66.9547887,29.6435167 C66.9339294,29.6539139 66.9137882,29.6539139 66.8929288,29.6650532 C66.3980532,29.8781937 65.9441854,30.1863928 65.5730149,30.5703346 L49.0328429,47.6474271 C47.4655004,49.2656482 47.4655004,51.8954071 49.0328429,53.5134951 C50.6001855,55.1205753 53.1472623,55.1205753 54.714476,53.5023554 L64.4079772,43.4952662 Z",id:"Path-Copy-3",fill:"currentColor",className:"primaryfill",fillRule:"nonzero",transform:"translate(68.413931, 55.133308) rotate(-270.000000) translate(-68.413931, -55.133308) "}),u.createElement("rect",{id:"Rectangle-Copy-50",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 39.025784) rotate(-90.000000) translate(-32.019040, -39.025784) ",x:24.0122609,y:34.8667243,width:16.0135574,height:8.31811859}),u.createElement("rect",{id:"Rectangle-Copy-51",className:"primaryfill",fill:"currentColor",fillRule:"nonzero",transform:"translate(32.019040, 72.330197) rotate(-90.000000) translate(-32.019040, -72.330197) ",x:24.0122609,y:68.1711376,width:16.0135574,height:8.31811859}),u.createElement("circle",{id:"Oval-Copy-16",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 88.946306) rotate(-180.000000) translate(-32.019040, -88.946306) ",cx:32.0190396,cy:88.9463056,r:9.09652528}),u.createElement("circle",{id:"Oval-Copy-20",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",transform:"translate(32.019040, 55.133308) rotate(-90.000000) translate(-32.019040, -55.133308) ",cx:32.0190396,cy:55.1333084,r:9.09652528}),u.createElement("circle",{id:"Oval-Copy-21",className:"primarystroke",stroke:"currentColor",strokeWidth:7,fillRule:"nonzero",cx:32.0190396,cy:23.2007668,r:9.09652528}))),K2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_filter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M87.3843313,20.5 C88.0702245,20.5 88.6794354,20.684137 89.1839151,20.9924545 C89.72968,21.3260038 90.1536978,21.8060023 90.4194477,22.364077 C90.6824778,22.9164401 90.7905536,23.5453405 90.7077209,24.1843828 C90.641307,24.6967561 90.4522801,25.21669 90.1181537,25.7073778 L89.9660074,25.9157747 L65.9667297,54.9330833 L65.9667297,86.0952768 C65.9667297,87.3578277 65.3421199,88.3687734 64.46847,88.9512067 C64.0000984,89.2634544 63.4591929,89.4523731 62.9014864,89.49211 C62.4335638,89.5254497 61.9536386,89.4542406 61.4987219,89.2647425 L61.3053966,89.1762469 L45.2981054,81.501442 C44.7448345,81.2248066 44.1940182,80.794047 43.8075879,80.2144017 C43.516589,79.7779032 43.3168206,79.2579753 43.2760203,78.6543848 L43.268304,78.4241163 L43.268304,54.9330833 L19.2778986,25.9265022 C18.8405281,25.4244753 18.5999563,24.8470099 18.5253334,24.2601464 C18.4451968,23.6299215 18.5577673,22.9877736 18.8297244,22.4166636 C19.0989541,21.8512813 19.5239716,21.3563425 20.06756,21.0111708 C20.5069962,20.7321343 21.0239609,20.5500465 21.6001779,20.5088845 L21.8507024,20.5 L87.3843313,20.5 Z M80.4108174,26.9794004 L28.8312662,26.9794004 L49.2106529,51.6044926 L49.3557497,51.8317181 C49.767411,52.5135117 49.9668805,53.1962297 49.9668805,53.8764024 L49.9668805,53.8764024 L49.9668805,76.3587304 L59.2681532,80.9104171 L59.2681532,53.6572264 L59.2765596,53.4785743 C59.3429907,52.7639199 59.7932531,52.0547544 60.2732157,51.568472 L60.2732157,51.568472 L80.4108174,26.9794004 Z",id:"Shape-Copy-2",stroke:"currentColor",fill:"currentColor",className:"primaryfill primarystroke",fillRule:"nonzero"}))),Q2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_group_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M31.7463881,49.3114698 C32.6824928,49.3083801 33.6154932,49.1963884 34.5261904,48.9793527 L45.0010173,67.8024842 L45.0010173,67.8032565 C43.2956473,70.2493007 42.5480527,73.2367133 42.8986175,76.1988173 C43.2492613,79.1601303 44.6742783,81.890304 46.9033203,83.870708 C49.1330544,85.851903 52.0117188,86.9463056 54.9937928,86.9463056 C57.9758669,86.9463056 60.8545313,85.8518634 63.0834745,83.870708 C65.3132086,81.890304 66.7382058,79.1601303 67.0889682,76.1988173 C67.4396121,73.2369111 66.6919779,70.2493007 64.9865684,67.8032565 L75.4613953,48.980125 L75.4613953,48.9793527 C78.5099046,49.699958 81.7183727,49.2180056 84.4200741,47.6338999 C87.1225664,46.0505653 89.1106817,43.4862425 89.9717699,40.4749053 C90.8328581,37.4635681 90.5008399,34.235723 89.0449384,31.4630387 C87.5882658,28.6903544 85.1197206,26.584791 82.151685,25.5847028 C79.1834516,24.5837248 75.9441385,24.7652355 73.1066007,26.0913707 C70.2688652,27.4167347 68.0507969,29.7848559 66.9138836,32.7028673 L43.0841815,32.7028673 C42.0044302,29.9371034 39.9514417,27.6601133 37.310837,26.3015513 C34.6702324,24.9429696 31.623898,24.5961814 28.7454313,25.32606 C25.8669647,26.0559385 23.3534966,27.8122421 21.6791694,30.2652067 C20.0046839,32.7173803 19.284138,35.6972794 19.6532888,38.644554 C20.021708,41.5910378 21.4544362,44.3012413 23.6819162,46.2662229 C25.9086844,48.2303345 28.776474,49.3139413 31.7460915,49.3115686 L31.7463881,49.3114698 Z M54.9987359,80.3146003 C53.5304767,80.3146003 52.1224442,79.7314725 51.0836021,78.6934213 C50.0455509,77.6545989 49.4624231,76.2465862 49.4624231,74.7782874 C49.4624231,73.3099887 50.0455509,71.9019957 51.0836021,70.8639445 C52.1224245,69.8251221 53.5304372,69.2419944 54.9987359,69.2419944 C56.4670347,69.2419944 57.8750277,69.8251221 58.9138698,70.8639445 C59.951921,71.9019957 60.5350488,73.3099887 60.5350488,74.7782874 C60.5350488,76.2465862 59.951921,77.6545792 58.9138698,78.6934213 C57.8750474,79.7314725 56.4670347,80.3146003 54.9987359,80.3146003 Z M78.2510838,31.5953952 C79.7193431,31.5953952 81.1273755,32.1785229 82.1654268,33.2165742 C83.203478,34.2553966 83.7873769,35.6634093 83.7873769,37.131708 C83.7873769,38.6000068 83.203478,40.0079998 82.1654268,41.046051 C81.1273755,42.0848734 79.7193826,42.6680011 78.2510838,42.6680011 C76.7828246,42.6680011 75.3740012,42.0848734 74.33595,41.046051 C73.2978987,40.0079998 72.714771,38.6000068 72.714771,37.131708 C72.714771,35.6634093 73.2978987,34.2554163 74.33595,33.2165742 C75.3740012,32.1785229 76.7827851,31.5953952 78.2510838,31.5953952 Z M43.7166018,39.3459801 L66.2808701,39.3459801 C66.7149337,41.7696815 67.8734779,44.0047541 69.6028318,45.75738 L59.7591401,63.5727121 C56.7137943,62.2774614 53.2720118,62.2774614 50.2258752,63.5727121 L40.3380911,45.75738 C42.0882652,44.0118524 43.2661865,41.7758109 43.7156132,39.3459801 L43.7166018,39.3459801 Z M31.7465858,31.5953952 C33.214845,31.5953952 34.6236684,32.1785229 35.6617196,33.2165742 C36.6997709,34.2553966 37.2828986,35.6634093 37.2828986,37.131708 C37.2828986,38.6000068 36.6997709,40.0079998 35.6617196,41.046051 C34.6236684,42.0848734 33.2148846,42.6680011 31.7465858,42.6680011 C30.2783266,42.6680011 28.8702941,42.0848734 27.8322428,41.046051 C26.7941916,40.0079998 26.2102927,38.6000068 26.2102927,37.131708 C26.2102927,35.6634093 26.7941916,34.2554163 27.8322428,33.2165742 C28.8702941,32.1785229 30.278287,31.5953952 31.7465858,31.5953952 L31.7465858,31.5953952 Z",id:"Shape-Copy-3",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}))),J2=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_limit",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("rect",{id:"Rectangle-Copy-46",className:"primaryfill",fill:"currentColor",x:24,y:23,width:61.9377906,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-47",className:"primaryfill",fill:"currentColor",x:24,y:39,width:61.9377906,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-48",className:"primaryfill",fill:"currentColor",x:24,y:55,width:53.5,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-49",className:"primaryfill",fill:"currentColor",x:24,y:71.1904762,width:40,height:7.61904762,rx:3.80952381}),u.createElement("path",{d:"M77.1113683,65.3807638 L87.6203313,83.396129 C87.8986116,83.8731809 87.7374754,84.4854986 87.2604234,84.7637789 C87.1074874,84.8529916 86.933607,84.9 86.7565524,84.9 L65.7386264,84.9 C65.1863417,84.9 64.7386264,84.4522847 64.7386264,83.9 C64.7386264,83.7229454 64.7856348,83.549065 64.8748475,83.396129 L75.3838105,65.3807638 C75.6620908,64.9037119 76.2744085,64.7425757 76.7514604,65.020856 C76.9004641,65.1077747 77.0244495,65.2317602 77.1113683,65.3807638 Z",id:"Triangle-Copy-2",fill:"currentColor",className:"primaryfill",transform:"translate(76.247589, 74.400000) rotate(-90.000000) translate(-76.247589, -74.400000) "}))),eb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_nest",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M27.3181186,27 C29.5272576,27 31.3181186,28.790861 31.3181186,31 L31.318,59.317 L72.9431634,59.317258 L62.9360743,49.6237568 C61.3178543,48.0565431 61.3178543,45.5094664 62.9249345,43.9421238 C64.5430225,42.3747812 67.1727815,42.3747812 68.7910025,43.9421238 L68.7910025,43.9421238 L85.8680951,60.4822957 C86.2520369,60.8534663 86.560236,61.307334 86.7733764,61.8022097 C86.7845158,61.823069 86.7845158,61.8432103 86.7949129,61.8640696 C86.986515,62.3179374 87.0927126,62.812813 87.0927126,63.3285517 C87.0927126,63.8442904 86.9865131,64.3391661 86.7949129,64.7930338 C86.7837736,64.8138932 86.7837736,64.8340344 86.7733764,64.8548938 C86.560236,65.3497694 86.2512954,65.8036556 85.8680951,66.1748077 L85.8680951,66.1748077 L68.8012688,82.7042995 C67.1831809,84.2716421 64.5534219,84.2716421 62.9352009,82.7042995 C62.1264611,81.921153 61.7217204,80.8895099 61.7217204,79.8689151 C61.7217204,78.8483204 62.1257196,77.8175611 62.9352009,77.0335308 L62.9352009,77.0335308 L72.9431634,67.3402284 L27.234417,67.3402284 C25.2840646,67.3402284 23.6511005,66.037955 23.2100653,64.2817501 C23.0737364,63.8793045 23,63.4482633 23,63 L23,31 C23,28.790861 24.790861,27 27,27 L27.3181186,27 Z",id:"Combined-Shape-Copy",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),tb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"insert_order_by",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M30.5506412,37.7046734 L30.5506412,81.9762916 C30.5506412,84.1931505 32.3445678,85.9877768 34.5621264,85.9877768 C36.7789852,85.9877768 38.5736115,84.1938502 38.5736115,81.9762916 L38.5736115,37.7046734 L48.2669139,47.3979757 C49.0509443,48.1820061 50.0817035,48.5733031 51.1022983,48.5733031 C52.122893,48.5733031 53.1545362,48.1812879 53.9376827,47.3979757 C55.5050252,45.8306331 55.5050252,43.2835564 53.9376827,41.7163427 L37.4081909,25.1861143 C37.0370387,24.8149622 36.5831526,24.515735 36.0882769,24.3092959 C36.0674175,24.2992257 36.0472763,24.2992257 36.026417,24.2884366 C35.5725492,24.1028605 35.0776736,24 34.5619349,24 C34.0461961,24 33.5513205,24.1028586 33.0974527,24.2884366 C33.0765934,24.2985068 33.0564522,24.2985068 33.0355928,24.3092959 C32.5407172,24.515735 32.0868494,24.814244 31.7156789,25.1861143 L15.1755069,41.7262862 C13.6081644,43.2936288 13.6081644,45.8407055 15.1755069,47.4079192 C16.7428495,48.9644712 19.2899263,48.9644712 20.85714,47.3971298 L30.5506412,37.7046734 Z",id:"Path-Copy",fill:"currentColor",fillRule:"nonzero",className:"primaryfill"}),u.createElement("path",{d:"M79.9439284,72.2964315 L79.9439284,28.0137648 C79.9439284,25.796906 78.1500018,24.0022797 75.9324432,24.0022797 C73.7155844,24.0022797 71.920958,25.7962062 71.920958,28.0137648 L71.920958,72.2853831 L62.2276557,62.5920808 C60.6603131,61.0247382 58.1233641,61.0247382 56.5460227,62.5920808 C54.9786801,64.1594234 54.9786801,66.7065001 56.5460227,68.2737138 L73.0861946,84.8138857 C73.4573467,85.1850378 73.9112329,85.484265 74.4061086,85.6907041 C74.4269679,85.7007743 74.4471091,85.7007743 74.4679685,85.7115634 C74.9218362,85.8971395 75.4167119,86 75.9324506,86 C76.4481893,86 76.943065,85.8971414 77.3969327,85.7115634 C77.4177921,85.7014932 77.4379333,85.7014932 77.4587926,85.6907041 C77.9536683,85.484265 78.407536,85.185756 78.7787066,84.8138857 L95.3188785,68.2737138 C96.8862211,66.7063712 96.8862211,64.1592945 95.3188785,62.5920808 C93.7515359,61.0355288 91.2044592,61.0355288 89.6372455,62.6028702 L79.9439284,72.2964315 Z",id:"Path-Copy-2",className:"primaryfill",fill:"currentColor",fillRule:"nonzero"}))),nb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("title",null,"join_icon_one_to_many"),u.createElement("g",{id:"join_icon_one_to_many",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group",transform:"translate(12.759300, 12.500000) rotate(-180.000000) translate(-12.759300, -12.500000) translate(4.000000, 3.712487)",fill:"currentColor"},u.createElement("polygon",{id:"Path-Copy-15",fillRule:"nonzero",transform:"translate(6.382256, 8.736227) scale(-1, 1) rotate(180.000000) translate(-6.382256, -8.736227) ",points:"2.80570594 3.41828749 3.48860316 2.68777302 9.95880577 8.73622728 3.48860316 14.7846815 2.80570594 14.0541671 8.494 8.736"}),u.createElement("rect",{id:"Rectangle-Copy-91",transform:"translate(2.000000, 2.000000) scale(-1, 1) translate(-2.000000, -2.000000) ",x:0,y:0,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-92",transform:"translate(2.000000, 8.736227) scale(-1, 1) translate(-2.000000, -8.736227) ",x:0,y:6.73622728,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-86",transform:"translate(15.518600, 8.736227) scale(-1, 1) translate(-15.518600, -8.736227) ",x:13.5186005,y:6.73622728,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-87",transform:"translate(2.000000, 15.575026) scale(-1, 1) translate(-2.000000, -15.575026) ",x:0,y:13.5750258,width:4,height:4}),u.createElement("polygon",{id:"Line-3-Copy-68",fillRule:"nonzero",transform:"translate(8.495445, 8.736227) scale(-1, 1) translate(-8.495445, -8.736227) ",points:"14.9954453 8.23622728 14.9954453 9.23622728 1.99544525 9.23622728 1.99544525 8.23622728"})))),rb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("title",null,"join_icon_many_to_one"),u.createElement("g",{id:"join_icon_many_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("polygon",{id:"Path-Copy-14",fill:"currentColor",fillRule:"nonzero",transform:"translate(10.382256, 12.736227) scale(-1, 1) rotate(180.000000) translate(-10.382256, -12.736227) ",points:"6.80570594 7.41828749 7.48860316 6.68777302 13.9588058 12.7362273 7.48860316 18.7846815 6.80570594 18.0541671 12.494 12.736"}),u.createElement("rect",{id:"Rectangle-Copy-90",fill:"currentColor",x:4,y:4,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-84",fill:"currentColor",x:4,y:17.5750258,width:4,height:4}),u.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),ob=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("title",null,"join_icon_one_to_one"),u.createElement("g",{id:"join_icon_one_to_one",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("rect",{id:"Rectangle-Copy-89",fill:"currentColor",x:4,y:10.7362273,width:4,height:4}),u.createElement("rect",{id:"Rectangle-Copy-85",fill:"currentColor",x:17.5186005,y:10.7362273,width:4,height:4}),u.createElement("polygon",{id:"Line-3-Copy-67",fill:"currentColor",fillRule:"nonzero",points:"18.9954453 12.2362273 18.9954453 13.2362273 5.99544525 13.2362273 5.99544525 12.2362273"}))),sb=e=>u.createElement("svg",{width:"78px",height:"73px",viewBox:"-5 -10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("title",null,"database_b"),u.createElement("g",{id:"icons",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"database_b",transform:"translate(-0.000189, 0.800000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("g",{id:"Shape-2"},u.createElement("path",{d:"M38.9978747,0 C49.4323909,0 58.8817175,1.35601948 65.8935492,3.63769481 C69.399635,4.77856169 72.3064537,6.14483766 74.4415973,7.78792208 C76.5767408,9.43100649 78,11.4644805 78,13.7176948 L78,59.1428571 C77.5289095,61.1095617 75.9098694,63.0619481 74.4415973,64.2103247 C72.3064537,65.8534091 69.3994651,67.2213799 65.8935492,68.3623052 C58.8808682,70.6440097 49.4317114,72 38.9978747,72 C28.564038,72 19.1123333,70.6439805 12.0988029,68.3623052 C8.59271719,67.2214383 5.68589845,65.8534091 3.55075491,64.2103247 C1.77316722,62.6163312 0.466092472,61.0553571 0.000162359918,59.1428571 L0.000162359918,12.826461 C-0.00497251122,12.4857468 0.111806422,12.1513003 0.334077073,11.8687938 C0.867540225,10.3512127 2.01808874,8.96790097 3.55089079,7.78869643 C5.68603434,6.14561201 8.59302294,4.77924838 12.0989388,3.63846916 C19.1116199,1.35676461 28.562815,0.000774350649 38.9980106,0.000774350649 L38.9978747,0 Z M38.9980026,4.39968547 C29.1795807,4.39968547 20.2971169,5.97898133 14.0341392,8.43960024 C10.9023181,9.66989245 8.43317659,11.1339692 6.85248078,12.602151 C3.94393403,15.3862114 4.29446142,18.3655235 6.85248078,20.7802963 C8.43327627,22.2484263 10.9024843,23.7104505 14.0341392,24.9407772 C20.2982797,27.4014306 29.1795807,28.9827618 38.9980026,28.9827618 C48.8164245,28.9827618 57.7038721,27.4014306 63.968511,24.9407772 C67.1003321,23.710485 69.5714672,22.2484781 71.152163,20.7802963 C74.08729,18.0024452 73.4953805,14.8214996 71.152163,12.602151 C69.5713675,11.1340209 67.100166,9.66992695 63.968511,8.43960024 C57.705035,5.97894683 48.8172551,4.39968547 38.9980026,4.39968547 Z M73.3181233,24.4886668 C71.264963,26.4046321 68.5511168,28.0180283 65.3038377,29.3722628 C58.4452957,32.2325658 49.203832,33.9324103 38.9993316,33.9324103 C28.7948312,33.9324103 19.5508756,32.2325291 12.691503,29.3722628 C9.44422385,28.0179367 6.73170664,26.4046321 4.67921092,24.4886668 L4.67921092,34.5578783 C4.85118531,35.7254798 5.51373193,36.9581006 6.85314528,38.278818 C8.43394077,39.8377628 10.9031488,41.3838137 14.0348037,42.6902452 C20.2989442,45.3031082 29.1802452,46.9886668 38.9986671,46.9886668 C48.817089,46.9886668 57.7045366,45.3030899 63.9691755,42.6902452 C67.1009966,41.3838503 69.5721317,39.8378178 71.1528275,38.278818 C72.4811934,36.9688517 73.1398693,35.7461761 73.3189539,34.5871829 L73.3181233,24.4886668 Z M73.3181233,43.1016944 C71.264963,44.782251 68.5517813,46.1967717 65.3038377,47.3852582 C58.4452957,49.8941247 49.203832,51.3851147 38.9993316,51.3851147 C28.7948312,51.3851147 19.5508756,49.8940926 12.691503,47.3852582 C9.44422385,46.197334 6.73170664,44.7841788 4.67921092,43.1036222 L4.67921092,55.7057886 C4.85118531,56.7299305 5.51373193,57.811103 6.85314528,58.9695481 C8.43394077,60.3369502 10.9031488,61.6911148 14.0348037,62.8370291 C20.2989442,65.1288579 29.1802452,66.6016944 38.9986671,66.6016944 C48.817089,66.6016944 57.7045366,65.1288579 63.9691755,62.8370291 C67.1009966,61.6911469 69.5721317,60.3369984 71.1528275,58.9695481 C72.4811934,57.8205331 73.1398693,56.7480839 73.3189539,55.7314925 L73.3181233,43.1016944 Z",id:"Shape"}))))),Jf=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),lb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),em=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-string",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M4.8045,10.45 L5.2245,9.253 L7.1425,9.253 L7.5625,10.45 L8.6055,10.45 L6.7225,5.438 L5.6375,5.438 L3.7615,10.45 L4.8045,10.45 Z M6.8345,8.385 L5.5255,8.385 L5.9735,7.125 L6.1555,6.523 L6.2115,6.523 L6.3935,7.125 L6.8345,8.385 Z M10.2505,10.562 C10.4791667,10.562 10.681,10.5176667 10.856,10.429 C11.031,10.3403333 11.1721667,10.226 11.2795,10.086 L11.2795,10.086 L11.3355,10.086 L11.3355,10.45 L12.2385,10.45 L12.2385,8.252 C12.2385,7.76666667 12.0961667,7.398 11.8115,7.146 C11.5268333,6.894 11.1115,6.768 10.5655,6.768 C10.2575,6.768 9.97283333,6.82866667 9.7115,6.95 C9.45016667,7.07133333 9.23316667,7.244 9.0605,7.468 L9.0605,7.468 L9.6485,7.93 C9.75116667,7.804 9.88066667,7.7025 10.037,7.6255 C10.1933333,7.5485 10.3555,7.51 10.5235,7.51 C10.7708333,7.51 10.968,7.57066667 11.115,7.692 C11.262,7.81333333 11.3355,7.972 11.3355,8.168 L11.3355,8.168 L11.3355,8.322 C11.0741667,8.21466667 10.7591667,8.161 10.3905,8.161 C10.1245,8.161 9.88183333,8.21 9.6625,8.308 C9.44316667,8.406 9.2705,8.546 9.1445,8.728 C9.0185,8.91 8.9555,9.12 8.9555,9.358 C8.9555,9.71733333 9.07683333,10.0078333 9.3195,10.2295 C9.56216667,10.4511667 9.8725,10.562 10.2505,10.562 Z M10.4675,9.848 C10.2761667,9.848 10.1291667,9.8025 10.0265,9.7115 C9.92383333,9.6205 9.8725,9.50266667 9.8725,9.358 C9.8725,9.00333333 10.1105,8.826 10.5865,8.826 C10.8478333,8.826 11.0975,8.882 11.3355,8.994 C11.3355,9.22266667 11.2573333,9.42216667 11.101,9.5925 C10.9446667,9.76283333 10.7335,9.848 10.4675,9.848 Z",id:"Aa-Copy",fill:"currentColor",fillRule:"nonzero"}))),ib=e=>u.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{clipRule:"evenodd",d:"m2.5 2c-.27614 0-.5.22386-.5.5v10c0 .2761.22386.5.5.5h2c.27614 0 .5-.2239.5-.5s-.22386-.5-.5-.5h-1.5v-9h1.5c.27614 0 .5-.22386.5-.5s-.22386-.5-.5-.5zm8 0c-.2761 0-.5.22386-.5.5s.2239.5.5.5h1.5v9h-1.5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2c.2761 0 .5-.2239.5-.5v-10c0-.27614-.2239-.5-.5-.5zm-4.5 5h-1v1h1zm1 0h1v1h-1zm3 0h-1v1h1z",fill:"currentColor",fillRule:"evenodd"})),ab=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-on-off",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-Copy",transform:"translate(4.295444, 4.604157)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M1.61912392,3.08712961 L5.78998715,3.08712961 C6.6842046,3.08712961 7.40911107,2.39605211 7.40911107,1.54356481 C7.40911107,0.691077503 6.6842046,0 5.78998715,0 L1.61912392,0 C0.724906472,0 0,0.691077503 0,1.54356481 C0,2.39605211 0.724906472,3.08712961 1.61912392,3.08712961 Z M1.61912392,0.617425922 L5.78998715,0.617425922 C6.32651762,0.617425922 6.7614615,1.03207242 6.7614615,1.54356481 C6.7614615,2.05505719 6.32651762,2.46970369 5.78998715,2.46970369 L1.61912392,2.46970369 C1.08259345,2.46970369 0.647649569,2.05505719 0.647649569,1.54356481 C0.647649569,1.03207242 1.08259345,0.617425922 1.61912392,0.617425922 Z",id:"Shape-Copy-20"}),u.createElement("path",{d:"M1.83745135,2.13685198 C2.08762004,2.13888594 2.31428875,1.98975367 2.4114368,1.75920941 C2.50858486,1.52866515 2.45700749,1.2622842 2.28082919,1.08466199 C2.10465088,0.907039785 1.83869956,0.853289683 1.60736972,0.948552441 C1.37603988,1.0438152 1.22505383,1.26925874 1.22505383,1.51943543 C1.22505383,1.85847446 1.49842318,2.13409557 1.83745135,2.13685198 L1.83745135,2.13685198 Z",id:"Path-Copy-14"}),u.createElement("path",{d:"M5.78998714,3.70455553 L1.6191239,3.70455553 C0.724906454,3.70455553 0,4.39563305 0,5.24812034 C0,6.10060763 0.724906454,6.79168514 1.6191239,6.79168514 L5.78998714,6.79168514 C6.68420459,6.79168514 7.40911107,6.10060764 7.40911107,5.24812034 C7.40911107,4.39563304 6.68420459,3.70455553 5.78998714,3.70455553 L5.78998714,3.70455553 Z M5.78998714,6.17425922 L1.6191239,6.17425922 C1.08259342,6.17425922 0.647649538,5.75961272 0.647649538,5.24812034 C0.647649538,4.73662796 1.08259342,4.32198146 1.6191239,4.32198146 L5.78998714,4.32198146 C6.32651761,4.32198146 6.7614615,4.73662796 6.7614615,5.24812034 C6.7614615,5.75961272 6.32651761,6.17425922 5.78998714,6.17425922 L5.78998714,6.17425922 Z",id:"Shape-Copy-21"}),u.createElement("path",{d:"M5.54392378,4.67774545 C5.2937551,4.6757115 5.06708639,4.82484377 4.96993833,5.05538803 C4.87279028,5.28593228 4.92436765,5.55231324 5.10054595,5.72993544 C5.27672426,5.90755765 5.54267558,5.96130775 5.77400542,5.86604499 C6.00533526,5.77078224 6.15632131,5.5453387 6.15632131,5.295162 C6.15632131,4.95612297 5.88295196,4.68050187 5.54392378,4.67774545 Z",id:"Path-Copy-15"})))),cb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-date",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-Copy-22",transform:"translate(4.753763, 4.094719)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M5.84322609,0.649247344 L5.51860242,0.649247344 L5.51860242,0 L4.86935508,0 L4.86935508,0.649247344 L1.62311836,0.649247344 L1.62311836,0 L0.973871015,0 L0.973871015,0.649247344 L0.649247344,0.649247344 C0.292161305,0.649247344 0,0.941408648 0,1.29849469 L0,6.49247344 C0,6.84955947 0.292161305,7.14172078 0.649247344,7.14172078 L5.84322609,7.14172078 C6.20031213,7.14172078 6.49247344,6.84955947 6.49247344,6.49247344 L6.49247344,1.29849469 C6.49247344,0.941408648 6.20031213,0.649247344 5.84322609,0.649247344 Z M5.84322609,6.49247344 L0.649247344,6.49247344 L0.649247344,2.2723657 L5.84322609,2.2723657 L5.84322609,6.49247344 Z",id:"Shape"})))),ub=e=>u.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("g",{clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"},u.createElement("path",{d:"m3 3.5c0-.82843.67157-1.5 1.5-1.5h1c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1c-.27614 0-.5.22386-.5.5v2.88197c0 .43292-.18638.83753-.49993 1.11803.31355.2805.49993.68511.49993 1.11803v2.88197c0 .2761.22386.5.5.5h1c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.82843 0-1.5-.6716-1.5-1.5v-2.88197c0-.18938-.107-.36251-.27639-.44721l-.44722-.22361c-.16939-.08469-.27639-.25782-.27639-.44721s.107-.36252.27639-.44721l.44722-.22361c.16939-.0847.27639-.25783.27639-.44721z"}),u.createElement("path",{d:"m12 3.5c0-.82843-.6716-1.5-1.5-1.5h-1c-.27614 0-.5.22386-.5.5s.22386.5.5.5h1c.2761 0 .5.22386.5.5v2.88197c0 .43292.1864.83753.4999 1.11803-.3135.2805-.4999.68511-.4999 1.11803v2.88197c0 .2761-.2239.5-.5.5h-1c-.27614 0-.5.2239-.5.5s.22386.5.5.5h1c.8284 0 1.5-.6716 1.5-1.5v-2.88197c0-.18938.107-.36251.2764-.44721l.4472-.22361c.1694-.08469.2764-.25782.2764-.44721s-.107-.36252-.2764-.44721l-.4472-.22361c-.1694-.0847-.2764-.25783-.2764-.44721z"}))),db=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"2.5 2.5 11 11",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M12,7 L12,6 L10,6 L10,4 L9,4 L9,6 L7,6 L7,4 L6,4 L6,6 L4,6 L4,7 L6,7 L6,9 L4,9 L4,10 L6,10 L6,12 L7,12 L7,10 L9,10 L9,12 L10,12 L10,10 L12,10 L12,9 L10,9 L10,7 L12,7 Z M9,9 L7,9 L7,7 L9,7 L9,9 Z",id:"Shape-Copy-21",fill:"currentColor",fillRule:"nonzero"}))),fb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z M10.336,5 L5.663,5 L5.663,10.191 L8,8.72623637 L10.336,10.191 L10.336,5 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),mb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"3.5 3.5 9 9",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"type-icon-projection",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M11.3362588,4 L11.3362588,12 L8,9.90676786 L4.6637412,12 L4.6637412,4 L11.3362588,4 Z",id:"Rectangle",fill:"currentColor",className:"primaryfill",fillRule:"nonzero"}))),pb=e=>u.createElement("svg",{fill:"none",height:110,viewBox:"1 1 12.5 12.5",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{clipRule:"evenodd",d:"m2 5.5c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5s-.22386.5-.5.5h-1.5v1h1.5c.27614 0 .5.22386.5.5v2c0 .27614-.22386.5-.5.5h-2c-.27614 0-.5-.22386-.5-.5s.22386-.5.5-.5h1.5v-1h-1.5c-.27614 0-.5-.22386-.5-.5zm4 0c0-.27614.22386-.5.5-.5h2c.27614 0 .5.22386.5.5v4.5h.5c.27614 0 .5.2239.5.5s-.22386.5-.5.5h-1c-.27614 0-.5-.2239-.5-.5v-.5h-1.5c-.27614 0-.5-.22386-.5-.5zm2 3.5h-1v-3h1zm2.5-4c.2761 0 .5.22386.5.5v3.5h1.5c.2761 0 .5.22386.5.5s-.2239.5-.5.5h-2c-.2761 0-.5-.22386-.5-.5v-4c0-.27614.2239-.5.5-.5z",fill:"currentColor",fillRule:"evenodd"})),hb=e=>u.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("g",{fill:"currentColor"},u.createElement("path",{d:"m4.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),u.createElement("path",{d:"m8.5 7.5c0 .55228-.44772 1-1 1s-1-.44772-1-1 .44772-1 1-1 1 .44772 1 1z"}),u.createElement("path",{d:"m11.5 8.5c.5523 0 1-.44772 1-1s-.4477-1-1-1-1 .44772-1 1 .4477 1 1 1z"}))),gb=e=>u.createElement("svg",{fill:"none",height:110,viewBox:"3 3 9 9",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{clipRule:"evenodd",d:"m4.74513 11.5809 6.48017-3.64512c.3398-.19115.3398-.68043 0-.87158l-6.48017-3.64507c-.3333-.18749-.74513.05337-.74513.43578v7.29019c0 .3824.41183.6232.74513.4358zm.25487-6.87106v5.58026l4.96027-2.79011z",fill:"currentColor",fillRule:"evenodd"})),yb=e=>u.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),u.createElement("circle",{cx:8,cy:8,r:4,fill:"#FFFFFF"})),vb=e=>u.createElement("svg",{height:16,viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"}),u.createElement("circle",{cx:8,cy:8,r:7,fill:"#FFFFFF"})),bb=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},u.createElement("path",{d:"m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z"})),wb=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},u.createElement("path",{d:"m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),xb=e=>u.createElement("svg",{fill:"none",height:15,viewBox:"0 0 15 15",width:15,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("g",{clipRule:"evenodd",fill:"#151515",fillRule:"evenodd"},u.createElement("path",{d:"m10 7.50001c0 1.38072-1.11928 2.49999-2.49999 2.49999s-2.5-1.11927-2.5-2.49999c0-1.38071 1.11929-2.5 2.5-2.5s2.49999 1.11929 2.49999 2.5zm-.99999 0c0 .82843-.67157 1.5-1.5 1.5-.82842 0-1.5-.67157-1.5-1.5 0-.82842.67158-1.5 1.5-1.5.82843 0 1.5.67158 1.5 1.5z"}),u.createElement("path",{d:"m8.92908 3.05724c-.34403-1.52302-2.5141-1.52302-2.85813 0-.07078.31333-.43034.46227-.70195.29076-1.3202-.83367-2.85467.7008-2.021 2.021.17151.27161.02257.63117-.29076.70195-1.52302.34403-1.52302 2.5141 0 2.85813.31333.07077.46227.43034.29076.70195-.83367 1.32017.7008 2.85467 2.021 2.02097.27161-.1715.63117-.0225.70195.2908.34403 1.523 2.5141 1.523 2.85813 0 .07077-.3133.43034-.4623.70195-.2908 1.32017.8337 2.85467-.7008 2.02097-2.02097-.1715-.27161-.0225-.63118.2908-.70195 1.523-.34403 1.523-2.5141 0-2.85813-.3133-.07078-.4623-.43034-.2908-.70195.8337-1.3202-.7008-2.85467-2.02097-2.021-.27161.17151-.63118.02257-.70195-.29076zm-1.8827.22034c.1092-.48347.79806-.48347.90727 0 .22296.98707 1.35568 1.45625 2.21135.91595.419-.26464.9061.22246.6415.64154-.5403.85562-.0711 1.98834.916 2.21131.4834.1092.4834.79806 0 .90727-.9871.22296-1.4563 1.35568-.916 2.21135.2646.419-.2225.9061-.6415.6415-.85567-.5403-1.98839-.0711-2.21135.916-.10921.4834-.79807.4834-.90727 0-.22297-.9871-1.35569-1.4563-2.21131-.916-.41908.2646-.90618-.2225-.64154-.6415.5403-.85567.07112-1.98839-.91595-2.21135-.48347-.10921-.48347-.79807 0-.90727.98707-.22297 1.45625-1.35569.91595-2.21131-.26464-.41908.22246-.90618.64154-.64154.85562.5403 1.98834.07112 2.21131-.91595z"}))),Cb=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},u.createElement("path",{d:"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})),_b=e=>u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},u.createElement("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z"})),kb=e=>u.createElement("svg",{height:20,viewBox:"0 0 20 20",width:20,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("g",{fill:"none",stroke:"currentColor"},u.createElement("path",{d:"m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42",strokeWidth:1.1}),u.createElement("path",{d:"m9.9 2 2.89 2.89-3 3.01"}))),Sb=e=>u.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",stroke:"none",...e},u.createElement("path",{fill:"currentColor",stroke:"none",d:"m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z"}),u.createElement("path",{fill:"currentColor",d:"m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z"}),u.createElement("path",{fill:"currentColor",d:"m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z"}),u.createElement("path",{fill:"currentColor",d:"m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z"})),Eb=e=>u.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 80 80",fill:"currentColor",...e},u.createElement("g",null,u.createElement("path",{d:"M19.5833333,78.3333333 L74.4166667,78.3333333 L74.4166667,70.5 L19.5833333,70.5 L19.5833333,78.3333333 Z M74.4166667,35.25 L58.75,35.25 L58.75,11.75 L35.25,11.75 L35.25,35.25 L19.5833333,35.25 L47,62.6666667 L74.4166667,35.25 Z",fillRule:"nonzero",fill:"var(--vscode-icon-foreground)"}))),Rb=e=>u.createElement("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{d:"m11 8h10m-10 0c0 1.65685-1.34315 3-3 3s-3-1.34315-3-3m6 0c0-1.65685-1.34315-3-3-3s-3 1.34315-3 3m0 0h-2m10 8h-10m10 0c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-6 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3m0 0h2",stroke:"currentColor",strokeWidth:1.5})),tm=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_bar_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-3",transform:"translate(20.000000, 24.000000)",fill:"currentColor"},u.createElement("g",{id:"Group-2",transform:"translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)"},u.createElement("path",{d:"M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z",id:"Rectangle-Copy-59",transform:"translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) "}),u.createElement("path",{d:"M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z",id:"Rectangle-Copy-62",transform:"translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) "}),u.createElement("path",{d:"M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z",id:"Rectangle-Copy-66",transform:"translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) "}),u.createElement("path",{d:"M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z",id:"Rectangle-Copy-67",transform:"translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) "}))))),jb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_boolean",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"noun_switch_3350414-2",transform:"translate(20.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("g",{id:"noun_switch_3350414"},u.createElement("path",{d:"M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z",id:"Shape"}),u.createElement("path",{d:"M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z",id:"Path"}),u.createElement("path",{d:"M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z",id:"Shape"}),u.createElement("path",{d:"M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z",id:"Path"}))))),Tb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_column_chart",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group",transform:"translate(23.500000, 19.500000)",fill:"currentColor"},u.createElement("path",{d:"M-26.5,30.5 L35.5,30.5 C37.709139,30.5 39.5,32.290861 39.5,34.5 L39.5,35.5 C39.5,37.709139 37.709139,39.5 35.5,39.5 L-26.5,39.5 C-28.709139,39.5 -30.5,37.709139 -30.5,35.5 L-30.5,34.5 C-30.5,32.290861 -28.709139,30.5 -26.5,30.5 Z",id:"Rectangle-Copy-59",transform:"translate(4.500000, 35.000000) rotate(-90.000000) translate(-4.500000, -35.000000) "}),u.createElement("path",{d:"M-0.5,38.5 L45.5,38.5 C47.709139,38.5 49.5,40.290861 49.5,42.5 L49.5,43.5 C49.5,45.709139 47.709139,47.5 45.5,47.5 L-0.5,47.5 C-2.709139,47.5 -4.5,45.709139 -4.5,43.5 L-4.5,42.5 C-4.5,40.290861 -2.709139,38.5 -0.5,38.5 Z",id:"Rectangle-Copy-62",transform:"translate(22.500000, 43.000000) rotate(-90.000000) translate(-22.500000, -43.000000) "}),u.createElement("path",{d:"M23.5,45.5 L57.5,45.5 C59.709139,45.5 61.5,47.290861 61.5,49.5 L61.5,50.5 C61.5,52.709139 59.709139,54.5 57.5,54.5 L23.5,54.5 C21.290861,54.5 19.5,52.709139 19.5,50.5 L19.5,49.5 C19.5,47.290861 21.290861,45.5 23.5,45.5 Z",id:"Rectangle-Copy-66",transform:"translate(40.500000, 50.000000) rotate(-90.000000) translate(-40.500000, -50.000000) "}),u.createElement("path",{d:"M47.5,50.5 L70.5,50.5 C72.709139,50.5 74.5,52.290861 74.5,54.5 L74.5,55.5 C74.5,57.709139 72.709139,59.5 70.5,59.5 L47.5,59.5 C45.290861,59.5 43.5,57.709139 43.5,55.5 L43.5,54.5 C43.5,52.290861 45.290861,50.5 47.5,50.5 Z",id:"Rectangle-Copy-67",transform:"translate(59.000000, 55.000000) rotate(-90.000000) translate(-59.000000, -55.000000) "})))),Lb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_currency",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group",transform:"translate(19.000000, 19.000000)"},u.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:36,cy:36,r:32.5}),u.createElement("path",{d:"M35.7525,20.06 C38.5425,20.06 40.7775,20.7425 42.4575,22.1075 C44.1375,23.4725 45.2775,25.01 45.8775,26.72 L41.4225,28.61 C41.1225,27.53 40.4925,26.6 39.5325,25.82 C38.5725,25.04 37.3275,24.65 35.7975,24.65 C34.3275,24.65 33.0825,25.04 32.0625,25.82 C31.0425,26.6 30.5325,27.59 30.5325,28.79 C30.5325,29.9 30.99,30.8225 31.905,31.5575 C32.759,32.2435 34.0507333,32.8968333 35.7802,33.5175 L38.2275,34.37 C40.9875,35.33 43.1175,36.575 44.6175,38.105 C46.1175,39.635 46.8675,41.675 46.8675,44.225 C46.8675,46.325 46.335,48.0875 45.27,49.5125 C44.205,50.9375 42.84,51.995 41.175,52.685 C39.51,53.375 37.8075,53.72 36.0675,53.72 C33.3975,53.72 30.9975,52.94 28.8675,51.38 C26.7375,49.82 25.2525,47.63 24.4125,44.81 L29.0925,42.92 C29.5725,44.72 30.4275,46.19 31.6575,47.33 C32.8875,48.47 34.3725,49.04 36.1125,49.04 C37.7325,49.04 39.105,48.62 40.23,47.78 C41.355,46.94 41.9175,45.785 41.9175,44.315 C41.9175,42.965 41.4225,41.8475 40.4325,40.9625 C39.4975,40.1266667 37.9202778,39.3109028 35.7008333,38.5152083 L33.2775,37.655 C31.0875,36.875 29.265,35.7875 27.81,34.3925 C26.355,32.9975 25.6275,31.145 25.6275,28.835 C25.6275,27.245 26.055,25.775 26.91,24.425 C27.765,23.075 28.965,22.01 30.51,21.23 C32.055,20.45 33.8025,20.06 35.7525,20.06 Z",id:"Path",fill:"currentColor",fillRule:"nonzero"}),u.createElement("line",{x1:36,y1:14,x2:36,y2:21,id:"Line-Copy-4",stroke:"currentColor",strokeWidth:5}),u.createElement("line",{x1:36,y1:52,x2:36,y2:59,id:"Line-Copy-5",stroke:"currentColor",strokeWidth:5})),u.createElement("g",{id:"S",transform:"translate(43.412500, 37.060000)"}))),Mb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_dashboard",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"dashboard_black_24dp",transform:"translate(13.000000, 13.000000)"},u.createElement("path",{d:"M5,0 L80,0 C82.7614237,-5.07265313e-16 85,2.23857625 85,5 L85,80 C85,82.7614237 82.7614237,85 80,85 L5,85 C2.23857625,85 3.38176876e-16,82.7614237 0,80 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),u.createElement("path",{d:"M67,18 L67,25 L53,25 L53,18 L67,18 M32,18 L32,39 L18,39 L18,18 L32,18 M67,46 L67,67 L53,67 L53,46 L67,46 M32,60 L32,67 L18,67 L18,60 L32,60 M69,11 L51,11 C48.2385763,11 46,13.2385763 46,16 L46,27 C46,29.7614237 48.2385763,32 51,32 L69,32 C71.7614237,32 74,29.7614237 74,27 L74,16 C74,13.2385763 71.7614237,11 69,11 Z M34,11 L16,11 C13.2385763,11 11,13.2385763 11,16 L11,41 C11,43.7614237 13.2385763,46 16,46 L34,46 C36.7614237,46 39,43.7614237 39,41 L39,16 C39,13.2385763 36.7614237,11 34,11 Z M69,39 L51,39 C48.2385763,39 46,41.2385763 46,44 L46,69 C46,71.7614237 48.2385763,74 51,74 L69,74 C71.7614237,74 74,71.7614237 74,69 L74,44 C74,41.2385763 71.7614237,39 69,39 Z M34,53 L16,53 C13.2385763,53 11,55.2385763 11,58 L11,69 C11,71.7614237 13.2385763,74 16,74 L34,74 C36.7614237,74 39,71.7614237 39,69 L39,58 C39,55.2385763 36.7614237,53 34,53 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),Ab=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_image",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M81.4444444,28.5555556 L81.4444444,81.4444444 L28.5555556,81.4444444 L28.5555556,28.5555556 L81.4444444,28.5555556 M81.4444444,21 L28.5555556,21 C24.4,21 21,24.4 21,28.5555556 L21,81.4444444 C21,85.6 24.4,89 28.5555556,89 L81.4444444,89 C85.6,89 89,85.6 89,81.4444444 L89,28.5555556 C89,24.4 85.6,21 81.4444444,21 Z M63.0844444,54.4711111 L51.7511111,69.0911111 L43.6666667,59.3066667 L32.3333333,73.8888889 L77.6666667,73.8888889 L63.0844444,54.4711111 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),Ib=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_json",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"{;}",transform:"translate(24.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M17.0296296,66 C13.2765432,66 10.3209877,64.871179 8.16296296,62.6135371 C6.00493827,60.3558952 4.92592593,57.3296943 4.92592593,53.5349345 L4.92592593,41.6462882 C4.92592593,39.9170306 4.45679012,38.5840611 3.51851852,37.6473799 C2.58024691,36.7106987 1.40740741,36.2423581 0,36.2423581 L0,29.7576419 C1.40740741,29.7576419 2.58024691,29.2893013 3.51851852,28.3526201 C4.45679012,27.4159389 4.92592593,26.0829694 4.92592593,24.3537118 L4.92592593,12.4650655 C4.92592593,8.67030568 6.00493827,5.6441048 8.16296296,3.38646288 C10.3209877,1.12882096 13.2765432,0 17.0296296,0 L19,0 L19,6.41266376 L17.7333333,6.41266376 C16.091358,6.41266376 14.7425926,6.98908297 13.687037,8.1419214 C12.6314815,9.29475983 12.1037037,10.8318777 12.1037037,12.7532751 L12.1037037,24.3537118 C12.1037037,26.7074236 11.7166667,28.5687773 10.9425926,29.9377729 C10.1685185,31.3067686 8.93703704,32.2554585 7.24814815,32.7838428 L7.24814815,33.2161572 C8.93703704,33.7445415 10.1685185,34.6812227 10.9425926,36.0262009 C11.7166667,37.371179 12.1037037,39.2445415 12.1037037,41.6462882 L12.1037037,53.2467249 C12.1037037,55.1681223 12.6314815,56.7052402 13.687037,57.8580786 C14.7425926,59.010917 16.091358,59.5873362 17.7333333,59.5873362 L19,59.5873362 L19,66 L17.0296296,66 Z",id:"Path"}),u.createElement("path",{d:"M44,59.5873362 L45.4074074,59.5873362 C47.0493827,59.5873362 48.3864198,59.010917 49.4185185,57.8580786 C50.4506173,56.7052402 50.9666667,55.1681223 50.9666667,53.2467249 L50.9666667,41.6462882 C50.9666667,39.2445415 51.3537037,37.371179 52.1277778,36.0262009 C52.9018519,34.6812227 54.1333333,33.7445415 55.8222222,33.2161572 L55.8222222,32.7838428 C54.1333333,32.2554585 52.9018519,31.3067686 52.1277778,29.9377729 C51.3537037,28.5687773 50.9666667,26.7074236 50.9666667,24.3537118 L50.9666667,12.7532751 C50.9666667,10.8318777 50.4506173,9.29475983 49.4185185,8.1419214 C48.3864198,6.98908297 47.0493827,6.41266376 45.4074074,6.41266376 L44,6.41266376 L44,0 L46.0407407,0 C49.7938272,0 52.7493827,1.12882096 54.9074074,3.38646288 C57.0654321,5.6441048 58.1444444,8.67030568 58.1444444,12.4650655 L58.1444444,24.3537118 C58.1444444,26.0829694 58.6018519,27.4159389 59.5166667,28.3526201 C60.4314815,29.2893013 61.5925926,29.7576419 63,29.7576419 L63,36.2423581 C61.5925926,36.2423581 60.4314815,36.7106987 59.5166667,37.6473799 C58.6018519,38.5840611 58.1444444,39.9170306 58.1444444,41.6462882 L58.1444444,53.5349345 C58.1444444,57.3296943 57.0654321,60.3558952 54.9074074,62.6135371 C52.7493827,64.871179 49.7938272,66 46.0407407,66 L44,66 L44,59.5873362 Z",id:"Path"})))),kl=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_line",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M88.1848681,33.1583406 C89.7542734,31.6035859 92.2869054,31.6154626 93.8416601,33.1848679 C95.3445896,34.7019597 95.3835892,37.1191334 93.9668812,38.6829968 L93.8151328,38.84166 L66.2578818,66.14166 C64.8378618,67.5484238 62.6084032,67.6843587 61.0319068,66.4919462 L60.8595019,66.3539866 L45.2420004,53.1430003 L21.844917,76.8176775 C20.3437446,78.336508 17.927116,78.4009733 16.3484126,77.0008213 L16.1881594,76.850753 C14.6693289,75.3495806 14.6048635,72.932952 16.0050156,71.3542486 L16.1550839,71.1939954 L42.1550839,44.8881592 C43.5729843,43.4535802 45.8262314,43.3057778 47.4155704,44.5116324 L47.583248,44.646014 L63.2290004,57.8810003 L88.1848681,33.1583406 Z",id:"Path-10",fill:"currentColor",fillRule:"nonzero"}))),nm=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_link",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"link_black_24dp",transform:"translate(5.000000, 5.000000)"},u.createElement("path",{d:"M5,0 L96,0 C98.7614237,-5.07265313e-16 101,2.23857625 101,5 L101,96 C101,98.7614237 98.7614237,101 96,101 L5,101 C2.23857625,101 3.38176876e-16,98.7614237 0,96 L0,5 C-3.38176876e-16,2.23857625 2.23857625,5.07265313e-16 5,0 Z",id:"Path"}),u.createElement("path",{d:"M71,30 L58.4,30 C56.0804041,30 54.2,31.8804041 54.2,34.2 C54.2,36.5195959 56.0804041,38.4 58.4,38.4 L71,38.4 L71,38.4 C77.93,38.4 83.6,44.07 83.6,51 C83.6,57.93 77.93,63.6 71,63.6 L58.4,63.6 C56.0804041,63.6 54.2,65.4804041 54.2,67.8 C54.2,70.1195959 56.0804041,72 58.4,72 L71,72 L71,72 C82.592,72 92,62.592 92,51 C92,39.408 82.592,30 71,30 Z M41.6,63.6 L29,63.6 L29,63.6 C22.07,63.6 16.4,57.93 16.4,51 C16.4,44.07 22.07,38.4 29,38.4 L41.6,38.4 C43.9195959,38.4 45.8,36.5195959 45.8,34.2 C45.8,31.8804041 43.9195959,30 41.6,30 L29,30 L29,30 C17.408,30 8,39.408 8,51 C8,62.592 17.408,72 29,72 L41.6,72 C43.9195959,72 45.8,70.1195959 45.8,67.8 C45.8,65.4804041 43.9195959,63.6 41.6,63.6 Z M37.4,46.8 L62.6,46.8 C64.9195959,46.8 66.8,48.6804041 66.8,51 C66.8,53.3195959 64.9195959,55.2 62.6,55.2 L37.4,55.2 C35.0804041,55.2 33.2,53.3195959 33.2,51 C33.2,48.6804041 35.0804041,46.8 37.4,46.8 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"})))),Pb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_list",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:24.1587742,y:27,width:61.9377906,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:24.1587742,y:43,width:61.9377906,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:24.1587742,y:59,width:62,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:24.1587742,y:75.1904762,width:62,height:7.61904762,rx:3.80952381}))),Db=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_list_detail",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("rect",{id:"Rectangle-Copy-58",fill:"currentColor",x:22.1587742,y:27,width:15.983946,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-59",fill:"currentColor",x:44.1587742,y:27,width:43.9558514,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-61",fill:"currentColor",x:22.1587742,y:43,width:15.983946,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-62",fill:"currentColor",x:44.1587742,y:43,width:43.9558514,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-64",fill:"currentColor",x:22.1587742,y:59,width:16,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-66",fill:"currentColor",x:44.1587742,y:59,width:44,height:8,rx:4}),u.createElement("rect",{id:"Rectangle-Copy-65",fill:"currentColor",x:22.1587742,y:75.1904762,width:16,height:7.61904762,rx:3.80952381}),u.createElement("rect",{id:"Rectangle-Copy-67",fill:"currentColor",x:44.1587742,y:75.1904762,width:44,height:7.61904762,rx:3.80952381}))),Ob=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_map_points",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-Copy-36",transform:"translate(30.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M25,0 C11.1785714,0 0,11.268 0,25.2 C0,44.1 25,72 25,72 C25,72 50,44.1 50,25.2 C50,11.268 38.8214286,0 25,0 Z M7.14285714,25.2 C7.14285714,15.264 15.1428571,7.2 25,7.2 C34.8571429,7.2 42.8571429,15.264 42.8571429,25.2 C42.8571429,35.568 32.5714286,51.084 25,60.768 C17.5714286,51.156 7.14285714,35.46 7.14285714,25.2 Z",id:"Shape"}),u.createElement("path",{d:"M25,34 C29.97052,34 34,29.97052 34,25 C34,20.029444 29.97052,16 25,16 C20.02948,16 16,20.029444 16,25 C16,29.97052 20.02948,34 25,34 Z",id:"Path"})))),Nb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_map_segment",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-Copy-36",transform:"translate(11.000000, 27.000000)",fillRule:"nonzero"},u.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),u.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),u.createElement("g",{id:"Group-Copy-37",transform:"translate(62.000000, 27.000000)",fillRule:"nonzero"},u.createElement("path",{d:"M17,0 C7.60142857,0 0,7.6685 0,17.15 C0,30.0125 17,49 17,49 C17,49 34,30.0125 34,17.15 C34,7.6685 26.3985714,0 17,0 Z M4.85714286,17.15 C4.85714286,10.388 10.2971429,4.9 17,4.9 C23.7028571,4.9 29.1428571,10.388 29.1428571,17.15 C29.1428571,24.206 22.1485714,34.7655 17,41.356 C11.9485714,34.8145 4.85714286,24.1325 4.85714286,17.15 Z",id:"Shape",fill:"currentColor"}),u.createElement("path",{d:"M17,24 C20.31368,24 23,21.31368 23,18 C23,14.686296 20.31368,12 17,12 C13.68632,12 11,14.686296 11,18 C11,21.31368 13.68632,24 17,24 Z",id:"Path",fill:"currentColor"})),u.createElement("line",{x1:28.5,y1:81.5,x2:79.5,y2:81.5,id:"Line-3",stroke:"currentColor",strokeWidth:5,strokeLinecap:"round",strokeDasharray:"5,10"}))),$b=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_map_shape",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"noun-world-4667432-2",transform:"translate(19.000000, 19.000000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("g",{id:"noun-world-4667432"},u.createElement("path",{d:"M36,5 C18.8798665,5 5,18.8793071 5,36 C5,53.1206929 18.8793071,67 36,67 C53.1206929,67 67,53.1206929 67,36 C67,18.8793071 53.1206929,5 36,5 Z M0,36 C0,16.1177143 16.1177143,0 36,0 C55.8822857,0 72,16.1177143 72,36 C72,55.8822857 55.8822857,72 36,72 C16.1177143,72 0,55.8822857 0,36 Z",id:"Shape"}),u.createElement("path",{d:"M37.2848685,1.50131372 C37.8999474,1.48477633 38.4631152,1.71654937 38.8767996,2.10376364 C39.2928262,2.49317029 39.5578301,3.03960333 39.57434,3.65023916 L39.57434,3.65023916 L40.0344656,20.7428771 C40.0487121,21.2893502 39.8586306,21.8212062 39.4992535,22.2375953 L39.4992535,22.2375953 L32.1172188,30.7832284 C31.7924232,31.1592888 31.3490374,31.4169308 30.8586892,31.5134813 L30.8586892,31.5134813 L24.6865498,32.7324332 L28.0628423,42.7359018 C28.4533111,43.8925701 28.4513039,45.0197005 28.1633304,46.0321806 C27.8503264,47.132665 27.1975708,48.0987342 26.3338575,48.8190181 C25.4716664,49.5380326 24.3999821,50.0114808 23.2508211,50.1317463 C22.1949716,50.2422462 21.0728206,50.0558305 19.9867908,49.4837618 L19.9867908,49.4837618 L1.68382097,39.8433672 C1.13885361,39.5565384 0.764084629,39.078393 0.597525292,38.5380041 C0.430427538,37.9958684 0.472619244,37.3906551 0.763987861,36.8508084 C1.05393693,36.3139129 1.53648052,35.9433066 2.08313472,35.7791188 C2.62798313,35.6154734 3.2361363,35.657153 3.77860632,35.9426925 L3.77860632,35.9426925 L22.0816454,45.5831236 C22.3171919,45.7071442 22.5603781,45.7498863 22.7897862,45.7258621 C23.0398735,45.6996723 23.2725259,45.5956093 23.4599703,45.4392842 C23.6458558,45.2842591 23.7880139,45.0772117 23.8554593,44.8399997 C23.9169381,44.6237728 23.9147045,44.383346 23.8314444,44.1367864 L23.8314444,44.1367864 L19.6527943,31.7569079 C19.4493668,31.1542234 19.517516,30.4944328 19.8403231,29.9450638 C20.1614725,29.3985413 20.7046793,29.014044 21.3323155,28.8900909 L21.3323155,28.8900909 L29.2286003,27.3302661 L35.5513871,20.0108413 L35.1144494,3.7686887 C35.0979491,3.15801867 35.3331708,2.59836837 35.7276711,2.18746751 C36.1199426,1.77888802 36.6699139,1.51752889 37.2848685,1.50131372 Z",id:"Path",stroke:"currentColor"}),u.createElement("path",{d:"M42.2538467,56.3169014 C42.834665,56.3169014 43.3919278,56.5473051 43.8025756,56.957964 L43.8025756,56.957964 L50.5634819,63.7190531 C50.990585,64.1465338 51.2042254,64.7070592 51.2042254,65.267637 C51.2042254,65.8282064 50.9905908,66.3887389 50.5631792,66.8165562 C50.1353619,67.244019 49.5748515,67.4577465 49.0143336,67.4577465 C48.453827,67.4577465 47.893307,67.2440267 47.4652769,66.8163886 L47.4652769,66.8163886 L41.3467145,60.697095 L29.639469,60.697095 L23.5207389,66.8165562 C23.0929158,67.2440249 22.5323953,67.4577465 21.9719658,67.4577465 C21.4114352,67.4577465 20.8509999,67.2439558 20.4235838,66.8165562 C19.995665,66.388992 19.7816901,65.8283383 19.7816901,65.2676696 C19.7816901,64.7070094 19.9956592,64.1463486 20.4234173,63.7189168 L20.4234173,63.7189168 L27.1839229,56.9576493 C27.5952192,56.5470739 28.1516855,56.3169014 28.7323368,56.3169014 L28.7323368,56.3169014 Z",id:"Path",stroke:"currentColor"}),u.createElement("path",{d:"M63.9378166,21.2379048 C64.4225216,20.8714311 65.0086399,20.7379975 65.5642349,20.8181856 C66.1191803,20.8982799 66.6440521,21.191578 67.006552,21.6798365 C67.3682973,22.1662502 67.5006358,22.75458 67.4216695,23.3126471 C67.3426278,23.8712474 67.0519787,24.3991735 66.5692317,24.7645164 L66.5692317,24.7645164 L53.5947929,34.5837331 L50.8571888,42.8725775 L63.4236834,55.5534973 C63.8498746,55.9835692 64.0634024,56.5474048 64.0634024,57.111468 C64.0634024,57.6755228 63.8498803,58.2393656 63.4235328,58.6696236 C62.9952729,59.1014133 62.434079,59.3169014 61.8731786,59.3169014 C61.3121772,59.3169014 60.7510686,59.1013441 60.3230649,58.6694716 L60.3230649,58.6694716 L46.8022881,45.0255804 C46.5094233,44.730049 46.31189,44.3642735 46.2203738,43.9732706 C46.1289585,43.5826987 46.1433461,43.1669732 46.2741073,42.7711741 L46.2741073,42.7711741 L49.6544877,32.5388634 C49.7943202,32.1133276 50.0607882,31.7409505 50.416846,31.4711161 L50.416846,31.4711161 Z",id:"Path",stroke:"currentColor"}))))),rm=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_number",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group",transform:"translate(20.000000, 20.000000)",fill:"currentColor"},u.createElement("path",{d:"M-10.5,30.5 L51.5,30.5 C53.709139,30.5 55.5,32.290861 55.5,34.5 L55.5,35.5 C55.5,37.709139 53.709139,39.5 51.5,39.5 L-10.5,39.5 C-12.709139,39.5 -14.5,37.709139 -14.5,35.5 L-14.5,34.5 C-14.5,32.290861 -12.709139,30.5 -10.5,30.5 Z",id:"Rectangle-Copy-60",transform:"translate(20.500000, 35.000000) rotate(-90.000000) translate(-20.500000, -35.000000) "}),u.createElement("path",{d:"M19.5,30.5 L81.5,30.5 C83.709139,30.5 85.5,32.290861 85.5,34.5 L85.5,35.5 C85.5,37.709139 83.709139,39.5 81.5,39.5 L19.5,39.5 C17.290861,39.5 15.5,37.709139 15.5,35.5 L15.5,34.5 C15.5,32.290861 17.290861,30.5 19.5,30.5 Z",id:"Rectangle-Copy-61",transform:"translate(50.500000, 35.000000) rotate(-90.000000) translate(-50.500000, -35.000000) "}),u.createElement("path",{d:"M4,14 L66,14 C68.209139,14 70,15.790861 70,18 L70,19 C70,21.209139 68.209139,23 66,23 L4,23 C1.790861,23 2.705415e-16,21.209139 0,19 L0,18 C-2.705415e-16,15.790861 1.790861,14 4,14 Z",id:"Rectangle-Copy-63",transform:"translate(35.000000, 18.500000) rotate(-360.000000) translate(-35.000000, -18.500000) "}),u.createElement("path",{d:"M4,44 L66,44 C68.209139,44 70,45.790861 70,48 L70,49 C70,51.209139 68.209139,53 66,53 L4,53 C1.790861,53 2.705415e-16,51.209139 0,49 L0,48 C-2.705415e-16,45.790861 1.790861,44 4,44 Z",id:"Rectangle-Copy-62",transform:"translate(35.000000, 48.500000) rotate(-360.000000) translate(-35.000000, -48.500000) "})))),zb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_percent",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"%-copy-5",transform:"translate(19.000000, 22.000000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M16.1194226,31.5251397 C19.1010499,31.5251397 21.8186789,30.8184358 24.2723097,29.4050279 C26.7259405,27.9916201 28.6671041,26.0712291 30.0958005,23.6438547 C31.5244969,21.2164804 32.2388451,18.5893855 32.2388451,15.7625698 C32.2388451,12.9357542 31.5244969,10.3086592 30.0958005,7.88128492 C28.6671041,5.45391061 26.7259405,3.53351955 24.2723097,2.12011173 C21.8186789,0.706703911 19.1010499,0 16.1194226,0 C13.1377953,0 10.4201662,0.706703911 7.96653543,2.12011173 C5.51290464,3.53351955 3.57174103,5.45391061 2.14304462,7.88128492 C0.714348206,10.3086592 0,12.9357542 0,15.7625698 C0,18.5893855 0.714348206,21.2164804 2.14304462,23.6438547 C3.57174103,26.0712291 5.51290464,27.9916201 7.96653543,29.4050279 C10.4201662,30.8184358 13.1377953,31.5251397 16.1194226,31.5251397 Z M19.9645575,62.4787112 L57.1929452,7.56550735 C58.3200259,5.90302296 57.8859954,3.64163362 56.223511,2.5145529 C56.2107419,2.50589603 56.1979177,2.49732049 56.1850394,2.48882682 C54.4804105,1.3645685 52.1887314,1.81914062 51.0422905,3.50893047 L13.7228276,58.5157377 C12.6107181,60.1549252 13.0379992,62.3852921 14.6771866,63.4974016 C14.7072768,63.5178164 14.7376757,63.5377723 14.7683727,63.5572626 C16.507245,64.6613129 18.8087263,64.1836036 19.9645575,62.4787112 Z M16.1194226,24.150838 C13.8832021,24.150838 12.0041557,23.3519553 10.4822835,21.7541899 C8.9604112,20.1564246 8.19947507,18.1592179 8.19947507,15.7625698 C8.19947507,13.3044693 8.9604112,11.2918994 10.4822835,9.72486034 C12.0041557,8.15782123 13.8832021,7.37430168 16.1194226,7.37430168 C18.4177603,7.37430168 20.3278653,8.15782123 21.8497375,9.72486034 C23.3716098,11.2918994 24.1325459,13.3044693 24.1325459,15.7625698 C24.1325459,18.2206704 23.3716098,20.2332402 21.8497375,21.8002793 C20.3278653,23.3673184 18.4177603,24.150838 16.1194226,24.150838 Z M54.8805774,66 C57.8622047,66 60.5798338,65.2932961 63.0334646,63.8798883 C65.4870954,62.4664804 67.428259,60.5460894 68.8569554,58.1187151 C70.2856518,55.6913408 71,53.0642458 71,50.2374302 C71,47.4106145 70.2856518,44.7835196 68.8569554,42.3561453 C67.428259,39.9287709 65.4870954,38.0083799 63.0334646,36.5949721 C60.5798338,35.1815642 57.8622047,34.4748603 54.8805774,34.4748603 C51.8989501,34.4748603 49.1813211,35.1815642 46.7276903,36.5949721 C44.2740595,38.0083799 42.3328959,39.9287709 40.9041995,42.3561453 C39.4755031,44.7835196 38.7611549,47.4106145 38.7611549,50.2374302 C38.7611549,53.0642458 39.4755031,55.6913408 40.9041995,58.1187151 C42.3328959,60.5460894 44.2740595,62.4664804 46.7276903,63.8798883 C49.1813211,65.2932961 51.8989501,66 54.8805774,66 Z M54.8805774,58.6256983 C52.644357,58.6256983 50.7653106,57.8268156 49.2434383,56.2290503 C47.7215661,54.6312849 46.9606299,52.6340782 46.9606299,50.2374302 C46.9606299,47.7793296 47.7215661,45.7667598 49.2434383,44.1997207 C50.7653106,42.6326816 52.644357,41.849162 54.8805774,41.849162 C57.1789151,41.849162 59.0890201,42.6326816 60.6108924,44.1997207 C62.1327647,45.7667598 62.8937008,47.7793296 62.8937008,50.2374302 C62.8937008,52.6340782 62.1172353,54.6312849 60.5643045,56.2290503 C59.0113736,57.8268156 57.1167979,58.6256983 54.8805774,58.6256983 Z",id:"%-copy-2"})))),Fb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"5 5 100 100",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_scatter",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M29.1340462,83.93 C36.5885775,83.93 42.6340462,77.8857969 42.6340462,70.43 C42.6340462,62.9742031 36.5885775,56.93 29.1340462,56.93 C21.679515,56.93 15.6340462,62.9742031 15.6340462,70.43 C15.6340462,77.8857969 21.679515,83.93 29.1340462,83.93 Z",id:"Path-Copy-3",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}),u.createElement("path",{d:"M68.2840462,92.63 C73.6709212,92.63 78.0340462,88.264925 78.0340462,82.88 C78.0340462,77.495075 73.6709212,73.13 68.2840462,73.13 C62.8971712,73.13 58.5340462,77.495075 58.5340462,82.88 C58.5340462,88.264925 62.8971712,92.63 68.2840462,92.63 Z",id:"Path-Copy-2",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero",transform:"translate(68.284046, 82.880000) rotate(-360.000000) translate(-68.284046, -82.880000) "}),u.createElement("path",{d:"M67.8242963,57.43 C78.8701296,57.43 87.8242963,48.4758333 87.8242963,37.43 C87.8242963,26.3842917 78.8701296,17.43 67.8242963,17.43 C56.7784629,17.43 47.8242963,26.3842917 47.8242963,37.43 C47.8242963,48.4758333 56.7784629,57.43 67.8242963,57.43 Z",id:"Path-Copy",stroke:"#9aa0a6",className:"primarystroke",strokeWidth:7,fillRule:"nonzero"}))),Bb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"0 0 110 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_sparkline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("polyline",{id:"Path-11",stroke:"#9aa0a6",strokeWidth:6,points:"10 54.8274509 25.9215088 61.0844803 40.1501567 54.8274509 53.3907166 68.7215958 69.5925598 42 83.3327332 64.4487228 100.431152 57.8274509"}))),qb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_table",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("path",{d:"M81.0526316,23 L28.9473684,23 C25.1263158,23 22,26.1662162 22,30.036036 L22,79.2882883 C22,83.1581081 25.1263158,86.3243243 28.9473684,86.3243243 L81.0526316,86.3243243 C84.8736842,86.3243243 88,83.1581081 88,79.2882883 L88,30.036036 C88,26.1662162 84.8736842,23 81.0526316,23 Z M80.8648649,30.1351351 L80.8648649,40.8378378 L28.2432432,40.8378378 L28.2432432,30.1351351 L80.8648649,30.1351351 Z M63.9189189,79.1891892 L46.0810811,79.1891892 L46.0810811,47.972973 L63.9189189,47.972973 L63.9189189,79.1891892 Z M28.2432432,47.972973 L38.9459459,47.972973 L38.9459459,79.1891892 L28.2432432,79.1891892 L28.2432432,47.972973 Z M71.0540541,79.1891892 L71.0540541,47.972973 L81.7567568,47.972973 L81.7567568,79.1891892 L71.0540541,79.1891892 Z",id:"Shape",fill:"currentColor",fillRule:"nonzero"}))),Wb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"10 10 90 90",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_text",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("rect",{id:"Rectangle-Copy",stroke:"currentColor",strokeWidth:6,x:15.5,y:35,width:79,height:40,rx:5}),u.createElement("g",{id:"abc",transform:"translate(33.090000, 44.134000)",fill:"currentColor",fillRule:"nonzero"},u.createElement("path",{d:"M4.81,19.032 C3.406,19.032 2.25333333,18.6203333 1.352,17.797 C0.450666667,16.9736667 0,15.8946667 0,14.56 C0,13.676 0.234,12.896 0.702,12.22 C1.17,11.544 1.81133333,11.024 2.626,10.66 C3.44066667,10.296 4.342,10.114 5.33,10.114 C6.69933333,10.114 7.86933333,10.3133333 8.84,10.712 L8.84,10.14 C8.84,9.412 8.567,8.82266667 8.021,8.372 C7.475,7.92133333 6.74266667,7.696 5.824,7.696 C5.2,7.696 4.59766667,7.839 4.017,8.125 C3.43633333,8.411 2.95533333,8.788 2.574,9.256 L0.39,7.54 C1.03133333,6.708 1.83733333,6.06666667 2.808,5.616 C3.77866667,5.16533333 4.836,4.94 5.98,4.94 C8.008,4.94 9.55066667,5.408 10.608,6.344 C11.6653333,7.28 12.194,8.64933333 12.194,10.452 L12.194,18.616 L8.84,18.616 L8.84,17.264 L8.632,17.264 C8.23333333,17.784 7.709,18.2086667 7.059,18.538 C6.409,18.8673333 5.65933333,19.032 4.81,19.032 Z M5.616,16.38 C6.604,16.38 7.38833333,16.0636667 7.969,15.431 C8.54966667,14.7983333 8.84,14.0573333 8.84,13.208 C7.956,12.792 7.02866667,12.584 6.058,12.584 C4.29,12.584 3.406,13.2426667 3.406,14.56 C3.406,15.0973333 3.59666667,15.535 3.978,15.873 C4.35933333,16.211 4.90533333,16.38 5.616,16.38 Z",id:"Shape"}),u.createElement("path",{d:"M22.724,19.032 C21.8226667,19.032 21.021,18.8413333 20.319,18.46 C19.617,18.0786667 19.0926667,17.602 18.746,17.03 L18.538,17.03 L18.538,18.616 L15.34,18.616 L15.34,0 L18.746,0 L18.746,5.096 L18.538,6.968 L18.746,6.968 C19.11,6.396 19.6386667,5.915 20.332,5.525 C21.0253333,5.135 21.8226667,4.94 22.724,4.94 C23.92,4.94 25.0076667,5.239 25.987,5.837 C26.9663333,6.435 27.7333333,7.27133333 28.288,8.346 C28.8426667,9.42066667 29.12,10.634 29.12,11.986 C29.12,13.3553333 28.8426667,14.573 28.288,15.639 C27.7333333,16.705 26.9663333,17.537 25.987,18.135 C25.0076667,18.733 23.92,19.032 22.724,19.032 Z M22.126,15.886 C22.7673333,15.886 23.3653333,15.7213333 23.92,15.392 C24.4746667,15.0626667 24.9166667,14.6033333 25.246,14.014 C25.5753333,13.4246667 25.74,12.7486667 25.74,11.986 C25.74,11.2233333 25.5753333,10.5473333 25.246,9.958 C24.9166667,9.36866667 24.4746667,8.91366667 23.92,8.593 C23.3653333,8.27233333 22.7673333,8.112 22.126,8.112 C21.502,8.112 20.9126667,8.27233333 20.358,8.593 C19.8033333,8.91366667 19.3613333,9.36866667 19.032,9.958 C18.7026667,10.5473333 18.538,11.2233333 18.538,11.986 C18.538,12.7486667 18.7026667,13.4246667 19.032,14.014 C19.3613333,14.6033333 19.8033333,15.0626667 20.358,15.392 C20.9126667,15.7213333 21.502,15.886 22.126,15.886 Z",id:"Shape"}),u.createElement("path",{d:"M37.986,19.032 C36.6513333,19.032 35.4553333,18.733 34.398,18.135 C33.3406667,17.537 32.513,16.7006667 31.915,15.626 C31.317,14.5513333 31.018,13.338 31.018,11.986 C31.018,10.634 31.317,9.425 31.915,8.359 C32.513,7.293 33.3406667,6.45666667 34.398,5.85 C35.4553333,5.24333333 36.6513333,4.94 37.986,4.94 C39.4593333,4.94 40.7246667,5.25633333 41.782,5.889 C42.8393333,6.52166667 43.602,7.41866667 44.07,8.58 L40.95,9.88 C40.3953333,8.70133333 39.4073333,8.112 37.986,8.112 C36.946,8.112 36.0923333,8.46733333 35.425,9.178 C34.7576667,9.88866667 34.424,10.8246667 34.424,11.986 C34.424,13.1646667 34.7576667,14.1093333 35.425,14.82 C36.0923333,15.5306667 36.946,15.886 37.986,15.886 C39.4246667,15.886 40.4646667,15.262 41.106,14.014 L44.2,15.366 C43.628,16.5273333 42.8133333,17.4286667 41.756,18.07 C40.6986667,18.7113333 39.442,19.032 37.986,19.032 Z",id:"Path"})))),Gb=e=>u.createElement("svg",{width:"110px",height:"110px",viewBox:"15 15 80 80",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("g",{id:"viz_time",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-Copy-19",transform:"translate(51.307692, 36.538462)",fill:"currentColor",fillRule:"nonzero"},u.createElement("polygon",{id:"Path",points:"5.30769231 0 0 0 0 21.7906683 18.5769231 33.2307692 21.2307692 28.7636822 5.30769231 19.0668348"})),u.createElement("circle",{id:"Oval",stroke:"currentColor",strokeWidth:7,cx:55,cy:55,r:32.5}))),Ub=e=>u.createElement("svg",{width:"242px",height:"169px",viewBox:"-70 -35 312 239",id:"svg10",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:cc":"http://creativecommons.org/ns#","xmlns:dc":"http://purl.org/dc/elements/1.1/",...e},u.createElement("defs",{id:"defs14"}),u.createElement("title",{id:"title2"},"web_logo_retro"),u.createElement("g",{id:"web_logo_retro",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},u.createElement("g",{id:"Group-5",transform:"translate(8.065139, 9.000000)",fillRule:"nonzero",strokeWidth:10},u.createElement("path",{d:"M66.8164971,8.04981927 C70.8741349,0.502462438 80.0934949,-2.2220379 87.4085141,1.96447745 C94.5645112,6.05998159 97.2471437,15.2521193 93.5616777,22.7156028 L93.3065249,23.2105325 L28.3940308,143.950181 C24.3363931,151.497538 15.117033,154.222038 7.80201383,150.035523 C0.646016803,145.940018 -2.0366157,136.747881 1.64885028,129.284397 L1.90400302,128.789468 L66.8164971,8.04981927 Z",id:"Line-Copy-8",stroke:"#1573A1",fill:"#1573A1"}),u.createElement("path",{d:"M192.878294,8.04981927 C196.98997,0.0579198953 207.437352,-1.75261923 213.470311,1.96447745 C219.503269,5.68157413 221.641451,12.7091374 223.25,15.6301759 L219.368321,23.2105325 L154.455827,143.950181 C150.39819,151.497538 141.17883,154.222038 133.86381,150.035523 C126.707813,145.940018 124.025181,136.747881 127.710647,129.284397 L127.9658,128.789468 L192.878294,8.04981927 Z",id:"Line-Copy-16",stroke:"#FBBC04",fill:"#FBBC04",transform:"translate(174.655898, 76.056961) scale(-1, 1) translate(-174.655898, -76.056961) "}),u.createElement("path",{d:"M129.943475,8.04981927 C134.001113,0.502462438 143.220473,-2.2220379 150.535492,1.96447745 C157.691489,6.05998159 160.374122,15.2521193 156.688656,22.7156028 L156.433503,23.2105325 L91.5210087,143.950181 C87.463371,151.497538 78.2440109,154.222038 70.9289918,150.035523 C63.7729947,145.940018 61.0903622,136.747881 64.7758282,129.284397 L65.0309809,128.789468 L129.943475,8.04981927 Z",id:"Line-Copy-10",stroke:"#E37400",fill:"#E37400"}),u.createElement("path",{d:"M132.146094,8.04981927 C136.203731,0.502462438 145.423091,-2.2220379 152.738111,1.96447745 C159.894108,6.05998159 162.57674,15.2521193 158.891274,22.7156028 L158.636121,23.2105325 L93.7236274,143.950181 C89.6659896,151.497538 80.4466296,154.222038 73.1316104,150.035523 C65.9756133,145.940018 63.2929808,136.747881 66.9784468,129.284397 L67.2335996,128.789468 L132.146094,8.04981927 Z",id:"Line-Copy-12",stroke:"#11B5CB",fill:"#11B5CB",transform:"translate(112.934861, 76.000000) scale(-1, 1) translate(-112.934861, -76.000000) "}))),u.createElement("metadata",{id:"metadata32"},u.createElement("rdf:RDF",null,u.createElement("cc:Work",{"rdf:about":""},u.createElement("dc:title",null,"web_logo_retro"))))),Yb=e=>u.createElement("svg",{height:56,viewBox:"0 0 56 56",width:56,xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{fill:"currentColor",d:"m23.957 41.7695c3.8906 0 7.5234-1.2656 10.4766-3.375l11.1093 11.1094c.5156.5156 1.1953.7735 1.8985.7735 1.5234 0 2.625-1.1719 2.625-2.6719 0-.7032-.2342-1.3594-.7502-1.875l-11.0389-11.0626c2.3203-3.0468 3.7031-6.8203 3.7031-10.9218 0-9.9141-8.1094-18.0235-18.0234-18.0235-9.9375 0-18.0234 8.1094-18.0234 18.0235 0 9.914 8.0859 18.0234 18.0234 18.0234zm0-3.8906c-7.7578 0-14.1328-6.3984-14.1328-14.1328s6.375-14.1328 14.1328-14.1328c7.7344 0 14.1328 6.3984 14.1328 14.1328s-6.3984 14.1328-14.1328 14.1328z"})),Vb={chevronDown:G2,chevronLeft:U2,chevronRight:Y2,clear:Ah,meatballs:hb,play:gb,copy:H2,checkmark:V2,radioChecked:yb,radioUnchecked:vb,warning:bb,check_circle:wb,gear:xb,info:Cb,error:_b,refresh:kb,sidebarCollapse:Sb,filterSliders:Rb,download:Eb,malloy:Ub,aggregate:Z2,dimension:em,filter:K2,groupBy:Q2,insert:X2,limit:J2,orderBy:tb,measure:Jf,nest:eb,array:ib,boolean:ab,database:sb,date:cb,json:ub,number:db,query:fb,search:Yb,sql_native:pb,string:em,view:lb,view_filled:mb,many_to_one:nb,one_to_many:rb,one_to_one:ob,viz_bar_chart:tm,viz_bar:tm,viz_boolean:jb,viz_bytes:rm,viz_cartesian_chart:kl,viz_column_chart:Tb,viz_currency:Lb,viz_dashboard:Mb,viz_image:Ab,viz_json:Ib,viz_line_chart:kl,viz_line:kl,viz_link:nm,viz_list:Pb,viz_list_detail:Db,viz_point_map:Ob,viz_segment_map:Nb,viz_shape_map:$b,viz_number:rm,viz_percent:zb,viz_scatter_chart:Fb,viz_single_value:Jf,viz_sparkline:Bb,viz_table:qb,viz_text:Wb,viz_time:Gb,viz_url:nm,viz_vega:kl};function ne({name:e,color:t="primary",customStyle:n}){const r=Vb[e];return r?c.jsx(r,{...S.props(Hb.main,Xb[t],n),"data-testid":`icon-${t}-${e}`}):null}const Hb={main:{display:"mly1rg5ohu",width:"mly1kky2od",height:"mlylup9mm",overflow:"mly1rea2x4",overflowX:null,overflowY:null,$$css:!0}},Xb={primary:{color:"mly1p68tcb",$$css:!0},secondary:{color:"mly1r0d382",$$css:!0},disabled:{color:"mly16un6j3",$$css:!0},primaryOnMedia:{color:"mly1kiansi",$$css:!0},gray:{color:"mlyann5r3",$$css:!0},purple:{color:"mly1ywypuw",$$css:!0},green:{color:"mly1evcnq1",$$css:!0},cyan:{color:"mly1h091fy",$$css:!0},info:{color:"mly1tw9ct1",$$css:!0},warning:{color:"mly7neac5",$$css:!0},positive:{color:"mly1l99qkd",$$css:!0},negative:{color:"mly109d434",$$css:!0}},Zb="gray";function Hn({label:e,color:t=Zb,icon:n,customStyle:r}){return c.jsxs("div",{...S.props(om.main,Kb[t],r),children:[n&&c.jsx(ne,{color:t,name:n}),c.jsx("div",{"data-testid":"badge-label",...S.props(F.badge,om.label),children:e})]})}const om={main:{display:"mly3nfvp2",height:"mly1qx5ct2",minWidth:"mlyt4ypqs",padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",gap:"mly1jnr06f",rowGap:null,columnGap:null,flexShrink:"mly2lah0s",borderRadius:"mly10hpsqq",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mlysu8s4a",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0},label:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textAlign:"mly2b8uid",leadingTrim:"mly11e9jwx",textEdge:"mly1vqy1sf",textOverflow:"mlylyipyv",color:"mly1ard1hs",$$css:!0}},Kb={gray:{"--mly10mhzaa":"mly1rve117","--mly1ojyoay":"mlybcavtu",$$css:!0},purple:{"--mly10mhzaa":"mlyihc5ie","--mly1ojyoay":"mlywis56f",$$css:!0},green:{"--mly10mhzaa":"mly10cf5cp","--mly1ojyoay":"mlyy280wj",$$css:!0},cyan:{"--mly10mhzaa":"mlykvi9ht","--mly1ojyoay":"mly1eg6ybj",$$css:!0}},Qb="horizontal";function no({orientation:e=Qb,customStyle:t}){return c.jsx("div",{...S.props(Jb.main,e4[e],t)})}const Jb={main:{background:"mly1cn1p8l",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}},e4={horizontal:{height:"mlyjm9jq1",width:"mlyh8yej3",$$css:!0},vertical:{height:"mlypyat2d",width:"mly1i1rx1s",$$css:!0}};function t4({children:e}){return c.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:u.Children.map(e,t=>t)})}var n4=u.createContext(void 0);function Vs(e){const t=u.useContext(n4);return e||t||"ltr"}function Nc(e,[t,n]){return Math.min(n,Math.max(t,e))}function r4(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Hu="ScrollArea",[Ih]=Gt(Hu),[o4,At]=Ih(Hu),Ph=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...l}=e,[i,a]=u.useState(null),[d,f]=u.useState(null),[m,p]=u.useState(null),[h,y]=u.useState(null),[g,v]=u.useState(null),[b,w]=u.useState(0),[x,_]=u.useState(0),[C,E]=u.useState(!1),[k,R]=u.useState(!1),j=se(t,D=>a(D)),M=Vs(o);return c.jsx(o4,{scope:n,type:r,dir:M,scrollHideDelay:s,scrollArea:i,viewport:d,onViewportChange:f,content:m,onContentChange:p,scrollbarX:h,onScrollbarXChange:y,scrollbarXEnabled:C,onScrollbarXEnabledChange:E,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:k,onScrollbarYEnabledChange:R,onCornerWidthChange:w,onCornerHeightChange:_,children:c.jsx(Q.div,{dir:M,...l,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Ph.displayName=Hu;var Dh="ScrollAreaViewport",Oh=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,l=At(Dh,n),i=u.useRef(null),a=se(t,i,l.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(Q.div,{"data-radix-scroll-area-viewport":"",...s,ref:a,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Oh.displayName=Dh;var dn="ScrollAreaScrollbar",Nh=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(dn,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=o,i=e.orientation==="horizontal";return u.useEffect(()=>(i?s(!0):l(!0),()=>{i?s(!1):l(!1)}),[i,s,l]),o.type==="hover"?c.jsx(s4,{...r,ref:t,forceMount:n}):o.type==="scroll"?c.jsx(l4,{...r,ref:t,forceMount:n}):o.type==="auto"?c.jsx($h,{...r,ref:t,forceMount:n}):o.type==="always"?c.jsx(Xu,{...r,ref:t}):null});Nh.displayName=dn;var s4=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(dn,e.__scopeScrollArea),[s,l]=u.useState(!1);return u.useEffect(()=>{const i=o.scrollArea;let a=0;if(i){const d=()=>{window.clearTimeout(a),l(!0)},f=()=>{a=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",d),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(a),i.removeEventListener("pointerenter",d),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(Ke,{present:n||s,children:c.jsx($h,{"data-state":s?"visible":"hidden",...r,ref:t})})}),l4=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=At(dn,e.__scopeScrollArea),s=e.orientation==="horizontal",l=Ji(()=>a("SCROLL_END"),100),[i,a]=r4("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return u.useEffect(()=>{if(i==="idle"){const d=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[i,o.scrollHideDelay,a]),u.useEffect(()=>{const d=o.viewport,f=s?"scrollLeft":"scrollTop";if(d){let m=d[f];const p=()=>{const h=d[f];m!==h&&(a("SCROLL"),l()),m=h};return d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,s,a,l]),c.jsx(Ke,{present:n||i!=="hidden",children:c.jsx(Xu,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:z(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:z(e.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),$h=u.forwardRef((e,t)=>{const n=At(dn,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,l]=u.useState(!1),i=e.orientation==="horizontal",a=Ji(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;l(i?d:f)}},10);return po(n.viewport,a),po(n.content,a),c.jsx(Ke,{present:r||s,children:c.jsx(Xu,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Xu=u.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=At(dn,e.__scopeScrollArea),s=u.useRef(null),l=u.useRef(0),[i,a]=u.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Wh(i.viewport,i.content),f={...r,sizes:i,onSizesChange:a,hasThumb:d>0&&d<1,onThumbChange:p=>s.current=p,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:p=>l.current=p};function m(p,h){return f4(p,l.current,i,h)}return n==="horizontal"?c.jsx(i4,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollLeft,h=sm(p,i,o.dir);s.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=m(p,o.dir))}}):n==="vertical"?c.jsx(a4,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const p=o.viewport.scrollTop,h=sm(p,i);s.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=m(p))}}):null}),i4=u.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=At(dn,e.__scopeScrollArea),[l,i]=u.useState(),a=u.useRef(null),d=se(t,a,s.onScrollbarXChange);return u.useEffect(()=>{a.current&&i(getComputedStyle(a.current))},[a]),c.jsx(Fh,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qi(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,m)=>{if(s.viewport){const p=s.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Uh(p,m)&&f.preventDefault()}},onResize:()=>{a.current&&s.viewport&&l&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:mi(l.paddingLeft),paddingEnd:mi(l.paddingRight)}})}})}),a4=u.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=At(dn,e.__scopeScrollArea),[l,i]=u.useState(),a=u.useRef(null),d=se(t,a,s.onScrollbarYChange);return u.useEffect(()=>{a.current&&i(getComputedStyle(a.current))},[a]),c.jsx(Fh,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qi(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,m)=>{if(s.viewport){const p=s.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Uh(p,m)&&f.preventDefault()}},onResize:()=>{a.current&&s.viewport&&l&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:mi(l.paddingTop),paddingEnd:mi(l.paddingBottom)}})}})}),[c4,zh]=Ih(dn),Fh=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:i,onThumbPositionChange:a,onDragScroll:d,onWheelScroll:f,onResize:m,...p}=e,h=At(dn,n),[y,g]=u.useState(null),v=se(t,j=>g(j)),b=u.useRef(null),w=u.useRef(""),x=h.viewport,_=r.content-r.viewport,C=Ge(f),E=Ge(a),k=Ji(m,10);function R(j){if(b.current){const M=j.clientX-b.current.left,D=j.clientY-b.current.top;d({x:M,y:D})}}return u.useEffect(()=>{const j=M=>{const D=M.target;y?.contains(D)&&C(M,_)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[x,y,_,C]),u.useEffect(E,[r,E]),po(y,k),po(h.content,k),c.jsx(c4,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:Ge(s),onThumbPointerUp:Ge(l),onThumbPositionChange:E,onThumbPointerDown:Ge(i),children:c.jsx(Q.div,{...p,ref:v,style:{position:"absolute",...p.style},onPointerDown:z(e.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),b.current=y.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),R(j))}),onPointerMove:z(e.onPointerMove,R),onPointerUp:z(e.onPointerUp,j=>{const M=j.target;M.hasPointerCapture(j.pointerId)&&M.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=w.current,h.viewport&&(h.viewport.style.scrollBehavior=""),b.current=null})})})}),fi="ScrollAreaThumb",Bh=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=zh(fi,e.__scopeScrollArea);return c.jsx(Ke,{present:n||o.hasThumb,children:c.jsx(u4,{ref:t,...r})})}),u4=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=At(fi,n),l=zh(fi,n),{onThumbPositionChange:i}=l,a=se(t,m=>l.onThumbChange(m)),d=u.useRef(void 0),f=Ji(()=>{d.current&&(d.current(),d.current=void 0)},100);return u.useEffect(()=>{const m=s.viewport;if(m){const p=()=>{if(f(),!d.current){const h=m4(m,i);d.current=h,i()}};return i(),m.addEventListener("scroll",p),()=>m.removeEventListener("scroll",p)}},[s.viewport,f,i]),c.jsx(Q.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:z(e.onPointerDownCapture,m=>{const h=m.target.getBoundingClientRect(),y=m.clientX-h.left,g=m.clientY-h.top;l.onThumbPointerDown({x:y,y:g})}),onPointerUp:z(e.onPointerUp,l.onThumbPointerUp)})});Bh.displayName=fi;var Zu="ScrollAreaCorner",qh=u.forwardRef((e,t)=>{const n=At(Zu,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(d4,{...e,ref:t}):null});qh.displayName=Zu;var d4=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=At(Zu,n),[s,l]=u.useState(0),[i,a]=u.useState(0),d=!!(s&&i);return po(o.scrollbarX,()=>{var f;const m=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(m),a(m)}),po(o.scrollbarY,()=>{var f;const m=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(m),l(m)}),d?c.jsx(Q.div,{...r,ref:t,style:{width:s,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function mi(e){return e?parseInt(e,10):0}function Wh(e,t){const n=e/t;return isNaN(n)?0:n}function Qi(e){const t=Wh(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function f4(e,t,n,r="ltr"){const o=Qi(n),s=o/2,l=t||s,i=o-l,a=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,m=r==="ltr"?[0,f]:[f*-1,0];return Gh([a,d],m)(e)}function sm(e,t,n="ltr"){const r=Qi(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,l=t.content-t.viewport,i=s-r,a=n==="ltr"?[0,l]:[l*-1,0],d=Nc(e,a);return Gh([0,l],[0,i])(d)}function Gh(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Uh(e,t){return e>0&&e<t}var m4=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const s={left:e.scrollLeft,top:e.scrollTop},l=n.left!==s.left,i=n.top!==s.top;(l||i)&&t(),n=s,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function Ji(e,t){const n=Ge(e),r=u.useRef(0);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),u.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function po(e,t){const n=Ge(t);st(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var p4=Ph,h4=Oh,lm=Nh,im=Bh,g4=qh;function Ku({children:e}){return c.jsxs(p4,{className:"mlyh8yej3 mly5yr21d mlyb3r6kr mly1bo1i26 mly1fzkygm mlynu5hmx mly1u5txqc",children:[c.jsx(h4,{className:"mlyh8yej3 mly5yr21d mly1pjcqnp",children:u.Children.map(e,t=>t)}),c.jsx(lm,{className:"mly78zum5 mly7cs2c mly15sj6ns mly14znju7 mlyehqz9p mly1xc55vz",orientation:"vertical",children:c.jsx(im,{className:"mly98rzlu mly1d8y1cu mly12oqio5"})}),c.jsx(lm,{className:"mly78zum5 mly7cs2c mly15sj6ns mly14znju7 mlydt5ytf mlyztvwtv mlydk7pt",orientation:"horizontal",children:c.jsx(im,{className:"mly98rzlu mly1d8y1cu mly12oqio5"})}),c.jsx(g4,{className:"mly7cs2c mly1d3ksz1 mly14znju7"})]})}const y4="default",v4="default";function be({variant:e=y4,size:t=v4,icon:n,label:r,tooltip:o,isDisabled:s=!1,customStyle:l,...i}){const{theme:a}=u.useContext(Me),d=c.jsxs("button",{...S.props(Ua.main,b4[e],w4[t],l),type:"button",disabled:s,...i,children:[c.jsxs("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly167g77z",children:[n&&c.jsx(ne,{name:n,customStyle:Ua.icon}),r&&c.jsx("div",{...S.props(e==="primary"?F.emphasized:F.body,Ua.label),children:r})]}),s&&c.jsx("div",{className:"mly10l6tqk mlyu96u03 mly3m8u43 mly1dyadpi mly47corl mlyur7f20 mlyh8yej3 mly5yr21d"})]});return o?c.jsxs(ko,{delayDuration:300,children:[c.jsx(So,{asChild:!0,children:d}),c.jsx(Eo,{children:c.jsx(Ro,{sideOffset:8,...S.props(F.body,Ln.default,a),children:o})})]}):d}const Ua={main:{display:"mly3nfvp2",flexDirection:"mlydt5ytf",justifyContent:"mlyl56j7k",alignItems:"mly6s0dn4",position:"mly1n2onr6",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,cursor:"mly1ypdohk mly1s07b3s",flexShrink:"mly2lah0s",userSelect:"mly87ps6o",$$css:!0},icon:{color:"mlyuk6yi3",$$css:!0},label:{color:"mlyaerthn",whiteSpace:"mlyuxw1ft",$$css:!0}},b4={default:{background:"mly2taacv mly1b1kpiu mlybc727s",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},flat:{background:"mly1md70p1 mly1xbhkwo mly1v24qdc",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mlypfd894 mlyiv1q3g","--mly1hpdckv":"mly5xbp4t mly1iu3zmn",$$css:!0},primary:{background:"mly1kyiqbu mly1cbp0pj mly111eqgs",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,"--mlyxo3nik":"mly1n5rdk7 mly1dsjhx","--mly1hpdckv":"mly3mt86g mly13vk70h",$$css:!0}},w4={default:{height:"mlyc9qbxq",padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{height:"mly1fgtraw",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},Qn={main:{display:"mlywz0xwf",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",justifyContent:"mlyl56j7k",gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,cursor:"mly1ypdohk",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,background:"mly1cmjei3 mly1b1kpiu",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,position:"mly1n2onr6",$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},label:{color:"mly1xre2ib",textOverflow:"mlylyipyv",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,whiteSpace:"mlyuxw1ft",$$css:!0}},Qu={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}},Ju={default:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlyxzb6uj",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}},Ao="default",ed="default";function Ne({label:e,icon:t,color:n=Ao,size:r=ed,onClick:o,onHover:s,asButtonTrigger:l=!1,tooltip:i,tooltipProps:a,customStyle:d,dragProps:f,...m}){const{theme:p}=u.useContext(Me),h=o!==void 0||l,y=c.jsxs("div",{...S.props(Qn.main,Qu[n],Ju[r],!h&&x4.nonInteractive,d),...f?.attributes,...f?.listeners,children:[t&&c.jsx(ne,{name:t,customStyle:Qn.icon}),h&&c.jsx("button",{className:"mlyh8yej3 mly5yr21d mly10l6tqk mly13vifvy mlyu96u03 mly1md70p1 mlyng3xce mly1ypdohk",...o&&{onClick:o},...s&&{onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},...m}),e&&c.jsx("div",{...S.props(F.body,Qn.label),children:e})]});return i?c.jsxs(jo,{delayDuration:300,children:[c.jsx(To,{asChild:!0,children:y}),c.jsx(Lo,{children:c.jsx(Mo,{...a,...S.props(F.tooltipText,typeof i=="string"?Ln.default:Ln.card,p),children:i})})]}):y}const x4={nonInteractive:{cursor:"mlyt0e3qv",background:"mly1cmjei3",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function Hs({children:e,color:t=Ao,customStyle:n}){const r=u.Children.count(e);return c.jsx("div",{...S.props(ls.main,n),children:u.Children.map(e,(o,s)=>u.cloneElement(o,{customStyle:{...o.props.customStyle,...C4(s,r)},color:_4(o,t)}))})}const C4=(e,t)=>t===1?ls.onlyChild:e===0?ls.firstChild:e===t-1?ls.lastChild:ls.innerChild,_4=(e,t)=>{const n=e.props.color;return n===void 0?t:n},ls={main:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",alignItems:"mly6s0dn4",gap:"mly12mrbbr",rowGap:null,columnGap:null,$$css:!0},firstChild:{borderRadius:"mlytah5vv",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},innerChild:{borderRadius:null,borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},lastChild:{borderRadius:"mly19ctu66",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},onlyChild:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function ea({errorMessage:e}){const{theme:t}=u.useContext(Me);return c.jsxs(ko,{delayDuration:0,children:[c.jsx(So,{asChild:!0,children:c.jsx("div",{className:"mlygd8bvy mly1fgtraw mly78zum5 mly6s0dn4 mlyl56j7k",children:c.jsx(ne,{name:"warning",customStyle:k4.errorIcon})})}),c.jsx(Eo,{children:c.jsx(Ro,{children:c.jsx("div",{...S.props(F.body,Ln.default,t),children:e})})})]})}const k4={errorIcon:{color:"mly1e2nbdu",$$css:!0}};function $c({value:e,onChange:t,onRemove:n,icon:r,color:o=Ao,size:s=ed,customStyle:l,type:i,errorMessage:a}){const[d,f]=u.useState(!1),m=u.useRef(null),p=u.useRef(null),h=({target:v})=>{t(i==="number"?parseFloat(v.value||"0"):v.value)},y=()=>{f(!0)},g=v=>{var b;p.current==null||v.relatedTarget!==p.current?f(!1):(b=m.current)==null||b.focus()};return c.jsxs("div",{className:"mly78zum5 mly6s0dn4",children:[c.jsxs("div",{...S.props(Qn.main,Qu[o],Ju[s],d&&Ko.focused,!!a&&Ko.hasError,l),children:[r&&c.jsx(ne,{name:r,customStyle:Ko.icon}),c.jsxs("span",{className:"mlywz0xwf",children:[c.jsx("span",{...S.props(F.body,Ko.placeholder),style:{whiteSpaceCollapse:"preserve"},children:e}),c.jsx("input",{...S.props(Ko.input,F.body),ref:m,pattern:i==="number"?"^-?[0-9.]*$":void 0,value:e,onChange:h,onFocus:y,onBlur:g,size:1})]}),n&&d&&c.jsx("button",{className:"mly3nfvp2 mlyc342km mly1md70p1 mly1717udv mly1ypdohk",ref:p,onClick:n,tabIndex:0,children:c.jsx(ne,{name:"clear"})})]}),a&&c.jsx(ea,{errorMessage:a})]})}const Ko={focused:{background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mlydid9jw",$$css:!0},hasError:{border:"mly1dc9p4k",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},icon:{color:"mlywn9h7t",$$css:!0},placeholder:{background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,color:"mly19co3pv",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0},input:{color:"mly1xre2ib",gridArea:"mly15r89dc",gridRow:null,gridRowStart:null,gridRowEnd:null,gridColumn:null,gridColumnStart:null,gridColumnEnd:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1lrzu1o",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,whiteSpace:"mlyuxw1ft",minWidth:"mlygc0pbm",$$css:!0}};function td(e){const t=e+"CollectionProvider",[n,r]=Gt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:y,children:g}=h,v=me.useRef(null),b=me.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:b,collectionRef:v,children:g})};l.displayName=t;const i=e+"CollectionSlot",a=me.forwardRef((h,y)=>{const{scope:g,children:v}=h,b=s(i,g),w=se(y,b.collectionRef);return c.jsx(nr,{ref:w,children:v})});a.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=me.forwardRef((h,y)=>{const{scope:g,children:v,...b}=h,w=me.useRef(null),x=se(y,w),_=s(d,g);return me.useEffect(()=>(_.itemMap.set(w,{ref:w,...b}),()=>void _.itemMap.delete(w))),c.jsx(nr,{[f]:"",ref:x,children:v})});m.displayName=d;function p(h){const y=s(e+"CollectionConsumer",h);return me.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((_,C)=>b.indexOf(_.ref.current)-b.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:l,Slot:a,ItemSlot:m},p,r]}var Ya=0;function ta(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??am()),document.body.insertAdjacentElement("beforeend",e[1]??am()),Ya++,()=>{Ya===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ya--}},[])}function am(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Va="focusScope.autoFocusOnMount",Ha="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},S4="FocusScope",Xs=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[i,a]=u.useState(null),d=Ge(o),f=Ge(s),m=u.useRef(null),p=se(t,g=>a(g)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let g=function(x){if(h.paused||!i)return;const _=x.target;i.contains(_)?m.current=_:Un(m.current,{select:!0})},v=function(x){if(h.paused||!i)return;const _=x.relatedTarget;_!==null&&(i.contains(_)||Un(m.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Un(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),w.disconnect()}}},[r,i,h.paused]),u.useEffect(()=>{if(i){dm.add(h);const g=document.activeElement;if(!i.contains(g)){const b=new CustomEvent(Va,cm);i.addEventListener(Va,d),i.dispatchEvent(b),b.defaultPrevented||(E4(M4(Yh(i)),{select:!0}),document.activeElement===g&&Un(i))}return()=>{i.removeEventListener(Va,d),setTimeout(()=>{const b=new CustomEvent(Ha,cm);i.addEventListener(Ha,f),i.dispatchEvent(b),b.defaultPrevented||Un(g??document.body,{select:!0}),i.removeEventListener(Ha,f),dm.remove(h)},0)}}},[i,d,f,h]);const y=u.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const w=g.currentTarget,[x,_]=R4(w);x&&_?!g.shiftKey&&b===_?(g.preventDefault(),n&&Un(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&Un(_,{select:!0})):b===w&&g.preventDefault()}},[n,r,h.paused]);return c.jsx(Q.div,{tabIndex:-1,...l,ref:p,onKeyDown:y})});Xs.displayName=S4;function E4(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Un(r,{select:t}),document.activeElement!==n)return}function R4(e){const t=Yh(e),n=um(t,e),r=um(t.reverse(),e);return[n,r]}function Yh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function um(e,t){for(const n of e)if(!j4(n,{upTo:t}))return n}function j4(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function T4(e){return e instanceof HTMLInputElement&&"select"in e}function Un(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&T4(e)&&t&&e.select()}}var dm=L4();function L4(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=fm(e,t),e.unshift(t)},remove(t){var n;e=fm(e,t),(n=e[0])==null||n.resume()}}}function fm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function M4(e){return e.filter(t=>t.tagName!=="A")}function A4(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var I4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wr=new WeakMap,Sl=new WeakMap,El={},Xa=0,Vh=function(e){return e&&(e.host||Vh(e.parentNode))},P4=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Vh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},D4=function(e,t,n,r){var o=P4(t,Array.isArray(e)?e:[e]);El[n]||(El[n]=new WeakMap);var s=El[n],l=[],i=new Set,a=new Set(o),d=function(m){!m||i.has(m)||(i.add(m),d(m.parentNode))};o.forEach(d);var f=function(m){!m||a.has(m)||Array.prototype.forEach.call(m.children,function(p){if(i.has(p))f(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",g=(Wr.get(p)||0)+1,v=(s.get(p)||0)+1;Wr.set(p,g),s.set(p,v),l.push(p),g===1&&y&&Sl.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),i.clear(),Xa++,function(){l.forEach(function(m){var p=Wr.get(m)-1,h=s.get(m)-1;Wr.set(m,p),s.set(m,h),p||(Sl.has(m)||m.removeAttribute(r),Sl.delete(m)),h||m.removeAttribute(n)}),Xa--,Xa||(Wr=new WeakMap,Wr=new WeakMap,Sl=new WeakMap,El={})}},na=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=I4(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),D4(r,o,n,"aria-hidden")):function(){return null}},tn=function(){return tn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},tn.apply(this,arguments)};function Hh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function O4(e,t,n){for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Zl="right-scroll-bar-position",Kl="width-before-scroll-bar",N4="with-scroll-bars-hidden",$4="--removed-body-scroll-bar-size";function Za(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function z4(e,t){var n=u.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var F4=typeof window<"u"?u.useLayoutEffect:u.useEffect,mm=new WeakMap;function B4(e,t){var n=z4(null,function(r){return e.forEach(function(o){return Za(o,r)})});return F4(function(){var r=mm.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(i){s.has(i)||Za(i,null)}),s.forEach(function(i){o.has(i)||Za(i,l)})}mm.set(n,e)},[e]),n}function q4(e){return e}function W4(e,t){t===void 0&&(t=q4);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(i){return i!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var i=n;n=[],i.forEach(s),l=n}var a=function(){var f=l;l=[],f.forEach(s)},d=function(){return Promise.resolve().then(a)};d(),n={push:function(f){l.push(f),d()},filter:function(f){return l=l.filter(f),n}}}};return o}function G4(e){e===void 0&&(e={});var t=W4(null);return t.options=tn({async:!0,ssr:!1},e),t}var Xh=function(e){var t=e.sideCar,n=Hh(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,tn({},n))};Xh.isSideCarExport=!0;function U4(e,t){return e.useMedium(t),Xh}var Zh=G4(),Ka=function(){},ra=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:Ka,onWheelCapture:Ka,onTouchMoveCapture:Ka}),o=r[0],s=r[1],l=e.forwardProps,i=e.children,a=e.className,d=e.removeScrollBar,f=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,w=e.gapMode,x=Hh(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,C=B4([n,t]),E=tn(tn({},x),o);return u.createElement(u.Fragment,null,f&&u.createElement(_,{sideCar:Zh,removeScrollBar:d,shards:m,noIsolation:h,inert:y,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:w}),l?u.cloneElement(u.Children.only(i),tn(tn({},E),{ref:C})):u.createElement(b,tn({},E,{className:a,ref:C}),i))});ra.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ra.classNames={fullWidth:Kl,zeroRight:Zl};var Y4=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function V4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Y4();return t&&e.setAttribute("nonce",t),e}function H4(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function X4(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Z4=function(){var e=0,t=null;return{add:function(n){e==0&&(t=V4())&&(H4(t,n),X4(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},K4=function(){var e=Z4();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Kh=function(){var e=K4(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Q4={left:0,top:0,right:0,gap:0},Qa=function(e){return parseInt(e||"",10)||0},J4=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Qa(n),Qa(r),Qa(o)]},e6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Q4;var t=J4(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},t6=Kh(),ro="data-scroll-locked",n6=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
3
|
+
.`.concat(N4,` {
|
|
4
|
+
overflow: hidden `).concat(r,`;
|
|
5
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
6
|
+
}
|
|
7
|
+
body[`).concat(ro,`] {
|
|
8
|
+
overflow: hidden `).concat(r,`;
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
11
|
+
padding-left: `.concat(o,`px;
|
|
12
|
+
padding-top: `).concat(s,`px;
|
|
13
|
+
padding-right: `).concat(l,`px;
|
|
14
|
+
margin-left:0;
|
|
15
|
+
margin-top:0;
|
|
16
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
17
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.`).concat(Zl,` {
|
|
21
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.`).concat(Kl,` {
|
|
25
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat(Zl," .").concat(Zl,` {
|
|
29
|
+
right: 0 `).concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(Kl," .").concat(Kl,` {
|
|
33
|
+
margin-right: 0 `).concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body[`).concat(ro,`] {
|
|
37
|
+
`).concat($4,": ").concat(i,`px;
|
|
38
|
+
}
|
|
39
|
+
`)},pm=function(){var e=parseInt(document.body.getAttribute(ro)||"0",10);return isFinite(e)?e:0},r6=function(){u.useEffect(function(){return document.body.setAttribute(ro,(pm()+1).toString()),function(){var e=pm()-1;e<=0?document.body.removeAttribute(ro):document.body.setAttribute(ro,e.toString())}},[])},o6=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;r6();var s=u.useMemo(function(){return e6(o)},[o]);return u.createElement(t6,{styles:n6(s,!t,o,n?"":"!important")})},zc=!1;if(typeof window<"u")try{var Rl=Object.defineProperty({},"passive",{get:function(){return zc=!0,!0}});window.addEventListener("test",Rl,Rl),window.removeEventListener("test",Rl,Rl)}catch{zc=!1}var Gr=zc?{passive:!1}:!1,s6=function(e){return e.tagName==="TEXTAREA"},Qh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!s6(e)&&n[t]==="visible")},l6=function(e){return Qh(e,"overflowY")},i6=function(e){return Qh(e,"overflowX")},hm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Jh(e,r);if(o){var s=eg(e,r),l=s[1],i=s[2];if(l>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},a6=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},c6=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jh=function(e,t){return e==="v"?l6(t):i6(t)},eg=function(e,t){return e==="v"?a6(t):c6(t)},u6=function(e,t){return e==="h"&&t==="rtl"?-1:1},d6=function(e,t,n,r,o){var s=u6(e,window.getComputedStyle(t).direction),l=s*r,i=n.target,a=t.contains(i),d=!1,f=l>0,m=0,p=0;do{var h=eg(e,i),y=h[0],g=h[1],v=h[2],b=g-v-s*y;(y||b)&&Jh(e,i)&&(m+=b,p+=y),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!a&&i!==document.body||a&&(t.contains(i)||t===i));return(f&&Math.abs(m)<1||!f&&Math.abs(p)<1)&&(d=!0),d},jl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gm=function(e){return[e.deltaX,e.deltaY]},ym=function(e){return e&&"current"in e?e.current:e},f6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},m6=function(e){return`
|
|
40
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
41
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
42
|
+
`)},p6=0,Ur=[];function h6(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(p6++)[0],s=u.useState(Kh)[0],l=u.useRef(e);u.useEffect(function(){l.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=O4([e.lockRef.current],(e.shards||[]).map(ym)).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!l.current.allowPinchZoom;var b=jl(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-b[0],_="deltaY"in g?g.deltaY:w[1]-b[1],C,E=g.target,k=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in g&&k==="h"&&E.type==="range")return!1;var R=hm(k,E);if(!R)return!0;if(R?C=k:(C=k==="v"?"h":"v",R=hm(k,E)),!R)return!1;if(!r.current&&"changedTouches"in g&&(x||_)&&(r.current=C),!C)return!0;var j=r.current||C;return d6(j,v,g,j==="h"?x:_)},[]),a=u.useCallback(function(g){var v=g;if(!(!Ur.length||Ur[Ur.length-1]!==s)){var b="deltaY"in v?gm(v):jl(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&f6(C.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var x=(l.current.shards||[]).map(ym).filter(Boolean).filter(function(C){return C.contains(v.target)}),_=x.length>0?i(v,x[0]):!l.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),d=u.useCallback(function(g,v,b,w){var x={name:g,delta:v,target:b,should:w,shadowParent:g6(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),f=u.useCallback(function(g){n.current=jl(g),r.current=void 0},[]),m=u.useCallback(function(g){d(g.type,gm(g),g.target,i(g,e.lockRef.current))},[]),p=u.useCallback(function(g){d(g.type,jl(g),g.target,i(g,e.lockRef.current))},[]);u.useEffect(function(){return Ur.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",a,Gr),document.addEventListener("touchmove",a,Gr),document.addEventListener("touchstart",f,Gr),function(){Ur=Ur.filter(function(g){return g!==s}),document.removeEventListener("wheel",a,Gr),document.removeEventListener("touchmove",a,Gr),document.removeEventListener("touchstart",f,Gr)}},[]);var h=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(s,{styles:m6(o)}):null,h?u.createElement(o6,{gapMode:e.gapMode}):null)}function g6(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const y6=U4(Zh,h6);var Zs=u.forwardRef(function(e,t){return u.createElement(ra,tn({},e,{ref:t,sideCar:y6}))});Zs.classNames=ra.classNames;var v6=[" ","Enter","ArrowUp","ArrowDown"],b6=[" ","Enter"],Ks="Select",[oa,sa,w6]=td(Ks),[Io]=Gt(Ks,[w6,cr]),la=cr(),[x6,ur]=Io(Ks),[C6,_6]=Io(Ks),tg=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:l,defaultValue:i,onValueChange:a,dir:d,name:f,autoComplete:m,disabled:p,required:h,form:y}=e,g=la(t),[v,b]=u.useState(null),[w,x]=u.useState(null),[_,C]=u.useState(!1),E=Vs(d),[k=!1,R]=lr({prop:r,defaultProp:o,onChange:s}),[j,M]=lr({prop:l,defaultProp:i,onChange:a}),D=u.useRef(null),$=v?y||!!v.closest("form"):!0,[X,A]=u.useState(new Set),Z=Array.from(X).map(q=>q.props.value).join(";");return c.jsx(Yi,{...g,children:c.jsxs(x6,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Lt(),value:j,onValueChange:M,open:k,onOpenChange:R,dir:E,triggerPointerDownPosRef:D,disabled:p,children:[c.jsx(oa.Provider,{scope:t,children:c.jsx(C6,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(q=>{A(K=>new Set(K).add(q))},[]),onNativeOptionRemove:u.useCallback(q=>{A(K=>{const H=new Set(K);return H.delete(q),H})},[]),children:n})}),$?c.jsxs(xg,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:m,value:j,onChange:q=>M(q.target.value),disabled:p,form:y,children:[j===void 0?c.jsx("option",{value:""}):null,Array.from(X)]},Z):null]})})};tg.displayName=Ks;var ng="SelectTrigger",rg=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=la(n),l=ur(ng,n),i=l.disabled||r,a=se(t,l.onTriggerChange),d=sa(n),f=u.useRef("touch"),[m,p,h]=Cg(g=>{const v=d().filter(x=>!x.disabled),b=v.find(x=>x.value===l.value),w=_g(v,g,b);w!==void 0&&l.onValueChange(w.value)}),y=g=>{i||(l.onOpenChange(!0),h()),g&&(l.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return c.jsx(Gs,{asChild:!0,...s,children:c.jsx(Q.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":wg(l.value)?"":void 0,...o,ref:a,onClick:z(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&y(g)}),onPointerDown:z(o.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:z(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&v6.includes(g.key)&&(y(),g.preventDefault())})})})});rg.displayName=ng;var og="SelectValue",sg=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:l="",...i}=e,a=ur(og,n),{onValueNodeHasChildrenChange:d}=a,f=s!==void 0,m=se(t,a.onValueNodeChange);return st(()=>{d(f)},[d,f]),c.jsx(Q.span,{...i,ref:m,style:{pointerEvents:"none"},children:wg(a.value)?c.jsx(c.Fragment,{children:l}):s})});sg.displayName=og;var k6="SelectIcon",S6=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(Q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});S6.displayName=k6;var E6="SelectPortal",lg=e=>c.jsx(_o,{asChild:!0,...e});lg.displayName=E6;var kr="SelectContent",ig=u.forwardRef((e,t)=>{const n=ur(kr,e.__scopeSelect),[r,o]=u.useState();if(st(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Nt.createPortal(c.jsx(ag,{scope:e.__scopeSelect,children:c.jsx(oa.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),s):null}return c.jsx(cg,{...e,ref:t})});ig.displayName=kr;var Dt=10,[ag,dr]=Io(kr),R6="SelectContentImpl",cg=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:l,side:i,sideOffset:a,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,w=ur(kr,n),[x,_]=u.useState(null),[C,E]=u.useState(null),k=se(t,U=>_(U)),[R,j]=u.useState(null),[M,D]=u.useState(null),$=sa(n),[X,A]=u.useState(!1),Z=u.useRef(!1);u.useEffect(()=>{if(x)return na(x)},[x]),ta();const q=u.useCallback(U=>{const[le,...ce]=$().map(ie=>ie.ref.current),[G]=ce.slice(-1),fe=document.activeElement;for(const ie of U)if(ie===fe||(ie?.scrollIntoView({block:"nearest"}),ie===le&&C&&(C.scrollTop=0),ie===G&&C&&(C.scrollTop=C.scrollHeight),ie?.focus(),document.activeElement!==fe))return},[$,C]),K=u.useCallback(()=>q([R,x]),[q,R,x]);u.useEffect(()=>{X&&K()},[X,K]);const{onOpenChange:H,triggerPointerDownPosRef:N}=w;u.useEffect(()=>{if(x){let U={x:0,y:0};const le=G=>{var fe,ie;U={x:Math.abs(Math.round(G.pageX)-(((fe=N.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(G.pageY)-(((ie=N.current)==null?void 0:ie.y)??0))}},ce=G=>{U.x<=10&&U.y<=10?G.preventDefault():x.contains(G.target)||H(!1),document.removeEventListener("pointermove",le),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",ce,{capture:!0})}}},[x,H,N]),u.useEffect(()=>{const U=()=>H(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[H]);const[oe,Te]=Cg(U=>{const le=$().filter(fe=>!fe.disabled),ce=le.find(fe=>fe.ref.current===document.activeElement),G=_g(le,U,ce);G&&setTimeout(()=>G.ref.current.focus())}),pe=u.useCallback((U,le,ce)=>{const G=!Z.current&&!ce;(w.value!==void 0&&w.value===le||G)&&(j(U),G&&(Z.current=!0))},[w.value]),ve=u.useCallback(()=>x?.focus(),[x]),we=u.useCallback((U,le,ce)=>{const G=!Z.current&&!ce;(w.value!==void 0&&w.value===le||G)&&D(U)},[w.value]),Qe=r==="popper"?Fc:ug,Ee=Qe===Fc?{side:i,sideOffset:a,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return c.jsx(ag,{scope:n,content:x,viewport:C,onViewportChange:E,itemRefCallback:pe,selectedItem:R,onItemLeave:ve,itemTextRefCallback:we,focusSelectedItem:K,selectedItemText:M,position:r,isPositioned:X,searchRef:oe,children:c.jsx(Zs,{as:nr,allowPinchZoom:!0,children:c.jsx(Xs,{asChild:!0,trapped:w.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:z(o,U=>{var le;(le=w.trigger)==null||le.focus({preventScroll:!0}),U.preventDefault()}),children:c.jsx(wo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:c.jsx(Qe,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:U=>U.preventDefault(),...b,...Ee,onPlaced:()=>A(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:z(b.onKeyDown,U=>{const le=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!le&&U.key.length===1&&Te(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let G=$().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(U.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const fe=U.target,ie=G.indexOf(fe);G=G.slice(ie+1)}setTimeout(()=>q(G)),U.preventDefault()}})})})})})})});cg.displayName=R6;var j6="SelectItemAlignedPosition",ug=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=ur(kr,n),l=dr(kr,n),[i,a]=u.useState(null),[d,f]=u.useState(null),m=se(t,k=>f(k)),p=sa(n),h=u.useRef(!1),y=u.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=l,x=u.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&g&&v&&b){const k=s.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(s.dir!=="rtl"){const fe=M.left-R.left,ie=j.left-fe,ze=k.left-ie,Fe=k.width+ze,Ct=Math.max(Fe,R.width),_t=window.innerWidth-Dt,On=Nc(ie,[Dt,Math.max(Dt,_t-Ct)]);i.style.minWidth=Fe+"px",i.style.left=On+"px"}else{const fe=R.right-M.right,ie=window.innerWidth-j.right-fe,ze=window.innerWidth-k.right-ie,Fe=k.width+ze,Ct=Math.max(Fe,R.width),_t=window.innerWidth-Dt,On=Nc(ie,[Dt,Math.max(Dt,_t-Ct)]);i.style.minWidth=Fe+"px",i.style.right=On+"px"}const D=p(),$=window.innerHeight-Dt*2,X=g.scrollHeight,A=window.getComputedStyle(d),Z=parseInt(A.borderTopWidth,10),q=parseInt(A.paddingTop,10),K=parseInt(A.borderBottomWidth,10),H=parseInt(A.paddingBottom,10),N=Z+q+X+H+K,oe=Math.min(v.offsetHeight*5,N),Te=window.getComputedStyle(g),pe=parseInt(Te.paddingTop,10),ve=parseInt(Te.paddingBottom,10),we=k.top+k.height/2-Dt,Qe=$-we,Ee=v.offsetHeight/2,U=v.offsetTop+Ee,le=Z+q+U,ce=N-le;if(le<=we){const fe=D.length>0&&v===D[D.length-1].ref.current;i.style.bottom="0px";const ie=d.clientHeight-g.offsetTop-g.offsetHeight,ze=Math.max(Qe,Ee+(fe?ve:0)+ie+K),Fe=le+ze;i.style.height=Fe+"px"}else{const fe=D.length>0&&v===D[0].ref.current;i.style.top="0px";const ze=Math.max(we,Z+g.offsetTop+(fe?pe:0)+Ee)+ce;i.style.height=ze+"px",g.scrollTop=le-we+g.offsetTop}i.style.margin=`${Dt}px 0`,i.style.minHeight=oe+"px",i.style.maxHeight=$+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,i,d,g,v,b,s.dir,r]);st(()=>x(),[x]);const[_,C]=u.useState();st(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const E=u.useCallback(k=>{k&&y.current===!0&&(x(),w?.(),y.current=!1)},[x,w]);return c.jsx(L6,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:c.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:c.jsx(Q.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ug.displayName=j6;var T6="SelectPopperPosition",Fc=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Dt,...s}=e,l=la(n);return c.jsx(Vi,{...l,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Fc.displayName=T6;var[L6,nd]=Io(kr,{}),Bc="SelectViewport",dg=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=dr(Bc,n),l=nd(Bc,n),i=se(t,s.onViewportChange),a=u.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),c.jsx(oa.Slot,{scope:n,children:c.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:z(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=l;if(p?.current&&m){const h=Math.abs(a.current-f.scrollTop);if(h>0){const y=window.innerHeight-Dt*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),b=Math.max(g,v);if(b<y){const w=b+h,x=Math.min(y,w),_=w-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=_>0?_:0,m.style.justifyContent="flex-end")}}}a.current=f.scrollTop})})})]})});dg.displayName=Bc;var fg="SelectGroup",[M6,A6]=Io(fg),mg=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lt();return c.jsx(M6,{scope:n,id:o,children:c.jsx(Q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});mg.displayName=fg;var pg="SelectLabel",I6=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=A6(pg,n);return c.jsx(Q.div,{id:o.id,...r,ref:t})});I6.displayName=pg;var pi="SelectItem",[P6,hg]=Io(pi),gg=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...l}=e,i=ur(pi,n),a=dr(pi,n),d=i.value===r,[f,m]=u.useState(s??""),[p,h]=u.useState(!1),y=se(t,w=>{var x;return(x=a.itemRefCallback)==null?void 0:x.call(a,w,r,o)}),g=Lt(),v=u.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(P6,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:u.useCallback(w=>{m(x=>x||(w?.textContent??"").trim())},[]),children:c.jsx(oa.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:c.jsx(Q.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:y,onFocus:z(l.onFocus,()=>h(!0)),onBlur:z(l.onBlur,()=>h(!1)),onClick:z(l.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:z(l.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:z(l.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:z(l.onPointerMove,w=>{var x;v.current=w.pointerType,o?(x=a.onItemLeave)==null||x.call(a):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(l.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=a.onItemLeave)==null||x.call(a))}),onKeyDown:z(l.onKeyDown,w=>{var x;((x=a.searchRef)==null?void 0:x.current)!==""&&w.key===" "||(b6.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});gg.displayName=pi;var is="SelectItemText",yg=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,l=ur(is,n),i=dr(is,n),a=hg(is,n),d=_6(is,n),[f,m]=u.useState(null),p=se(t,b=>m(b),a.onItemTextChange,b=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,b,a.value,a.disabled)}),h=f?.textContent,y=u.useMemo(()=>c.jsx("option",{value:a.value,disabled:a.disabled,children:h},a.value),[a.disabled,a.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=d;return st(()=>(g(y),()=>v(y)),[g,v,y]),c.jsxs(c.Fragment,{children:[c.jsx(Q.span,{id:a.textId,...s,ref:p}),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Nt.createPortal(s.children,l.valueNode):null]})});yg.displayName=is;var vg="SelectItemIndicator",D6=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return hg(vg,n).isSelected?c.jsx(Q.span,{"aria-hidden":!0,...r,ref:t}):null});D6.displayName=vg;var qc="SelectScrollUpButton",O6=u.forwardRef((e,t)=>{const n=dr(qc,e.__scopeSelect),r=nd(qc,e.__scopeSelect),[o,s]=u.useState(!1),l=se(t,r.onScrollButtonChange);return st(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=a.scrollTop>0;s(d)};const a=n.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(bg,{...e,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=n;i&&a&&(i.scrollTop=i.scrollTop-a.offsetHeight)}}):null});O6.displayName=qc;var Wc="SelectScrollDownButton",N6=u.forwardRef((e,t)=>{const n=dr(Wc,e.__scopeSelect),r=nd(Wc,e.__scopeSelect),[o,s]=u.useState(!1),l=se(t,r.onScrollButtonChange);return st(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=a.scrollHeight-a.clientHeight,f=Math.ceil(a.scrollTop)<d;s(f)};const a=n.viewport;return i(),a.addEventListener("scroll",i),()=>a.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(bg,{...e,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:a}=n;i&&a&&(i.scrollTop=i.scrollTop+a.offsetHeight)}}):null});N6.displayName=Wc;var bg=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=dr("SelectScrollButton",n),l=u.useRef(null),i=sa(n),a=u.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return u.useEffect(()=>()=>a(),[a]),st(()=>{var d;const f=i().find(m=>m.ref.current===document.activeElement);(d=f?.ref.current)==null||d.scrollIntoView({block:"nearest"})},[i]),c.jsx(Q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:z(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:z(o.onPointerMove,()=>{var d;(d=s.onItemLeave)==null||d.call(s),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:z(o.onPointerLeave,()=>{a()})})}),$6="SelectSeparator",z6=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(Q.div,{"aria-hidden":!0,...r,ref:t})});z6.displayName=$6;var Gc="SelectArrow",F6=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=la(n),s=ur(Gc,n),l=dr(Gc,n);return s.open&&l.position==="popper"?c.jsx(Hi,{...o,...r,ref:t}):null});F6.displayName=Gc;function wg(e){return e===""||e===void 0}var xg=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=u.useRef(null),s=se(t,o),l=A4(n);return u.useEffect(()=>{const i=o.current,a=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==n&&f){const m=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(m)}},[l,n]),c.jsx(Gu,{asChild:!0,children:c.jsx("select",{...r,ref:s,defaultValue:n})})});xg.displayName="BubbleSelect";function Cg(e){const t=Ge(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(l=>{const i=n.current+l;t(i),(function a(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>a(""),1e3))})(i)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function _g(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=B6(e,Math.max(s,0));o.length===1&&(l=l.filter(d=>d!==n));const a=l.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function B6(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var q6=tg,W6=rg,G6=sg,U6=lg,Y6=ig,V6=dg,H6=mg,X6=gg,Z6=yg;const K6="default";function ia({value:e,placeholder:t,size:n=K6,icon:r,onChange:o,onKeyDown:s,hasClear:l=!1,customStyle:i}){const[a,d]=u.useState(!1),f=u.useRef(null),m=y=>{o(y.target.value)},p=()=>{d(!0)},h=y=>{f.current==null||y.relatedTarget!==f.current?d(!1):y.target.focus()};return c.jsxs("div",{...S.props(Qo.main,a&&Qo.focused,Q6[n],i),children:[r&&c.jsx(ne,{name:r,color:"secondary"}),c.jsx("input",{...S.props(F.body,Qo.input),value:e,placeholder:t,onChange:m,onFocus:p,onBlur:h,onKeyDown:s}),l&&c.jsx("button",{...S.props(F.supporting,Qo.actionButton,e===""&&Qo.hidden),ref:f,onClick:()=>o(""),tabIndex:0,children:"Clear"})]})}const Qo={main:{display:"mly78zum5",alignItems:"mly6s0dn4",justifyContent:"mly1nhvcw1",background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mlyhu5y25",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mlyk1e6ed",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},focused:{borderColor:"mlyv66to0",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,boxShadow:"mly118a1h2",$$css:!0},input:{flexGrow:"mly1iyjqo2",height:"mly1qx5ct2",minWidth:"mlygc0pbm",padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderStyle:"mlyng3xce",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,"::placeholder_color":"mlyf2qczu",$$css:!0},actionButton:{display:"mly3nfvp2",borderWidth:"mlyc342km",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,background:"mly1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,marginLeft:"mly1iog12x",marginInlineStart:null,marginInlineEnd:null,cursor:"mly1ypdohk",color:"mly17rwmdj",$$css:!0},hidden:{visibility:"mlylshs6z",$$css:!0}},Q6={default:{padding:"mly153ncpu",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},compact:{padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function ks({value:e,onChange:t,icon:n,color:r=Ao,size:o=ed,items:s,isSearchable:l=!1,customStyle:i}){var a;const{theme:d}=u.useContext(Me),[f,m]=u.useState(""),p=u.useMemo(()=>f?s.filter(g=>g.label.toLowerCase().includes(f.toLowerCase())):s,[s,f]),h=g=>{t(g)},y=(a=s.find(g=>g.value===e))==null?void 0:a.label;return c.jsxs(q6,{value:e,onValueChange:h,required:!0,children:[c.jsxs(W6,{...S.props(Qn.main,oo.selectTrigger,Qu[r],Ju[o],i),children:[n&&c.jsx(ne,{name:n,customStyle:Qn.icon}),c.jsx(G6,{asChild:!0,children:c.jsx("div",{...S.props(F.body,Qn.label),children:y})})]}),c.jsx(U6,{children:c.jsx(Y6,{side:"bottom",position:"popper",sideOffset:4,children:c.jsxs(V6,{...S.props(oo.selectViewport,d),children:[l&&c.jsx(ia,{value:f,onChange:g=>m(g),placeholder:"Search",size:"compact",icon:"search",hasClear:!0,customStyle:oo.searchInput,onKeyDown:g=>{["ArrowUp","ArrowDown"].includes(g.key)||setTimeout(()=>{g.target.focus()},10)}}),c.jsx(H6,{className:"mly78zum5 mlydt5ytf mlyuyqlj2 mlyfawy5m mly195vfkc mlyysyzu8",children:p.map(g=>c.jsx(J6,{value:g.value,selectedValue:e,children:g.label},g.value))})]})})})]})}function J6({children:e,value:t,selectedValue:n,...r}){return c.jsxs(X6,{...S.props(F.body,oo.selectItem),value:t,...r,children:[t===n?c.jsx(ne,{name:"radioChecked",customStyle:oo.radioChecked}):c.jsx(ne,{name:"radioUnchecked",customStyle:oo.radioUnchecked}),c.jsx(Z6,{children:e})]})}const oo={selectTrigger:{whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},selectViewport:{borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mly17fq3gk",$$css:!0},selectItem:{display:"mly78zum5",alignItems:"mly6s0dn4",padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,cursor:"mly1ypdohk",outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,":is([data-highlighted])_background":"mly1vg538p",":is([data-highlighted])_backgroundAttachment":null,":is([data-highlighted])_backgroundClip":null,":is([data-highlighted])_backgroundColor":null,":is([data-highlighted])_backgroundImage":null,":is([data-highlighted])_backgroundOrigin":null,":is([data-highlighted])_backgroundPosition":null,":is([data-highlighted])_backgroundPositionX":null,":is([data-highlighted])_backgroundPositionY":null,":is([data-highlighted])_backgroundRepeat":null,":is([data-highlighted])_backgroundSize":null,':is([data-state="checked"])_background':"mly1tx4nyv mly1julgsk",':is([data-state="checked"])_backgroundAttachment':null,':is([data-state="checked"])_backgroundClip':null,':is([data-state="checked"])_backgroundColor':null,':is([data-state="checked"])_backgroundImage':null,':is([data-state="checked"])_backgroundOrigin':null,':is([data-state="checked"])_backgroundPosition':null,':is([data-state="checked"])_backgroundPositionX':null,':is([data-state="checked"])_backgroundPositionY':null,':is([data-state="checked"])_backgroundRepeat':null,':is([data-state="checked"])_backgroundSize':null,$$css:!0},radioChecked:{color:"mly1tw9ct1",$$css:!0},radioUnchecked:{color:"mlyann5r3",$$css:!0},searchInput:{borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function e7({header:e,children:t,customStyle:n}){return c.jsxs("div",{...S.props(t7.container,n),children:[c.jsx("div",{className:"mly1717udv",children:e}),c.jsx("div",{className:"mly1y1aw1k mly1iyjqo2 mly78zum5",children:t})]})}const t7={container:{display:"mly78zum5",flexDirection:"mlydt5ytf",background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderStyle:"mly1y0btm7",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderColor:"mly17v018m",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,flexShrink:"mly2lah0s",$$css:!0}};function rd({title:e,children:t,icon:n,defaultOpen:r=!0,controls:o,collapsedControls:s,isFocused:l=!1}){const[i,a]=u.useState(r);return c.jsxs("div",{...{0:{className:"mly1ga53z4 mly1sxf85j mly1717udv"},1:{className:"mly1sxf85j mly1717udv mly1p9pjdr"}}[!!l<<0],children:[c.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly52fmzj mlylqzeqv mlyfawy5m mly167g77z mly6s0dn4",children:[c.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly167g77z",children:[n&&c.jsx(ne,{name:n,customStyle:n7.icon}),c.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4",children:e})]}),c.jsxs("div",{className:"mly78zum5",children:[i?c.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:o}):c.jsx("div",{className:"mly78zum5 mly6s0dn4 mly1jnr06f",children:s}),c.jsx(be,{variant:"flat",size:"compact",onClick:()=>a(!i),icon:i?"chevronDown":"chevronRight",tooltip:i?"Collapse":"Expand"})]})]}),c.jsx("div",{...{0:{className:"mly1l4tkcb"},1:{className:"mly1l4tkcb mly1s85apg"}}[!i<<0],children:t})]})}const n7={icon:{$$css:!0}};function r7({label:e,sublabel:t,children:n,isInitiallyExpanded:r=!1}){const[o,s]=u.useState(r),l=()=>{s(i=>!i)};return c.jsxs("div",{children:[c.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mlyur7f20 mly1ypdohk mly1haqvef",onClick:l,children:[o?c.jsx(ne,{name:"chevronDown",color:"secondary"}):c.jsx(ne,{name:"chevronRight",color:"secondary"}),c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr",children:[c.jsx("span",{...S.props(F.body,vm.label),children:e}),t&&c.jsx("span",{...S.props(F.supporting,vm.sublabel),children:t})]})]}),o&&c.jsx("div",{className:"mly78zum5 mlydt5ytf mly92jh8x mly1jnr06f",children:u.Children.map(n,i=>i)})]})}const vm={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},o7={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},s7={single:"1em",double:"2em"},l7=({lineSpacing:e})=>({line(t){const n=[...Array.isArray(t.properties.style)?t.properties.style:typeof t.properties.style=="string"?[t.properties.style]:[]];n.push(`line-height: ${s7[e]};`),t.properties.style=n}}),i7=({showLineNumbers:e})=>{if(e)return{line(t,n){const r={type:"element",tagName:"span",children:[{type:"text",value:`${n}`}],properties:{style:["color: rgba(115, 138, 148, 0.4);","margin-right: 35px;","width: 1px;","display: inline-block;","user-select: none"]}};t.children.unshift(r)}}},a7=[l7,i7];function c7(e){return a7.map(t=>t(e)).filter(t=>t!==void 0)}let He=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function u7(e){return od(e)}function od(e){return Array.isArray(e)?d7(e):e instanceof RegExp?e:typeof e=="object"?f7(e):e}function d7(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=od(e[n]);return t}function f7(e){let t={};for(let n in e)t[n]=od(e[n]);return t}function kg(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Sg(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Sg(e.substring(0,e.length-1)):e.substr(~t+1)}var Ja=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Tl=class{static hasCaptures(e){return e===null?!1:(Ja.lastIndex=0,Ja.test(e))}static replaceCaptures(e,t,n){return e.replace(Ja,(r,o,s,l)=>{let i=n[parseInt(o||s,10)];if(i){let a=t.substring(i.start,i.end);for(;a[0]===".";)a=a.substring(1);switch(l){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Eg(e,t){return e<t?-1:e>t?1:0}function Rg(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let o=0;o<n;o++){let s=Eg(e[o],t[o]);if(s!==0)return s}return 0}return n-r}function bm(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function jg(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Tg=class{constructor(e){T(this,"cache",new Map),this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},hi=class{constructor(e,t,n){T(this,"_cachedMatchRoot",new Tg(r=>this._root.match(r))),this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(h7(e),t)}static createFromParsedTheme(e,t){return y7(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(o=>m7(e.parent,o.parentScopes));return r?new Lg(r.fontStyle,r.foreground,r.background):null}},ec=class Ql{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ql(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ql(n,t[r]);return n}push(t){return new Ql(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function m7(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!p7(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function p7(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Lg=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function h7(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,s=t.length;o<s;o++){let l=t[o];if(!l.settings)continue;let i;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),i=m.split(",")}else Array.isArray(l.scope)?i=l.scope:i=[""];let a=-1;if(typeof l.settings.fontStyle=="string"){a=0;let m=l.settings.fontStyle.split(" ");for(let p=0,h=m.length;p<h;p++)switch(m[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let d=null;typeof l.settings.foreground=="string"&&bm(l.settings.foreground)&&(d=l.settings.foreground);let f=null;typeof l.settings.background=="string"&&bm(l.settings.background)&&(f=l.settings.background);for(let m=0,p=i.length;m<p;m++){let y=i[m].trim().split(" "),g=y[y.length-1],v=null;y.length>1&&(v=y.slice(0,y.length-1),v.reverse()),n[r++]=new g7(g,v,o,a,d,f)}}return n}var g7=class{constructor(e,t,n,r,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=s}},rt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(rt||{});function y7(e,t){e.sort((a,d)=>{let f=Eg(a.scope,d.scope);return f!==0||(f=Rg(a.parentScopes,d.parentScopes),f!==0)?f:a.index-d.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(o=a.background)}let s=new v7(t),l=new Lg(n,s.getId(r),s.getId(o)),i=new w7(new Uc(0,null,-1,0,0),[]);for(let a=0,d=e.length;a<d;a++){let f=e[a];i.insert(0,f.scope,f.parentScopes,f.fontStyle,s.getId(f.foreground),s.getId(f.background))}return new hi(s,l,i)}var v7=class{constructor(e){if(T(this,"_isFrozen"),T(this,"_lastColorId"),T(this,"_id2color"),T(this,"_color2id"),this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},b7=Object.freeze([]),Uc=class Mg{constructor(t,n,r,o,s){T(this,"scopeDepth"),T(this,"parentScopes"),T(this,"fontStyle"),T(this,"foreground"),T(this,"background"),this.scopeDepth=t,this.parentScopes=n||b7,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new Mg(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},w7=class Yc{constructor(t,n=[],r={}){T(this,"_rulesWithParentScopes"),this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){const s=n.parentScopes[o].length-t.parentScopes[r].length;if(s!==0)return s;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,s;if(r===-1?(o=t,s=""):(o=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Yc._cmpBySpecificity),n}insert(t,n,r,o,s,l){if(n===""){this._doInsertHere(t,r,o,s,l);return}let i=n.indexOf("."),a,d;i===-1?(a=n,d=""):(a=n.substring(0,i),d=n.substring(i+1));let f;this._children.hasOwnProperty(a)?f=this._children[a]:(f=new Yc(this._mainRule.clone(),Uc.cloneArr(this._rulesWithParentScopes)),this._children[a]=f),f.insert(t+1,d,r,o,s,l)}_doInsertHere(t,n,r,o,s){if(n===null){this._mainRule.acceptOverwrite(t,r,o,s);return}for(let l=0,i=this._rulesWithParentScopes.length;l<i;l++){let a=this._rulesWithParentScopes[l];if(Rg(a.parentScopes,n)===0){a.acceptOverwrite(t,r,o,s);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Uc(t,n,r,o,s))}},Sr=class St{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=St.getLanguageId(t),r=St.getTokenType(t),o=St.getFontStyle(t),s=St.getForeground(t),l=St.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:s,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,o,s,l,i){let a=St.getLanguageId(t),d=St.getTokenType(t),f=St.containsBalancedBrackets(t)?1:0,m=St.getFontStyle(t),p=St.getForeground(t),h=St.getBackground(t);return n!==0&&(a=n),r!==8&&(d=r),o!==null&&(f=o?1:0),s!==-1&&(m=s),l!==0&&(p=l),i!==0&&(h=i),(a<<0|d<<8|f<<10|m<<11|p<<15|h<<24)>>>0}};function gi(e,t){const n=[],r=x7(e);let o=r.next();for(;o!==null;){let a=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let d=l();if(n.push({matcher:d,priority:a}),o!==",")break;o=r.next()}return n;function s(){if(o==="-"){o=r.next();const a=s();return d=>!!a&&!a(d)}if(o==="("){o=r.next();const a=i();return o===")"&&(o=r.next()),a}if(wm(o)){const a=[];do a.push(o),o=r.next();while(wm(o));return d=>t(a,d)}return null}function l(){const a=[];let d=s();for(;d;)a.push(d),d=s();return f=>a.every(m=>m(f))}function i(){const a=[];let d=l();for(;d&&(a.push(d),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");d=l()}return f=>a.some(m=>m(f))}}function wm(e){return!!e&&!!e.match(/[\w\.:]+/)}function x7(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Ag(e){typeof e.dispose=="function"&&e.dispose()}var Ss=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},C7=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},_7=class{constructor(){T(this,"_references",[]),T(this,"_seenReferenceKeys",new Set),T(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},k7=class{constructor(e,t){T(this,"seenFullScopeRequests",new Set),T(this,"seenPartialScopeRequests",new Set),T(this,"Q"),this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ss(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new _7;for(const n of e)S7(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ss){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function S7(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Ss?Jl({baseGrammar:s,selfGrammar:o},r):Vc(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);const l=n.injections(e.scopeName);if(l)for(const i of l)r.add(new Ss(i))}function Vc(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];yi([r],t,n)}}function Jl(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yi(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?kg({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&yi(r.patterns,{...t,repository:o},n);const s=r.include;if(!s)continue;const l=Ig(s);switch(l.kind){case 0:Jl({...t,selfGrammar:t.baseGrammar},n);break;case 1:Jl(t,n);break;case 2:Vc(l.ruleName,{...t,repository:o},n);break;case 3:case 4:const i=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(i){const a={baseGrammar:t.baseGrammar,selfGrammar:i,repository:o};l.kind===4?Vc(l.ruleName,a,n):Jl(a,n)}else l.kind===4?n.add(new C7(l.scopeName,l.ruleName)):n.add(new Ss(l.scopeName));break}}}var E7=class{constructor(){T(this,"kind",0)}},R7=class{constructor(){T(this,"kind",1)}},j7=class{constructor(e){T(this,"kind",2),this.ruleName=e}},T7=class{constructor(e){T(this,"kind",3),this.scopeName=e}},L7=class{constructor(e,t){T(this,"kind",4),this.scopeName=e,this.ruleName=t}};function Ig(e){if(e==="$base")return new E7;if(e==="$self")return new R7;const t=e.indexOf("#");if(t===-1)return new T7(e);if(t===0)return new j7(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new L7(n,r)}}var M7=/\\(\d+)/,xm=/\\(\d+)/g,A7=-1,Pg=-2;var Qs=class{constructor(e,t,n,r){T(this,"$location"),T(this,"id"),T(this,"_nameIsCapturing"),T(this,"_name"),T(this,"_contentNameIsCapturing"),T(this,"_contentName"),this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Tl.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Tl.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Sg(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Tl.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Tl.replaceCaptures(this._contentName,e,t)}},I7=class extends Qs{constructor(e,t,n,r,o){super(e,t,n,r),T(this,"retokenizeCapturedWithRuleId"),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},P7=class extends Qs{constructor(e,t,n,r,o){super(e,t,n,null),T(this,"_match"),T(this,"captures"),T(this,"_cachedCompiledPatterns"),this._match=new Es(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rs,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Cm=class extends Qs{constructor(e,t,n,r,o){super(e,t,n,r),T(this,"hasMissingPatterns"),T(this,"patterns"),T(this,"_cachedCompiledPatterns"),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Rs,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Hc=class extends Qs{constructor(e,t,n,r,o,s,l,i,a,d){super(e,t,n,r),T(this,"_begin"),T(this,"beginCaptures"),T(this,"_end"),T(this,"endHasBackReferences"),T(this,"endCaptures"),T(this,"applyEndPatternLast"),T(this,"hasMissingPatterns"),T(this,"patterns"),T(this,"_cachedCompiledPatterns"),this._begin=new Es(o,this.id),this.beginCaptures=s,this._end=new Es(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=a||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rs;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vi=class extends Qs{constructor(e,t,n,r,o,s,l,i,a){super(e,t,n,r),T(this,"_begin"),T(this,"beginCaptures"),T(this,"whileCaptures"),T(this,"_while"),T(this,"whileHasBackReferences"),T(this,"hasMissingPatterns"),T(this,"patterns"),T(this,"_cachedCompiledPatterns"),T(this,"_cachedCompiledWhilePatterns"),this._begin=new Es(o,this.id),this.beginCaptures=s,this.whileCaptures=i,this._while=new Es(l,Pg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Rs;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Rs,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Dg=class et{static createCaptureRule(t,n,r,o,s){return t.registerRule(l=>new I7(n,l,r,o,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new P7(t.$vscodeTextmateLocation,t.id,t.name,t.match,et._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=kg({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Cm(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,et._compilePatterns(s,n,r))}return t.while?new vi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,et._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,et._compileCaptures(t.whileCaptures||t.captures,n,r),et._compilePatterns(t.patterns,n,r)):new Hc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,et._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,et._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,et._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const i=parseInt(l,10);i>s&&(s=i)}for(let l=0;l<=s;l++)o[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const i=parseInt(l,10);let a=0;t[l].patterns&&(a=et.getCompiledRuleId(t[l],n,r)),o[i]=et.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,a)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let s=0,l=t.length;s<l;s++){const i=t[s];let a=-1;if(i.include){const d=Ig(i.include);switch(d.kind){case 0:case 1:a=et.getCompiledRuleId(r[i.include],n,r);break;case 2:let f=r[d.ruleName];f&&(a=et.getCompiledRuleId(f,n,r));break;case 3:case 4:const m=d.scopeName,p=d.kind===4?d.ruleName:null,h=n.getExternalGrammar(m,r);if(h)if(p){let y=h.repository[p];y&&(a=et.getCompiledRuleId(y,n,h.repository))}else a=et.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else a=et.getCompiledRuleId(i,n,r);if(a!==-1){const d=n.getRule(a);let f=!1;if((d instanceof Cm||d instanceof Hc||d instanceof vi)&&d.hasMissingPatterns&&d.patterns.length===0&&(f=!0),f)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Es=class Og{constructor(t,n){if(T(this,"source"),T(this,"ruleId"),T(this,"hasAnchor"),T(this,"hasBackReferences"),T(this,"_anchorCache"),t&&typeof t=="string"){const r=t.length;let o=0,s=[],l=!1;for(let i=0;i<r;i++)if(t.charAt(i)==="\\"&&i+1<r){const d=t.charAt(i+1);d==="z"?(s.push(t.substring(o,i)),s.push("$(?!\\n)(?<!\\n)"),o=i+2):(d==="A"||d==="G")&&(l=!0),i++}this.hasAnchor=l,o===0?this.source=t:(s.push(t.substring(o,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=M7.test(this.source):this.hasBackReferences=!1}clone(){return new Og(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(o=>t.substring(o.start,o.end));return xm.lastIndex=0,this.source.replace(xm,(o,s)=>jg(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],o=[],s,l,i,a;for(s=0,l=this.source.length;s<l;s++)i=this.source.charAt(s),t[s]=i,n[s]=i,r[s]=i,o[s]=i,i==="\\"&&s+1<l&&(a=this.source.charAt(s+1),a==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",o[s+1]="A"):a==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",o[s+1]="G"):(t[s+1]=a,n[s+1]=a,r[s+1]=a,o[s+1]=a),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Rs=class{constructor(){T(this,"_items"),T(this,"_hasAnchors"),T(this,"_cached"),T(this,"_anchorCache"),this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new _m(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(o=>o.resolveAnchors(t,n));return new _m(e,r,this._items.map(o=>o.ruleId))}},_m=class{constructor(e,t,n){T(this,"scanner"),this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
43
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},tc=class{constructor(e,t){this.languageId=e,this.tokenType=t}},D7=(Fr=class{constructor(e,t){T(this,"_defaultAttributes"),T(this,"_embeddedLanguagesMatcher"),T(this,"_getBasicScopeAttributes",new Tg(n=>{const r=this._scopeToLanguage(n),o=this._toStandardTokenType(n);return new tc(r,o)})),this._defaultAttributes=new tc(e,8),this._embeddedLanguagesMatcher=new O7(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Fr._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(Fr.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},T(Fr,"_NULL_SCOPE_METADATA",new tc(0,0)),T(Fr,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Fr),O7=class{constructor(e){if(T(this,"values"),T(this,"scopesRegExp"),e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>jg(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},km=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ng(e,t,n,r,o,s,l,i){const a=t.content.length;let d=!1,f=-1;if(l){const h=N7(e,t,n,r,o,s);o=h.stack,r=h.linePos,n=h.isFirstLine,f=h.anchorPosition}const m=Date.now();for(;!d;){if(i!==0&&Date.now()-m>i)return new km(o,!0);p()}return new km(o,!1);function p(){const h=$7(e,t,n,r,o,f);if(!h){s.produce(o,a),d=!0;return}const y=h.captureIndices,g=h.matchedRuleId,v=y&&y.length>0?y[0].end>r:!1;if(g===A7){const b=o.getRule(e);s.produce(o,y[0].start),o=o.withContentNameScopesList(o.nameScopesList),as(e,t,n,o,s,b.endCaptures,y),s.produce(o,y[0].end);const w=o;if(o=o.parent,f=w.getAnchorPos(),!v&&w.getEnterPos()===r){o=w,s.produce(o,a),d=!0;return}}else{const b=e.getRule(g);s.produce(o,y[0].start);const w=o,x=b.getName(t.content,y),_=o.contentNameScopesList.pushAttributed(x,e);if(o=o.push(g,r,f,y[0].end===a,null,_,_),b instanceof Hc){const C=b;as(e,t,n,o,s,C.beginCaptures,y),s.produce(o,y[0].end),f=y[0].end;const E=C.getContentName(t.content,y),k=_.pushAttributed(E,e);if(o=o.withContentNameScopesList(k),C.endHasBackReferences&&(o=o.withEndRule(C.getEndWithResolvedBackReferences(t.content,y))),!v&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,a),d=!0;return}}else if(b instanceof vi){const C=b;as(e,t,n,o,s,C.beginCaptures,y),s.produce(o,y[0].end),f=y[0].end;const E=C.getContentName(t.content,y),k=_.pushAttributed(E,e);if(o=o.withContentNameScopesList(k),C.whileHasBackReferences&&(o=o.withEndRule(C.getWhileWithResolvedBackReferences(t.content,y))),!v&&w.hasSameRuleAs(o)){o=o.pop(),s.produce(o,a),d=!0;return}}else if(as(e,t,n,o,s,b.captures,y),s.produce(o,y[0].end),o=o.pop(),!v){o=o.safePop(),s.produce(o,a),d=!0;return}}y[0].end>r&&(r=y[0].end,n=!1)}}function N7(e,t,n,r,o,s){let l=o.beginRuleCapturedEOL?0:-1;const i=[];for(let a=o;a;a=a.pop()){const d=a.getRule(e);d instanceof vi&&i.push({rule:d,stack:a})}for(let a=i.pop();a;a=i.pop()){const{ruleScanner:d,findOptions:f}=B7(a.rule,e,a.stack.endRule,n,r===l),m=d.findNextMatchSync(t,r,f);if(m){if(m.ruleId!==Pg){o=a.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(s.produce(a.stack,m.captureIndices[0].start),as(e,t,n,a.stack,s,a.rule.whileCaptures,m.captureIndices),s.produce(a.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{o=a.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:l,isFirstLine:n}}function $7(e,t,n,r,o,s){const l=z7(e,t,n,r,o,s),i=e.getInjections();if(i.length===0)return l;const a=F7(i,e,t,n,r,o,s);if(!a)return l;if(!l)return a;const d=l.captureIndices[0].start,f=a.captureIndices[0].start;return f<d||a.priorityMatch&&f===d?a:l}function z7(e,t,n,r,o,s){const l=o.getRule(e),{ruleScanner:i,findOptions:a}=$g(l,e,o.endRule,n,r===s),d=i.findNextMatchSync(t,r,a);return d?{captureIndices:d.captureIndices,matchedRuleId:d.ruleId}:null}function F7(e,t,n,r,o,s,l){let i=Number.MAX_VALUE,a=null,d,f=0;const m=s.contentNameScopesList.getScopeNames();for(let p=0,h=e.length;p<h;p++){const y=e[p];if(!y.matcher(m))continue;const g=t.getRule(y.ruleId),{ruleScanner:v,findOptions:b}=$g(g,t,null,r,o===l),w=v.findNextMatchSync(n,o,b);if(!w)continue;const x=w.captureIndices[0].start;if(!(x>=i)&&(i=x,a=w.captureIndices,d=w.ruleId,f=y.priority,i===o))break}return a?{priorityMatch:f===-1,captureIndices:a,matchedRuleId:d}:null}function $g(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function B7(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function as(e,t,n,r,o,s,l){if(s.length===0)return;const i=t.content,a=Math.min(s.length,l.length),d=[],f=l[0].end;for(let m=0;m<a;m++){const p=s[m];if(p===null)continue;const h=l[m];if(h.length===0)continue;if(h.start>f)break;for(;d.length>0&&d[d.length-1].endPos<=h.start;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?o.produceFromScopes(d[d.length-1].scopes,h.start):o.produce(r,h.start),p.retokenizeCapturedWithRuleId){const g=p.getName(i,l),v=r.contentNameScopesList.pushAttributed(g,e),b=p.getContentName(i,l),w=v.pushAttributed(b,e),x=r.push(p.retokenizeCapturedWithRuleId,h.start,-1,!1,null,v,w),_=e.createOnigString(i.substring(0,h.end));Ng(e,_,n&&h.start===0,h.start,x,o,!1,0),Ag(_);continue}const y=p.getName(i,l);if(y!==null){const v=(d.length>0?d[d.length-1].scopes:r.contentNameScopesList).pushAttributed(y,e);d.push(new q7(v,h.end))}}for(;d.length>0;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}var q7=class{constructor(e,t){T(this,"scopes"),T(this,"endPos"),this.scopes=e,this.endPos=t}};function W7(e,t,n,r,o,s,l,i){return new U7(e,t,n,r,o,s,l,i)}function Sm(e,t,n,r,o){const s=gi(t,bi),l=Dg.getCompiledRuleId(n,r,o.repository);for(const i of s)e.push({debugSelector:t,matcher:i.matcher,ruleId:l,grammar:o,priority:i.priority})}function bi(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(G7(t[o],r))return n=o+1,!0;return!1})}function G7(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var U7=class{constructor(e,t,n,r,o,s,l,i){if(T(this,"_rootId"),T(this,"_lastRuleId"),T(this,"_ruleId2desc"),T(this,"_includedGrammars"),T(this,"_grammarRepository"),T(this,"_grammar"),T(this,"_injections"),T(this,"_basicScopeAttributesProvider"),T(this,"_tokenTypeMatchers"),this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=i,this._basicScopeAttributesProvider=new D7(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=Em(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const a of Object.keys(o)){const d=gi(a,bi);for(const f of d)this._tokenTypeMatchers.push({matcher:f.matcher,type:o[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const o=r.injections;if(o)for(let l in o)Sm(t,l,o[l],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const i=this.getExternalGrammar(l);if(i){const a=i.injectionSelector;a&&Sm(t,a,i,this,i)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Em(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Dg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Xc.NULL){o=!0;const d=this._basicScopeAttributesProvider.getDefaultAttributes(),f=this.themeProvider.getDefaults(),m=Sr.set(0,d.languageId,d.tokenType,null,f.fontStyle,f.foregroundId,f.backgroundId),p=this.getRule(this._rootId).getName(null,null);let h;p?h=us.createRootAndLookUpScopeName(p,m,this):h=us.createRoot("unknown",m),t=new Xc(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+`
|
|
44
|
+
`;const s=this.createOnigString(e),l=s.content.length,i=new V7(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Ng(this,s,o,0,t,i,!0,r);return Ag(s),{lineLength:l,lineTokens:i,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Em(e,t){return e=u7(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var us=class en{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(const s of n)o=ec.push(o,s.scopeNames),r=new en(r,o,s.encodedTokenAttributes);return r}static createRoot(t,n){return new en(null,new ec(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),s=new ec(null,t),l=r.themeProvider.themeMatch(s),i=en.mergeAttributes(n,o,l);return new en(null,s,i)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return en.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let o=-1,s=0,l=0;return r!==null&&(o=r.fontStyle,s=r.foregroundId,l=r.backgroundId),Sr.set(t,n.languageId,n.tokenType,null,o,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return en._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const s of r)o=en._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),i=en.mergeAttributes(t.tokenAttributes,o,l);return new en(t,s,i)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var n;const r=[];let o=this;for(;o&&o!==t;)r.push({encodedTokenAttributes:o.tokenAttributes,scopeNames:o.scopePath.getExtensionIfDefined(((n=o.parent)==null?void 0:n.scopePath)??null)}),o=o.parent;return o===t?r.reverse():void 0}},Xc=(yn=class{constructor(e,t,n,r,o,s,l,i){T(this,"_stackElementBrand"),T(this,"_enterPos"),T(this,"_anchorPos"),T(this,"depth"),this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=i,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return e===null?!1:yn._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?us.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){yn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,o,s,l){return new yn(this,e,t,n,r,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var n,r;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new yn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const n=us.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new yn(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,us.fromExtension(n,t.contentNameScopesList))}},T(yn,"NULL",new yn(null,0,0,0,!1,null,null,null)),yn),Y7=class{constructor(e,t){T(this,"balancedBracketScopes"),T(this,"unbalancedBracketScopes"),T(this,"allowAny",!1),this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):gi(n,bi).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>gi(n,bi).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},V7=class{constructor(e,t,n,r){T(this,"_emitBinaryTokens"),T(this,"_lineText"),T(this,"_tokens"),T(this,"_binaryTokens"),T(this,"_lastTokenEndIndex"),T(this,"_tokenTypeOverrides"),this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var n;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let o=e?.tokenAttributes??0,s=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(l)&&(o=Sr.set(o,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(l))}if(s&&(o=Sr.set(o,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===o){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(o),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},H7=class{constructor(e,t){T(this,"_grammars",new Map),T(this,"_rawGrammars",new Map),T(this,"_injectionGrammars",new Map),T(this,"_theme"),this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,W7(e,s,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},X7=class{constructor(t){T(this,"_options"),T(this,"_syncRegistry"),T(this,"_ensureGrammarCache"),this._options=t,this._syncRegistry=new H7(hi.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(hi.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new Y7(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,o,s){const l=new k7(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(i=>this._loadSingleGrammar(i.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,o)}_grammarForScopeName(t,n=0,r=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,o,s)}},wi=Xc.NULL;const Z7=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Js{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Js.prototype.normal={};Js.prototype.property={};Js.prototype.space=void 0;function zg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Js(n,r,t)}function Zc(e){return e.toLowerCase()}class ut{constructor(t,n){this.attribute=n,this.property=t}}ut.prototype.attribute="";ut.prototype.booleanish=!1;ut.prototype.boolean=!1;ut.prototype.commaOrSpaceSeparated=!1;ut.prototype.commaSeparated=!1;ut.prototype.defined=!1;ut.prototype.mustUseProperty=!1;ut.prototype.number=!1;ut.prototype.overloadedBoolean=!1;ut.prototype.property="";ut.prototype.spaceSeparated=!1;ut.prototype.space=void 0;let K7=0;const ee=Mr(),Be=Mr(),Fg=Mr(),O=Mr(),ke=Mr(),so=Mr(),gt=Mr();function Mr(){return 2**++K7}const Kc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Be,commaOrSpaceSeparated:gt,commaSeparated:so,number:O,overloadedBoolean:Fg,spaceSeparated:ke},Symbol.toStringTag,{value:"Module"})),nc=Object.keys(Kc);class sd extends ut{constructor(t,n,r,o){let s=-1;if(super(t,n),Rm(this,"space",o),typeof r=="number")for(;++s<nc.length;){const l=nc[s];Rm(this,nc[s],(r&Kc[l])===Kc[l])}}}sd.prototype.defined=!0;function Rm(e,t,n){n&&(e[t]=n)}function Po(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new sd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Zc(r)]=r,n[Zc(s.attribute)]=r}return new Js(t,n,e.space)}const Bg=Po({properties:{ariaActiveDescendant:null,ariaAtomic:Be,ariaAutoComplete:null,ariaBusy:Be,ariaChecked:Be,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:ke,ariaCurrent:null,ariaDescribedBy:ke,ariaDetails:null,ariaDisabled:Be,ariaDropEffect:ke,ariaErrorMessage:null,ariaExpanded:Be,ariaFlowTo:ke,ariaGrabbed:Be,ariaHasPopup:null,ariaHidden:Be,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ke,ariaLevel:O,ariaLive:null,ariaModal:Be,ariaMultiLine:Be,ariaMultiSelectable:Be,ariaOrientation:null,ariaOwns:ke,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Be,ariaReadOnly:Be,ariaRelevant:null,ariaRequired:Be,ariaRoleDescription:ke,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Be,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qg(e,t){return t in e?e[t]:t}function Wg(e,t){return qg(e,t.toLowerCase())}const Q7=Po({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:so,acceptCharset:ke,accessKey:ke,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:ke,autoFocus:ee,autoPlay:ee,blocking:ke,capture:null,charSet:null,checked:ee,cite:null,className:ke,cols:O,colSpan:null,content:null,contentEditable:Be,controls:ee,controlsList:ke,coords:O|so,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:Fg,draggable:Be,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:ke,height:O,hidden:ee,high:O,href:null,hrefLang:null,htmlFor:ke,httpEquiv:ke,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:ke,itemRef:ke,itemScope:ee,itemType:ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ee,optimum:O,pattern:null,ping:ke,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:ke,required:ee,reversed:ee,rows:O,rowSpan:O,sandbox:ke,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Be,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Be,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ke,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Be,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:Wg}),J7=Po({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gt,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:ke,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:so,g2:so,glyphName:so,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gt,rev:gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gt,requiredFeatures:gt,requiredFonts:gt,requiredFormats:gt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gt,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qg}),Gg=Po({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ug=Po({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wg}),Yg=Po({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),e8=/[A-Z]/g,jm=/-[a-z]/g,t8=/^data[-\w.:]+$/i;function n8(e,t){const n=Zc(t);let r=t,o=ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&t8.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(jm,o8);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!jm.test(s)){let l=s.replace(e8,r8);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=sd}return new o(r,t)}function r8(e){return"-"+e.toLowerCase()}function o8(e){return e.charAt(1).toUpperCase()}const s8=zg([Bg,Q7,Gg,Ug,Yg],"html"),Vg=zg([Bg,J7,Gg,Ug,Yg],"svg"),Tm={}.hasOwnProperty;function l8(e,t){const n=t||{};function r(o,...s){let l=r.invalid;const i=r.handlers;if(o&&Tm.call(o,e)){const a=String(o[e]);l=Tm.call(i,a)?i[a]:r.unknown}if(l)return l.call(this,o,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const i8=/["&'<>`]/g,a8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c8=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,u8=/[|\\{}()[\]^$+*?.]/g,Lm=new WeakMap;function d8(e,t){if(e=e.replace(t.subset?f8(t.subset):i8,r),t.subset||t.escapeOnly)return e;return e.replace(a8,n).replace(c8,r);function n(o,s,l){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(o,s,l){return t.format(o.charCodeAt(0),l.charCodeAt(s+1),t)}}function f8(e){let t=Lm.get(e);return t||(t=m8(e),Lm.set(e,t)),t}function m8(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(u8,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const p8=/[\dA-Fa-f]/;function h8(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!p8.test(String.fromCharCode(t))?r:r+";"}const g8=/\d/;function y8(e,t,n){const r="&#"+String(e);return n&&t&&!g8.test(String.fromCharCode(t))?r:r+";"}const v8=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],rc={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},b8=["cent","copy","divide","gt","lt","not","para","times"],Hg={}.hasOwnProperty,Qc={};let Ll;for(Ll in rc)Hg.call(rc,Ll)&&(Qc[rc[Ll]]=Ll);const w8=/[^\dA-Za-z]/;function x8(e,t,n,r){const o=String.fromCharCode(e);if(Hg.call(Qc,o)){const s=Qc[o],l="&"+s;return n&&v8.includes(s)&&!b8.includes(s)&&(!r||t&&t!==61&&w8.test(String.fromCharCode(t)))?l:l+";"}return""}function C8(e,t,n){let r=h8(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=x8(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const s=y8(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function lo(e,t){return d8(e,Object.assign({format:C8},t))}const _8=/^>|^->|<!--|-->|--!>|<!-$/g,k8=[">"],S8=["<",">"];function E8(e,t,n,r){return r.settings.bogusComments?"<?"+lo(e.value,Object.assign({},r.settings.characterReferences,{subset:k8}))+">":"<!--"+e.value.replace(_8,o)+"-->";function o(s){return lo(s,Object.assign({},r.settings.characterReferences,{subset:S8}))}}function R8(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Mm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function j8(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function T8(e){return e.join(" ").trim()}const L8=/[ \t\n\f\r]/g;function ld(e){return typeof e=="object"?e.type==="text"?Am(e.value):!1:Am(e)}function Am(e){return e.replace(L8,"")===""}const Ye=Zg(1),Xg=Zg(-1),M8=[];function Zg(e){return t;function t(n,r,o){const s=n?n.children:M8;let l=(r||0)+e,i=s[l];if(!o)for(;i&&ld(i);)l+=e,i=s[l];return i}}const A8={}.hasOwnProperty;function Kg(e){return t;function t(n,r,o){return A8.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const id=Kg({body:P8,caption:oc,colgroup:oc,dd:$8,dt:N8,head:oc,html:I8,li:O8,optgroup:z8,option:F8,p:D8,rp:Im,rt:Im,tbody:q8,td:Pm,tfoot:W8,th:Pm,thead:B8,tr:G8});function oc(e,t,n){const r=Ye(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ld(r.value.charAt(0)))}function I8(e,t,n){const r=Ye(n,t);return!r||r.type!=="comment"}function P8(e,t,n){const r=Ye(n,t);return!r||r.type!=="comment"}function D8(e,t,n){const r=Ye(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function O8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="li"}function N8(e,t,n){const r=Ye(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function $8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Im(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function z8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function F8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function B8(e,t,n){const r=Ye(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function q8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function W8(e,t,n){return!Ye(n,t)}function G8(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Pm(e,t,n){const r=Ye(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const U8=Kg({body:H8,colgroup:X8,head:V8,html:Y8,tbody:Z8});function Y8(e){const t=Ye(e,-1);return!t||t.type!=="comment"}function V8(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function H8(e){const t=Ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&ld(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function X8(e,t,n){const r=Xg(n,t),o=Ye(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&id(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Z8(e,t,n){const r=Xg(n,t),o=Ye(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&id(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Ml={name:[[`
|
|
45
|
+
\f\r &/=>`.split(""),`
|
|
46
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
47
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
48
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
49
|
+
\f\r &>`.split(""),`\0
|
|
50
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
51
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
52
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function K8(e,t,n,r){const o=r.schema,s=o.space==="svg"?!1:r.settings.omitOptionalTags;let l=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const i=[];let a;o.space==="html"&&e.tagName==="svg"&&(r.schema=Vg);const d=Q8(r,e.properties),f=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,f&&(l=!1),(d||!s||!U8(e,t,n))&&(i.push("<",e.tagName,d?" "+d:""),l&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=d.charAt(d.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(f),!l&&(!s||!id(e,t,n))&&i.push("</"+e.tagName+">"),i.join("")}function Q8(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=J8(e,o,t[o]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function J8(e,t,n){const r=n8(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,i;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=lo(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Ml.name[o][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?j8:T8)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(i=lo(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ml.unquoted[o][s]}))),i!==n&&(e.settings.quoteSmart&&Mm(n,l)>Mm(n,e.alternative)&&(l=e.alternative),i=l+lo(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Ml.single:Ml.double)[o][s],attribute:!0}))+l),a+(i&&"="+i))}const ew=["<","&"];function Qg(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:lo(e.value,Object.assign({},r.settings.characterReferences,{subset:ew}))}function tw(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Qg(e,t,n,r)}function nw(e,t,n,r){return r.all(e)}const rw=l8("type",{invalid:ow,unknown:sw,handlers:{comment:E8,doctype:R8,element:K8,raw:tw,root:nw,text:Qg}});function ow(e){throw new Error("Expected node, not `"+e+"`")}function sw(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const lw={},iw={},aw=[];function cw(e,t){const n=t||lw,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:uw,all:dw,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Z7,characterReferences:n.characterReferences||iw,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Vg:s8,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function uw(e,t,n){return rw(e,t,n,this)}function dw(e){const t=[],n=e&&e.children||aw;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function xi(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===r&&Object.assign(n,s);return n}function Jn(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function fw(e){return Array.isArray(e)?e:[e]}async function Jg(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function ad(e){return!e||["plaintext","txt","text","plain"].includes(e)}function mw(e){return e==="ansi"||ad(e)}function cd(e){return e==="none"}function pw(e){return cd(e)}function e1(e,t){var n;if(!t)return e;e.properties||(e.properties={}),(n=e.properties).class||(n.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const o of r)o&&!e.properties.class.includes(o)&&e.properties.class.push(o);return e}function aa(e,t=!1){var n;const r=e.split(/(\r?\n)/g);let o=0;const s=[];for(let l=0;l<r.length;l+=2){const i=t?r[l]+(r[l+1]||""):r[l];s.push([i,o]),o+=r[l].length,o+=((n=r[l+1])==null?void 0:n.length)||0}return s}function hw(e){const t=aa(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,l=0;for(const i of t){if(s<i.length)break;s-=i.length,l++}return{line:l,character:s}}function r(o,s){let l=0;for(let i=0;i<o;i++)l+=t[i].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}const ud="light-dark()",gw=["color","background-color"];function yw(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function vw(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{const s=n.filter(l=>o.offset<l&&l<o.offset+o.content.length).map(l=>l-o.offset).sort((l,i)=>l-i);return s.length?yw(o,s):o})):e}function bw(e,t,n,r,o="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(f=>Ci(e.variants[f])),i=new Set(l.flatMap(f=>Object.keys(f))),a={},d=(f,m)=>{const p=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[f]+(m==="color"?"":p)};return l.forEach((f,m)=>{for(const p of i){const h=f[p]||"inherit";if(m===0&&r&&gw.includes(p))if(r===ud&&l.length>1){const y=t.findIndex(w=>w==="light"),g=t.findIndex(w=>w==="dark");if(y===-1||g===-1)throw new He('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=l[y][p]||"inherit",b=l[g][p]||"inherit";a[p]=`light-dark(${v}, ${b})`,o==="css-vars"&&(a[d(m,p)]=h)}else a[p]=h;else o==="css-vars"&&(a[d(m,p)]=h)}}),s.htmlStyle=a,s}function Ci(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&rt.Italic&&(t["font-style"]="italic"),e.fontStyle&rt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&rt.Underline&&n.push("underline"),e.fontStyle&rt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Jc(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const t1=new WeakMap;function ca(e,t){t1.set(e,t)}function js(e){return t1.get(e)}class Do{constructor(...t){if(T(this,"_stacks",{}),T(this,"lang"),t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,o]=t;this.lang=r,this._stacks={[o]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Do(Object.fromEntries(fw(n).map(r=>[r,wi])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ww(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function ww(e){const t=[],n=new Set;function r(o){var s;if(n.has(o))return;n.add(o);const l=(s=o?.nameScopesList)==null?void 0:s.scopeName;l&&t.push(l),o.parent&&r(o.parent)}return r(e),t}function xw(e,t){if(!(e instanceof Do))throw new He("Invalid grammar state");return e.getInternalStack(t)}function Cw(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new He(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...o.indexToPos(l),offset:l}}else{const i=o.lines[l.line];if(i===void 0)throw new He(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${o.lines.length}`);if(l.character<0||l.character>i.length)throw new He(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${i.length}`);return{...l,offset:o.posToIndex(l.line,l.character)}}};const o=hw(n.source),s=(n.options.decorations||[]).map(l=>({...l,start:r(l.start),end:r(l.end)}));_w(s),e.set(n.meta,{decorations:s,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var r;if(!((r=this.options.decorations)!=null&&r.length))return;const s=t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]);return vw(n,s)},code(n){var r;if(!((r=this.options.decorations)!=null&&r.length))return;const o=t(this),s=Array.from(n.children).filter(m=>m.type==="element"&&m.tagName==="span");if(s.length!==o.converter.lines.length)throw new He(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${o.converter.lines.length}). Failed to apply decorations.`);function l(m,p,h,y){const g=s[m];let v="",b=-1,w=-1;if(p===0&&(b=0),h===0&&(w=0),h===Number.POSITIVE_INFINITY&&(w=g.children.length),b===-1||w===-1)for(let _=0;_<g.children.length;_++)v+=n1(g.children[_]),b===-1&&v.length===p&&(b=_+1),w===-1&&v.length===h&&(w=_+1);if(b===-1)throw new He(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(w===-1)throw new He(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const x=g.children.slice(b,w);if(!y.alwaysWrap&&x.length===g.children.length)a(g,y,"line");else if(!y.alwaysWrap&&x.length===1&&x[0].type==="element")a(x[0],y,"token");else{const _={type:"element",tagName:"span",properties:{},children:x};a(_,y,"wrapper"),g.children.splice(b,x.length,_)}}function i(m,p){s[m]=a(s[m],p,"line")}function a(m,p,h){var y;const g=p.properties||{},v=p.transform||(b=>b);return m.tagName=p.tagName||"span",m.properties={...m.properties,...g,class:m.properties.class},(y=p.properties)!=null&&y.class&&e1(m,p.properties.class),m=v(m,h)||m,m}const d=[],f=o.decorations.sort((m,p)=>p.start.offset-m.start.offset||m.end.offset-p.end.offset);for(const m of f){const{start:p,end:h}=m;if(p.line===h.line)l(p.line,p.character,h.character,m);else if(p.line<h.line){l(p.line,p.character,Number.POSITIVE_INFINITY,m);for(let y=p.line+1;y<h.line;y++)d.unshift(()=>i(y,m));l(h.line,0,h.character,m)}}d.forEach(m=>m())}}}function _w(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new He(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],s=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,l=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,i=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,a=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(s||l||i||a){if(s&&l||i&&a)continue;throw new He(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function n1(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(n1).join(""):""}const kw=[Cw()];function _i(e){return[...e.transformers||[],...kw]}var br=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],sc={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Sw(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function Dm(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Ew(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)sc[r]&&t.push({type:"setDecoration",value:sc[r]});else if(r<=29){const o=sc[r-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:br[r-30]}});else if(r===38){const o=Dm(e);o&&t.push({type:"setForegroundColor",value:o})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:br[r-40]}});else if(r===48){const o=Dm(e);o&&t.push({type:"setBackgroundColor",value:o})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:br[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:br[r-100+8]}})}return t}function Rw(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let s=0;do{const l=Sw(r,s),i=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(i.length>0&&o.push({value:i,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const a=Ew(l.sequence);for(const d of a)d.type==="resetAll"?(e=null,t=null,n.clear()):d.type==="resetForegroundColor"?e=null:d.type==="resetBackgroundColor"?t=null:d.type==="resetDecoration"&&n.delete(d.value);for(const d of a)d.type==="setForegroundColor"?e=d.value:d.type==="setBackgroundColor"?t=d.value:d.type==="setDecoration"&&n.add(d.value)}s=l.position}while(s<r.length);return o}}}var jw={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Tw(e=jw){function t(i){return e[i]}function n(i){return`#${i.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let d=0;d<br.length;d++)r.push(t(br[d]));let i=[0,95,135,175,215,255];for(let d=0;d<6;d++)for(let f=0;f<6;f++)for(let m=0;m<6;m++)r.push(n([i[d],i[f],i[m]]));let a=8;for(let d=0;d<24;d++,a+=10)r.push(n([a,a,a]));return r}function s(i){return o()[i]}function l(i){switch(i.type){case"named":return t(i.name);case"rgb":return n(i.rgb);case"table":return s(i.index)}}return{value:l}}function Lw(e,t,n){const r=xi(e,n),o=aa(t),s=Tw(Object.fromEntries(br.map(i=>{var a;return[i,(a=e.colors)==null?void 0:a[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]]}))),l=Rw();return o.map(i=>l.parse(i[0]).map(a=>{let d,f;a.decorations.has("reverse")?(d=a.background?s.value(a.background):e.bg,f=a.foreground?s.value(a.foreground):e.fg):(d=a.foreground?s.value(a.foreground):e.fg,f=a.background?s.value(a.background):void 0),d=Jn(d,r),f=Jn(f,r),a.decorations.has("dim")&&(d=Mw(d));let m=rt.None;return a.decorations.has("bold")&&(m|=rt.Bold),a.decorations.has("italic")&&(m|=rt.Italic),a.decorations.has("underline")&&(m|=rt.Underline),a.decorations.has("strikethrough")&&(m|=rt.Strikethrough),{content:a.value,offset:i[1],color:d,bgColor:f,fontStyle:m}}))}function Mw(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function dd(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(ad(r)||cd(o))return aa(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:s,colorMap:l}=e.setTheme(o);if(r==="ansi")return Lw(s,t,n);const i=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==i.name)throw new He(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new He(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Iw(t,i,s,l,n)}function Aw(...e){if(e.length===2)return js(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=r;if(ad(o)||cd(s))throw new He("Plain language does not have grammar state");if(o==="ansi")throw new He("ANSI language does not have grammar state");const{theme:l,colorMap:i}=t.setTheme(s),a=t.getLanguage(o);return new Do(ki(n,a,l,i,r).stateStack,a.name,l.name)}function Iw(e,t,n,r,o){const s=ki(e,t,n,r,o),l=new Do(ki(e,t,n,r,o).stateStack,t.name,n.name);return ca(s.tokens,l),s.tokens}function ki(e,t,n,r,o){const s=xi(n,o),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:i=500}=o,a=aa(e);let d=o.grammarState?xw(o.grammarState,n.name)??wi:o.grammarContextCode!=null?ki(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:wi,f=[];const m=[];for(let p=0,h=a.length;p<h;p++){const[y,g]=a[p];if(y===""){f=[],m.push([]);continue}if(l>0&&y.length>=l){f=[],m.push([{content:y,offset:g,color:"",fontStyle:0}]);continue}let v,b,w;o.includeExplanation&&(v=t.tokenizeLine(y,d,i),b=v.tokens,w=0);const x=t.tokenizeLine2(y,d,i),_=x.tokens.length/2;for(let C=0;C<_;C++){const E=x.tokens[2*C],k=C+1<_?x.tokens[2*C+2]:y.length;if(E===k)continue;const R=x.tokens[2*C+1],j=Jn(r[Sr.getForeground(R)],s),M=Sr.getFontStyle(R),D={content:y.substring(E,k),offset:g+E,color:j,fontStyle:M};if(o.includeExplanation){const $=[];if(o.includeExplanation!=="scopeName")for(const A of n.settings){let Z;switch(typeof A.scope){case"string":Z=A.scope.split(/,/).map(q=>q.trim());break;case"object":Z=A.scope;break;default:continue}$.push({settings:A,selectors:Z.map(q=>q.split(/ /))})}D.explanation=[];let X=0;for(;E+X<k;){const A=b[w],Z=y.substring(A.startIndex,A.endIndex);X+=Z.length,D.explanation.push({content:Z,scopes:o.includeExplanation==="scopeName"?Pw(A.scopes):Dw($,A.scopes)}),w+=1}}f.push(D)}m.push(f),f=[],d=x.ruleStack}return{tokens:m,stateStack:d}}function Pw(e){return e.map(t=>({scopeName:t}))}function Dw(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const s=t[r];n[r]={scopeName:s,themeMatches:Nw(e,s,t.slice(0,r))}}return n}function Om(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Ow(e,t,n){if(!Om(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)Om(e[r],n[o])&&(r-=1),o-=1;return r===-1}function Nw(e,t,n){const r=[];for(const{selectors:o,settings:s}of e)for(const l of o)if(Ow(l,t,n)){r.push(s);break}return r}function r1(e,t,n){const r=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),o=r.map(a=>{const d=dd(e,t,{...n,theme:a.theme}),f=js(d),m=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:d,state:f,theme:m}}),s=$w(...o.map(a=>a.tokens)),l=s[0].map((a,d)=>a.map((f,m)=>{const p={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=f.explanation),s.forEach((h,y)=>{const{content:g,explanation:v,offset:b,...w}=h[d][m];p.variants[r[y].color]=w}),p})),i=o[0].state?new Do(Object.fromEntries(o.map(a=>{var d;return[a.theme,(d=a.state)==null?void 0:d.getInternalStack(a.theme)]})),o[0].state.lang):void 0;return i&&ca(l,i),l}function $w(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(a=>a[r]),s=t.map(()=>[]);t.forEach((a,d)=>a.push(s[d]));const l=o.map(()=>0),i=o.map(a=>a[0]);for(;i.every(a=>a);){const a=Math.min(...i.map(d=>d.content.length));for(let d=0;d<n;d++){const f=i[d];f.content.length===a?(s[d].push(f),l[d]+=1,i[d]=o[d][l[d]]):(s[d].push({...f,content:f.content.slice(0,a)}),i[d]={...f,content:f.content.slice(a),offset:f.offset+a})}}}return t}function Si(e,t,n){let r,o,s,l,i,a;if("themes"in n){const{defaultColor:d="light",cssVariablePrefix:f="--shiki-",colorsRendering:m="css-vars"}=n,p=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,w)=>b.color===d?-1:w.color===d?1:0);if(p.length===0)throw new He("`themes` option must not be empty");const h=r1(e,t,n);if(a=js(h),d&&ud!==d&&!p.find(b=>b.color===d))throw new He(`\`themes\` option must contain the defaultColor key \`${d}\``);const y=p.map(b=>e.getTheme(b.theme)),g=p.map(b=>b.color);s=h.map(b=>b.map(w=>bw(w,g,f,d,m))),a&&ca(s,a);const v=p.map(b=>xi(b.theme,n));o=Nm(p,y,v,f,d,"fg",m),r=Nm(p,y,v,f,d,"bg",m),l=`shiki-themes ${y.map(b=>b.name).join(" ")}`,i=d?void 0:[o,r].join(";")}else if("theme"in n){const d=xi(n.theme,n);s=dd(e,t,n);const f=e.getTheme(n.theme);r=Jn(f.bg,d),o=Jn(f.fg,d),l=f.name,a=js(s)}else throw new He("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:r,themeName:l,rootStyle:i,grammarState:a}}function Nm(e,t,n,r,o,s,l){return e.map((i,a)=>{const d=Jn(t[a][s],n[a])||"inherit",f=`${r+i.color}${s==="bg"?"-bg":""}:${d}`;if(a===0&&o){if(o===ud&&e.length>1){const m=e.findIndex(g=>g.color==="light"),p=e.findIndex(g=>g.color==="dark");if(m===-1||p===-1)throw new He('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=Jn(t[m][s],n[m])||"inherit",y=Jn(t[p][s],n[p])||"inherit";return`light-dark(${h}, ${y});${f}`}return d}return l==="css-vars"?f:null}).filter(i=>!!i).join(";")}function Ei(e,t,n,r={meta:{},options:n,codeToHast:(o,s)=>Ei(e,o,s),codeToTokens:(o,s)=>Si(e,o,s)}){var o,s;let l=t;for(const v of _i(n))l=((o=v.preprocess)==null?void 0:o.call(r,l,n))||l;let{tokens:i,fg:a,bg:d,themeName:f,rootStyle:m,grammarState:p}=Si(e,l,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:y=!1}=n;h===!0?i=Fw(i):h==="never"&&(i=Bw(i)),y&&(i=qw(i));const g={...r,get source(){return l}};for(const v of _i(n))i=((s=v.tokens)==null?void 0:s.call(g,i))||i;return zw(i,{...n,fg:a,bg:d,themeName:f,rootStyle:m},g,p)}function zw(e,t,n,r=js(e)){var o,s,l;const i=_i(t),a=[],d={type:"root",children:[]},{structure:f="classic",tabindex:m="0"}=t;let p={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...m!==!1&&m!=null?{tabindex:m.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([b])=>!b.startsWith("_")))},children:[]},h={type:"element",tagName:"code",properties:{},children:a};const y=[],g={...n,structure:f,addClassToHast:e1,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return d},get pre(){return p},get code(){return h},get lines(){return y}};if(e.forEach((b,w)=>{var x,_;w&&(f==="inline"?d.children.push({type:"element",tagName:"br",properties:{},children:[]}):f==="classic"&&a.push({type:"text",value:`
|
|
53
|
+
`}));let C={type:"element",tagName:"span",properties:{class:"line"},children:[]},E=0;for(const k of b){let R={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const j=Jc(k.htmlStyle||Ci(k));j&&(R.properties.style=j);for(const M of i)R=((x=M?.span)==null?void 0:x.call(g,R,w+1,E,C,k))||R;f==="inline"?d.children.push(R):f==="classic"&&C.children.push(R),E+=k.content.length}if(f==="classic"){for(const k of i)C=((_=k?.line)==null?void 0:_.call(g,C,w+1))||C;y.push(C),a.push(C)}}),f==="classic"){for(const b of i)h=((o=b?.code)==null?void 0:o.call(g,h))||h;p.children.push(h);for(const b of i)p=((s=b?.pre)==null?void 0:s.call(g,p))||p;d.children.push(p)}let v=d;for(const b of i)v=((l=b?.root)==null?void 0:l.call(g,v))||v;return r&&ca(v,r),v}function Fw(e){return e.map(t=>{const n=[];let r="",o=0;return t.forEach((s,l)=>{const a=!(s.fontStyle&&(s.fontStyle&rt.Underline||s.fontStyle&rt.Strikethrough));a&&s.content.match(/^\s+$/)&&t[l+1]?(o||(o=s.offset),r+=s.content):r?(a?n.push({...s,offset:o,content:r+s.content}):n.push({content:r,offset:o},s),o=0,r=""):n.push(s)}),n})}function Bw(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,o,s,l]=r;if(!o&&!l)return n;const i=[{...n,offset:n.offset+o.length,content:s}];return o&&i.unshift({content:o,offset:n.offset}),l&&i.push({content:l,offset:n.offset+o.length+s.length}),i}))}function qw(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const o=n[n.length-1],s=Jc(o.htmlStyle||Ci(o)),l=Jc(r.htmlStyle||Ci(r)),i=o.fontStyle&&(o.fontStyle&rt.Underline||o.fontStyle&rt.Strikethrough),a=r.fontStyle&&(r.fontStyle&rt.Underline||r.fontStyle&rt.Strikethrough);!i&&!a&&s===l?o.content+=r.content:n.push({...r})}return n})}const Ww=cw;function Gw(e,t,n){var r;const o={meta:{},options:n,codeToHast:(l,i)=>Ei(e,l,i),codeToTokens:(l,i)=>Si(e,l,i)};let s=Ww(Ei(e,t,n,o));for(const l of _i(n))s=((r=l.postprocess)==null?void 0:r.call(o,s,n))||s;return s}const $m={light:"#333333",dark:"#bbbbbb"},zm={light:"#fffffe",dark:"#1e1e1e"},Fm="__shiki_resolved";function fd(e){var t,n,r,o,s;if(e?.[Fm])return e;const l={...e};l.tokenColors&&!l.settings&&(l.settings=l.tokenColors,delete l.tokenColors),l.type||(l.type="dark"),l.colorReplacements={...l.colorReplacements},l.settings||(l.settings=[]);let{bg:i,fg:a}=l;if(!i||!a){const p=l.settings?l.settings.find(h=>!h.name&&!h.scope):void 0;(t=p?.settings)!=null&&t.foreground&&(a=p.settings.foreground),(n=p?.settings)!=null&&n.background&&(i=p.settings.background),!a&&((r=l?.colors)!=null&&r["editor.foreground"])&&(a=l.colors["editor.foreground"]),!i&&((o=l?.colors)!=null&&o["editor.background"])&&(i=l.colors["editor.background"]),a||(a=l.type==="light"?$m.light:$m.dark),i||(i=l.type==="light"?zm.light:zm.dark),l.fg=a,l.bg=i}l.settings[0]&&l.settings[0].settings&&!l.settings[0].scope||l.settings.unshift({settings:{foreground:l.fg,background:l.bg}});let d=0;const f=new Map;function m(p){var h;if(f.has(p))return f.get(p);d+=1;const y=`#${d.toString(16).padStart(8,"0").toLowerCase()}`;return(h=l.colorReplacements)!=null&&h[`#${y}`]?m(p):(f.set(p,y),y)}l.settings=l.settings.map(p=>{var h,y;const g=((h=p.settings)==null?void 0:h.foreground)&&!p.settings.foreground.startsWith("#"),v=((y=p.settings)==null?void 0:y.background)&&!p.settings.background.startsWith("#");if(!g&&!v)return p;const b={...p,settings:{...p.settings}};if(g){const w=m(p.settings.foreground);l.colorReplacements[w]=p.settings.foreground,b.settings.foreground=w}if(v){const w=m(p.settings.background);l.colorReplacements[w]=p.settings.background,b.settings.background=w}return b});for(const p of Object.keys(l.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((s=l.colors[p])!=null&&s.startsWith("#"))){const h=m(l.colors[p]);l.colorReplacements[h]=l.colors[p],l.colors[p]=h}return Object.defineProperty(l,Fm,{enumerable:!1,writable:!1,value:!0}),l}async function o1(e){return Array.from(new Set((await Promise.all(e.filter(t=>!mw(t)).map(async t=>await Jg(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function s1(e){return(await Promise.all(e.map(async n=>pw(n)?null:fd(await Jg(n))))).filter(n=>!!n)}let Uw=3;function Yw(e,t=3){t>Uw||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class Kr extends Error{constructor(t){super(t),this.name="ShikiError"}}class Vw extends X7{constructor(t,n,r,o={}){super(t),T(this,"_resolvedThemes",new Map),T(this,"_resolvedGrammars",new Map),T(this,"_langMap",new Map),T(this,"_langGraph",new Map),T(this,"_textmateThemeCache",new WeakMap),T(this,"_loadedThemesCache",null),T(this,"_loadedLanguagesCache",null),this._resolver=t,this._themes=n,this._langs=r,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=fd(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=hi.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new Kr(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){var n,r,o,s;if(this.getGrammar(t.name))return;const l=new Set([...this._langMap.values()].filter(d=>{var f;return(f=d.embeddedLangsLazy)==null?void 0:f.includes(t.name)}));this._resolver.addLanguage(t);const i={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const a=this.loadGrammarWithConfiguration(t.scopeName,1,i);if(a.name=t.name,this._resolvedGrammars.set(t.name,a),t.aliases&&t.aliases.forEach(d=>{this._alias[d]=t.name}),this._loadedLanguagesCache=null,l.size)for(const d of l)this._resolvedGrammars.delete(d.name),this._loadedLanguagesCache=null,(r=(n=this._syncRegistry)==null?void 0:n._injectionGrammars)==null||r.delete(d.scopeName),(s=(o=this._syncRegistry)==null?void 0:o._grammars)==null||s.delete(d.scopeName),this.loadLanguage(this._langMap.get(d.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,s])=>!s);if(r.length){const o=n.filter(([s,l])=>{var i;return l&&((i=l.embeddedLangs)==null?void 0:i.some(a=>r.map(([d])=>d).includes(a)))}).filter(s=>!r.includes(s));throw new Kr(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of n)this._resolver.addLanguage(s);for(const[o,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class Hw{constructor(t,n){T(this,"_langs",new Map),T(this,"_scopeToLang",new Map),T(this,"_injections",new Map),T(this,"_onigLib"),this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let o=1;o<=n.length;o++){const s=n.slice(0,o).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Jo=0;function Xw(e){Jo+=1,e.warnings!==!1&&Jo>=10&&Jo%10===0&&console.warn(`[Shiki] ${Jo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Kr("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(fd),o=new Hw(e.engine,n),s=new Vw(o,r,n,e.langAlias);let l;function i(w){v();const x=s.getGrammar(typeof w=="string"?w:w.name);if(!x)throw new Kr(`Language \`${w}\` not found, you may need to load it first`);return x}function a(w){if(w==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const x=s.getTheme(w);if(!x)throw new Kr(`Theme \`${w}\` not found, you may need to load it first`);return x}function d(w){v();const x=a(w);l!==w&&(s.setTheme(x),l=w);const _=s.getColorMap();return{theme:x,colorMap:_}}function f(){return v(),s.getLoadedThemes()}function m(){return v(),s.getLoadedLanguages()}function p(...w){v(),s.loadLanguages(w.flat(1))}async function h(...w){return p(await o1(w))}function y(...w){v();for(const x of w.flat(1))s.loadTheme(x)}async function g(...w){return v(),y(await s1(w))}function v(){if(t)throw new Kr("Shiki instance has been disposed")}function b(){t||(t=!0,s.dispose(),Jo-=1)}return{setTheme:d,getTheme:a,getLanguage:i,getLoadedThemes:f,getLoadedLanguages:m,loadLanguage:h,loadLanguageSync:p,loadTheme:g,loadThemeSync:y,dispose:b,[Symbol.dispose]:b}}async function Zw(e){e.engine||Yw("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([s1(e.themes||[]),o1(e.langs||[]),e.engine]);return Xw({...e,themes:t,langs:n,engine:r})}async function Kw(e){const t=await Zw(e);return{getLastGrammarState:(...n)=>Aw(t,...n),codeToTokensBase:(n,r)=>dd(t,n,r),codeToTokensWithThemes:(n,r)=>r1(t,n,r),codeToTokens:(n,r)=>Si(t,n,r),codeToHast:(n,r)=>Ei(t,n,r),codeToHtml:(n,r)=>Gw(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}const Qw=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#dddddd","activityBarBadge.background":"#007ACC","checkbox.border":"#919191","diffEditor.unchangedRegionBackground":"#f8f8f8","editor.background":"#FFFFFF","editor.foreground":"#000000","editor.inactiveSelectionBackground":"#E5EBF1","editor.selectionHighlightBackground":"#ADD6FF80","editorIndentGuide.activeBackground1":"#939393","editorIndentGuide.background1":"#D3D3D3","editorSuggestWidget.background":"#F3F3F3","input.placeholderForeground":"#767676","list.activeSelectionIconForeground":"#FFF","list.focusAndSelectionOutline":"#90C2F9","list.hoverBackground":"#E8E8E8","menu.border":"#D4D4D4","notebook.cellBorderColor":"#E8E8E8","notebook.selectedCellBackground":"#c8ddf150","ports.iconRunningProcessForeground":"#369432","searchEditor.textInputBorder":"#CECECE","settings.numberInputBorder":"#CECECE","settings.textInputBorder":"#CECECE","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#61616130","sideBarTitle.foreground":"#6F6F6F","statusBarItem.errorBackground":"#c72e0f","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#61616130","tab.selectedBackground":"#ffffffa5","tab.selectedForeground":"#333333b3","terminal.inactiveSelectionBackground":"#E5EBF1","widget.border":"#d4d4d4"},"displayName":"Light Plus","name":"light-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#795E26","newOperator":"#AF00DB","numberLiteral":"#098658","stringLiteral":"#a31515"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#000000ff"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"meta.diff.header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#008000"}},{"scope":"constant.language","settings":{"foreground":"#0000ff"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#098658"}},{"scope":"constant.regexp","settings":{"foreground":"#811f3f"}},{"scope":"entity.name.tag","settings":{"foreground":"#800000"}},{"scope":"entity.name.selector","settings":{"foreground":"#800000"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#e50000"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#800000"}},{"scope":"invalid","settings":{"foreground":"#cd3131"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#000080"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#800000"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#098658"}},{"scope":"markup.deleted","settings":{"foreground":"#a31515"}},{"scope":"markup.changed","settings":{"foreground":"#0451a5"}},{"scope":["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],"settings":{"foreground":"#0451a5"}},{"scope":"markup.inline.raw","settings":{"foreground":"#800000"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#800000"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#0000ff"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#a31515"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#098658"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#0451a5"}},{"scope":"storage","settings":{"foreground":"#0000ff"}},{"scope":"storage.type","settings":{"foreground":"#0000ff"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#0000ff"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#a31515"}},{"scope":["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],"settings":{"foreground":"#0000ff"}},{"scope":"string.regexp","settings":{"foreground":"#811f3f"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#0000ff"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#000000"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#0451a5"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#e50000"}},{"scope":["support.type.property-name.json"],"settings":{"foreground":"#0451a5"}},{"scope":"keyword","settings":{"foreground":"#0000ff"}},{"scope":"keyword.control","settings":{"foreground":"#0000ff"}},{"scope":"keyword.operator","settings":{"foreground":"#000000"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#0000ff"}},{"scope":"keyword.other.unit","settings":{"foreground":"#098658"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#800000"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#0451a5"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#098658"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#000000"}},{"scope":"variable.language","settings":{"foreground":"#0000ff"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#795E26"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#267f99"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#267f99"}},{"scope":["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#AF00DB"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#001080"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#0070C1"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#001080"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#0451a5"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#811f3f"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#000000"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#EE0000"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#0000ff"}},{"scope":"constant.character.escape","settings":{"foreground":"#EE0000"}},{"scope":"entity.name.label","settings":{"foreground":"#000000"}}],"type":"light"}')),Jw=Object.freeze(JSON.parse('{"colors":{"actionBar.toggledBackground":"#383a49","activityBarBadge.background":"#007ACC","checkbox.border":"#6B6B6B","editor.background":"#1E1E1E","editor.foreground":"#D4D4D4","editor.inactiveSelectionBackground":"#3A3D41","editor.selectionHighlightBackground":"#ADD6FF26","editorIndentGuide.activeBackground1":"#707070","editorIndentGuide.background1":"#404040","input.placeholderForeground":"#A6A6A6","list.activeSelectionIconForeground":"#FFF","list.dropBackground":"#383B3D","menu.background":"#252526","menu.border":"#454545","menu.foreground":"#CCCCCC","menu.selectionBackground":"#0078d4","menu.separatorBackground":"#454545","ports.iconRunningProcessForeground":"#369432","sideBarSectionHeader.background":"#0000","sideBarSectionHeader.border":"#ccc3","sideBarTitle.foreground":"#BBBBBB","statusBarItem.remoteBackground":"#16825D","statusBarItem.remoteForeground":"#FFF","tab.lastPinnedBorder":"#ccc3","tab.selectedBackground":"#222222","tab.selectedForeground":"#ffffffa0","terminal.inactiveSelectionBackground":"#3A3D41","widget.border":"#303031"},"displayName":"Dark Plus","name":"dark-plus","semanticHighlighting":true,"semanticTokenColors":{"customLiteral":"#DCDCAA","newOperator":"#C586C0","numberLiteral":"#b5cea8","stringLiteral":"#ce9178"},"tokenColors":[{"scope":["meta.embedded","source.groovy.embedded","string meta.image.inline.markdown","variable.legacy.builtin.python"],"settings":{"foreground":"#D4D4D4"}},{"scope":"emphasis","settings":{"fontStyle":"italic"}},{"scope":"strong","settings":{"fontStyle":"bold"}},{"scope":"header","settings":{"foreground":"#000080"}},{"scope":"comment","settings":{"foreground":"#6A9955"}},{"scope":"constant.language","settings":{"foreground":"#569cd6"}},{"scope":["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],"settings":{"foreground":"#b5cea8"}},{"scope":"constant.regexp","settings":{"foreground":"#646695"}},{"scope":"entity.name.tag","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.tag.css","entity.name.tag.less"],"settings":{"foreground":"#d7ba7d"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#9cdcfe"}},{"scope":["entity.other.attribute-name.class.css","source.css entity.other.attribute-name.class","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.parent.less","source.css entity.other.attribute-name.pseudo-class","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],"settings":{"foreground":"#d7ba7d"}},{"scope":"invalid","settings":{"foreground":"#f44747"}},{"scope":"markup.underline","settings":{"fontStyle":"underline"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.heading","settings":{"fontStyle":"bold","foreground":"#569cd6"}},{"scope":"markup.italic","settings":{"fontStyle":"italic"}},{"scope":"markup.strikethrough","settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inserted","settings":{"foreground":"#b5cea8"}},{"scope":"markup.deleted","settings":{"foreground":"#ce9178"}},{"scope":"markup.changed","settings":{"foreground":"#569cd6"}},{"scope":"punctuation.definition.quote.begin.markdown","settings":{"foreground":"#6A9955"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#6796e6"}},{"scope":"markup.inline.raw","settings":{"foreground":"#ce9178"}},{"scope":"punctuation.definition.tag","settings":{"foreground":"#808080"}},{"scope":["meta.preprocessor","entity.name.function.preprocessor"],"settings":{"foreground":"#569cd6"}},{"scope":"meta.preprocessor.string","settings":{"foreground":"#ce9178"}},{"scope":"meta.preprocessor.numeric","settings":{"foreground":"#b5cea8"}},{"scope":"meta.structure.dictionary.key.python","settings":{"foreground":"#9cdcfe"}},{"scope":"meta.diff.header","settings":{"foreground":"#569cd6"}},{"scope":"storage","settings":{"foreground":"#569cd6"}},{"scope":"storage.type","settings":{"foreground":"#569cd6"}},{"scope":["storage.modifier","keyword.operator.noexcept"],"settings":{"foreground":"#569cd6"}},{"scope":["string","meta.embedded.assembly"],"settings":{"foreground":"#ce9178"}},{"scope":"string.tag","settings":{"foreground":"#ce9178"}},{"scope":"string.value","settings":{"foreground":"#ce9178"}},{"scope":"string.regexp","settings":{"foreground":"#d16969"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],"settings":{"foreground":"#569cd6"}},{"scope":["meta.template.expression"],"settings":{"foreground":"#d4d4d4"}},{"scope":["support.type.vendored.property-name","support.type.property-name","source.css variable","source.coffee.embedded"],"settings":{"foreground":"#9cdcfe"}},{"scope":"keyword","settings":{"foreground":"#569cd6"}},{"scope":"keyword.control","settings":{"foreground":"#569cd6"}},{"scope":"keyword.operator","settings":{"foreground":"#d4d4d4"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],"settings":{"foreground":"#569cd6"}},{"scope":"keyword.other.unit","settings":{"foreground":"#b5cea8"}},{"scope":["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],"settings":{"foreground":"#569cd6"}},{"scope":"support.function.git-rebase","settings":{"foreground":"#9cdcfe"}},{"scope":"constant.sha.git-rebase","settings":{"foreground":"#b5cea8"}},{"scope":["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],"settings":{"foreground":"#d4d4d4"}},{"scope":"variable.language","settings":{"foreground":"#569cd6"}},{"scope":["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],"settings":{"foreground":"#DCDCAA"}},{"scope":["support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],"settings":{"foreground":"#4EC9B0"}},{"scope":["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class","punctuation.separator.namespace.ruby"],"settings":{"foreground":"#4EC9B0"}},{"scope":["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.directive.using","keyword.other.operator","entity.name.operator"],"settings":{"foreground":"#C586C0"}},{"scope":["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],"settings":{"foreground":"#9CDCFE"}},{"scope":["variable.other.constant","variable.other.enummember"],"settings":{"foreground":"#4FC1FF"}},{"scope":["meta.object-literal.key"],"settings":{"foreground":"#9CDCFE"}},{"scope":["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],"settings":{"foreground":"#CE9178"}},{"scope":["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],"settings":{"foreground":"#CE9178"}},{"scope":["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],"settings":{"foreground":"#d16969"}},{"scope":["keyword.operator.or.regexp","keyword.control.anchor.regexp"],"settings":{"foreground":"#DCDCAA"}},{"scope":"keyword.operator.quantifier.regexp","settings":{"foreground":"#d7ba7d"}},{"scope":["constant.character","constant.other.option"],"settings":{"foreground":"#569cd6"}},{"scope":"constant.character.escape","settings":{"foreground":"#d7ba7d"}},{"scope":"entity.name.label","settings":{"foreground":"#C8C8C8"}}],"type":"dark"}')),ex=Object.freeze(JSON.parse('{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"match":"(\\\\[)[^\\\\]]*(])","name":"text.bracketed"},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\'\\"`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\sdelete(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+.*?\\\\s+(is)\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[\\\\-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b(bit_count|get_bit|left_shift|right_shift|set_bit)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[ \\\\t]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[ \\\\t]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(N)?(\')[^\']*(\')","name":"string.quoted.single.sql"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(`)[^`\\\\\\\\]*(`)","name":"string.quoted.other.backtick.sql"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}')),tx=[ex],nx=Object.freeze(JSON.parse('{"displayName":"JSON","name":"json","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json"}},"name":"meta.structure.array.json","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json"},{"match":"[^\\\\s\\\\]]","name":"invalid.illegal.expected-array-separator.json"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.documentation.json"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.json"},{"captures":{"1":{"name":"punctuation.definition.comment.json"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[eE][+\\\\-]?\\\\d+)?)?","name":"constant.numeric.json"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json"}},"name":"meta.structure.dictionary.json","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json"}},"name":"meta.structure.dictionary.value.json","patterns":[{"include":"#value"},{"match":"[^\\\\s,]","name":"invalid.illegal.expected-dictionary-separator.json"}]},{"match":"[^\\\\s}]","name":"invalid.illegal.expected-dictionary-separator.json"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json"}},"name":"string.json support.type.property-name.json","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json"}},"name":"string.quoted.double.json","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"\\\\\\\\/bfnrt]|u\\\\h{4})","name":"constant.character.escape.json"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json"}')),rx=[nx],Xe=String.raw,md=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]);function ox(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function rn(e,t){if(!e)throw new Error(t??"Value expected");return e}const W={Alternator:"Alternator",Assertion:"Assertion",Backreference:"Backreference",Character:"Character",CharacterClassClose:"CharacterClassClose",CharacterClassHyphen:"CharacterClassHyphen",CharacterClassIntersector:"CharacterClassIntersector",CharacterClassOpen:"CharacterClassOpen",CharacterSet:"CharacterSet",Directive:"Directive",GroupClose:"GroupClose",GroupOpen:"GroupOpen",Subroutine:"Subroutine",Quantifier:"Quantifier",EscapedNumber:"EscapedNumber"},$e={any:"any",digit:"digit",dot:"dot",grapheme:"grapheme",hex:"hex",newline:"newline",posix:"posix",property:"property",space:"space",word:"word"},pd={flags:"flags",keep:"keep"},nt={absent_repeater:"absent_repeater",atomic:"atomic",capturing:"capturing",group:"group",lookahead:"lookahead",lookbehind:"lookbehind"},Vr={greedy:"greedy",lazy:"lazy",possessive:"possessive"},Bm=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]),l1=Xe`\[\^?`,i1=`c.? | C(?:-.?)?|${Xe`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Xe`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Xe`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Xe`o\{[^\}]*\}?`}|${Xe`\d{1,3}`}`,a1=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Al=new RegExp(Xe`
|
|
54
|
+
\\ (?:
|
|
55
|
+
${i1}
|
|
56
|
+
| [gk]<[^>]*>?
|
|
57
|
+
| [gk]'[^']*'?
|
|
58
|
+
| .
|
|
59
|
+
)
|
|
60
|
+
| \( (?:
|
|
61
|
+
\? (?:
|
|
62
|
+
[:=!>({]
|
|
63
|
+
| <[=!]
|
|
64
|
+
| <[^>]*>
|
|
65
|
+
| '[^']*'
|
|
66
|
+
| ~\|?
|
|
67
|
+
| #(?:[^)\\]|\\.?)*
|
|
68
|
+
| [^:)]*[:)]
|
|
69
|
+
)?
|
|
70
|
+
| \*
|
|
71
|
+
)?
|
|
72
|
+
| ${a1.source}
|
|
73
|
+
| ${l1}
|
|
74
|
+
| .
|
|
75
|
+
`.replace(/\s+/g,""),"gsu"),lc=new RegExp(Xe`
|
|
76
|
+
\\ (?:
|
|
77
|
+
${i1}
|
|
78
|
+
| .
|
|
79
|
+
)
|
|
80
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
81
|
+
| ${l1}
|
|
82
|
+
| &&
|
|
83
|
+
| .
|
|
84
|
+
`.replace(/\s+/g,""),"gsu");function sx(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=px(n.flags),o=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX:()=>o.at(-1),numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:n.rules.singleline};let l=[],i;for(Al.lastIndex=0;i=Al.exec(e);){const m=lx(s,e,i[0],Al.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(Al.lastIndex=m.lastIndex)}const a=[];let d=0;l.forEach(m=>{m.type===W.GroupOpen&&(m.kind===nt.capturing?m.number=++d:m.raw==="("&&a.push(m))}),d||a.forEach((m,p)=>{m.kind=nt.capturing,m.number=p+1});const f=d||a.length;return l=l.map(m=>m.type===W.EscapedNumber?gx(m,f):m).flat(),{tokens:l,flags:r}}function lx(e,t,n,r){const[o,s]=n;if(o==="["){const l=ix(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:re(W.Assertion,n,{kind:n})};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:re(W.Subroutine,n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:re(W.Backreference,n)}}if(s==="K")return{token:re(W.Directive,n,{kind:pd.keep})};if(s==="N"||s==="R")return{token:re(W.CharacterSet,n,{kind:$e.newline,negate:s==="N"})};if(s==="O")return{token:re(W.CharacterSet,n,{kind:$e.any})};if(s==="X")return{token:re(W.CharacterSet,n,{kind:$e.grapheme})};const l=c1(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(o==="("){if(n==="(*")throw new Error(`Unsupported named callout "${n}"`);if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ux(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:re(W.GroupOpen,n,{kind:nt.group})};if(n==="(?>")return{token:re(W.GroupOpen,n,{kind:nt.atomic})};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:re(W.GroupOpen,n,{kind:n[2]==="<"?nt.lookbehind:nt.lookahead,negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'")){const l=re(W.GroupOpen,n,{kind:nt.capturing});return n!=="("&&(l.name=n.slice(3,-1)),{token:l}}if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absent function kind "${n}"`);return{token:re(W.GroupOpen,n,{kind:nt.absent_repeater})}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:re(W.GroupClose,n)}}if(n==="#"&&e.getCurrentModX()){const l=t.indexOf(`
|
|
85
|
+
`,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)&&e.getCurrentModX()){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}if(n===".")return{token:re(W.CharacterSet,n,{kind:$e.dot})};if(n==="^"||n==="$"){const l=e.singleline?{"^":Xe`\A`,$:Xe`\Z`}[n]:n;return{token:re(W.Assertion,n,{kind:l})}}return n==="|"?{token:re(W.Alternator,n)}:a1.test(n)?{token:dx(n)}:(u1(n),{token:re(W.Character,n,{value:n.codePointAt(0)})})}function ix(e,t,n){const r=[re(W.CharacterClassOpen,t,{negate:t[1]==="^"})];let o=1,s;for(lc.lastIndex=n;s=lc.exec(e);){const l=s[0];if(l[0]==="["&&l[1]!==":")o++,r.push(re(W.CharacterClassOpen,l,{negate:l[1]==="^"}));else if(l==="]"){if(r.at(-1).type===W.CharacterClassOpen)r.push(re(W.Character,l,{value:93}));else if(o--,r.push(re(W.CharacterClassClose,l)),!o)break}else{const i=ax(l);Array.isArray(i)?r.push(...i):r.push(i)}}return{tokens:r,lastIndex:lc.lastIndex||e.length}}function ax(e){if(e[0]==="\\")return c1(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!md.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return re(W.CharacterSet,e,{kind:$e.posix,value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?re(W.CharacterClassHyphen,e):e==="&&"?re(W.CharacterClassIntersector,e):(u1(e),re(W.Character,e,{value:e.codePointAt(0)}))}function c1(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return cx(e);if("dDhHsSwW".includes(n))return fx(e);if(e.startsWith(Xe`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return mx(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...o].map(l=>{const i=[...s.encode(l)].map(a=>`\\x${a.toString(16)}`).join("");return re(W.Character,i,{value:l.codePointAt(0)})})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return re(W.Character,e,{value:hx(e)});if(Bm.has(n))return re(W.Character,e,{value:Bm.get(n)});if(/\d/.test(n))return re(W.EscapedNumber,e,{inCharClass:t});if(e==="\\")throw new Error(Xe`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return re(W.Character,e,{value:e.codePointAt(1)});throw new Error(`Unexpected escape "${e}"`)}function re(e,t,n){return{type:e,raw:t,...n}}function cx(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return re(W.Character,e,{value:t.toUpperCase().codePointAt(0)-64})}function ux(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const o=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=qm(n),l=qm(r),i={};if(s&&(i.enable=s),l&&(i.disable=l),e.endsWith(")"))return t.replaceCurrentModX(o),re(W.Directive,e,{kind:pd.flags,flags:i});if(e.endsWith(":")){t.pushModX(o),t.numOpenGroups++;const a=re(W.GroupOpen,e,{kind:nt.group});return(s||l)&&(a.flags=i),a}throw new Error(`Unexpected flag modifier "${e}"`)}function dx(e){const t={};if(e[0]==="{"){const{min:n,max:r}=/^\{(?<min>\d*)(?:,(?<max>\d*))?/.exec(e).groups,o=1e5;if(+n>o||+r>o)throw new Error("Quantifier value unsupported in Oniguruma");t.min=+n,t.max=r===void 0?+n:r===""?1/0:+r,t.kind=e.endsWith("?")?Vr.lazy:Vr.greedy}else t.min=e[0]==="+"?1:0,t.max=e[0]==="?"?1:1/0,t.kind=e[1]==="+"?Vr.possessive:e[1]==="?"?Vr.lazy:Vr.greedy;return re(W.Quantifier,e,t)}function fx(e){const t=e[1].toLowerCase();return re(W.CharacterSet,e,{kind:{d:$e.digit,h:$e.hex,s:$e.space,w:$e.word}[t],negate:e[1]!==t})}function mx(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups,o=t==="P"&&!n||t==="p"&&!!n;return re(W.CharacterSet,e,{kind:$e.property,value:r,negate:o})}function qm(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function px(e){if(!/^[imxDPSW]*$/.test(e))throw new Error(`Flags "${e}" includes unsupported value`);const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1};for(const n of e)t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0;return t}function hx(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function gx(e,t){const{raw:n,inCharClass:r}=e,o=n.slice(1);if(!r&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[re(W.Backreference,n)];const s=[],l=o.match(/^[0-7]+|\d/g);for(let i=0;i<l.length;i++){const a=l[i];let d;if(i===0&&a!=="8"&&a!=="9"){if(d=parseInt(a,8),d>127)throw new Error(Xe`Octal encoded byte above 177 unsupported "${n}"`)}else d=a.codePointAt(0);s.push(re(W.Character,(i===0?"\\":"")+a,{value:d}))}return s}function u1(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`)}const I={AbsentFunction:"AbsentFunction",Alternative:"Alternative",Assertion:"Assertion",Backreference:"Backreference",CapturingGroup:"CapturingGroup",Character:"Character",CharacterClass:"CharacterClass",CharacterClassRange:"CharacterClassRange",CharacterSet:"CharacterSet",Directive:"Directive",Flags:"Flags",Group:"Group",LookaroundAssertion:"LookaroundAssertion",Pattern:"Pattern",Quantifier:"Quantifier",Regex:"Regex",Subroutine:"Subroutine",Recursion:"Recursion"},d1={repeater:"repeater"},Ce={grapheme_boundary:"grapheme_boundary",line_end:"line_end",line_start:"line_start",search_start:"search_start",string_end:"string_end",string_end_newline:"string_end_newline",string_start:"string_start",word_boundary:"word_boundary"},Cn={union:"union",intersection:"intersection"},Pe=$e,ds=pd,eu=Vr,Xn={lookahead:"lookahead",lookbehind:"lookbehind"};function f1(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=sx(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o={capturingGroups:[],current:0,hasNumberedRef:!1,namedGroupsByName:new Map,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],token:null,tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s};function s(p,h){const y=r.tokens[o.current];switch(o.parent=p,o.token=y,o.current++,y.type){case W.Alternator:return In();case W.Assertion:return Sx(y);case W.Backreference:return yx(o);case W.Character:return hd(y.value,{useLastValid:!!h.isCheckingRangeEnd});case W.CharacterClassHyphen:return vx(o,h);case W.CharacterClassOpen:return bx(o,h);case W.CharacterSet:return wx(o);case W.Directive:return jx(rn(ds[y.kind],`Unexpected directive kind "${y.kind}"`),{flags:y.flags});case W.GroupOpen:return xx(o,h);case W.Quantifier:return Cx(o);case W.Subroutine:return _x(o);default:throw new Error(`Unexpected token type "${y.type}"`)}}const l=Ax(Lx(),Tx(r.flags));let i=l.pattern.alternatives[0];for(;o.current<r.tokens.length;){const p=s(i,{});p.type===I.Alternative?(l.pattern.alternatives.push(p),i=p):i.elements.push(p)}const{capturingGroups:a,hasNumberedRef:d,namedGroupsByName:f,subroutines:m}=o;if(d&&f.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:p}of m)if(typeof p=="number"){if(p>a.length)throw new Error("Subroutine uses a group number that's not defined")}else if(f.has(p)){if(f.get(p).length>1)throw new Error(Xe`Subroutine uses a duplicate group name "\g<${p}>"`)}else throw new Error(Xe`Subroutine uses a group name that's not defined "\g<${p}>"`);return l}function yx(e){const{raw:t}=e.token,n=/^\\k[<']/.test(t),r=n?t.slice(3,-1):t.slice(1),o=(s,l=!1)=>{const i=e.capturingGroups.length;let a=!1;if(s>i)if(e.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return e.hasNumberedRef=!0,tu(l?i+1-s:s,{orphan:a})};if(n){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${t}"`);if(!e.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${t}"`);return tu(r)}return o(+r)}function vx(e,t){const{parent:n,tokens:r,walk:o}=e,s=n.elements.at(-1),l=r[e.current];if(!t.isCheckingRangeEnd&&s&&s.type!==I.CharacterClass&&s.type!==I.CharacterClassRange&&l&&l.type!==W.CharacterClassOpen&&l.type!==W.CharacterClassClose&&l.type!==W.CharacterClassIntersector){const i=o(n,{...t,isCheckingRangeEnd:!0});if(s.type===I.Character&&i.type===I.Character)return n.elements.pop(),Rx(s,i);throw new Error("Invalid character class range")}return hd(45)}function bx(e,t){const{token:n,tokens:r,walk:o}=e,s=r[e.current],l=[ei()];let i=Wm(s);for(;i.type!==W.CharacterClassClose;){if(i.type===W.CharacterClassIntersector)l.push(ei()),e.current++;else{const d=l.at(-1);d.elements.push(o(d,t))}i=Wm(r[e.current],s)}const a=ei({negate:n.negate});return l.length===1?a.elements=l[0].elements:(a.kind=Cn.intersection,a.elements=l.map(d=>d.elements.length===1?d.elements[0]:d)),e.current++,a}function wx({token:e,normalizeUnknownPropertyNames:t,skipPropertyNameValidation:n,unicodePropertyMap:r}){let{kind:o,negate:s,value:l}=e;if(o===$e.property){const i=ua(l);if(md.has(i)&&!r?.has(i))o=$e.posix,l=i;else return Hr(l,{negate:s,normalizeUnknownPropertyNames:t,skipPropertyNameValidation:n,unicodePropertyMap:r})}return o===$e.posix?Mx(l,{negate:s}):nu(o,{negate:s})}function xx(e,t){const{token:n,tokens:r,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:i}=e;let a=Ex(n);const d=a.type===I.AbsentFunction,f=a.kind===Xn.lookbehind,m=f&&a.negate;if(a.type===I.CapturingGroup&&(o.push(a),a.name&&ox(s,a.name,[]).push(a)),d&&t.isInAbsentFunction)throw new Error("Nested absent function not supported by Oniguruma");let p=Gm(r[e.current]);for(;p.type!==W.GroupClose;){if(p.type===W.Alternator)a.alternatives.push(In()),e.current++;else{const h=a.alternatives.at(-1),y=i(h,{...t,isInAbsentFunction:t.isInAbsentFunction||d,isInLookbehind:t.isInLookbehind||f,isInNegLookbehind:t.isInNegLookbehind||m});if(h.elements.push(y),(f||t.isInLookbehind)&&!l){const g="Lookbehind includes a pattern not allowed by Oniguruma";if(m||t.isInNegLookbehind){if(y.kind===Xn.lookahead||y.type===I.CapturingGroup)throw new Error(g)}else if(y.kind===Xn.lookahead||y.kind===Xn.lookbehind&&y.negate)throw new Error(g)}}p=Gm(r[e.current])}return e.current++,a}function Cx({token:e,parent:t}){const{min:n,max:r,kind:o}=e,s=t.elements.at(-1);if(!s||s.type===I.Assertion||s.type===I.Directive||s.type===I.LookaroundAssertion)throw new Error("Quantifier requires a repeatable token");const l=h1(s,n,r,rn(eu[o],`Unexpected quantifier kind "${o}"`));return t.elements.pop(),l}function _x(e){const{token:t,capturingGroups:n,subroutines:r}=e;let o=t.raw.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){const i=+s.groups.num,a=n.length;if(e.hasNumberedRef=!0,o={"":i,"+":a+i,"-":a+1-i}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const l=Ix(o);return r.push(l),l}function kx(e){return{type:I.AbsentFunction,kind:e,alternatives:[In()]}}function In(){return{type:I.Alternative,elements:[]}}function m1(e,t){const n={type:I.Assertion,kind:e};return(e===Ce.word_boundary||e===Ce.grapheme_boundary)&&(n.negate=!!t?.negate),n}function Sx({kind:e}){return m1(rn({"^":Ce.line_start,$:Ce.line_end,"\\A":Ce.string_start,"\\b":Ce.word_boundary,"\\B":Ce.word_boundary,"\\G":Ce.search_start,"\\y":Ce.grapheme_boundary,"\\Y":Ce.grapheme_boundary,"\\z":Ce.string_end,"\\Z":Ce.string_end_newline}[e],`Unexpected assertion kind "${e}"`),{negate:e===Xe`\B`||e===Xe`\Y`})}function tu(e,t){const n=!!t?.orphan;return{type:I.Backreference,ref:e,...n&&{orphan:n}}}function Ex({flags:e,kind:t,name:n,negate:r,number:o}){switch(t){case nt.absent_repeater:return kx(d1.repeater);case nt.atomic:return Ot({atomic:!0});case nt.capturing:return p1(o,n);case nt.group:return Ot({flags:e});case nt.lookahead:case nt.lookbehind:return fs({behind:t===nt.lookbehind,negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function p1(e,t){const n=t!==void 0;if(n&&!Px(t))throw new Error(`Group name "${t}" invalid in Oniguruma`);return{type:I.CapturingGroup,number:e,...n&&{name:t},alternatives:[In()]}}function hd(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:I.Character,value:e}}function ei(e){const t={kind:Cn.union,negate:!1,...e};return{type:I.CharacterClass,kind:t.kind,negate:t.negate,elements:[]}}function Rx(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:I.CharacterClassRange,min:e,max:t}}function nu(e,t){const n=!!t?.negate,r={type:I.CharacterSet,kind:rn(Pe[e],`Unexpected character set kind "${e}"`)};return(e===$e.digit||e===$e.hex||e===$e.newline||e===$e.space||e===$e.word)&&(r.negate=n),(e===$e.grapheme||e===$e.newline&&!n)&&(r.variableLength=!0),r}function jx(e,t){const n={type:I.Directive,kind:e};return e===ds.flags&&(n.flags=t.flags),n}function Tx(e){return{type:I.Flags,...e}}function Ot(e){const t=e?.atomic,n=e?.flags;return{type:I.Group,...t&&{atomic:t},...n&&{flags:n},alternatives:[In()]}}function fs(e){const t={behind:!1,negate:!1,...e};return{type:I.LookaroundAssertion,kind:t.behind?Xn.lookbehind:Xn.lookahead,negate:t.negate,alternatives:[In()]}}function Lx(){return{type:I.Pattern,alternatives:[In()]}}function Mx(e,t){const n=!!t?.negate;if(!md.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:I.CharacterSet,kind:Pe.posix,value:e,negate:n}}function h1(e,t,n,r=eu.greedy){const o={type:I.Quantifier,min:t,max:n,kind:r,element:e};return n<t?{...o,min:n,max:t,kind:eu.possessive}:o}function Ax(e,t){return{type:I.Regex,pattern:e,flags:t}}function Ix(e){return{type:I.Subroutine,ref:e}}function Hr(e,t){var n;const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let o=(n=r.unicodePropertyMap)==null?void 0:n.get(ua(e));if(!o){if(r.normalizeUnknownPropertyNames)o=Dx(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(Xe`Invalid Unicode property "\p{${e}}"`)}return{type:I.CharacterSet,kind:Pe.property,value:o??e,negate:r.negate}}function Px(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Dx(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ua(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Wm(e,t){return rn(e,`${t?.value===93?"Empty":"Unclosed"} character class`)}function Gm(e){return rn(e,"Unclosed group")}const gd=String.raw,Um=gd`(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})`,Ym=gd`\u{E0061}-\u{E007A}`,Ox=()=>new RegExp(gd`[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[${Ym}]{2}[\u{E0030}-\u{E0039}${Ym}]{1,3}\u{E007F}|${Um}(?:\u200D${Um})*`,"gu");function ms(e,t,n=null){function r(s,l){for(let i=0;i<s.length;i++){const a=o(s[i],l,i,s);i=Math.max(-1,i+a)}}function o(s,l=null,i=null,a=null){var d,f;const m="Container expected";let p=0,h=!1;const y={node:s,parent:l,key:i,container:a,root:e,remove(){rn(a,m).splice(Math.max(0,i+p),1),p--,h=!0},removeAllNextSiblings(){return rn(a,m).splice(i+1)},removeAllPrevSiblings(){const x=i+p;return p-=x,rn(a,m).splice(0,Math.max(0,x))},replaceWith(x,_={}){const C=!!_.traverse;a?a[Math.max(0,i+p)]=x:l[i]=x,C&&o(x,l,i,a),h=!0},replaceWithMultiple(x,_={}){const C=!!_.traverse;if(rn(a,m).splice(Math.max(0,i+p),1,...x),p+=x.length-1,C){let E=0;for(let k=0;k<x.length;k++)E+=o(x[k],l,i+k+E,a)}h=!0},skip(){h=!0}},g=t["*"],v=t[s.type],b=typeof g=="function"?g:g?.enter,w=typeof v=="function"?v:v?.enter;if(b?.(y,n),w?.(y,n),!h)switch(s.type){case I.Regex:o(s.pattern,s,"pattern"),o(s.flags,s,"flags");break;case I.Alternative:case I.CharacterClass:r(s.elements,s);break;case I.Assertion:case I.Backreference:case I.Character:case I.CharacterSet:case I.Directive:case I.Flags:case I.Recursion:case I.Subroutine:break;case I.AbsentFunction:case I.CapturingGroup:case I.Group:case I.Pattern:r(s.alternatives,s);break;case I.CharacterClassRange:o(s.min,s,"min"),o(s.max,s,"max");break;case I.LookaroundAssertion:r(s.alternatives,s);break;case I.Quantifier:o(s.element,s,"element");break;default:throw new Error(`Unexpected node type "${s.type}"`)}return(d=g?.exit)==null||d.call(g,y,n),(f=v?.exit)==null||f.call(v,y,n),p}o(e)}const Nx=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function $x(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function zx(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Tt=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function yd(e,t,n,r){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let l=0,i="";for(const a of e.matchAll(o)){const{0:d,groups:{$skip:f}}=a;if(!f&&(!r||r===Tt.DEFAULT==!l)){n instanceof Function?i+=n(a,{context:l?Tt.CHAR_CLASS:Tt.DEFAULT,negated:s[s.length-1]}):i+=n;continue}d[0]==="["?(l++,s.push(d[1]==="^")):d==="]"&&l&&(l--,s.pop()),i+=d}return i}function g1(e,t,n,r){yd(e,t,n,r)}function Fx(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let s=0,l;for(;l=o.exec(e);){const{0:i,groups:{$skip:a}}=l;if(!a&&(!r||r===Tt.DEFAULT==!s))return l;i==="["?s++:i==="]"&&s&&s--,o.lastIndex==l.index&&o.lastIndex++}return null}function Il(e,t,n){return!!Fx(e,t,0,n)}function Bx(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,o=0,s=1,l;for(;l=n.exec(e);){const[i]=l;if(i==="[")o++;else if(o)i==="]"&&o--;else if(i==="(")s++;else if(i===")"&&(s--,!s)){r=l.index;break}}return e.slice(t,r)}const Vm=new RegExp(String.raw`(?<noncapturingStart>${Nx})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function qx(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const o="(?>",s="(?:(?=(",l=[0],i=[];let a=0,d=0,f=NaN,m;do{m=!1;let p=0,h=0,y=!1,g;for(Vm.lastIndex=Number.isNaN(f)?0:f+s.length;g=Vm.exec(e);){const{0:v,index:b,groups:{capturingStart:w,noncapturingStart:x}}=g;if(v==="[")p++;else if(p)v==="]"&&p--;else if(v===o&&!y)f=b,y=!0;else if(y&&x)h++;else if(w)y?h++:(a++,l.push(a+d));else if(v===")"&&y){if(!h){d++;const _=a+d;if(e=`${e.slice(0,f)}${s}${e.slice(f+o.length,b)}))<$$${_}>)${e.slice(b+1)}`,m=!0,i.push(_),$x(n,_),r.size){const C=new Map;r.forEach((E,k)=>{C.set(k>=_?k+1:k,E.map(R=>R>=_?R+1:R))}),r=C}break}h--}}}while(m);return n.push(...i),e=yd(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:p,groups:{backrefNum:h,wrappedBackrefNum:y}})=>{if(h){const g=+h;if(g>l.length-1)throw new Error(`Backref "${p}" greater than number of captures`);return`\\${l[g]}`}return`\\${y}`},Tt.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const y1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ic=new RegExp(String.raw`
|
|
86
|
+
\\(?: \d+
|
|
87
|
+
| c[A-Za-z]
|
|
88
|
+
| [gk]<[^>]+>
|
|
89
|
+
| [pPu]\{[^\}]+\}
|
|
90
|
+
| u[A-Fa-f\d]{4}
|
|
91
|
+
| x[A-Fa-f\d]{2}
|
|
92
|
+
)
|
|
93
|
+
| \((?: \? (?: [:=!>]
|
|
94
|
+
| <(?:[=!]|[^>]+>)
|
|
95
|
+
| [A-Za-z\-]+:
|
|
96
|
+
| \(DEFINE\)
|
|
97
|
+
))?
|
|
98
|
+
| (?<qBase>${y1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
99
|
+
| \\?.
|
|
100
|
+
`.replace(/\s+/g,""),"gsu");function Wx(e){if(!new RegExp(`${y1}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,o="",s=0,l;for(ic.lastIndex=0;l=ic.exec(e);){const{0:i,index:a,groups:{qBase:d,qMod:f,invalidQ:m}}=l;if(i==="[")s||(r=a),s++;else if(i==="]")s?s--:r=null;else if(!s)if(f==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${i}"`);let p=-1;if(/^\{\d+\}$/.test(d))e=zx(e,a+d.length,f,"");else{if(o===")"||o==="]"){const h=o===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,h)}(?>${e.slice(h,a)}${d})${e.slice(a+i.length)}`}else e=`${e.slice(0,a-o.length)}(?>${o}${d})${e.slice(a+i.length)}`;p+=4}ic.lastIndex+=p}else i[0]==="("?t.push(a):i===")"&&(n=t.length?t.pop():null);o=i}return{pattern:e}}const jt=String.raw,Gx=jt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ru=jt`\(\?R=(?<rDepth>[^\)]+)\)|${Gx}`,da=jt`\(\?<(?![=!])(?<captureName>[^>]+)>`,v1=jt`${da}|(?<unnamed>\()(?!\?)`,gr=new RegExp(jt`${da}|${ru}|\(\?|\\?.`,"gsu"),ac="Cannot use multiple overlapping recursions";function Ux(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(ru,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(r==="plugin"&&Il(e,jt`\(\?\(DEFINE\)`,Tt.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],l=Il(e,jt`\\[1-9]`,Tt.DEFAULT),i=new Map,a=[];let d=!1,f=0,m=0,p;for(gr.lastIndex=0;p=gr.exec(e);){const{0:h,groups:{captureName:y,rDepth:g,gRNameOrNum:v,gRDepth:b}}=p;if(h==="[")f++;else if(f)h==="]"&&f--;else if(g){if(Hm(g),d)throw new Error(ac);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const w=e.slice(0,p.index),x=e.slice(gr.lastIndex);if(Il(x,ru,Tt.DEFAULT))throw new Error(ac);const _=+g-1;e=Xm(w,x,_,!1,n,s,m),o=Km(o,w,_,s.length,0,m);break}else if(v){Hm(b);let w=!1;for(const $ of a)if($.name===v||$.num===+v){if(w=!0,$.hasRecursedWithin)throw new Error(ac);break}if(!w)throw new Error(jt`Recursive \g cannot be used outside the referenced group "${r==="external"?v:jt`\g<${v}&R=${b}>`}"`);const x=i.get(v),_=Bx(e,x);if(l&&Il(_,jt`${da}|\((?!\?)`,Tt.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const C=e.slice(x,p.index),E=_.slice(C.length+h.length),k=s.length,R=+b-1,j=Xm(C,E,R,!0,n,s,m);o=Km(o,C,R,s.length-k,k,m);const M=e.slice(0,x),D=e.slice(x+_.length);e=`${M}${j}${D}`,gr.lastIndex+=j.length-h.length-C.length-E.length,a.forEach($=>$.hasRecursedWithin=!0),d=!0}else if(y)m++,i.set(String(m),gr.lastIndex),i.set(y,gr.lastIndex),a.push({num:m,name:y});else if(h[0]==="("){const w=h==="(";w&&(m++,i.set(String(m),gr.lastIndex)),a.push(w?{num:m}:{})}else h===")"&&a.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function Hm(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Xm(e,t,n,r,o,s,l){const i=new Set;r&&g1(e+t,da,({groups:{captureName:d}})=>{i.add(d)},Tt.DEFAULT);const a=[n,r?i:null,o,s,l];return`${e}${Zm(`(?:${e}`,"forward",...a)}(?:)${Zm(`${t})`,"backward",...a)}${t}`}function Zm(e,t,n,r,o,s,l){const a=f=>t==="forward"?f+2:n-f+2-1;let d="";for(let f=0;f<n;f++){const m=a(f);d+=yd(e,jt`${v1}|\\k<(?<backref>[^>]+)>`,({0:p,groups:{captureName:h,unnamed:y,backref:g}})=>{if(g&&r&&!r.has(g))return p;const v=`_$${m}`;if(y||h){const b=l+s.length+1;return s.push(b),Yx(o,b),y?p:`(?<${h}${v}>`}return jt`\k<${g}${v}>`},Tt.DEFAULT)}return d}function Yx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Km(e,t,n,r,o,s){if(e.size&&r){let l=0;g1(t,v1,()=>l++,Tt.DEFAULT);const i=s-l+o,a=new Map;return e.forEach((d,f)=>{const m=(r-l*n)/n,p=l*n,h=f>i+l?f+r:f,y=[];for(const g of d)if(g<=i)y.push(g);else if(g>i+l+m)y.push(g+r);else if(g<=i+l)for(let v=0;v<=n;v++)y.push(g+l*v);else for(let v=0;v<=n;v++)y.push(g+p+m*v);a.set(h,y)}),a}return e}var qe=String.fromCodePoint,J=String.raw,ho={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("","v")}catch{return!1}return!0})()};ho.literalHyphenIncorrectlyCreatesRange=(()=>{if(!ho.unicodeSets)return!1;try{new RegExp(J`[\d\-a]`,"v")}catch{return!0}return!1})();function Ri(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ts(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function ou(e,t){return Qm[e]>=Qm[t]}function Vx(e,t){if(!e)throw new Error("Value expected");return e}var Qm={ES2025:2025,ES2024:2024,ES2018:2018},Hx={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function b1(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Hx[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=ho.flagGroups?"ES2025":ho.unicodeSets?"ES2024":"ES2018"),t}var Xx="[ -\r ]",vn=J`[\p{L}\p{M}\p{N}\p{Pc}]`,Zx=new Set([qe(304),qe(305)]);function w1(e){if(Zx.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),o=Jx.get(n),s=Kx.get(n),l=Qx.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),o&&t.add(o),t.add(n),s&&t.add(s),[...t]}var vd=new Map(`C Other
|
|
101
|
+
Cc Control cntrl
|
|
102
|
+
Cf Format
|
|
103
|
+
Cn Unassigned
|
|
104
|
+
Co Private_Use
|
|
105
|
+
Cs Surrogate
|
|
106
|
+
L Letter
|
|
107
|
+
LC Cased_Letter
|
|
108
|
+
Ll Lowercase_Letter
|
|
109
|
+
Lm Modifier_Letter
|
|
110
|
+
Lo Other_Letter
|
|
111
|
+
Lt Titlecase_Letter
|
|
112
|
+
Lu Uppercase_Letter
|
|
113
|
+
M Mark Combining_Mark
|
|
114
|
+
Mc Spacing_Mark
|
|
115
|
+
Me Enclosing_Mark
|
|
116
|
+
Mn Nonspacing_Mark
|
|
117
|
+
N Number
|
|
118
|
+
Nd Decimal_Number digit
|
|
119
|
+
Nl Letter_Number
|
|
120
|
+
No Other_Number
|
|
121
|
+
P Punctuation punct
|
|
122
|
+
Pc Connector_Punctuation
|
|
123
|
+
Pd Dash_Punctuation
|
|
124
|
+
Pe Close_Punctuation
|
|
125
|
+
Pf Final_Punctuation
|
|
126
|
+
Pi Initial_Punctuation
|
|
127
|
+
Po Other_Punctuation
|
|
128
|
+
Ps Open_Punctuation
|
|
129
|
+
S Symbol
|
|
130
|
+
Sc Currency_Symbol
|
|
131
|
+
Sk Modifier_Symbol
|
|
132
|
+
Sm Math_Symbol
|
|
133
|
+
So Other_Symbol
|
|
134
|
+
Z Separator
|
|
135
|
+
Zl Line_Separator
|
|
136
|
+
Zp Paragraph_Separator
|
|
137
|
+
Zs Space_Separator
|
|
138
|
+
ASCII
|
|
139
|
+
ASCII_Hex_Digit AHex
|
|
140
|
+
Alphabetic Alpha
|
|
141
|
+
Any
|
|
142
|
+
Assigned
|
|
143
|
+
Bidi_Control Bidi_C
|
|
144
|
+
Bidi_Mirrored Bidi_M
|
|
145
|
+
Case_Ignorable CI
|
|
146
|
+
Cased
|
|
147
|
+
Changes_When_Casefolded CWCF
|
|
148
|
+
Changes_When_Casemapped CWCM
|
|
149
|
+
Changes_When_Lowercased CWL
|
|
150
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
151
|
+
Changes_When_Titlecased CWT
|
|
152
|
+
Changes_When_Uppercased CWU
|
|
153
|
+
Dash
|
|
154
|
+
Default_Ignorable_Code_Point DI
|
|
155
|
+
Deprecated Dep
|
|
156
|
+
Diacritic Dia
|
|
157
|
+
Emoji
|
|
158
|
+
Emoji_Component EComp
|
|
159
|
+
Emoji_Modifier EMod
|
|
160
|
+
Emoji_Modifier_Base EBase
|
|
161
|
+
Emoji_Presentation EPres
|
|
162
|
+
Extended_Pictographic ExtPict
|
|
163
|
+
Extender Ext
|
|
164
|
+
Grapheme_Base Gr_Base
|
|
165
|
+
Grapheme_Extend Gr_Ext
|
|
166
|
+
Hex_Digit Hex
|
|
167
|
+
IDS_Binary_Operator IDSB
|
|
168
|
+
IDS_Trinary_Operator IDST
|
|
169
|
+
ID_Continue IDC
|
|
170
|
+
ID_Start IDS
|
|
171
|
+
Ideographic Ideo
|
|
172
|
+
Join_Control Join_C
|
|
173
|
+
Logical_Order_Exception LOE
|
|
174
|
+
Lowercase Lower
|
|
175
|
+
Math
|
|
176
|
+
Noncharacter_Code_Point NChar
|
|
177
|
+
Pattern_Syntax Pat_Syn
|
|
178
|
+
Pattern_White_Space Pat_WS
|
|
179
|
+
Quotation_Mark QMark
|
|
180
|
+
Radical
|
|
181
|
+
Regional_Indicator RI
|
|
182
|
+
Sentence_Terminal STerm
|
|
183
|
+
Soft_Dotted SD
|
|
184
|
+
Terminal_Punctuation Term
|
|
185
|
+
Unified_Ideograph UIdeo
|
|
186
|
+
Uppercase Upper
|
|
187
|
+
Variation_Selector VS
|
|
188
|
+
White_Space space
|
|
189
|
+
XID_Continue XIDC
|
|
190
|
+
XID_Start XIDS`.split(/\s/).map(e=>[ua(e),e])),Kx=new Map([["s",qe(383)],[qe(383),"s"]]),Qx=new Map([[qe(223),qe(7838)],[qe(107),qe(8490)],[qe(229),qe(8491)],[qe(969),qe(8486)]]),Jx=new Map([Yn(453),Yn(456),Yn(459),Yn(498),...cc(8072,8079),...cc(8088,8095),...cc(8104,8111),Yn(8124),Yn(8140),Yn(8188)]),e9=new Map([["alnum",J`[\p{Alpha}\p{Nd}]`],["alpha",J`\p{Alpha}`],["ascii",J`\p{ASCII}`],["blank",J`[\p{Zs}\t]`],["cntrl",J`\p{Cc}`],["digit",J`\p{Nd}`],["graph",J`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",J`\p{Lower}`],["print",J`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",J`[\p{P}\p{S}]`],["space",J`\p{space}`],["upper",J`\p{Upper}`],["word",J`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",J`\p{AHex}`]]);function t9(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Yn(e){const t=qe(e);return[t.toLowerCase(),t]}function cc(e,t){return t9(e,t).map(n=>Yn(n))}var x1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function n9(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};C1(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ou(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ms(e,r9,r);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};ms(e,o9,s);const l={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return ms(e,s9,l),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var r9={AbsentFunction({node:e,parent:t,replaceWith:n}){const{kind:r,alternatives:o}=e;if(r===d1.repeater){const s=wn(Ot(),[go(fs({negate:!0}),o),Hr("Any")]),l=h1(s,0,1/0);s.parent=l,n(xe(wn(Ot(),[l]),t),{traverse:!0})}else throw new Error(`Unexpected absent function kind "${r}"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const o=e.elements.filter(s=>s.kind===ds.flags);for(let s=n+1;s<t.alternatives.length;s++){const l=t.alternatives[s];Ts(r,l,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=k1(t.get(e));if(r){const o=xe(wn(Ot({flags:r}),e.elements),e);e.elements=[o]}}}},Assertion({node:e,parent:t,key:n,container:r,root:o,remove:s,replaceWith:l},i){const{kind:a,negate:d}=e,{asciiWordBoundaries:f,avoidSubclass:m,supportedGNodes:p,wordIsAscii:h}=i;if(a===Ce.grapheme_boundary)throw new Error(`Unsupported grapheme boundary "\\${d?"Y":"y"}"`);if(a===Ce.line_end)l(xe(Qt(J`(?=\z|\n)`),t));else if(a===Ce.line_start)l(xe(Qt(J`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(a===Ce.search_start)if(p.has(e))o.flags.sticky=!0,s();else{const y=r[n-1];if(y&&d9(y))l(xe(wn(fs({negate:!0})),t));else{if(m)throw new Error(J`Uses "\G" in a way that requires a subclass`);l(xe(m1(Ce.string_start),t)),i.strategy="clip_search"}}else if(!(a===Ce.string_end||a===Ce.string_start))if(a===Ce.string_end_newline)l(xe(Qt(J`(?=\n?\z)`),t));else if(a===Ce.word_boundary){if(!h&&!f){const y=`(?:(?<=${vn})(?!${vn})|(?<!${vn})(?=${vn}))`,g=`(?:(?<=${vn})(?=${vn})|(?<!${vn})(?!${vn}))`;l(xe(Qt(d?g:y),t))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!dc(n)&&(n=uc(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!dc(r)&&(r=uc(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===Cn.intersection&&n(xe(go(ei(),[e]),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:l,wordIsAscii:i}){const{kind:a,negate:d,value:f}=e;if(s&&(a===Pe.digit||f==="digit")){n(xe(nu(Pe.digit,{negate:d}),t));return}if(l&&(a===Pe.space||f==="space")){n(xe(fc(Qt(Xx),d),t));return}if(i&&(a===Pe.word||f==="word")){n(xe(nu(Pe.word,{negate:d}),t));return}if(a===Pe.any)n(xe(Hr("Any"),t));else if(a===Pe.digit)n(xe(Hr("Nd",{negate:d}),t));else if(a!==Pe.dot)if(a===Pe.grapheme){if(r==="strict")throw new Error(J`Use of "\X" requires non-strict accuracy`);const m=o?J`\p{RGI_Emoji}`:Ox().source.replace(/\\u\{/g,"\\x{");n(xe(Qt(J`(?>\r\n|${m}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(a===Pe.hex)n(xe(Hr("AHex",{negate:d}),t));else if(a===Pe.newline)n(xe(Qt(d?`[^
|
|
191
|
+
]`:`(?>\r
|
|
192
|
+
?|[
|
|
193
|
+
\v\f
\u2028\u2029])`),t));else if(a===Pe.posix)if(!o&&(f==="graph"||f==="print")){if(r==="strict")throw new Error(`POSIX class "${f}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[f];d&&(m=`\0-${qe(m.codePointAt(0)-1)}${qe(m.codePointAt(2)+1)}-`),n(xe(Qt(`[${m}]`),t))}else n(xe(fc(Qt(e9.get(f)),d),t));else if(a===Pe.property)vd.has(ua(f))||(e.key="sc");else if(a===Pe.space)n(xe(Hr("space",{negate:d}),t));else if(a===Pe.word)n(xe(fc(Qt(vn),d),t));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:l}){const{kind:i,flags:a}=e;if(i===ds.flags)!a.enable&&!a.disable?r():o(xe(wn(Ot({flags:a}),l()),t),{traverse:!0});else if(i===ds.keep){const d=n.pattern.alternatives[0].elements[0],m=j1(n.pattern,p=>p.type===I.Group)&&d.alternatives.length===1?d:n.pattern;if(t.parent!==m||m.alternatives.length>1)throw new Error(J`Uses "\K" in a way that's unsupported`);o(xe(wn(fs({behind:!0}),s()),t))}else throw new Error(`Unexpected directive kind "${i}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n===Xn.lookbehind&&(t.passedLookbehind=!0)},Pattern:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,o=!1;for(const s of e.alternatives)if(s.elements.length===1&&s.elements[0].kind===Ce.search_start)s.elements.pop();else{const l=E1(s.elements);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):o=!0}r&&!o&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(J`Uses "\G" in a way that requires non-strict accuracy`)}},Quantifier({node:e}){if(e.element.type===I.Quantifier){const t=xe(wn(Ot(),[e.element]),e);e.element=t}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!dc(n)&&(n=uc(n,t),e.ref=n)}},o9={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:o}=e;r||n.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:l,openRefs:i,reffedNodesByReferencer:a}){const d=o.get(e);if(d&&i.has(e.number)){const m=xe(Jm(e.number),t);a.set(m,i.get(e.number)),n(m);return}i.set(e.number,e),l.set(e.number,[]),e.name&&Ts(l,e.name,[]);const f=l.get(e.name??e.number);for(let m=0;m<f.length;m++){const p=f[m];if(d===p.node||d&&d===p.origin||e===p.origin){f.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:d}),e.name&&l.get(e.name).push({node:e,origin:d}),e.name){const m=Ts(s,e.name,new Map);let p=!1;if(d)p=!0;else for(const h of m.values())if(!h.hasDuplicateNameToRemove){p=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Ri(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Recursion({node:e,parent:t},{reffedNodesByReferencer:n}){const{ref:r}=e;let o=t;for(;(o=o.parent)&&!(o.type===I.CapturingGroup&&(o.name===r||o.number===r)););n.set(e,o)},Subroutine({node:e,parent:t,replaceWith:n},r){const{ref:o}=e,s=r.subroutineRefMap.get(o),l=o===0,i=l?Jm(0):_1(s,r.groupOriginByCopy,null);let a=i;if(!l){const d=k1(a9(s,m=>m.type===I.Group&&!!m.flags)),f=d?Ri(r.globalFlags,d):r.globalFlags;l9(f,r.currentFlags)||(a=wn(Ot({flags:c9(f)}),[i]))}n(xe(a,t),{traverse:!l})}},s9={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(l=>i9(l,e));if(!s.length)n(xe(wn(fs({negate:!0})),t));else if(s.length>1){const l=s.map(i=>go(In(),[tu(i.number)]));n(xe(go(Ot(),l),t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Recursion({node:e},t){e.ref!==0&&(e.ref=t.reffedNodesByReferencer.get(e).number)},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const o=p1();e.pattern.alternatives.at(-1).elements.push(o)}}}};function C1(e){ms(e,{"*"({node:t,parent:n}){t.parent=n}})}function go(e,t){return t.forEach(n=>n.parent=e),e[bd(e)]=t,e}function l9(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function i9(e,t){let n=t;do{if(n.type===I.Pattern)return!1;if(n.type===I.Alternative)continue;if(n===e)return!1;const r=S1(n.parent);for(const o of r){if(o===n)break;if(o===e||R1(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function _1(e,t,n,r){const o=Array.isArray(e)?[]:{};for(const[s,l]of Object.entries(e))s==="parent"?o.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?o[s]=_1(l,t,o,n):(s==="type"&&l===I.CapturingGroup&&t.set(o,t.get(e)??e),o[s]=l);return o}function Jm(e){return{type:I.Recursion,ref:e}}function a9(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function uc(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function bd(e){for(const t of["alternatives","elements"])if(e[t])return t;return null}function k1(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(o=>{var s,l;(s=r.enable)!=null&&s[o]&&(delete n.disable[o],n.enable[o]=!0),(l=r.disable)!=null&&l[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function c9({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function S1(e){if(!e)throw new Error("Node expected");if(e.type===I.Quantifier)return[e.element];const t=bd(e);return t&&e[t]}function E1(e){const t=e.find(n=>n.kind===Ce.search_start||f9(n,{negate:!1})||!u9(n));if(!t)return null;if(t.kind===Ce.search_start)return t;if(t.type===I.LookaroundAssertion)return t.alternatives[0].elements[0];if(t.type===I.CapturingGroup||t.type===I.Group){const n=[];for(const r of t.alternatives){const o=E1(r.elements);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function R1(e,t){const n=S1(e)??[];for(const r of n)if(r===t||R1(r,t))return!0;return!1}function j1({alternatives:e},t){return e.length===1&&e[0].elements.length===1&&(!t||t(e[0].elements[0]))}function u9({type:e}){return e===I.Assertion||e===I.Directive||e===I.LookaroundAssertion}function d9(e){const t=[I.Character,I.CharacterClass,I.CharacterSet];return t.includes(e.type)||e.type===I.Quantifier&&e.min&&t.includes(e.element.type)}function f9(e,t){const n={negate:null,...t};return e.type===I.LookaroundAssertion&&(n.negate===null||e.negate===n.negate)&&j1(e,r=>r.kind===Ce.search_start)}function dc(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Qt(e,t){const n=f1(e,{...t,unicodePropertyMap:vd});C1(n);const r=n.pattern.alternatives;return r.length>1||r[0].elements.length>1?go(Ot(),r):r[0].elements[0]}function wn(e,t){const n=bd(e);return e[n][0].parent=e,t&&go(e[n][0],t),e}function fc(e,t){return e.negate=t,e}function xe(e,t){return e.parent=t,e}function m9(e,t){const n=b1(t),r=ou(n.target,"ES2024"),o=ou(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,i=null;if(!o){const h=[e.flags.ignoreCase];ms(e,p9,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(y){h.push(y)},setHasCasedChar(){h.at(-1)?l=!0:i=!0}})}const a={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!i)};let d=null;const f={accuracy:n.accuracy,appliedGlobalFlags:a,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:d,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&l&&i),useFlagMods:o,useFlagV:r,verbose:n.verbose};function m(h){switch(f.lastNode=d,d=h,h.type){case I.Regex:return{pattern:m(h.pattern),flags:m(h.flags),options:{...h.options}};case I.Alternative:return h.elements.map(m).join("");case I.Assertion:return b9(h);case I.Backreference:return w9(h,f);case I.CapturingGroup:return x9(h,f,m);case I.Character:return C9(h,f);case I.CharacterClass:return _9(h,f,m);case I.CharacterClassRange:return k9(h,f);case I.CharacterSet:return S9(h,f);case I.Flags:return E9(h,f);case I.Group:return R9(h,f,m);case I.LookaroundAssertion:return j9(h,f,m);case I.Pattern:return h.alternatives.map(m).join("|");case I.Quantifier:return m(h.element)+A9(h);case I.Recursion:return T9(h,f);default:throw new Error(`Unexpected node type "${h.type}"`)}}const p=m(e);return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],f.captureMap.forEach((h,y)=>{h.hidden&&p._hiddenCaptures.push(y),h.transferTo&&Ts(p._captureTransfers,h.transferTo,[]).push(y)}),p}var p9={"*":{enter({node:e},t){if(tp(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Ri({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){tp(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){wd(qe(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),T1(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===Pe.property&&x1.has(e.value)&&t.setHasCasedChar()}},h9=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),g9=new Set(["-","\\","]","^","["]),y9=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),ep=new Map([[9,J`\t`],[10,J`\n`],[11,J`\v`],[12,J`\f`],[13,J`\r`],[8232,J`\u2028`],[8233,J`\u2029`],[65279,J`\uFEFF`]]),v9=new RegExp("^\\p{Cased}$","u");function wd(e){return v9.test(e)}function b9({kind:e,negate:t}){if(e===Ce.string_end)return"$";if(e===Ce.string_start)return"^";if(e===Ce.word_boundary)return t?J`\B`:J`\b`;throw new Error(`Unexpected assertion kind "${e}"`)}function w9({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e}function x9(e,t,n){const{name:r,number:o,alternatives:s}=e,l={ignoreCase:t.currentFlags.ignoreCase},i=t.originMap.get(e);return i&&(l.hidden=!0,o>i.number&&(l.transferTo=i.number)),t.captureMap.set(o,l),`(${r?`?<${r}>`:""}${s.map(n).join("|")})`}function C9({value:e},t){const n=qe(e),r=Xr(e,{escDigit:t.lastNode.type===I.Backreference,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&wd(n)){const o=w1(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n}function _9(e,t,n){const{kind:r,negate:o,parent:s}=e;let{elements:l}=e;if(r===Cn.intersection&&!t.useFlagV)throw new Error("Use of class intersection requires min target ES2024");ho.literalHyphenIncorrectlyCreatesRange&&t.useFlagV&&l.some(np)&&(l=l.filter(d=>!np(d)),l.push(hd(45)));const i=()=>`[${o?"^":""}${l.map(n).join(r===Cn.intersection?"&&":"")}]`;if(!t.inCharClass){if(!t.useFlagV&&!o){const f=l.filter(m=>m.type===I.CharacterClass&&m.kind===Cn.union&&m.negate);if(f.length){const m=Ot(),p=m.alternatives[0];return m.parent=s,p.parent=m,l=l.filter(h=>!f.includes(h)),e.elements=l,l.length?(e.parent=p,p.elements.push(e)):m.alternatives.pop(),f.forEach(h=>{const y=In();y.parent=m,h.parent=y,y.elements.push(h),m.alternatives.push(y)}),n(m)}}t.inCharClass=!0;const d=i();return t.inCharClass=!1,d}const a=l[0];if(r===Cn.union&&!o&&a&&((!t.useFlagV||!t.verbose)&&s.kind===Cn.union&&!(ho.literalHyphenIncorrectlyCreatesRange&&t.useFlagV)||!t.verbose&&s.kind===Cn.intersection&&l.length===1&&a.type!==I.CharacterClassRange))return l.map(n).join("");if(!t.useFlagV&&s.type===I.CharacterClass)throw new Error("Use of nested character class requires min target ES2024");return i()}function k9(e,t){const n=e.min.value,r=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Xr(n,o),l=Xr(r,o),i=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const a=T1(e);L9(a).forEach(f=>{i.add(Array.isArray(f)?`${Xr(f[0],o)}-${Xr(f[1],o)}`:Xr(f,o))})}return`${s}-${l}${[...i].join("")}`}function S9({kind:e,negate:t,value:n,key:r},o){if(e===Pe.dot)return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":J`[^\n]`;if(e===Pe.digit)return t?J`\D`:J`\d`;if(e===Pe.property){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&x1.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?J`\P`:J`\p`}{${r?`${r}=`:""}${n}}`}if(e===Pe.word)return t?J`\W`:J`\w`;throw new Error(`Unexpected character set kind "${e}"`)}function E9(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")}function R9({atomic:e,flags:t,parent:n,alternatives:r},o,s){const l=o.currentFlags;t&&(o.currentFlags=Ri(l,t));const i=r.map(s).join("|"),a=!o.verbose&&r.length===1&&n.type!==I.Quantifier&&!e&&(!o.useFlagMods||!t)?i:`(?${M9(e,t,o.useFlagMods)}${i})`;return o.currentFlags=l,a}function j9({kind:e,negate:t,alternatives:n},r,o){return`(?${`${e===Xn.lookahead?"":"<"}${t?"!":"="}`}${n.map(o).join("|")})`}function T9({ref:e},t){const n=t.recursionLimit;return e===0?`(?R=${n})`:J`\g<${e}&R=${n}>`}function T1(e,t){const n=!!t?.firstOnly,r=e.min.value,o=e.max.value,s=[];if(r<65&&(o===65535||o>=131071)||r===65536&&o>=131071)return s;for(let l=r;l<=o;l++){const i=qe(l);if(!wd(i))continue;const a=w1(i).filter(d=>{const f=d.codePointAt(0);return f<r||f>o});if(a.length&&(s.push(...a),n))break}return s}function Xr(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(ep.has(e))return ep.get(e);if(e<32||e>126&&e<160||e>262143||t&&I9(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?r?y9:g9:h9,s=qe(e);return(o.has(s)?"\\":"")+s}function L9(e){const t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),n=[];let r=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?r??(r=t[o]):r===null?n.push(t[o]):(n.push([r,t[o]]),r=null);return n}function M9(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:o,disable:s}=t;r=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${r}:`}function A9({min:e,max:t,kind:n}){let r;return!e&&t===1?r="?":!e&&t===1/0?r="*":e===1&&t===1/0?r="+":e===t?r=`{${e}}`:r=`{${e},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[n]}function tp({type:e}){return e===I.Group||e===I.CapturingGroup||e===I.LookaroundAssertion}function I9(e){return e>47&&e<58}function np({type:e,value:t}){return e===I.Character&&t===45}var P9=(Xo=class extends RegExp{constructor(e,t,n){var r=(...s)=>(super(...s),zr(this,xl),zr(this,pr,new Map),zr(this,Wn,null),zr(this,Br),zr(this,hr,null),zr(this,qr,null),T(this,"rawOptions",{}),this);const o=!!n?.lazyCompile;if(e instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const s=e;r(s,t),Kt(this,Br,s.source),s instanceof Xo&&(Kt(this,pr,it(s,pr)),Kt(this,hr,it(s,hr)),Kt(this,qr,it(s,qr)),this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...n};r(o?"":e,t),Kt(this,Br,e),Kt(this,pr,O9(s.hiddenCaptures,s.transfers)),Kt(this,qr,s.strategy),this.rawOptions=n??{}}o||Kt(this,Wn,this)}get source(){return it(this,Br)||"(?:)"}exec(e){if(!it(this,Wn)){const{lazyCompile:r,...o}=this.rawOptions;Kt(this,Wn,new Xo(it(this,Br),this.flags,o))}const t=this.global||this.sticky,n=this.lastIndex;if(it(this,qr)==="clip_search"&&t&&n){this.lastIndex=0;const r=Ff(this,xl,qa).call(this,e.slice(n));return r&&(D9(r,n,e,this.hasIndices),this.lastIndex+=n),r}return Ff(this,xl,qa).call(this,e)}},pr=new WeakMap,Wn=new WeakMap,Br=new WeakMap,hr=new WeakMap,qr=new WeakMap,xl=new WeakSet,qa=function(e){it(this,Wn).lastIndex=this.lastIndex;const t=P5(Xo.prototype,this,"exec").call(it(this,Wn),e);if(this.lastIndex=it(this,Wn).lastIndex,!t||!it(this,pr).size)return t;const n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);const o=[0];for(let s=1;s<n.length;s++){const{hidden:l,transferTo:i}=it(this,pr).get(s)??{};if(l?o.push(null):(o.push(t.length),t.push(n[s]),this.hasIndices&&t.indices.push(r[s])),i&&n[s]!==void 0){const a=Vx(o[i]);if(t[a]=n[s],this.hasIndices&&(t.indices[a]=r[s]),t.groups){it(this,hr)||Kt(this,hr,N9(this.source));const d=it(this,hr).get(i);d&&(t.groups[d]=n[s],this.hasIndices&&(t.indices.groups[d]=r[s]))}}}return t},Xo);function D9(e,t,n,r){if(e.index+=t,e.input=n,r){const o=e.indices;for(let l=0;l<o.length;l++){const i=o[l];i&&(o[l]=[i[0]+t,i[1]+t])}const s=o.groups;s&&Object.keys(s).forEach(l=>{const i=s[l];i&&(s[l]=[i[0]+t,i[1]+t])})}}function O9(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,o]of t)for(const s of o)Ts(n,s,{}).transferTo=r;return n}function N9(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,o=0,s;for(;s=t.exec(e);){const{0:l,groups:{capture:i,name:a}}=s;l==="["?r++:r?l==="]"&&r--:i&&(o++,a&&n.set(o,a))}return n}function $9(e,t){const n=z9(e,t);return n.options?new P9(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function z9(e,t){const n=b1(t),r=f1(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:vd}),o=n9(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=m9(o,n),l=Ux(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),i=Wx(l.pattern),a=qx(i.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),d={pattern:a.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const f=a.hiddenCaptures.sort((y,g)=>y-g),m=Array.from(a.captureTransfers),p=o._strategy,h=d.pattern.length>=n.lazyCompileLength;(f.length||m.length||p||h)&&(d.options={...f.length&&{hiddenCaptures:f},...m.length&&{transfers:m},...p&&{strategy:p},...h&&{lazyCompile:h}})}return d}const rp=4294967295;class F9{constructor(t,n={}){T(this,"regexps"),this.patterns=t,this.options=n;const{forgiving:r=!1,cache:o,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(l=>{if(typeof l!="string")return l;const i=o?.get(l);if(i){if(i instanceof RegExp)return i;if(r)return null;throw i}try{const a=s(l);return o?.set(l,a),a}catch(a){if(o?.set(l,a),r)return null;throw a}})}findNextMatchSync(t,n,r){const o=typeof t=="string"?t:t.content,s=[];function l(i,a,d=0){return{index:i,captureIndices:a.indices.map(f=>f==null?{start:rp,end:rp,length:0}:{start:f[0]+d,end:f[1]+d,length:f[1]-f[0]})}}for(let i=0;i<this.regexps.length;i++){const a=this.regexps[i];if(a)try{a.lastIndex=n;const d=a.exec(o);if(!d)continue;if(d.index===n)return l(i,d,0);s.push([i,d,0])}catch(d){if(this.options.forgiving)continue;throw d}}if(s.length){const i=Math.min(...s.map(a=>a[1].index));for(const[a,d,f]of s)if(d.index===i)return l(a,d,f)}return null}}function B9(e,t){return $9(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function q9(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>B9(n,{target:t.target})),{createScanner(n){return new F9(n,t)},createString(n){return{content:n}}}}let Pl;function xd(){return Pl||(Pl=Kw({themes:[Qw,Jw],langs:[tx,rx,{name:"malloy",embeddedLangs:["sql"],...o7}],engine:q9()}),Pl)}xd();async function W9(e,t,n,{showLineNumbers:r,lineSpacing:o}){const l=(await xd()).codeToHtml(e,{lang:t,theme:n,transformers:c7({showLineNumbers:r,lineSpacing:o})}),i=document.createElement("div");return i.innerHTML=l,i}function G9({element:e,className:t,style:n}){const r=u.useRef(null);return u.useEffect(()=>{const o=r.current;o&&o.replaceChildren(e)},[e]),c.jsx("div",{ref:r,className:t,style:n})}function su({code:e,language:t,theme:n,lineNumbers:r,spacing:o}){const{dark:s}=u.useContext(Me),[l,i]=u.useState();return n??(n=s?"dark-plus":"light-plus"),u.useEffect(()=>{let a=!1;return(async()=>{const f=await W9(e,t,n,{showLineNumbers:r??!0,lineSpacing:o??"double"});a||i(f)})(),()=>{a=!0}},[e,t,r,o,n]),c.jsx(Ku,{children:l&&c.jsx(G9,{element:l})})}const U9=e=>u.createElement("svg",{width:"25px",height:"25px",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},u.createElement("title",null,"malloy-icon-status-progress"),u.createElement("defs",null,u.createElement("circle",{id:"path-1",cx:7.5,cy:7.5,r:7.5}),u.createElement("mask",{id:"mask-2",maskContentUnits:"userSpaceOnUse",maskUnits:"objectBoundingBox",x:0,y:0,width:15,height:15,fill:"white"},u.createElement("use",{xlinkHref:"#path-1"}))),u.createElement("g",{id:"malloy-icon-status-progress",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",strokeDasharray:16},u.createElement("use",{id:"Oval-Copy-3",stroke:"#1a73e8",mask:"url(#mask-2)",strokeWidth:3,transform:"translate(7.500000, 7.500000) rotate(-240.000000) translate(-7.500000, -7.500000) ",xlinkHref:"#path-1"}))),op={large:25,medium:20,small:15};function L1({size:e,customStyle:t}){return c.jsx("div",{...S.props(Y9.root,t),children:c.jsx("span",{"aria-valuetext":"Loading",className:"mly1rg5ohu mlyb3r6kr mlyxymvpz",role:"progressbar",children:c.jsx(U9,{className:"mly1rg5ohu mlyb3r6kr mlyxymvpz mly1c74tu6 mlya4qsjk mly8jsasv mly1esw782 mly1so62im",width:op[e],height:op[e]})})})}const Y9={root:{alignItems:"mly6s0dn4",display:"mly3nfvp2",flexDirection:"mlydt5ytf",justifyContent:"mlyl56j7k",$$css:!0}};function mc({value:e,setValue:t,placeholder:n,label:r,autoFocus:o,width:s}){const[l,i]=u.useState(e.toString());return u.useEffect(()=>{i(e.toString())},[e]),c.jsxs("div",{children:[r&&c.jsx("label",{children:r}),c.jsx("input",{type:"number",placeholder:n,value:l,style:{width:s||"auto"},onChange:a=>{const d=a.target.value;i(d);const f=parseFloat(d);Number.isNaN(f)||t(f)},autoFocus:o,className:"mly27xtdb mly12oqio5 mlyizdh9v mly34lxi1"})]})}//! moment.js
|
|
194
|
+
//! version : 2.30.1
|
|
195
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
196
|
+
//! license : MIT
|
|
197
|
+
//! momentjs.com
|
|
198
|
+
var M1;function L(){return M1.apply(null,arguments)}function V9(e){M1=e}function Bt(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function xr(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function he(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Cd(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(he(e,t))return!1;return!0}function at(e){return e===void 0}function Mn(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function el(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function A1(e,t){var n=[],r,o=e.length;for(r=0;r<o;++r)n.push(t(e[r],r));return n}function Zn(e,t){for(var n in t)he(t,n)&&(e[n]=t[n]);return he(t,"toString")&&(e.toString=t.toString),he(t,"valueOf")&&(e.valueOf=t.valueOf),e}function fn(e,t,n,r){return t0(e,t,n,r,!0).utc()}function H9(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function te(e){return e._pf==null&&(e._pf=H9()),e._pf}var lu;Array.prototype.some?lu=Array.prototype.some:lu=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function _d(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=te(e),n=lu.call(t.parsedDateParts,function(o){return o!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function fa(e){var t=fn(NaN);return e!=null?Zn(te(t),e):te(t).userInvalidated=!0,t}var sp=L.momentProperties=[],pc=!1;function kd(e,t){var n,r,o,s=sp.length;if(at(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),at(t._i)||(e._i=t._i),at(t._f)||(e._f=t._f),at(t._l)||(e._l=t._l),at(t._strict)||(e._strict=t._strict),at(t._tzm)||(e._tzm=t._tzm),at(t._isUTC)||(e._isUTC=t._isUTC),at(t._offset)||(e._offset=t._offset),at(t._pf)||(e._pf=te(t)),at(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=sp[n],o=t[r],at(o)||(e[r]=o);return e}function tl(e){kd(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),pc===!1&&(pc=!0,L.updateOffset(this),pc=!1)}function qt(e){return e instanceof tl||e!=null&&e._isAMomentObject!=null}function I1(e){L.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function It(e,t){var n=!0;return Zn(function(){if(L.deprecationHandler!=null&&L.deprecationHandler(null,e),n){var r=[],o,s,l,i=arguments.length;for(s=0;s<i;s++){if(o="",typeof arguments[s]=="object"){o+=`
|
|
199
|
+
[`+s+"] ";for(l in arguments[0])he(arguments[0],l)&&(o+=l+": "+arguments[0][l]+", ");o=o.slice(0,-2)}else o=arguments[s];r.push(o)}I1(e+`
|
|
200
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
201
|
+
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var lp={};function P1(e,t){L.deprecationHandler!=null&&L.deprecationHandler(e,t),lp[e]||(I1(t),lp[e]=!0)}L.suppressDeprecationWarnings=!1;L.deprecationHandler=null;function mn(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function X9(e){var t,n;for(n in e)he(e,n)&&(t=e[n],mn(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function iu(e,t){var n=Zn({},e),r;for(r in t)he(t,r)&&(xr(e[r])&&xr(t[r])?(n[r]={},Zn(n[r],e[r]),Zn(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)he(e,r)&&!he(t,r)&&xr(e[r])&&(n[r]=Zn({},n[r]));return n}function Sd(e){e!=null&&this.set(e)}var au;Object.keys?au=Object.keys:au=function(e){var t,n=[];for(t in e)he(e,t)&&n.push(t);return n};var Z9={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function K9(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return mn(r)?r.call(t,n):r}function an(e,t,n){var r=""+Math.abs(e),o=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var Ed=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Dl=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,hc={},io={};function V(e,t,n,r){var o=r;typeof r=="string"&&(o=function(){return this[r]()}),e&&(io[e]=o),t&&(io[t[0]]=function(){return an(o.apply(this,arguments),t[1],t[2])}),n&&(io[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Q9(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function J9(e){var t=e.match(Ed),n,r;for(n=0,r=t.length;n<r;n++)io[t[n]]?t[n]=io[t[n]]:t[n]=Q9(t[n]);return function(o){var s="",l;for(l=0;l<r;l++)s+=mn(t[l])?t[l].call(o,e):t[l];return s}}function ti(e,t){return e.isValid()?(t=D1(t,e.localeData()),hc[t]=hc[t]||J9(t),hc[t](e)):e.localeData().invalidDate()}function D1(e,t){var n=5;function r(o){return t.longDateFormat(o)||o}for(Dl.lastIndex=0;n>=0&&Dl.test(e);)e=e.replace(Dl,r),Dl.lastIndex=0,n-=1;return e}var eC={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"};function tC(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Ed).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var nC="Invalid date";function rC(){return this._invalidDate}var oC="%d",sC=/\d{1,2}/;function lC(e){return this._ordinal.replace("%d",e)}var iC={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function aC(e,t,n,r){var o=this._relativeTime[n];return mn(o)?o(e,t,n,r):o.replace(/%d/i,e)}function cC(e,t){var n=this._relativeTime[e>0?"future":"past"];return mn(n)?n(t):n.replace(/%s/i,t)}var ip={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Pt(e){return typeof e=="string"?ip[e]||ip[e.toLowerCase()]:void 0}function Rd(e){var t={},n,r;for(r in e)he(e,r)&&(n=Pt(r),n&&(t[n]=e[r]));return t}var uC={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function dC(e){var t=[],n;for(n in e)he(e,n)&&t.push({unit:n,priority:uC[n]});return t.sort(function(r,o){return r.priority-o.priority}),t}var O1=/\d/,xt=/\d\d/,N1=/\d{3}/,jd=/\d{4}/,ma=/[+-]?\d{6}/,je=/\d\d?/,$1=/\d\d\d\d?/,z1=/\d\d\d\d\d\d?/,pa=/\d{1,3}/,Td=/\d{1,4}/,ha=/[+-]?\d{1,6}/,Oo=/\d+/,ga=/[+-]?\d+/,fC=/Z|[+-]\d\d:?\d\d/gi,ya=/Z|[+-]\d\d(?::?\d\d)?/gi,mC=/[+-]?\d+(\.\d{1,3})?/,nl=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,No=/^[1-9]\d?/,Ld=/^([1-9]\d|\d)/,ji;ji={};function B(e,t,n){ji[e]=mn(t)?t:function(r,o){return r&&n?n:t}}function pC(e,t){return he(ji,e)?ji[e](t._strict,t._locale):new RegExp(hC(e))}function hC(e){return Sn(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,o,s){return n||r||o||s}))}function Sn(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Rt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ae(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Rt(t)),n}var cu={};function _e(e,t){var n,r=t,o;for(typeof e=="string"&&(e=[e]),Mn(t)&&(r=function(s,l){l[t]=ae(s)}),o=e.length,n=0;n<o;n++)cu[e[n]]=r}function rl(e,t){_e(e,function(n,r,o,s){o._w=o._w||{},t(n,o._w,o,s)})}function gC(e,t,n){t!=null&&he(cu,e)&&cu[e](t,n._a,n,e)}function va(e){return e%4===0&&e%100!==0||e%400===0}var ot=0,_n=1,nn=2,Ue=3,$t=4,kn=5,wr=6,yC=7,vC=8;V("Y",0,0,function(){var e=this.year();return e<=9999?an(e,4):"+"+e});V(0,["YY",2],0,function(){return this.year()%100});V(0,["YYYY",4],0,"year");V(0,["YYYYY",5],0,"year");V(0,["YYYYYY",6,!0],0,"year");B("Y",ga);B("YY",je,xt);B("YYYY",Td,jd);B("YYYYY",ha,ma);B("YYYYYY",ha,ma);_e(["YYYYY","YYYYYY"],ot);_e("YYYY",function(e,t){t[ot]=e.length===2?L.parseTwoDigitYear(e):ae(e)});_e("YY",function(e,t){t[ot]=L.parseTwoDigitYear(e)});_e("Y",function(e,t){t[ot]=parseInt(e,10)});function ps(e){return va(e)?366:365}L.parseTwoDigitYear=function(e){return ae(e)+(ae(e)>68?1900:2e3)};var F1=$o("FullYear",!0);function bC(){return va(this.year())}function $o(e,t){return function(n){return n!=null?(B1(this,e,n),L.updateOffset(this,t),this):Ls(this,e)}}function Ls(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function B1(e,t,n){var r,o,s,l,i;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,l=e.month(),i=e.date(),i=i===29&&l===1&&!va(s)?28:i,o?r.setUTCFullYear(s,l,i):r.setFullYear(s,l,i)}}function wC(e){return e=Pt(e),mn(this[e])?this[e]():this}function xC(e,t){if(typeof e=="object"){e=Rd(e);var n=dC(e),r,o=n.length;for(r=0;r<o;r++)this[n[r].unit](e[n[r].unit])}else if(e=Pt(e),mn(this[e]))return this[e](t);return this}function CC(e,t){return(e%t+t)%t}var Oe;Array.prototype.indexOf?Oe=Array.prototype.indexOf:Oe=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Md(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=CC(t,12);return e+=(t-n)/12,n===1?va(e)?29:28:31-n%7%2}V("M",["MM",2],"Mo",function(){return this.month()+1});V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});V("MMMM",0,0,function(e){return this.localeData().months(this,e)});B("M",je,No);B("MM",je,xt);B("MMM",function(e,t){return t.monthsShortRegex(e)});B("MMMM",function(e,t){return t.monthsRegex(e)});_e(["M","MM"],function(e,t){t[_n]=ae(e)-1});_e(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);o!=null?t[_n]=o:te(n).invalidMonth=e});var _C="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),q1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),W1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,kC=nl,SC=nl;function EC(e,t){return e?Bt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||W1).test(t)?"format":"standalone"][e.month()]:Bt(this._months)?this._months:this._months.standalone}function RC(e,t){return e?Bt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[W1.test(t)?"format":"standalone"][e.month()]:Bt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function jC(e,t,n){var r,o,s,l=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=fn([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(o=Oe.call(this._shortMonthsParse,l),o!==-1?o:null):(o=Oe.call(this._longMonthsParse,l),o!==-1?o:null):t==="MMM"?(o=Oe.call(this._shortMonthsParse,l),o!==-1?o:(o=Oe.call(this._longMonthsParse,l),o!==-1?o:null)):(o=Oe.call(this._longMonthsParse,l),o!==-1?o:(o=Oe.call(this._shortMonthsParse,l),o!==-1?o:null))}function TC(e,t,n){var r,o,s;if(this._monthsParseExact)return jC.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=fn([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function G1(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=ae(t);else if(t=e.localeData().monthsParse(t),!Mn(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,Md(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function U1(e){return e!=null?(G1(this,e),L.updateOffset(this,!0),this):Ls(this,"Month")}function LC(){return Md(this.year(),this.month())}function MC(e){return this._monthsParseExact?(he(this,"_monthsRegex")||Y1.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(he(this,"_monthsShortRegex")||(this._monthsShortRegex=kC),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function AC(e){return this._monthsParseExact?(he(this,"_monthsRegex")||Y1.call(this),e?this._monthsStrictRegex:this._monthsRegex):(he(this,"_monthsRegex")||(this._monthsRegex=SC),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Y1(){function e(a,d){return d.length-a.length}var t=[],n=[],r=[],o,s,l,i;for(o=0;o<12;o++)s=fn([2e3,o]),l=Sn(this.monthsShort(s,"")),i=Sn(this.months(s,"")),t.push(l),n.push(i),r.push(i),r.push(l);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function IC(e,t,n,r,o,s,l){var i;return e<100&&e>=0?(i=new Date(e+400,t,n,r,o,s,l),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,t,n,r,o,s,l),i}function Ms(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ti(e,t,n){var r=7+t-n,o=(7+Ms(e,0,r).getUTCDay()-t)%7;return-o+r-1}function V1(e,t,n,r,o){var s=(7+n-r)%7,l=Ti(e,r,o),i=1+7*(t-1)+s+l,a,d;return i<=0?(a=e-1,d=ps(a)+i):i>ps(e)?(a=e+1,d=i-ps(e)):(a=e,d=i),{year:a,dayOfYear:d}}function As(e,t,n){var r=Ti(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1,s,l;return o<1?(l=e.year()-1,s=o+En(l,t,n)):o>En(e.year(),t,n)?(s=o-En(e.year(),t,n),l=e.year()+1):(l=e.year(),s=o),{week:s,year:l}}function En(e,t,n){var r=Ti(e,t,n),o=Ti(e+1,t,n);return(ps(e)-r+o)/7}V("w",["ww",2],"wo","week");V("W",["WW",2],"Wo","isoWeek");B("w",je,No);B("ww",je,xt);B("W",je,No);B("WW",je,xt);rl(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=ae(e)});function PC(e){return As(e,this._week.dow,this._week.doy).week}var DC={dow:0,doy:6};function OC(){return this._week.dow}function NC(){return this._week.doy}function $C(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function zC(e){var t=As(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}V("d",0,"do","day");V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});V("e",0,0,"weekday");V("E",0,0,"isoWeekday");B("d",je);B("e",je);B("E",je);B("dd",function(e,t){return t.weekdaysMinRegex(e)});B("ddd",function(e,t){return t.weekdaysShortRegex(e)});B("dddd",function(e,t){return t.weekdaysRegex(e)});rl(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);o!=null?t.d=o:te(n).invalidWeekday=e});rl(["d","e","E"],function(e,t,n,r){t[r]=ae(e)});function FC(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function BC(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ad(e,t){return e.slice(t,7).concat(e.slice(0,t))}var qC="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),H1="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),WC="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),GC=nl,UC=nl,YC=nl;function VC(e,t){var n=Bt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ad(n,this._week.dow):e?n[e.day()]:n}function HC(e){return e===!0?Ad(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function XC(e){return e===!0?Ad(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ZC(e,t,n){var r,o,s,l=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=fn([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(o=Oe.call(this._weekdaysParse,l),o!==-1?o:null):t==="ddd"?(o=Oe.call(this._shortWeekdaysParse,l),o!==-1?o:null):(o=Oe.call(this._minWeekdaysParse,l),o!==-1?o:null):t==="dddd"?(o=Oe.call(this._weekdaysParse,l),o!==-1||(o=Oe.call(this._shortWeekdaysParse,l),o!==-1)?o:(o=Oe.call(this._minWeekdaysParse,l),o!==-1?o:null)):t==="ddd"?(o=Oe.call(this._shortWeekdaysParse,l),o!==-1||(o=Oe.call(this._weekdaysParse,l),o!==-1)?o:(o=Oe.call(this._minWeekdaysParse,l),o!==-1?o:null)):(o=Oe.call(this._minWeekdaysParse,l),o!==-1||(o=Oe.call(this._weekdaysParse,l),o!==-1)?o:(o=Oe.call(this._shortWeekdaysParse,l),o!==-1?o:null))}function KC(e,t,n){var r,o,s;if(this._weekdaysParseExact)return ZC.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=fn([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function QC(e){if(!this.isValid())return e!=null?this:NaN;var t=Ls(this,"Day");return e!=null?(e=FC(e,this.localeData()),this.add(e-t,"d")):t}function JC(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function e_(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=BC(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function t_(e){return this._weekdaysParseExact?(he(this,"_weekdaysRegex")||Id.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(he(this,"_weekdaysRegex")||(this._weekdaysRegex=GC),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function n_(e){return this._weekdaysParseExact?(he(this,"_weekdaysRegex")||Id.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(he(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=UC),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function r_(e){return this._weekdaysParseExact?(he(this,"_weekdaysRegex")||Id.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(he(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=YC),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Id(){function e(f,m){return m.length-f.length}var t=[],n=[],r=[],o=[],s,l,i,a,d;for(s=0;s<7;s++)l=fn([2e3,1]).day(s),i=Sn(this.weekdaysMin(l,"")),a=Sn(this.weekdaysShort(l,"")),d=Sn(this.weekdays(l,"")),t.push(i),n.push(a),r.push(d),o.push(i),o.push(a),o.push(d);t.sort(e),n.sort(e),r.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Pd(){return this.hours()%12||12}function o_(){return this.hours()||24}V("H",["HH",2],0,"hour");V("h",["hh",2],0,Pd);V("k",["kk",2],0,o_);V("hmm",0,0,function(){return""+Pd.apply(this)+an(this.minutes(),2)});V("hmmss",0,0,function(){return""+Pd.apply(this)+an(this.minutes(),2)+an(this.seconds(),2)});V("Hmm",0,0,function(){return""+this.hours()+an(this.minutes(),2)});V("Hmmss",0,0,function(){return""+this.hours()+an(this.minutes(),2)+an(this.seconds(),2)});function X1(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}X1("a",!0);X1("A",!1);function Z1(e,t){return t._meridiemParse}B("a",Z1);B("A",Z1);B("H",je,Ld);B("h",je,No);B("k",je,No);B("HH",je,xt);B("hh",je,xt);B("kk",je,xt);B("hmm",$1);B("hmmss",z1);B("Hmm",$1);B("Hmmss",z1);_e(["H","HH"],Ue);_e(["k","kk"],function(e,t,n){var r=ae(e);t[Ue]=r===24?0:r});_e(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});_e(["h","hh"],function(e,t,n){t[Ue]=ae(e),te(n).bigHour=!0});_e("hmm",function(e,t,n){var r=e.length-2;t[Ue]=ae(e.substr(0,r)),t[$t]=ae(e.substr(r)),te(n).bigHour=!0});_e("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=ae(e.substr(0,r)),t[$t]=ae(e.substr(r,2)),t[kn]=ae(e.substr(o)),te(n).bigHour=!0});_e("Hmm",function(e,t,n){var r=e.length-2;t[Ue]=ae(e.substr(0,r)),t[$t]=ae(e.substr(r))});_e("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ue]=ae(e.substr(0,r)),t[$t]=ae(e.substr(r,2)),t[kn]=ae(e.substr(o))});function s_(e){return(e+"").toLowerCase().charAt(0)==="p"}var l_=/[ap]\.?m?\.?/i,i_=$o("Hours",!0);function a_(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var K1={calendar:Z9,longDateFormat:eC,invalidDate:nC,ordinal:oC,dayOfMonthOrdinalParse:sC,relativeTime:iC,months:_C,monthsShort:q1,week:DC,weekdays:qC,weekdaysMin:WC,weekdaysShort:H1,meridiemParse:l_},Le={},es={},Is;function c_(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ap(e){return e&&e.toLowerCase().replace("_","-")}function u_(e){for(var t=0,n,r,o,s;t<e.length;){for(s=ap(e[t]).split("-"),n=s.length,r=ap(e[t+1]),r=r?r.split("-"):null;n>0;){if(o=ba(s.slice(0,n).join("-")),o)return o;if(r&&r.length>=n&&c_(s,r)>=n-1)break;n--}t++}return Is}function d_(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ba(e){var t=null,n;if(Le[e]===void 0&&typeof module<"u"&&module&&module.exports&&d_(e))try{t=Is._abbr,n=require,n("./locale/"+e),er(t)}catch{Le[e]=null}return Le[e]}function er(e,t){var n;return e&&(at(t)?n=Pn(e):n=Dd(e,t),n?Is=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Is._abbr}function Dd(e,t){if(t!==null){var n,r=K1;if(t.abbr=e,Le[e]!=null)P1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Le[e]._config;else if(t.parentLocale!=null)if(Le[t.parentLocale]!=null)r=Le[t.parentLocale]._config;else if(n=ba(t.parentLocale),n!=null)r=n._config;else return es[t.parentLocale]||(es[t.parentLocale]=[]),es[t.parentLocale].push({name:e,config:t}),null;return Le[e]=new Sd(iu(r,t)),es[e]&&es[e].forEach(function(o){Dd(o.name,o.config)}),er(e),Le[e]}else return delete Le[e],null}function f_(e,t){if(t!=null){var n,r,o=K1;Le[e]!=null&&Le[e].parentLocale!=null?Le[e].set(iu(Le[e]._config,t)):(r=ba(e),r!=null&&(o=r._config),t=iu(o,t),r==null&&(t.abbr=e),n=new Sd(t),n.parentLocale=Le[e],Le[e]=n),er(e)}else Le[e]!=null&&(Le[e].parentLocale!=null?(Le[e]=Le[e].parentLocale,e===er()&&er(e)):Le[e]!=null&&delete Le[e]);return Le[e]}function Pn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Is;if(!Bt(e)){if(t=ba(e),t)return t;e=[e]}return u_(e)}function m_(){return au(Le)}function Od(e){var t,n=e._a;return n&&te(e).overflow===-2&&(t=n[_n]<0||n[_n]>11?_n:n[nn]<1||n[nn]>Md(n[ot],n[_n])?nn:n[Ue]<0||n[Ue]>24||n[Ue]===24&&(n[$t]!==0||n[kn]!==0||n[wr]!==0)?Ue:n[$t]<0||n[$t]>59?$t:n[kn]<0||n[kn]>59?kn:n[wr]<0||n[wr]>999?wr:-1,te(e)._overflowDayOfYear&&(t<ot||t>nn)&&(t=nn),te(e)._overflowWeeks&&t===-1&&(t=yC),te(e)._overflowWeekday&&t===-1&&(t=vC),te(e).overflow=t),e}var p_=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,h_=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,g_=/Z|[+-]\d\d(?::?\d\d)?/,Ol=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],y_=/^\/?Date\((-?\d+)/i,v_=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,b_={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Q1(e){var t,n,r=e._i,o=p_.exec(r)||h_.exec(r),s,l,i,a,d=Ol.length,f=gc.length;if(o){for(te(e).iso=!0,t=0,n=d;t<n;t++)if(Ol[t][1].exec(o[1])){l=Ol[t][0],s=Ol[t][2]!==!1;break}if(l==null){e._isValid=!1;return}if(o[3]){for(t=0,n=f;t<n;t++)if(gc[t][1].exec(o[3])){i=(o[2]||" ")+gc[t][0];break}if(i==null){e._isValid=!1;return}}if(!s&&i!=null){e._isValid=!1;return}if(o[4])if(g_.exec(o[4]))a="Z";else{e._isValid=!1;return}e._f=l+(i||"")+(a||""),$d(e)}else e._isValid=!1}function w_(e,t,n,r,o,s){var l=[x_(e),q1.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return s&&l.push(parseInt(s,10)),l}function x_(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function C_(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function __(e,t,n){if(e){var r=H1.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return te(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function k_(e,t,n){if(e)return b_[e];if(t)return 0;var r=parseInt(n,10),o=r%100,s=(r-o)/100;return s*60+o}function J1(e){var t=v_.exec(C_(e._i)),n;if(t){if(n=w_(t[4],t[3],t[2],t[5],t[6],t[7]),!__(t[1],n,e))return;e._a=n,e._tzm=k_(t[8],t[9],t[10]),e._d=Ms.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),te(e).rfc2822=!0}else e._isValid=!1}function S_(e){var t=y_.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Q1(e),e._isValid===!1)delete e._isValid;else return;if(J1(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:L.createFromInputFallback(e)}L.createFromInputFallback=It("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Zr(e,t,n){return e??t??n}function E_(e){var t=new Date(L.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Nd(e){var t,n,r=[],o,s,l;if(!e._d){for(o=E_(e),e._w&&e._a[nn]==null&&e._a[_n]==null&&R_(e),e._dayOfYear!=null&&(l=Zr(e._a[ot],o[ot]),(e._dayOfYear>ps(l)||e._dayOfYear===0)&&(te(e)._overflowDayOfYear=!0),n=Ms(l,0,e._dayOfYear),e._a[_n]=n.getUTCMonth(),e._a[nn]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=o[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ue]===24&&e._a[$t]===0&&e._a[kn]===0&&e._a[wr]===0&&(e._nextDay=!0,e._a[Ue]=0),e._d=(e._useUTC?Ms:IC).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ue]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(te(e).weekdayMismatch=!0)}}function R_(e){var t,n,r,o,s,l,i,a,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,l=4,n=Zr(t.GG,e._a[ot],As(Re(),1,4).year),r=Zr(t.W,1),o=Zr(t.E,1),(o<1||o>7)&&(a=!0)):(s=e._locale._week.dow,l=e._locale._week.doy,d=As(Re(),s,l),n=Zr(t.gg,e._a[ot],d.year),r=Zr(t.w,d.week),t.d!=null?(o=t.d,(o<0||o>6)&&(a=!0)):t.e!=null?(o=t.e+s,(t.e<0||t.e>6)&&(a=!0)):o=s),r<1||r>En(n,s,l)?te(e)._overflowWeeks=!0:a!=null?te(e)._overflowWeekday=!0:(i=V1(n,r,o,s,l),e._a[ot]=i.year,e._dayOfYear=i.dayOfYear)}L.ISO_8601=function(){};L.RFC_2822=function(){};function $d(e){if(e._f===L.ISO_8601){Q1(e);return}if(e._f===L.RFC_2822){J1(e);return}e._a=[],te(e).empty=!0;var t=""+e._i,n,r,o,s,l,i=t.length,a=0,d,f;for(o=D1(e._f,e._locale).match(Ed)||[],f=o.length,n=0;n<f;n++)s=o[n],r=(t.match(pC(s,e))||[])[0],r&&(l=t.substr(0,t.indexOf(r)),l.length>0&&te(e).unusedInput.push(l),t=t.slice(t.indexOf(r)+r.length),a+=r.length),io[s]?(r?te(e).empty=!1:te(e).unusedTokens.push(s),gC(s,r,e)):e._strict&&!r&&te(e).unusedTokens.push(s);te(e).charsLeftOver=i-a,t.length>0&&te(e).unusedInput.push(t),e._a[Ue]<=12&&te(e).bigHour===!0&&e._a[Ue]>0&&(te(e).bigHour=void 0),te(e).parsedDateParts=e._a.slice(0),te(e).meridiem=e._meridiem,e._a[Ue]=j_(e._locale,e._a[Ue],e._meridiem),d=te(e).era,d!==null&&(e._a[ot]=e._locale.erasConvertYear(d,e._a[ot])),Nd(e),Od(e)}function j_(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function T_(e){var t,n,r,o,s,l,i=!1,a=e._f.length;if(a===0){te(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<a;o++)s=0,l=!1,t=kd({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[o],$d(t),_d(t)&&(l=!0),s+=te(t).charsLeftOver,s+=te(t).unusedTokens.length*10,te(t).score=s,i?s<r&&(r=s,n=t):(r==null||s<r||l)&&(r=s,n=t,l&&(i=!0));Zn(e,n||t)}function L_(e){if(!e._d){var t=Rd(e._i),n=t.day===void 0?t.date:t.day;e._a=A1([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),Nd(e)}}function M_(e){var t=new tl(Od(e0(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function e0(e){var t=e._i,n=e._f;return e._locale=e._locale||Pn(e._l),t===null||n===void 0&&t===""?fa({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),qt(t)?new tl(Od(t)):(el(t)?e._d=t:Bt(n)?T_(e):n?$d(e):A_(e),_d(e)||(e._d=null),e))}function A_(e){var t=e._i;at(t)?e._d=new Date(L.now()):el(t)?e._d=new Date(t.valueOf()):typeof t=="string"?S_(e):Bt(t)?(e._a=A1(t.slice(0),function(n){return parseInt(n,10)}),Nd(e)):xr(t)?L_(e):Mn(t)?e._d=new Date(t):L.createFromInputFallback(e)}function t0(e,t,n,r,o){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(xr(e)&&Cd(e)||Bt(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,M_(s)}function Re(e,t,n,r){return t0(e,t,n,r,!1)}var I_=It("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Re.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:fa()}),P_=It("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Re.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:fa()});function n0(e,t){var n,r;if(t.length===1&&Bt(t[0])&&(t=t[0]),!t.length)return Re();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function D_(){var e=[].slice.call(arguments,0);return n0("isBefore",e)}function O_(){var e=[].slice.call(arguments,0);return n0("isAfter",e)}var N_=function(){return Date.now?Date.now():+new Date},ts=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $_(e){var t,n=!1,r,o=ts.length;for(t in e)if(he(e,t)&&!(Oe.call(ts,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<o;++r)if(e[ts[r]]){if(n)return!1;parseFloat(e[ts[r]])!==ae(e[ts[r]])&&(n=!0)}return!0}function z_(){return this._isValid}function F_(){return Yt(NaN)}function wa(e){var t=Rd(e),n=t.year||0,r=t.quarter||0,o=t.month||0,s=t.week||t.isoWeek||0,l=t.day||0,i=t.hour||0,a=t.minute||0,d=t.second||0,f=t.millisecond||0;this._isValid=$_(t),this._milliseconds=+f+d*1e3+a*6e4+i*1e3*60*60,this._days=+l+s*7,this._months=+o+r*3+n*12,this._data={},this._locale=Pn(),this._bubble()}function ni(e){return e instanceof wa}function uu(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function B_(e,t,n){var r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0,l;for(l=0;l<r;l++)ae(e[l])!==ae(t[l])&&s++;return s+o}function r0(e,t){V(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+an(~~(n/60),2)+t+an(~~n%60,2)})}r0("Z",":");r0("ZZ","");B("Z",ya);B("ZZ",ya);_e(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=zd(ya,e)});var q_=/([\+\-]|\d\d)/gi;function zd(e,t){var n=(t||"").match(e),r,o,s;return n===null?null:(r=n[n.length-1]||[],o=(r+"").match(q_)||["-",0,0],s=+(o[1]*60)+ae(o[2]),s===0?0:o[0]==="+"?s:-s)}function Fd(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(qt(e)||el(e)?e.valueOf():Re(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),L.updateOffset(n,!1),n):Re(e).local()}function du(e){return-Math.round(e._d.getTimezoneOffset())}L.updateOffset=function(){};function W_(e,t,n){var r=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=zd(ya,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(o=du(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),r!==e&&(!t||this._changeInProgress?l0(this,Yt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,L.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:du(this)}function G_(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function U_(e){return this.utcOffset(0,e)}function Y_(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(du(this),"m")),this}function V_(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=zd(fC,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function H_(e){return this.isValid()?(e=e?Re(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function X_(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Z_(){if(!at(this._isDSTShifted))return this._isDSTShifted;var e={},t;return kd(e,this),e=e0(e),e._a?(t=e._isUTC?fn(e._a):Re(e._a),this._isDSTShifted=this.isValid()&&B_(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function K_(){return this.isValid()?!this._isUTC:!1}function Q_(){return this.isValid()?this._isUTC:!1}function o0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var J_=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ek=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Yt(e,t){var n=e,r=null,o,s,l;return ni(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Mn(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=J_.exec(e))?(o=r[1]==="-"?-1:1,n={y:0,d:ae(r[nn])*o,h:ae(r[Ue])*o,m:ae(r[$t])*o,s:ae(r[kn])*o,ms:ae(uu(r[wr]*1e3))*o}):(r=ek.exec(e))?(o=r[1]==="-"?-1:1,n={y:yr(r[2],o),M:yr(r[3],o),w:yr(r[4],o),d:yr(r[5],o),h:yr(r[6],o),m:yr(r[7],o),s:yr(r[8],o)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(l=tk(Re(n.from),Re(n.to)),n={},n.ms=l.milliseconds,n.M=l.months),s=new wa(n),ni(e)&&he(e,"_locale")&&(s._locale=e._locale),ni(e)&&he(e,"_isValid")&&(s._isValid=e._isValid),s}Yt.fn=wa.prototype;Yt.invalid=F_;function yr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function cp(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function tk(e,t){var n;return e.isValid()&&t.isValid()?(t=Fd(t,e),e.isBefore(t)?n=cp(e,t):(n=cp(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function s0(e,t){return function(n,r){var o,s;return r!==null&&!isNaN(+r)&&(P1(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),o=Yt(n,r),l0(this,o,e),this}}function l0(e,t,n,r){var o=t._milliseconds,s=uu(t._days),l=uu(t._months);e.isValid()&&(r=r??!0,l&&G1(e,Ls(e,"Month")+l*n),s&&B1(e,"Date",Ls(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&L.updateOffset(e,s||l))}var nk=s0(1,"add"),rk=s0(-1,"subtract");function i0(e){return typeof e=="string"||e instanceof String}function ok(e){return qt(e)||el(e)||i0(e)||Mn(e)||lk(e)||sk(e)||e===null||e===void 0}function sk(e){var t=xr(e)&&!Cd(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,l=r.length;for(o=0;o<l;o+=1)s=r[o],n=n||he(e,s);return t&&n}function lk(e){var t=Bt(e),n=!1;return t&&(n=e.filter(function(r){return!Mn(r)&&i0(e)}).length===0),t&&n}function ik(e){var t=xr(e)&&!Cd(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<r.length;o+=1)s=r[o],n=n||he(e,s);return t&&n}function ak(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function ck(e,t){arguments.length===1&&(arguments[0]?ok(arguments[0])?(e=arguments[0],t=void 0):ik(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Re(),r=Fd(n,this).startOf("day"),o=L.calendarFormat(this,r)||"sameElse",s=t&&(mn(t[o])?t[o].call(this,n):t[o]);return this.format(s||this.localeData().calendar(o,this,Re(n)))}function uk(){return new tl(this)}function dk(e,t){var n=qt(e)?e:Re(e);return this.isValid()&&n.isValid()?(t=Pt(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function fk(e,t){var n=qt(e)?e:Re(e);return this.isValid()&&n.isValid()?(t=Pt(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function mk(e,t,n,r){var o=qt(e)?e:Re(e),s=qt(t)?t:Re(t);return this.isValid()&&o.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(o,n):!this.isBefore(o,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function pk(e,t){var n=qt(e)?e:Re(e),r;return this.isValid()&&n.isValid()?(t=Pt(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function hk(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function gk(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function yk(e,t,n){var r,o,s;if(!this.isValid())return NaN;if(r=Fd(e,this),!r.isValid())return NaN;switch(o=(r.utcOffset()-this.utcOffset())*6e4,t=Pt(t),t){case"year":s=ri(this,r)/12;break;case"month":s=ri(this,r);break;case"quarter":s=ri(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-o)/864e5;break;case"week":s=(this-r-o)/6048e5;break;default:s=this-r}return n?s:Rt(s)}function ri(e,t){if(e.date()<t.date())return-ri(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),o,s;return t-r<0?(o=e.clone().add(n-1,"months"),s=(t-r)/(r-o)):(o=e.clone().add(n+1,"months"),s=(t-r)/(o-r)),-(n+s)||0}L.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";L.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function vk(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function bk(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?ti(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):mn(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ti(n,"Z")):ti(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wk(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+o+s)}function xk(e){e||(e=this.isUtc()?L.defaultFormatUtc:L.defaultFormat);var t=ti(this,e);return this.localeData().postformat(t)}function Ck(e,t){return this.isValid()&&(qt(e)&&e.isValid()||Re(e).isValid())?Yt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function _k(e){return this.from(Re(),e)}function kk(e,t){return this.isValid()&&(qt(e)&&e.isValid()||Re(e).isValid())?Yt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Sk(e){return this.to(Re(),e)}function a0(e){var t;return e===void 0?this._locale._abbr:(t=Pn(e),t!=null&&(this._locale=t),this)}var c0=It("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function u0(){return this._locale}var Li=1e3,ao=60*Li,Mi=60*ao,d0=(365*400+97)*24*Mi;function co(e,t){return(e%t+t)%t}function f0(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-d0:new Date(e,t,n).valueOf()}function m0(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-d0:Date.UTC(e,t,n)}function Ek(e){var t,n;if(e=Pt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?m0:f0,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=co(t+(this._isUTC?0:this.utcOffset()*ao),Mi);break;case"minute":t=this._d.valueOf(),t-=co(t,ao);break;case"second":t=this._d.valueOf(),t-=co(t,Li);break}return this._d.setTime(t),L.updateOffset(this,!0),this}function Rk(e){var t,n;if(e=Pt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?m0:f0,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Mi-co(t+(this._isUTC?0:this.utcOffset()*ao),Mi)-1;break;case"minute":t=this._d.valueOf(),t+=ao-co(t,ao)-1;break;case"second":t=this._d.valueOf(),t+=Li-co(t,Li)-1;break}return this._d.setTime(t),L.updateOffset(this,!0),this}function jk(){return this._d.valueOf()-(this._offset||0)*6e4}function Tk(){return Math.floor(this.valueOf()/1e3)}function Lk(){return new Date(this.valueOf())}function Mk(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ak(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ik(){return this.isValid()?this.toISOString():null}function Pk(){return _d(this)}function Dk(){return Zn({},te(this))}function Ok(){return te(this).overflow}function Nk(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}V("N",0,0,"eraAbbr");V("NN",0,0,"eraAbbr");V("NNN",0,0,"eraAbbr");V("NNNN",0,0,"eraName");V("NNNNN",0,0,"eraNarrow");V("y",["y",1],"yo","eraYear");V("y",["yy",2],0,"eraYear");V("y",["yyy",3],0,"eraYear");V("y",["yyyy",4],0,"eraYear");B("N",Bd);B("NN",Bd);B("NNN",Bd);B("NNNN",Hk);B("NNNNN",Xk);_e(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?te(n).era=o:te(n).invalidEra=e});B("y",Oo);B("yy",Oo);B("yyy",Oo);B("yyyy",Oo);B("yo",Zk);_e(["y","yy","yyy","yyyy"],ot);_e(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ot]=n._locale.eraYearOrdinalParse(e,o):t[ot]=parseInt(e,10)});function $k(e,t){var n,r,o,s=this._eras||Pn("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":o=L(s[n].since).startOf("day"),s[n].since=o.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=L(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf();break}}return s}function zk(e,t,n){var r,o,s=this.eras(),l,i,a;for(e=e.toUpperCase(),r=0,o=s.length;r<o;++r)if(l=s[r].name.toUpperCase(),i=s[r].abbr.toUpperCase(),a=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return s[r];break;case"NNNN":if(l===e)return s[r];break;case"NNNNN":if(a===e)return s[r];break}else if([l,i,a].indexOf(e)>=0)return s[r]}function Fk(e,t){var n=e.since<=e.until?1:-1;return t===void 0?L(e.since).year():L(e.since).year()+(t-e.offset)*n}function Bk(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function qk(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function Wk(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function Gk(){var e,t,n,r,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(n=o[e].since<=o[e].until?1:-1,r=this.clone().startOf("day").valueOf(),o[e].since<=r&&r<=o[e].until||o[e].until<=r&&r<=o[e].since)return(this.year()-L(o[e].since).year())*n+o[e].offset;return this.year()}function Uk(e){return he(this,"_erasNameRegex")||qd.call(this),e?this._erasNameRegex:this._erasRegex}function Yk(e){return he(this,"_erasAbbrRegex")||qd.call(this),e?this._erasAbbrRegex:this._erasRegex}function Vk(e){return he(this,"_erasNarrowRegex")||qd.call(this),e?this._erasNarrowRegex:this._erasRegex}function Bd(e,t){return t.erasAbbrRegex(e)}function Hk(e,t){return t.erasNameRegex(e)}function Xk(e,t){return t.erasNarrowRegex(e)}function Zk(e,t){return t._eraYearOrdinalRegex||Oo}function qd(){var e=[],t=[],n=[],r=[],o,s,l,i,a,d=this.eras();for(o=0,s=d.length;o<s;++o)l=Sn(d[o].name),i=Sn(d[o].abbr),a=Sn(d[o].narrow),t.push(l),e.push(i),n.push(a),r.push(l),r.push(i),r.push(a);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100});V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xa(e,t){V(0,[e,e.length],0,t)}xa("gggg","weekYear");xa("ggggg","weekYear");xa("GGGG","isoWeekYear");xa("GGGGG","isoWeekYear");B("G",ga);B("g",ga);B("GG",je,xt);B("gg",je,xt);B("GGGG",Td,jd);B("gggg",Td,jd);B("GGGGG",ha,ma);B("ggggg",ha,ma);rl(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=ae(e)});rl(["gg","GG"],function(e,t,n,r){t[r]=L.parseTwoDigitYear(e)});function Kk(e){return p0.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Qk(e){return p0.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Jk(){return En(this.year(),1,4)}function eS(){return En(this.isoWeekYear(),1,4)}function tS(){var e=this.localeData()._week;return En(this.year(),e.dow,e.doy)}function nS(){var e=this.localeData()._week;return En(this.weekYear(),e.dow,e.doy)}function p0(e,t,n,r,o){var s;return e==null?As(this,r,o).year:(s=En(e,r,o),t>s&&(t=s),rS.call(this,e,t,n,r,o))}function rS(e,t,n,r,o){var s=V1(e,t,n,r,o),l=Ms(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}V("Q",0,"Qo","quarter");B("Q",O1);_e("Q",function(e,t){t[_n]=(ae(e)-1)*3});function oS(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}V("D",["DD",2],"Do","date");B("D",je,No);B("DD",je,xt);B("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});_e(["D","DD"],nn);_e("Do",function(e,t){t[nn]=ae(e.match(je)[0])});var h0=$o("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear");B("DDD",pa);B("DDDD",N1);_e(["DDD","DDDD"],function(e,t,n){n._dayOfYear=ae(e)});function sS(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}V("m",["mm",2],0,"minute");B("m",je,Ld);B("mm",je,xt);_e(["m","mm"],$t);var lS=$o("Minutes",!1);V("s",["ss",2],0,"second");B("s",je,Ld);B("ss",je,xt);_e(["s","ss"],kn);var iS=$o("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)});V(0,["SS",2],0,function(){return~~(this.millisecond()/10)});V(0,["SSS",3],0,"millisecond");V(0,["SSSS",4],0,function(){return this.millisecond()*10});V(0,["SSSSS",5],0,function(){return this.millisecond()*100});V(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});V(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});V(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});V(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});B("S",pa,O1);B("SS",pa,xt);B("SSS",pa,N1);var Kn,g0;for(Kn="SSSS";Kn.length<=9;Kn+="S")B(Kn,Oo);function aS(e,t){t[wr]=ae(("0."+e)*1e3)}for(Kn="S";Kn.length<=9;Kn+="S")_e(Kn,aS);g0=$o("Milliseconds",!1);V("z",0,0,"zoneAbbr");V("zz",0,0,"zoneName");function cS(){return this._isUTC?"UTC":""}function uS(){return this._isUTC?"Coordinated Universal Time":""}var P=tl.prototype;P.add=nk;P.calendar=ck;P.clone=uk;P.diff=yk;P.endOf=Rk;P.format=xk;P.from=Ck;P.fromNow=_k;P.to=kk;P.toNow=Sk;P.get=wC;P.invalidAt=Ok;P.isAfter=dk;P.isBefore=fk;P.isBetween=mk;P.isSame=pk;P.isSameOrAfter=hk;P.isSameOrBefore=gk;P.isValid=Pk;P.lang=c0;P.locale=a0;P.localeData=u0;P.max=P_;P.min=I_;P.parsingFlags=Dk;P.set=xC;P.startOf=Ek;P.subtract=rk;P.toArray=Mk;P.toObject=Ak;P.toDate=Lk;P.toISOString=bk;P.inspect=wk;typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});P.toJSON=Ik;P.toString=vk;P.unix=Tk;P.valueOf=jk;P.creationData=Nk;P.eraName=Bk;P.eraNarrow=qk;P.eraAbbr=Wk;P.eraYear=Gk;P.year=F1;P.isLeapYear=bC;P.weekYear=Kk;P.isoWeekYear=Qk;P.quarter=P.quarters=oS;P.month=U1;P.daysInMonth=LC;P.week=P.weeks=$C;P.isoWeek=P.isoWeeks=zC;P.weeksInYear=tS;P.weeksInWeekYear=nS;P.isoWeeksInYear=Jk;P.isoWeeksInISOWeekYear=eS;P.date=h0;P.day=P.days=QC;P.weekday=JC;P.isoWeekday=e_;P.dayOfYear=sS;P.hour=P.hours=i_;P.minute=P.minutes=lS;P.second=P.seconds=iS;P.millisecond=P.milliseconds=g0;P.utcOffset=W_;P.utc=U_;P.local=Y_;P.parseZone=V_;P.hasAlignedHourOffset=H_;P.isDST=X_;P.isLocal=K_;P.isUtcOffset=Q_;P.isUtc=o0;P.isUTC=o0;P.zoneAbbr=cS;P.zoneName=uS;P.dates=It("dates accessor is deprecated. Use date instead.",h0);P.months=It("months accessor is deprecated. Use month instead",U1);P.years=It("years accessor is deprecated. Use year instead",F1);P.zone=It("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",G_);P.isDSTShifted=It("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Z_);function dS(e){return Re(e*1e3)}function fS(){return Re.apply(null,arguments).parseZone()}function y0(e){return e}var ge=Sd.prototype;ge.calendar=K9;ge.longDateFormat=tC;ge.invalidDate=rC;ge.ordinal=lC;ge.preparse=y0;ge.postformat=y0;ge.relativeTime=aC;ge.pastFuture=cC;ge.set=X9;ge.eras=$k;ge.erasParse=zk;ge.erasConvertYear=Fk;ge.erasAbbrRegex=Yk;ge.erasNameRegex=Uk;ge.erasNarrowRegex=Vk;ge.months=EC;ge.monthsShort=RC;ge.monthsParse=TC;ge.monthsRegex=AC;ge.monthsShortRegex=MC;ge.week=PC;ge.firstDayOfYear=NC;ge.firstDayOfWeek=OC;ge.weekdays=VC;ge.weekdaysMin=XC;ge.weekdaysShort=HC;ge.weekdaysParse=KC;ge.weekdaysRegex=t_;ge.weekdaysShortRegex=n_;ge.weekdaysMinRegex=r_;ge.isPM=s_;ge.meridiem=a_;function Ai(e,t,n,r){var o=Pn(),s=fn().set(r,t);return o[n](s,e)}function v0(e,t,n){if(Mn(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ai(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=Ai(e,r,n,"month");return o}function Wd(e,t,n,r){typeof e=="boolean"?(Mn(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Mn(t)&&(n=t,t=void 0),t=t||"");var o=Pn(),s=e?o._week.dow:0,l,i=[];if(n!=null)return Ai(t,(n+s)%7,r,"day");for(l=0;l<7;l++)i[l]=Ai(t,(l+s)%7,r,"day");return i}function mS(e,t){return v0(e,t,"months")}function pS(e,t){return v0(e,t,"monthsShort")}function hS(e,t,n){return Wd(e,t,n,"weekdays")}function gS(e,t,n){return Wd(e,t,n,"weekdaysShort")}function yS(e,t,n){return Wd(e,t,n,"weekdaysMin")}er("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=ae(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});L.lang=It("moment.lang is deprecated. Use moment.locale instead.",er);L.langData=It("moment.langData is deprecated. Use moment.localeData instead.",Pn);var bn=Math.abs;function vS(){var e=this._data;return this._milliseconds=bn(this._milliseconds),this._days=bn(this._days),this._months=bn(this._months),e.milliseconds=bn(e.milliseconds),e.seconds=bn(e.seconds),e.minutes=bn(e.minutes),e.hours=bn(e.hours),e.months=bn(e.months),e.years=bn(e.years),this}function b0(e,t,n,r){var o=Yt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function bS(e,t){return b0(this,e,t,1)}function wS(e,t){return b0(this,e,t,-1)}function up(e){return e<0?Math.floor(e):Math.ceil(e)}function xS(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,o,s,l,i,a;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=up(fu(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,o=Rt(e/1e3),r.seconds=o%60,s=Rt(o/60),r.minutes=s%60,l=Rt(s/60),r.hours=l%24,t+=Rt(l/24),a=Rt(w0(t)),n+=a,t-=up(fu(a)),i=Rt(n/12),n%=12,r.days=t,r.months=n,r.years=i,this}function w0(e){return e*4800/146097}function fu(e){return e*146097/4800}function CS(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Pt(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+w0(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(fu(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Dn(e){return function(){return this.as(e)}}var x0=Dn("ms"),_S=Dn("s"),kS=Dn("m"),SS=Dn("h"),ES=Dn("d"),RS=Dn("w"),jS=Dn("M"),TS=Dn("Q"),LS=Dn("y"),MS=x0;function AS(){return Yt(this)}function IS(e){return e=Pt(e),this.isValid()?this[e+"s"]():NaN}function Ar(e){return function(){return this.isValid()?this._data[e]:NaN}}var PS=Ar("milliseconds"),DS=Ar("seconds"),OS=Ar("minutes"),NS=Ar("hours"),$S=Ar("days"),zS=Ar("months"),FS=Ar("years");function BS(){return Rt(this.days()/7)}var xn=Math.round,Qr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function qS(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function WS(e,t,n,r){var o=Yt(e).abs(),s=xn(o.as("s")),l=xn(o.as("m")),i=xn(o.as("h")),a=xn(o.as("d")),d=xn(o.as("M")),f=xn(o.as("w")),m=xn(o.as("y")),p=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||l<=1&&["m"]||l<n.m&&["mm",l]||i<=1&&["h"]||i<n.h&&["hh",i]||a<=1&&["d"]||a<n.d&&["dd",a];return n.w!=null&&(p=p||f<=1&&["w"]||f<n.w&&["ww",f]),p=p||d<=1&&["M"]||d<n.M&&["MM",d]||m<=1&&["y"]||["yy",m],p[2]=t,p[3]=+e>0,p[4]=r,qS.apply(null,p)}function GS(e){return e===void 0?xn:typeof e=="function"?(xn=e,!0):!1}function US(e,t){return Qr[e]===void 0?!1:t===void 0?Qr[e]:(Qr[e]=t,e==="s"&&(Qr.ss=t-1),!0)}function YS(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Qr,o,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Qr,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),o=this.localeData(),s=WS(this,!n,r,o),n&&(s=o.pastFuture(+this,s)),o.postformat(s)}var yc=Math.abs;function Yr(e){return(e>0)-(e<0)||+e}function Ca(){if(!this.isValid())return this.localeData().invalidDate();var e=yc(this._milliseconds)/1e3,t=yc(this._days),n=yc(this._months),r,o,s,l,i=this.asSeconds(),a,d,f,m;return i?(r=Rt(e/60),o=Rt(r/60),e%=60,r%=60,s=Rt(n/12),n%=12,l=e?e.toFixed(3).replace(/\.?0+$/,""):"",a=i<0?"-":"",d=Yr(this._months)!==Yr(i)?"-":"",f=Yr(this._days)!==Yr(i)?"-":"",m=Yr(this._milliseconds)!==Yr(i)?"-":"",a+"P"+(s?d+s+"Y":"")+(n?d+n+"M":"")+(t?f+t+"D":"")+(o||r||e?"T":"")+(o?m+o+"H":"")+(r?m+r+"M":"")+(e?m+l+"S":"")):"P0D"}var de=wa.prototype;de.isValid=z_;de.abs=vS;de.add=bS;de.subtract=wS;de.as=CS;de.asMilliseconds=x0;de.asSeconds=_S;de.asMinutes=kS;de.asHours=SS;de.asDays=ES;de.asWeeks=RS;de.asMonths=jS;de.asQuarters=TS;de.asYears=LS;de.valueOf=MS;de._bubble=xS;de.clone=AS;de.get=IS;de.milliseconds=PS;de.seconds=DS;de.minutes=OS;de.hours=NS;de.days=$S;de.weeks=BS;de.months=zS;de.years=FS;de.humanize=YS;de.toISOString=Ca;de.toString=Ca;de.toJSON=Ca;de.locale=a0;de.localeData=u0;de.toIsoString=It("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ca);de.lang=c0;V("X",0,0,"unix");V("x",0,0,"valueOf");B("x",ga);B("X",mC);_e("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});_e("x",function(e,t,n){n._d=new Date(ae(e))});//! moment.js
|
|
202
|
+
L.version="2.30.1";V9(Re);L.fn=P;L.min=D_;L.max=O_;L.now=N_;L.utc=fn;L.unix=dS;L.months=mS;L.isDate=el;L.locale=er;L.invalid=fa;L.duration=Yt;L.isMoment=qt;L.weekdays=hS;L.parseZone=fS;L.localeData=Pn;L.isDuration=ni;L.monthsShort=pS;L.weekdaysMin=yS;L.defineLocale=Dd;L.updateLocale=f_;L.locales=m_;L.weekdaysShort=gS;L.normalizeUnits=Pt;L.relativeTimeRounding=GS;L.relativeTimeThreshold=US;L.calendarFormat=ak;L.prototype=P;L.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Gd="Popover",[C0]=Gt(Gd,[cr]),ol=cr(),[VS,fr]=C0(Gd),_0=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!1}=e,i=ol(t),a=u.useRef(null),[d,f]=u.useState(!1),[m=!1,p]=lr({prop:r,defaultProp:o,onChange:s});return c.jsx(Yi,{...i,children:c.jsx(VS,{scope:t,contentId:Lt(),triggerRef:a,open:m,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:l,children:n})})};_0.displayName=Gd;var k0="PopoverAnchor",S0=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=fr(k0,n),s=ol(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(l(),()=>i()),[l,i]),c.jsx(Gs,{...s,...r,ref:t})});S0.displayName=k0;var E0="PopoverTrigger",Ud=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=fr(E0,n),s=ol(n),l=se(t,o.triggerRef),i=c.jsx(Q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":L0(o.open),...r,ref:l,onClick:z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(Gs,{asChild:!0,...s,children:i})});Ud.displayName=E0;var Yd="PopoverPortal",[HS,XS]=C0(Yd,{forceMount:void 0}),R0=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=fr(Yd,t);return c.jsx(HS,{scope:t,forceMount:n,children:c.jsx(Ke,{present:n||s.open,children:c.jsx(_o,{asChild:!0,container:o,children:r})})})};R0.displayName=Yd;var yo="PopoverContent",Vd=u.forwardRef((e,t)=>{const n=XS(yo,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=fr(yo,e.__scopePopover);return c.jsx(Ke,{present:r||s.open,children:s.modal?c.jsx(ZS,{...o,ref:t}):c.jsx(KS,{...o,ref:t})})});Vd.displayName=yo;var ZS=u.forwardRef((e,t)=>{const n=fr(yo,e.__scopePopover),r=u.useRef(null),o=se(t,r),s=u.useRef(!1);return u.useEffect(()=>{const l=r.current;if(l)return na(l)},[]),c.jsx(Zs,{as:nr,allowPinchZoom:!0,children:c.jsx(j0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,l=>{var i;l.preventDefault(),s.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,l=>{const i=l.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0,d=i.button===2||a;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),KS=u.forwardRef((e,t)=>{const n=fr(yo,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return c.jsx(j0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,i;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),j0=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,...m}=e,p=fr(yo,n),h=ol(n);return ta(),c.jsx(Xs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(wo,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(Vi,{"data-state":L0(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T0="PopoverClose",QS=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=fr(T0,n);return c.jsx(Q.button,{type:"button",...r,ref:t,onClick:z(e.onClick,()=>o.onOpenChange(!1))})});QS.displayName=T0;var JS="PopoverArrow",eE=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ol(n);return c.jsx(Hi,{...o,...r,ref:t})});eE.displayName=JS;function L0(e){return e?"open":"closed"}var sl=_0,M0=S0,_a=Ud,ll=R0,ka=Vd;const dp={wrapper:{position:"mly1n2onr6",$$css:!0},popoverContent:{borderWidth:"mlymkeg23",borderStyle:"mly1y0btm7",borderColor:"mly17v018m",borderRadius:"mly12oqio5",boxShadow:"mly1a3rnpv",backgroundColor:"mly1yduej5",fontSize:"mly64z8l9",$$css:!0}},tE=e=>{const[t,n]=e.split("-");return{side:t,align:n||"center"}},nE=({open:e,setOpen:t,children:n,width:r=350,maxHeight:o,placement:s="right-start",referenceDiv:l,zIndex:i=10,xOffset:a=0,yOffset:d=10,disabled:f=!1,customStyle:m})=>{const{theme:p}=u.useContext(Me),h=u.useRef(null),{side:y,align:g}=tE(s),v=()=>y==="top"||y==="bottom"?d:a,b=()=>y==="top"||y==="bottom"?a:d;return c.jsx("div",{...S.props(dp.wrapper,m),ref:h,children:c.jsxs(sl,{open:e&&!f,onOpenChange:t,children:[c.jsx(M0,{asChild:!0,children:c.jsx("div",{ref:l||h})}),e&&!f&&c.jsx(ll,{children:c.jsx(ka,{...S.props(dp.popoverContent,p),side:y,align:g,sideOffset:v(),alignOffset:b(),style:{width:typeof r=="string"?r:`${r}px`,zIndex:i,...o?{maxHeight:`${o}px`}:{}},avoidCollisions:!0,children:n})})]})})},oi={wrapper:{position:"mly1n2onr6",$$css:!0},checkIcon:{verticalAlign:"mly1n8ftqi",width:"mlyw4jnvo",minWidth:"mlyt4ypqs",opacity:"mly1vqud6w",visibility:"mlylshs6z",color:"mly1pc1dlx",$$css:!0},checkIconSelected:{visibility:"mlynpuxes",$$css:!0},selectListDiv:{fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",textTransform:"mly6mezaz",fontWeight:"mly1fcty0u",width:"mlyh8yej3",padding:"mly1b4vry6",maxHeight:"mly1phlbz0",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0}},pn=({autoFocus:e,value:t,onChange:n,options:r,placeholder:o="Select",disabled:s=!1,valueEqual:l=(d,f)=>d===f,width:i=200,customStyle:a})=>{var d;const[f,m]=u.useState(!1),[p,h]=u.useState(!1),[y,g]=u.useState(!1),v=t!==void 0&&((d=r.find(w=>l(w.value,t)))==null?void 0:d.label)||o,b=w=>{n?.(w),m(!1)};return c.jsxs("div",{...S.props(oi.wrapper,a),children:[c.jsxs("button",{type:"button",autoFocus:e,...{0:{className:"mlyjbqb8w mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3"},4:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti"},2:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},6:{className:"mlyjbqb8w mlymhiqyu mly12oqio5 mly1gqu590 mly1ypdohk mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz"},1:{className:"mlymhiqyu mly1vspu6z mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyt0e3qv mly1jjku57"},5:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mlyss3vti mlyt0e3qv mly1jjku57"},3:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"},7:{className:"mlymhiqyu mly12oqio5 mly1gqu590 mly1pc1dlx mly78zum5 mly1qughib mly6mezaz mly6s0dn4 mly12xrqmb mlyh8yej3 mly1gnnqk1 mlyv3vvaf mly1a2a7pz mlyt0e3qv mly1jjku57"}}[!!p<<2|!!y<<1|!!s<<0],onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onFocus:()=>g(!0),onBlur:()=>g(!1),onClick:w=>{w.preventDefault(),w.stopPropagation(),s||m(!0)},disabled:s,children:[v,c.jsx(ne,{name:"chevronDown"})]}),c.jsx(nE,{open:f,setOpen:m,placement:"bottom-start",width:i,maxHeight:500,children:c.jsx(rE,{options:r,value:t,valueEqual:l,onChange:b})})]})};function rE({options:e,value:t,onChange:n,valueEqual:r=(s,l)=>s===l,customStyle:o}){const[s,l]=u.useState(null);return c.jsx(Ku,{children:c.jsx("div",{...S.props(oi.selectListDiv,o),children:e.reduce((i,a,d)=>{const f=t!==void 0&&r(t,a.value);return a.divider&&i.push(u.createElement("div",{className:"mly77krkw mlyh8yej3 mlynfbntj",key:"divider"+d})),i.push(c.jsxs("label",{...{0:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4"},1:{className:"mlydqdrvq mly1ypdohk mlyuxw1ft mlylyipyv mly1pc1dlx mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly6wxqrg"}}[(s===d)<<0],onMouseEnter:()=>l(d),onMouseLeave:()=>l(null),onClick:()=>n(a.value),children:[c.jsx("input",{className:"mlynalus7 mlyqtp20y",type:"radio",defaultChecked:f}),c.jsx(ne,{name:"checkmark",customStyle:{...oi.checkIcon,...f?oi.checkIconSelected:void 0}}),c.jsx("span",{className:"mlyet2fuk mlyb3r6kr mlylyipyv mly1fc57z9",children:a.label})]},d)),i},[])})})}const vo={second:"YYYY-MM-DD HH:mm:ss",minute:"YYYY-MM-DD HH:mm",hour:"YYYY-MM-DD HH:00",day:"YYYY-MM-DD",week:"YYYY-MM-DD-[WK]",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},mu={second:/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/,minute:/\d\d\d\d-\d\d-\d\d \d\d:\d\d/,hour:/\d\d\d\d-\d\d-\d\d \d\d:00/,day:/\d\d\d\d-\d\d-\d\d/,week:/\d\d\d\d-\d\d-\d\d-WK/,month:/\d\d\d\d-\d\d/,quarter:/\d\d\d\d-Q\d/,year:/\d\d\d\d/},Ii=({value:e,setValue:t,placeholder:n,autoFocus:r,units:o,onFocus:s,onBlur:l,isActive:i,customStyle:a,forwardRef:d})=>{const f=vo[o],[m,p]=u.useState(L.utc(e).format(f));return u.useEffect(()=>{p(L.utc(e).format(f))},[e,f]),c.jsx("input",{...S.props(a,i?oE.active:null),type:"text",placeholder:n||f,value:m,onFocus:s,onBlur:l,onChange:h=>{const y=h.target.value;p(y);const g=mu[o];if(y.match(g)){const v=L.utc(y,f);v.isValid()&&t(v.toDate())}},autoFocus:r,ref:d})};function Nl(e,t){if(e.moment==="literal"){const{literal:n}=e;for(const r in mu){const o=r;if(n.match(mu[o]))return o}}return t?"second":"day"}const oE={active:{backgroundColor:"mly1vzefiq",$$css:!0}};function sE(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e]}const fp=Object.keys(vo);function Hd({value:e,setValue:t,units:n,maxLevel:r,customStyle:o,forwardRef:s}){const{theme:l}=u.useContext(Me),[i,a]=u.useState(e),d=iE(i),[f,m]=u.useState(n),p=Math.floor(L.utc(i).year()/10)*10;u.useEffect(()=>{const C=fp.findIndex(k=>k===n);fp.findIndex(k=>k===f)<C&&m(n)},[n,f]),u.useEffect(()=>{a(e)},[e]);const h=C=>{const E=L.utc(i).year(C).toDate();a(E),t(E)},y=C=>{const E=()=>h(p+C);return C===-1||C===10?c.jsx("div",{onClick:E,className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly358b0h",children:p+C}):c.jsx("div",{onClick:E,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1fcty0u mly1ypdohk mly6mezaz mly1sxf85j mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[(L.utc(i).year()===p+C)<<0],children:p+C})},g=C=>{const E=L.utc(i).month(C).toDate();a(E),t(E)},v=C=>{a(C),t(C)},b=C=>{a(C),t(C)},w=C=>{const E=L.utc(i).quarter(C+1).toDate();a(E),t(E)},x=C=>{const E=()=>g(C),k=L.utc(i).month()===C&&L.utc(i).year()===L.utc(e).year();return c.jsx("div",{onClick:E,...{0:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1247r65 mlyfvyar9 mlymcgfsh mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!k<<0],children:sE(C)})},_=C=>{const E=()=>w(C),k=L.utc(i).quarter()-1===C&&L.utc(i).year()===L.utc(e).year();return c.jsxs("div",{onClick:E,...{0:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov"},1:{className:"mly1rxuhir mly36usyh mly78zum5 mly6s0dn4 mlyl56j7k mly8fuzfi mly1v5ugh9 mly1ypdohk mly6mezaz mly1sxf85j mly1fcty0u mlyt89l8w mly1fxp9ov mly6wxqrg mly10bk7bj"}}[!!k<<0],children:["Q",C+1]})};return c.jsxs("div",{...S.props(lE.outer,o,l),ref:s,children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2",children:[c.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:c.jsx(be,{variant:"default",size:"compact",icon:"chevronLeft",onClick:()=>{f==="day"||f==="week"?a(L.utc(i).subtract(1,"month").toDate()):f==="month"||f==="quarter"?a(L.utc(i).subtract(1,"year").toDate()):f==="year"?a(L.utc(i).subtract(10,"years").toDate()):v(L.utc(i).subtract(1,"days").toDate())}})}),c.jsxs("div",{className:"mly1sxf85j mlyfawy5m mly123j3cw mly1iyjqo2 mly2b8uid mly1ypdohk mly6mezaz mly1fcty0u mlyjg9ulk",onClick:()=>{m(f==="day"||f==="week"?"month":f==="month"||f==="quarter"?"year":f==="hour"||f==="minute"||f==="second"?"day":r)},children:[(f==="day"||f==="week")&&L.utc(i).format("MMMM YYYY"),(f==="month"||f==="quarter")&&L.utc(i).format("YYYY"),f==="year"&&c.jsxs(c.Fragment,{children:[p,"-",p+9]}),(f==="hour"||f==="minute"||f==="second")&&c.jsx(c.Fragment,{children:L.utc(i).format("MMMM D, YYYY")})]}),c.jsx("div",{className:"mly1sxf85j mly1nn3v0j mly6wrskw mlymzs88n mly1ypdohk mlyjg9ulk",children:c.jsx(be,{variant:"default",size:"compact",icon:"chevronRight",onClick:()=>{f==="day"||f==="week"?a(L.utc(i).add(1,"month").toDate()):f==="month"||f==="quarter"?a(L.utc(i).add(1,"year").toDate()):f==="year"?a(L.utc(i).add(10,"years").toDate()):v(L.utc(i).add(1,"days").toDate())}})})]}),f==="day"&&c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),d.map((C,E)=>c.jsx("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:C.map(k=>c.jsx("div",{onClick:()=>{v(k.date)},...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly358b0h"},2:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly1v5ugh9"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"},3:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[!!k.isCurrentMonth<<1|(e.getTime()===k.date.valueOf())<<0],children:k.number},k.number))},E))]}),f==="month"&&c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[x(0),x(1),x(2)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[x(3),x(4),x(5)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[x(6),x(7),x(8)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[x(9),x(10),x(11)]})]}),f==="year"&&c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[y(-1),y(0),y(1)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[y(2),y(3),y(4)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[y(5),y(6),y(7)]}),c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly195vfkc",children:[y(8),y(9),y(10)]})]}),f==="quarter"&&c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlyk2yuxw",children:[_(0),_(1),_(2),_(3)]}),f==="week"&&c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly195vfkc mly87ps6o",children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly195vfkc mly1qughib",children:[c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"M"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"W"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"T"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"F"}),c.jsx("div",{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly117nqv4 mly1v5ugh9",children:"S"})]}),d.map((C,E)=>c.jsx("div",{onClick:()=>{b(C[0].date)},...{0:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w"},1:{className:"mly78zum5 mly1ypdohk mly1q0g3np mly195vfkc mly1f96onm mly1qughib mlyfj9a5l mlyt89l8w mly6wxqrg mly1nwq7qm mly10bk7bj"}}[(e.getTime()===C[0].date.valueOf())<<0],children:C.map(k=>c.jsx("div",{...{0:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly358b0h"},1:{className:"mlyjxf2f8 mlywrnneb mly4x6u8j mlyqyhut4 mly14odnwx mly78zum5 mly6s0dn4 mlyl56j7k mly1ypdohk mly1f96onm mlyfifm61 mly1v5ugh9"}}[!!k.isCurrentMonth<<0],children:k.number},k.number))},E))]}),(f==="hour"||f==="minute"||f==="second")&&c.jsx("div",{className:"mly78zum5 mlydt5ytf mly87ps6o mly1l1ennw mlylo07zb",children:c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly87ps6o mly1l1ennw mly883omv",children:[c.jsx(mc,{label:"Hours",value:parseInt(L.utc(i).format("hh")),setValue:C=>{const E=L.utc(i).hour()>=12?"PM":"AM",k=parseInt(L.utc(`${C} ${E}`,["hh A"]).format("H"));t(L.utc(i).hour(k).toDate())},width:"40px"}),(n==="minute"||n==="second")&&c.jsx(mc,{label:"Minutes",value:L.utc(i).minutes(),setValue:C=>{t(L.utc(i).minute(C).toDate())},width:"40px"}),n==="second"&&c.jsx(mc,{label:"Seconds",value:L.utc(i).seconds(),setValue:C=>{t(L.utc(i).second(C).toDate())},width:"40px"}),c.jsx("div",{style:{display:"flex",justifyContent:"flex-end",flexDirection:"column"},children:c.jsx(pn,{value:L.utc(i).hour()>=12?"PM":"AM",onChange:C=>{const E=parseInt(L.utc(i).format("h")),k=parseInt(L.utc(`${E} ${C}`,["hh A"]).format("H"));t(L.utc(i).hour(k).toDate())},options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})})]})}const lE={outer:{userSelect:"mly87ps6o",fontSize:"mlymhiqyu",fontFamily:"mly12xrqmb",$$css:!0}};function iE(e){const t=L.utc(e).date(1),n=t.day(),r=t.daysInMonth(),o=t.clone().subtract(1,"day").daysInMonth(),s=[];for(let l=0;l<6;l++){const i=[];for(let a=0;a<7;a++)if(l===0&&a<n){const d=n-a;i.push({number:o-d+1,date:t.clone().subtract(d,"days").toDate(),isCurrentMonth:!1})}else{const d=l*7+a-n;d<r?i.push({number:d+1,date:t.clone().add(d,"days").toDate(),isCurrentMonth:!0}):i.push({number:d-r+1,date:t.clone().add(d,"days").toDate(),isCurrentMonth:!1})}s.push(i)}return s}function aE({width:e,minWidth:t,onWidthChange:n}){const r=o=>{const s=e,l=o.clientX,i=()=>{document.body.removeEventListener("mousemove",a),document.body.removeEventListener("mouseup",i),document.body.style.cursor="initial",document.body.style.userSelect="initial"},a=d=>{const f=s+(d.clientX-l);n(Math.max(f,t))};document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",i),document.body.style.cursor="ew-resize",document.body.style.userSelect="none"};return c.jsx("div",{className:"mly7eptgl mly1ftt334 mly5yr21d mly1vjfegm mly10l6tqk mly13vifvy mly1bkpikb",onMouseDown:o=>r(o)})}function pu({title:e,description:t,variant:n="info",children:r}){return c.jsxs("div",{className:"mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j",children:[c.jsxs("div",{...S.props(ns.header,uE[n],r?ns.headerWithContent:null),children:[c.jsx("div",{className:"mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4",children:c.jsx(ne,{...cE[n]})}),c.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr",children:[c.jsx("div",{...S.props(ns.title,F.emphasized),children:e}),c.jsx("div",{...S.props(ns.description,F.supporting),children:t})]})]}),r&&c.jsx("div",{...S.props(ns.content,F.body),children:c.jsx(Ku,{children:r})})]})}const ns={header:{borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mlyh8yej3",padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,boxSizing:"mly9f619",display:"mly78zum5",flexDirection:"mly1q0g3np",alignItems:"mly7a106z",justifyContent:"mlylqzeqv",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},headerWithContent:{borderRadius:"mlyq516e8",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},title:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},description:{textOverflow:"mlylyipyv",whiteSpace:"mlyuxw1ft",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},content:{padding:"mly1tamke2",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,backgroundColor:"mly12peec7",borderRadius:"mly11zuszs",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0}},cE={info:{name:"info",color:"info"},success:{name:"check_circle",color:"positive"},warn:{name:"warning",color:"warning"},critical:{name:"error",color:"negative"}},uE={info:{backgroundColor:"mly1pnbjq1",$$css:!0},success:{backgroundColor:"mly1x3oq6j",$$css:!0},warn:{backgroundColor:"mly1x7w6om",$$css:!0},critical:{backgroundColor:"mlyrkwa2d",$$css:!0}},A0=u.createContext({});function dE({defaultExpandedItemId:e,children:t,customStyle:n}){const[r,o]=u.useState(e),s=l=>{o(i=>{if(i!==l)return l})};return c.jsx(A0.Provider,{value:{expandedItemId:r,onExpandedItemChange:s},children:c.jsx("div",{...S.props(fE.main,n),children:u.Children.map(t,l=>c.jsxs(c.Fragment,{children:[l,c.jsx(no,{})]}))})})}const fE={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,flexGrow:"mly1iyjqo2",$$css:!0}};function vc({id:e,label:t,sublabel:n,startIcon:r,badge:o,endIcon:s,children:l}){const{expandedItemId:i,onExpandedItemChange:a}=u.useContext(A0);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mly1ypdohk",onClick:()=>a?.(e),children:[r&&c.jsx(c.Fragment,{children:r}),c.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2",children:[c.jsx("span",{...S.props(F.body,mp.label),children:t}),n&&c.jsx("span",{...S.props(F.supporting,mp.sublabel),children:n})]}),o&&o,s&&s]}),e===i&&c.jsx("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2 mlytdwleo mly1jnr06f mly13z5u0c mlyysyzu8",children:u.Children.map(l,d=>d)})]})}const mp={label:{flexGrow:"mly1iyjqo2",fontWeight:"mly1xlr1w8",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly9dwj6z",overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}};var bc="rovingFocusGroup.onEntryFocus",mE={bubbles:!1,cancelable:!0},Sa="RovingFocusGroup",[hu,I0,pE]=td(Sa),[hE,Ea]=Gt(Sa,[pE]),[gE,yE]=hE(Sa),P0=u.forwardRef((e,t)=>c.jsx(hu.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hu.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(vE,{...e,ref:t})})}));P0.displayName=Sa;var vE=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:a,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...m}=e,p=u.useRef(null),h=se(t,p),y=Vs(s),[g=null,v]=lr({prop:l,defaultProp:i,onChange:a}),[b,w]=u.useState(!1),x=Ge(d),_=I0(n),C=u.useRef(!1),[E,k]=u.useState(0);return u.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(bc,x),()=>R.removeEventListener(bc,x)},[x]),c.jsx(gE,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:u.useCallback(R=>v(R),[v]),onItemShiftTab:u.useCallback(()=>w(!0),[]),onFocusableItemAdd:u.useCallback(()=>k(R=>R+1),[]),onFocusableItemRemove:u.useCallback(()=>k(R=>R-1),[]),children:c.jsx(Q.div,{tabIndex:b||E===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{C.current=!0}),onFocus:z(e.onFocus,R=>{const j=!C.current;if(R.target===R.currentTarget&&j&&!b){const M=new CustomEvent(bc,mE);if(R.currentTarget.dispatchEvent(M),!M.defaultPrevented){const D=_().filter(q=>q.focusable),$=D.find(q=>q.active),X=D.find(q=>q.id===g),Z=[$,X,...D].filter(Boolean).map(q=>q.ref.current);N0(Z,f)}}C.current=!1}),onBlur:z(e.onBlur,()=>w(!1))})})}),D0="RovingFocusGroupItem",O0=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...l}=e,i=Lt(),a=s||i,d=yE(D0,n),f=d.currentTabStopId===a,m=I0(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=d;return u.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),c.jsx(hu.ItemSlot,{scope:n,id:a,focusable:r,active:o,children:c.jsx(Q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:z(e.onMouseDown,y=>{r?d.onItemFocus(a):y.preventDefault()}),onFocus:z(e.onFocus,()=>d.onItemFocus(a)),onKeyDown:z(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=xE(y,d.orientation,d.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=m().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const w=b.indexOf(y.currentTarget);b=d.loop?CE(b,w+1):b.slice(w+1)}setTimeout(()=>N0(b))}})})})});O0.displayName=D0;var bE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xE(e,t,n){const r=wE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return bE[r]}function N0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function CE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $0=P0,z0=O0,gu=["Enter"," "],_E=["ArrowDown","PageUp","Home"],F0=["ArrowUp","PageDown","End"],kE=[..._E,...F0],SE={ltr:[...gu,"ArrowRight"],rtl:[...gu,"ArrowLeft"]},EE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},il="Menu",[Ps,RE,jE]=td(il),[Ir,B0]=Gt(il,[jE,cr,Ea]),Ra=cr(),q0=Ea(),[TE,Pr]=Ir(il),[LE,al]=Ir(il),W0=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:l=!0}=e,i=Ra(t),[a,d]=u.useState(null),f=u.useRef(!1),m=Ge(s),p=Vs(o);return u.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),c.jsx(Yi,{...i,children:c.jsx(TE,{scope:t,open:n,onOpenChange:m,content:a,onContentChange:d,children:c.jsx(LE,{scope:t,onClose:u.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:p,modal:l,children:r})})})};W0.displayName=il;var ME="MenuAnchor",Xd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ra(n);return c.jsx(Gs,{...o,...r,ref:t})});Xd.displayName=ME;var Zd="MenuPortal",[AE,G0]=Ir(Zd,{forceMount:void 0}),U0=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Pr(Zd,t);return c.jsx(AE,{scope:t,forceMount:n,children:c.jsx(Ke,{present:n||s.open,children:c.jsx(_o,{asChild:!0,container:o,children:r})})})};U0.displayName=Zd;var Mt="MenuContent",[IE,Kd]=Ir(Mt),Y0=u.forwardRef((e,t)=>{const n=G0(Mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Pr(Mt,e.__scopeMenu),l=al(Mt,e.__scopeMenu);return c.jsx(Ps.Provider,{scope:e.__scopeMenu,children:c.jsx(Ke,{present:r||s.open,children:c.jsx(Ps.Slot,{scope:e.__scopeMenu,children:l.modal?c.jsx(PE,{...o,ref:t}):c.jsx(DE,{...o,ref:t})})})})}),PE=u.forwardRef((e,t)=>{const n=Pr(Mt,e.__scopeMenu),r=u.useRef(null),o=se(t,r);return u.useEffect(()=>{const s=r.current;if(s)return na(s)},[]),c.jsx(Qd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),DE=u.forwardRef((e,t)=>{const n=Pr(Mt,e.__scopeMenu);return c.jsx(Qd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qd=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:a,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=Pr(Mt,n),b=al(Mt,n),w=Ra(n),x=q0(n),_=RE(n),[C,E]=u.useState(null),k=u.useRef(null),R=se(t,k,v.onContentChange),j=u.useRef(0),M=u.useRef(""),D=u.useRef(0),$=u.useRef(null),X=u.useRef("right"),A=u.useRef(0),Z=y?Zs:u.Fragment,q=y?{as:nr,allowPinchZoom:!0}:void 0,K=N=>{var oe,Te;const pe=M.current+N,ve=_().filter(ce=>!ce.disabled),we=document.activeElement,Qe=(oe=ve.find(ce=>ce.ref.current===we))==null?void 0:oe.textValue,Ee=ve.map(ce=>ce.textValue),U=VE(Ee,pe,Qe),le=(Te=ve.find(ce=>ce.textValue===U))==null?void 0:Te.ref.current;(function ce(G){M.current=G,window.clearTimeout(j.current),G!==""&&(j.current=window.setTimeout(()=>ce(""),1e3))})(pe),le&&setTimeout(()=>le.focus())};u.useEffect(()=>()=>window.clearTimeout(j.current),[]),ta();const H=u.useCallback(N=>{var oe,Te;return X.current===((oe=$.current)==null?void 0:oe.side)&&XE(N,(Te=$.current)==null?void 0:Te.area)},[]);return c.jsx(IE,{scope:n,searchRef:M,onItemEnter:u.useCallback(N=>{H(N)&&N.preventDefault()},[H]),onItemLeave:u.useCallback(N=>{var oe;H(N)||((oe=k.current)==null||oe.focus(),E(null))},[H]),onTriggerLeave:u.useCallback(N=>{H(N)&&N.preventDefault()},[H]),pointerGraceTimerRef:D,onPointerGraceIntentChange:u.useCallback(N=>{$.current=N},[]),children:c.jsx(Z,{...q,children:c.jsx(Xs,{asChild:!0,trapped:o,onMountAutoFocus:z(s,N=>{var oe;N.preventDefault(),(oe=k.current)==null||oe.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:c.jsx(wo,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:c.jsx($0,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:E,onEntryFocus:z(a,N=>{b.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Vi,{role:"menu","aria-orientation":"vertical","data-state":ay(v.open),"data-radix-menu-content":"",dir:b.dir,...w,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:z(g.onKeyDown,N=>{const Te=N.target.closest("[data-radix-menu-content]")===N.currentTarget,pe=N.ctrlKey||N.altKey||N.metaKey,ve=N.key.length===1;Te&&(N.key==="Tab"&&N.preventDefault(),!pe&&ve&&K(N.key));const we=k.current;if(N.target!==we||!kE.includes(N.key))return;N.preventDefault();const Ee=_().filter(U=>!U.disabled).map(U=>U.ref.current);F0.includes(N.key)&&Ee.reverse(),UE(Ee)}),onBlur:z(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(j.current),M.current="")}),onPointerMove:z(e.onPointerMove,Ds(N=>{const oe=N.target,Te=A.current!==N.clientX;if(N.currentTarget.contains(oe)&&Te){const pe=N.clientX>A.current?"right":"left";X.current=pe,A.current=N.clientX}}))})})})})})})});Y0.displayName=Mt;var OE="MenuGroup",Jd=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Q.div,{role:"group",...r,ref:t})});Jd.displayName=OE;var NE="MenuLabel",V0=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Q.div,{...r,ref:t})});V0.displayName=NE;var Pi="MenuItem",pp="menu.itemSelect",ja=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=u.useRef(null),l=al(Pi,e.__scopeMenu),i=Kd(Pi,e.__scopeMenu),a=se(t,s),d=u.useRef(!1),f=()=>{const m=s.current;if(!n&&m){const p=new CustomEvent(pp,{bubbles:!0,cancelable:!0});m.addEventListener(pp,h=>r?.(h),{once:!0}),Qp(m,p),p.defaultPrevented?d.current=!1:l.onClose()}};return c.jsx(H0,{...o,ref:a,disabled:n,onClick:z(e.onClick,f),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),d.current=!0},onPointerUp:z(e.onPointerUp,m=>{var p;d.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:z(e.onKeyDown,m=>{const p=i.searchRef.current!=="";n||p&&m.key===" "||gu.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});ja.displayName=Pi;var H0=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,l=Kd(Pi,n),i=q0(n),a=u.useRef(null),d=se(t,a),[f,m]=u.useState(!1),[p,h]=u.useState("");return u.useEffect(()=>{const y=a.current;y&&h((y.textContent??"").trim())},[s.children]),c.jsx(Ps.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:c.jsx(z0,{asChild:!0,...i,focusable:!r,children:c.jsx(Q.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:d,onPointerMove:z(e.onPointerMove,Ds(y=>{r?l.onItemLeave(y):(l.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,Ds(y=>l.onItemLeave(y))),onFocus:z(e.onFocus,()=>m(!0)),onBlur:z(e.onBlur,()=>m(!1))})})})}),$E="MenuCheckboxItem",X0=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(ey,{scope:e.__scopeMenu,checked:n,children:c.jsx(ja,{role:"menuitemcheckbox","aria-checked":Di(n)?"mixed":n,...o,ref:t,"data-state":tf(n),onSelect:z(o.onSelect,()=>r?.(Di(n)?!0:!n),{checkForDefaultPrevented:!1})})})});X0.displayName=$E;var Z0="MenuRadioGroup",[zE,FE]=Ir(Z0,{value:void 0,onValueChange:()=>{}}),K0=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Ge(r);return c.jsx(zE,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(Jd,{...o,ref:t})})});K0.displayName=Z0;var Q0="MenuRadioItem",J0=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=FE(Q0,e.__scopeMenu),s=n===o.value;return c.jsx(ey,{scope:e.__scopeMenu,checked:s,children:c.jsx(ja,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":tf(s),onSelect:z(r.onSelect,()=>{var l;return(l=o.onValueChange)==null?void 0:l.call(o,n)},{checkForDefaultPrevented:!1})})})});J0.displayName=Q0;var ef="MenuItemIndicator",[ey,BE]=Ir(ef,{checked:!1}),ty=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=BE(ef,n);return c.jsx(Ke,{present:r||Di(s.checked)||s.checked===!0,children:c.jsx(Q.span,{...o,ref:t,"data-state":tf(s.checked)})})});ty.displayName=ef;var qE="MenuSeparator",ny=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(Q.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ny.displayName=qE;var WE="MenuArrow",ry=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ra(n);return c.jsx(Hi,{...o,...r,ref:t})});ry.displayName=WE;var GE="MenuSub",[IP,oy]=Ir(GE),cs="MenuSubTrigger",sy=u.forwardRef((e,t)=>{const n=Pr(cs,e.__scopeMenu),r=al(cs,e.__scopeMenu),o=oy(cs,e.__scopeMenu),s=Kd(cs,e.__scopeMenu),l=u.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:a}=s,d={__scopeMenu:e.__scopeMenu},f=u.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return u.useEffect(()=>f,[f]),u.useEffect(()=>{const m=i.current;return()=>{window.clearTimeout(m),a(null)}},[i,a]),c.jsx(Xd,{asChild:!0,...d,children:c.jsx(H0,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ay(n.open),...e,ref:qi(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,Ds(m=>{s.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:z(e.onPointerLeave,Ds(m=>{var p,h;f();const y=(p=n.content)==null?void 0:p.getBoundingClientRect();if(y){const g=(h=n.content)==null?void 0:h.dataset.side,v=g==="right",b=v?-5:5,w=y[v?"left":"right"],x=y[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x:w,y:y.top},{x,y:y.top},{x,y:y.bottom},{x:w,y:y.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,m=>{var p;const h=s.searchRef.current!=="";e.disabled||h&&m.key===" "||SE[r.dir].includes(m.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),m.preventDefault())})})})});sy.displayName=cs;var ly="MenuSubContent",iy=u.forwardRef((e,t)=>{const n=G0(Mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Pr(Mt,e.__scopeMenu),l=al(Mt,e.__scopeMenu),i=oy(ly,e.__scopeMenu),a=u.useRef(null),d=se(t,a);return c.jsx(Ps.Provider,{scope:e.__scopeMenu,children:c.jsx(Ke,{present:r||s.open,children:c.jsx(Ps.Slot,{scope:e.__scopeMenu,children:c.jsx(Qd,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;l.isUsingKeyboardRef.current&&((m=a.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:z(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,f=>{l.onClose(),f.preventDefault()}),onKeyDown:z(e.onKeyDown,f=>{var m;const p=f.currentTarget.contains(f.target),h=EE[l.dir].includes(f.key);p&&h&&(s.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});iy.displayName=ly;function ay(e){return e?"open":"closed"}function Di(e){return e==="indeterminate"}function tf(e){return Di(e)?"indeterminate":e?"checked":"unchecked"}function UE(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function YE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function VE(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=YE(e,Math.max(s,0));o.length===1&&(l=l.filter(d=>d!==n));const a=l.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function HE(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const i=t[s].x,a=t[s].y,d=t[l].x,f=t[l].y;a>r!=f>r&&n<(d-i)*(r-a)/(f-a)+i&&(o=!o)}return o}function XE(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HE(n,t)}function Ds(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ZE=W0,KE=Xd,QE=U0,JE=Y0,eR=Jd,tR=V0,nR=ja,rR=X0,oR=K0,sR=J0,lR=ty,iR=ny,aR=ry,cR=sy,uR=iy,nf="DropdownMenu",[dR]=Gt(nf,[B0]),lt=B0(),[fR,cy]=dR(nf),uy=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:l,modal:i=!0}=e,a=lt(t),d=u.useRef(null),[f=!1,m]=lr({prop:o,defaultProp:s,onChange:l});return c.jsx(fR,{scope:t,triggerId:Lt(),triggerRef:d,contentId:Lt(),open:f,onOpenChange:m,onOpenToggle:u.useCallback(()=>m(p=>!p),[m]),modal:i,children:c.jsx(ZE,{...a,open:f,onOpenChange:m,dir:r,modal:i,children:n})})};uy.displayName=nf;var dy="DropdownMenuTrigger",fy=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=cy(dy,n),l=lt(n);return c.jsx(KE,{asChild:!0,...l,children:c.jsx(Q.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:qi(t,s.triggerRef),onPointerDown:z(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:z(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});fy.displayName=dy;var mR="DropdownMenuPortal",my=e=>{const{__scopeDropdownMenu:t,...n}=e,r=lt(t);return c.jsx(QE,{...r,...n})};my.displayName=mR;var py="DropdownMenuContent",hy=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=cy(py,n),s=lt(n),l=u.useRef(!1);return c.jsx(JE,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,i=>{var a;l.current||(a=o.triggerRef.current)==null||a.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:z(e.onInteractOutside,i=>{const a=i.detail.originalEvent,d=a.button===0&&a.ctrlKey===!0,f=a.button===2||d;(!o.modal||f)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});hy.displayName=py;var pR="DropdownMenuGroup",hR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(eR,{...o,...r,ref:t})});hR.displayName=pR;var gR="DropdownMenuLabel",yR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(tR,{...o,...r,ref:t})});yR.displayName=gR;var vR="DropdownMenuItem",gy=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(nR,{...o,...r,ref:t})});gy.displayName=vR;var bR="DropdownMenuCheckboxItem",wR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(rR,{...o,...r,ref:t})});wR.displayName=bR;var xR="DropdownMenuRadioGroup",CR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(oR,{...o,...r,ref:t})});CR.displayName=xR;var _R="DropdownMenuRadioItem",kR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(sR,{...o,...r,ref:t})});kR.displayName=_R;var SR="DropdownMenuItemIndicator",ER=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(lR,{...o,...r,ref:t})});ER.displayName=SR;var RR="DropdownMenuSeparator",jR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(iR,{...o,...r,ref:t})});jR.displayName=RR;var TR="DropdownMenuArrow",LR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(aR,{...o,...r,ref:t})});LR.displayName=TR;var MR="DropdownMenuSubTrigger",AR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(cR,{...o,...r,ref:t})});AR.displayName=MR;var IR="DropdownMenuSubContent",PR=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=lt(n);return c.jsx(uR,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});PR.displayName=IR;var DR=uy,hp=fy,OR=my,NR=hy,$R=gy;function Ta({trigger:e,tooltip:t,onOpenChange:n,children:r,tooltipProps:o}){const{theme:s}=u.useContext(Me),[l,i]=u.useState(),a=d=>{d&&i(!1),n?.(d)};return c.jsxs(DR,{onOpenChange:a,children:[t?c.jsxs(jo,{open:l,onOpenChange:i,delayDuration:300,children:[c.jsx(To,{asChild:!0,children:c.jsx(hp,{asChild:!0,children:e})}),c.jsx(Lo,{children:c.jsx(Mo,{...o,...S.props(typeof t=="string"?Ln.default:Ln.card,s),children:t})})]}):c.jsx(hp,{asChild:!0,children:e}),c.jsx(OR,{children:c.jsx(NR,{...S.props(F.body,si.content,s),side:"bottom",align:"start",sideOffset:4,onCloseAutoFocus:d=>d.preventDefault(),children:u.Children.map(r,d=>d)})})]})}function tr({icon:e,label:t,sublabel:n,onClick:r,disabled:o}){return c.jsxs($R,{className:"mly78zum5 mly6s0dn4 mlye8ttls mly167g77z mly1kogg8i mly1ypdohk mly1a2a7pz mly1vg538p mly5ezrf1 mly15rdse5 mly1z060rf mly5deeek mly1jacekv mly7ouyw2 mly7h4d18",onClick:s=>{r?.(s)},disabled:o,children:[e&&c.jsx(ne,{name:e,customStyle:si.icon}),c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1iyjqo2",children:[c.jsx("span",{...S.props(F.body,si.label),children:t}),n&&c.jsx("span",{...S.props(F.supporting,si.sublabel),children:n})]})]})}const si={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,boxShadow:"mly8dadwf",padding:"mlyfawy5m",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},icon:{color:"mly1mguc6l",$$css:!0},label:{flexGrow:"mly1iyjqo2",color:"mly12lmysb",$$css:!0},sublabel:{flexGrow:"mly1iyjqo2",color:"mly15jt5ur",$$css:!0}},La=u.createContext({});function zR({runQuery:e,runQueryString:t}){const{theme:n}=u.useContext(Me),{query:r,rootQuery:o,setQuery:s,source:l}=u.useContext(Ut),{onCollapse:i}=u.useContext(La),{focusMainView:a}=Ys(),d=!o||o.isEmpty(),f=o?.isRunnable()||typeof r=="string"&&r.trim().length>0,m=()=>{typeof r=="string"&&t?t(l,r):o&&e(l,o.build())};return c.jsxs("div",{className:"mly78zum5 mly1qughib mly6s0dn4 mlye8ttls",children:[c.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4 mlydqdrvq",children:[c.jsx(ne,{name:"filterSliders"}),c.jsx("div",{...S.props(F.largeBody,FR.title),children:"Query"})]}),c.jsxs("div",{className:"mly78zum5 mly167g77z",children:[c.jsx(be,{onClick:()=>{a(),s?.(void 0)},isDisabled:(!o||o?.isEmpty())&&typeof r!="string",label:"Clear",variant:"flat",size:"compact"}),c.jsxs(ko,{children:[c.jsx(So,{asChild:!0,children:c.jsx(be,{icon:"play",onClick:m,isDisabled:!f,label:"Run",variant:"primary",size:"compact"})}),c.jsx(Eo,{children:c.jsx(Ro,{children:c.jsx("div",{...S.props(F.body,Ln.default,n),children:f?"Execute the query.":d?"The current query is empty.":"The current query cannot be executed."})})})]}),i&&c.jsx(be,{icon:"sidebarCollapse",tooltip:"Close the query panel",onClick:i,size:"compact",variant:"flat"})]})]})}const FR={title:{fontWeight:"mly1xlr1w8",$$css:!0}},wt={labelWithIcon:{display:"mly78zum5",alignItems:"mly6s0dn4",whiteSpace:"mlyuxw1ft",gap:"mly167g77z",rowGap:null,columnGap:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},queryCard:{borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:"mly1y0btm7",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:"mly17v018m",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},title:{whiteSpace:"mlyuxw1ft",padding:"mly17qkr04",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},tokenContainer:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function BR({value:e,customStyle:t}){if(!e)return c.jsx(Ne,{label:"∅"});switch(e.kind){case"boolean_literal":return c.jsx(Ne,{label:e.boolean_value?"true":"false",customStyle:t});case"date_literal":return c.jsx(Ne,{label:e.date_value,customStyle:t});case"timestamp_literal":return c.jsx(Ne,{label:e.timestamp_value,customStyle:t});case"null_literal":return c.jsx(Ne,{label:"∅"});case"number_literal":return c.jsx(Ne,{label:e.number_value.toLocaleString(),customStyle:t});case"string_literal":return c.jsx(Ne,{label:e.string_value,customStyle:t});case"filter_expression_literal":return c.jsx(Ne,{label:e.filter_expression_value,customStyle:t})}}const yu="# ",qR=["table","bar","dashboard","json","line","list","list_detail","point_map","scatter_chart","segment_map","shape_map"],WR=["table","bar_chart","dashboard","json","line_chart","list","list_detail","point_map","scatter_chart","segment_map","shape_map"],GR=["number","boolean","currency","image","url","percent","text","time"],UR=[...WR,...GR];function rf(e){if(e){const t=e.getProperties(),n=Object.keys(t);for(const r of n)if(UR.includes(r)&&!t[r].deleted)return r}return null}function YR(e){switch(e){case"bar_chart":return"bar";case"line_chart":return"line";default:return e}}function Ma(e){return HR[e]}function yy(e){return XR[e]}function li(e){let t;switch(e.kind){case"view":t="query";break;case"dimension":case"measure":case"calculate":t=Ma(e.type.kind);break;case"join":t=VR(e.relationship);break}return t}function VR(e){return ZR[e]}function vy(e){return`viz_${rf(e)??"table"}`}const HR={array_type:"array",string_type:"string",date_type:"date",boolean_type:"boolean",number_type:"number",json_type:"json",record_type:"json",sql_native_type:"sql_native",timestamp_type:"date",timestamptz_type:"date",filter_expression_type:"filter"},XR={view:"purple",dimension:"cyan",measure:"green",calculate:"green",join:void 0},ZR={many:"many_to_one",cross:"one_to_many",one:"one_to_one"};function An({field:e,additionalSiblings:t,hoverActions:n,hoverActionsVisible:r,...o}){const[s,l]=u.useState(!1);let i=e.name;e.kind==="dimension"&&(e.type.kind==="timestamp_type"||e.type.kind==="timestamptz_type"||e.type.kind==="date_type")&&e.type.timeframe&&(i+=`.${e.type.timeframe}`);const a=(s||r)&&!!n;return c.jsxs("div",{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),...{0:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f"},1:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mlym9y5t7"}}[!!a<<0],children:[c.jsx(Ne,{label:i,color:yy(e.kind),icon:li(e),...o}),t,a&&c.jsx("div",{className:"mly1vsucm1 mly2lah0s",children:n})]})}function KR({drills:e}){return e.length?c.jsxs("div",{children:[c.jsx("div",{...S.props(wt.title),children:"drills"}),c.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",children:e.map((t,n)=>{const r=t.filter.expression.getFieldInfo();return r?c.jsxs(Hs,{color:"cyan",customStyle:QR.tokenGroup,children:[c.jsx(An,{field:r}),c.jsx(Ne,{label:"="}),t.filter instanceof Y.ASTFilterWithLiteralEquality?c.jsx(BR,{value:t.filter.value.node}):c.jsx(Ne,{label:t.filter.filterString})]},n):null})})]}):null}const QR={tokenGroup:{display:"mly78zum5",$$css:!0}};function JR(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Aa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function of(e){return"nodeType"in e}function dt(e){var t,n;return e?zo(e)?e:of(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function sf(e){const{Document:t}=dt(e);return e instanceof t}function cl(e){return zo(e)?!1:e instanceof dt(e).HTMLElement}function by(e){return e instanceof dt(e).SVGElement}function Fo(e){return e?zo(e)?e.document:of(e)?sf(e)?e:cl(e)||by(e)?e.ownerDocument:document:document:document}const cn=Aa?u.useLayoutEffect:u.useEffect;function lf(e){const t=u.useRef(e);return cn(()=>{t.current=e}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function ej(){const e=u.useRef(null),t=u.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=u.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Os(e,t){t===void 0&&(t=[e]);const n=u.useRef(e);return cn(()=>{n.current!==e&&(n.current=e)},t),n}function ul(e,t){const n=u.useRef();return u.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Oi(e){const t=lf(e),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function vu(e){const t=u.useRef();return u.useEffect(()=>{t.current=e},[e]),t.current}let wc={};function dl(e,t){return u.useMemo(()=>{if(t)return t;const n=wc[e]==null?0:wc[e]+1;return wc[e]=n,e+"-"+n},[e,t])}function wy(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,l)=>{const i=Object.entries(l);for(const[a,d]of i){const f=s[a];f!=null&&(s[a]=f+e*d)}return s},{...t})}}const uo=wy(1),Ni=wy(-1);function tj(e){return"clientX"in e&&"clientY"in e}function af(e){if(!e)return!1;const{KeyboardEvent:t}=dt(e.target);return t&&e instanceof t}function nj(e){if(!e)return!1;const{TouchEvent:t}=dt(e.target);return t&&e instanceof t}function bu(e){if(nj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return tj(e)?{x:e.clientX,y:e.clientY}:null}const Ns=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ns.Translate.toString(e),Ns.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),gp="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function rj(e){return e.matches(gp)?e:e.querySelector(gp)}const oj={display:"none"};function sj(e){let{id:t,value:n}=e;return me.createElement("div",{id:t,style:oj},n)}function lj(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return me.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function ij(){const[e,t]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const xy=u.createContext(null);function aj(e){const t=u.useContext(xy);u.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function cj(){const[e]=u.useState(()=>new Set),t=u.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[u.useCallback(r=>{let{type:o,event:s}=r;e.forEach(l=>{var i;return(i=l[o])==null?void 0:i.call(l,s)})},[e]),t]}const uj={draggable:`
|
|
203
|
+
To pick up a draggable item, press the space bar.
|
|
204
|
+
While dragging, use the arrow keys to move the item.
|
|
205
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
206
|
+
`},dj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function fj(e){let{announcements:t=dj,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=uj}=e;const{announce:s,announcement:l}=ij(),i=dl("DndLiveRegion"),[a,d]=u.useState(!1);if(u.useEffect(()=>{d(!0)},[]),aj(u.useMemo(()=>({onDragStart(m){let{active:p}=m;s(t.onDragStart({active:p}))},onDragMove(m){let{active:p,over:h}=m;t.onDragMove&&s(t.onDragMove({active:p,over:h}))},onDragOver(m){let{active:p,over:h}=m;s(t.onDragOver({active:p,over:h}))},onDragEnd(m){let{active:p,over:h}=m;s(t.onDragEnd({active:p,over:h}))},onDragCancel(m){let{active:p,over:h}=m;s(t.onDragCancel({active:p,over:h}))}}),[s,t])),!a)return null;const f=me.createElement(me.Fragment,null,me.createElement(sj,{id:r,value:o.draggable}),me.createElement(lj,{id:i,announcement:l}));return n?Nt.createPortal(f,n):f}var We;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(We||(We={}));function $i(){}function mj(e,t){return u.useMemo(()=>({sensor:e,options:{}}),[e,t])}function pj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Wt=Object.freeze({x:0,y:0});function hj(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function gj(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function yj(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function vj(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function yp(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const bj=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=yp(t,t.left,t.top),s=[];for(const l of r){const{id:i}=l,a=n.get(i);if(a){const d=hj(yp(a),o);s.push({id:i,data:{droppableContainer:l,value:d}})}}return s.sort(gj)};function wj(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),l=o-r,i=s-n;if(r<o&&n<s){const a=t.width*t.height,d=e.width*e.height,f=l*i,m=f/(a+d-f);return Number(m.toFixed(4))}return 0}const xj=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:l}=s,i=n.get(l);if(i){const a=wj(i,t);a>0&&o.push({id:l,data:{droppableContainer:s,value:a}})}}return o.sort(yj)};function Cj(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Cy(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Wt}function _j(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((l,i)=>({...l,top:l.top+e*i.y,bottom:l.bottom+e*i.y,left:l.left+e*i.x,right:l.right+e*i.x}),{...n})}}const kj=_j(1);function Sj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Ej(e,t,n){const r=Sj(t);if(!r)return e;const{scaleX:o,scaleY:s,x:l,y:i}=r,a=e.left-l-(1-o)*parseFloat(n),d=e.top-i-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,m=s?e.height/s:e.height;return{width:f,height:m,top:d,right:a+f,bottom:d+m,left:a}}const Rj={ignoreTransform:!1};function Bo(e,t){t===void 0&&(t=Rj);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:f}=dt(e).getComputedStyle(e);d&&(n=Ej(n,d,f))}const{top:r,left:o,width:s,height:l,bottom:i,right:a}=n;return{top:r,left:o,width:s,height:l,bottom:i,right:a}}function vp(e){return Bo(e,{ignoreTransform:!0})}function jj(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Tj(e,t){return t===void 0&&(t=dt(e).getComputedStyle(e)),t.position==="fixed"}function Lj(e,t){t===void 0&&(t=dt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function cf(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(sf(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!cl(o)||by(o)||n.includes(o))return n;const s=dt(e).getComputedStyle(o);return o!==e&&Lj(o,s)&&n.push(o),Tj(o,s)?n:r(o.parentNode)}return e?r(e):n}function _y(e){const[t]=cf(e,1);return t??null}function xc(e){return!Aa||!e?null:zo(e)?e:of(e)?sf(e)||e===Fo(e).scrollingElement?window:cl(e)?e:null:null}function ky(e){return zo(e)?e.scrollX:e.scrollLeft}function Sy(e){return zo(e)?e.scrollY:e.scrollTop}function wu(e){return{x:ky(e),y:Sy(e)}}var Ve;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ve||(Ve={}));function Ey(e){return!Aa||!e?!1:e===document.scrollingElement}function Ry(e){const t={x:0,y:0},n=Ey(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,l=e.scrollTop>=r.y,i=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:l,isRight:i,maxScroll:r,minScroll:t}}const Mj={x:.2,y:.2};function Aj(e,t,n,r,o){let{top:s,left:l,right:i,bottom:a}=n;r===void 0&&(r=10),o===void 0&&(o=Mj);const{isTop:d,isBottom:f,isLeft:m,isRight:p}=Ry(e),h={x:0,y:0},y={x:0,y:0},g={height:t.height*o.y,width:t.width*o.x};return!d&&s<=t.top+g.height?(h.y=Ve.Backward,y.y=r*Math.abs((t.top+g.height-s)/g.height)):!f&&a>=t.bottom-g.height&&(h.y=Ve.Forward,y.y=r*Math.abs((t.bottom-g.height-a)/g.height)),!p&&i>=t.right-g.width?(h.x=Ve.Forward,y.x=r*Math.abs((t.right-g.width-i)/g.width)):!m&&l<=t.left+g.width&&(h.x=Ve.Backward,y.x=r*Math.abs((t.left+g.width-l)/g.width)),{direction:h,speed:y}}function Ij(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:l}=window;return{top:0,left:0,right:s,bottom:l,width:s,height:l}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function jy(e){return e.reduce((t,n)=>uo(t,wu(n)),Wt)}function Pj(e){return e.reduce((t,n)=>t+ky(n),0)}function Dj(e){return e.reduce((t,n)=>t+Sy(n),0)}function Oj(e,t){if(t===void 0&&(t=Bo),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);_y(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Nj=[["x",["left","right"],Pj],["y",["top","bottom"],Dj]];class uf{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=cf(n),o=jy(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,l,i]of Nj)for(const a of l)Object.defineProperty(this,a,{get:()=>{const d=i(r),f=o[s]-d;return this.rect[a]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class hs{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function $j(e){const{EventTarget:t}=dt(e);return e instanceof t?e:Fo(e)}function Cc(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Et;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Et||(Et={}));function bp(e){e.preventDefault()}function zj(e){e.stopPropagation()}var ye;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ye||(ye={}));const Ty={start:[ye.Space,ye.Enter],cancel:[ye.Esc],end:[ye.Space,ye.Enter,ye.Tab]},Fj=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ye.Right:return{...n,x:n.x+25};case ye.Left:return{...n,x:n.x-25};case ye.Down:return{...n,y:n.y+25};case ye.Up:return{...n,y:n.y-25}}};class Ly{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new hs(Fo(n)),this.windowListeners=new hs(dt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Et.Resize,this.handleCancel),this.windowListeners.add(Et.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Et.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Oj(r),n(Wt)}handleKeyDown(t){if(af(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Ty,coordinateGetter:l=Fj,scrollBehavior:i="smooth"}=o,{code:a}=t;if(s.end.includes(a)){this.handleEnd(t);return}if(s.cancel.includes(a)){this.handleCancel(t);return}const{collisionRect:d}=r.current,f=d?{x:d.left,y:d.top}:Wt;this.referenceCoordinates||(this.referenceCoordinates=f);const m=l(t,{active:n,context:r.current,currentCoordinates:f});if(m){const p=Ni(m,f),h={x:0,y:0},{scrollableAncestors:y}=r.current;for(const g of y){const v=t.code,{isTop:b,isRight:w,isLeft:x,isBottom:_,maxScroll:C,minScroll:E}=Ry(g),k=Ij(g),R={x:Math.min(v===ye.Right?k.right-k.width/2:k.right,Math.max(v===ye.Right?k.left:k.left+k.width/2,m.x)),y:Math.min(v===ye.Down?k.bottom-k.height/2:k.bottom,Math.max(v===ye.Down?k.top:k.top+k.height/2,m.y))},j=v===ye.Right&&!w||v===ye.Left&&!x,M=v===ye.Down&&!_||v===ye.Up&&!b;if(j&&R.x!==m.x){const D=g.scrollLeft+p.x,$=v===ye.Right&&D<=C.x||v===ye.Left&&D>=E.x;if($&&!p.y){g.scrollTo({left:D,behavior:i});return}$?h.x=g.scrollLeft-D:h.x=v===ye.Right?g.scrollLeft-C.x:g.scrollLeft-E.x,h.x&&g.scrollBy({left:-h.x,behavior:i});break}else if(M&&R.y!==m.y){const D=g.scrollTop+p.y,$=v===ye.Down&&D<=C.y||v===ye.Up&&D>=E.y;if($&&!p.x){g.scrollTo({top:D,behavior:i});return}$?h.y=g.scrollTop-D:h.y=v===ye.Down?g.scrollTop-C.y:g.scrollTop-E.y,h.y&&g.scrollBy({top:-h.y,behavior:i});break}}this.handleMove(t,uo(Ni(m,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ly.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ty,onActivation:o}=t,{active:s}=n;const{code:l}=e.nativeEvent;if(r.start.includes(l)){const i=s.activatorNode.current;return i&&e.target!==i?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function wp(e){return!!(e&&"distance"in e)}function xp(e){return!!(e&&"delay"in e)}class df{constructor(t,n,r){var o;r===void 0&&(r=$j(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:l}=s;this.props=t,this.events=n,this.document=Fo(l),this.documentListeners=new hs(this.document),this.listeners=new hs(r),this.windowListeners=new hs(dt(l)),this.initialCoordinates=(o=bu(s))!=null?o:Wt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Et.Resize,this.handleCancel),this.windowListeners.add(Et.DragStart,bp),this.windowListeners.add(Et.VisibilityChange,this.handleCancel),this.windowListeners.add(Et.ContextMenu,bp),this.documentListeners.add(Et.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xp(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(wp(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Et.Click,zj,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Et.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:l,options:{activationConstraint:i}}=s;if(!o)return;const a=(n=bu(t))!=null?n:Wt,d=Ni(o,a);if(!r&&i){if(wp(i)){if(i.tolerance!=null&&Cc(d,i.tolerance))return this.handleCancel();if(Cc(d,i.distance))return this.handleStart()}if(xp(i)&&Cc(d,i.tolerance))return this.handleCancel();this.handlePending(i,d);return}t.cancelable&&t.preventDefault(),l(a)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ye.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Bj={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ff extends df{constructor(t){const{event:n}=t,r=Fo(n.target);super(t,Bj,r)}}ff.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const qj={move:{name:"mousemove"},end:{name:"mouseup"}};var xu;(function(e){e[e.RightClick=2]="RightClick"})(xu||(xu={}));class Wj extends df{constructor(t){super(t,qj,Fo(t.event.target))}}Wj.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===xu.RightClick?!1:(r?.({event:n}),!0)}}];const _c={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gj extends df{constructor(t){super(t,_c)}static setup(){return window.addEventListener(_c.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_c.move.name,t)};function t(){}}}Gj.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var gs;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(gs||(gs={}));var zi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(zi||(zi={}));function Uj(e){let{acceleration:t,activator:n=gs.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:l=5,order:i=zi.TreeOrder,pointerCoordinates:a,scrollableAncestors:d,scrollableAncestorRects:f,delta:m,threshold:p}=e;const h=Vj({delta:m,disabled:!s}),[y,g]=ej(),v=u.useRef({x:0,y:0}),b=u.useRef({x:0,y:0}),w=u.useMemo(()=>{switch(n){case gs.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case gs.DraggableRect:return o}},[n,o,a]),x=u.useRef(null),_=u.useCallback(()=>{const E=x.current;if(!E)return;const k=v.current.x*b.current.x,R=v.current.y*b.current.y;E.scrollBy(k,R)},[]),C=u.useMemo(()=>i===zi.TreeOrder?[...d].reverse():d,[i,d]);u.useEffect(()=>{if(!s||!d.length||!w){g();return}for(const E of C){if(r?.(E)===!1)continue;const k=d.indexOf(E),R=f[k];if(!R)continue;const{direction:j,speed:M}=Aj(E,R,w,t,p);for(const D of["x","y"])h[D][j[D]]||(M[D]=0,j[D]=0);if(M.x>0||M.y>0){g(),x.current=E,y(_,l),v.current=M,b.current=j;return}}v.current={x:0,y:0},b.current={x:0,y:0},g()},[t,_,r,g,s,l,JSON.stringify(w),JSON.stringify(h),y,d,C,f,JSON.stringify(p)])}const Yj={x:{[Ve.Backward]:!1,[Ve.Forward]:!1},y:{[Ve.Backward]:!1,[Ve.Forward]:!1}};function Vj(e){let{delta:t,disabled:n}=e;const r=vu(t);return ul(o=>{if(n||!r||!o)return Yj;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ve.Backward]:o.x[Ve.Backward]||s.x===-1,[Ve.Forward]:o.x[Ve.Forward]||s.x===1},y:{[Ve.Backward]:o.y[Ve.Backward]||s.y===-1,[Ve.Forward]:o.y[Ve.Forward]||s.y===1}}},[n,t,r])}function Hj(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return ul(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function Xj(e,t){return u.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,r)}));return[...n,...s]},[]),[e,t])}var $s;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})($s||($s={}));var Cu;(function(e){e.Optimized="optimized"})(Cu||(Cu={}));const Cp=new Map;function Zj(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,l]=u.useState(null),{frequency:i,measure:a,strategy:d}=o,f=u.useRef(e),m=v(),p=Os(m),h=u.useCallback(function(b){b===void 0&&(b=[]),!p.current&&l(w=>w===null?b:w.concat(b.filter(x=>!w.includes(x))))},[p]),y=u.useRef(null),g=ul(b=>{if(m&&!n)return Cp;if(!b||b===Cp||f.current!==e||s!=null){const w=new Map;for(let x of e){if(!x)continue;if(s&&s.length>0&&!s.includes(x.id)&&x.rect.current){w.set(x.id,x.rect.current);continue}const _=x.node.current,C=_?new uf(a(_),_):null;x.rect.current=C,C&&w.set(x.id,C)}return w}return b},[e,s,n,m,a]);return u.useEffect(()=>{f.current=e},[e]),u.useEffect(()=>{m||h()},[n,m]),u.useEffect(()=>{s&&s.length>0&&l(null)},[JSON.stringify(s)]),u.useEffect(()=>{m||typeof i!="number"||y.current!==null||(y.current=setTimeout(()=>{h(),y.current=null},i))},[i,m,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:s!=null};function v(){switch(d){case $s.Always:return!1;case $s.BeforeDragging:return n;default:return!n}}}function My(e,t){return ul(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Kj(e,t){return My(e,t)}function Qj(e){let{callback:t,disabled:n}=e;const r=lf(t),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function Ia(e){let{callback:t,disabled:n}=e;const r=lf(t),o=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return u.useEffect(()=>()=>o?.disconnect(),[o]),o}function Jj(e){return new uf(Bo(e),e)}function _p(e,t,n){t===void 0&&(t=Jj);const[r,o]=u.useState(null);function s(){o(a=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=a??n)!=null?d:null}const f=t(e);return JSON.stringify(a)===JSON.stringify(f)?a:f})}const l=Qj({callback(a){if(e)for(const d of a){const{type:f,target:m}=d;if(f==="childList"&&m instanceof HTMLElement&&m.contains(e)){s();break}}}}),i=Ia({callback:s});return cn(()=>{s(),e?(i?.observe(e),l?.observe(document.body,{childList:!0,subtree:!0})):(i?.disconnect(),l?.disconnect())},[e]),r}function eT(e){const t=My(e);return Cy(e,t)}const kp=[];function tT(e){const t=u.useRef(e),n=ul(r=>e?r&&r!==kp&&e&&t.current&&e.parentNode===t.current.parentNode?r:cf(e):kp,[e]);return u.useEffect(()=>{t.current=e},[e]),n}function nT(e){const[t,n]=u.useState(null),r=u.useRef(e),o=u.useCallback(s=>{const l=xc(s.target);l&&n(i=>i?(i.set(l,wu(l)),new Map(i)):null)},[]);return u.useEffect(()=>{const s=r.current;if(e!==s){l(s);const i=e.map(a=>{const d=xc(a);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,wu(d)]):null}).filter(a=>a!=null);n(i.length?new Map(i):null),r.current=e}return()=>{l(e),l(s)};function l(i){i.forEach(a=>{const d=xc(a);d?.removeEventListener("scroll",o)})}},[o,e]),u.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,l)=>uo(s,l),Wt):jy(e):Wt,[e,t])}function Sp(e,t){t===void 0&&(t=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},t),u.useEffect(()=>{const r=e!==Wt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ni(e,n.current):Wt}function rT(e){u.useEffect(()=>{if(!Aa)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function oT(e,t){return u.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=l=>{s(l,t)},n},{}),[e,t])}function Ay(e){return u.useMemo(()=>e?jj(e):null,[e])}const Ep=[];function sT(e,t){t===void 0&&(t=Bo);const[n]=e,r=Ay(n?dt(n):null),[o,s]=u.useState(Ep);function l(){s(()=>e.length?e.map(a=>Ey(a)?r:new uf(t(a),a)):Ep)}const i=Ia({callback:l});return cn(()=>{i?.disconnect(),l(),e.forEach(a=>i?.observe(a))},[e]),o}function lT(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return cl(t)?t:e}function iT(e){let{measure:t}=e;const[n,r]=u.useState(null),o=u.useCallback(d=>{for(const{target:f}of d)if(cl(f)){r(m=>{const p=t(f);return m?{...m,width:p.width,height:p.height}:p});break}},[t]),s=Ia({callback:o}),l=u.useCallback(d=>{const f=lT(d);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[i,a]=Oi(l);return u.useMemo(()=>({nodeRef:i,rect:n,setRef:a}),[n,i,a])}const aT=[{sensor:ff,options:{}},{sensor:Ly,options:{}}],cT={current:{}},ii={draggable:{measure:vp},droppable:{measure:vp,strategy:$s.WhileDragging,frequency:Cu.Optimized},dragOverlay:{measure:Bo}};class ys extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const uT={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ys,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$i},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ii,measureDroppableContainers:$i,windowRect:null,measuringScheduled:!1},dT={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:$i,draggableNodes:new Map,over:null,measureDroppableContainers:$i},Pa=u.createContext(dT),Iy=u.createContext(uT);function fT(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ys}}}function mT(e,t){switch(t.type){case We.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case We.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case We.DragEnd:case We.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case We.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new ys(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case We.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const l=new ys(e.droppable.containers);return l.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:l}}}case We.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new ys(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function pT(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=u.useContext(Pa),s=vu(r),l=vu(n?.id);return u.useEffect(()=>{if(!t&&!r&&s&&l!=null){if(!af(s)||document.activeElement===s.target)return;const i=o.get(l);if(!i)return;const{activatorNode:a,node:d}=i;if(!a.current&&!d.current)return;requestAnimationFrame(()=>{for(const f of[a.current,d.current]){if(!f)continue;const m=rj(f);if(m){m.focus();break}}})}},[r,t,o,l,s]),null}function hT(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function gT(e){return u.useMemo(()=>({draggable:{...ii.draggable,...e?.draggable},droppable:{...ii.droppable,...e?.droppable},dragOverlay:{...ii.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function yT(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=u.useRef(!1),{x:l,y:i}=typeof o=="boolean"?{x:o,y:o}:o;cn(()=>{if(!l&&!i||!t){s.current=!1;return}if(s.current||!r)return;const d=t?.node.current;if(!d||d.isConnected===!1)return;const f=n(d),m=Cy(f,r);if(l||(m.x=0),i||(m.y=0),s.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const p=_y(d);p&&p.scrollBy({top:m.y,left:m.x})}},[t,l,i,r,n])}const Py=u.createContext({...Wt,scaleX:1,scaleY:1});var Vn;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Vn||(Vn={}));const vT=u.memo(function(t){var n,r,o,s;let{id:l,accessibility:i,autoScroll:a=!0,children:d,sensors:f=aT,collisionDetection:m=xj,measuring:p,modifiers:h,...y}=t;const g=u.useReducer(mT,void 0,fT),[v,b]=g,[w,x]=cj(),[_,C]=u.useState(Vn.Uninitialized),E=_===Vn.Initialized,{draggable:{active:k,nodes:R,translate:j},droppable:{containers:M}}=v,D=k!=null?R.get(k):null,$=u.useRef({initial:null,translated:null}),X=u.useMemo(()=>{var Je;return k!=null?{id:k,data:(Je=D?.data)!=null?Je:cT,rect:$}:null},[k,D]),A=u.useRef(null),[Z,q]=u.useState(null),[K,H]=u.useState(null),N=Os(y,Object.values(y)),oe=dl("DndDescribedBy",l),Te=u.useMemo(()=>M.getEnabled(),[M]),pe=gT(p),{droppableRects:ve,measureDroppableContainers:we,measuringScheduled:Qe}=Zj(Te,{dragging:E,dependencies:[j.x,j.y],config:pe.droppable}),Ee=Hj(R,k),U=u.useMemo(()=>K?bu(K):null,[K]),le=b5(),ce=Kj(Ee,pe.draggable.measure);yT({activeNode:k!=null?R.get(k):null,config:le.layoutShiftCompensation,initialRect:ce,measure:pe.draggable.measure});const G=_p(Ee,pe.draggable.measure,ce),fe=_p(Ee?Ee.parentElement:null),ie=u.useRef({activatorEvent:null,active:null,activeNode:Ee,collisionRect:null,collisions:null,droppableRects:ve,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=M.getNodeFor((n=ie.current.over)==null?void 0:n.id),Fe=iT({measure:pe.dragOverlay.measure}),Ct=(r=Fe.nodeRef.current)!=null?r:Ee,_t=E?(o=Fe.rect)!=null?o:G:null,On=!!(Fe.nodeRef.current&&Fe.rect),vl=eT(On?null:G),Nn=Ay(Ct?dt(Ct):null),$n=tT(E?ze??Ee:null),bl=sT($n),wl=hT(h,{transform:{x:j.x-vl.x,y:j.y-vl.y,scaleX:1,scaleY:1},activatorEvent:K,active:X,activeNodeRect:G,containerNodeRect:fe,draggingNodeRect:_t,over:ie.current.over,overlayNodeRect:Fe.rect,scrollableAncestors:$n,scrollableAncestorRects:bl,windowRect:Nn}),Lf=U?uo(U,j):null,Mf=nT($n),f5=Sp(Mf),m5=Sp(Mf,[G]),Or=uo(wl,f5),Nr=_t?kj(_t,wl):null,Wo=X&&Nr?m({active:X,collisionRect:Nr,droppableRects:ve,droppableContainers:Te,pointerCoordinates:Lf}):null,Af=vj(Wo,"id"),[zn,If]=u.useState(null),p5=On?wl:uo(wl,m5),h5=Cj(p5,(s=zn?.rect)!=null?s:null,G),za=u.useRef(null),Pf=u.useCallback((Je,ft)=>{let{sensor:mt,options:Fn}=ft;if(A.current==null)return;const kt=R.get(A.current);if(!kt)return;const pt=Je.nativeEvent,Ht=new mt({active:A.current,activeNode:kt,event:pt,options:Fn,context:ie,onAbort(Ze){if(!R.get(Ze))return;const{onDragAbort:Xt}=N.current,gn={id:Ze};Xt?.(gn),w({type:"onDragAbort",event:gn})},onPending(Ze,Bn,Xt,gn){if(!R.get(Ze))return;const{onDragPending:Uo}=N.current,qn={id:Ze,constraint:Bn,initialCoordinates:Xt,offset:gn};Uo?.(qn),w({type:"onDragPending",event:qn})},onStart(Ze){const Bn=A.current;if(Bn==null)return;const Xt=R.get(Bn);if(!Xt)return;const{onDragStart:gn}=N.current,Go={activatorEvent:pt,active:{id:Bn,data:Xt.data,rect:$}};Nt.unstable_batchedUpdates(()=>{gn?.(Go),C(Vn.Initializing),b({type:We.DragStart,initialCoordinates:Ze,active:Bn}),w({type:"onDragStart",event:Go}),q(za.current),H(pt)})},onMove(Ze){b({type:We.DragMove,coordinates:Ze})},onEnd:$r(We.DragEnd),onCancel:$r(We.DragCancel)});za.current=Ht;function $r(Ze){return async function(){const{active:Xt,collisions:gn,over:Go,scrollAdjustedTranslate:Uo}=ie.current;let qn=null;if(Xt&&Uo){const{cancelDrop:Yo}=N.current;qn={activatorEvent:pt,active:Xt,collisions:gn,delta:Uo,over:Go},Ze===We.DragEnd&&typeof Yo=="function"&&await Promise.resolve(Yo(qn))&&(Ze=We.DragCancel)}A.current=null,Nt.unstable_batchedUpdates(()=>{b({type:Ze}),C(Vn.Uninitialized),If(null),q(null),H(null),za.current=null;const Yo=Ze===We.DragEnd?"onDragEnd":"onDragCancel";if(qn){const Fa=N.current[Yo];Fa?.(qn),w({type:Yo,event:qn})}})}}},[R]),g5=u.useCallback((Je,ft)=>(mt,Fn)=>{const kt=mt.nativeEvent,pt=R.get(Fn);if(A.current!==null||!pt||kt.dndKit||kt.defaultPrevented)return;const Ht={active:pt};Je(mt,ft.options,Ht)===!0&&(kt.dndKit={capturedBy:ft.sensor},A.current=Fn,Pf(mt,ft))},[R,Pf]),Df=Xj(f,g5);rT(f),cn(()=>{G&&_===Vn.Initializing&&C(Vn.Initialized)},[G,_]),u.useEffect(()=>{const{onDragMove:Je}=N.current,{active:ft,activatorEvent:mt,collisions:Fn,over:kt}=ie.current;if(!ft||!mt)return;const pt={active:ft,activatorEvent:mt,collisions:Fn,delta:{x:Or.x,y:Or.y},over:kt};Nt.unstable_batchedUpdates(()=>{Je?.(pt),w({type:"onDragMove",event:pt})})},[Or.x,Or.y]),u.useEffect(()=>{const{active:Je,activatorEvent:ft,collisions:mt,droppableContainers:Fn,scrollAdjustedTranslate:kt}=ie.current;if(!Je||A.current==null||!ft||!kt)return;const{onDragOver:pt}=N.current,Ht=Fn.get(Af),$r=Ht&&Ht.rect.current?{id:Ht.id,rect:Ht.rect.current,data:Ht.data,disabled:Ht.disabled}:null,Ze={active:Je,activatorEvent:ft,collisions:mt,delta:{x:kt.x,y:kt.y},over:$r};Nt.unstable_batchedUpdates(()=>{If($r),pt?.(Ze),w({type:"onDragOver",event:Ze})})},[Af]),cn(()=>{ie.current={activatorEvent:K,active:X,activeNode:Ee,collisionRect:Nr,collisions:Wo,droppableRects:ve,draggableNodes:R,draggingNode:Ct,draggingNodeRect:_t,droppableContainers:M,over:zn,scrollableAncestors:$n,scrollAdjustedTranslate:Or},$.current={initial:_t,translated:Nr}},[X,Ee,Wo,Nr,R,Ct,_t,ve,M,zn,$n,Or]),Uj({...le,delta:j,draggingRect:Nr,pointerCoordinates:Lf,scrollableAncestors:$n,scrollableAncestorRects:bl});const y5=u.useMemo(()=>({active:X,activeNode:Ee,activeNodeRect:G,activatorEvent:K,collisions:Wo,containerNodeRect:fe,dragOverlay:Fe,draggableNodes:R,droppableContainers:M,droppableRects:ve,over:zn,measureDroppableContainers:we,scrollableAncestors:$n,scrollableAncestorRects:bl,measuringConfiguration:pe,measuringScheduled:Qe,windowRect:Nn}),[X,Ee,G,K,Wo,fe,Fe,R,M,ve,zn,we,$n,bl,pe,Qe,Nn]),v5=u.useMemo(()=>({activatorEvent:K,activators:Df,active:X,activeNodeRect:G,ariaDescribedById:{draggable:oe},dispatch:b,draggableNodes:R,over:zn,measureDroppableContainers:we}),[K,Df,X,G,b,oe,R,zn,we]);return me.createElement(xy.Provider,{value:x},me.createElement(Pa.Provider,{value:v5},me.createElement(Iy.Provider,{value:y5},me.createElement(Py.Provider,{value:h5},d)),me.createElement(pT,{disabled:i?.restoreFocus===!1})),me.createElement(fj,{...i,hiddenTextDescribedById:oe}));function b5(){const Je=Z?.autoScrollEnabled===!1,ft=typeof a=="object"?a.enabled===!1:a===!1,mt=E&&!Je&&!ft;return typeof a=="object"?{...a,enabled:mt}:{enabled:mt}}}),bT=u.createContext(null),Rp="button",wT="Draggable";function xT(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=dl(wT),{activators:l,activatorEvent:i,active:a,activeNodeRect:d,ariaDescribedById:f,draggableNodes:m,over:p}=u.useContext(Pa),{role:h=Rp,roleDescription:y="draggable",tabIndex:g=0}=o??{},v=a?.id===t,b=u.useContext(v?Py:bT),[w,x]=Oi(),[_,C]=Oi(),E=oT(l,t),k=Os(n);cn(()=>(m.set(t,{id:t,key:s,node:w,activatorNode:_,data:k}),()=>{const j=m.get(t);j&&j.key===s&&m.delete(t)}),[m,t]);const R=u.useMemo(()=>({role:h,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&h===Rp?!0:void 0,"aria-roledescription":y,"aria-describedby":f.draggable}),[r,h,g,v,y,f.draggable]);return{active:a,activatorEvent:i,activeNodeRect:d,attributes:R,isDragging:v,listeners:r?void 0:E,node:w,over:p,setNodeRef:x,setActivatorNodeRef:C,transform:b}}function CT(){return u.useContext(Iy)}const _T="Droppable",kT={timeout:25};function ST(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=dl(_T),{active:l,dispatch:i,over:a,measureDroppableContainers:d}=u.useContext(Pa),f=u.useRef({disabled:n}),m=u.useRef(!1),p=u.useRef(null),h=u.useRef(null),{disabled:y,updateMeasurementsFor:g,timeout:v}={...kT,...o},b=Os(g??r),w=u.useCallback(()=>{if(!m.current){m.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{d(Array.isArray(b.current)?b.current:[b.current]),h.current=null},v)},[v]),x=Ia({callback:w,disabled:y||!l}),_=u.useCallback((R,j)=>{x&&(j&&(x.unobserve(j),m.current=!1),R&&x.observe(R))},[x]),[C,E]=Oi(_),k=Os(t);return u.useEffect(()=>{!x||!C.current||(x.disconnect(),m.current=!1,x.observe(C.current))},[C,x]),u.useEffect(()=>(i({type:We.RegisterDroppable,element:{id:r,key:s,disabled:n,node:C,rect:p,data:k}}),()=>i({type:We.UnregisterDroppable,key:s,id:r})),[r]),u.useEffect(()=>{n!==f.current.disabled&&(i({type:We.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,i]),{active:l,rect:p,isOver:a?.id===r,node:C,over:a,setNodeRef:E}}function mf(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function ET(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function $l(e){return e!==null&&e>=0}function RT(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function jT(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Dy=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=mf(t,r,n),l=t[o],i=s[o];return!i||!l?null:{x:i.left-l.left,y:i.top-l.top,scaleX:i.width/l.width,scaleY:i.height/l.height}},Oy="Sortable",Ny=me.createContext({activeIndex:-1,containerId:Oy,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Dy,disabled:{draggable:!1,droppable:!1}});function TT(e){let{children:t,id:n,items:r,strategy:o=Dy,disabled:s=!1}=e;const{active:l,dragOverlay:i,droppableRects:a,over:d,measureDroppableContainers:f}=CT(),m=dl(Oy,n),p=i.rect!==null,h=u.useMemo(()=>r.map(E=>typeof E=="object"&&"id"in E?E.id:E),[r]),y=l!=null,g=l?h.indexOf(l.id):-1,v=d?h.indexOf(d.id):-1,b=u.useRef(h),w=!RT(h,b.current),x=v!==-1&&g===-1||w,_=jT(s);cn(()=>{w&&y&&f(h)},[w,h,y,f]),u.useEffect(()=>{b.current=h},[h]);const C=u.useMemo(()=>({activeIndex:g,containerId:m,disabled:_,disableTransforms:x,items:h,overIndex:v,useDragOverlay:p,sortedRects:ET(h,a),strategy:o}),[g,m,_.draggable,_.droppable,x,h,v,a,p,o]);return me.createElement(Ny.Provider,{value:C},t)}const LT=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return mf(n,r,o).indexOf(t)},MT=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:l,previousItems:i,previousContainerId:a,transition:d}=e;return!d||!r||i!==s&&o===l?!1:n?!0:l!==o&&t===a},AT={duration:200,easing:"ease"},$y="transform",IT=Ns.Transition.toString({property:$y,duration:0,easing:"linear"}),PT={roleDescription:"sortable"};function DT(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,l]=u.useState(null),i=u.useRef(n);return cn(()=>{if(!t&&n!==i.current&&r.current){const a=o.current;if(a){const d=Bo(r.current,{ignoreTransform:!0}),f={x:a.left-d.left,y:a.top-d.top,scaleX:a.width/d.width,scaleY:a.height/d.height};(f.x||f.y)&&l(f)}}n!==i.current&&(i.current=n)},[t,n,r,o]),u.useEffect(()=>{s&&l(null)},[s]),s}function OT(e){let{animateLayoutChanges:t=MT,attributes:n,disabled:r,data:o,getNewIndex:s=LT,id:l,strategy:i,resizeObserverConfig:a,transition:d=AT}=e;const{items:f,containerId:m,activeIndex:p,disabled:h,disableTransforms:y,sortedRects:g,overIndex:v,useDragOverlay:b,strategy:w}=u.useContext(Ny),x=NT(r,h),_=f.indexOf(l),C=u.useMemo(()=>({sortable:{containerId:m,index:_,items:f},...o}),[m,o,_,f]),E=u.useMemo(()=>f.slice(f.indexOf(l)),[f,l]),{rect:k,node:R,isOver:j,setNodeRef:M}=ST({id:l,data:C,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...a}}),{active:D,activatorEvent:$,activeNodeRect:X,attributes:A,setNodeRef:Z,listeners:q,isDragging:K,over:H,setActivatorNodeRef:N,transform:oe}=xT({id:l,data:C,attributes:{...PT,...n},disabled:x.draggable}),Te=JR(M,Z),pe=!!D,ve=pe&&!y&&$l(p)&&$l(v),we=!b&&K,Qe=we&&ve?oe:null,U=ve?Qe??(i??w)({rects:g,activeNodeRect:X,activeIndex:p,overIndex:v,index:_}):null,le=$l(p)&&$l(v)?s({id:l,items:f,activeIndex:p,overIndex:v}):_,ce=D?.id,G=u.useRef({activeId:ce,items:f,newIndex:le,containerId:m}),fe=f!==G.current.items,ie=t({active:D,containerId:m,isDragging:K,isSorting:pe,id:l,index:_,items:f,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:d,wasDragging:G.current.activeId!=null}),ze=DT({disabled:!ie,index:_,node:R,rect:k});return u.useEffect(()=>{pe&&G.current.newIndex!==le&&(G.current.newIndex=le),m!==G.current.containerId&&(G.current.containerId=m),f!==G.current.items&&(G.current.items=f)},[pe,le,m,f]),u.useEffect(()=>{if(ce===G.current.activeId)return;if(ce!=null&&G.current.activeId==null){G.current.activeId=ce;return}const Ct=setTimeout(()=>{G.current.activeId=ce},50);return()=>clearTimeout(Ct)},[ce]),{active:D,activeIndex:p,attributes:A,data:C,rect:k,index:_,newIndex:le,items:f,isOver:j,isSorting:pe,isDragging:K,listeners:q,node:R,overIndex:v,over:H,setNodeRef:Te,setActivatorNodeRef:N,setDroppableNodeRef:M,setDraggableNodeRef:Z,transform:ze??U,transition:Fe()};function Fe(){if(ze||fe&&G.current.newIndex===_)return IT;if(!(we&&!af($)||!d)&&(pe||ie))return Ns.Transition.toString({...d,property:$y})}}function NT(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}ye.Down,ye.Right,ye.Up,ye.Left;function fl({onClick:e}){return c.jsx(be,{icon:"clear",variant:"flat",size:"compact",tooltip:"Remove",onClick:e})}const Rn={main:{display:"mly78zum5",alignItems:"mly6s0dn4",justifyContent:"mly1nhvcw1",gap:"mly1jnr06f",rowGap:null,columnGap:null,cursor:"mly1ypdohk","--mlyvpnzvp":"mly11ogjb6 mly157rht3",$$css:!0},hoverActions:{display:"mly2b4tyj",flexShrink:"mly2lah0s",$$css:!0},hoverOpen:{display:"mly3nfvp2",$$css:!0}},ct={content:{background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,boxShadow:"mly1towwp7",fontFamily:"mly6icuqf",margin:"mlykib98w",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,maxHeight:"mly3d5gib",display:"mly78zum5",flexDirection:"mlydt5ytf",$$css:!0},item:{alignItems:"mly6s0dn4",color:"mly1ue28sr mly14kfzap",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mlyt0e3qv",userSelect:"mly87ps6o",display:"mly78zum5",justifyContent:"mly1qughib",borderRadius:"mly18zih8k",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},clickable:{backgroundColor:"mly1vtmp6m",$$css:!0},label:{display:"mly78zum5",alignItems:"mly6s0dn4",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},tooltip:{$$css:!0}},jp='#" ',zy=e=>{const t=e.filter(n=>n.value.startsWith(jp)).map(n=>n.value.slice(jp.length).trim());if(t.length)return t.join(`
|
|
207
|
+
`)},$T="#NO_UI",pf=e=>!!e.find(n=>n.value.startsWith($T));function Tp(e){return e.kind==="join"?3:e.kind==="view"?2:e.kind==="dimension"?1:0}function zT(e){return e.sort((t,n)=>{const r=Tp(t),o=Tp(n);return r===o?t.name.localeCompare(n.name):o-r})}const Lp=["fieldName","fieldPath","fieldValue","fieldType","fieldRange","weight"];function Fy(e){return new Set([...Lp,...e.schema.fields.map(n=>n.name)]).size===Lp.length}function By(e){return e instanceof Y.ASTArrowQueryDefinition?e.view:e.definition}function Dr(e){return e?By(e).getInputSchema():{fields:[]}}function ir(e){return!pf(e.annotations??[])}function hf(e,t,n=[]){if(!e.find(o=>o.name===t))return t;if(n.length){const o=[...n];for(;o.length;)if(t=`${o.pop()} ${t}`,!e.find(l=>l.name===t))return t}let r=2;for(;e.find(o=>o.name===`${t} ${r}`);)r++;return`${t} ${r}`}function FT({field:e}){if(e.kind==="view")return c.jsx(Hn,{label:"view",icon:"view_filled",color:"purple",customStyle:zl.noBackground});if(e.kind==="dimension")return c.jsx(Hn,{label:"dimension",icon:li(e),color:"cyan",customStyle:zl.noBackground});if(e.kind==="measure")return c.jsx(Hn,{label:"measure",icon:li(e),color:"green",customStyle:zl.noBackground});if(e.kind==="join")return c.jsx(Hn,{label:"join",icon:li(e),color:"gray",customStyle:zl.noBackground})}const zl={noBackground:{backgroundColor:"mlyjbqb8w",$$css:!0}};var gf="Dialog",[qy]=Gt(gf),[BT,Vt]=qy(gf),Wy=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,i=u.useRef(null),a=u.useRef(null),[d=!1,f]=lr({prop:r,defaultProp:o,onChange:s});return c.jsx(BT,{scope:t,triggerRef:i,contentRef:a,contentId:Lt(),titleId:Lt(),descriptionId:Lt(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(m=>!m),[f]),modal:l,children:n})};Wy.displayName=gf;var Gy="DialogTrigger",qT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vt(Gy,n),s=se(t,o.triggerRef);return c.jsx(Q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bf(o.open),...r,ref:s,onClick:z(e.onClick,o.onOpenToggle)})});qT.displayName=Gy;var yf="DialogPortal",[WT,Uy]=qy(yf,{forceMount:void 0}),Yy=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Vt(yf,t);return c.jsx(WT,{scope:t,forceMount:n,children:u.Children.map(r,l=>c.jsx(Ke,{present:n||s.open,children:c.jsx(_o,{asChild:!0,container:o,children:l})}))})};Yy.displayName=yf;var Fi="DialogOverlay",Vy=u.forwardRef((e,t)=>{const n=Uy(Fi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Vt(Fi,e.__scopeDialog);return s.modal?c.jsx(Ke,{present:r||s.open,children:c.jsx(GT,{...o,ref:t})}):null});Vy.displayName=Fi;var GT=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vt(Fi,n);return c.jsx(Zs,{as:nr,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(Q.div,{"data-state":bf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Er="DialogContent",Hy=u.forwardRef((e,t)=>{const n=Uy(Er,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Vt(Er,e.__scopeDialog);return c.jsx(Ke,{present:r||s.open,children:s.modal?c.jsx(UT,{...o,ref:t}):c.jsx(YT,{...o,ref:t})})});Hy.displayName=Er;var UT=u.forwardRef((e,t)=>{const n=Vt(Er,e.__scopeDialog),r=u.useRef(null),o=se(t,n.contentRef,r);return u.useEffect(()=>{const s=r.current;if(s)return na(s)},[]),c.jsx(Xy,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&s.preventDefault()}),onFocusOutside:z(e.onFocusOutside,s=>s.preventDefault())})}),YT=u.forwardRef((e,t)=>{const n=Vt(Er,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return c.jsx(Xy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var l,i;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;((i=n.triggerRef.current)==null?void 0:i.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Xy=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...l}=e,i=Vt(Er,n),a=u.useRef(null),d=se(t,a);return ta(),c.jsxs(c.Fragment,{children:[c.jsx(Xs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(wo,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":bf(i.open),...l,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(VT,{titleId:i.titleId}),c.jsx(XT,{contentRef:a,descriptionId:i.descriptionId})]})]})}),vf="DialogTitle",Zy=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vt(vf,n);return c.jsx(Q.h2,{id:o.titleId,...r,ref:t})});Zy.displayName=vf;var Ky="DialogDescription",Qy=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vt(Ky,n);return c.jsx(Q.p,{id:o.descriptionId,...r,ref:t})});Qy.displayName=Ky;var Jy="DialogClose",ev=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Vt(Jy,n);return c.jsx(Q.button,{type:"button",...r,ref:t,onClick:z(e.onClick,()=>o.onOpenChange(!1))})});ev.displayName=Jy;function bf(e){return e?"open":"closed"}var tv="DialogTitleWarning",[PP,nv]=D5(tv,{contentName:Er,titleName:vf,docsSlug:"dialog"}),VT=({titleId:e})=>{const t=nv(tv),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
208
|
+
|
|
209
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
210
|
+
|
|
211
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},HT="DialogDescriptionWarning",XT=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nv(HT).contentName}}.`;return u.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rv=Wy,ov=Yy,sv=Vy,lv=Hy,iv=Zy,av=Qy,ZT=ev;const ue={left:{display:"mly78zum5",justifyContent:"mly1lvf691",$$css:!0},right:{display:"mly78zum5",justifyContent:"mly1rfj78v",$$css:!0},nest:{gridColumn:"mly623te4",gridColumnStart:null,gridColumnEnd:null,$$css:!0},heading:{gridColumn:"mly623te4",gridColumnStart:null,gridColumnEnd:null,fontWeight:"mly117nqv4",$$css:!0},label:{whiteSpace:"mlyuxw1ft",$$css:!0},divider:{gridColumn:"mly1a80n4u",gridColumnStart:null,gridColumnEnd:null,borderTop:"mlye536se",borderTopWidth:null,borderTopStyle:null,borderTopColor:null,$$css:!0},editor:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,overflow:"mlyb3r6kr",overflowX:null,overflowY:null,$$css:!0},editorGrid:{display:"mlyrvj5dj",gridTemplateColumns:"mly16kridx",gridAutoRows:"mlysd5ean",gap:"mly167g77z",rowGap:null,columnGap:null,overflowY:"mly1odjw0f",$$css:!0},editorRow:{display:"mly78zum5",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly27xtdb",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mlyizdh9v",padding:"mly34lxi1",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},card:{maxWidth:"mly1dc814f",$$css:!0},infoTrigger:{display:"mly3nfvp2",alignItems:"mly1071x5a",justifyContent:"mlyl56j7k",paddingRight:"mlyy13l1i",paddingInlineStart:null,paddingInlineEnd:null,paddingTop:"mly1iorvi4",$$css:!0}};function wf({children:e,customStyle:t}){const{theme:n}=u.useContext(Me);return c.jsx("div",{...S.props(KT.container,F.body,t,n),children:e})}const KT={container:{boxShadow:"mly1towwp7",backgroundColor:"mly1yduej5",borderRadius:"mly4pepcl",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlyc7ga6q",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0}};function ar({info:e}){return c.jsxs(jo,{children:[c.jsx(To,{asChild:!0,children:c.jsx("div",{...S.props(ue.infoTrigger,F.body),children:c.jsx(ne,{name:"info",color:"disabled"})})}),c.jsx(Lo,{children:c.jsx(Mo,{side:"right",align:"start",children:c.jsx(wf,{customStyle:ue.card,children:e})})})]})}function cv(e,t){u.useEffect(()=>{const n=Array.isArray(e)?e:[e];let r=!1;const o=(a,d)=>!a.current||d.target instanceof Element&&a.current.contains(d.target),s=a=>n.some(d=>o(d,a)),l=a=>{!r||s(a)||(t(a),r=!1)},i=a=>{s(a)||(r=!0)};return document.addEventListener("mouseup",l),document.addEventListener("mousedown",i),()=>{document.removeEventListener("mouseup",l),document.removeEventListener("mousedown",i)}},[e,t])}const ml=({values:e,setValues:t,autoFocus:n,placeholder:r,type:o="text",value:s,setValue:l,focusElement:i,color:a=Ao,customStyle:d})=>{const[f,m]=u.useState(""),[p,h]=u.useState(!1),y=u.useRef(null),g=u.useRef(null),[v,b]=u.useState(void 0),w=u.useRef([]),x=s||f,_=l||m,C=u.useCallback(j=>{var M;const D=[...e];D.splice(j,1),t(D),v===0?e.length===1?(b(void 0),(M=y.current)==null||M.focus()):b(0):b(j-1)},[v,t,e]),E=u.useMemo(()=>(w.current=new Array(e.length),e.map((j,M)=>c.jsx(QT,{color:a,onClick:()=>{b(M)},onDelete:()=>C(M),forwardRef:D=>{w.current[M]=D},children:j},j))),[a,C,e]);u.useEffect(()=>{var j;v!==void 0&&((j=w.current[v])==null||j.focus())},[E,v]);const k=j=>{var M,D;j.key==="Backspace"?v!==void 0&&C(v):j.key==="ArrowRight"?v===e.length-1?(b(void 0),(M=y.current)==null||M.focus()):v!==void 0&&b(v+1):j.key==="ArrowLeft"?v!==void 0&&v>0&&b(v-1):(D=y.current)==null||D.focus()},R=()=>{x.length>0&&!e.includes(x)&&(t([...e,x]),_(""))};return cv(i?[g,i]:g,()=>{h(!1),R()}),c.jsx("div",{...S.props(F.body,_u.main),children:c.jsxs("div",{...S.props(_u.content,d),onKeyUp:k,onClick:()=>{var j;return(j=y.current)==null?void 0:j.focus()},ref:g,children:[E,c.jsx("input",{className:"mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mly1ue28sr mly1yduej5 mly1onzeue mly195ery5 mly1iyjqo2",ref:y,type:o,placeholder:e.length===0?r:"",value:x,size:1,onChange:j=>{_(j.target.value)},onKeyDown:j=>{j.key==="Enter"&&x!==""&&(R(),j.stopPropagation(),j.preventDefault())},onKeyUp:j=>{var M,D,$,X;j.key==="Backspace"?x===""&&e.length>0&&(R(),(M=y.current)==null||M.blur(),b(e.length-1)):j.key==="ArrowLeft"&&(((D=y.current)==null?void 0:D.selectionStart)===0||(($=y.current)==null?void 0:$.selectionStart)===null)&&(R(),(X=y.current)==null||X.blur(),b(e.length-1),j.preventDefault(),j.stopPropagation())},onFocus:()=>{h(!0),b(void 0)},autoFocus:n})]})})},QT=({children:e,color:t=Ao,forwardRef:n,onClick:r,onDelete:o})=>c.jsxs("div",{onClick:r,tabIndex:0,ref:n,...S.props(_u.pill,JT[t]),children:[e,c.jsx("div",{title:"Remove",className:"mly3nfvp2",children:c.jsx(Ah,{onClick:()=>o(),className:"mly6jxa94 mly1v9usgg"})})]}),_u={main:{borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"mlyhu5y25",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlybsehbd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,display:"mlyrvj5dj",minHeight:"mly2lwn1j",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0},content:{outline:"mly1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,display:"mly78zum5",flexWrap:"mly1a02dak",gap:"mly1ed6fcf",rowGap:null,columnGap:null,borderColor:"mly1akygb0 mlyetl2wx",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,$$css:!0},pill:{backgroundColor:"mlyzh2ni8",borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,color:"mly1xre2ib",display:"mly78zum5",alignItems:"mly6s0dn4",gap:"mly1nejdyq",rowGap:null,columnGap:null,padding:"mly1e41zw8",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,textTransform:"mly6mezaz",cursor:"mly1ypdohk",height:"mly1qx5ct2",whiteSpace:"mlyuxw1ft",$$css:!0}},JT={default:{"--mlyvygx4q":"mly1izbou4","--mly13n7235":"mly8bgh0r",$$css:!0},purple:{"--mlyvygx4q":"mly1f8soc4","--mly13n7235":"mly1r5zvhd",$$css:!0},green:{"--mlyvygx4q":"mlyf8wvcd","--mly13n7235":"mly1u6t2w6",$$css:!0},cyan:{"--mlyvygx4q":"mlyrtwgpv","--mly13n7235":"mlys5r2en",$$css:!0}};function uv(e,t,n){const r={...e};let o=r;for(let s=0;s<t.length-1;s++)typeof o[t[s]]!="object"&&(o[t[s]]={}),o=o[t[s]];return o[t[t.length-1]]=n,r}function eL({view:e,name:t,path:n,current:r,option:o,updateCurrent:s}){return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.label,ue.left),children:c.jsxs("label",{children:[o.title??t,":"]})}),c.jsx("div",{}),o.description?c.jsx(ar,{info:o.description}):c.jsx("div",{}),o.oneOf.map((l,i)=>{switch(l.type){case"string":return c.jsx(tL,{view:e,name:t,path:n,updateCurrent:s,current:r,option:l},i);case"number":return c.jsx(nL,{view:e,name:t,path:n,updateCurrent:s,current:r,option:l},i);case"array":return c.jsx(rL,{view:e,name:t,path:n,updateCurrent:s,current:r,option:l},i);case"object":return c.jsx(oL,{view:e,name:t,path:n,updateCurrent:s,current:r,option:l},i)}return null})]})}function tL({path:e,current:t,updateCurrent:n,option:r}){const o=typeof t=="string",[s,l]=u.useState(o?t:"");return r.enum?c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsx("input",{type:"radio",checked:o&&r.enum.includes(t),onChange:({target:{checked:i}})=>{i&&n(e,s)}})}),r.enum.length>1?c.jsx(pn,{value:s,options:r.enum.map(i=>({label:i,value:i})),onChange:i=>{l(i),n(e,i)}}):c.jsx("div",{children:r.enum[0]}),c.jsx("div",{})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsx("input",{type:"radio",checked:o,onChange:({target:{checked:i}})=>{i&&n(e,s)}})}),c.jsx("input",{value:s,onChange:({target:{value:i}})=>{l(i),n(e,i)}}),c.jsx("div",{})]})}function nL({path:e,current:t,updateCurrent:n,option:r}){const o=typeof t=="number",[s,l]=u.useState(o?t:r.minimum??0);return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsx("input",{type:"radio",checked:o,onChange:({target:{checked:i}})=>{i&&n(e,s)}})}),c.jsx("input",{type:"number",min:r.minimum,max:r.maximum,value:s,onChange:({target:{valueAsNumber:i}})=>{l(i),n(e,i)},...S.props(ue.input)}),c.jsx("div",{})]})}function rL({path:e,current:t,updateCurrent:n}){const r=Array.isArray(t),[o,s]=u.useState(r?t:[]);return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsx("input",{type:"radio",checked:r,onChange:({target:{checked:l}})=>{l&&n(e,o)}})}),c.jsx(ml,{values:o,setValues:l=>{s(l),n(e,l)}}),c.jsx("div",{})]})}function oL({path:e,current:t,option:n,updateCurrent:r,view:o}){const s=t!=null&&typeof t=="object"&&!Array.isArray(t),[l,i]=u.useState(s?t:{});return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsx("input",{type:"radio",checked:s,onChange:({target:{checked:a}})=>{a&&r(e,l)}})}),c.jsx("div",{...S.props(ue.nest,ue.editorGrid),children:c.jsx(xf,{current:l,updateCurrent:(a,d)=>{const[f,...m]=a;i(uv(l,m,d)),r(a,d)},view:o,name:"",path:e,option:n})})]})}function sL({name:e,path:t,current:n,option:r,updateCurrent:o}){return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left,ue.label),children:c.jsxs("label",{children:[r.title??e,":"]})}),c.jsx(ml,{values:n,setValues:s=>{o(t,s)}}),r.description?c.jsx(ar,{info:r.description}):c.jsx("div",{})]})}function lL({name:e,path:t,current:n,option:r,updateCurrent:o}){const[s,l]=u.useState(n??r.minimum);return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left,ue.label),children:c.jsxs("label",{children:[r.title??e,":"]})}),c.jsx("input",{value:s,type:"number",min:r.minimum,max:r.maximum,onChange:({target:{valueAsNumber:i}})=>{l(i),o(t,i)},...S.props(ue.input)},e),r.description?c.jsx(ar,{info:r.description}):c.jsx("div",{})]})}function iL({name:e,path:t,current:n,option:r,updateCurrent:o}){return r.enum?c.jsxs(c.Fragment,{children:[u.createElement("div",{...S.props(ue.left,ue.label),key:`${e}-label`},c.jsxs("label",{children:[r.title??e,":"]})),c.jsx(pn,{value:n,options:r.enum.map(s=>({label:s,value:s})),onChange:s=>{o(t,s)}},e),r.description?c.jsx(ar,{info:r.description}):c.jsx("div",{})]}):c.jsxs(c.Fragment,{children:[u.createElement("div",{...S.props(ue.left,ue.label),key:`${e}-label`},c.jsxs("label",{children:[r.title??e,":"]})),c.jsx("input",{value:n,onChange:({target:{value:s}})=>{o(t,s)}},e),r.description?c.jsx(ar,{info:r.description}):c.jsx("div",{})]})}function aL({name:e,path:t,current:n,option:r,updateCurrent:o}){return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left),children:c.jsxs("label",{...S.props(ue.label),htmlFor:`${e}-checkbox`,children:[r.title??e,":"]},`${e}-label`)}),c.jsx("div",{...S.props(ue.right),children:c.jsx("input",{type:"checkbox",checked:n,onChange:({target:{checked:s}})=>{o(t,s)},id:`${e}-checkbox`})}),r.description?c.jsx(ar,{info:r.description}):c.jsx("div",{})]})}function cL({view:e,name:t,path:n,current:r,option:o,updateCurrent:s}){const[l,i]=u.useState(""),a=u.useRef(null),f=(r??[]).map(g=>{try{return JSON.parse(g)[0]}catch(v){return console.warn("Failed to parse field",g,v),""}}),m=(g,v)=>{const b=v.map(w=>JSON.stringify([w]));s(g,b)},p=l.toLocaleLowerCase(),y=e.definition.getOutputSchema().fields.filter(g=>g.name.toLocaleLowerCase().includes(p)).filter(g=>!f.includes(g.name)).filter(g=>{var v;return!("fieldTypes"in o.items)||((v=o.items.fieldTypes)==null?void 0:v.includes(g.type.kind))});return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(ue.left,ue.label),children:c.jsxs("label",{children:[o.title??t,":"]})}),c.jsxs("div",{style:{minHeight:0,display:"grid",gap:4},children:[c.jsx(ml,{values:f,setValues:g=>{m(n,g)},value:l,setValue:i,focusElement:a}),c.jsx(uL,{ref:a,fields:y,search:l,onClick:g=>{m(n,[...f,g])}})]}),o.description?c.jsx(ar,{info:o.description}):c.jsx("div",{})]})}function uL({ref:e,fields:t,search:n,onClick:r}){if(t.length)return c.jsx("div",{ref:e,className:"mly78zum5 mly1a02dak mly1jnr06f",children:t.map(o=>c.jsx(An,{field:o,onClick:()=>r(o.name),tooltip:c.jsx(Rr,{field:o,path:[]}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}},o.name))});if(n)return c.jsx("div",{"data-disabled":"true",children:"No matching fields"})}function xf({view:e,name:t,path:n,current:r,option:o,updateCurrent:s}){const[l,i]=u.useState(n.length===0||!t);return c.jsxs(c.Fragment,{children:[t?c.jsxs(c.Fragment,{children:[c.jsxs("div",{...S.props(ue.label,ue.heading),onClick:()=>i(!l),children:[c.jsx("label",{children:o.title??t}),o.description?c.jsx(ar,{info:o.description}):null]}),c.jsx(be,{variant:"flat",size:"compact",onClick:()=>i(!l),icon:l?"chevronDown":"chevronRight",tooltip:l?"Collapse":"Expand"})]}):null,l?Object.entries(o.properties).map(([a,d])=>{const f=[...n,t,a].join(".");if(d.type==="boolean")return c.jsx(aL,{view:e,name:a,path:[...n,a],option:d,current:r[a],updateCurrent:s},f);if(d.type==="string")return c.jsx(iL,{view:e,name:a,path:[...n,a],option:d,current:r[a],updateCurrent:s},f);if(d.type==="number")return c.jsx(lL,{view:e,name:a,path:[...n,a],option:d,current:r[a],updateCurrent:s},f);if(d.type==="object")return c.jsx(xf,{view:e,name:a,path:[...n,a],option:d,current:r[a]??{},updateCurrent:s},f);if(d.type==="array"){if(d.items.type==="string")return"subtype"in d.items&&d.items.subtype==="field"?c.jsx(cL,{view:e,name:a,path:[...n,a],option:d,current:r[a]??[],updateCurrent:s},f):c.jsx(sL,{view:e,name:a,path:[...n,a],option:d,current:r[a]??[],updateCurrent:s},f);console.warn("Unsupported array type",d.items.type)}else if(d.type==="oneOf")return c.jsx(eL,{view:e,name:a,path:[...n,a],option:d,current:r[a],updateCurrent:s},f);return null}):null,c.jsx("div",{...S.props(ue.divider)})]})}function dL({view:e,plugin:t,setOpen:n}){const{theme:r}=u.useContext(Me),o=De(),[s,l]=u.useState(t.getSettings()),i=t.getSchema(),a=(d,f)=>{const m=uv(s,d,f);l(m)};return u.useEffect(()=>{console.info("RendererEditor current settings:",s)},[s]),c.jsxs("div",{...S.props(ue.editor,r),children:[c.jsx("div",{...S.props(ue.editorGrid),children:c.jsx(xf,{view:e,name:"",path:[],option:i,current:s,updateCurrent:a})}),c.jsxs("div",{...S.props(ue.editorRow),children:[c.jsx(be,{label:"Cancel",onClick:()=>{n(!1)},customStyle:ue.editorCell}),c.jsx(be,{variant:"primary",label:"Apply",onClick:()=>{const f=t.settingsToTag(s).toString(),m=e.getOrAddAnnotations(),p=m.items.find(h=>h.value.startsWith(yu+"viz"));p&&m.remove(p),e.getOrAddAnnotations().add(new Y.ASTAnnotation({value:f})),o(),n(!1)},customStyle:ue.editorCell})]})]})}const tt={displayNone:{display:"mly1s85apg",$$css:!0},overlay:{background:"mly5uxqc1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,position:"mlyixxii4",top:"mly13vifvy",left:"mlyu96u03",right:"mly3m8u43",insetInlineStart:null,insetInlineEnd:null,bottom:"mly1ey2m1c",display:"mlyrvj5dj",placeItems:"mly1ku5rj1",alignItems:null,justifyItems:null,zIndex:"mly11uqc5h",$$css:!0},title:{fontSize:"mly1j61zf2",margin:"mly1ghz6dp",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,display:"mly78zum5",justifyContent:"mly1qughib",alignItems:"mly6s0dn4",borderBottomWidth:"mlyso031l",borderBottomStyle:"mly1q0q8m5",borderBottomColor:"mlybmeysy",lineHeight:"mly1rl49lg",$$css:!0},close:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,background:"mly1md70p1 mly1b1kpiu mlybc727s",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},content:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly1towwp7",backgroundColor:"mly1yduej5",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlylm99nl",maxWidth:"mly1jkqq1h",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editor:{width:"mlyqyf9gi",display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorRow:{display:"mly78zum5",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{borderWidth:"mlymkeg23",borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:"mly1y0btm7",borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:"mly17v018m",borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mly1ue28sr",backgroundColor:"mly13z5u0c",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};function fL({plugin:e,view:t,customStyle:n,open:r,setOpen:o}){const{theme:s}=u.useContext(Me);return!e||!r?null:c.jsx(rv,{onOpenChange:l=>o(l),open:r,children:c.jsx(ov,{children:c.jsx(sv,{...S.props(tt.overlay,s),children:c.jsxs(lv,{...S.props(F.body,tt.content,mL.content,n),children:[c.jsxs(iv,{...S.props(tt.title),children:["Visualization Settings",c.jsx(ZT,{...S.props(tt.close),children:c.jsx(ne,{name:"clear"})})]}),c.jsx(av,{...S.props(tt.displayNone),children:"Edit visualization parameters"}),c.jsx(dL,{view:t,plugin:e,setOpen:o})]})})})})}const mL={content:{maxWidth:"mly14zcgw3",width:"mly14rvwrp",maxHeight:"mly1l4ul0t",$$css:!0}};function dv({view:e}){const t=De(),n=u.useMemo(()=>new Xp,[]),[r,o]=u.useState("table"),[s,l]=u.useState(),[i,a]=u.useState(""),[d,f]=u.useState(!1),m=e.getTag().toString();u.useEffect(()=>{var g;a("");const v=n.createViz({onError:C=>{console.error("Malloy render error",C),a(C.message)}});v.setResult({schema:e.definition.getOutputSchema(),annotations:m.split(`
|
|
212
|
+
`).map(C=>({value:C})),connection_name:""});const b=v.getMetadata();if(b){const C=v.getActivePlugin(b.getRootField().key);if(C){if(k5(C)){o(C.name),l(C);return}C.name==="error"&&a(C.getMetadata().message)}}const w=e.getTag(),_=((g=e.getTag(yu).tag("viz"))==null?void 0:g.text())??YR(rf(w)??"table");o(_),l(void 0)},[n,e,m]);const p=g=>{e.setTagProperty(["viz"],g,yu),t()},h=qR.map(g=>({icon:c.jsx(ne,{name:`viz_${g}`}),label:fv(g),value:g,onClick:()=>p(g)})),y=[c.jsx(ks,{customStyle:Fl.first,icon:`viz_${r}`,value:r,items:h,onChange:g=>p(g)},"first")];return s&&y.push(c.jsx(Ne,{icon:"gear",onClick:()=>f(!0),customStyle:Fl.trigger,tooltip:"Edit Settings..."},"gear")),i&&y.push(c.jsx(Ne,{icon:"warning",tooltip:i,customStyle:Fl.trigger})),c.jsxs(c.Fragment,{children:[c.jsx(Hs,{customStyle:Fl.group,children:y}),c.jsx(fL,{open:d,setOpen:f,plugin:s,view:e})]})}const Fl={trigger:{height:"mly1ktj5wk",$$css:!0},group:{width:"mlyh8yej3",gridTemplateColumns:"mly52fmzj",$$css:!0},first:{justifyContent:"mlylqzeqv",$$css:!0}};function fv(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function pL({annotations:e}){const{tag:t}=_5.parseTag(e.map(r=>r.value)),n=rf(t)??"table";return c.jsx(Ne,{label:fv(n),icon:`viz_${n}`})}function Cf({viewInfo:e,isCompact:t,style:n}){const r=e.schema.fields.filter(o=>o.kind==="dimension");return c.jsx("div",{...S.props(ku.attributeTableContainer,n),children:c.jsx("table",{className:"mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d",children:c.jsxs("tbody",{children:[c.jsx(Mp,{attribute:"chart type",children:c.jsx("div",{className:"mly1rg5ohu",children:c.jsx(pL,{annotations:e.annotations||[]})})}),c.jsx(Mp,{attribute:"output",children:r.map(o=>c.jsx("span",{children:c.jsx(An,{field:o,size:t?"compact":"default"})},`${o.kind}::${o.name}`))})]})})})}function Mp({attribute:e,children:t}){return c.jsxs("tr",{className:"mlydpxx8g",children:[c.jsx("td",{...S.props(ku.attributeTableKeyCell,F.supporting),children:c.jsx("div",{...S.props(ku.attributeTableKeyCellContent,F.supporting),children:e})}),c.jsx("td",{className:"mly78zum5 mly1a02dak mly195vfkc",children:t})]})}const ku={attributeTableContainer:{padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,borderRadius:"mly1q4ynmn",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mly13z5u0c",boxSizing:"mly9f619",width:"mlyh8yej3",height:"mly1m3v4wt",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0},attributeTableKeyCell:{whiteSpace:"mlyuxw1ft",width:"mly1f1nlb9",verticalAlign:"mly16dsc37",$$css:!0},attributeTableKeyCellContent:{height:"mly1fgtraw",display:"mly78zum5",alignItems:"mly6s0dn4",$$css:!0}};function hL({field:e,path:t}){const n=Th(),r=[...t,e.name].join("."),o=n?.find(s=>s.fieldName===r);return o?c.jsxs("div",{className:"mly13z5u0c mly1iorvi4 mlyjkvuk6 mly163pfp mlyy13l1i mly12oqio5",children:[c.jsx("div",{className:"mly117nqv4",children:"Top Values"}),o.values.slice(0,6).map(s=>c.jsxs("div",{className:"mly78zum5 mly1qughib mly883omv mly6s0dn4",children:[c.jsx("div",{children:c.jsx("div",{className:"mlylyipyv mly6mezaz mlyb3r6kr mlyuxw1ft",children:s.fieldValue===null?c.jsx("span",{children:"∅"}):s.fieldValue})}),c.jsx("div",{className:"mly78zum5 mly883omv mly13a6bvl mly6s0dn4 mlyb3r6kr mly2lah0s mly9dwj6z",children:gL(s.weight)})]},s.fieldValue))]}):null}function gL(e){return e===null?"∅":e<1e3?e.toLocaleString():e<1e4?(e/1e3).toFixed(1)+"K":e<1e6?Math.floor(e/1e3).toLocaleString()+"K":e<1e7?(e/1e6).toFixed(1)+"M":Math.floor(e/1e3).toLocaleString()+"M"}function Ap({children:e,ref:t,customStyle:n,isTooltipContent:r=!1,...o}){const s=e.split(/((?:http|https):\/\/\S*)\b/),l=s.length>1,i=s.map((a,d)=>a.match(/^(http|https):/)?c.jsx("a",{href:a,style:r?{color:Lh.link}:{},children:a},d):a);return c.jsx("div",{ref:t,...S.props(l&&Ip.preWrap,l&&Ip.breakWord,n),...o,children:i})}const Ip={preWrap:{whiteSpace:"mly126k92a",$$css:!0},breakWord:{wordWrap:"mly1vvkbs",$$css:!0}};function mv({text:e,containerRef:t,align:n="center",side:r="top"}){const o=u.useRef(null),[s,l]=u.useState(!1),[i,a]=u.useState(!1),d=()=>(o.current&&o.current.scrollHeight>o.current.clientHeight)??!1;return c.jsxs(jo,{open:(s||i)&&d(),children:[c.jsx(To,{asChild:!0,children:c.jsx(Ap,{ref:o,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onPointerMove:f=>f.preventDefault(),customStyle:[F.supporting,yL.text],children:e})}),c.jsx(Lo,{container:t?.current,children:c.jsx(Mo,{side:r,align:n,children:c.jsx(Ap,{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),isTooltipContent:!0,customStyle:[F.body,Ln.default],children:e})})})]})}const yL={text:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,display:"mly104kibb","-webkit-line-clamp":"mly1gzmk7r","-webkit-box-orient":"mly1ua5tub",$$css:!0}};function Rr({field:e,path:t}){const{source:n}=u.useContext(Ut),r=u.useRef(null),o=[n.name??"",...t].join(" > "),l=zy(e.annotations??[])??"";let i=null;return e.kind==="view"?i=c.jsx(Cf,{viewInfo:e,isCompact:!0,style:Bl.viewAttributeTable}):e.kind==="dimension"&&(i=c.jsx(hL,{field:e,path:t})),c.jsxs(wf,{customStyle:Bl.container,children:[c.jsxs("div",{ref:r,children:[c.jsx("div",{className:"mly12nagc",children:c.jsx(FT,{field:e})}),c.jsx("div",{...S.props(F.supporting,Bl.path),children:o}),c.jsx("div",{...S.props(F.emphasized,Bl.title),children:e.name}),l&&c.jsx(mv,{text:l,containerRef:r})]}),i&&c.jsx("div",{children:i})]})}const Bl={container:{width:"mlybl57os",maxHeight:"mlyq3t0pi",$$css:!0},path:{color:"mly9dwj6z",$$css:!0},viewAttributeTable:{height:"mlyn866dk",$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",$$css:!0}},Se={filterDialog:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,minWidth:"mlyytlacd",maxWidth:"mly1pdpmub",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",maxHeight:"mly3d5gib",$$css:!0},filterDialogHeader:{fontWeight:"mly117nqv4",$$css:!0},filterTypeDropdown:{width:"mlyh8yej3",$$css:!0},buttonGroup:{display:"mly78zum5",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editor:{display:"mly78zum5",flexDirection:"mlydt5ytf",gap:"mly167g77z",rowGap:null,columnGap:null,minHeight:"mly2lwn1j",$$css:!0},editorRow:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},editorCell:{flexGrow:"mly1iyjqo2",$$css:!0},input:{border:"mly2yh2zd",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,color:"mlyizdh9v",padding:"mly9cpjcd",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mly1sxf85j",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,minWidth:"mlygc0pbm",$$css:!0}};function vL(e){return e.operator==="null"&&e.not?"-null":e.operator}function bL({filter:e,setFilter:t}){const n=vL(e),r=o=>{t(o==="-null"?{operator:"null",not:!0}:{operator:o})};return c.jsx("div",{...S.props(Se.editor),children:c.jsx(pn,{value:n,onChange:r,options:[{value:"true",label:"is true"},{value:"false",label:"is false"},{value:"null",label:"is null"},{value:"-null",label:"is not null"},{value:"false_or_null",label:"is false or null"}],customStyle:Se.filterTypeDropdown})})}function wL(e,t){const n=Th();if(n&&e){let r=n;if(t){const o=n.find(s=>s.fieldName===t);o?r=[o]:r=[]}return e=e.toLowerCase(),{searchResults:r.reduce((o,s)=>(s.values.filter(l=>{var i;return((i=l.fieldValue)==null?void 0:i.toLowerCase().includes(e))??!1}).forEach(l=>{o.push({fieldValue:l.fieldValue,fieldName:s.fieldName,fieldType:"string",weight:l.weight})}),o),[]),isLoading:!1}}return{searchResults:void 0,isLoading:!1}}function pv({onClick:e,search:t,filter:n,fieldPath:r,ref:o,customStyle:s,showPath:l=!0,hideNoMatchMessage:i=!1}){const{searchResults:a}=wL(t,r),d=u.useMemo(()=>a&&a.filter(f=>f.fieldType==="string"&&f.fieldValue!==null).filter(f=>n?n(f.fieldValue??""):!0).sort((f,m)=>m.weight-f.weight).slice(0,100),[a,n]);return c.jsx("div",{ref:o,...S.props(s),children:d?.length?d.map(f=>c.jsxs("div",{role:"menuitem",tabIndex:-1,...S.props(ct.item,hv.valueItem),onClick:()=>e(f),children:[c.jsx(xL,{value:f}),l?c.jsx("div",{className:"mlywzxoxx",children:f.fieldName}):null]},f.fieldName+":"+f.fieldValue)):t&&!i?c.jsx("div",{...S.props(ct.item),"data-disabled":"true",children:"No matching values"}):null})}function xL({value:e}){return c.jsx(Ne,{label:e.fieldValue??"∅",icon:"filter",color:"purple",customStyle:hv.token})}const hv={valueItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",display:"mly78zum5",justifyContent:"mly1qughib",cursor:"mly1ypdohk",$$css:!0},token:{cursor:"mly1ypdohk",$$css:!0}},vs={is_equal_to:{operator:"="},starts_with:{operator:"starts"},ends_with:{operator:"ends"},contains:{operator:"contains"},matches:{operator:"~"},is_blank:{operator:"empty"},is_null:{operator:"null"},is_not_equal_to:{operator:"=",not:!0},does_not_start_with:{operator:"starts",not:!0},does_not_end_with:{operator:"ends",not:!0},does_not_contain:{operator:"contains",not:!0},does_not_match:{operator:"~",not:!0},is_not_blank:{operator:"empty",not:!0},is_not_null:{operator:"null",not:!0}};function CL(e){for(const t in vs){const n=t,r=vs[n],o="not"in e?e.not:!1,s="not"in r?r.not:!1;if(r.operator===e.operator&&s===o)return n}throw new Error(`Unhandled string filter type ${e.operator}`)}const _L=({filter:e,setFilter:t,field:n,path:r})=>{e??(e={operator:"=",values:[]});const[o,s]=u.useState(""),l=u.useRef(null),i=CL(e),[a,d]=u.useState(e),f=p=>{m(EL(a,p))},m=p=>{d(p),t(p)};return c.jsxs("div",{...S.props(Se.editor),children:[c.jsx(pn,{value:i,onChange:f,options:[{value:"is_equal_to",label:"is"},{value:"starts_with",label:"starts with"},{value:"ends_with",label:"ends with"},{value:"contains",label:"contains"},{value:"is_blank",label:"is blank"},{value:"is_null",label:"is null"},{value:"matches",label:"matches"},{value:"is_not_equal_to",label:"is not"},{value:"does_not_start_with",label:"does not start with"},{value:"does_not_end_with",label:"does not end with"},{value:"does_not_contain",label:"does not contain"},{value:"is_not_blank",label:"is not blank"},{value:"is_not_null",label:"is not null"},{value:"does_not_match",label:"does not match"}],customStyle:Se.filterTypeDropdown},"type"),a.operator==="="||a.operator==="starts"||a.operator==="ends"||a.operator==="contains"?c.jsxs(c.Fragment,{children:[c.jsx(Pp,{values:a.values,setValues:p=>m({...a,values:p}),searchValue:o,setSearchValue:s,focusElement:l},"editor"),c.jsx("div",{style:{minHeight:0,display:"grid"},children:c.jsx(pv,{ref:l,search:o,fieldPath:[...r,n.name].join("."),onClick:p=>{p.fieldValue&&(m({...a,values:[...a.values,p.fieldValue]}),s(""))},customStyle:RL.valueList,showPath:!1,filter:p=>!a.values.includes(p),hideNoMatchMessage:!0})})]}):a.operator==="~"?c.jsx(Pp,{values:a.escaped_values,setValues:p=>m({...a,escaped_values:p}),escape:!0,searchValue:o,setSearchValue:s},"editor"):null]})};function Pp({color:e,values:t,setValues:n,searchValue:r,setSearchValue:o,focusElement:s}){return c.jsx(ml,{color:e,values:t,setValues:n,value:r,setValue:o,focusElement:s})}function kL(e){return e.replace(/(["%_^])/g,"^$1")}function SL(e){return e.replace(/\^(["%_^])/g,"$1")}function EL(e,t){const n="values"in e?e.values:"escaped_values"in e?e.escaped_values.map(SL):[];switch(t){case"is_equal_to":case"is_not_equal_to":case"starts_with":case"does_not_start_with":case"contains":case"does_not_contain":case"ends_with":case"does_not_end_with":return{...vs[t],values:n};case"is_blank":case"is_not_blank":case"is_null":case"is_not_null":return{...vs[t]};case"matches":case"does_not_match":return{...vs[t],escaped_values:n.map(kL)}}}const RL={valueList:{maxHeight:"mly3d5gib",width:"mly1hfn5x7",overflow:"mlyysyzu8",overflowX:null,overflowY:null,$$css:!0}},Dp=e=>e==="range",Jr={is_equal_to:{operator:"="},is_not_equal_to:{operator:"=",not:!0},is_greater_than:{operator:">"},is_less_than:{operator:"<"},is_greater_than_or_equal_to:{operator:">="},is_less_than_or_equal_to:{operator:"<="},is_between:{operator:"range",startOperator:">=",endOperator:"<="},is_null:{operator:"null"},is_not_null:{operator:"null",not:!0}};function jL(e){for(const t in Jr){const n=t,r=Jr[n],o="not"in e?e.not:!1,s="not"in r?r.not:!1;if(r.operator===e.operator&&s===o)return n}throw new Error(`Unhandled number filter type ${e.operator}`)}const TL=({filter:e,setFilter:t})=>{e??(e={operator:"=",values:[]});const[n,r]=u.useState(Dp(e.operator)?["0","0"]:["0"]),[o,s]=u.useState(""),l=d=>{const f=e,m=AL(e,d);m.operator!=="null"&&(!f.values||f.values.length===0)&&(m.values=["0"]),t(m)},i=jL(e);u.useEffect(()=>{if(s(""),Dp(e.operator)){const d=e;r([d.startValue,d.endValue])}else{const d=e;if(d.values){let f=d.values;(!f||f.length===0)&&(f=["0"]),r(f)}else r(["0"])}},[e]);const a=d=>{r(d),d.some(m=>isNaN(parseFloat(m)))?s("Every value must be numeric."):d.length===0?s("Requires at least one numeric value."):(s(""),e.operator==="range"?t({...e,startOperator:">=",startValue:d[0],endOperator:"<=",endValue:d[1]}):t({...e,values:d}))};return c.jsxs(c.Fragment,{children:[c.jsx(pn,{value:i,onChange:l,options:[{value:"is_equal_to",label:"is"},{value:"is_not_equal_to",label:"is not"},{value:"is_greater_than",label:"is greater than"},{value:"is_less_than",label:"is less than"},{value:"is_greater_than_or_equal_to",label:"is greater than or equal to"},{value:"is_less_than_or_equal_to",label:"is less than or equal to"},{value:"is_between",label:"between"},{value:"is_null",label:"is null"},{value:"is_not_null",label:"is not null"}]}),o?c.jsx(ea,{errorMessage:o}):null,LL(e,n,a)]})};function LL(e,t,n){switch(e.operator){case"!=":case"=":return c.jsx(ML,{values:t.map(String),setValues:r=>n(r),type:"number"});case">":case"<":case">=":case"<=":return c.jsx(kc,{value:t[0],setValue:r=>n([r]),type:"number"});case"range":return c.jsxs("div",{className:"mlyrvj5dj mly15396mt mly167g77z mlypqajaz",children:[c.jsx(kc,{value:t[0],setValue:r=>n([r,t[1]]),type:"number"}),c.jsx("span",{children:"to"}),c.jsx(kc,{value:t[1],setValue:r=>n([t[0],r]),type:"number"})]})}return null}function kc({value:e,setValue:t}){return c.jsx("input",{type:"number",value:e,onChange:n=>{t(n.target.value)},className:"mly27xtdb mly12oqio5 mlyizdh9v mly34lxi1"})}function ML({values:e,setValues:t}){return c.jsx(ml,{values:e,setValues:t,type:"number"})}function AL(e,t){const n="values"in e?e.values:[];switch(t){case"is_equal_to":case"is_not_equal_to":return{...Jr[t],values:n};case"is_greater_than":case"is_less_than":case"is_greater_than_or_equal_to":case"is_less_than_or_equal_to":return{...Jr[t],values:n.length>0?[n[0]]:n};case"is_null":case"is_not_null":return{...Jr[t]};case"is_between":return{...Jr[t],startValue:n.length>0?n[0]:"0",endValue:n.length>1?n[1]:"0"}}}function IL(e){return(e.operator==="null"||e.operator==="after"||e.operator==="before")&&e.not?`-${e.operator}`:e.operator}function PL(e,t){return e.operator==="last"||e.operator==="next"||e.operator==="in_last"?e.units:e.operator==="to"?Nl(e.fromMoment,t):e.operator==="before"?Nl(e.before,t):e.operator==="after"?Nl(e.after,t):e.operator==="in"?Nl(e.in,t):t?"second":"day"}const Op=({filter:e,setFilter:t,isDateTime:n})=>{e??(e={operator:"last",n:"7",units:"day"});const[r,o]=u.useState(PL(e,n)),[s,l]=u.useState(e),i=m=>{a(BL(s,m,r))},a=m=>{l(m),t(m)},d=n?"second":"day",f=IL(s);return c.jsxs("div",{...S.props(Se.editor),children:[c.jsxs("div",{...S.props(Se.editorRow),children:[c.jsx(pn,{value:f,onChange:i,options:[{value:"in_last",label:"last"},{value:"last",label:"last complete"},{value:"next",label:"next complete"},{value:"-before",label:"starting"},{value:"after",label:"after"},{value:"before",label:"before"},{value:"-after",label:"through"},{value:"in",label:"is"},{value:"to",label:"between"},{value:"null",label:"null"},{value:"-null",label:"not null"}],customStyle:Se.editorCell}),DL(s,a,r,o,d)]}),OL(s,a,r,o,d)]})};function DL(e,t,n,r,o){switch(e.operator){case"in_last":case"last":case"next":return c.jsx(NL,{currentFilter:e,maxLevel:o,updateFilter:t,units:n,setUnits:r});case"after":case"before":case"to":case"in":return c.jsx($L,{currentFilter:e,maxLevel:o,updateFilter:t,units:n,setUnits:r})}return null}function OL(e,t,n,r,o){switch(e.operator){case"after":case"before":case"in":return c.jsx(zL,{currentFilter:e,maxLevel:o,updateFilter:t,units:n,setUnits:r});case"to":return c.jsx(FL,{currentFilter:e,maxLevel:o,updateFilter:t,units:n,setUnits:r})}return null}const Bi=[{value:"year",label:"years"},{value:"quarter",label:"quarters"},{value:"month",label:"months"},{value:"week",label:"weeks"},{value:"day",label:"days"}],gv=[{value:"hour",label:"hours"},{value:"minute",label:"minutes"},{value:"second",label:"seconds"}];function NL({currentFilter:e,updateFilter:t,setUnits:n,maxLevel:r}){const{n:o,units:s}=e,l=r==="day"?Bi:[...Bi,...gv],i=d=>{const f=d.target.value;t({...e,n:f})},a=d=>{n(d),t({...e,units:d})};return c.jsxs(c.Fragment,{children:[c.jsx("input",{type:"number",value:o,...S.props(Se.input,Se.editorCell),onChange:i}),c.jsx(pn,{options:l,value:s,onChange:a,customStyle:Se.editorCell})]})}function $L({currentFilter:e,updateFilter:t,units:n,setUnits:r,maxLevel:o}){const s=o==="day"?Bi:[...Bi,...gv],l=i=>{switch(r(i),e.operator){case"after":t({...e,after:rs(e.after,i)});return;case"before":t({...e,before:rs(e.before,i)});return;case"to":t({...e,fromMoment:rs(e.fromMoment,i),toMoment:rs(e.toMoment,i)});return;case"in":{t({...e,in:rs(e.in,i)});return}}};return c.jsx(pn,{options:s,value:n,onChange:l,customStyle:Se.editorCell})}function zL({currentFilter:e,updateFilter:t,units:n,maxLevel:r}){const o=e.operator==="after"?e.after:e.operator==="before"?e.before:e.in,s=eo(o),l=i=>{t({...e,[e.operator]:bo(i,n)})};return c.jsxs(c.Fragment,{children:[c.jsx("div",{...S.props(Se.editorRow),children:c.jsx(Ii,{value:s,setValue:l,units:n,customStyle:{...Se.input,...Se.editorCell}})}),c.jsx("div",{...S.props(Se.editorRow),children:c.jsx(Hd,{value:s,setValue:l,units:n,maxLevel:r,customStyle:Se.editorCell})})]})}function FL({currentFilter:e,updateFilter:t,units:n,maxLevel:r}){const{fromMoment:o,toMoment:s}=e,l=eo(o),i=eo(s),[a,d]=u.useState(l),[f,m]=u.useState("from"),p=v=>{t({...e,fromMoment:bo(v,n)})},h=v=>{t({...e,toMoment:bo(v,n)})},y=v=>{f==="from"?p(v):h(v),d(v)},g=v=>{if(m(v),v==="from"){const b=eo(o);d(b)}else{const b=eo(s);d(b)}};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{...S.props(Se.editorRow),children:[c.jsx(Ii,{value:l,setValue:p,units:n,customStyle:{...Se.input,...Se.editorCell},onFocus:()=>g("from"),isActive:f==="from"}),c.jsx(Ii,{value:i,setValue:h,units:n,customStyle:{...Se.input,...Se.editorCell},onFocus:()=>g("to"),isActive:f==="to"})]}),c.jsx("div",{...S.props(Se.editorRow),children:c.jsx(Hd,{value:a,setValue:y,units:n,maxLevel:r,customStyle:Se.editorCell})})]})}function bo(e,t){return{moment:"literal",literal:L.utc(e).format(vo[t]),units:t}}function eo(e){return e&&e.moment==="literal"?L.utc(e.literal,vo[e.units??"second"]).toDate():new Date}function rs(e,t){return bo(eo(e),t)}function BL(e,t,n){let r="7",o=bo(new Date,n),s=bo(new Date,n),l=!1;switch(t.startsWith("-")&&(t=t.slice(1),l=!0),e.operator){case"in_last":case"last":case"next":r=e.n,n=e.units;break;case"after":o=e.after,s=e.after;break;case"before":o=e.before,s=e.before;break;case"to":o=e.fromMoment,s=e.toMoment;break}switch(t){case"in_last":case"last":case"next":return{operator:t,n:r,units:n};case"after":return{operator:t,after:o,not:l};case"before":return{operator:t,before:o,not:l};case"in":return{operator:t,in:o};case"to":return{operator:t,fromMoment:o,toMoment:s};case"null":return{operator:t,not:l}}return e}function qL({fieldInfo:e,path:t,filter:n,onFilterApply:r,onOpenChange:o}){const[s,l]=u.useState(n??WL(e)),i=()=>{o(!1)},a=()=>{r(s),o(!1)},d=y=>{l({kind:"boolean",parsed:y})},f=y=>{l({kind:"string",parsed:y})},m=y=>{l({kind:"number",parsed:y})},p=y=>{l({kind:"timestamp",parsed:y})},h=y=>{l({kind:"date",parsed:y})};return c.jsxs("div",{...S.props(F.body,Se.filterDialog),onKeyDown:y=>{y.key==="Enter"?a():y.key==="Esc"&&i()},children:[c.jsx("div",{...S.props(Se.filterDialogHeader),children:e.name}),s.kind==="boolean"&&c.jsx(bL,{setFilter:d,filter:s.parsed??{operator:"null"}}),s.kind==="string"&&c.jsx(_L,{setFilter:f,filter:s.parsed??{operator:"null"},field:e,path:t}),s.kind==="number"&&c.jsx(TL,{setFilter:m,filter:s.parsed??{operator:"null"}}),s.kind==="date"&&c.jsx(Op,{setFilter:h,filter:s.parsed??{operator:"null"},isDateTime:!1}),s.kind==="timestamp"&&c.jsx(Op,{setFilter:p,filter:s.parsed??{operator:"null"},isDateTime:!0}),c.jsxs("div",{...S.props(Se.buttonGroup),children:[c.jsx(be,{variant:"default",label:"Cancel",onClick:i,style:{flexGrow:1}}),c.jsx(be,{variant:"primary",label:"Apply",onClick:a,style:{flexGrow:1}})]})]})}function WL(e){return e.type.kind==="string_type"?{kind:"string",parsed:{operator:"=",values:[]}}:e.type.kind==="boolean_type"?{kind:"boolean",parsed:{operator:"true"}}:e.type.kind==="number_type"?{kind:"number",parsed:{operator:">",values:["0"]}}:e.type.kind==="date_type"?{kind:"date",parsed:{operator:"last",n:"7",units:"day"}}:{kind:"timestamp",parsed:{operator:"last",n:"7",units:"day"}}}function zs({fieldInfo:e,path:t,filter:n,setFilter:r,trigger:o,anchor:s,layoutProps:l,onOpenChange:i}){const{theme:a}=u.useContext(Me),[d,f]=u.useState(!1),m=p=>{f(p),i?.(p)};return c.jsxs(sl,{open:d,onOpenChange:m,modal:!0,children:[s?c.jsx(M0,{asChild:!0,children:s}):c.jsx(_a,{asChild:!0,children:o}),c.jsx(ll,{children:c.jsx(ka,{...l,...S.props(GL.content,a),children:c.jsx(qL,{fieldInfo:e,filter:n,path:t,onFilterApply:r,onOpenChange:m})})})]})}const GL={content:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly13z5u0c",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}},UL=e=>(e.kind==="dimension"||e.kind==="measure")&&(e.type.kind==="array_type"&&e.type.element_type.kind==="record_type"||e.type.kind==="record_type");function _f({view:e,fields:t,onAddOperation:n,search:r="",types:o,filter:s,isFilterOperation:l,customStyle:i}){const a=u.useMemo(()=>{const d=[],f=r.toLocaleLowerCase(),m=(p,h,y,g)=>{const v=zT(g).filter(x=>x.kind!=="join").filter(x=>x.name.toLocaleLowerCase().includes(f)&&p.includes(x.kind)).filter(x=>s?s(e,x,h):!0),b=g.filter(x=>x.kind==="join"),w=g.filter(UL);v.length&&d.push({path:h,name:h.length?h.join(" > "):y,fields:v});for(const x of w)x.type.kind==="array_type"&&x.type.element_type.kind==="record_type"?m(p,[...h,x.name],x.name,x.type.element_type.fields.map(_=>({kind:x.kind,..._}))):x.type.kind==="record_type"&&m(p,[...h,x.name],x.name,x.type.fields.map(_=>({kind:x.kind,..._})));for(const x of b)m(p.filter(_=>_!=="view"),[...h,x.name],x.name,x.schema.fields)};return m(o,[],"Source",t),d},[t,s,r,e,o]);return c.jsx("div",{...S.props(i),children:a.length?a.map(d=>c.jsxs("div",{children:[c.jsx("div",{...S.props(ct.item,ql.fieldItem,ql.sticky),"data-disabled":"true",children:d.name}),d.fields.map(f=>l&&(f.kind==="dimension"||f.kind==="measure")?c.jsx(zs,{fieldInfo:f,path:d.path,setFilter:m=>n(f,d.path,m),anchor:c.jsx("div",{role:"menuitem",tabIndex:-1,...S.props(ct.item,ql.fieldItem),children:c.jsx(Ud,{asChild:!0,children:c.jsx(An,{field:f,tooltip:c.jsx(Rr,{field:f,path:d.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})})}),layoutProps:{align:"start",side:"right",sideOffset:2,alignOffset:4}},d.name+":"+f.name):c.jsx("div",{role:"menuitem",tabIndex:-1,...S.props(ct.item,ql.fieldItem),children:c.jsx(An,{field:f,onClick:()=>n(f,d.path),tooltip:c.jsx(Rr,{field:f,path:d.path}),tooltipProps:{side:"right",align:"start",sideOffset:4,alignOffset:24}})},d.name+":"+f.name))]},d.name)):c.jsx("div",{...S.props(ct.item),"data-disabled":"true",children:"No matching fields"})})}const ql={fieldItem:{height:"mly1qx5ct2",paddingTop:"mly1y1aw1k",paddingBottom:"mlywib8y2",$$css:!0},sticky:{position:"mly7wzq59",top:"mly13vifvy",zIndex:"mly1vjfegm",color:"mly1ue28sr",backgroundColor:"mly13z5u0c",borderBottomWidth:"mlyso031l",borderBottomStyle:"mly1q0q8m5",borderBottomColor:"mlybmeysy",$$css:!0}};function YL({view:e,fields:t,types:n,filter:r,onAddOperation:o,isFilterOperation:s}){const{theme:l}=u.useContext(Me),[i,a]=u.useState("");return c.jsxs("div",{...S.props(ct.content,VL.content,l),role:"menu",children:[c.jsx("div",{...S.props(ct.item),children:c.jsx(ia,{icon:"search",value:i,onChange:a,placeholder:"Search..."})}),c.jsx(no,{}),c.jsx("div",{className:"mly1odjw0f",children:c.jsx(_f,{view:e,fields:t,search:i,types:n,filter:r,onAddOperation:o,isFilterOperation:s})})]})}const VL={content:{maxHeight:"mly3d5gib",$$css:!0}},HL=e=>{const t=e.getOutputSchema();return yv(t)},yv=e=>{let t;return t=XL(e.fields)||ZL(e.fields)||KL(e.fields),t},XL=e=>e.find(t=>!!(t.kind==="dimension"&&t.annotations&&t.annotations.find(n=>n.value==="# x"))),ZL=e=>e.find(t=>{if(t.kind==="dimension"){const n=t;if(n.type.kind==="date_type"||n.type.kind==="timestamp_type"||n.type.kind==="timestamptz_type")return!0}return!1}),KL=e=>e.find(t=>t.kind==="dimension");function Da(e,t){return[...e||[],t].join(".")}function QL(e){return e.operations.items.find(t=>t instanceof Y.ASTLimitViewOperation)!==void 0}function JL(e,t){return e.operations.items.find(n=>n instanceof Y.ASTOrderByViewOperation&&n.name===t)!==void 0}function vv(e){const t=new Map;for(const n of e.operations.items)if(n instanceof Y.ASTGroupByViewOperation||n instanceof Y.ASTAggregateViewOperation){const r=n.field.getReference();r&&t.set(n.name,Da(r.path,r.name))}return t}function eM(e,t,n){const r=vv(e),o=Da(t,n);return!!e.operations.items.find(s=>s instanceof Y.ASTOrderByViewOperation&&r.has(s.name)?o===r.get(s.name):!1)}function tM(e,t,n,r){return t===r&&(e||[]).join(".")===(n||[]).join(".")}function nM(e,t,n){return!!e.operations.items.find(o=>{if(o instanceof Y.ASTGroupByViewOperation||o instanceof Y.ASTAggregateViewOperation){const s=o.field.getReference();return s?tM(t,n,s.path,s.name):!1}return!1})}function rM(e,t){return e.operations.items.reduce((n,r)=>{if(r instanceof Y.ASTNestViewOperation&&r.name===t)do n+=1;while(e.hasFieldNamed(`${t} ${n}`));return n},1)}function pl(e,t,n){const r=t.kind==="dimension"?t.type.kind:"string",o=e.getOrAddDefaultSegment(),{fields:s}=e.getOutputSchema();let l;s.find(i=>i.name===t.name)&&(l=hf(s,t.name,n)),r==="date_type"?o.addDateGroupBy(t.name,n,"day"):r==="timestamp_type"?o.addTimestampGroupBy(t.name,n,"second"):r==="timestamptz_type"?o.addTimestamptzGroupBy(t.name,n,"second"):(o.addGroupBy(t.name,n,l),Su(o))}function Su(e){var t;const n=yv(e.getOutputSchema()),r=e.operations.items.filter(l=>l.kind==="group_by"),o=e.operations.items.filter(l=>l.kind==="calculate"&&l.expression.kind==="moving_average");if(!(n!==null&&n?.kind==="dimension"&&(n.type.kind==="timestamp_type"||n.type.kind==="timestamptz_type"||n.type.kind==="date_type")))o.forEach(l=>{l.delete(),e.addAggregate(l.getFieldInfo().name)});else{const l=r.filter(a=>a.name!==n.name);o.forEach(a=>{a.expression.edit(),a.expression.setPartitionFields(l.map(d=>d.field.getReference()).filter(d=>!!d))});const i=r.find(a=>a.name===n.name);if(i){const a=(t=i.field)==null?void 0:t.expression;if(a&&a.kind==="time_truncation"){const d=i.field.expression;d.truncation="day"}}}}function hl(e,t,n){const r=e.getOrAddDefaultSegment(),{fields:o}=e.getOutputSchema();let s;o.find(l=>l.name===t.name)&&(s=hf(o,t.name,n)),r.addAggregate(t.name,n,s)}function Oa(e,t){const n=e.getOrAddDefaultSegment(),{fields:r}=e.getOutputSchema();let o;r.find(s=>s.name===t.name)&&(o=hf(r,t.name)),n.addNest(t.name,o)}function oM(e,t,n,r="desc"){const o=Da(t,n);let s=n;const l=e.getOrAddDefaultSegment(),i=vv(l);for(const a of i.entries())if(a[1]===o){s=a[0];break}l.addOrderBy(s,r)}function sM(e,t,n="desc"){e.getOrAddDefaultSegment().addOrderBy(t.name,n)}function bv(e,t,n,r){const o=e.getOrAddDefaultSegment();t.kind==="dimension"?o.addWhere(t.name,n,r):o.addHaving(t.name,n,r)}function sn(e){if(!e)return;const t=By(e);if(t instanceof Y.ASTSegmentViewDefinition)return t;if(t instanceof Y.ASTRefinementViewDefinition&&t.refinement instanceof Y.ASTSegmentViewDefinition)return t.refinement}function lM({actionTitle:e,view:t,fields:n,title:r,types:o,onClick:s}){const[l,i]=u.useState(!1),a=sn(t),d=(f,m,p)=>!a?.hasField(m.name,p)&&ir(m);return c.jsxs("div",{...S.props(wt.title,Rn.main),children:[c.jsx("div",{children:r}),c.jsx("div",{...S.props(Rn.hoverActions,l?Rn.hoverOpen:void 0),children:c.jsxs(sl,{onOpenChange:i,children:[c.jsx(_a,{asChild:!0,children:c.jsx("div",{className:"mly1md70p1 mly17rwmdj mlyq1n1xh mly1ypdohk",children:e})}),c.jsx(ll,{children:c.jsx(Vd,{side:"right",align:"start",alignOffset:-16,children:c.jsx(YL,{view:t,fields:n,types:o,filter:d,onAddOperation:s})})})]})})]})}function wv({view:e,target:t,open:n,setOpen:r}){const{theme:o}=u.useContext(Me),[s,l]=u.useState(""),i=De();if(u.useEffect(()=>{t&&l(t.name)},[t,n]),!t)return null;const a=()=>{t.edit(),t.name=s,i(),r(!1)},{fields:d}=e.getOutputSchema(),f=s!==t.name&&d.some(m=>m.name===s);return c.jsx(rv,{open:n,onOpenChange:r,children:c.jsx(ov,{children:c.jsx(sv,{...S.props(tt.overlay),children:c.jsxs(lv,{...S.props(tt.content,F.body,o),children:[c.jsxs(av,{...S.props(tt.displayNone),children:["Rename ",t.name]}),c.jsxs(iv,{...S.props(tt.title),children:["Rename ",t.name]}),c.jsxs("div",{...S.props(tt.editor),children:[c.jsxs("div",{...S.props(tt.editorRow),children:[c.jsx("input",{value:s,onChange:m=>l(m.target.value),...S.props({...tt.editorCell,...tt.input}),onKeyDown:m=>{m.key==="Enter"?a():m.key==="Esc"&&r(!1)}}),f&&c.jsx(ea,{errorMessage:"Name already in use"})]}),c.jsxs("div",{...S.props(tt.editorRow),children:[c.jsx(be,{label:"Cancel",onClick:()=>r(!1),customStyle:tt.editorCell}),c.jsx(be,{variant:"primary",label:"Rename",onClick:a,customStyle:tt.editorCell,disabled:f})]})]})]})})})})}function xv({segment:e,view:t,operations:n,kind:r}){const o=De(),s=pj(mj(ff)),l=u.useMemo(()=>n.map(f=>({id:f.name,operation:f})),[n]);if(n.length===0)return null;function i(f){const p=e.operations.items.filter(g=>g instanceof Y.ASTAggregateViewOperation||g instanceof Y.ASTGroupByViewOperation||g instanceof Y.ASTNestViewOperation).map(g=>g.name),{active:h,over:y}=f;if(y&&h.id!==y.id){const g=p.indexOf(h.id),v=p.indexOf(y.id);e.reorderFields(mf(p,g,v)),o()}}const{fields:a}=Dr(t),d=r==="group_by"?{title:"group by",actionTitle:"Add group by",types:["dimension"],onClick:(f,m)=>{pl(t,f,m),o()}}:{title:"aggregate",actionTitle:"Add aggregate",types:["measure"],onClick:(f,m)=>{hl(t,f,m),o()}};return c.jsxs("div",{children:[c.jsx(lM,{view:t,fields:a,...d}),c.jsx("div",{...S.props(wt.tokenContainer),children:c.jsx(vT,{sensors:s,collisionDetection:bj,onDragEnd:i,children:c.jsx(TT,{items:l,children:l.map(f=>c.jsx(iM,{id:f.id,color:r==="group_by"?"cyan":"green",view:t,operation:f.operation},f.id))})})})]})}const Np=[];function iM({id:e,view:t,operation:n,color:r}){var o;const s=De(),l=n.getFieldInfo(),i=n instanceof Y.ASTCalculateViewOperation?null:n.field,a=n instanceof Y.ASTCalculateViewOperation?n.expression.node.field_reference.path??Np:((o=n.field.getReference())==null?void 0:o.path)??Np,{attributes:d,listeners:f,setNodeRef:m,transform:p,transition:h}=OT({id:e,data:{name:l.name}}),[y,g]=u.useState(!1),[v,b]=u.useState(),[w,x]=u.useState(!1),_={transform:Ns.Transform.toString(p),transition:h},C=u.useMemo(()=>HL(t),[t]),E=n.kind==="aggregate"&&C!==null&&C?.kind==="dimension"&&(C.type.kind==="timestamp_type"||C.type.kind==="timestamptz_type"||C.type.kind==="date_type"),k=u.useCallback($=>{E&&($.convertToCalculateMovingAverage($.name+"_smoothed",7),Su(t.getOrAddDefaultSegment()),s())},[E,s,t]),R=u.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx(Ta,{trigger:c.jsx(be,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),onOpenChange:x,children:[E?c.jsx(tr,{label:"Add smoothing",onClick:()=>{n instanceof Y.ASTAggregateViewOperation&&k(n)}},"smoothing"):null,c.jsx(tr,{label:"Rename",onClick:()=>{b(n),g(!0)}},"rename")]},[...a,l.name].join(".")),c.jsx(fl,{onClick:()=>{n.delete(),Su(t.getOrAddDefaultSegment()),s()}})]}),[E,k,l.name,n,a,s,t]),j=u.useMemo(()=>t.getOrAddDefaultSegment().operations.items.some($=>$.kind==="calculate"),[t]),M=uM(l,i);j&&M&&n.name===C?.name&&(M.options=M.options.filter($=>$.value==="day"));let D="orderBy";return(l.kind==="dimension"||l.kind==="measure")&&(D=Ma(l.type.kind)),c.jsxs("div",{id:e,ref:m,style:_,children:[i&&M?c.jsxs("div",{...{0:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly11ogjb6 mly1g9of4s"},1:{className:"mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly1ae5hkt"}}[!!w<<0],children:[c.jsxs(Hs,{customStyle:dM.tokenGroup,children:[c.jsx(Ne,{color:r,icon:D,label:l.name,dragProps:{attributes:d,listeners:f}}),c.jsx(ks,{color:r,value:M.value,onChange:$=>{i.expression instanceof Y.ASTTimeTruncationExpression&&(i.expression.truncation=$),s()},items:M.options})]}),R&&c.jsx("div",{className:"mly2b4tyj mly2lah0s",children:R})]}):n instanceof Y.ASTCalculateViewOperation?c.jsx(An,{field:l,color:r,hoverActionsVisible:w,hoverActions:R,tooltip:c.jsx(Rr,{field:l,path:a}),tooltipProps:{side:"right",align:"start",alignOffset:28},dragProps:{attributes:d,listeners:f},additionalSiblings:c.jsx(ks,{color:r,value:""+(n.expression.node.rows_preceding??7),onChange:$=>{$==="1"?(t.getOrAddDefaultSegment().operations.add(new Y.ASTAggregateViewOperation({kind:"aggregate",field:{expression:{kind:"field_reference",name:n.expression.node.field_reference.name}}})),n.delete(),s()):(n.expression.edit(),n.expression.rowsPreceding=parseInt($,10),s())},items:[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"28d",value:"28"},{label:"30d",value:"30"},{label:"Remove smoothing",value:"1"}]})}):c.jsx(c.Fragment,{children:c.jsx(An,{field:l,color:r,hoverActionsVisible:w,hoverActions:R,tooltip:c.jsx(Rr,{field:l,path:a}),tooltipProps:{side:"right",align:"start",alignOffset:28},dragProps:{attributes:d,listeners:f}})}),c.jsx(wv,{view:t,target:v,open:y,setOpen:g})]})}const aM=["day","week","month","quarter","year"],cM=["second","minute","hour","day","week","month","quarter","year"];function uM(e,t){return!t||e.kind!=="dimension"||!(t.expression instanceof Y.ASTTimeTruncationExpression)?null:e.type.kind==="timestamp_type"||e.type.kind==="timestamptz_type"?{value:e.type.timeframe??"second",options:cM.map(n=>({label:n,value:n}))}:e.type.kind==="date_type"?{value:e.type.timeframe??"day",options:aM.map(n=>({label:n,value:n}))}:null}const dM={tokenGroup:{display:"mly78zum5",$$css:!0}};function fM({segment:e,view:t,groupBys:n}){return c.jsx(xv,{segment:e,view:t,operations:n,kind:"group_by"})}class mM extends u.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const Cv=(e,t)=>{if(e.parsed===null)return{op:"",value:t};let n="",r=t;switch(e.kind){case"boolean":{const o=e.parsed,{operator:s,not:l}=o;n=l?"is not":"is",r=s}break;case"string":{const o=e.parsed,{operator:s}=o;switch(s){case"~":n="is like",r=o.escaped_values.join(", ");break;case"=":{const{not:l,values:i}=o;n=l?"is not":"is",r=i.join(", ")}break;case"contains":{const{not:l,values:i}=o;n=l?"does not contain":"contains",r=i.join(", ")}break;case"starts":{const{not:l,values:i}=o;n=l?"does not start with":"starts with",r=i.join(", ")}break;case"ends":{const{not:l,values:i}=o;n=l?"does not end with":"ends with",r=i.join(", ")}break;case"empty":{const{not:l}=o;n=l?"is not empty":"is empty",r=""}break;case"null":{const{not:l}=o;n=l?"is not":"is",r="null"}break}}break;case"number":{const o=e.parsed,{operator:s}=o;switch(s){case"=":case"!=":case"<=":case">=":case"<":case">":n=s,r=o.values.join(", ");break;case"range":n="in between",r=o.startValue+" and "+o.endValue;break;case"null":n=o.not?"is not":"is",r="null";break}}break;case"date":case"timestamp":{const o=e.parsed,{operator:s}=o;switch(s){case"after":{const{not:l}=o;n=l?"through":"is after",r=Sc(o.after)}break;case"before":{const{not:l}=o;n=l?"starting":"is before",r=Sc(o.before)}break;case"in":{const{not:l}=o;n=`is${l?" not":""} in`,r=Sc(o.in)}break;case"in_last":{const{not:l}=o;n=`is${l?" not":""} in last`,r=o.n+" "+o.units}break;case"last":{const{not:l}=o;n=`is${l?" not":""} last complete`,r=o.n+" "+o.units}break;case"next":{const{not:l}=o;n=`is${l?" not":""} next complete`,r=o.n+" "+o.units}break;case"for":{const{not:l}=o;n=`is${l?" not":""} for`,r=o.n+" "+o.units}break;case"null":n=o.not?"is not":"is",r="null";break}}}return{op:n,value:r}};function Sc(e){return e?e.moment==="literal"?e.literal:e.moment==="now"?"now":e.moment:""}function pM({filters:e}){const t=De();return e.length===0?null:c.jsxs("div",{children:[c.jsx("div",{...S.props(wt.title),children:"filter by"}),c.jsx("div",{...S.props(wt.tokenContainer),children:e.map((n,r)=>c.jsx(mM,{fallback:c.jsxs("div",{children:["Invalid filter",c.jsx(fl,{onClick:()=>{n.delete(),t()}})]}),children:c.jsx(hM,{filterOperation:n})},r))})]})}function hM({filterOperation:e}){const t=De(),n=u.useCallback(p=>{e.filter instanceof Y.ASTFilterWithFilterString&&e.filter.setFilter(p),t()},[e.filter,t]),{filter:r}=e;if(!(r instanceof Y.ASTFilterWithFilterString))return null;const{expression:o,filterString:s}=r;if(!(o instanceof Y.ASTReferenceExpression))return null;const l=r.getFieldInfo(),i=r.getFilter(),a=o.path??[],{op:d,value:f}=Cv(i,s),m=`${l.name} ${d} ${f}`;return c.jsxs("div",{...S.props(Rn.main),children:[c.jsx(zs,{fieldInfo:l,path:a,filter:i,setFilter:n,trigger:c.jsx(Ne,{icon:"filter",color:"cyan",label:m}),layoutProps:{align:"start",side:"bottom",sideOffset:1}}),c.jsx("div",{...S.props(Rn.hoverActions),children:c.jsx(fl,{onClick:()=>{e.delete(),t()}})})]})}function gM({limit:e}){const t=De();return e?c.jsxs("div",{children:[c.jsx("div",{...S.props(wt.title),children:"limit"}),c.jsxs("div",{...S.props(Rn.main),children:[c.jsx($c,{type:"number",value:e.limit,onChange:n=>{e.limit=n,t()},errorMessage:e.limit<0?"Limit must be positive":void 0}),c.jsx("div",{...S.props(Rn.hoverActions),children:c.jsx(fl,{onClick:()=>{e.delete(),t()}})})]})]}):null}function yM({segment:e,view:t,aggregates:n}){return c.jsx(xv,{segment:e,view:t,operations:n,kind:"aggregate"})}function vM({orderBys:e}){const t=De();return e.length===0?null:c.jsxs("div",{children:[c.jsx("div",{...S.props(wt.title),children:"order by"}),c.jsx("div",{...S.props(wt.tokenContainer),children:e.map(n=>{const{fieldReference:r}=n,o=r.getFieldInfo(),s=r.path??[];let l="orderBy";(o.kind==="dimension"||o.kind==="measure")&&(l=Ma(o.type.kind));const i=yy(o.kind);return c.jsxs("div",{...S.props(Rn.main),children:[c.jsxs(Hs,{children:[c.jsx(Ne,{color:i,icon:l,label:o.name}),c.jsx(ks,{color:i,items:[{label:"ascending",value:"asc"},{label:"descending",value:"desc"}],value:n.direction??"asc",onChange:a=>{n.direction=a,t()}})]}),c.jsx("div",{...S.props(Rn.hoverActions),children:c.jsx(fl,{onClick:()=>{n.delete(),t()}})})]},[...s,o.name].join("."))})})]})}function bM({view:e}){return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[c.jsx(dv,{view:e}),c.jsx(bs,{view:e,viewDef:e.definition})]})}function vr({icon:e,label:t,detail:n,disable:r,onClick:o,open:s}){const{theme:l}=u.useContext(Me),i=r?.(),a=()=>{r?.()||o?.()};return c.jsxs(jo,{children:[c.jsx(To,{asChild:!0,children:c.jsxs("div",{role:"menuitem",tabIndex:-1,...S.props(ct.item,ct.clickable,s?wM.open:null),onClick:a,"data-disabled":i?"true":void 0,children:[c.jsxs("div",{...S.props(ct.label),children:[e,c.jsx("div",{children:t})]}),s!==void 0&&c.jsx(ne,{name:"chevronRight",color:"gray"})]})}),n?c.jsx(Lo,{children:c.jsx(Mo,{...S.props(ct.tooltip,l),side:"right",align:"start",alignOffset:-16,children:n})}):null]})}const wM={open:{background:"mly1wp621z",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0}};function xM({view:e}){const t=De(),n=sn(e),r=n?QL(n):!1;return c.jsx(vr,{icon:c.jsx(ne,{name:"limit"}),label:"Limit",disable:()=>r,onClick:()=>{e.getOrAddDefaultSegment().setLimit(10),t()}})}function CM({view:e}){const t=De();return c.jsx(vr,{icon:c.jsx(ne,{name:"nest"}),label:"Add blank nested query",onClick:()=>{const n=e.getOrAddDefaultSegment(),r=rM(n,"Nest");n.addEmptyNest(r>1?`Nest ${r}`:"Nest"),t()}})}function gl({view:e,fields:t,onAddOperation:n,types:r,filter:o,isFilterOperation:s,search:l}){return c.jsx(_f,{types:r,filter:o,view:e,fields:t,onAddOperation:n,isFilterOperation:s,search:l,customStyle:_M.list})}const _M={list:{minWidth:"mly2ixbly",maxWidth:"mly1j9u4d2",$$css:!0}};function kM({view:e,search:t}){const n=De(),r=e.getOutputSchema().fields,o=sn(e),s=u.useMemo(()=>r.filter(l=>l.kind==="dimension").filter(l=>SM.includes(l.type.kind)).filter(l=>o?!JL(o,l.name):!0),[r,o]);return c.jsx(gl,{label:"Add order by",icon:"orderBy",view:e,fields:s,types:["dimension"],onAddOperation:l=>{sM(e,l),n()},disabledMessage:"There must be at least one field in the output to order by.",search:t})}const SM=["string_type","number_type","boolean_type","date_type","timestamp_type","timestamptz_type"];function EM({view:e,search:t}){const n=De(),{fields:r}=Dr(e),o=sn(e),s=(l,i,a)=>!o?.hasField(i.name,a)&&ir(i);return c.jsx(gl,{label:"Add group by",icon:"groupBy",view:e,fields:r,types:["dimension"],filter:s,onAddOperation:(l,i)=>{pl(e,l,i),n()},search:t})}function RM({view:e,search:t}){const n=De(),{fields:r}=Dr(e),o=sn(e),s=(l,i,a)=>!o?.hasField(i.name,a)&&ir(i);return c.jsx(gl,{label:"Add aggregate",icon:"aggregate",view:e,fields:r,types:["measure"],filter:s,onAddOperation:(l,i)=>{hl(e,l,i),n()},search:t})}function jM({view:e,search:t}){const n=De(),{fields:r}=Dr(e);return c.jsx(gl,{label:"Add filter",icon:"filter",view:e,fields:r,types:["measure","dimension"],filter:(o,s)=>(s.kind==="dimension"||s.kind==="measure")&&TM.has(s.type.kind)&&ir(s),onAddOperation:(o,s,l)=>{l&&(o.kind==="dimension"||o.kind==="measure")&&(bv(e,o,s,l),n())},isFilterOperation:!0,search:t})}const TM=new Set(["string_type","boolean_type","number_type","date_type","timestamp_type","timestamptz_type"]);function LM({view:e,search:t}){const{rootQuery:n}=u.useContext(Ut),r=De(),o=Dr(e).fields,s=u.useMemo(()=>o.filter(l=>l.kind==="view"&&!Fy(l)),[o]);return n?c.jsx(gl,{label:"Add view",icon:"view",view:e,fields:s,types:["view"],filter:(l,i)=>ir(i),onAddOperation:l=>{n.isEmpty()?n.setView(l.name):Oa(e,l),r()},search:t}):null}function _v({view:e}){const{theme:t}=u.useContext(Me),[n,r]=u.useState(!1),[o,s]=u.useState(""),l=De(),[i,a]=u.useState(""),d=sn(e),f=m=>{s(m===o?"":m)};return c.jsxs(sl,{open:n,onOpenChange:m=>{r(m),m||a("")},children:[c.jsx(_a,{asChild:!0,children:c.jsx(be,{icon:"insert",variant:"flat",size:"compact",onClick:()=>r(!n),tooltip:"Add query elements"})}),c.jsx(ll,{children:c.jsxs(ka,{onPointerDownOutside:()=>r(!1),...S.props(ct.content,t),side:"bottom",align:"start",role:"menu",children:[c.jsx("div",{...S.props(ct.item),children:c.jsx(ia,{icon:"search",value:i,onChange:a,placeholder:"Search...",customStyle:MM.search})}),c.jsx(no,{}),c.jsxs("div",{className:"mly78zum5 mly1odjw0f mlywib8y2 mly1xyq3li mly1bjczhr",children:[i&&!o?c.jsxs("div",{className:"mly1odjw0f",children:[c.jsx(_f,{view:e,fields:Dr(e).fields,filter:(m,p,h)=>!d?.hasField(p.name,h)&&ir(p),types:["dimension","measure","view"],onAddOperation:function(m,p){m.kind==="dimension"?pl(e,m,p):m.kind==="measure"?hl(e,m,p):Oa(e,m),l()},search:i}),c.jsx(no,{}),c.jsx(pv,{search:i,onClick:m=>{const p=m.fieldName.split("."),h=p.pop();e.getOrAddDefaultSegment().addWhere(h,p,{kind:"string",parsed:{operator:"=",values:[m.fieldValue??"∅"]}}),l()}})]}):c.jsxs("div",{"data-testid":"add-menu-operations",className:"mly18kybhu",children:[c.jsx(vr,{icon:c.jsx(ne,{name:"groupBy"}),label:"Add group by",onClick:()=>f("group_by"),open:o==="group_by"}),c.jsx(vr,{icon:c.jsx(ne,{name:"aggregate"}),label:"Add aggregate",onClick:()=>f("aggregate"),open:o==="aggregate"}),c.jsx(vr,{icon:c.jsx(ne,{name:"filter"}),label:"Add filter",onClick:()=>f("where"),open:o==="where"}),c.jsx(vr,{icon:c.jsx(ne,{name:"view"}),label:"Add view",onClick:()=>f("view"),open:o==="view"}),c.jsx(no,{}),c.jsx(xM,{view:e}),c.jsx(vr,{icon:c.jsx(ne,{name:"orderBy"}),label:"Order by",onClick:()=>f("order_by"),open:o==="order_by"}),c.jsx(CM,{view:e})]}),c.jsxs("div",{"data-testid":"add-menu-right-column",style:{overflowY:"auto"},children:[o==="group_by"&&c.jsx(EM,{view:e,search:i}),o==="aggregate"&&c.jsx(RM,{view:e,search:i}),o==="where"&&c.jsx(jM,{view:e,search:i}),o==="view"&&c.jsx(LM,{view:e,search:i}),o==="order_by"&&c.jsx(kM,{view:e,search:i})]})]})]})})]})}const MM={search:{width:"mlyh8yej3",$$css:!0}},Eu=me.createContext([]);function kv({children:e,nest:t}){const{focusNestView:n,focusMainView:r}=Ys(),o=u.useContext(Eu);return c.jsx("div",{onPointerDown:s=>{s.stopPropagation(),t?n([...o,t.name]):r()},children:t?c.jsx(Eu.Provider,{value:[...o,t.name],children:c.jsx("div",{children:e})}):c.jsx("div",{children:e})})}function AM({view:e,nests:t}){return t.length===0?null:c.jsx("div",{...S.props(wt.tokenContainer),children:t.map(n=>c.jsx(IM,{view:e,nest:n},n.name))})}function IM({view:e,nest:t}){const n=De(),[r,o]=u.useState(!1),s=u.useContext(Eu),{focusNestView:l,isNestViewFocused:i}=Ys(),a=d=>c.jsxs(c.Fragment,{children:[c.jsxs(Ta,{trigger:c.jsx(be,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:[c.jsx(tr,{icon:"clear",label:"Delete Query",onClick:()=>{l([...s]),d.delete(),n()}}),c.jsx(tr,{label:"Rename",onClick:()=>{o(!0)}})]}),c.jsx(_v,{view:d.view})]});return c.jsx(kv,{nest:t,children:c.jsxs("div",{className:"mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3",children:[c.jsx(rd,{title:t.name,icon:vy(t.view.getTag()),defaultOpen:!0,controls:a(t),collapsedControls:a(t),isFocused:i([...s,t.name]),children:c.jsx(bM,{view:t.view})}),c.jsx(wv,{view:e,target:t,open:r,setOpen:o})]},t.name)})}function PM({view:e,viewDef:t}){const n=[],r=[],o=[],s=[],l=[],i=[];let a;if(!(t instanceof Y.ASTSegmentViewDefinition))return null;const d=t;return d.operations.items.forEach(f=>{f instanceof Y.ASTGroupByViewOperation?n.push(f):f instanceof Y.ASTAggregateViewOperation||f instanceof Y.ASTCalculateViewOperation?r.push(f):f instanceof Y.ASTWhereViewOperation||f instanceof Y.ASTHavingViewOperation?s.push(f):f instanceof Y.ASTOrderByViewOperation?l.push(f):f instanceof Y.ASTNestViewOperation?i.push(f):f instanceof Y.ASTDrillViewOperation?o.push(f):a=f}),c.jsxs("div",{className:"mly1tpqehw mly10lvyaf",children:[c.jsx(fM,{segment:d,view:e,groupBys:n}),c.jsx(yM,{segment:d,view:e,aggregates:r}),c.jsx(KR,{drills:o}),c.jsx(pM,{filters:s}),c.jsx(vM,{orderBys:l}),c.jsx(AM,{view:e,nests:i}),c.jsx(gM,{limit:a})]})}function bs({view:e,viewDef:t}){return t instanceof Y.ASTArrowViewDefinition?c.jsx(bs,{view:e,viewDef:t.view}):t instanceof Y.ASTRefinementViewDefinition?c.jsxs("div",{children:[c.jsx(bs,{view:e,viewDef:t.base}),c.jsx(bs,{view:e,viewDef:t.refinement})]}):t instanceof Y.ASTSegmentViewDefinition?c.jsx(PM,{view:e,viewDef:t}):c.jsx(DM,{viewDef:t})}function DM({viewDef:e}){const[t,n]=u.useState(!1);return c.jsxs("div",{...{0:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mly1cmjei3 mlyt7dq6l mlywib8y2 mly163pfp mlyy13l1i"},1:{className:"mly78zum5 mlydt5ytf mly1cy8zhl mly1nhvcw1 mly12oqio5 mly1cmjei3 mlyt7dq6l mly163pfp mlyy13l1i mly18d9i69"}}[!!t<<0],children:[c.jsxs("div",{className:"mlyrvj5dj mly1mt1orb mly1g3yg12 mlyydnxy5 mly6s0dn4 mlylqzeqv mly167g77z mly12oqio5 mlyc342km mly1n2onr6 mlyb3r6kr mly1cmjei3 mlyh8yej3",children:[c.jsx(ne,{name:"query",color:"purple"}),c.jsx("div",{className:"mlyuxw1ft mlyb3r6kr mlylyipyv",children:e.name}),c.jsx(be,{icon:t?"chevronRight":"chevronDown",onClick:()=>n(!t),size:"compact"})]}),!t&&c.jsx(Cf,{viewInfo:e.getViewInfo(),style:OM.preview})]})}const OM={preview:{height:"mlyt7dq6l",maxHeight:"mly1hkcv85",background:"mly1bjczhr",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mly12oqio5",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0}};class Fs{constructor(t){this._ruleStack=t}get ruleStack(){return this._ruleStack}clone(){return new Fs(this._ruleStack)}equals(t){return!(!t||!(t instanceof Fs)||t!==this||t._ruleStack!==this._ruleStack)}}function ws(e){if(Array.isArray(e)&&(e=e[0]),!!e)return e=(e.charCodeAt(0)===35?e.slice(1):e).toLowerCase(),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e}function NM(e){let t="rules"in e?e.rules:void 0;if(!t){t=[];const r=e.settings||e.tokenColors;for(const{scope:o,settings:{foreground:s,background:l,fontStyle:i}={}}of r){const a=Array.isArray(o)?o:[o];for(const d of a)d&&(s||l||i)&&t.push({token:d,foreground:ws(s),background:ws(l),fontStyle:i})}}const n=Object.fromEntries(Object.entries(e.colors||{}).map(([r,o])=>[r,`#${ws(o)}`]));return{base:e.type==="light"?"vs":"vs-dark",inherit:!1,colors:n,rules:t}}function $M(e,t,n={}){const r=new Map,o=e.getLoadedThemes();for(const p of o){const h=e.getTheme(p),y=NM(h);r.set(p,y),t.editor.defineTheme(p,y)}const s=[],l=new Map,i=t.editor.setTheme.bind(t.editor);t.editor.setTheme=p=>{const h=e.setTheme(p),y=r.get(p);s.length=h.colorMap.length,h.colorMap.forEach((g,v)=>{s[v]=g}),l.clear(),y?.rules.forEach(g=>{const v=ws(g.foreground);v&&!l.has(v)&&l.set(v,g.token)}),i(p)},t.editor.setTheme(o[0]);function a(p){return l.get(p)}const{tokenizeMaxLineLength:d=2e4,tokenizeTimeLimit:f=500}=n,m=new Set(t.languages.getLanguages().map(p=>p.id));for(const p of e.getLoadedLanguages())m.has(p)&&t.languages.setTokensProvider(p,{getInitialState(){return new Fs(wi)},tokenize(h,y){if(h.length>=d)return{endState:y,tokens:[{startIndex:0,scopes:""}]};const v=e.getLanguage(p).tokenizeLine2(h,y.ruleStack,f);v.stoppedEarly&&console.warn(`Time limit reached when tokenizing line: ${h.substring(0,100)}`);const b=v.tokens.length/2,w=[];for(let x=0;x<b;x++){const _=v.tokens[2*x],C=v.tokens[2*x+1],E=ws(s[Sr.getForeground(C)]||""),k=a(E)||"";w.push({startIndex:_,scopes:k})}return{endState:new Fs(v.ruleStack),tokens:w}}})}const zM="duckdb";class FM{async readURL(t){throw new Error("Stub reader cannot read files")}}class BM extends T5.BaseConnection{constructor(t=zM){super(),this.name="stub",this.dialectName=t}getDigest(){return"stub"}runSQL(){throw new Error("Stub connection cannot run SQL.")}fetchSelectSchema(t){throw new Error("Stub connection cannot fetch schemas.")}fetchTableSchema(t,n){throw new Error("Stub connection cannot fetch schemas.")}}const qM=new FM,WM=new BM,GM=new Cr.Runtime({urlReader:qM,connection:WM});async function Na(e,t){return await GM._loadModelFromModelDef(e).extendModel(t,{noThrowOnError:!0}).getModel()}function kf(e,t){return Cr.Malloy.parse({source:t})}function Bs(e){return{line:e.lineNumber-1,character:e.column}}const Ru={};function UM(e,t){Ru[e]=t}function qo(e){if(e in Ru)return Ru[e];throw new Error(`Unknown model ${e}`)}function YM(e){const t=[];return t.push(e.languages.registerHoverProvider("malloy",{provideHover:SA}),e.languages.registerDefinitionProvider("malloy",{provideDefinition:(...n)=>_A(e,...n)}),e.languages.registerCodeActionProvider("malloy",{provideCodeActions:ZM}),e.languages.registerDocumentSymbolProvider("malloy",{provideDocumentSymbols:(...n)=>kA(e,...n)}),e.languages.registerCompletionItemProvider("malloy",{provideCompletionItems:(...n)=>CA(e,...n)})),{dispose:()=>t.forEach(n=>n.dispose())}}async function VM(e,t,n){const r=qo(t),o=[];try{const s=await Na(r,n);for(const i of s.problems)o.push($p(e,i));const{logs:l}=Cr.malloyToQuery(n);for(const i of l)o.push(XM(e,i))}catch(s){if(s instanceof Cr.MalloyError)for(const l of s.problems)o.push($p(e,l))}return o}function HM(e,t){switch(t){case"error":return e.MarkerSeverity.Error;case"warn":return e.MarkerSeverity.Warning;case"info":return e.MarkerSeverity.Info}return e.MarkerSeverity.Hint}function $p(e,t){var n,r,o,s;return{severity:HM(e,t.severity),message:t.message,startLineNumber:(((n=t.at)==null?void 0:n.range.start.line)??0)+1,startColumn:(((r=t.at)==null?void 0:r.range.start.character)??0)+1,endLineNumber:(((o=t.at)==null?void 0:o.range.end.line)??0)+1,endColumn:(((s=t.at)==null?void 0:s.range.end.character)??0)+1}}function XM(e,t){return{severity:e.MarkerSeverity.Hint,message:t.message,startLineNumber:(t.range.start.line??0)+1,startColumn:(t.range.start.character??0)+1,endLineNumber:(t.range.end.line??0)+1,endColumn:(t.range.end.character??0)+1}}async function ZM(e,t,n,r){var o;const s=qo(e.uri.toString()),l=e.getValue(),i=[];try{const d=await Na(s,l);d?.problems&&i.push(...d.problems)}catch(d){d instanceof Cr.MalloyError&&i.push(...d.problems)}const a=[];for(const d of i)if((o=d.at)!=null&&o.range){const f=d.at.range;if(f.start.line+1===t.startLineNumber&&f.start.character+1===t.startColumn&&f.end.line+1===t.endLineNumber&&f.end.character+1===t.endColumn&&d.replacement){const m={edits:[{resource:e.uri,textEdit:{range:t,text:d.replacement},versionId:void 0}]},p={title:`Replace with ${d.replacement}`,kind:"quickfix",edit:m};a.push(p)}}return{actions:a,dispose:()=>{}}}const Ae="https://docs.malloydata.dev/documentation",KM=`Use \`source\` to name, describe, and augment a data source.
|
|
213
|
+
|
|
214
|
+
\`\`\`malloy
|
|
215
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
216
|
+
measure: flight_count is count()
|
|
217
|
+
}
|
|
218
|
+
\`\`\`
|
|
219
|
+
|
|
220
|
+
View [the full documentation](${Ae}/language/source).
|
|
221
|
+
`,QM=`Use \`query\` to define a query which can be run within this document.
|
|
222
|
+
|
|
223
|
+
\`\`\`malloy
|
|
224
|
+
query: flights_by_carrier is flights -> {
|
|
225
|
+
group_by: carrier
|
|
226
|
+
aggregate: flight_count
|
|
227
|
+
}
|
|
228
|
+
\`\`\`
|
|
229
|
+
|
|
230
|
+
View [the full documentation](${Ae}/language/query).
|
|
231
|
+
`,JM=`Use \`run\` to define an anonymous query which can be run within this document.
|
|
232
|
+
|
|
233
|
+
\`\`\`malloy
|
|
234
|
+
run: flights -> {
|
|
235
|
+
group_by: carrier
|
|
236
|
+
aggregate: flight_count
|
|
237
|
+
}
|
|
238
|
+
\`\`\`
|
|
239
|
+
|
|
240
|
+
View [the full documentation](${Ae}/language/statement#run-statements).
|
|
241
|
+
`,eA="Use the `group_by` clause to specify dimensions by which to group aggregate calculations.\n\n```malloy\nrun: flights -> {\n group_by: carrier\n aggregate: flight_count\n}\n```\n",tA=`Use \`order_by\` to control the ordering of results.
|
|
242
|
+
|
|
243
|
+
\`\`\`malloy
|
|
244
|
+
run: flights -> {
|
|
245
|
+
group_by: carrier
|
|
246
|
+
order_by: carrier asc
|
|
247
|
+
}
|
|
248
|
+
\`\`\`
|
|
249
|
+
|
|
250
|
+
View [the full documentation](${Ae}/language/order_by#explicit-ordering).
|
|
251
|
+
`,nA=`Use \`select\` to retrieve dimensional values without grouping or aggregating.
|
|
252
|
+
|
|
253
|
+
\`\`\`malloy
|
|
254
|
+
run: flights -> {
|
|
255
|
+
select: id2, carrier, dep_time
|
|
256
|
+
limit: 10
|
|
257
|
+
}
|
|
258
|
+
\`\`\`
|
|
259
|
+
|
|
260
|
+
View [the full documentation](${Ae}/user_guides/basic#select).
|
|
261
|
+
`,rA=`Use \`index\` to produce a search index.
|
|
262
|
+
|
|
263
|
+
\`\`\`malloy
|
|
264
|
+
run: flights -> {
|
|
265
|
+
index: * on flight_count
|
|
266
|
+
}
|
|
267
|
+
\`\`\`
|
|
268
|
+
|
|
269
|
+
View [the full documentation](${Ae}).
|
|
270
|
+
`,oA=`Use \`aggregate\` to perform aggregate computations like \`count()\` or \`sum()\`.
|
|
271
|
+
|
|
272
|
+
\`\`\`malloy
|
|
273
|
+
run: flights -> {
|
|
274
|
+
group_by: carrier
|
|
275
|
+
aggregate:
|
|
276
|
+
flight_count is count()
|
|
277
|
+
total_distance is sum(distance)
|
|
278
|
+
}
|
|
279
|
+
\`\`\`
|
|
280
|
+
|
|
281
|
+
View [the full documentation](${Ae}/language/aggregates).
|
|
282
|
+
`,sA=`Use \`calculate\` to perform aggregate computations like \`count()\` or \`sum()\`.
|
|
283
|
+
|
|
284
|
+
\`\`\`malloy
|
|
285
|
+
query: flights -> {
|
|
286
|
+
group_by: carrier
|
|
287
|
+
calculate: previous_carrier is lag(carrier)
|
|
288
|
+
}
|
|
289
|
+
\`\`\`
|
|
290
|
+
|
|
291
|
+
View [the full documentation](${Ae}/language/calculations).
|
|
292
|
+
`,lA=`Use \`top\` to restrict the number of results returned.
|
|
293
|
+
|
|
294
|
+
\`\`\`malloy
|
|
295
|
+
run: flights -> {
|
|
296
|
+
top: 10
|
|
297
|
+
group_by: carrier
|
|
298
|
+
aggregate: flight_count
|
|
299
|
+
}
|
|
300
|
+
\`\`\`
|
|
301
|
+
|
|
302
|
+
View [the full documentation](${Ae}/language/order_by#limiting).
|
|
303
|
+
`,iA=`Use \`limit\` to restrict the number of results returned.
|
|
304
|
+
|
|
305
|
+
\`\`\`malloy
|
|
306
|
+
run: flights -> {
|
|
307
|
+
select: *
|
|
308
|
+
limit: 10
|
|
309
|
+
}
|
|
310
|
+
\`\`\`
|
|
311
|
+
|
|
312
|
+
View [the full documentation](${Ae}/language/order_by#limiting).
|
|
313
|
+
`,aA=`Use \`where\` to narrow down results.
|
|
314
|
+
|
|
315
|
+
\`\`\`malloy
|
|
316
|
+
run: flights -> {
|
|
317
|
+
where: origin.state = 'CA'
|
|
318
|
+
aggregate: flight_count
|
|
319
|
+
}
|
|
320
|
+
\`\`\`
|
|
321
|
+
|
|
322
|
+
View [the full documentation](${Ae}/language/filters).
|
|
323
|
+
`,cA=`Use \`having\` to narrow down results based on conditions of aggregate values.
|
|
324
|
+
|
|
325
|
+
\`\`\`malloy
|
|
326
|
+
run: flights -> {
|
|
327
|
+
group_by: carrier
|
|
328
|
+
aggregate: total_distance
|
|
329
|
+
having: total_distance > 1000
|
|
330
|
+
}
|
|
331
|
+
\`\`\`
|
|
332
|
+
|
|
333
|
+
View [the full documentation](${Ae}/language/filters).
|
|
334
|
+
`,uA=`Use \`nest\` to include a nested view.
|
|
335
|
+
|
|
336
|
+
\`\`\`malloy
|
|
337
|
+
run: flights -> {
|
|
338
|
+
group_by: carrier
|
|
339
|
+
nest: by_origin_state is {
|
|
340
|
+
group_by: origin.state
|
|
341
|
+
aggregate: flight_count
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
\`\`\`
|
|
345
|
+
|
|
346
|
+
View [the full documentation](${Ae}/language/nesting).
|
|
347
|
+
`,dA=`Use \`dimension\` to define a non-aggregate calculation.
|
|
348
|
+
|
|
349
|
+
\`\`\`malloy
|
|
350
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
351
|
+
dimension: distance_km is distance * 1.609
|
|
352
|
+
}
|
|
353
|
+
\`\`\`
|
|
354
|
+
|
|
355
|
+
View [the full documentation](${Ae}/language/fields#dimensions).
|
|
356
|
+
`,fA=`Use \`measure\` to define an aggregate calculation.
|
|
357
|
+
|
|
358
|
+
\`\`\`malloy
|
|
359
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
360
|
+
measure: flight_count is count()
|
|
361
|
+
}
|
|
362
|
+
\`\`\`
|
|
363
|
+
|
|
364
|
+
View [the full documentation](${Ae}/language/fields#measures).
|
|
365
|
+
`,mA=`Use \`view\` to define a named view which can be referenced and/or refined in queries.
|
|
366
|
+
|
|
367
|
+
\`\`\`malloy
|
|
368
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
369
|
+
view: by_carrier is {
|
|
370
|
+
group_by: carrier,
|
|
371
|
+
aggregate: flight_count
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
\`\`\`
|
|
375
|
+
|
|
376
|
+
View [the full documentation](${Ae}/language/fields#queries).
|
|
377
|
+
`,pA=`Use \`join_one\` to define a joined explore which has one row for each row in the source table.
|
|
378
|
+
|
|
379
|
+
\`\`\`malloy
|
|
380
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
381
|
+
join_one: carriers with carrier
|
|
382
|
+
join_one: origin is airports with origin_code
|
|
383
|
+
}
|
|
384
|
+
\`\`\`
|
|
385
|
+
|
|
386
|
+
View [the full documentation](${Ae}/language/join).
|
|
387
|
+
`,hA=`Use \`join_many\` to define a joined explore which has many rows for each row in the source table.
|
|
388
|
+
|
|
389
|
+
\`\`\`malloy
|
|
390
|
+
source: users is table('users') extend {
|
|
391
|
+
join_many: orders is table('orders') on id = orders.user_id and orders.user_id != null
|
|
392
|
+
}
|
|
393
|
+
\`\`\`
|
|
394
|
+
|
|
395
|
+
View [the full documentation](${Ae}/language/join).
|
|
396
|
+
`,gA=`Use \`join_cross\` to define a join via a cross product, resulting in many rows on each side of the join.
|
|
397
|
+
|
|
398
|
+
View [the full documentation](${Ae}/language/join).
|
|
399
|
+
`,yA=`Use \`where\` to limit the limit the rows of an explore.
|
|
400
|
+
|
|
401
|
+
\`\`\`malloy
|
|
402
|
+
source: long_flights is flights extend {
|
|
403
|
+
where: distance > 1000
|
|
404
|
+
}
|
|
405
|
+
\`\`\`
|
|
406
|
+
|
|
407
|
+
View [the full documentation](${Ae}/language/filters).
|
|
408
|
+
`,vA=`Use \`primary_key\` to specify a primary key for joining.
|
|
409
|
+
|
|
410
|
+
\`\`\`malloy
|
|
411
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
412
|
+
primary_key: id2
|
|
413
|
+
}
|
|
414
|
+
\`\`\`
|
|
415
|
+
|
|
416
|
+
View [the full documentation](${Ae}/language/explore#primary-keys).
|
|
417
|
+
`,bA=`Use \`rename\` to rename a field from the source explore/table.
|
|
418
|
+
|
|
419
|
+
\`\`\`malloy
|
|
420
|
+
source: flights is duckdb.table('flights.parquet') extend {
|
|
421
|
+
rename: origin_code is origin
|
|
422
|
+
}
|
|
423
|
+
\`\`\`
|
|
424
|
+
|
|
425
|
+
View [the full documentation](${Ae}/language/explore#renaming-fields).
|
|
426
|
+
`,wA=`Use \`accept\` to specify which fields to include from the source explore/table.
|
|
427
|
+
|
|
428
|
+
\`\`\`malloy
|
|
429
|
+
source: airports is table('malloy-data.faa.airports') extend {
|
|
430
|
+
accept: [ id, name, code, city, state, elevation ]
|
|
431
|
+
}
|
|
432
|
+
\`\`\`
|
|
433
|
+
|
|
434
|
+
View [the full documentation](${Ae}/language/explore#limiting-access-to-fields).
|
|
435
|
+
`,xA=`Use \`except\` to specify which fields to exclude from the source explore/table.
|
|
436
|
+
|
|
437
|
+
\`\`\`malloy
|
|
438
|
+
source: airports is table('malloy-data.faa.airports') extend {
|
|
439
|
+
except: [ c_ldg_rts, aero_cht, cntl_twr ]
|
|
440
|
+
}
|
|
441
|
+
\`\`\`
|
|
442
|
+
|
|
443
|
+
View [the full documentation](${Ae}/language/explore#limiting-access-to-fields).
|
|
444
|
+
`,Sv={model_property:{source:KM,query:QM,run:JM},query_property:{group_by:eA,order_by:tA,select:nA,index:rA,aggregate:oA,top:lA,limit:iA,where:aA,having:cA,nest:uA,calculate:sA},explore_property:{dimension:dA,measure:fA,view:mA,join_one:pA,join_many:hA,join_cross:gA,where:yA,primary_key:vA,rename:bA,accept:wA,except:xA}};function CA(e,t,n,r,o){const s=qo(t.uri.toString()),l=Bs(n),i=t.getValue(),a=kf(s,i),d=t.getValueInRange({startColumn:0,startLineNumber:n.lineNumber,endColumn:n.column,endLineNumber:n.lineNumber});let f=n.column;for(;f>0&&d.charAt(f-2).match(/\w/);)f-=1;return{suggestions:a.completions(l).map(m=>{var p;return{insertText:m.text,label:m.text,kind:e.languages.CompletionItemKind.Text,range:{startColumn:f,startLineNumber:n.lineNumber,endColumn:n.column,endLineNumber:n.lineNumber},documentation:(p=Sv[m.type])==null?void 0:p[m.text.replace(/:$/,"")]}})}}async function _A(e,t,n,r){const o=qo(t.uri.toString());try{const s=t.getValue(),l=await Na(o,s),i=l.getReference(Bs(n)),a=i?.definition.location;if(a)return[{uri:e.Uri.parse(a.url),range:Wl(a.range)}];{const d=l.getImport(Bs(n));if(d){const f={start:{line:0,character:0},end:{line:0,character:0}};return[{originSelectionRange:Wl(d.location.range),targetSelectionRange:Wl(f),uri:e.Uri.parse(d.importURL),range:Wl(f)}]}}}catch(s){console.error(s)}return[]}function Wl(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function Ev(e,{name:t,range:n,type:r,children:o}){let s,l=r;switch(r){case"explore":s=e.languages.SymbolKind.Namespace,l="source";break;case"query":s=e.languages.SymbolKind.Class;break;case"join":s=e.languages.SymbolKind.Interface;break;case"unnamed_query":s=e.languages.SymbolKind.Class;break;default:s=e.languages.SymbolKind.Field}return{name:t||"unnamed",range:{startLineNumber:n.start.line+1,startColumn:n.start.character+1,endLineNumber:n.end.line+1,endColumn:n.end.character+1},detail:l,kind:s,selectionRange:{startLineNumber:n.start.line+1,startColumn:n.start.character+1,endLineNumber:n.end.line+1,endColumn:n.end.character+1},children:o.map(i=>Ev(e,i)),tags:[]}}function kA(e,t,n){const r=qo(t.uri.toString()),o=t.getValue();return kf(r,o).symbols.map(l=>Ev(e,l))}async function SA(e,t,n,r){const o=qo(e.uri.toString()),s=e.getValue(),l=kf(o,s).helpContext(Bs(t));if(l?.token){const i=l.token.replace(/:$/,"");if(i){const a=Sv[l.type][i];if(a)return{contents:[{value:a}]};{const d=await Na(o,s),f=d?.getReference(Bs(t));if(f)return EA(f)}}}return null}function EA({text:e,definition:t}){return{contents:[{value:`\`\`\`
|
|
445
|
+
${Rv(t.annotation).join("")}${e}: ${t.type}
|
|
446
|
+
\`\`\``}]}}function Rv(e,t){e||(e={});const n=e.inherits?Rv(e.inherits):[];function r(o){const s=[];for(const l of o||[])s.push(l.text);return s}return n.concat(r(e.blockNotes),r(e.notes))}let Ec=null;async function RA(e){if(Ec)return{dispose:()=>{}};Ec=xd();const t=await Ec;return e.languages.register({id:"sql"}),e.languages.register({id:"malloy"}),$M(t,e),e.languages.setLanguageConfiguration("malloy",jA),YM(e)}const jA={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'"},{open:"/*",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},jv=u.createContext({});function TA({language:e,value:t,onChange:n}){const{dark:r}=u.useContext(Me),{setQuery:o}=u.useContext(Ut),[s,l]=u.useState(!1),i=u.useRef(null),[a]=me.useState(t),[d,f]=me.useState(!1),{modelDef:m,modelUri:p,monaco:h,malloyToQuery:y}=me.useContext(jv),[g,v]=me.useState();return u.useEffect(()=>{let b;return h&&(async()=>(b=RA(h),await b,f(!0)))(),()=>{b&&b.then(w=>w.dispose())}},[h]),u.useEffect(()=>{const b=[];if(!h||!d||!i.current||!m||!p)return()=>{};const w=async E=>{const k=await VM(h,x,E);l(k.length===0),h.editor.setModelMarkers(_,"malloy",k)},x=p.toString();UM(x,m);const _=h.editor.createModel(a,"malloy",h.Uri.parse(x));_.updateOptions({tabSize:2});const C=h.editor.create(i.current,{model:_,language:e,automaticLayout:!0,theme:"light-plus",wrappingStrategy:"simple",wordWrap:"on",minimap:{enabled:!1}});return v(C),b.push(_,C),b.push(C.onDidChangeModelContent(async()=>{const E=C.getValue();n(E),w(E)})),w(a),()=>b.forEach(E=>E.dispose())},[e,p,h,a,n,d,m]),u.useEffect(()=>{g&&t!==g.getValue()&&g.setValue(t)},[g,t]),u.useEffect(()=>{h&&h.editor.setTheme(r?"dark-plus":"light-plus")},[h,r]),c.jsxs("div",{className:"mly1iorvi4 mly178xt8z mly13fuv20 mlydwjgp9 mlyh8yej3 mly10msahz mly78zum5 mlydt5ytf mly167g77z",children:[c.jsxs("div",{...S.props(wt.queryCard,LA.controls),children:[c.jsxs("div",{...S.props(wt.labelWithIcon,F.largeBody),children:[c.jsx(ne,{name:"malloy"}),"Malloy Editor"]}),y?c.jsx(Ta,{trigger:c.jsx(be,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:c.jsx(tr,{icon:"malloy",label:"Use Query Editor",onClick:()=>{if(a&&y&&s){const{query:b,logs:w}=y(t);w.length&&console.error(w),b&&o(b)}},disabled:!s})}):null]}),c.jsx("div",{ref:i,className:"mly1iyjqo2"})]})}const LA={controls:{margin:"mlys8nxjv",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,flexGrow:"mly1c4vz4f",display:"mly78zum5",justifyContent:"mly1qughib",alignItems:"mly6s0dn4",$$css:!0}};function MA({definition:e}){const{focusMainView:t,isMainViewFocused:n}=Ys(),{rootQuery:r,setQuery:o}=u.useContext(Ut),{monaco:s,modelDef:l}=u.useContext(jv),i=De();if(!r)return null;const a=r.isEmpty();return c.jsx(kv,{children:c.jsxs(rd,{title:"Main query",isFocused:n,controls:c.jsxs(c.Fragment,{children:[c.jsx(Ta,{trigger:c.jsx(be,{variant:"flat",icon:"meatballs",size:"compact",tooltip:"More Actions"}),children:o?c.jsxs(c.Fragment,{children:[c.jsx(tr,{icon:"clear",label:"Clear query",onClick:()=>{t(),o(void 0)},disabled:r.isEmpty()}),c.jsx(tr,{icon:"nest",label:"Nest query",onClick:()=>{e instanceof Y.ASTArrowQueryDefinition&&e.view.convertToNest("Nest"),i()},disabled:a||!(e instanceof Y.ASTArrowQueryDefinition)}),s&&l?c.jsx(tr,{icon:"malloy",label:"Convert to Malloy",onClick:()=>{o(r.toMalloy())}}):null]}):c.jsx(c.Fragment,{})}),e instanceof Y.ASTArrowQueryDefinition?c.jsx(_v,{view:e}):null]}),collapsedControls:c.jsx(ne,{name:vy(r.getTag())}),children:[e instanceof Y.ASTArrowQueryDefinition?c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[!a&&c.jsx(dv,{view:r}),c.jsx(bs,{view:e,viewDef:e.view})]}):null,a?c.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mlyng8ra",children:c.jsxs("div",{className:"mly78zum5 mly6s0dn4 mlywzxoxx",children:[c.jsx("div",{children:"Click"}),c.jsx(ne,{name:"insert",color:"disabled"}),c.jsx("div",{children:"to get started"})]})}):null]})})}function AA({definition:e}){return e instanceof Y.ASTArrowQueryDefinition?c.jsx("div",{...S.props(wt.queryCard,IA.content),children:c.jsxs("div",{...S.props(wt.labelWithIcon),children:[c.jsx(ne,{name:"database"}),c.jsx("div",{className:"mlyb3r6kr mlylyipyv mly117nqv4",children:e.source.getSourceInfo().name})]})}):null}const IA={content:{display:"mlyrvj5dj",gridAutoFlow:"mly1mt1orb",gridTemplateColumns:"mlybyjr8",gap:"mly1jnr06f",rowGap:null,columnGap:null,$$css:!0}};function PA({value:e,setValue:t,customStyle:n}){const[r,o]=u.useState(""),[s,l]=u.useState(!1),i=u.useRef(null),a=u.useRef(null),d=e.kind==="date_literal",f=d?e.date_value:e.timestamp_value,m=d?"day":"second",p=h=>{h?(o(""),t(d?{kind:"date_literal",date_value:L.utc(h).format(vo.day)}:{kind:"timestamp_literal",timestamp_value:L.utc(h).format(vo.second)})):o("Invalid date")};return cv([i,a],()=>{l(!1)}),c.jsxs(sl,{open:s,onOpenChange:()=>{},children:[c.jsx(_a,{asChild:!0,children:c.jsx("div",{...S.props(Qn.main,os.wrapper,n),children:c.jsx(Ii,{value:L.utc(f).toDate(),setValue:p,units:m,onFocus:()=>l(!0),customStyle:{...os.input,...d?os.dateInput:os.timestampInput},forwardRef:i})})}),r&&c.jsx(ea,{errorMessage:r}),c.jsx(ll,{children:c.jsx(ka,{align:"center",asChild:!0,children:c.jsx(Hd,{value:L.utc(f).toDate(),setValue:p,units:m,maxLevel:m,customStyle:os.datePicker,forwardRef:a})})})]})}const os={input:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,height:"mlyd7y6wv",backgroundColor:"mlyjbqb8w mlytw1abo",$$css:!0},dateInput:{width:"mly869kya",$$css:!0},timestampInput:{width:"mlynrytzq",$$css:!0},wrapper:{$$css:!0},datePicker:{display:"mly78zum5",flexDirection:"mlydt5ytf",boxShadow:"mly5n1uv4",backgroundColor:"mly12peec7",borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,width:"mly1hfn5x7",$$css:!0}};function DA({filterType:e,value:t,setValue:n}){let r=null;switch(e){case"string_type":{const{parsed:d}=Zt.StringFilterExpression.parse(t.filter_expression_value);r={kind:"string",parsed:d}}break;case"number_type":{const{parsed:d}=Zt.NumberFilterExpression.parse(t.filter_expression_value);r={kind:"number",parsed:d}}break;case"boolean_type":{const{parsed:d}=Zt.BooleanFilterExpression.parse(t.filter_expression_value);r={kind:"boolean",parsed:d}}break;case"date_type":{const{parsed:d}=Zt.TemporalFilterExpression.parse(t.filter_expression_value);r={kind:"date",parsed:d}}break;case"timestamp_type":{const{parsed:d}=Zt.TemporalFilterExpression.parse(t.filter_expression_value);r={kind:"timestamp",parsed:d}}break;case"timestamptz_type":{const{parsed:d}=Zt.TemporalFilterExpression.parse(t.filter_expression_value);r={kind:"timestamptz",parsed:d}}}const{op:o,value:s}=Cv(r,t.filter_expression_value),l=`${o} ${s}`,i={kind:"dimension",name:"parameter",type:{kind:e}},a=d=>{switch(d.kind){case"string":n({kind:"filter_expression_literal",filter_expression_value:Zt.StringFilterExpression.unparse(d.parsed)});break;case"boolean":n({kind:"filter_expression_literal",filter_expression_value:Zt.BooleanFilterExpression.unparse(d.parsed)});break;case"number":n({kind:"filter_expression_literal",filter_expression_value:Zt.NumberFilterExpression.unparse(d.parsed)});break;case"date":case"timestamp":case"timestamptz":n({kind:"filter_expression_literal",filter_expression_value:Zt.TemporalFilterExpression.unparse(d.parsed)});break}};return c.jsx(zs,{fieldInfo:i,path:[],filter:r,setFilter:a,trigger:c.jsx(Ne,{label:l}),layoutProps:{align:"start",side:"bottom",sideOffset:1}})}function OA({value:e,filterType:t,setValue:n,customStyle:r}){if(!e)return null;switch(e.kind){case"boolean_literal":return c.jsx(ks,{value:e.boolean_value?"true":"false",items:[{label:"true",value:"true"},{label:"false",value:"false"}],onChange:o=>n({kind:"boolean_literal",boolean_value:o==="true"}),customStyle:r});case"date_literal":case"timestamp_literal":return c.jsx(PA,{value:e,setValue:n,customStyle:r});case"null_literal":return c.jsx(Ne,{label:"∅"});case"number_literal":return c.jsx($c,{value:e.number_value,type:"number",onChange:o=>n({kind:"number_literal",number_value:o}),customStyle:r});case"string_literal":return c.jsx($c,{value:e.string_value,onChange:o=>n({kind:"string_literal",string_value:o}),customStyle:r});case"filter_expression_literal":return c.jsx(DA,{value:e,filterType:t,setValue:n,customStyle:r})}}function NA({definition:e}){const t=De();if(e instanceof Y.ASTArrowQueryDefinition&&e.source instanceof Y.ASTReferenceQueryArrowSource){const{source:n}=e,r=n.getSourceParameters();return!r||r.length===0?null:c.jsx(rd,{title:"Source parameters",children:c.jsx("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f mlynm25rq",children:r.map(o=>{var s;return c.jsxs(Hs,{customStyle:$A.tokenGroup,children:[c.jsx(Ne,{icon:Ma(o.type.kind),label:o.name}),c.jsx(OA,{filterType:o.type.kind==="filter_expression_type"?o.type.filter_type.kind:"string_type",value:((s=n.tryGetParameter(o.name))==null?void 0:s.parameter.value)??o.default_value,setValue:l=>{n.setParameter(o.name,l),t()}})]},o.name)})})})}return null}const $A={tokenGroup:{display:"mly78zum5",$$css:!0}};function zA(){const{rootQuery:e}=u.useContext(Ut);if(!e)return console.error("No a stable query available"),null;const{definition:t}=e;return c.jsxs("div",{...S.props(F.body,FA.main),children:[c.jsx(AA,{definition:t}),c.jsx(NA,{definition:t}),c.jsx(MA,{definition:t})]})}const FA={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",overflow:"mlyysyzu8",overflowX:null,overflowY:null,gap:"mly167g77z",rowGap:null,columnGap:null,padding:"mly1fut7tt",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};function DP({runQuery:e,runQueryString:t}){const{theme:n}=u.useContext(Me),{query:r,setQuery:o}=u.useContext(Ut);return c.jsxs("div",{...S.props(BA.main,n),children:[c.jsx(zR,{runQuery:e,runQueryString:t}),typeof r=="string"?c.jsx(TA,{language:"malloy",value:r,onChange:o}):c.jsx(zA,{})]})}const BA={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",height:"mly5yr21d",background:"mlycuvecc",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRightWidth:"mlys1s249",borderInlineStartWidth:null,borderInlineEndWidth:null,borderRightStyle:"mly32b0ac",borderInlineStartStyle:null,borderInlineEndStyle:null,borderRightColor:"mlyv3cp8q",borderInlineStartColor:null,borderInlineEndColor:null,$$css:!0}};function qA({viewInfo:e,onClick:t}){const n=zy(e.annotations??[]);return c.jsx("div",{children:c.jsx(e7,{header:c.jsxs("div",{children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib",children:[c.jsx(Hn,{label:"view",icon:"view_filled",color:"purple",customStyle:zp.viewBadge}),c.jsx(be,{variant:"default",size:"compact",label:"Add",onClick:t})]}),c.jsxs("div",{children:[c.jsx("div",{...S.props(F.emphasized),children:e.name}),n&&c.jsx(mv,{text:n})]})]}),customStyle:zp.card,children:c.jsx(Cf,{viewInfo:e})})})}const zp={viewBadge:{backgroundColor:"mlyjbqb8w",$$css:!0},card:{width:"mlyxsgkw5",$$css:!0}};function WA({views:e,onSelectView:t}){const{theme:n}=u.useContext(Me);return c.jsx("div",{...S.props(Fp.page,n),children:c.jsxs("div",{className:"mly1bpp3o7 mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4",children:[c.jsx("div",{...S.props(Fp.header,F.emphasized),children:"Start with a Bookmarked View"}),c.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4 mly1a02dak mly883omv mlym6i5cn",children:e.filter(r=>!pf(r.annotations??[])).slice(0,3).map(r=>c.jsx(qA,{viewInfo:r,onClick:()=>{t(r)}},r.name))})]})})}const Fp={page:{display:"mly78zum5",flexDirection:"mlydt5ytf",width:"mlyh8yej3",height:"mly5yr21d",overflow:"mlyysyzu8",overflowX:null,overflowY:null,backgroundColor:"mly1yduej5",$$css:!0},header:{paddingBottom:"mly1l90r2v",$$css:!0}};var Sf="Tabs",[GA]=Gt(Sf,[Ea]),Tv=Ea(),[UA,Ef]=GA(Sf),Lv=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:l="horizontal",dir:i,activationMode:a="automatic",...d}=e,f=Vs(i),[m,p]=lr({prop:r,onChange:o,defaultProp:s});return c.jsx(UA,{scope:n,baseId:Lt(),value:m,onValueChange:p,orientation:l,dir:f,activationMode:a,children:c.jsx(Q.div,{dir:f,"data-orientation":l,...d,ref:t})})});Lv.displayName=Sf;var Mv="TabsList",Av=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Ef(Mv,n),l=Tv(n);return c.jsx($0,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:r,children:c.jsx(Q.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Av.displayName=Mv;var Iv="TabsTrigger",Pv=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,l=Ef(Iv,n),i=Tv(n),a=Nv(l.baseId,r),d=$v(l.baseId,r),f=r===l.value;return c.jsx(z0,{asChild:!0,...i,focusable:!o,active:f,children:c.jsx(Q.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:a,...s,ref:t,onMouseDown:z(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:z(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:z(e.onFocus,()=>{const m=l.activationMode!=="manual";!f&&!o&&m&&l.onValueChange(r)})})})});Pv.displayName=Iv;var Dv="TabsContent",Ov=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...l}=e,i=Ef(Dv,n),a=Nv(i.baseId,r),d=$v(i.baseId,r),f=r===i.value,m=u.useRef(f);return u.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),c.jsx(Ke,{present:o||f,children:({present:p})=>c.jsx(Q.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":a,hidden:!p,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:p&&s})})});Ov.displayName=Dv;function Nv(e,t){return`${e}-trigger-${t}`}function $v(e,t){return`${e}-content-${t}`}var YA=Lv,VA=Av,Gl=Pv,Ul=Ov;const HA={compiling:"Compiling",running:"Running",finished:"Finished",canceled:"Canceled"},XA="start",ZA="bottom";function KA({runInfo:e}){return c.jsxs(jo,{children:[c.jsx(To,{asChild:!0,children:c.jsxs("div",{...S.props(Rc.triggerContentContainer,F.body),children:[c.jsx(ne,{name:"info",color:"disabled"})," Query run details"]})}),c.jsx(Lo,{children:c.jsx(Mo,{side:ZA,align:XA,children:c.jsx(wf,{customStyle:Rc.card,children:c.jsxs(c.Fragment,{children:[e.customContent,e?.performanceAspects&&Object.entries(e.performanceAspects).map(([t,n])=>c.jsx("div",{children:Object.entries(n).map(([r,o])=>c.jsxs("div",{children:[c.jsxs("span",{...S.props(F.emphasized),children:[r,":"]})," ",c.jsx("span",{...S.props(F.body),children:o})]},r))},t)),e.queryLink&&c.jsx("a",{href:e.queryLink.href,target:"_blank",rel:"noreferrer",...S.props(Rc.link,F.link),children:e.queryLink.linkText})]})})})})]})}const Rc={card:{maxWidth:"mly1dc814f",$$css:!0},triggerContentContainer:{display:"mly3nfvp2",alignItems:"mly6s0dn4",justifyContent:"mlylqzeqv",$$css:!0},link:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",textDecoration:"mly1hl2dhg",textDecorationColor:null,textDecorationLine:null,textDecorationStyle:null,textDecorationThickness:null,$$css:!0}};function QA({source:e,query:t}){let n;switch(t.executionState){case"compiling":case"running":n=c.jsx(nI,{onCancel:t.onCancel,executionState:t.executionState,queryResolutionStartMillis:t.queryResolutionStartMillis});break;case"canceled":n=c.jsx("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[c.jsx("div",{...S.props(F.emphasized),children:"Query Canceled"}),c.jsx("div",{...S.props(F.body),children:"Your query was canceled; nothing to display."})]})});break;case"finished":n=c.jsx(JA,{source:e,response:t.response});break}return n}function JA({source:e,response:t}){let n=null;return t?t.error||t.messages?n=c.jsx(eI,{messages:[...t.error?[t.error]:[],...t.messages?t.messages:[]]}):t.result||(n=c.jsx(pu,{title:"Empty Result",variant:"critical"})):n=c.jsx(pu,{title:"Empty Response",variant:"critical"}),c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly167g77z mly5yr21d",children:[t?.runInfo&&c.jsx(KA,{runInfo:t.runInfo}),n,t?.result&&c.jsx(tI,{result:t.result,source:e})]})}function eI({messages:e}){return c.jsx("div",{children:e.map(t=>{let n=null;if(t.customRenderer)n=t.customRenderer;else{let r;switch(t.severity){case"DEBUG":case"INFO":r="info";break;case"WARN":r="warn";break;case"ERROR":case"FATAL":r="critical";break;default:r="critical"}n=c.jsx(pu,{title:t.title,description:t.description,variant:r,children:t.content})}return c.jsx("div",{children:n},t.title)})})}function tI({result:e,source:t}){const{onDrill:n,setQuery:r}=u.useContext(Ut),o=u.useRef(null),s=u.useMemo(()=>new Xp().createViz({onDrill:a=>{if(n){n(a);return}const{stableQuery:d}=a,f=new Y.ASTQuery({query:d,source:t});r(f.build())},tableConfig:{enableDrill:!0}}),[n,t,r]);return u.useEffect(()=>{o.current&&s&&(s.setResult(e),o.current.innerHTML="",s.render(o.current))},[s,e]),s?c.jsx("div",{ref:o,className:"mly5yr21d mly1n2onr6 mly1ja2u2z mlyb3r6kr mlyh8yej3"}):c.jsx("div",{className:"mly78zum5 mlyl56j7k mly6s0dn4",children:c.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4 mly167g77z",children:[c.jsx(L1,{size:"large"}),c.jsx("div",{...S.props(F.emphasized),children:"Rendering..."})]})})}function nI({onCancel:e,executionState:t,queryResolutionStartMillis:n}){const r=rI(n);return c.jsxs("div",{className:"mly78zum5 mlydt5ytf mlyh8yej3 mly5yr21d mlyl56j7k mly6s0dn4 mly1665zp3",children:[c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z",children:[c.jsx(L1,{size:"large",customStyle:oI.spinner}),c.jsx("div",{...S.props(F.emphasized),children:`${HA[t]} query...`}),c.jsx("div",{...S.props(F.body),children:`Total time elapsed: ${(r/1e3).toFixed(0)}s`})]}),c.jsx(be,{onClick:e,label:"Cancel Query"})]})}function rI(e){const[t,n]=u.useState(Date.now()-e);return u.useEffect(()=>{const r=setInterval(()=>{n(Date.now()-e)},1e3);return()=>clearInterval(r)},[e]),t}const oI={spinner:{marginBottom:"mly1e56ztr",$$css:!0}};function sI({query:e,debug:t}){var n;const[r,o]=u.useState((n=t?.debuggers)==null?void 0:n.at(0));return c.jsxs("div",{children:[!!t?.debuggers.length&&c.jsxs("div",{className:"mly78zum5 mly167g77z mly6s0dn4",children:[c.jsx("div",{...S.props(F.largeBody),children:"Debug with:"}),c.jsx(pn,{options:t.debuggers.map(s=>({label:s,value:s})),value:r,onChange:s=>o(s)}),c.jsx(be,{variant:"default",label:"Run",isDisabled:!r,onClick:()=>r&&t.onDebugQuery(e,r)})]}),c.jsx(su,{code:JSON.stringify(e,null,2),language:"json"})]})}const lI=800;function iI({text:e,label:t}){const[n,r]=u.useState(!1);return u.useEffect(()=>{if(!n)return()=>{};const o=setTimeout(()=>{r(!1)},lI);return()=>{clearTimeout(o),r(!1)}},[n]),c.jsx(be,{variant:"flat",size:"compact",label:n?"Copied!":t,icon:"copy",isDisabled:n,onClick:()=>{navigator.clipboard.writeText(e).then(()=>r(!0))}})}class zv{constructor(t,n){this.stream=t,this.result=n}}class aI extends zv{async process(t){this.stream.write(`[
|
|
447
|
+
`);let n=!0;for await(const r of t){n?n=!1:this.stream.write(`,
|
|
448
|
+
`);const s=JSON.stringify(ju(this.result.schema.fields.filter(l=>l.kind==="dimension"),r.record_value),null,2).split(`
|
|
449
|
+
`);for(let l=0;l<s.length;l++){const i=s[l];this.stream.write(` ${i}`),l<s.length-1&&this.stream.write(`
|
|
450
|
+
`)}}this.stream.write(`
|
|
451
|
+
]
|
|
452
|
+
`),this.stream.close()}}class cI extends zv{constructor(){super(...arguments),this.columnSeparator=",",this.rowSeparator=`
|
|
453
|
+
`,this.quoteCharacter='"',this.includeHeader=!0,this.emptyCell=""}escape(t){const n=t.includes(this.quoteCharacter),r=t.includes(this.columnSeparator),o=t.includes(this.rowSeparator),s=r||n||o;return n&&(t=t.replace(new RegExp(this.quoteCharacter,"g"),this.quoteCharacter+this.quoteCharacter)),s&&(t=this.quoteCharacter+t+this.quoteCharacter),t}stringify(t){switch(t.kind){case"string_cell":return this.escape(t.string_value);case"boolean_cell":return JSON.stringify(t.boolean_value);case"number_cell":return JSON.stringify(t.number_value);case"date_cell":return t.date_value;case"timestamp_cell":return t.timestamp_value;case"json_cell":return this.escape(t.json_value);case"null_cell":return this.emptyCell;case"sql_native_cell":return this.escape(t.sql_native_value)}return""}getColWeight(t){let n=0;for(const r of t)if(n=n+1,r.type.kind==="array_type"&&r.type.element_type.kind==="record_type"){const o=this.getColWeight(r.type.element_type.fields)-1;n=n+o}return n}getHeaderRow(t){const n=[];let r=0;for(const o of t)if(n.push(this.escape(o.name)),r++,o.type.kind==="array_type"&&o.type.element_type.kind==="record_type"){const s=this.getColWeight(o.type.element_type.fields)-1;r=r+s;for(let l=0;l<s;l++)n.push(this.emptyCell)}return{rows:[n.join(this.columnSeparator)],length:1,width:r}}mergeMatrices(t){const n=Math.max(...t.map(s=>s.length)),r=t.reduce((s,l)=>s+l.width,0),o=[];for(let s=0;s<n;s++){const l=[];for(const i of t)if(s<i.length)l.push(i.rows[s]);else{const a=Array(i.width).fill(this.emptyCell);l.push(...a)}o.push(l.join(this.columnSeparator))}return{rows:o,length:n,width:r}}getChildMatrix(t,n){if(n.kind!=="array_cell")return{rows:["Invalid data found, value is not an array"],length:1,width:1};if(n.array_value.length===0)return{rows:[""],length:1,width:1};const r=[],o=this.getHeaderRow(t);r.push(...o.rows);const s=o.width;let l=1;for(const i of n.array_value)if(i.kind==="record_cell"){const a=this.getRowMatrix(t,i.record_value);l=l+a.length,r.push(...a.rows)}return{rows:r,length:l,width:s}}getRowMatrix(t,n){const r=[];for(let o=0;o<t.length;o++){const s=t[o],l=n[o];if(s.type.kind==="array_type"&&s.type.element_type.kind==="record_type"){const i=this.getChildMatrix(s.type.element_type.fields,l);r.push(i)}else{const i={rows:[this.stringify(l)],length:1,width:1};r.push(i)}}return this.mergeMatrices(r)}async process(t){let n=!1;for await(const r of t){const o=this.result.schema.fields.filter(l=>l.kind==="dimension");if(!n&&this.includeHeader){const l=this.getHeaderRow(o);this.stream.write(l.rows[0]),this.stream.write(this.rowSeparator),n=!0}const s=this.getRowMatrix(o,r.record_value);for(const l of s.rows)this.stream.write(l),this.stream.write(this.rowSeparator)}this.stream.close()}}function ju(e,t){const n={};for(let r=0;r<e.length;r++){const o=e[r],s=t[r];switch(s.kind){case"string_cell":n[o.name]=s.string_value;break;case"boolean_cell":n[o.name]=s.boolean_value;break;case"date_cell":n[o.name]=s.date_value;break;case"timestamp_cell":n[o.name]=s.timestamp_value;break;case"number_cell":n[o.name]=s.number_value;break;case"json_cell":n[o.name]=s.json_value;break;case"record_cell":n[o.name]=ju(e,s.record_value);break;case"array_cell":if(o.type.kind==="array_type"&&o.type.element_type.kind==="record_type"){const l=[];for(const i of s.array_value)i.kind==="record_cell"&&l.push(ju(o.type.element_type.fields,i.record_value));n[o.name]=l}break;case"null_cell":n[o.name]=null;break;case"sql_native_cell":n[o.name]=s.sql_native_value;break}}return n}async function*uI(e){var t;if(((t=e.data)==null?void 0:t.kind)==="array_cell")for(const n of e.data.array_value)n.kind==="record_cell"&&(yield n)}function dI({name:e="malloy",source:t,submittedQuery:n}){var r;const[o,s]=u.useState(""),[l,i]=u.useState(""),[a,d]=u.useState("csv"),{onDownload:f}=u.useContext(Ut);return u.useEffect(()=>{var m;if(f)return;const p=(m=n?.response)==null?void 0:m.result;if(!p){s("");return}(async()=>{if(!n?.response){s("");return}const y=new fI;let g,v,b;a==="json"?(g=new aI(y,p),v="text/json",b=`${e}.json`):(g=new cI(y,p),v="text/csv",b=`${e}.csv`);const w=uI(p);await g.process(w),y.close();const x=y.data,_=new Blob([x],{type:v});s(window.URL.createObjectURL(_)),i(b)})()},[e,a,f,n]),u.useEffect(()=>()=>{o&&window.URL.revokeObjectURL(o)},[o]),o?c.jsxs("a",{href:o,download:l,...Vu(mI.link,F.body),style:{textDecoration:"none",color:Lh.primary},children:[c.jsx(ne,{name:"download"}),c.jsx("div",{children:"Download CSV"})]}):f&&((r=n?.response)!=null&&r.result)?c.jsx(be,{onClick:()=>f({source:t,submittedQuery:n,name:e,format:"csv"}),icon:"download",label:"Download CSV"}):null}class fI{constructor(){this._data=[]}write(t){this._data.push(t)}close(){}get data(){return this._data.join("")}}const mI={link:{display:"mly78zum5",alignContent:"mlyc26acl",gap:"mly167g77z",rowGap:null,columnGap:null,background:"mly1md70p1 mly1xbhkwo mly1v24qdc",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,padding:"mlyfawy5m",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};var Ie=(function(e){return e.RESULTS="Results",e.MALLOY="Malloy",e.SQL="SQL",e.RAW_QUERY="Raw Query",e})(Ie||{});function OP({source:e,draftQuery:t,setDraftQuery:n,submittedQuery:r,options:o}){var s,l,i;const{theme:a}=u.useContext(Me),[d,f]=u.useState(Ie.MALLOY),m=(s=Sh(e,t))==null?void 0:s.toMalloy(),p=e.schema.fields.filter(b=>b.kind==="view"),h=r!==void 0;!h&&(d===Ie.RESULTS||d===Ie.SQL)&&f(Ie.MALLOY),u.useEffect(()=>{f(Ie.RESULTS)},[r]);const y=(()=>{var b,w;return d===Ie.MALLOY&&m?m:d===Ie.SQL&&((w=(b=r?.response)==null?void 0:b.result)!=null&&w.sql)?r.response.result.sql:d===Ie.RAW_QUERY?JSON.stringify(t):null})(),g=typeof t=="object",v=o?.showRawQuery&&typeof t=="object";return t||r?c.jsxs(YA,{...S.props(Jt.tabRoot,F.body,a),value:d,onValueChange:b=>f(b),children:[c.jsxs("div",{className:"mly78zum5 mly1q0g3np mly1qughib mly6s0dn4 mly153ncpu",children:[c.jsxs(VA,{className:"mly78zum5 mly6s0dn4 mly167g77z",children:[c.jsx(Gl,{value:Ie.RESULTS,disabled:!h,...S.props(F.body,Jt.tab,!h&&Jt.disabledTab),title:h?void 0:"Run a query to see the results.",children:Ie.RESULTS}),g&&c.jsx(Gl,{value:Ie.MALLOY,...S.props(F.body,Jt.tab),children:Ie.MALLOY}),c.jsx(Gl,{value:Ie.SQL,disabled:!h,...S.props(F.body,Jt.tab,!h&&Jt.disabledTab),title:h?void 0:"Run a query to see generated SQL.",children:Ie.SQL}),v&&c.jsx(Gl,{value:Ie.RAW_QUERY,...S.props(F.body,Jt.tab),children:Ie.RAW_QUERY})]}),d!==Ie.RESULTS&&y&&c.jsx(iI,{text:y,label:"Copy Code"}),d===Ie.RESULTS&&c.jsx(dI,{source:e,submittedQuery:r})]}),c.jsxs("div",{className:"mly1iyjqo2 mlyb3r6kr",children:[c.jsx(Ul,{value:Ie.RESULTS,className:"mlyc7ga6q mlyh8yej3 mly5yr21d mly9f619",children:r&&c.jsxs(c.Fragment,{children:[t&&r&&!pI(t,r.query)&&c.jsxs("div",{...S.props(Jt.warning,F.body),children:[c.jsx(ne,{name:"warning",color:"warning",customStyle:Jt.warningIcon}),c.jsxs("div",{children:[c.jsx("span",{children:"Query was updated. Run query to see new result or"}),c.jsx("button",{...S.props(Jt.warningAction,F.link),onClick:()=>{n(r.query)},children:" revert "}),c.jsx("span",{children:"to the last run query."})]})]}),c.jsx(QA,{source:e,query:r})]})}),c.jsx(Ul,{value:Ie.MALLOY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:c.jsx(su,{code:m??"",language:"malloy"})}),c.jsx(Ul,{value:Ie.SQL,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:((i=(l=r?.response)==null?void 0:l.result)==null?void 0:i.sql)&&c.jsx(su,{code:r.response.result.sql,language:"sql"})}),v&&c.jsx(Ul,{value:Ie.RAW_QUERY,className:"mlywp4ipm mlyh8yej3 mly5yr21d mly9f619",children:c.jsx(sI,{query:t,debug:o.debugOptions?{debuggers:o.debugOptions.debuggers,onDebugQuery:o.debugOptions.onDebugQuery}:void 0})})]})]}):c.jsx(WA,{views:p,onSelectView:b=>n(hI(b.name,e.name))})}function pI(e,t){return JSON.stringify(e)===JSON.stringify(t)}function hI(e,t){return{definition:{kind:"arrow",source:{kind:"source_reference",name:t},view:{kind:"view_reference",name:e}}}}const Jt={tabRoot:{height:"mly5yr21d",width:"mlyh8yej3",display:"mly78zum5",flexDirection:"mlydt5ytf",backgroundColor:"mly1yduej5",$$css:!0},tab:{border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mlydqdrvq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,borderRadius:"mlyur7f20",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,backgroundColor:"mlyjbqb8w",cursor:"mly1ypdohk",":is([data-state='active'])_color":"mlyb0tsu4",":is([data-state='active'])_fontWeight":"mly1uifvsu",":is([data-state='active'])_backgroundColor":"mly14vaotu",$$css:!0},disabledTab:{color:"mlywzxoxx",cursor:"mly1ipiool",$$css:!0},warning:{display:"mly78zum5",alignItems:"mly6s0dn4",marginBottom:"mly1e56ztr",$$css:!0},warningAction:{backgroundColor:"mlyjbqb8w",border:"mly1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,padding:"mly1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"mly1ypdohk",$$css:!0},warningIcon:{paddingRight:"mlyy13l1i",paddingInlineStart:null,paddingInlineEnd:null,$$css:!0}};function vt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Bp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fv(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Bp(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Bp(e[o],null)}}}}function jr(...e){return u.useCallback(Fv(...e),e)}function Bv(e,t=[]){let n=[];function r(s,l){const i=u.createContext(l),a=n.length;n=[...n,l];const d=m=>{var p;const{scope:h,children:y,...g}=m,v=((p=h?.[e])==null?void 0:p[a])||i,b=u.useMemo(()=>g,Object.values(g));return c.jsx(v.Provider,{value:b,children:y})};d.displayName=s+"Provider";function f(m,p){var h;const y=((h=p?.[e])==null?void 0:h[a])||i,g=u.useContext(y);if(g)return g;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[d,f]}const o=()=>{const s=n.map(l=>u.createContext(l));return function(i){const a=i?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:a}}),[i,a])}};return o.scopeName=e,[r,gI(o,...t)]}function gI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((i,{useScope:a,scopeName:d})=>{const m=a(s)[`__scope${d}`];return{...i,...m}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Tu(e){const t=yI(e),n=u.forwardRef((r,o)=>{const{children:s,...l}=r,i=u.Children.toArray(s),a=i.find(bI);if(a){const d=a.props.children,f=i.map(m=>m===a?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:m);return c.jsx(t,{...l,ref:o,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return c.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function yI(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const l=xI(o),i=wI(s,o.props);return o.type!==u.Fragment&&(i.ref=r?Fv(r,l):l),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vI=Symbol("radix.slottable");function bI(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vI}function wI(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const a=s(...i);return o(...i),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function xI(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function CI(e){const t=e+"CollectionProvider",[n,r]=Bv(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=g=>{const{scope:v,children:b}=g,w=me.useRef(null),x=me.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:x,collectionRef:w,children:b})};l.displayName=t;const i=e+"CollectionSlot",a=Tu(i),d=me.forwardRef((g,v)=>{const{scope:b,children:w}=g,x=s(i,b),_=jr(v,x.collectionRef);return c.jsx(a,{ref:_,children:w})});d.displayName=i;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=Tu(f),h=me.forwardRef((g,v)=>{const{scope:b,children:w,...x}=g,_=me.useRef(null),C=jr(v,_),E=s(f,b);return me.useEffect(()=>(E.itemMap.set(_,{ref:_,...x}),()=>void E.itemMap.delete(_))),c.jsx(p,{[m]:"",ref:C,children:w})});h.displayName=f;function y(g){const v=s(e+"CollectionConsumer",g);return me.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((E,k)=>x.indexOf(E.ref.current)-x.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:l,Slot:d,ItemSlot:h},y,r]}var _I=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hn=_I.reduce((e,t)=>{const n=Tu(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:l,...i}=o,a=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qv(e,t){e&&Nt.flushSync(()=>e.dispatchEvent(t))}function Tr(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function kI(e,t=globalThis?.document){const n=Tr(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var SI="DismissableLayer",Lu="dismissableLayer.update",EI="dismissableLayer.pointerDownOutside",RI="dismissableLayer.focusOutside",qp,Wv=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gv=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:i,...a}=e,d=u.useContext(Wv),[f,m]=u.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),y=jr(t,k=>m(k)),g=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,C=TI(k=>{const R=k.target,j=[...d.branches].some(M=>M.contains(R));!_||j||(o?.(k),l?.(k),k.defaultPrevented||i?.())},p),E=LI(k=>{const R=k.target;[...d.branches].some(M=>M.contains(R))||(s?.(k),l?.(k),k.defaultPrevented||i?.())},p);return kI(k=>{w===d.layers.size-1&&(r?.(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},p),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(qp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Wp(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qp)}},[f,p,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Wp())},[f,d]),u.useEffect(()=>{const k=()=>h({});return document.addEventListener(Lu,k),()=>document.removeEventListener(Lu,k)},[]),c.jsx(hn.div,{...a,ref:y,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:vt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:vt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:vt(e.onPointerDownCapture,C.onPointerDownCapture)})});Gv.displayName=SI;var jI="DismissableLayerBranch",Uv=u.forwardRef((e,t)=>{const n=u.useContext(Wv),r=u.useRef(null),o=jr(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(hn.div,{...e,ref:o})});Uv.displayName=jI;function TI(e,t=globalThis?.document){const n=Tr(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let a=function(){Yv(EI,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LI(e,t=globalThis?.document){const n=Tr(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&Yv(RI,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Wp(){const e=new CustomEvent(Lu);document.dispatchEvent(e)}function Yv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qv(o,s):o.dispatchEvent(s)}var MI=Gv,AI=Uv,qs=globalThis?.document?u.useLayoutEffect:()=>{},II="Portal",Vv=u.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[s,l]=u.useState(!1);qs(()=>l(!0),[]);const i=r||s&&((n=globalThis?.document)==null?void 0:n.body);return i?Hp.createPortal(c.jsx(hn.div,{...o,ref:t}),i):null});Vv.displayName=II;function PI(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Hv=e=>{const{present:t,children:n}=e,r=DI(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=jr(r.ref,OI(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Hv.displayName="Presence";function DI(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),l=e?"mounted":"unmounted",[i,a]=PI(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=Yl(r.current);s.current=i==="mounted"?d:"none"},[i]),qs(()=>{const d=r.current,f=o.current;if(f!==e){const p=s.current,h=Yl(d);e?a("MOUNT"):h==="none"||d?.display==="none"?a("UNMOUNT"):a(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),qs(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Yl(r.current).includes(h.animationName);if(h.target===t&&g&&(a("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(s.current=Yl(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Yl(e){return e?.animationName||"none"}function OI(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var NI=Vp[" useInsertionEffect ".trim().toString()]||qs;function $I({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=zI({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const m=f.current;m!==i&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const d=u.useCallback(f=>{var m;if(i){const p=FI(f)?f(e):f;p!==e&&((m=l.current)==null||m.call(l,p))}else s(f)},[i,e,s,l]);return[a,d]}function zI({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return NI(()=>{s.current=t},[t]),u.useEffect(()=>{var l;o.current!==n&&((l=s.current)==null||l.call(s,n),o.current=n)},[n,o]),[n,r,s]}function FI(e){return typeof e=="function"}var BI=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qI="VisuallyHidden",Rf=u.forwardRef((e,t)=>c.jsx(hn.span,{...e,ref:t,style:{...BI,...e.style}}));Rf.displayName=qI;var jf="ToastProvider",[Tf,WI,GI]=CI("Toast"),[Xv]=Bv("Toast",[GI]),[UI,$a]=Xv(jf),Zv=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:l}=e,[i,a]=u.useState(null),[d,f]=u.useState(0),m=u.useRef(!1),p=u.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${jf}\`. Expected non-empty \`string\`.`),c.jsx(Tf.Provider,{scope:t,children:c.jsx(UI,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:d,viewport:i,onViewportChange:a,onToastAdd:u.useCallback(()=>f(h=>h+1),[]),onToastRemove:u.useCallback(()=>f(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:p,children:l})})};Zv.displayName=jf;var Kv="ToastViewport",YI=["F8"],Mu="toast.viewportPause",Au="toast.viewportResume",Qv=u.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=YI,label:o="Notifications ({hotkey})",...s}=e,l=$a(Kv,n),i=WI(n),a=u.useRef(null),d=u.useRef(null),f=u.useRef(null),m=u.useRef(null),p=jr(t,m,l.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=l.toastCount>0;u.useEffect(()=>{const v=b=>{var w;r.length!==0&&r.every(_=>b[_]||b.code===_)&&((w=m.current)==null||w.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),u.useEffect(()=>{const v=a.current,b=m.current;if(y&&v&&b){const w=()=>{if(!l.isClosePausedRef.current){const E=new CustomEvent(Mu);b.dispatchEvent(E),l.isClosePausedRef.current=!0}},x=()=>{if(l.isClosePausedRef.current){const E=new CustomEvent(Au);b.dispatchEvent(E),l.isClosePausedRef.current=!1}},_=E=>{!v.contains(E.relatedTarget)&&x()},C=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",w),v.addEventListener("focusout",_),v.addEventListener("pointermove",w),v.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",w),v.removeEventListener("focusout",_),v.removeEventListener("pointermove",w),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,l.isClosePausedRef]);const g=u.useCallback(({tabbingDirection:v})=>{const w=i().map(x=>{const _=x.ref.current,C=[_,...lP(_)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?w.reverse():w).flat()},[i]);return u.useEffect(()=>{const v=m.current;if(v){const b=w=>{var x,_,C;const E=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!E){const R=document.activeElement,j=w.shiftKey;if(w.target===v&&j){(x=d.current)==null||x.focus();return}const $=g({tabbingDirection:j?"backwards":"forwards"}),X=$.findIndex(A=>A===R);jc($.slice(X+1))?w.preventDefault():j?(_=d.current)==null||_.focus():(C=f.current)==null||C.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[i,g]),c.jsxs(AI,{ref:a,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(Iu,{ref:d,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});jc(v)}}),c.jsx(Tf.Slot,{scope:n,children:c.jsx(hn.ol,{tabIndex:-1,...s,ref:p})}),y&&c.jsx(Iu,{ref:f,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});jc(v)}})]})});Qv.displayName=Kv;var Jv="ToastFocusProxy",Iu=u.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=$a(Jv,n);return c.jsx(Rf,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:l=>{var i;const a=l.relatedTarget;!((i=s.viewport)!=null&&i.contains(a))&&r()}})});Iu.displayName=Jv;var yl="Toast",VI="toast.swipeStart",HI="toast.swipeMove",XI="toast.swipeCancel",ZI="toast.swipeEnd",e5=u.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...l}=e,[i,a]=$I({prop:r,defaultProp:o??!0,onChange:s,caller:yl});return c.jsx(Hv,{present:n||i,children:c.jsx(JI,{open:i,...l,ref:t,onClose:()=>a(!1),onPause:Tr(e.onPause),onResume:Tr(e.onResume),onSwipeStart:vt(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:vt(e.onSwipeMove,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:vt(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:vt(e.onSwipeEnd,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),a(!1)})})})});e5.displayName=yl;var[KI,QI]=Xv(yl,{onClose(){}}),JI=u.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:l,onEscapeKeyDown:i,onPause:a,onResume:d,onSwipeStart:f,onSwipeMove:m,onSwipeCancel:p,onSwipeEnd:h,...y}=e,g=$a(yl,n),[v,b]=u.useState(null),w=jr(t,A=>b(A)),x=u.useRef(null),_=u.useRef(null),C=o||g.duration,E=u.useRef(0),k=u.useRef(C),R=u.useRef(0),{onToastAdd:j,onToastRemove:M}=g,D=Tr(()=>{var A;v?.contains(document.activeElement)&&((A=g.viewport)==null||A.focus()),l()}),$=u.useCallback(A=>{!A||A===1/0||(window.clearTimeout(R.current),E.current=new Date().getTime(),R.current=window.setTimeout(D,A))},[D]);u.useEffect(()=>{const A=g.viewport;if(A){const Z=()=>{$(k.current),d?.()},q=()=>{const K=new Date().getTime()-E.current;k.current=k.current-K,window.clearTimeout(R.current),a?.()};return A.addEventListener(Mu,q),A.addEventListener(Au,Z),()=>{A.removeEventListener(Mu,q),A.removeEventListener(Au,Z)}}},[g.viewport,C,a,d,$]),u.useEffect(()=>{s&&!g.isClosePausedRef.current&&$(C)},[s,C,g.isClosePausedRef,$]),u.useEffect(()=>(j(),()=>M()),[j,M]);const X=u.useMemo(()=>v?i5(v):null,[v]);return g.viewport?c.jsxs(c.Fragment,{children:[X&&c.jsx(eP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:X}),c.jsx(KI,{scope:n,onClose:D,children:Nt.createPortal(c.jsx(Tf.ItemSlot,{scope:n,children:c.jsx(MI,{asChild:!0,onEscapeKeyDown:vt(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||D(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(hn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:vt(e.onKeyDown,A=>{A.key==="Escape"&&(i?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:vt(e.onPointerDown,A=>{A.button===0&&(x.current={x:A.clientX,y:A.clientY})}),onPointerMove:vt(e.onPointerMove,A=>{if(!x.current)return;const Z=A.clientX-x.current.x,q=A.clientY-x.current.y,K=!!_.current,H=["left","right"].includes(g.swipeDirection),N=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,oe=H?N(0,Z):0,Te=H?0:N(0,q),pe=A.pointerType==="touch"?10:2,ve={x:oe,y:Te},we={originalEvent:A,delta:ve};K?(_.current=ve,Vl(HI,m,we,{discrete:!1})):Gp(ve,g.swipeDirection,pe)?(_.current=ve,Vl(VI,f,we,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(Z)>pe||Math.abs(q)>pe)&&(x.current=null)}),onPointerUp:vt(e.onPointerUp,A=>{const Z=_.current,q=A.target;if(q.hasPointerCapture(A.pointerId)&&q.releasePointerCapture(A.pointerId),_.current=null,x.current=null,Z){const K=A.currentTarget,H={originalEvent:A,delta:Z};Gp(Z,g.swipeDirection,g.swipeThreshold)?Vl(ZI,h,H,{discrete:!0}):Vl(XI,p,H,{discrete:!0}),K.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),eP=e=>{const{__scopeToast:t,children:n,...r}=e,o=$a(yl,t),[s,l]=u.useState(!1),[i,a]=u.useState(!1);return oP(()=>l(!0)),u.useEffect(()=>{const d=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:c.jsx(Vv,{asChild:!0,children:c.jsx(Rf,{...r,children:s&&c.jsxs(c.Fragment,{children:[o.label," ",n]})})})},tP="ToastTitle",t5=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(hn.div,{...r,ref:t})});t5.displayName=tP;var nP="ToastDescription",n5=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(hn.div,{...r,ref:t})});n5.displayName=nP;var r5="ToastAction",rP=u.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(l5,{altText:n,asChild:!0,children:c.jsx(s5,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${r5}\`. Expected non-empty \`string\`.`),null)});rP.displayName=r5;var o5="ToastClose",s5=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=QI(o5,n);return c.jsx(l5,{asChild:!0,children:c.jsx(hn.button,{type:"button",...r,ref:t,onClick:vt(e.onClick,o.onClose)})})});s5.displayName=o5;var l5=u.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return c.jsx(hn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function i5(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),sP(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const l=r.dataset.radixToastAnnounceAlt;l&&t.push(l)}else t.push(...i5(r))}}),t}function Vl(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qv(o,s):o.dispatchEvent(s)}var Gp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function oP(e=()=>{}){const t=Tr(e);qs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function sP(e){return e.nodeType===e.ELEMENT_NODE}function lP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function jc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var iP=Qv,aP=e5,cP=t5,uP=n5;function xs(e,t=[]){return e.flatMap(n=>{switch(n.kind){case"view":return Fy(n)?[]:t.length>0?[]:[{path:t,field:n}];case"measure":case"dimension":return n.type.kind==="array_type"&&n.type.element_type.kind==="record_type"?[{path:t,field:n},...xs(n.type.element_type.fields.map(r=>({kind:n.kind,...r})),[...t,n.name])]:n.type.kind==="record_type"?[{path:t,field:n},...xs(n.type.fields.map(r=>({kind:n.kind,...r})),[...t,n.name])]:[{path:t,field:n}];case"join":return xs(n.schema.fields,[...t,n.name]);default:return[]}})}function dP(e){return xs(e.schema.fields)}function a5(e,t){return Object.values(t.reduce((n,r)=>{const o=[e.name,...r.path].join(".");return n[o]||(n[o]={groupPath:r.path,items:[]}),n[o].items.push(r),n},{}))}function c5(e){return Object.values(e.reduce((t,n)=>{const r=n.field.kind;return t[r]||(t[r]={group:r,items:[]}),t[r].items.push(n),t},{}))}const fP={view:"Views",measure:"Measures",dimension:"Dimensions"};function mP(e,t,n){const r=Da(n,t.name),s=u.useMemo(()=>{const{fields:f}=Dr(e),m=n.join(".");return xs(f).filter(p=>p.path.join(".")===m)},[n,e]).find(f=>t.name===f.field.name),l=u.useMemo(()=>{const f=sn(e);return s?.field.kind!=="dimension"?"Grouping is only available on a dimension.":f?.hasField(t.name,n)?"Cannot group by a field already in the view.":ir(t)?"":"This field is annotated with #NO_UI."},[e,s?.field.kind,t,n]),i=u.useMemo(()=>{if(s?.field.kind!=="measure")return"Aggregation only supports measure fields.";const f=sn(e);return f?.hasField(t.name,n)?"This field is already used in the query.":ir(t)?"":"This field is annotated with #NO_UI."},[s?.field.kind,e,t,n]),a=u.useMemo(()=>s?["dimension","measure"].includes(s.field.kind)?pP.includes(s.field.type.kind)?"":"Filtering only supports string, boolean, number, date and time fields.":"Filtering is only available for a dimension or measure.":`Unexpected Error: Could not find a field ${r}.`,[r,s]),d=u.useMemo(()=>{if(!s)return`Unexpected Error: Could not find a field ${r}.`;const f=sn(e);return f&&eM(f,n,t.name)?"Query is already ordered by this field.":!f||!nM(f,n,t.name)?"Order by is only available for fields in the output.":["dimension","measure"].includes(s.field.kind)?hP.includes(s.field.type.kind)?"":"Order By only supports string, boolean, number, date and time fields.":"Order By is only available for dimension or measure fields."},[s,e,n,t.name,r]);return{groupByDisabledReason:l,aggregateDisabledReason:i,filterDisabledReason:a,orderByDisabledReason:d}}const pP=["string_type","boolean_type","number_type","date_type","timestamp_type","timestamptz_type"],hP=["string_type","number_type","boolean_type","date_type","timestamp_type","timestamptz_type"];function u5({rootQuery:e,field:t,path:n,viewDef:r}){const{focusedNestView:o}=Ys(),s=De(),l=o??r,[i,a]=u.useState(!1),[d,f]=u.useState(!1),m=i||d;return c.jsx(An,{field:t,hoverActions:c.jsx(gP,{rootQuery:e,field:t,view:l,path:n,setIsFilterPopoverOpen:a,setIsTooltipOpen:f}),onClick:()=>{yP(e,l,t,n)&&s()},hoverActionsVisible:m,tooltip:c.jsx(Rr,{field:t,path:n}),tooltipProps:{side:"right",align:"start",alignOffset:28}})}function Gn({tooltip:e,onTooltipOpenChange:t,...n}){const{theme:r}=u.useContext(Me);return c.jsxs(ko,{delayDuration:300,onOpenChange:t,children:[c.jsx(So,{asChild:!0,children:c.jsx(be,{variant:"flat",size:"compact",...n})}),c.jsx(Eo,{children:c.jsx(Ro,{sideOffset:8,...S.props(F.body,Ln.default,r),children:e})})]})}function gP({rootQuery:e,view:t,field:n,path:r,setIsTooltipOpen:o,setIsFilterPopoverOpen:s}){const l=De(),{groupByDisabledReason:i,aggregateDisabledReason:a,filterDisabledReason:d,orderByDisabledReason:f}=mP(t,n,r),m=(y,g)=>{(n.kind==="dimension"||n.kind==="measure")&&(y==="groupBy"&&!i?pl(t,n,r):y==="aggregate"&&!a?hl(t,n,r):y==="orderBy"&&!f?oM(t,r,n.name):y==="filter"&&!d&&g&&bv(t,n,r,g),l())},p=()=>{n.kind==="view"&&e.isEmpty()&&(e.setView(n.name),l())},h=()=>{n.kind==="view"&&(Oa(t,n),l())};return n.kind==="view"?c.jsxs(c.Fragment,{children:[c.jsx(Gn,{icon:"insert",disabled:!e.isEmpty(),onClick:p,tooltip:e.isEmpty()?"Add view":"Can only add a view to an empty query.",onTooltipOpenChange:o}),c.jsx(Gn,{icon:"nest",onClick:h,tooltip:"Add as new nested query",onTooltipOpenChange:o})]}):n.kind==="measure"?c.jsxs(c.Fragment,{children:[c.jsx(Gn,{icon:"aggregate",tooltip:a||"Add as aggregate",disabled:!!a,onClick:()=>m("aggregate"),onTooltipOpenChange:o}),c.jsx(zs,{fieldInfo:n,path:r,setFilter:y=>m("filter",y),trigger:c.jsx(Gn,{icon:"filter",tooltip:d||"Add as filter",disabled:!!d,onTooltipOpenChange:o}),onOpenChange:s,layoutProps:{align:"start"}}),c.jsx(Gn,{icon:"orderBy",tooltip:f||"Add as order by",disabled:!!f,onClick:()=>m("orderBy"),onTooltipOpenChange:o})]}):n.kind==="dimension"?c.jsxs(c.Fragment,{children:[c.jsx(Gn,{icon:"groupBy",tooltip:i||"Add as group by",disabled:!!i,onClick:()=>m("groupBy"),onTooltipOpenChange:o}),c.jsx(zs,{fieldInfo:n,path:r,setFilter:y=>m("filter",y),trigger:c.jsx(Gn,{icon:"filter",tooltip:d||"Add as filter",disabled:!!d,onTooltipOpenChange:o}),onOpenChange:s,layoutProps:{align:"start"}}),c.jsx(Gn,{icon:"orderBy",tooltip:f||"Add as order by",disabled:!!f,onClick:()=>m("orderBy"),onTooltipOpenChange:o})]}):null}function yP(e,t,n,r){const o=sn(t);if(n.kind==="dimension")if(!o?.hasField(n.name,r))pl(t,n,r);else return!1;else if(n.kind==="measure")if(!o?.hasField(n.name,r))hl(t,n,r);else return!1;else if(n.kind==="view")e.isEmpty()?e.setView(n.name):Oa(t,n);else return!1;return!0}function d5({field:e,path:t,onCopy:n}){return c.jsx(An,{field:e,tooltip:c.jsx(Rr,{field:e,path:t}),tooltipProps:{side:"right",align:"start",alignOffset:28},onClick:()=>n(e,t)})}const Up=["dimension","measure","view"];function vP({rootQuery:e,source:t,items:n,onCopy:r}){const o=u.useMemo(()=>c5(n).sort((i,a)=>Up.indexOf(i.group)-Up.indexOf(a.group)).map(i=>({...i,items:a5(t,i.items)})),[t,n]),s=e?.definition,l=e&&s instanceof Y.ASTArrowQueryDefinition;return c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly1cy8zhl mlyou54vl mlye8ttls mly13z5u0c",children:[c.jsx("div",{...S.props(F.body,Yp.heading),children:`${n.length} result${n.length>1?"s":""}`}),o.map(({group:i,items:a})=>c.jsxs("div",{children:[c.jsx("div",{...S.props(F.body,Yp.groupTitle),children:fP[i]}),c.jsx("div",{className:"mly78zum5 mlydt5ytf mlyou54vl",children:a.map(({groupPath:d,items:f})=>u.createElement("div",{className:"mly78zum5 mlydt5ytf mly1jnr06f",key:d.join(".")},c.jsx("div",{...S.props(F.supporting),children:d.join(" > ")}),f.map(({field:m,path:p})=>l?c.jsx(u5,{rootQuery:e,field:m,path:p,viewDef:s},[...p,m.name].join(".")):c.jsx(d5,{field:m,path:p,onCopy:r},[...p,m.name].join(".")))))})]},i))]})}const Yp={heading:{fontWeight:"mly1xlr1w8",$$css:!0},groupTitle:{fontWeight:"mly1xlr1w8",fontSize:"mlyfifm61",$$css:!0}},bP=(e,t)=>t.at(-1)??e.name,wP=(e,t)=>t.length>0?`joined to ${[...t.slice(0,-1),e.name].join(" > ")}`:void 0;function Tc({rootQuery:e,source:t,fieldItems:n,fieldGroupType:r,onCopy:o}){const s=u.useMemo(()=>c5(n).map(d=>({...d,items:a5(t,d.items)})),[t,n]),l=u.useMemo(()=>{var d;return((d=s.find(({group:f})=>f===r))==null?void 0:d.items)??[]},[s,r]),i=e?.definition,a=e&&i instanceof Y.ASTArrowQueryDefinition;return c.jsx("div",{className:"mly78zum5 mlydt5ytf mly167g77z",children:c.jsx(t4,{children:l.map((d,f)=>c.jsx(r7,{label:bP(t,d.groupPath),sublabel:wP(t,d.groupPath),isInitiallyExpanded:f===0,children:d.items.map(({field:m,path:p})=>a?c.jsx(u5,{rootQuery:e,field:m,path:p,viewDef:i},[...p,m.name].join(".")):c.jsx(d5,{field:m,path:p,onCopy:o},[...p,m.name].join(".")))},d.groupPath.join(".")))})})}function NP({onRefresh:e}){const{theme:t}=u.useContext(Me),{source:n,rootQuery:r}=u.useContext(Ut),[o,s]=u.useState(""),{onCollapse:l}=u.useContext(La),[i,a]=u.useState(!1),[d,f]=u.useState(""),m=u.useMemo(()=>dP(n).filter(w=>!pf(w.field.annotations??[])),[n]),p=m.filter(w=>w.field.kind==="view"),h=m.filter(w=>w.field.kind==="measure"),y=m.filter(w=>w.field.kind==="dimension"),g=u.useMemo(()=>{if(o){const w=o.toLocaleLowerCase();return m.filter(x=>x.field.name.toLocaleLowerCase().includes(w))}return[]},[m,o]),v=!!o,b=u.useCallback((w,x)=>{const _=[...x,w.name].join(".");window.navigator.clipboard.writeText(_),a(!0),f(_)},[]);return c.jsx(Zv,{duration:3e3,children:c.jsxs("div",{...S.props(ss.main,t),children:[c.jsxs("div",{...S.props(F.body,ss.header),children:[c.jsxs("div",{className:"mly78zum5 mly1qughib",children:[c.jsxs("div",{className:"mly78zum5 mly6s0dn4 mly167g77z mlydqdrvq mlyb3r6kr",children:[c.jsx(ne,{name:"database",color:"gray"}),c.jsx("div",{...S.props(F.largeBody,ss.title),children:n.name})]}),c.jsxs("div",{className:"mly78zum5",children:[c.jsx(be,{icon:"refresh",tooltip:"Refresh the source",onClick:e,size:"compact",variant:"flat"}),l&&c.jsx(be,{icon:"sidebarCollapse",tooltip:"Close the source panel",onClick:l,size:"compact",variant:"flat"})]})]}),c.jsx(ia,{value:o,onChange:w=>s(w),placeholder:"Search",size:"compact",icon:"search",hasClear:!0})]}),c.jsx(no,{}),c.jsx("div",{className:"mly78zum5 mlydt5ytf mlyysyzu8 mly1iyjqo2",children:v?c.jsx(vP,{rootQuery:r,source:n,items:g,onCopy:b}):c.jsxs(dE,{defaultExpandedItemId:"views",children:[c.jsx(vc,{id:"dimensions",label:"Dimensions",startIcon:c.jsx(ne,{name:"dimension",color:"cyan"}),badge:c.jsx(Hn,{label:y.length.toString(),color:"cyan"}),children:c.jsx(Tc,{rootQuery:r,source:n,fieldItems:m,fieldGroupType:"dimension",onCopy:b})},"dimensions"),c.jsx(vc,{id:"measures",label:"Measures",startIcon:c.jsx(ne,{name:"measure",color:"green"}),badge:c.jsx(Hn,{label:h.length.toString(),color:"green"}),children:c.jsx(Tc,{rootQuery:r,source:n,fieldItems:m,fieldGroupType:"measure",onCopy:b})},"measures"),c.jsx(vc,{id:"views",label:"Views",startIcon:c.jsx(ne,{name:"view",color:"purple"}),badge:c.jsx(Hn,{label:p.length.toString(),color:"purple"}),children:c.jsx(Tc,{rootQuery:r,source:n,fieldItems:m,fieldGroupType:"view",onCopy:b})},"views")]})}),c.jsxs(aP,{open:i,onOpenChange:a,className:"mly7z7khe",children:[c.jsx(cP,{...S.props(ss.toastTitle,F.emphasized),children:"Copied to clipboard"}),c.jsxs(uP,{...S.props(ss.toastDescription,F.body),children:["Copied ",c.jsx("code",{children:d})," to clipboard"]})]}),c.jsx(iP,{className:"mlye8uvvx mly1717udv mly1ghz6dp"})]})})}const ss={main:{display:"mly78zum5",flexDirection:"mlydt5ytf",height:"mly5yr21d",backgroundColor:"mlyn8dcc1",borderRight:"mly1ruvecq",borderRightWidth:null,borderInlineStartWidth:null,borderInlineEndWidth:null,borderRightStyle:null,borderInlineStartStyle:null,borderInlineEndStyle:null,borderRightColor:null,borderInlineStartColor:null,borderInlineEndColor:null,$$css:!0},header:{display:"mly78zum5",flexDirection:"mlydt5ytf",padding:"mlye8ttls",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,gap:"mly167g77z",rowGap:null,columnGap:null,$$css:!0},title:{overflow:"mlyb3r6kr",overflowX:null,overflowY:null,textOverflow:"mlylyipyv",fontWeight:"mly1xlr1w8",color:"mly1ue28sr",$$css:!0},toastTitle:{$$css:!0},toastDescription:{$$css:!0}};function xP({icon:e,title:t,tooltip:n}){const{onExpand:r}=u.useContext(La);return c.jsx("div",{className:"mly78zum5 mlydt5ytf mly7a106z mlylqzeqv mly5yr21d mlyn8dcc1 mlys1s249 mly32b0ac mlyzteli5",children:c.jsxs("div",{className:"mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z mlye8ttls",children:[c.jsx(be,{icon:e,variant:"flat",size:"compact",tooltip:n,onClick:r}),t&&c.jsx("div",{...S.props(F.body,CP.title),children:t})]})})}const CP={title:{fontWeight:"mly1xlr1w8",cursor:"mlyt0e3qv","writing-mode":"mly35i7",$$css:!0}};function $P({isInitiallyExpanded:e=!0,initialWidth:t,minWidth:n,icon:r,title:o,children:s}){const[l,i]=u.useState(e),[a,d]=u.useState(t),f=!l;return c.jsxs(La.Provider,{value:{onExpand:()=>i(!0),onCollapse:()=>i(!1)},children:[c.jsxs("div",{...{0:{className:"mly1n2onr6 mly5yr21d mly3psx0u"},1:{className:"mly1n2onr6 mly5yr21d mly3psx0u mly1s85apg"}}[!!f<<0],style:{width:`${a}px`},children:[s,c.jsx(aE,{width:a,minWidth:n,onWidthChange:d})]}),f&&c.jsx(xP,{icon:r,title:o})]})}const zP=Cr.malloyToQuery,FP=Cr.modelDefToModelInfo;export{jv as CodeEditorContext,LP as MalloyExplorerProvider,zR as QueryActionBar,zA as QueryEditor,DP as QueryPanel,$P as ResizableCollapsiblePanel,aE as ResizeBar,OP as ResultPanel,NP as SourcePanel,zP as malloyToQuery,FP as modelDefToModelInfo};
|