tarsk 0.5.71 → 0.5.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +83963 -83321
- package/dist/public/assets/Combination-lwI_j-mU.js +41 -0
- package/dist/public/assets/account-view-C_WBVXA3.js +1 -0
- package/dist/public/assets/alert-dialog-FQ5_FqBX.js +7 -0
- package/dist/public/assets/api-ODizoHnY.js +2 -0
- package/dist/public/assets/async-error-boundary-DCDTsNTO.js +1 -0
- package/dist/public/assets/async-loading-fallback-C173aA9v.js +1 -0
- package/dist/public/assets/browser-overlay-block-CiDtkfup.js +1 -0
- package/dist/public/assets/browser-tab-Cl9d7ESj.js +12 -0
- package/dist/public/assets/button-sfGyFWfz.js +1 -0
- package/dist/public/assets/card-D5k0GHxM.js +1 -0
- package/dist/public/assets/chat-dock-context-DIyMsJHM.js +1 -0
- package/dist/public/assets/chunk-QFMPRPBF-COsSkB7x.js +3 -0
- package/dist/public/assets/commit-dialog-Bmh1QdHK.js +1 -0
- package/dist/public/assets/commit-error-dialog-Dpu8C-0w.js +1 -0
- package/dist/public/assets/commit-method-fields-CYzy7rmY.js +1 -0
- package/dist/public/assets/context-menu-Bo0OMC7-.js +1 -0
- package/dist/public/assets/conversation-history-view-COFXqD0e.js +1 -0
- package/dist/public/assets/create-project-dialog-DQ4AbwQP.js +6 -0
- package/dist/public/assets/create-project-workspace-BiRMezO9.js +1 -0
- package/dist/public/assets/create-repo-dialog-CYiCHWgi.js +1 -0
- package/dist/public/assets/delete-confirm-dialog-B99gEJN8.js +1 -0
- package/dist/public/assets/dialog-CP2cYR59.js +1 -0
- package/dist/public/assets/diff-view-Cnuntc3l.js +4 -0
- package/dist/public/assets/dist-BZvmHCxP.js +5 -0
- package/dist/public/assets/dist-CSssbxDI.js +1 -0
- package/dist/public/assets/dist-CWnEmdyL.js +1 -0
- package/dist/public/assets/dist-CWq9XRXF.js +1 -0
- package/dist/public/assets/dist-DIjomljy.js +1 -0
- package/dist/public/assets/dist-DiMgghKn.js +1 -0
- package/dist/public/assets/dist-DjKXDRW7.js +1 -0
- package/dist/public/assets/dist-DrpdKPSI.js +1 -0
- package/dist/public/assets/dist-OixawqbU.js +1 -0
- package/dist/public/assets/dist-ZlK7I-y-.js +2 -0
- package/dist/public/assets/dist-mdooLpmq.js +1 -0
- package/dist/public/assets/explorer-tab-context-BxUVwWQQ.js +1 -0
- package/dist/public/assets/explorer-tab-view-BoCoREoE.js +2 -0
- package/dist/public/assets/explorer-tree-DvD1-WW3.js +1 -0
- package/dist/public/assets/explorer-view-B4WJUy7s.js +75 -0
- package/dist/public/assets/git-history-dialog-DHdzijZS.js +1 -0
- package/dist/public/assets/index-Bmkj1Qwa.js +3380 -0
- package/dist/public/assets/index-DPMRI86E.css +1 -0
- package/dist/public/assets/main-tab-context-Byl1LybL.js +1 -0
- package/dist/public/assets/markdown-renderer-Dx9-Ljv0.js +8 -0
- package/dist/public/assets/mcp-server-card-DPNG9Up7.js +1 -0
- package/dist/public/assets/merged-pr-dialog-CEvS2z8D.js +1 -0
- package/dist/public/assets/model-list-controls-ChoemIJa.js +1 -0
- package/dist/public/assets/{monaco-D1hpqXQ0.js → monaco-lJcjGRXq.js} +189 -199
- package/dist/public/assets/monaco-setup-DU2h1v3K.js +11 -0
- package/dist/public/assets/onboarding-dialog-DCull5p_.js +1 -0
- package/dist/public/assets/pending-changes-Bn-0ak1d.js +1 -0
- package/dist/public/assets/project-env-vars-view-DTGwl4wr.js +1 -0
- package/dist/public/assets/project-model-aliases-view-CEDz_6NW.js +1 -0
- package/dist/public/assets/project-settings-view-DniUno1i.js +1 -0
- package/dist/public/assets/project-tools-view-DknCaJu_.js +1 -0
- package/dist/public/assets/providers-list-view-D_n1Ai6S.js +1 -0
- package/dist/public/assets/pull-request-dialog-BkQBaJkw.js +1 -0
- package/dist/public/assets/pull-with-changes-dialog-rKmqSi73.js +1 -0
- package/dist/public/assets/push-before-pr-dialog-BeEx6Po_.js +1 -0
- package/dist/public/assets/query-keys-5QPW6Dv-.js +1 -0
- package/dist/public/assets/radio-group-CU59hGiA.js +1 -0
- package/dist/public/assets/react-vendor-Ee0-5T4I.js +9 -0
- package/dist/public/assets/scroll-area-nbNFO91g.js +1 -0
- package/dist/public/assets/settings-general-view-CVHlxpTM.js +1 -0
- package/dist/public/assets/settings-instructions-view-Bpx_dUaJ.js +1 -0
- package/dist/public/assets/settings-list-PMi8ZniW.js +1 -0
- package/dist/public/assets/settings-logs-view-64Aq1hEw.js +5 -0
- package/dist/public/assets/settings-mcp-servers-view-B84c4h47.js +5 -0
- package/dist/public/assets/settings-models-view-DdRC4YXo.js +1 -0
- package/dist/public/assets/settings-rules-view-CGLh95Ta.js +8 -0
- package/dist/public/assets/settings-skills-view-DeVnXDl-.js +3 -0
- package/dist/public/assets/settings-slack-view-OFNrG_DW.js +1 -0
- package/dist/public/assets/settings-slash-commands-view-DOo0BimH.js +1 -0
- package/dist/public/assets/settings-statistics-view-DpaSoVqG.js +1 -0
- package/dist/public/assets/settings-storage-view-DlyXWB__.js +1 -0
- package/dist/public/assets/settings-subagents-view-D7o69YzB.js +2 -0
- package/dist/public/assets/settings-system-prompt-view-BFGfrXfe.js +1 -0
- package/dist/public/assets/settings-view-Dw1Zh2Qn.js +2 -0
- package/dist/public/assets/skeleton-DvLd14RU.js +1 -0
- package/dist/public/assets/sorting-DqwxPMRN.js +1 -0
- package/dist/public/assets/store-Be_7VK0D.js +8 -0
- package/dist/public/assets/switch-pIBaqatj.js +1 -0
- package/dist/public/assets/table-B2TDbGGl.js +1 -0
- package/dist/public/assets/tasks-view-FR7c1qFr.js +2 -0
- package/dist/public/assets/{terminal-panel-CiCkzKHm.js → terminal-panel-DBZpuMz9.js} +3 -3
- package/dist/public/assets/toggle-group-BiUqOiP6.js +1 -0
- package/dist/public/assets/tooltip-B6ziVyTv.js +1 -0
- package/dist/public/assets/{use-active-dock-panel-instance-BAHb-cSH.js → use-active-dock-panel-instance-CcCdDHzX.js} +1 -1
- package/dist/public/assets/use-browser-overlay-block-DyprQSIG.js +1 -0
- package/dist/public/assets/use-deferred-search-Dgxosq55.js +1 -0
- package/dist/public/assets/use-installed-ai-files-BNrsyACe.js +1 -0
- package/dist/public/assets/use-open-chat-dock-panel-D1D5bnsL.js +1 -0
- package/dist/public/assets/use-settings-page-loading-BTySlInF.js +1 -0
- package/dist/public/assets/use-suspense-resource-Dkz6ddFN.js +1 -0
- package/dist/public/assets/use-toast-xpb5jNtN.js +1 -0
- package/dist/public/assets/useInfiniteQuery-DUeUxDcu.js +1 -0
- package/dist/public/assets/utils-CT-Dw22R.js +1 -0
- package/dist/public/assets/{web-CkSlG6TA.js → web-C5UYr_H-.js} +1 -1
- package/dist/public/assets/{web-2RomPZ8n.js → web-DaSLtaQ7.js} +1 -1
- package/dist/public/assets/{web-DGsiH272.js → web-Rx_XWVAQ.js} +1 -1
- package/dist/public/assets/{web-BRo_4CM5.js → web-iwWEZ1P2.js} +1 -1
- package/dist/public/index.html +37 -19
- package/dist/recommended-models.txt +2 -2
- package/package.json +3 -4
- package/dist/public/assets/account-view-P4Y5-Gf7.js +0 -1
- package/dist/public/assets/alert-dialog-CQsuxtcP.js +0 -1
- package/dist/public/assets/async-error-boundary-DajcyqVg.js +0 -1
- package/dist/public/assets/browser-tab-DLvnuyhT.js +0 -12
- package/dist/public/assets/card-BDQUHsPD.js +0 -1
- package/dist/public/assets/chat-dock-context-CUdrQKFm.js +0 -1
- package/dist/public/assets/commit-dialog-C98fYJ1d.js +0 -1
- package/dist/public/assets/commit-error-dialog-DjFWRUYh.js +0 -1
- package/dist/public/assets/commit-method-fields-CPKi4MLF.js +0 -1
- package/dist/public/assets/context-menu-D4UmleM5.js +0 -1
- package/dist/public/assets/conversation-history-view-CFq844ge.js +0 -1
- package/dist/public/assets/create-project-dialog-Du4yuSgt.js +0 -6
- package/dist/public/assets/create-project-workspace-Cw58bBNY.js +0 -1
- package/dist/public/assets/create-repo-dialog-DaCI6QrX.js +0 -1
- package/dist/public/assets/delete-confirm-dialog-V9X76h-2.js +0 -1
- package/dist/public/assets/diff-view-CzWiyJDW.js +0 -4
- package/dist/public/assets/explorer-tab-context-BdjTEbFh.js +0 -1
- package/dist/public/assets/explorer-tab-view-BbukFEig.js +0 -2
- package/dist/public/assets/explorer-tree-CKwkrTpU.js +0 -1
- package/dist/public/assets/explorer-view-DxvRAs1j.js +0 -75
- package/dist/public/assets/git-history-dialog-BIl7cN5L.js +0 -1
- package/dist/public/assets/index-BH6Ht-w_.js +0 -3356
- package/dist/public/assets/index-DpGlIV5v.css +0 -1
- package/dist/public/assets/interactive-BrHVRHmQ.js +0 -21
- package/dist/public/assets/main-tab-context-zQSuRQQG.js +0 -1
- package/dist/public/assets/markdown-renderer-BcGbfUdk.js +0 -8
- package/dist/public/assets/mcp-server-card-D8gWLGuB.js +0 -1
- package/dist/public/assets/merged-pr-dialog-BcMvxAAS.js +0 -1
- package/dist/public/assets/model-list-controls-8f6YNzoF.js +0 -1
- package/dist/public/assets/monaco-setup-B_kQVsDW.js +0 -1
- package/dist/public/assets/onboarding-CQV3cOCc.js +0 -46
- package/dist/public/assets/project-env-vars-view-DHLrARmp.js +0 -1
- package/dist/public/assets/project-model-aliases-view-NaGeOnLB.js +0 -1
- package/dist/public/assets/project-settings-view-DYx0Ejz_.js +0 -1
- package/dist/public/assets/project-tools-view-Dwh-9yLK.js +0 -1
- package/dist/public/assets/providers-list-view-BgHPRsyZ.js +0 -1
- package/dist/public/assets/pull-request-dialog-jiDTjl9S.js +0 -1
- package/dist/public/assets/pull-with-changes-dialog-tz5BKYLX.js +0 -1
- package/dist/public/assets/push-before-pr-dialog-CsCEcu3D.js +0 -1
- package/dist/public/assets/query-keys-CbACxUOr.js +0 -1
- package/dist/public/assets/react-vendor-CVjuv5OI.js +0 -22
- package/dist/public/assets/settings-general-view-DFuR-GEd.js +0 -1
- package/dist/public/assets/settings-instructions-view-DyHQ7P84.js +0 -1
- package/dist/public/assets/settings-list-CqAk8BOe.js +0 -1
- package/dist/public/assets/settings-logs-view-NuI1wC43.js +0 -5
- package/dist/public/assets/settings-mcp-servers-view-CzbsCA0X.js +0 -5
- package/dist/public/assets/settings-models-view-DC-v64Ua.js +0 -1
- package/dist/public/assets/settings-rules-view-F1cdLdbY.js +0 -8
- package/dist/public/assets/settings-skills-view-Ba8LIeWY.js +0 -3
- package/dist/public/assets/settings-slack-view-DQUSFcUo.js +0 -1
- package/dist/public/assets/settings-slash-commands-view-BRBxLk4J.js +0 -1
- package/dist/public/assets/settings-statistics-view-4uiJ9rwT.js +0 -1
- package/dist/public/assets/settings-storage-view-CuAI5fWL.js +0 -1
- package/dist/public/assets/settings-subagents-view-pSxxHmFV.js +0 -2
- package/dist/public/assets/settings-system-prompt-view-CrFpAHz1.js +0 -1
- package/dist/public/assets/settings-view-_YIXCuoG.js +0 -2
- package/dist/public/assets/skeleton-CJSNEi3C.js +0 -1
- package/dist/public/assets/store-fffs6-y9.js +0 -8
- package/dist/public/assets/table-Cb2C1rQy.js +0 -1
- package/dist/public/assets/tasks-view-f5xX4AVx.js +0 -2
- package/dist/public/assets/ui-components-DioWsrht.js +0 -1
- package/dist/public/assets/use-deferred-search-0sV7mSzX.js +0 -1
- package/dist/public/assets/use-installed-ai-files-D7Y1gZYc.js +0 -1
- package/dist/public/assets/use-open-chat-dock-panel-zpT9rr8C.js +0 -1
- package/dist/public/assets/use-settings-page-loading-BU2CDnfE.js +0 -1
- package/dist/public/assets/use-suspense-resource-BxOFFoEK.js +0 -1
- package/dist/public/assets/use-toast-hxHsVv6a.js +0 -1
- package/dist/public/assets/utils-SsF94Pkg.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{a as i,h as a,l as o,u as s}from"./dist-DIjomljy.js";import{c}from"./utils-CT-Dw22R.js";import{t as l}from"./dist-mdooLpmq.js";var u=e(n(),1),d=[`top`,`right`,`bottom`,`left`],f=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=e=>({x:e,y:e}),_={left:`right`,right:`left`,bottom:`top`,top:`bottom`},v={start:`end`,end:`start`};function y(e,t,n){return p(e,f(t,n))}function b(e,t){return typeof e==`function`?e(t):e}function x(e){return e.split(`-`)[0]}function S(e){return e.split(`-`)[1]}function C(e){return e===`x`?`y`:`x`}function w(e){return e===`y`?`height`:`width`}var T=new Set([`top`,`bottom`]);function E(e){return T.has(x(e))?`y`:`x`}function D(e){return C(E(e))}function O(e,t,n){n===void 0&&(n=!1);let r=S(e),i=D(e),a=w(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=L(o)),[o,L(o)]}function k(e){let t=L(e);return[A(e),t,A(t)]}function A(e){return e.replace(/start|end/g,e=>v[e])}var j=[`left`,`right`],M=[`right`,`left`],N=[`top`,`bottom`],P=[`bottom`,`top`];function F(e,t,n){switch(e){case`top`:case`bottom`:return n?t?M:j:t?j:M;case`left`:case`right`:return t?N:P;default:return[]}}function I(e,t,n,r){let i=S(e),a=F(x(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(A)))),a}function L(e){return e.replace(/left|right|bottom|top/g,e=>_[e])}function R(e){return{top:0,right:0,bottom:0,left:0,...e}}function z(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:R(e)}function B(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ee(e,t,n){let{reference:r,floating:i}=e,a=E(t),o=D(t),s=w(o),c=x(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(S(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function te(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=b(t,e),p=z(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=B(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=B(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ne=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ee(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??te},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=ee(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},re=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=b(e,t)||{};if(l==null)return{};let d=z(u),p={x:n,y:r},m=D(i),h=w(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,x=_?`bottom`:`right`,C=_?`clientHeight`:`clientWidth`,T=a.reference[h]+a.reference[m]-p[m]-a.floating[h],E=p[m]-a.reference[m],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[C]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[C]||a.floating[h]);let A=T/2-E/2,j=k/2-g[h]/2-1,M=f(d[v],j),N=f(d[x],j),P=M,F=k-g[h]-N,I=k/2-g[h]/2+A,L=y(P,I,F),R=!c.arrow&&S(i)!=null&&I!==L&&a.reference[h]/2-(I<P?M:N)-g[h]/2<0,B=R?I<P?I-P:I-F:0;return{[m]:p[m]+B,data:{[m]:L,centerOffset:I-L-B,...R&&{alignmentOffset:B}},reset:R}}}),ie=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=b(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=x(r),_=E(o),v=x(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),S=d||(v||!m?[L(o)]:k(o)),C=p!==`none`;!d&&C&&S.push(...I(o,m,p,y));let w=[o,...S],T=await s.detectOverflow(t,h),D=[],A=i.flip?.overflows||[];if(l&&D.push(T[g]),u){let e=O(r,a,y);D.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(!(u===`alignment`&&_!==E(t))||A.every(e=>E(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=E(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oe(e){return d.some(t=>e[t]>=0)}var se=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=b(e,t);switch(i){case`referenceHidden`:{let e=ae(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oe(e)}}}case`escaped`:{let e=ae(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oe(e)}}}default:return{}}}}},ce=new Set([`left`,`top`]);async function le(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=x(n),s=S(n),c=E(n)===`y`,l=ce.has(o)?-1:1,u=a&&c?-1:1,d=b(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ue=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await le(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},de=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=b(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=E(x(i)),p=C(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=y(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=y(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},fe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=b(e,t),u={x:n,y:r},d=E(i),f=C(d),p=u[f],m=u[d],h=b(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ce.has(x(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},pe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=b(e,t),u=await o.detectOverflow(t,l),d=x(i),m=S(i),h=E(i)===`y`,{width:g,height:_}=a.floating,v,y;d===`top`||d===`bottom`?(v=d,y=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(y=d,v=m===`end`?`top`:`bottom`);let C=_-u.top-u.bottom,w=g-u.left-u.right,T=f(_-u[v],C),D=f(g-u[y],w),O=!t.middlewareData.shift,k=T,A=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=C),O&&!m){let e=p(u.left,0),t=p(u.right,0),n=p(u.top,0),r=p(u.bottom,0);h?A=g-2*(e!==0||t!==0?e+t:p(u.left,u.right)):k=_-2*(n!==0||r!==0?n+r:p(u.top,u.bottom))}await c({...t,availableWidth:A,availableHeight:k});let j=await o.getDimensions(s.floating);return g!==j.width||_!==j.height?{reset:{rects:!0}}:{}}}};function me(){return typeof window<`u`}function V(e){return he(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((he(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function he(e){return me()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return me()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return me()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function ge(e){return!me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}var _e=new Set([`inline`,`contents`]);function K(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_e.has(i)}var ve=new Set([`table`,`td`,`th`]);function ye(e){return ve.has(V(e))}var be=[`:popover-open`,`:modal`];function xe(e){return be.some(t=>{try{return e.matches(t)}catch{return!1}})}var Se=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Ce=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],we=[`paint`,`layout`,`strict`,`content`];function Te(e){let t=De(),n=W(e)?J(e):e;return Se.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Ce.some(e=>(n.willChange||``).includes(e))||we.some(e=>(n.contain||``).includes(e))}function Ee(e){let t=Y(e);for(;G(t)&&!q(t);){if(Te(t))return t;if(xe(t))return null;t=Y(t)}return null}function De(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Oe=new Set([`html`,`body`,`#document`]);function q(e){return Oe.has(V(e))}function J(e){return H(e).getComputedStyle(e)}function ke(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if(V(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ge(e)&&e.host||U(e);return ge(t)?t.host:t}function Ae(e){let t=Y(e);return q(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&K(t)?t:Ae(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ae(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=je(a);return t.concat(a,a.visualViewport||[],K(r)?r:[],e&&n?X(e):[])}return t.concat(r,X(r,[],n))}function je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Me(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=m(n)!==a||m(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ne(e){return W(e)?e:e.contextElement}function Z(e){let t=Ne(e);if(!G(t))return g(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Me(t),o=(a?m(n.width):n.width)/r,s=(a?m(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Pe=g(0);function Fe(e){let t=H(e);return!De()||!t.visualViewport?Pe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ie(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ne(e),o=g(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Ie(a,n,r)?Fe(a):g(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=H(a),t=r&&W(r)?H(r):r,n=e,i=je(n);for(;i&&r&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=J(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=je(n)}}return B({width:u,height:d,x:c,y:l})}function Le(e,t){let n=ke(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Re(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Le(e,n),y:n.top+t.scrollTop}}function ze(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?xe(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=g(1),u=g(0),d=G(r);if((d||!d&&!a)&&((V(r)!==`body`||K(o))&&(c=ke(r)),G(r))){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Re(o,c):g(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Be(e){return Array.from(e.getClientRects())}function Ve(e){let t=U(e),n=ke(e),r=e.ownerDocument.body,i=p(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=p(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Le(e),s=-n.scrollTop;return J(r).direction===`rtl`&&(o+=p(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var He=25;function Ue(e,t){let n=H(e),r=U(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=De();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Le(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=He&&(a-=o)}else l<=He&&(a+=l);return{width:a,height:o,x:s,y:c}}var We=new Set([`absolute`,`fixed`]);function Ge(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=G(e)?Z(e):g(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ke(e,t,n){let r;if(t===`viewport`)r=Ue(e,n);else if(t===`document`)r=Ve(U(e));else if(W(t))r=Ge(t,n);else{let n=Fe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return B(r)}function qe(e,t){let n=Y(e);return n===t||!W(n)||q(n)?!1:J(n).position===`fixed`||qe(n,t)}function Je(e,t){let n=t.get(e);if(n)return n;let r=X(e,[],!1).filter(e=>W(e)&&V(e)!==`body`),i=null,a=J(e).position===`fixed`,o=a?Y(e):e;for(;W(o)&&!q(o);){let t=J(o),n=Te(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&We.has(i.position)||K(o)&&!n&&qe(e,o))?r=r.filter(e=>e!==o):i=t,o=Y(o)}return t.set(e,r),r}function Ye(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?xe(t)?[]:Je(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Ke(t,n,i);return e.top=p(r.top,e.top),e.right=f(r.right,e.right),e.bottom=f(r.bottom,e.bottom),e.left=p(r.left,e.left),e},Ke(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Xe(e){let{width:t,height:n}=Me(e);return{width:t,height:n}}function Ze(e,t,n){let r=G(t),i=U(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=g(0);function l(){c.x=Le(i)}if(r||!r&&!a)if((V(t)!==`body`||K(i))&&(s=ke(t)),r){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Re(i,s):g(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Qe(e){return J(e).position===`static`}function $e(e,t){if(!G(e)||J(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function et(e,t){let n=H(e);if(xe(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Qe(t))return t;t=Y(t)}return n}let r=$e(e,t);for(;r&&ye(r)&&Qe(r);)r=$e(r,t);return r&&q(r)&&Qe(r)&&!Te(r)?n:r||Ee(e)||n}var tt=async function(e){let t=this.getOffsetParent||et,n=this.getDimensions,r=await n(e.floating);return{reference:Ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nt(e){return J(e).direction===`rtl`}var rt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:U,getClippingRect:Ye,getOffsetParent:et,getElementRects:tt,getClientRects:Be,getDimensions:Xe,getScale:Z,isElement:W,isRTL:nt};function it(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function at(e,t){let n=null,r,i=U(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=l;if(s||t(),!m||!g)return;let _=h(d),v=h(i.clientWidth-(u+m)),y=h(i.clientHeight-(d+g)),b=h(u),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:p(0,f(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(n!==c){if(!S)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!it(l,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return o(!0),a}function ot(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ne(e),u=i||a?[...l?X(l):[],...X(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?at(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!it(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var st=ue,ct=de,lt=ie,ut=pe,dt=se,ft=re,pt=fe,mt=(e,t,n)=>{let r=new Map,i={platform:rt,...n},a={...i.platform,_c:r};return ne(e,t,{...i,platform:a})},ht=e(t(),1),gt=typeof document<`u`?u.useLayoutEffect:function(){};function _t(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,i;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(!_t(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!_t(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function vt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yt(e,t){let n=vt(e);return Math.round(t*n)/n}function bt(e){let t=u.useRef(e);return gt(()=>{t.current=e}),t}function xt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);_t(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),E=c!=null,D=bt(c),O=bt(i),k=bt(l),A=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),mt(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!_t(T.current,t)&&(T.current=t,ht.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);gt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=u.useRef(!1);gt(()=>(j.current=!0,()=>{j.current=!1}),[]),gt(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:x,floating:S}),[x,S]),P=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=yt(N.floating,d.x),r=yt(N.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...vt(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var St=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ft({element:r.current,padding:i}).fn(n):r?ft({element:r,padding:i}).fn(n):{}}}},Ct=(e,t)=>({...st(e),options:[e,t]}),wt=(e,t)=>({...ct(e),options:[e,t]}),Tt=(e,t)=>({...pt(e),options:[e,t]}),Et=(e,t)=>({...lt(e),options:[e,t]}),Dt=(e,t)=>({...ut(e),options:[e,t]}),Ot=(e,t)=>({...dt(e),options:[e,t]}),kt=(e,t)=>({...St(e),options:[e,t]}),$=r(),At=`Arrow`,jt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,$.jsx)(s.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});jt.displayName=At;var Mt=jt,Nt=`Popper`,[Pt,Ft]=a(Nt),[It,Lt]=Pt(Nt),Rt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return(0,$.jsx)(It,{scope:t,anchor:r,onAnchorChange:i,children:n})};Rt.displayName=Nt;var zt=`PopperAnchor`,Bt=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Lt(zt,n),o=u.useRef(null),l=c(t,o),d=u.useRef(null);return u.useEffect(()=>{let e=d.current;d.current=r?.current||o.current,e!==d.current&&a.onAnchorChange(d.current)}),r?null:(0,$.jsx)(s.div,{...i,ref:l})});Bt.displayName=zt;var Vt=`PopperContent`,[Ht,Ut]=Pt(Vt),Wt=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:d=`center`,alignOffset:f=0,arrowPadding:p=0,avoidCollisions:m=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:_=`partial`,hideWhenDetached:v=!1,updatePositionStrategy:y=`optimized`,onPlaced:b,...x}=e,S=Lt(Vt,n),[C,w]=u.useState(null),T=c(t,e=>w(e)),[E,D]=u.useState(null),O=l(E),k=O?.width??0,A=O?.height??0,j=r+(d===`center`?``:`-`+d),M=typeof g==`number`?g:{top:0,right:0,bottom:0,left:0,...g},N=Array.isArray(h)?h:[h],P=N.length>0,F={padding:M,boundary:N.filter(Jt),altBoundary:P},{refs:I,floatingStyles:L,placement:R,isPositioned:z,middlewareData:B}=xt({strategy:`fixed`,placement:j,whileElementsMounted:(...e)=>ot(...e,{animationFrame:y===`always`}),elements:{reference:S.anchor},middleware:[Ct({mainAxis:a+A,alignmentAxis:f}),m&&wt({mainAxis:!0,crossAxis:!1,limiter:_===`partial`?Tt():void 0,...F}),m&&Et({...F}),Dt({...F,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),E&&kt({element:E,padding:p}),Yt({arrowWidth:k,arrowHeight:A}),v&&Ot({strategy:`referenceHidden`,...F})]}),[ee,te]=Xt(R),ne=o(b);i(()=>{z&&ne?.()},[z,ne]);let re=B.arrow?.x,ie=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[oe,se]=u.useState();return i(()=>{C&&se(window.getComputedStyle(C).zIndex)},[C]),(0,$.jsx)(`div`,{ref:I.setFloating,"data-radix-popper-content-wrapper":``,style:{...L,transform:z?L.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(` `),...B.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,$.jsx)(Ht,{scope:n,placedSide:ee,onArrowChange:D,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(s.div,{"data-side":ee,"data-align":te,...x,ref:T,style:{...x.style,animation:z?void 0:`none`}})})})});Wt.displayName=Vt;var Gt=`PopperArrow`,Kt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},qt=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Ut(Gt,n),a=Kt[i.placedSide];return(0,$.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,$.jsx)(Mt,{...r,ref:t,style:{...r.style,display:`block`}})})});qt.displayName=Gt;function Jt(e){return e!==null}var Yt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Xt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Xt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Zt=Rt,Qt=Bt,$t=Wt,en=qt;export{Ft as a,Zt as i,en as n,$t as r,Qt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{d as r,f as i,g as a,h as o,i as s,l as c,n as l,r as u,s as d,u as f}from"./dist-DIjomljy.js";import{c as p,s as m}from"./utils-CT-Dw22R.js";import{a as h,i as g,n as _,r as ee,t as v}from"./dist-DiMgghKn.js";import{t as y}from"./dist-OixawqbU.js";import{t as b}from"./dist-CWq9XRXF.js";import{i as te,n as ne,r as re,t as ie}from"./Combination-lwI_j-mU.js";import{n as ae,r as x,t as S}from"./dist-CWnEmdyL.js";var C=e(t(),1),w=n(),T=[`Enter`,` `],E=[`ArrowDown`,`PageUp`,`Home`],oe=[`ArrowUp`,`PageDown`,`End`],se=[...E,...oe],D={ltr:[...T,`ArrowRight`],rtl:[...T,`ArrowLeft`]},ce={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},O=`Menu`,[k,le,ue]=b(O),[A,j]=o(O,[ue,h,x]),M=h(),de=x(),[N,P]=A(O),[F,I]=A(O),L=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=M(t),[l,u]=C.useState(null),d=C.useRef(!1),f=c(a),p=y(i);return C.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,w.jsx)(g,{...s,children:(0,w.jsx)(N,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,w.jsx)(F,{scope:t,onClose:C.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};L.displayName=O;var fe=`MenuAnchor`,R=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=M(n);return(0,w.jsx)(v,{...i,...r,ref:t})});R.displayName=fe;var z=`MenuPortal`,[pe,me]=A(z,{forceMount:void 0}),B=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=P(z,t);return(0,w.jsx)(pe,{scope:t,forceMount:n,children:(0,w.jsx)(l,{present:n||a.open,children:(0,w.jsx)(u,{asChild:!0,container:i,children:r})})})};B.displayName=z;var V=`MenuContent`,[he,H]=A(V),ge=C.forwardRef((e,t)=>{let n=me(V,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=P(V,e.__scopeMenu),o=I(V,e.__scopeMenu);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(l,{present:r||a.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:o.modal?(0,w.jsx)(_e,{...i,ref:t}):(0,w.jsx)(ve,{...i,ref:t})})})})}),_e=C.forwardRef((e,t)=>{let n=P(V,e.__scopeMenu),r=C.useRef(null),i=p(t,r);return C.useEffect(()=>{let e=r.current;if(e)return ne(e)},[]),(0,w.jsx)(U,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ve=C.forwardRef((e,t)=>{let n=P(V,e.__scopeMenu);return(0,w.jsx)(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ye=i(`MenuContent.ScrollLock`),U=C.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:_,...v}=e,y=P(V,n),b=I(V,n),ne=M(n),x=de(n),S=le(n),[T,E]=C.useState(null),D=C.useRef(null),ce=p(t,D,y.onContentChange),O=C.useRef(0),k=C.useRef(``),ue=C.useRef(0),A=C.useRef(null),j=C.useRef(`right`),N=C.useRef(0),F=_?ie:C.Fragment,L=_?{as:ye,allowPinchZoom:!0}:void 0,fe=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Je(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};C.useEffect(()=>()=>window.clearTimeout(O.current),[]),te();let R=C.useCallback(e=>j.current===A.current?.side&&Xe(e,A.current?.area),[]);return(0,w.jsx)(he,{scope:n,searchRef:k,onItemEnter:C.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:C.useCallback(e=>{R(e)||(D.current?.focus(),E(null))},[R]),onTriggerLeave:C.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:C.useCallback(e=>{A.current=e},[]),children:(0,w.jsx)(F,{...L,children:(0,w.jsx)(re,{asChild:!0,trapped:i,onMountAutoFocus:a(o,e=>{e.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,w.jsx)(d,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:(0,w.jsx)(ae,{asChild:!0,...x,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:a(l,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,w.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ge(y.open),"data-radix-menu-content":``,dir:b.dir,...ne,...v,ref:ce,style:{outline:`none`,...v.style},onKeyDown:a(v.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&fe(e.key));let i=D.current;if(e.target!==i||!se.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);oe.includes(e.key)&&a.reverse(),Ke(a)}),onBlur:a(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:a(e.onPointerMove,$(e=>{let t=e.target,n=N.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>N.current?`right`:`left`,N.current=e.clientX)}))})})})})})})});ge.displayName=V;var be=`MenuGroup`,W=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(f.div,{role:`group`,...r,ref:t})});W.displayName=be;var xe=`MenuLabel`,Se=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(f.div,{...r,ref:t})});Se.displayName=xe;var G=`MenuItem`,Ce=`menu.itemSelect`,K=C.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:i,...o}=e,s=C.useRef(null),c=I(G,e.__scopeMenu),l=H(G,e.__scopeMenu),u=p(t,s),d=C.useRef(!1),f=()=>{let e=s.current;if(!n&&e){let t=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>i?.(e),{once:!0}),r(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,w.jsx)(we,{...o,ref:u,disabled:n,onClick:a(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:a(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:a(e.onKeyDown,e=>{let t=l.searchRef.current!==``;n||t&&e.key===` `||T.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});K.displayName=G;var we=C.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=H(G,n),c=de(n),l=C.useRef(null),u=p(t,l),[d,m]=C.useState(!1),[h,g]=C.useState(``);return C.useEffect(()=>{let e=l.current;e&&g((e.textContent??``).trim())},[o.children]),(0,w.jsx)(k.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:(0,w.jsx)(S,{asChild:!0,...c,focusable:!r,children:(0,w.jsx)(f.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:u,onPointerMove:a(e.onPointerMove,$(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:a(e.onPointerLeave,$(e=>s.onItemLeave(e))),onFocus:a(e.onFocus,()=>m(!0)),onBlur:a(e.onBlur,()=>m(!1))})})})}),Te=`MenuCheckboxItem`,Ee=C.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:n,children:(0,w.jsx)(K,{role:`menuitemcheckbox`,"aria-checked":Z(n)?`mixed`:n,...i,ref:t,"data-state":Q(n),onSelect:a(i.onSelect,()=>r?.(Z(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ee.displayName=Te;var De=`MenuRadioGroup`,[Oe,ke]=A(De,{value:void 0,onValueChange:()=>{}}),Ae=C.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=c(r);return(0,w.jsx)(Oe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,w.jsx)(W,{...i,ref:t})})});Ae.displayName=De;var je=`MenuRadioItem`,Me=C.forwardRef((e,t)=>{let{value:n,...r}=e,i=ke(je,e.__scopeMenu),o=n===i.value;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:o,children:(0,w.jsx)(K,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":Q(o),onSelect:a(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Me.displayName=je;var q=`MenuItemIndicator`,[Ne,Pe]=A(q,{checked:!1}),Fe=C.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Pe(q,n);return(0,w.jsx)(l,{present:r||Z(a.checked)||a.checked===!0,children:(0,w.jsx)(f.span,{...i,ref:t,"data-state":Q(a.checked)})})});Fe.displayName=q;var Ie=`MenuSeparator`,Le=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(f.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Le.displayName=Ie;var Re=`MenuArrow`,ze=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=M(n);return(0,w.jsx)(_,{...i,...r,ref:t})});ze.displayName=Re;var J=`MenuSub`,[Be,Ve]=A(J),He=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=P(J,t),o=M(t),[l,u]=C.useState(null),[d,f]=C.useState(null),p=c(i);return C.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,w.jsx)(g,{...o,children:(0,w.jsx)(N,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,w.jsx)(Be,{scope:t,contentId:s(),triggerId:s(),trigger:l,onTriggerChange:u,children:n})})})};He.displayName=J;var Y=`MenuSubTrigger`,Ue=C.forwardRef((e,t)=>{let n=P(Y,e.__scopeMenu),r=I(Y,e.__scopeMenu),i=Ve(Y,e.__scopeMenu),o=H(Y,e.__scopeMenu),s=C.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=C.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return C.useEffect(()=>d,[d]),C.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),(0,w.jsx)(R,{asChild:!0,...u,children:(0,w.jsx)(we,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Ge(n.open),...e,ref:m(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:a(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:a(e.onPointerLeave,$(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:a(e.onKeyDown,t=>{let i=o.searchRef.current!==``;e.disabled||i&&t.key===` `||D[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ue.displayName=Y;var We=`MenuSubContent`,X=C.forwardRef((e,t)=>{let n=me(V,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=P(V,e.__scopeMenu),s=I(V,e.__scopeMenu),c=Ve(We,e.__scopeMenu),u=C.useRef(null),d=p(t,u);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(l,{present:r||o.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:(0,w.jsx)(U,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:d,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:a(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:a(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:a(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ce[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});X.displayName=We;function Ge(e){return e?`open`:`closed`}function Z(e){return e===`indeterminate`}function Q(e){return Z(e)?`indeterminate`:e?`checked`:`unchecked`}function Ke(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Je(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qe(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ye(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Xe(e,t){return t?Ye({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ze=L,Qe=R,$e=B,et=ge,tt=W,nt=Se,rt=K,it=Ee,at=Ae,ot=Me,st=Fe,ct=Le,lt=ze,ut=He,dt=Ue,ft=X;export{j as _,tt as a,nt as c,ot as d,Ze as f,dt as g,ft as h,et as i,$e as l,ut as m,lt as n,rt as o,ct as p,it as r,st as s,Qe as t,at as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{i}from"./button-sfGyFWfz.js";var a=e(n(),1);t();var o=r(),s=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";var r=e(t(),1);n();var i=r.createContext(void 0);function a(e){let t=r.useContext(i);return e||t||`ltr`}export{a as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-aKtaBQYM.js";Object.entries({"VS Code":{name:`VS Code`,appName:[`Visual Studio Code`,`code`]},Cursor:{name:`Cursor`,appName:[`Cursor`,`cursor`]},Windsurf:{name:`Windsurf`,appName:[`Windsurf`,`windsurf`]},Xcode:{name:`Xcode`,appName:`Xcode`},"Android Studio":{name:`Android Studio`,appName:[`Android Studio`,`studio`]},Kiro:{name:`Kiro`,appName:[`Kiro`,`kiro`]},Terminal:{name:`Terminal`,appName:`Terminal`},"Devin Desktop":{name:`Devin Desktop`,appName:[`Devin`,`Devin Desktop`]},Antigravity:{name:`Antigravity`,appName:[`com.google.antigravity-ide`,`Antigravity IDE`]}}).reduce((e,[t,n])=>(e[t]=n.appName,e),{});var t=new Set([`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]);function n(e){return t.has(e)}function r(e){return e===`off`||n(e)}function i(e){return e?e.reasoningEffort===void 0?e.reasoning===void 0?{reasoningEffort:`off`}:{reasoningEffort:e.reasoning?`medium`:`off`}:{reasoningEffort:e.reasoningEffort}:{reasoningEffort:`off`}}function a(e){return e===`off`?`Off`:e===`xhigh`?`Extra high`:e===`max`?`Max`:e.charAt(0).toUpperCase()+e.slice(1)}function o(e,t){return e===`off`||t.length===0?`off`:t.includes(e)?e:t.includes(`medium`)?`medium`:t[0]??`off`}function s(e){return e?e.reasoningEffort!==void 0||e.reasoning!==void 0:!1}function c(e){return e.length===0?`off`:e.includes(`medium`)?`medium`:e[0]??`off`}function l(e,t){return!s(e)&&t.length>0?c(t):o(i(e).reasoningEffort??`off`,t)}var u=[`fast`,`local`,`cheap`,`smart`],d={fast:`Fast`,local:`Local`,cheap:`Cheap`,smart:`Smart`},f={fast:`Quick responses for lightweight tasks`,local:`On-device or local inference`,cheap:`Lower-cost models for routine work`,smart:`Most capable models for complex tasks`},p=new Set(u);function m(e){return p.has(e)}function ee(e){return`${e.provider}::${e.model}`}function te(e){let t=e.indexOf(`::`);if(t<=0||t>=e.length-2)return null;let n=e.slice(0,t).trim(),r=e.slice(t+2).trim();return!n||!r?null:{provider:n,model:r}}function h(e,t){return m(e)?t?.[e]??null:null}function g(e){return!e?.model?.trim()||!e.provider?.trim()?null:e}function _(e){return g(h(`cheap`,e))!==null}function ne(e){return g(h(`fast`,e))??g(h(`cheap`,e))}function re(e){return ne(e)!==null}function ie(e){return h(`smart`,e)}function ae(e,t){let n=e.toLowerCase();return t[n]?t[n]:Object.entries(t).find(([e])=>e.toLowerCase()===n)?.[1]??[]}function v(e,t){return ae(e.provider,t).includes(e.model)}function oe(e,t){for(let n of u){let r=e[n];if(r&&!v(r,t))throw Error(`Model alias '${n}' must reference an enabled model. '${r.provider}/${r.model}' is not enabled.`)}}var se=[`build`,`plan`,`image`,`ralph`,`orchestrate`],ce={build:`Agent`,plan:`Plan Agent`,image:`Image Agent`,ralph:`Ralph Agent`,orchestrate:`Orchestrator Agent`};function le(e){return e.orchestrateMode?`orchestrate`:e.ralphMode?`ralph`:e.planMode?`plan`:e.imageMode?`image`:`build`}function ue(e){return e?ce[e]:ce.build}var de=[`auto`,...se],fe=`auto`,pe=new Set(de);function me(e){return typeof e==`string`&&pe.has(e)}function y(e){return e.autoMode?`auto`:le(e)}function he(e){return{autoMode:e===`auto`,planMode:e===`plan`,imageMode:e===`image`,ralphMode:e===`ralph`,orchestrateMode:e===`orchestrate`}}var ge=[`cheap`,`smart`,`default`],_e=`Picking a model...`,ve={cheap:`Cheap`,smart:`Smart`,default:`Default`};new Set(ge),RegExp(`\\b(${ge.join(`|`)})\\b`);var ye;(function(e){e.PullRequest=`pull-request`,e.Direct=`direct`})(ye||={}),ye.PullRequest,ye.PullRequest,ye.Direct,ye.Direct;var be={bun:{id:`bun`,label:`bun`},npm:{id:`npm`,label:`npm`},yarn:{id:`yarn`,label:`yarn`},pnpm:{id:`pnpm`,label:`pnpm`}};function xe(e,t=0,n=0){let r=Number.isFinite(e)&&e>0?e:0,i=(Number.isFinite(t)&&t>0?t:0)+(Number.isFinite(n)&&n>0?n:0);return r>=i?r:r+i}function Se(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||t<=0||e<=0?0:Math.min(1,e/t)}function b(e){return e==null||e<=0?`~$0.00`:`~$${(Math.round(e*100)/100).toFixed(2)}`}function Ce(e){return e==null||!Number.isFinite(e)||e<=0?`$0.00`:`$${(Math.round(e*100)/100).toFixed(2)}`}function we(e){if(e==null||!Number.isFinite(e)||e<=0)return`0`;let t=Math.round(e);return t>=1e6?`${(t/1e6).toFixed(1)}mil`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()}function Te(e){if(e==null||!Number.isFinite(e)||e<=0)return`0 tokens`;let t=Math.round(e/4);return t<1e3?`${t} tokens`:t<1e6?`${(t/1e3).toFixed(1)}K tokens`:`${(t/1e6).toFixed(1)}M tokens`}function Ee(e){return e?Math.ceil(e.length/4):0}function De(e){let t=new Map;for(let n of e){if(!n.server)continue;let e=t.get(n.server)??[];e.push(n),t.set(n.server,e)}return Array.from(t,([e,t])=>({server:e,tokens:t.reduce((e,t)=>e+t.tokens,0),tools:t})).sort((e,t)=>t.tokens-e.tokens)}var Oe=`obs_`;function ke(e){return RegExp(`^${Oe}[a-f0-9]{64}$`).test(e)}function Ae(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&ke(t.id)&&typeof t.byteLength==`number`&&typeof t.lineCount==`number`&&typeof t.previewByteLength==`number`}function je(e){return e!==void 0&&e<.05}new Set([`read`,`bash`,`grep`,`find`,`ls`,`web_search`,`fetch`,`edit`,`write`,`browser`]);var Me=`Processing...`,Ne=[`Loading...`,`Brewing...`,`Summoning...`,`Searching...`,`Generating...`,`Herding...`,`Scanning...`,`Following...`,`Building...`,`Finishing...`];function Pe(e){return typeof e==`string`&&e.startsWith(`data:image`)}function Fe(e){let t=e.indexOf(`,`);return t===-1?{imageUrl:e}:{imageUrl:e,imageData:e.slice(t+1)}}function Ie(e){let t=typeof e.imageUrl==`string`?e.imageUrl:void 0,n=typeof e.imageData==`string`?e.imageData:void 0;return!t&&!n?null:t&&Pe(t)&&!n?Fe(t):{imageUrl:t,imageData:n}}function Le(e){if(typeof e==`string`)return[e];if(!Array.isArray(e))return[];let t=[];for(let n of e)typeof n==`object`&&n&&`text`in n&&typeof n.text==`string`&&t.push(n.text);return t}function Re(e){for(let t of e){let e=t.trim();if(!e.startsWith(`{`)){if(Pe(e))return Fe(e);continue}try{let t=ze(JSON.parse(e));if(t)return t}catch{}}return null}function ze(e){if(e==null)return null;if(typeof e==`object`&&!Array.isArray(e)){let t=Ie(e);if(t)return t}let t=Le(e);return t.length>0?Re(t):null}function Be(e){let t={...e};return delete t.imageData,delete t.image_data,typeof t.imageUrl==`string`&&Pe(t.imageUrl)&&delete t.imageUrl,t}var Ve=/^(localhost|127\.0\.0\.1)$/i;function He(e){return Ve.test(e)}function Ue(e){return!e||e.startsWith(`data:`)||/^https?:\/\//i.test(e)}function We(e,t){let n=e.trim();if(!n||n.startsWith(`data:`)||!/^https?:\/\//i.test(n))return e;let r;try{r=new URL(n)}catch{return e}if(!He(r.hostname))return e;let i;try{i=new URL(t)}catch{return e}return`${i.origin}${r.pathname}${r.search}${r.hash}`}function Ge(e,t){return Ue(e)?e:`${t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`}function Ke(e){try{let t=new URL(e,`http://localhost`),n=t.searchParams.get(`path`);if(n){let e=n.split(/[/\\]/).pop();if(e)return e}let r=t.pathname.split(`/`).pop();if(r?.includes(`.`))return r}catch{}}var x={pageTitle:`text-3xl font-bold`,pageSubtitle:`text-base text-muted-foreground`,sectionTitle:`text-xl font-semibold`,subSectionTitle:`text-lg font-semibold`,sectionSubtitle:`text-base font-medium`,emptyStateTitle:`text-base font-semibold text-muted-foreground`,body:`text-base`,bodyMuted:`text-base text-muted-foreground`,conversationBody:`text-sm`,caption:`text-sm text-muted-foreground`,compact:`text-xs`,dropdownGroupHeading:`text-xs font-semibold text-muted-foreground`,mono:`font-mono text-base`,error:`text-base text-destructive`,dialogTitle:`text-xl font-semibold leading-none tracking-tight`,dialogDescription:`text-base text-muted-foreground`,label:`text-base font-medium leading-none`,labelNormal:`text-base font-normal leading-none`,labelMuted:`text-base font-normal leading-none text-muted-foreground`,stat:`text-2xl font-bold`,infoBanner:`text-base text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`,hintBanner:`text-sm text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`},qe={settingsPage:`@container/settings-page w-full px-6 pb-6`,accountPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,formPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,tableWrapper:`overflow-hidden rounded-md border border-table-border`,settingsFieldRow:`flex w-full flex-col gap-2 @md/settings-page:flex-row @md/settings-page:items-center @md/settings-page:gap-4`,settingsFieldLabel:`min-w-0 @md/settings-page:w-44 @md/settings-page:shrink-0 @min-[52rem]/settings-page:w-52`,settingsFieldControl:`flex min-w-0 w-full flex-1 flex-col items-stretch`,settingsFieldStack:`flex w-full flex-col gap-4`};function S(e,t){return t?e*1:e}function Je(e,t){return S(e,t)/100*100}var C=[{name:`agent`,enabled:!0,displayName:`Subagent`,activeDisplayName:`Subagent`},{name:`ask_user`,enabled:!0,displayName:`Ask`,activeDisplayName:`Asking`},{name:`propose_branch`,enabled:!0,displayName:`Propose Branch`,activeDisplayName:`Proposing Branch`},{name:`bash`,enabled:!0,displayName:`Ran`,activeDisplayName:`Running`},{name:`browser`,enabled:!0,displayName:`Browser`,activeDisplayName:`Browsing`},{name:`edit`,enabled:!0,displayName:`Edit`,activeDisplayName:`Editing`},{name:`execute_skill_script`,enabled:!0,displayName:`Run Skill Script`,activeDisplayName:`Running Script`},{name:`fetch`,enabled:!0,displayName:`Fetch`,activeDisplayName:`Fetching`},{name:`find`,enabled:!0,displayName:`Find`,activeDisplayName:`Finding`},{name:`find_images`,enabled:!0,displayName:`Find Images`,activeDisplayName:`Finding Images`},{name:`generate_image`,enabled:!0,displayName:`Make Image`,activeDisplayName:`Making Image`},{name:`get_observation`,enabled:!0,displayName:`Observe`,activeDisplayName:`Observing`},{name:`grep`,enabled:!0,displayName:`Search`,activeDisplayName:`Searching`},{name:`ls`,enabled:!1,displayName:`List`,activeDisplayName:`Listing`},{name:`mcp`,enabled:!0,displayName:`MCP Tool`,activeDisplayName:`Tool`},{name:`read`,enabled:!0,displayName:`Read`,activeDisplayName:`Reading`},{name:`read_skill`,enabled:!0,displayName:`Read Skill`,activeDisplayName:`Reading Skill`},{name:`read_skill_reference`,enabled:!0,displayName:`Read Reference`,activeDisplayName:`Reading Reference`},{name:`run_js`,enabled:!0,displayName:`Run JS`,activeDisplayName:`Running JS`},{name:`todo`,enabled:!0,displayName:`Todo`,activeDisplayName:`Updating`},{name:`tasks`,enabled:!0,displayName:`Tasks`,activeDisplayName:`Managing Tasks`},{name:`tool_search`,enabled:!0,displayName:`Find Tools`,activeDisplayName:`Finding Tools`},{name:`web_search`,enabled:!0,displayName:`Web Search`,activeDisplayName:`Searching Web`},{name:`write`,enabled:!0,displayName:`Write`,activeDisplayName:`Writing`}],w=new Map(C.map(e=>[e.name,e]));function Ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Xe(e){let t=e.toLowerCase(),n=w.get(e)??w.get(t);if(n)return n;if(t===`run_web_worker`)return w.get(`run_js`);if(t===`file_read`)return w.get(`read`);if(t===`ast_grep`)return w.get(`grep`);if(t.includes(`bash`)||t.includes(`terminal`)||t.includes(`shell`))return w.get(`bash`);if(t===`fetch`||t.includes(`web_fetch`))return w.get(`fetch`);if(t.includes(`read`))return w.get(`read`);if(t===`grep`||t===`simple_grep`)return w.get(`grep`)}function Ze(e){return Xe(e)?.displayName??Ye(e)}function Qe(e){let t=Xe(e);return t?t.activeDisplayName:Ze(e)}function $e(e,t,n){return`${e} ${e===1?t:n}`}function T(e,t){let n=e.toLowerCase();return n===`agent`||n.includes(`subagent`)?!0:!!(t&&typeof t==`object`&&`description`in t&&(`prompt`in t||`agentName`in t))}function et(e){return`${$e(e,`subagent`,`subagents`)} working`}function E(e,t,n){return{formatPhrase:r=>e===null?$e(r,t,n):`${e} ${$e(r,t,n)}`,formatNeutral:e=>$e(e,t,n)}}var tt={id:`other`,toolNames:[],...E(null,`tool call`,`tool calls`)},nt=[{id:`files`,toolNames:[`edit`,`write`],...E(`edited`,`file`,`files`)},{id:`commands`,toolNames:[`bash`,`execute_skill_script`,`run_js`],...E(`ran`,`command`,`commands`)},{id:`reads`,toolNames:[`read`,`get_observation`],...E(`read`,`file`,`files`)},{id:`searches`,toolNames:[`grep`,`find`],...E(null,`search`,`searches`)},{id:`webSearches`,toolNames:[`web_search`],...E(null,`web search`,`web searches`)},{id:`pages`,toolNames:[`fetch`],...E(`fetched`,`page`,`pages`)},{id:`browserActions`,toolNames:[`browser`],...E(null,`browser action`,`browser actions`)},{id:`images`,toolNames:[`generate_image`],...E(`generated`,`image`,`images`)},{id:`subagents`,toolNames:[`agent`],...E(null,`subagent`,`subagents`)},tt],rt={file_read:`read`,run_web_worker:`run_js`,ast_grep:`grep`,simple_grep:`grep`},it=new Map(nt.flatMap(e=>e.toolNames.map(t=>[t,e])));function at(e){let t=e.toLowerCase(),n=rt[t]??t;return it.get(n)??tt}function ot(e){return nt.find(t=>t.id===e)??tt}var D=new Set([`tool_search`]),O=C.filter(e=>e.enabled&&!D.has(e.name)).map(e=>e.name);new Set(O);var st=new Map(C.map(e=>[e.name,e.displayName]));function ct(){return O.map(e=>({name:e,displayName:st.get(e)??e})).sort((e,t)=>e.displayName.localeCompare(t.displayName))}var k=new Set([`tool_search`]);C.filter(e=>e.enabled&&!k.has(e.name)).map(e=>e.name);var lt=new TextEncoder,ut=new TextDecoder;function dt(e){return lt.encode(e).length}function ft(e,t){let n=lt.encode(e);if(n.length<=t)return e;let r=Math.min(n.length,t);for(;r>0&&r<n.length&&(n[r]&192)==128;)r--;return ut.decode(n.subarray(0,r))}var pt=[`run_js`,`ask_user`,`write`],mt=[`run_js`,`ask_user`,`agent`,`tool_search`],ht=[...pt,`edit`,`agent`];new Set(pt),new Set(mt),new Set(ht.map(e=>e.toLowerCase()));var gt=48*1024,_t=4*1024;function vt(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function yt(e,t,n=`run_js transport`){let r=dt(e);if(r<=t)return{text:e,truncated:!1,totalBytes:r};let i=`\n\n[Truncated for ${n}: showing ${vt(t)} of ${vt(r)}]`,a=dt(i);return{text:`${ft(e,Math.max(0,t-a))}${i}`,truncated:!0,totalBytes:r}}var bt=`local`,xt=`http://127.0.0.1:8000/v1`,A=`LOCAL_API_URL`;function j(e){return e[A]?.trim()||xt}function St(e){return e.toLowerCase()===bt}var Ct=`User declined to run this command:`,wt=`User declined to fetch from this domain:`,Tt=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`,`tiff`,`tif`]),Et=new Set([`mp4`,`webm`,`mov`,`avi`]),Dt=new Set([`mp3`,`wav`,`ogg`,`m4a`,`aac`,`flac`]),Ot={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,svg:`image/svg+xml`,ico:`image/x-icon`,bmp:`image/bmp`,tiff:`image/tiff`,tif:`image/tiff`,mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`,mp3:`audio/mpeg`,wav:`audio/wav`,ogg:`audio/ogg`,m4a:`audio/mp4`,aac:`audio/aac`,flac:`audio/flac`};function kt(e){if(!e)return``;let t=e.trim(),n=t.split(/[/\\]/).pop()??t,r=n.lastIndexOf(`.`);return r<=0||r===n.length-1?``:n.slice(r+1).toLowerCase()}function M(e,t){let n=kt(e)||(t?kt(t):``);return n?Tt.has(n)?`image`:Et.has(n)?`video`:Dt.has(n)?`audio`:null:null}function At(e,t){return t?.trim()||(Ot[kt(e)]??`application/octet-stream`)}var N={md:{name:`text`,className:`text-sky-500`},mdc:{name:`text`,className:`text-sky-500`},mdx:{name:`text`,className:`text-sky-500`},txt:{name:`document`,className:`text-muted-foreground`},pdf:{name:`text`,className:`text-red-500`},doc:{name:`text`,className:`text-blue-500`},docx:{name:`text`,className:`text-blue-500`},rtf:{name:`text`,className:`text-blue-500`},csv:{name:`spreadsheet`,className:`text-emerald-600`},tsv:{name:`spreadsheet`,className:`text-emerald-600`},xls:{name:`spreadsheet`,className:`text-emerald-600`},xlsx:{name:`spreadsheet`,className:`text-emerald-600`},ppt:{name:`presentation`,className:`text-orange-500`},pptx:{name:`presentation`,className:`text-orange-500`},key:{name:`presentation`,className:`text-orange-500`},json:{name:`json`,className:`text-amber-500`},jsonc:{name:`json`,className:`text-amber-500`},json5:{name:`json`,className:`text-amber-500`},yaml:{name:`code`,className:`text-violet-500`},yml:{name:`code`,className:`text-violet-500`},toml:{name:`config`,className:`text-zinc-500`},ini:{name:`config`,className:`text-zinc-500`},env:{name:`security`,className:`text-lime-600`},lock:{name:`security`,className:`text-lime-600`},ts:{name:`code`,className:`text-blue-500`},tsx:{name:`code`,className:`text-cyan-500`},js:{name:`code`,className:`text-yellow-500`},jsx:{name:`code`,className:`text-sky-500`},mjs:{name:`code`,className:`text-yellow-500`},cjs:{name:`code`,className:`text-yellow-500`},py:{name:`code`,className:`text-green-600`},rb:{name:`code`,className:`text-red-500`},php:{name:`code`,className:`text-indigo-500`},java:{name:`code`,className:`text-orange-600`},kt:{name:`code`,className:`text-purple-500`},swift:{name:`code`,className:`text-orange-500`},go:{name:`code`,className:`text-cyan-600`},rs:{name:`code`,className:`text-orange-700`},c:{name:`code`,className:`text-slate-500`},h:{name:`code`,className:`text-slate-500`},cpp:{name:`code`,className:`text-blue-600`},cxx:{name:`code`,className:`text-blue-600`},cc:{name:`code`,className:`text-blue-600`},hpp:{name:`code`,className:`text-blue-600`},cs:{name:`code`,className:`text-violet-600`},sh:{name:`config`,className:`text-emerald-500`},bash:{name:`config`,className:`text-emerald-500`},zsh:{name:`config`,className:`text-emerald-500`},fish:{name:`config`,className:`text-emerald-500`},sql:{name:`data`,className:`text-fuchsia-500`},html:{name:`web`,className:`text-orange-500`},htm:{name:`web`,className:`text-orange-500`},css:{name:`code`,className:`text-blue-500`},scss:{name:`code`,className:`text-pink-500`},sass:{name:`code`,className:`text-pink-500`},less:{name:`code`,className:`text-indigo-500`},xml:{name:`code`,className:`text-orange-500`},zip:{name:`archive`,className:`text-amber-700`},tar:{name:`archive`,className:`text-amber-700`},gz:{name:`archive`,className:`text-amber-700`},tgz:{name:`archive`,className:`text-amber-700`},rar:{name:`archive`,className:`text-amber-700`},"7z":{name:`archive`,className:`text-amber-700`}};function jt(e){let t=kt(e);return N[t]||(Tt.has(t)?{name:`image`,className:`text-pink-500`}:Et.has(t)?{name:`video`,className:`text-purple-500`}:Dt.has(t)?{name:`audio`,className:`text-green-500`}:{name:`file`,className:`text-muted-foreground`})}function P(e){let t=e.toLowerCase();return t.includes(`token`)||t.includes(`password`)||t.includes(`key`)}var F=`primary`;function I(e){if(!e||typeof e.closest!=`function`)return!1;let t=e;return t.closest(`.electrobun-webkit-app-region-drag`)!==null&&t.closest(`.electrobun-webkit-app-region-no-drag`)===null}var Mt=[{from:`#FCD1F5`,to:`#EFBBF0`},{from:`#EFBBF0`,to:`#B795E4`},{from:`#B795E4`,to:`#97A5EE`},{from:`#97A5EE`,to:`#95DFF2`},{from:`#B7EDF7`,to:`#B4DAF9`},{from:`#B4DAF9`,to:`#FEDBEC`},{from:`#FEDBEC`,to:`#F8B1D3`},{from:`#F8B1D3`,to:`#FFF1C2`},{from:`#CEFFC4`,to:`#B3F9FF`},{from:`#B3F9FF`,to:`#B9D4FF`},{from:`#B9D4FF`,to:`#FFD1FF`},{from:`#F770E5`,to:`#FF8ECC`},{from:`#FF8ECC`,to:`#FFAEBD`},{from:`#FFAEBD`,to:`#FFC897`},{from:`#FFC897`,to:`#FFE791`},{from:`#B1E0F3`,to:`#72DDF7`},{from:`#72DDF7`,to:`#79B8F4`},{from:`#79B8F4`,to:`#8093F1`},{from:`#D8CAF6`,to:`#C2A9EF`},{from:`#C2A9EF`,to:`#AC88E8`},{from:`#AC88E8`,to:`#9667E0`},{from:`#9BF6FF`,to:`#CAFFBF`},{from:`#CAFFBF`,to:`#FDFFB6`},{from:`#FDFFB6`,to:`#FFD6A5`},{from:`#FFD6A5`,to:`#FFADAD`},{from:`#FFAAFF`,to:`#7FB0FF`}],Nt={from:`#B2FFA3`,to:`#94F6FF`};function Pt(e){let t=e.trim();if(!t)return Nt;let n=t.charCodeAt(0),r=n>=97&&n<=122?n-32:n;return r>=65&&r<=90?Mt[r-65]??Nt:Mt[n%Mt.length]??Nt}function L(e){let{from:t,to:n}=Pt(e);return`linear-gradient(145deg, ${t}, ${n})`}var Ft=[`security`,`feature`,`fix`,`important`],R=[`#EF4444`,`#F97316`,`#EAB308`,`#22C55E`,`#14B8A6`,`#06B6D4`,`#3B82F6`,`#8B5CF6`,`#EC4899`,`#78716C`],It=/[\p{Cc}\p{Cf}]/u;function Lt(e){return e.trim().replace(/\s+/g,` `)}function Rt(e){return e.toLowerCase()}function zt(e){return e?Array.from(e).length>40?`Tag name must be 40 characters or fewer`:It.test(e)?`Tag name must not contain control characters`:null:`Tag name is required`}function Bt(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Vt(e){return R[Bt(e)%R.length]??R[0]}var Ht=[`reload`,`go_back`,`go_forward`,`get_state`,`set_viewport`];function Ut(e){return Ht.includes(e)}function Wt(e){return e===`changes`||e===`open-pr`||e===`update-pr`?e:e===!0?`changes`:!1}function Gt(e){return e===`open-pr`||e===`update-pr`}function Kt(e){switch(e){case`changes`:return`Uncommitted changes on this branch`;case`open-pr`:return`Open pull request`;case`update-pr`:return`Unpushed commits on open pull request`;default:return}}var qt=`custom-`;function Jt(e){return e.startsWith(qt)}var z;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.INFO=1]=`INFO`,e[e.WARN=2]=`WARN`,e[e.ERROR=3]=`ERROR`,e[e.SILENT=4]=`SILENT`})(z||={});var Yt=5e3,Xt=z.INFO,Zt={[z.DEBUG]:`DEBUG`,[z.INFO]:`INFO`,[z.WARN]:`WARN`,[z.ERROR]:`ERROR`};function Qt(e){return e===z.DEBUG||e===z.INFO||e===z.WARN||e===z.ERROR?Zt[e]:`UNKNOWN`}var $t=z.INFO,en=[],tn=1,nn=[],rn=new Set;function an(e){en.push(e)}function on(e){for(let t of rn)try{t(e)}catch{}}function sn(e){if(e.level<Xt||e.level>=z.SILENT)return;let t={...e,id:tn++};nn.push(t),nn.length>5e3&&nn.splice(0,nn.length-Yt),on({type:`entry`,entry:t})}function cn(e){if(typeof e.toJSON==`function`){let t=e.toJSON();if(typeof t==`object`&&t&&!Array.isArray(t))return t}return{name:e.name,message:e.message,...e.stack?{stack:e.stack}:{}}}function ln(e,t=new WeakMap){if(e instanceof Error)return cn(e);if(typeof e!=`object`||!e)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(ln(r,t));return n}let r={};t.set(e,r);for(let[n,i]of Object.entries(e))r[n]=ln(i,t);return r}function un(){let e=new WeakSet;return(t,n)=>{if(n instanceof Error)return cn(n);if(typeof n==`object`&&n){if(e.has(n))return`[circular]`;e.add(n)}return n}}function B(e){try{return JSON.stringify(e,un())}catch{return`[non-serializable]`}}var dn={[z.DEBUG]:`debug`,[z.INFO]:`info`,[z.WARN]:`warn`,[z.ERROR]:`error`};function V(e){let t=dn[e.level],n=`[${e.event}]`;e.data===void 0?console[t](n,e.message):console[t](n,e.message,typeof e.data==`string`?e.data:B(e.data));for(let t of en)try{t(e)}catch{}}function H(e){return e instanceof Error?{error:cn(e)}:ln(e)}function U(e){function t(t,n,r){let i={ts:new Date().toISOString(),level:t,event:e,message:n,...r===void 0?{}:{data:H(r)}};sn(i),!(t<$t)&&V(i)}return{debug:(e,n)=>t(z.DEBUG,e,n),info:(e,n)=>t(z.INFO,e,n),warn:(e,n)=>t(z.WARN,e,n),error:(e,n)=>t(z.ERROR,e,n)}}z.DEBUG,z.INFO,z.WARN,z.ERROR;function fn(e){let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function pn(){let e=globalThis.crypto;if(!e?.getRandomValues)throw Error(`crypto.getRandomValues is unavailable`);let t=new Uint8Array(16);return e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,fn(t)}function mn(){let e=globalThis.crypto?.randomUUID;return typeof e==`function`?e.call(globalThis.crypto):pn()}var hn=`projectPath`,gn=`vscode`;function _n(e){let t=e.startsWith(`?`)?e.slice(1):e;return new URLSearchParams(t).get(`host`)===`vscode`?gn:null}function vn(e){let t=e.startsWith(`?`)?e.slice(1):e;return new URLSearchParams(t).get(hn)||null}var yn=/^(\d{3})\s*:\s*([\s\S]+)$/,bn=new Set([`provider returned error`,`error`]);function xn(e){let t=e.trim();if(!t)return t;let n=Sn(t);if(n)return n;let r=t.match(yn);if(r){let e=r[1],t=Cn(Tn(r[2]?.trim()??``));if(t)return t;if(e===`429`)return`This model is temporarily rate-limited. Please retry shortly.`}return Cn(Tn(t))||t}function Sn(e){let t=e.lastIndexOf(`}`);if(t===-1||t>=e.length-1)return;let n=e.slice(t+1).trim();if(!n||n.startsWith(`{`)||n.startsWith(`[`))return;let r=e.slice(0,t+1).trim();if(!yn.test(r))return;let i=r.match(yn);if(!(!i||Tn(i[2]?.trim()??``)===void 0))return n}function Cn(e){if(!e||typeof e!=`object`)return;let t=e,n=wn(t.metadata);if(n)return n;if(t.error&&typeof t.error==`object`){let e=Cn(t.error);if(e)return e}if(typeof t.message==`string`){let e=t.message.trim();if(e&&!bn.has(e.toLowerCase()))return e}if(t.code===429||t.code===`429`)return`This model is temporarily rate-limited. Please retry shortly.`}function wn(e){if(!e||typeof e!=`object`)return;let t=e;if(typeof t.raw==`string`&&t.raw.trim())return t.raw.trim();if(Array.isArray(t.previouserrors))for(let e of t.previouserrors){if(!e||typeof e!=`object`)continue;let t=e.raw;if(typeof t==`string`&&t.trim())return t.trim()}}function Tn(e){if(e)try{return JSON.parse(e)}catch{return}}var W=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),G=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0,e.CronField=class e{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:``};static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(t,n={rawValue:``}){if(!Array.isArray(t))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...n,rawValue:n.rawValue??``},this.#r=[...t].sort(e.sorter),this.#n=this.options.wildcard===void 0?this.#i():this.options.wildcard,this.#e=this.options.rawValue.includes(`L`)||t.includes(`L`),this.#t=this.options.rawValue.includes(`?`)||t.includes(`?`)}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!this.#r.every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}})),En=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=G(),n=1,r=31,i=Object.freeze([`L`]);e.CronDayOfMonth=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Dn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=G(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){if(super(e,t),this.validate(),this.values.some(e=>e===`L`))throw Error(`${this.constructor.name} Validation error, unexpected standalone L`)}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),On=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=G(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),kn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=G(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),An=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},ee={year:l,month:d,day:l},te={year:l,month:d,day:l,weekday:d},h={hour:l,minute:l},g={hour:l,minute:l,second:l},_={hour:l,minute:l,second:l,timeZoneName:u},ne={hour:l,minute:l,second:l,timeZoneName:d},re={hour:l,minute:l,hourCycle:`h23`},ie={hour:l,minute:l,second:l,hourCycle:`h23`},ae={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},v={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},oe={year:l,month:l,day:l,hour:l,minute:l},se={year:l,month:l,day:l,hour:l,minute:l,second:l},ce={year:l,month:u,day:l,hour:l,minute:l},le={year:l,month:u,day:l,hour:l,minute:l,second:l},ue={year:l,month:u,day:l,weekday:u,hour:l,minute:l},de={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},fe={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},pe={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},me={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},y=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},he=null,ge=class e extends y{static get instance(){return he===null&&(he=new e),he}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return zt(e,t,n)}formatOffset(e,t){return Ut(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},_e=new Map;function ve(e){let t=_e.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),_e.set(e,t)),t}var ye={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function be(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function xe(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=ye[t];t===`era`?r[a]=i:A(a)||(r[a]=parseInt(i,10))}return r}var Se=new Map,b=class e extends y{static create(t){let n=Se.get(t);return n===void 0&&Se.set(t,n=new e(t)),n}static resetCache(){Se.clear(),_e.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return zt(e,t,n,this.name)}formatOffset(e,t){return Ut(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=ve(this.name),[r,i,a,o,s,c,l]=n.formatToParts?xe(n,t):be(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=R({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/(60*1e3)}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},Ce={};function we(e,t={}){let n=JSON.stringify([e,t]),r=Ce[n];return r||(r=new Intl.ListFormat(e,t),Ce[n]=r),r}var Te=new Map;function Ee(e,t={}){let n=JSON.stringify([e,t]),r=Te.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),Te.set(n,r)),r}var De=new Map;function Oe(e,t={}){let n=JSON.stringify([e,t]),r=De.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),De.set(n,r)),r}var ke=new Map;function Ae(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=ke.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),ke.set(i,a)),a}var je=null;function Me(){return je||(je=new Intl.DateTimeFormat().resolvedOptions().locale,je)}var Ne=new Map;function Pe(e){let t=Ne.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Ne.set(e,t)),t}var Fe=new Map;function Ie(e){let t=Fe.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Ke,...t}),Fe.set(e,t)}return t}function Le(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=Ee(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=Ee(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Re(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function ze(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Be(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function Ve(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function He(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||Pe(e.locale).numberingSystem===`latn`}var Ue=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=Oe(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return P(this.floor?Math.floor(e):Nt(e,3),this.padTo)}},We=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&b.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Ee(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Ge=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&Tt()&&(this.rtf=Ae(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):cn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Ke={firstDay:1,minimalDays:4,weekend:[6,7]},x=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||D.defaultLocale;return new e(o||(a?`en-US`:Me()),n||D.defaultNumberingSystem,r||D.defaultOutputCalendar,At(i)||D.defaultWeekSettings,o)}static resetCache(){je=null,Te.clear(),De.clear(),ke.clear(),Ne.clear(),Fe.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=Le(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Re(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=He(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,At(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Ve(this,e,Jt,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=ze(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Ve(this,e,Zt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Be(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return Ve(this,void 0,()=>Qt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return Ve(this,e,nn,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Ue(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new We(e,this.intl,t)}relFormatter(e={}){return new Ge(this.intl,this.isEnglish(),e)}listFormatter(e={}){return we(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||Pe(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:Et()?Ie(this.locale):Ke}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},qe=null,S=class e extends y{static get utcInstance(){return qe===null&&(qe=new e(0)),qe}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(Bt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Ut(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Ut(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Ut(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Je=class extends y{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function C(e,t){if(A(e)||e===null)return t;if(e instanceof y)return e;if(Ct(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?ge.instance:n===`utc`||n===`gmt`?S.utcInstance:S.parseSpecifier(n)||b.create(e)}else if(j(e))return S.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new Je(e)}var w={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},Ye={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Xe=w.hanidec.replace(/[\[|\]]/g,``).split(``);function Ze(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(w.hanidec)!==-1)t+=Xe.indexOf(e[n]);else for(let e in Ye){let[n,i]=Ye[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}var Qe=new Map;function $e(){Qe.clear()}function T({numberingSystem:e},t=``){let n=e||`latn`,r=Qe.get(n);r===void 0&&(r=new Map,Qe.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${w[n]}${t}`),r.set(t,i)),i}var et=()=>Date.now(),E=`system`,tt=null,nt=null,rt=null,it=60,at,ot=null,D=class{static get now(){return et}static set now(e){et=e}static set defaultZone(e){E=e}static get defaultZone(){return C(E,ge.instance)}static get defaultLocale(){return tt}static set defaultLocale(e){tt=e}static get defaultNumberingSystem(){return nt}static set defaultNumberingSystem(e){nt=e}static get defaultOutputCalendar(){return rt}static set defaultOutputCalendar(e){rt=e}static get defaultWeekSettings(){return ot}static set defaultWeekSettings(e){ot=At(e)}static get twoDigitCutoffYear(){return it}static set twoDigitCutoffYear(e){it=e%100}static get throwOnInvalid(){return at}static set throwOnInvalid(e){at=e}static resetCaches(){x.resetCache(),b.resetCache(),$.resetCache(),$e()}},O=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},st=[0,31,59,90,120,151,181,212,243,273,304,334],ct=[0,31,60,91,121,152,182,213,244,274,305,335];function k(e,t){return new O(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function lt(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function ut(e,t,n){return n+(Pt(e)?ct:st)[t-1]}function dt(e,t){let n=Pt(e)?ct:st,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function ft(e,t){return(e-t+7)%7+1}function pt(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=ut(r,i,a),s=ft(lt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=Lt(l,t,n)):c>Lt(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Wt(e)}}function mt(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=ft(lt(r,1,t),n),s=L(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=L(l)):c>s?(l=r+1,c-=L(r)):l=r;let{month:u,day:d}=dt(l,c);return{year:l,month:u,day:d,...Wt(e)}}function ht(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:ut(t,n,r),...Wt(e)}}function gt(e){let{year:t,ordinal:n}=e,{month:r,day:i}=dt(t,n);return{year:t,month:r,day:i,...Wt(e)}}function _t(e,t){if(!A(e.localWeekday)||!A(e.localWeekNumber)||!A(e.localWeekYear)){if(!A(e.weekday)||!A(e.weekNumber)||!A(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return A(e.localWeekday)||(e.weekday=e.localWeekday),A(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),A(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function vt(e,t=4,n=1){let r=St(e.weekYear),i=N(e.weekNumber,1,Lt(e.weekYear,t,n)),a=N(e.weekday,1,7);return r?i?a?!1:k(`weekday`,e.weekday):k(`week`,e.weekNumber):k(`weekYear`,e.weekYear)}function yt(e){let t=St(e.year),n=N(e.ordinal,1,L(e.year));return t?n?!1:k(`ordinal`,e.ordinal):k(`year`,e.year)}function bt(e){let t=St(e.year),n=N(e.month,1,12),r=N(e.day,1,Ft(e.year,e.month));return t?n?r?!1:k(`day`,e.day):k(`month`,e.month):k(`year`,e.year)}function xt(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=N(t,0,23)||t===24&&n===0&&r===0&&i===0,o=N(n,0,59),s=N(r,0,59),c=N(i,0,999);return a?o?s?c?!1:k(`millisecond`,i):k(`second`,r):k(`minute`,n):k(`hour`,t)}function A(e){return e===void 0}function j(e){return typeof e==`number`}function St(e){return typeof e==`number`&&e%1==0}function Ct(e){return typeof e==`string`}function wt(e){return Object.prototype.toString.call(e)===`[object Date]`}function Tt(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function Et(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function Dt(e){return Array.isArray(e)?e:[e]}function Ot(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function kt(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function At(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!N(e.firstDay,1,7)||!N(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!N(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function N(e,t,n){return St(e)&&e>=t&&e<=n}function jt(e,t){return e-t*Math.floor(e/t)}function P(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function F(e){if(!(A(e)||e===null||e===``))return parseInt(e,10)}function I(e){if(!(A(e)||e===null||e===``))return parseFloat(e)}function Mt(e){if(!(A(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function Nt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function Pt(e){return e%4==0&&(e%100!=0||e%400==0)}function L(e){return Pt(e)?366:365}function Ft(e,t){let n=jt(t-1,12)+1,r=e+(t-n)/12;return n===2?Pt(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function R(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function It(e,t,n){return-ft(lt(e,1,t),n)+t-1}function Lt(e,t=4,n=1){let r=It(e,t,n),i=It(e+1,t,n);return(L(e)-r+i)/7}function Rt(e){return e>99?e:e>D.twoDigitCutoffYear?1900+e:2e3+e}function zt(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function Bt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Vt(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function Ht(e,t){let n={};for(let r in e)if(M(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Vt(i)}return n}function Ut(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${P(n,2)}:${P(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${P(n,2)}${P(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Wt(e){return kt(e,[`hour`,`minute`,`second`,`millisecond`])}var Gt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Kt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],qt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Jt(e){switch(e){case`narrow`:return[...qt];case`short`:return[...Kt];case`long`:return[...Gt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var z=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Yt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Xt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Zt(e){switch(e){case`narrow`:return[...Xt];case`short`:return[...Yt];case`long`:return[...z];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Qt=[`AM`,`PM`],$t=[`Before Christ`,`Anno Domini`],en=[`BC`,`AD`],tn=[`B`,`A`];function nn(e){switch(e){case`narrow`:return[...tn];case`short`:return[...en];case`long`:return[...$t];default:return null}}function rn(e){return Qt[e.hour<12?0:1]}function an(e,t){return Zt(t)[e.weekday-1]}function on(e,t){return Jt(t)[e.month-1]}function sn(e,t){return nn(t)[e.year<0?0:1]}function cn(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function ln(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var un={D:f,DD:p,DDD:ee,DDDD:te,t:h,tt:g,ttt:_,tttt:ne,T:re,TT:ie,TTT:ae,TTTT:v,f:oe,ff:ce,fff:de,ffff:pe,F:se,FF:le,FFF:fe,FFFF:me},B=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return un[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return P(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?rn(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?on(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?an(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?sn(t,e):a({era:e},`era`);return ln(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}else return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return ln(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},dn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function V(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function H(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function U(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function fn(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=F(t[n+i]);return[r,null,n+i]}}var pn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mn=`(?:${pn.source}?(?:\\[(${dn.source})\\])?)?`,hn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gn=RegExp(`${hn.source}${mn}`),_n=RegExp(`(?:[Tt]${gn.source})?`),vn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yn=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bn=/(\d{4})-?(\d{3})/,xn=fn(`weekYear`,`weekNumber`,`weekDay`),Sn=fn(`year`,`ordinal`),Cn=/(\d{4})-(\d\d)-(\d\d)/,wn=RegExp(`${hn.source} ?(?:${pn.source}|(${dn.source}))?`),Tn=RegExp(`(?: ${wn.source})?`);function W(e,t,n){let r=e[t];return A(r)?n:F(r)}function G(e,t){return[{year:W(e,t),month:W(e,t+1,1),day:W(e,t+2,1)},null,t+3]}function En(e,t){return[{hours:W(e,t,0),minutes:W(e,t+1,0),seconds:W(e,t+2,0),milliseconds:Mt(e[t+3])},null,t+4]}function Dn(e,t){let n=!e[t]&&!e[t+1],r=Bt(e[t+1],e[t+2]);return[{},n?null:S.instance(r),t+3]}function On(e,t){return[{},e[t]?b.create(e[t]):null,t+1]}var kn=RegExp(`^T?${hn.source}$`),An=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function jn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(I(n)),months:f(I(r)),weeks:f(I(i)),days:f(I(a)),hours:f(I(o)),minutes:f(I(s)),seconds:f(I(c),c===`-0`),milliseconds:f(Mt(l),d)}]}var Mn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nn(e,t,n,r,i,a,o){let s={year:t.length===2?Rt(F(t)):F(t),month:Kt.indexOf(n)+1,day:F(r),hour:F(i),minute:F(a)};return o&&(s.second=F(o)),e&&(s.weekday=e.length>3?z.indexOf(e)+1:Yt.indexOf(e)+1),s}var Pn=/^(?:(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\d)(\d\d)))$/;function Fn(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=Nn(t,i,r,n,a,o,s),p;return p=c?Mn[c]:l?0:Bt(u,d),[f,new S(p)]}function In(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Ln=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Rn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,zn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Bn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,i,r,n,a,o,s),S.utcInstance]}function Vn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,s,n,r,i,a,o),S.utcInstance]}var Hn=V(vn,_n),Un=V(yn,_n),Wn=V(bn,_n),Gn=V(gn),Kn=H(G,En,Dn,On),qn=H(xn,En,Dn,On),Jn=H(Sn,En,Dn,On),Yn=H(En,Dn,On);function Xn(e){return U(e,[Hn,Kn],[Un,qn],[Wn,Jn],[Gn,Yn])}function Zn(e){return U(In(e),[Pn,Fn])}function Qn(e){return U(e,[Ln,Bn],[Rn,Bn],[zn,Vn])}function K(e){return U(e,[An,jn])}var $n=H(En);function er(e){return U(e,[kn,$n])}var tr=V(Cn,Tn),nr=V(wn),rr=H(En,Dn,On);function ir(e){return U(e,[tr,Kn],[nr,rr])}var ar=`Invalid Duration`,or={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},sr={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...or},q=146097/400,cr=146097/4800,lr={years:{quarters:4,months:12,weeks:q/7,days:q,hours:q*24,minutes:q*24*60,seconds:q*24*60*60,milliseconds:q*24*60*60*1e3},quarters:{months:3,weeks:q/28,days:q/4,hours:q*24/4,minutes:q*24*60/4,seconds:q*24*60*60/4,milliseconds:q*24*60*60*1e3/4},months:{weeks:cr/7,days:cr,hours:cr*24,minutes:cr*24*60,seconds:cr*24*60*60,milliseconds:cr*24*60*60*1e3},...or},J=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],ur=J.slice(0).reverse();function Y(e,t,n=!1){return new X({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function dr(e,t){let n=t.milliseconds??0;for(let r of ur.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function fr(e,t){let n=dr(e,t)<0?-1:1;J.reduceRight((r,i)=>{if(A(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),J.reduce((n,r)=>{if(A(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function pr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var X=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?lr:sr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||x.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:Ht(t,e.normalizeUnit),loc:x.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(j(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=K(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=er(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof O?t:new O(t,n);if(D.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?B.create(this.loc,n).formatDurationFromString(this,e):ar}toHuman(e={}){if(!this.isValid)return ar;let t=e.showZeros!==!1,n=J.map(n=>{let r=this.values[n];return A(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=Nt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?dr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of J)(M(n.values,e)||M(this.values,e))&&(r[e]=n.get(e)+this.get(e));return Y(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Vt(e(this.values[n],n));return Y(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...Ht(t,e.normalizeUnit)};return Y(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return Y(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return fr(this.matrix,e),Y(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=pr(this.normalize().shiftToAll().toObject());return Y(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of J)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;j(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else j(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return fr(this.matrix,n),Y(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Y(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=pr(this.values);return Y(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of J)if(!t(this.values[n],e.values[n]))return!1;return!0}},mr=`Invalid Interval`;function hr(e,t){return!e||!e.isValid?gr.invalid(`missing or invalid start`):!t||!t.isValid?gr.invalid(`missing or invalid end`):t<e?gr.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var gr=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof O?t:new O(t,n);if(D.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return hr(r,i)??new e({start:r,end:i})}static after(t,n){let r=X.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=X.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=X.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=X.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=X.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:mr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?B.create(this.s.loc.clone(t),e).formatInterval(this):mr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:mr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):X.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},_r=class{static hasDST(e=D.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return b.isValidZone(e)}static normalizeZone(e){return C(e,D.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||x.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||x.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||x.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||x.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||x.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||x.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||x.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return x.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return x.create(t,null,`gregory`).eras(e)}static features(){return{relative:Tt(),localeWeek:Et()}}};function vr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(X.fromMillis(r).as(`days`))}function yr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=vr(e,t);return(n-n%7)/7}],[`days`,vr]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function br(e,t,n,r){let[i,a,o,s]=yr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=X.fromObject(a,r);return l.length>0?X.fromMillis(c,r).shiftTo(...l).plus(u):u}var xr=`missing Intl.DateTimeFormat.formatToParts support`;function Z(e,t=e=>e){return{regex:e,deser:([e])=>t(Ze(e))}}var Sr=`[ \xA0]`,Cr=new RegExp(Sr,`g`);function wr(e){return e.replace(/\./g,`\\.?`).replace(Cr,Sr)}function Tr(e){return e.replace(/\./g,``).replace(Cr,` `).toLowerCase()}function Q(e,t){return e===null?null:{regex:RegExp(e.map(wr).join(`|`)),deser:([n])=>e.findIndex(e=>Tr(n)===Tr(e))+t}}function Er(e,t){return{regex:e,deser:([,e,t])=>Bt(e,t),groups:t}}function Dr(e){return{regex:e,deser:([e])=>e}}function Or(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function kr(e,t){let n=T(t),r=T(t,`{2}`),i=T(t,`{3}`),a=T(t,`{4}`),o=T(t,`{6}`),s=T(t,`{1,2}`),c=T(t,`{1,3}`),l=T(t,`{1,6}`),u=T(t,`{1,9}`),d=T(t,`{2,4}`),f=T(t,`{4,6}`),p=e=>({regex:RegExp(Or(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Q(t.eras(`short`),0);case`GG`:return Q(t.eras(`long`),0);case`y`:return Z(l);case`yy`:return Z(d,Rt);case`yyyy`:return Z(a);case`yyyyy`:return Z(f);case`yyyyyy`:return Z(o);case`M`:return Z(s);case`MM`:return Z(r);case`MMM`:return Q(t.months(`short`,!0),1);case`MMMM`:return Q(t.months(`long`,!0),1);case`L`:return Z(s);case`LL`:return Z(r);case`LLL`:return Q(t.months(`short`,!1),1);case`LLLL`:return Q(t.months(`long`,!1),1);case`d`:return Z(s);case`dd`:return Z(r);case`o`:return Z(c);case`ooo`:return Z(i);case`HH`:return Z(r);case`H`:return Z(s);case`hh`:return Z(r);case`h`:return Z(s);case`mm`:return Z(r);case`m`:return Z(s);case`q`:return Z(s);case`qq`:return Z(r);case`s`:return Z(s);case`ss`:return Z(r);case`S`:return Z(c);case`SSS`:return Z(i);case`u`:return Dr(u);case`uu`:return Dr(s);case`uuu`:return Z(n);case`a`:return Q(t.meridiems(),0);case`kkkk`:return Z(a);case`kk`:return Z(d,Rt);case`W`:return Z(s);case`WW`:return Z(r);case`E`:case`c`:return Z(n);case`EEE`:return Q(t.weekdays(`short`,!1),1);case`EEEE`:return Q(t.weekdays(`long`,!1),1);case`ccc`:return Q(t.weekdays(`short`,!0),1);case`cccc`:return Q(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Er(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Er(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Dr(/[a-z_+-/]{1,256}?/i);case` `:return Dr(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:xr};return m.token=e,m}var Ar={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function jr(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Ar[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Mr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Nr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(M(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}else return[r,{}]}function Pr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return A(e.z)||(n=b.create(e.z)),A(e.Z)||(n||=new S(e.Z),r=e.Z),A(e.q)||(e.M=(e.q-1)*3+1),A(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),A(e.u)||(e.S=Mt(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Fr=null;function Ir(){return Fr||=$.fromMillis(1555555555555),Fr}function Lr(e,t){if(e.literal)return e;let n=Hr(B.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Rr(e,t){return Array.prototype.concat(...e.map(e=>Lr(e,t)))}var zr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Rr(B.parseFormat(t),e),this.units=this.tokens.map(t=>kr(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Mr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Nr(e,this.regex,this.handlers),[r,i,o]=n?Pr(n):[null,null,void 0];if(M(n,`a`)&&M(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Br(e,t,n){return new zr(e,n).explainFromTokens(t)}function Vr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Br(e,t,n);return[r,i,a,o]}function Hr(e,t){if(!e)return null;let n=B.create(t,e).dtFormatter(Ir()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>jr(t,e,i))}var Ur=`Invalid DateTime`,Wr=864e13;function Gr(e){return new O(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Kr(e){return e.weekData===null&&(e.weekData=pt(e.c)),e.weekData}function qr(e){return e.localWeekData===null&&(e.localWeekData=pt(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jr(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Yr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Xr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Zr(e,t,n){return Yr(R(e),t,n)}function Qr(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,Ft(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=X.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Yr(R(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function $r(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return $.invalid(new O(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?B.create(x.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=P(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=P(e.c.month),n===`month`)return i;i+=`-`}else if(i+=P(e.c.month),n===`month`)return i;return i+=P(e.c.day),i}function ni(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=P(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=P(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=P(e.c.second))}else{if(c+=P(e.c.minute),o===`minute`)break;s&&(c+=P(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=P(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=P(Math.trunc(-e.o/60)),c+=`:`,c+=P(Math.trunc(-e.o%60))):(c+=`+`,c+=P(Math.trunc(e.o/60)),c+=`:`,c+=P(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=D.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=C(t.zone,D.defaultZone);if(!n.isValid)return $.invalid(Gr(n));let r=x.fromObject(t),i,a;if(A(e.year))i=D.now();else{for(let t of oi)A(e[t])&&(e[t]=ri[t]);let t=bt(e)||xt(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Zr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=A(n.round)?!0:n.round,i=A(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=Nt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function mi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var hi,gi=new Map,$=class e{constructor(e){let t=e.zone||D.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new O(`invalid input`):null)||(t.isValid?null:Gr(t));this.ts=A(e.ts)?D.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=j(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xr(this.ts,a),n=Number.isNaN(r.year)?new O(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||x.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=S.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=wt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=C(n.zone,D.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:x.fromObject(n)}):e.invalid(Gr(i))}static fromMillis(t,n={}){if(!j(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Wr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:C(n.zone,D.defaultZone),loc:x.fromObject(n)})}static fromSeconds(t,n={}){if(j(t))return new e({ts:t*1e3,zone:C(n.zone,D.defaultZone),loc:x.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=C(n.zone,D.defaultZone);if(!r.isValid)return e.invalid(Gr(r));let i=x.fromObject(n),o=Ht(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=_t(o,i),l=D.now(),u=A(n.specificOffset)?r.offset(l):n.specificOffset,d=!A(o.ordinal),f=!A(o.year),p=!A(o.month)||!A(o.day),m=f||p,ee=o.weekYear||o.weekNumber;if((m||d)&&ee)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let te=ee||o.weekday&&!m,h,g,_=Xr(l,u);te?(h=si,g=ii,_=pt(_,s,c)):d?(h=ci,g=ai,_=ht(_)):(h=oi,g=ri);let ne=!1;for(let e of h){let t=o[e];A(t)?ne?o[e]=g[e]:o[e]=_[e]:ne=!0}let re=(te?vt(o,s,c):d?yt(o):bt(o))||xt(o);if(re)return e.invalid(re);let[ie,ae]=Zr(te?mt(o,s,c):d?gt(o):o,u,r),v=new e({ts:ie,zone:r,o:ae,loc:i});return o.weekday&&m&&t.weekday!==v.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${v.toISO()}`):v.isValid?v:e.invalid(v.invalid)}static fromISO(e,t={}){let[n,r]=Xn(e);return $r(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Zn(e);return $r(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=Qn(e);return $r(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(A(t)||A(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Vr(x.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):$r(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=ir(e);return $r(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof O?t:new O(t,r);if(D.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Hr(e,x.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Rr(B.parseFormat(e),x.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Kr(this).weekYear:NaN}get weekNumber(){return this.isValid?Kr(this).weekNumber:NaN}get weekday(){return this.isValid?Kr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qr(this).weekday:NaN}get localWeekNumber(){return this.isValid?qr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qr(this).weekYear:NaN}get ordinal(){return this.isValid?ht(this.c).ordinal:NaN}get monthShort(){return this.isValid?_r.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?_r.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?_r.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?_r.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=R(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Xr(s,a),u=Xr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Jr(this,{ts:s}),Jr(this,{ts:c})]:[this]}get isInLeapYear(){return Pt(this.year)}get daysInMonth(){return Ft(this.year,this.month)}get daysInYear(){return this.isValid?L(this.year):NaN}get weeksInWeekYear(){return this.isValid?Lt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Lt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=B.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(S.instance(e),t)}toLocal(){return this.setZone(D.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=C(t,D.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Zr(r,n,t)}return Jr(this,{ts:e,zone:t})}else return e.invalid(Gr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Jr(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Ht(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=_t(t,this.loc),i=!A(t.weekYear)||!A(t.weekNumber)||!A(t.weekday),o=!A(t.ordinal),s=!A(t.year),c=!A(t.month)||!A(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=mt({...pt(this.c,n,r),...t},n,r):A(t.ordinal)?(d={...this.toObject(),...t},A(t.day)&&(d.day=Math.min(Ft(d.year,d.month),d.day))):d=gt({...ht(this.c),...t});let[f,p]=Zr(d,this.o,this.zone);return Jr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=X.fromDurationLike(e);return Jr(this,Qr(this,t))}minus(e){if(!this.isValid)return this;let t=X.fromDurationLike(e).negate();return Jr(this,Qr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=X.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0;break}if(r===`weeks`)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?B.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ur}toLocaleString(e=f,t={}){return this.isValid?B.create(this.loc.clone(t),e).formatDateTime(this):Ur}toLocaleParts(e={}){return this.isValid?B.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ur}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return X.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=Dt(t).map(X.normalizeUnit),a=e.valueOf()>this.valueOf(),o=br(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?gr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return Ot(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return Ot(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Br(x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new zr(x.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(A(t)||A(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=x.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):$r(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return ee}static get DATE_HUGE(){return te}static get TIME_SIMPLE(){return h}static get TIME_WITH_SECONDS(){return g}static get TIME_WITH_SHORT_OFFSET(){return _}static get TIME_WITH_LONG_OFFSET(){return ne}static get TIME_24_SIMPLE(){return re}static get TIME_24_WITH_SECONDS(){return ie}static get TIME_24_WITH_SHORT_OFFSET(){return ae}static get TIME_24_WITH_LONG_OFFSET(){return v}static get DATETIME_SHORT(){return oe}static get DATETIME_SHORT_WITH_SECONDS(){return se}static get DATETIME_MED(){return ce}static get DATETIME_MED_WITH_SECONDS(){return le}static get DATETIME_MED_WITH_WEEKDAY(){return ue}static get DATETIME_FULL(){return de}static get DATETIME_FULL_WITH_SECONDS(){return fe}static get DATETIME_HUGE(){return pe}static get DATETIME_HUGE_WITH_SECONDS(){return me}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&j(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=X,e.FixedOffsetZone=S,e.IANAZone=b,e.Info=_r,e.Interval=gr,e.InvalidZone=Je,e.Settings=D,e.SystemZone=ge,e.VERSION=`3.7.2`,e.Zone=y})),jn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=An(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=class i{#e;#t=null;#n=null;constructor(e,n){let r={zone:n};if(e?e instanceof i?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,r):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,r):(this.#e=t.DateTime.fromISO(e,r),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):this.#e=t.DateTime.local(),!this.#e.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==this.#e.zoneName&&(this.#e=this.#e.setZone(n))}static#r(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf(`month`)}addDay(){this.#e=this.#e.plus({days:1}).startOf(`day`)}addHour(){this.#e=this.#e.plus({hours:1}).startOf(`hour`)}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf(`minute`)}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf(`month`).startOf(`second`)}subtractDay(){this.#e=this.#e.minus({days:1}).endOf(`day`).startOf(`second`)}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf(`hour`).startOf(`second`)}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf(`minute`).startOf(`second`)}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){switch(e){case n.Year:return this.addYear();case n.Month:return this.addMonth();case n.Day:return this.addDay();case n.Hour:return this.addHour();case n.Minute:return this.addMinute();case n.Second:return this.addSecond()}}subtractUnit(e){switch(e){case n.Year:return this.subtractYear();case n.Month:return this.subtractMonth();case n.Day:return this.subtractDay();case n.Hour:return this.subtractHour();case n.Minute:return this.subtractMinute();case n.Second:return this.subtractSecond()}}invokeDateOperation(e,t){if(e===r.Add){this.addUnit(t);return}if(e===r.Subtract){this.subtractUnit(t);return}throw Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf(`day`)}setEndOfDay(){this.#e=this.#e.endOf(`day`)}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#i().day}getUTCFullYear(){return this.#i().year}getUTCDay(){let e=this.#i().weekday;return e===7?0:e}getUTCMonth(){return this.#i().month-1}getUTCHours(){return this.#i().hour}getUTCMinutes(){return this.#i().minute}getUTCSeconds(){return this.#i().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=this.#e;if(n===2){let r=i.#r(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!i.#r(this.#e.year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let a=this.getHours(),o=a-i;o===2?r!==24&&(this.dstStart=i+1):o===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=a)}#i(){return this.#e.toUTC()}};e.CronDate=i,e.default=i})),Mn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=jn(),n=G(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Nn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=G(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Pn=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(W(),e),n(En(),e),n(Dn(),e),n(G(),e),n(On(),e),n(kn(),e),n(Mn(),e),n(Nn(),e)})),Fn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Pn();e.CronFieldCollection=class e{#e;#t;#n;#r;#i;#a;static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:n,hour:r,dayOfMonth:i,month:a,dayOfWeek:o}){if(!e)throw Error(`Validation error, Field second is missing`);if(!n)throw Error(`Validation error, Field minute is missing`);if(!r)throw Error(`Validation error, Field hour is missing`);if(!i)throw Error(`Validation error, Field dayOfMonth is missing`);if(!a)throw Error(`Validation error, Field month is missing`);if(!o)throw Error(`Validation error, Field dayOfWeek is missing`);if(a.values.length===1&&!i.hasLastChar&&o.isWildcard&&!(parseInt(i.values[0],10)<=t.CronMonth.daysInMonth[a.values[0]-1]))throw Error(`Invalid explicit day of month definition`);this.#e=e,this.#t=n,this.#n=r,this.#i=a,this.#a=o,this.#r=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#r}get month(){return this.#i}get dayOfWeek(){return this.#a}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`){t.push(n),t.push({start:e,count:1}),n=void 0;return}if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}),n&&t.push(n),t}static#o(e,t,n){let r=t.step;return r?r===1&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?`?`:`*`:r!==1&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static#s(e,t){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let r=e.start===0?e.count-1:e.count;if(!n)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(n*r>e.end){let t=(t,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%n===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,t).filter(e=>e!==null).join(`,`)}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=this.#a.values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=this.#i.values.length===1?t.CronMonth.daysInMonth[this.#i.values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=e.#o(n,a[0],r);if(t)return t}return a.map(i=>{let a=i.count===1?i.start.toString():e.#s(i,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${a}#${n.nthDay}`:a}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#r),this.stringifyField(this.#i),this.stringifyField(this.#a)),t.join(` `)}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#r.serialize(),month:this.#i.serialize(),dayOfWeek:this.#a.serialize()}}}})),In=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var t=jn();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var n=1e4,r=class r{#e;#t;#n;#r;#i;#a;#o=null;#s=!1;constructor(e,n){this.#e=n,this.#t=n.tz,this.#r=n.startDate?new t.CronDate(n.startDate,this.#t):null,this.#i=n.endDate?new t.CronDate(n.endDate,this.#t):null;let r=n.currentDate??n.startDate;if(r){let e=new t.CronDate(r,this.#t);this.#r&&e.getTime()<this.#r.getTime()?r=this.#r:this.#i&&e.getTime()>this.#i.getTime()&&(r=this.#i)}this.#n=new t.CronDate(r,this.#t),this.#a=e}get fields(){return this.#a}static fieldsToExpression(e,t){return new r(e,t||{})}static#c(e,t){return t.some(t=>t===e)}#l(e,t){return e[t?e.length-1:0]}#u(e){let n=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#o===n)return this.#s;let r=new t.CronDate(e);r.setStartOfDay();let i=new t.CronDate(e);return i.setEndOfDay(),this.#o=n,this.#s=r.getUTCOffset()!==i.getUTCOffset(),this.#s}#d(e,n,r){let i=this.#a.second.values,a=e.getSeconds(),o=this.#a.second.findNearestValue(a,r);if(o!==null){e.setSeconds(o);return}e.applyDateOperation(n,t.TimeUnit.Minute,this.#a.hour.values.length),e.setSeconds(this.#l(i,r))}#f(e,n,r){let i=this.#a.minute.values,a=this.#a.second.values,o=e.getMinutes(),s=this.#a.minute.findNearestValue(o,r);if(s!==null){e.setMinutes(s),e.setSeconds(this.#l(a,r));return}e.applyDateOperation(n,t.TimeUnit.Hour,this.#a.hour.values.length),e.setMinutes(this.#l(i,r)),e.setSeconds(this.#l(a,r))}static#p(e,t){if(!t.isLastWeekdayOfMonth())return!1;let n=t.getDay();return e.some(e=>n===parseInt(e.toString().charAt(0),10)%7)}static#m(e,t){return e<=0||Math.ceil(t.getDate()/7)===e}next(){return this.#v()}prev(){return this.#v(!0)}hasNext(){let e=this.#n;try{return this.#v(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#v(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#n=new t.CronDate(e||this.#e.currentDate,this.#t)}stringify(e=!1){return this.#a.stringify(e)}includesDate(e){let{second:n,minute:r,hour:i,month:a}=this.#a,o=new t.CronDate(e,this.#t);return!(!n.values.includes(o.getSeconds())||!r.values.includes(o.getMinutes())||!i.values.includes(o.getHours())||!a.values.includes(o.getMonth()+1)||!this.#h(o))}toString(){return this.#e.expression||this.stringify(!0)}#h(e){let t=this.#a.dayOfMonth.isWildcard,n=!t,i=this.#a.dayOfWeek.isWildcard,a=!i,o=r.#c(e.getDate(),this.#a.dayOfMonth.values)||this.#a.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=this.#a.dayOfWeek.nthDay,c=r.#c(e.getDay(),this.#a.dayOfWeek.values)&&r.#m(s,e)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||c)||o&&!a||t&&!i&&c)}#g(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstEnd===s;if(e.dstStart!==null&&e.dstStart===s-1&&r.#c(e.dstStart,a))return!0;if(l&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.dstStart=null;let u=this.#a.hour.findNearestValue(s,i);if(u===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-u:u-s;for(let a=0;a<r&&(e.applyDateOperation(n,t.TimeUnit.Hour,o.length),!(!i&&e.getHours()>=u||i&&e.getHours()<=u));a++);}else e.setHours(u);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#_(t){if(!this.#r&&!this.#i)return;let n=t.getTime();if(this.#r&&n<this.#r.getTime()||this.#i&&n>this.#i.getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#v(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime(),c=0;for(;++c<n;){if(this.#_(o),!this.#h(o)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!r.#c(o.getMonth()+1,this.#a.month.values)){o.applyDateOperation(a,t.TimeUnit.Month,this.#a.hour.values.length);continue}if(this.#g(o,a,i)){if(!r.#c(o.getMinutes(),this.#a.minute.values)){this.#f(o,a,i);continue}if(!r.#c(o.getSeconds(),this.#a.second.values)){this.#d(o,a,i);continue}if(s===o.getTime()&&(a===`Add`||o.getMilliseconds()===0)){o.applyDateOperation(a,t.TimeUnit.Second,this.#a.hour.values.length);continue}break}}if(c>=n)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return o.getMilliseconds()!==0&&o.setMilliseconds(0),this.#n=o,o}[Symbol.iterator](){return{next:()=>{try{return{value:this.#v(),done:!1}}catch{return{value:void 0,done:!0}}}}}};e.CronExpression=r,e.default=r})),Ln=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),Rn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=Fn(),n=In(),r=Ln(),i=Pn(),a;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(a||(e.PredefinedExpressions=a={}));var o;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(o||(e.CronUnit=o={}));var s;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(s||(e.Months=s={}));var c;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(c||(e.DayOfWeek=c={})),e.CronExpressionParser=class e{static parse(s,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,r.seededRandom)(u);s=a[s]||s;let f=e.#e(s,l);if(!(f.dayOfMonth===`*`||f.dayOfWeek===`*`||!l))throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let p=e.#t(o.Second,f.second,i.CronSecond.constraints,d),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d),ee=e.#t(o.Hour,f.hour,i.CronHour.constraints,d),te=e.#t(o.Month,f.month,i.CronMonth.constraints,d),h=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d),{dayOfWeek:g,nthDayOfWeek:_}=e.#u(f.dayOfWeek),ne=e.#t(o.DayOfWeek,g,i.CronDayOfWeek.constraints,d),re=new t.CronFieldCollection({second:new i.CronSecond(p,{rawValue:f.second}),minute:new i.CronMinute(m,{rawValue:f.minute}),hour:new i.CronHour(ee,{rawValue:f.hour}),dayOfMonth:new i.CronDayOfMonth(h,{rawValue:f.dayOfMonth}),month:new i.CronMonth(te,{rawValue:f.month}),dayOfWeek:new i.CronDayOfWeek(ne,{rawValue:f.dayOfWeek,nthDayOfWeek:_})});return new n.CronExpression(re,{...c,expression:s})}static#e(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);e||=`0 * * * * *`;let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`*`,`*`,`*`,`*`,`*`,`0`];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}static#t(e,t,n,r){if((e===o.Month||e===o.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=s[e]||c[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#n(t,n),t=this.#r(t,n,r),this.#i(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,a)=>{if(n&&i&&a){let e=parseInt(n,10),o=parseInt(i,10),s=parseInt(a,10);if(e>o)throw Error(`Invalid range: ${e}-${o}, min > max`);if(s<=0)throw Error(`Invalid step: ${s}, must be positive`);let c=Math.max(e,t.min),l=Math.floor(r*s),u=[];for(let e=Math.floor(c/s)*s+l;e<=o;e+=s)e>=c&&u.push(e);return u.join(`,`)}else if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}else if(a){let e=parseInt(a,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(`,`)}else return String(Math.floor(r*(t.max-t.min+1)+t.min))})}static#i(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#d(r,n))i.push(n);else{let e=parseInt(n.toString(),10);if(!(e>=r.min&&e<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(t===o.DayOfWeek?e%7:n)}}return n.split(`,`).forEach(n=>{if(!(n.length>0))throw Error(`Invalid list value format`);a(e.#a(t,n,r),r)}),i}static#a(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(i[0].includes(`-`)||(i[0]=`${i[0]}-${r.max}`),e.#l(t,i[0],parseInt(i[1],10),r)):e.#l(t,n,1,r)}static#o(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#c(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#l(e,t,n,r){let i=t.split(`-`);if(i.length<=1)return isNaN(+t)?t:+t;let[a,o]=i.map(e=>parseInt(e,10));return this.#o(a,o,r),this.#s(n),this.#c(e,a,o,n)}static#u(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,\-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}static#d(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),zn=e(((e,t)=>{t.exports={}})),Bn=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var t=Rn();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=zn(),r=await n(t,`utf8`);return e.#e(r)}static parseFileSync(t){let{readFileSync:n}=zn(),r=n(t,`utf8`);return e.#e(r)}static#e(t){let n=t.split(`
|
|
2
|
+
`),r={variables:{},expressions:[],errors:{}};for(let t of n){let n=t.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``);continue}try{let t=e.#t(n);r.expressions.push(t.interval)}catch(e){r.errors[n]=e}}return r}static#t(e){let n=e.split(` `);return{interval:t.CronExpressionParser.parse(n.slice(0,5).join(` `)),command:n.slice(5,n.length)}}}})),Vn=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var r=Rn(),i=jn();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var a=Fn();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return a.CronFieldCollection}});var o=In();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var s=Rn();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return s.CronExpressionParser}});var c=Bn();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(Pn(),e),e.default=r.CronExpressionParser}))(),Hn=/^([01]\d|2[0-3]):([0-5]\d)$/;function Un(e){let t=e.trim();if(!t)return!1;try{return Intl.DateTimeFormat(void 0,{timeZone:t}),!0}catch{return!1}}function Wn(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function Gn(e,t,n=new Date().getDay()){let r=t.trim().match(Hn);if(!r)throw Error(`time must be HH:mm`);let i=Number(r[1]),a=Number(r[2]);return e===`daily`?`${a} ${i} * * *`:e===`weekdays`?`${a} ${i} * * 1-5`:`${a} ${i} * * ${n}`}function Kn(e){let t=e.trim().match(/^(\d{1,2}) (\d{1,2}) \* \* (\*|[0-6]|1-5)$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=t[3],a=`${String(r).padStart(2,`0`)}:${String(n).padStart(2,`0`)}`;return i===`*`?{preset:`daily`,time:a}:i===`1-5`?{preset:`weekdays`,time:a}:{preset:`weekly`,time:a,dayOfWeek:Number(i)}}function qn(e){let t=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],n=Jn(e.time);return e.preset===`daily`?`Every day at ${n}`:e.preset===`weekdays`?`Every weekday at ${n}`:`Every ${t[e.dayOfWeek??0]??`Sunday`} at ${n}`}function Jn(e){let t=e.match(Hn);if(!t)return e;let n=Number(t[1]),r=t[2],i=n>=12?`PM`:`AM`;return`${n%12==0?12:n%12}:${r} ${i}`}function Yn(e,t,n=new Date){if(!Un(t))return null;try{return Vn.CronExpressionParser.parse(e,{tz:t,currentDate:n}).next().toDate()}catch{return null}}function Xn(e,t=new Date){let n=e.getTime()-t.getTime();if(n<=0)return`Next run soon`;let r=Math.round(n/6e4);if(r<60)return`Next run in ${r} min`;let i=Math.round(r/60);return i<48?`Next run in ${i} hours`:`Next run in ${Math.round(i/24)} days`}var Zn=/^[a-zA-Z0-9._:-]+$/;function Qn(e){let t=e.trim();return t?t.length>100?`eventKey must be 100 characters or fewer`:Zn.test(t)?null:`eventKey may only contain letters, numbers, dots, colons, underscores, and hyphens`:`eventKey is required for event triggers`}function K(e){return e!=null&&e.trim()!==``}function $n(e){return K(e.scheduledAt)?`scheduledAt requires triggerType 'schedule'`:K(e.scheduleCron)?`scheduleCron requires triggerType 'schedule'`:K(e.timezone)?`timezone requires triggerType 'schedule'`:K(e.eventKey)?`eventKey requires triggerType 'event'`:null}function er(e){let t=e.scheduledAt?.trim()??null,n=e.scheduleCron?.trim()??null,r=e.timezone?.trim()??null;return t&&n?`Provide either scheduledAt or scheduleCron, not both`:!t&&!n?`scheduledAt or scheduleCron is required for schedule triggers`:r?Un(r)?t&&Number.isNaN(Date.parse(t))?`scheduledAt must be an ISO timestamp`:K(e.eventKey)?`eventKey is only allowed for event triggers`:null:`timezone must be a valid IANA timezone`:`timezone is required for schedule triggers`}function tr(e){return Qn(e.eventKey??``)||(K(e.scheduledAt)?`scheduledAt is only allowed for schedule triggers`:K(e.scheduleCron)?`scheduleCron is only allowed for schedule triggers`:K(e.timezone)?`timezone is only allowed for schedule triggers`:null)}function nr(e){let t=e.triggerType??null;return t===null?$n(e):t===`schedule`?er(e):tr(e)}var rr=`{tarsk}`;function ir(e,t){let n=e.replace(/\/$/,``);if(t===n)return rr;let r=`${n}/`;return t.startsWith(r)?`${rr}/${t.slice(r.length)}`:t}var ar=3e4,or=2e3;function sr(e){return typeof process<`u`&&process.platform===`win32`?`for /f "tokens=5" %a in ('netstat -aon ^| findstr :${e}') do taskkill /F /PID %a`:`lsof -ti :${e} | xargs kill -9`}function q(e){return e.replace(/\x1b\[[0-9;]*m/g,``)}var cr=[{pattern:/https?:\/\/localhost[:/](\d+)/i},{pattern:/https?:\/\/127\.0\.0\.1:(\d+)/i},{pattern:/localhost:(\d+)/i,portGroup:1},{pattern:/127\.0\.0\.1:(\d+)/i,portGroup:1},{pattern:/https?:\/\/(0\.0\.0\.0|\[::?\]):(\d+)/i,portGroup:2},{pattern:/https?:\/\/(192\.168\.\d+\.\d+):(\d+)/i,portGroup:2},{pattern:/https?:\/\/\[::1\]:(\d+)/i}];function lr(e){let t=e[0];return t.includes(`://`)?t.replace(/\/+$/,``):t.startsWith(`127.0.0.1:`)?`http://${t}`:`http://localhost:${e[1]}`}function J(e){let t=q(e);for(let{pattern:e,portGroup:n}of cr){let r=t.match(e);if(r)return n!=null&&r[n]&&r[0].includes(`://`),lr(r)}}export{T as $,Rt as A,ue as At,At as B,re as Bt,Jt as C,b as Ct,Ut as D,_e as Dt,Wt as E,ye as Et,F,f as Ft,j as G,oe as Gt,wt as H,ne as Ht,P as I,d as It,yt as J,l as Jt,_t as K,a as Kt,jt as L,u as Lt,zt as M,le as Mt,L as N,y as Nt,Ft as O,ve as Ot,I as P,he as Pt,ot as Q,M as R,te as Rt,Qt as S,we as St,Gt as T,be as Tt,A as U,h as Ut,Ct as V,_ as Vt,St as W,ie as Wt,et as X,ct as Y,at as Z,mn as _,xe as _t,ir as a,x as at,an as b,Te as bt,qn as c,He as ct,Yn as d,ze as dt,nt as et,Kn as f,Be as ft,vn as g,Ae as gt,_n as h,je as ht,sr as i,qe as it,Lt as j,me as jt,Vt as k,fe as kt,Xn as l,Ge as lt,gn as m,Ne as mt,or as n,Ze as nt,nr as o,Ke as ot,xn as p,Me as pt,gt as q,r as qt,ar as r,Je as rt,Gn as s,Ue as st,J as t,Qe as tt,Wn as u,We as ut,Yt as v,Se as vt,Kt as w,De as wt,U as x,Ce as xt,z as y,Ee as yt,kt as z,ee as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t}from"./react-vendor-Ee0-5T4I.js";import{a as n}from"./dist-DIjomljy.js";var r=e(t(),1);function i(e){let[t,i]=r.useState(void 0);return n(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],r,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;i({width:r,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else i(void 0)},[e]),t}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";var i=t(),a=e(n(),1),o=r(),s=(0,a.createContext)(null);function c(e){let t=(0,i.c)(8),{children:n}=e,[r,c]=(0,a.useState)(null),[u,d]=(0,a.useState)(0),[f,p]=(0,a.useState)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{d(l)},t[0]=m):m=t[0];let h=m,g;t[1]!==f||t[2]!==u||t[3]!==r?(g={pendingExplorerPath:r,setPendingExplorerPath:c,explorerRefreshTick:u,triggerExplorerRefresh:h,explorerClearPath:f,setExplorerClearPath:p},t[1]=f,t[2]=u,t[3]=r,t[4]=g):g=t[4];let _=g,v;return t[5]!==n||t[6]!==_?(v=(0,o.jsx)(s.Provider,{value:_,children:n}),t[5]=n,t[6]=_,t[7]=v):v=t[7],v}function l(e){return e+1}function u(){let e=(0,a.useContext)(s);if(!e)throw Error(`useExplorerTab must be used within an ExplorerTabProvider`);return e}export{u as n,c as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/explorer-tree-DvD1-WW3.js","assets/rolldown-runtime-aKtaBQYM.js","assets/index-Bmkj1Qwa.js","assets/react-vendor-Ee0-5T4I.js","assets/markdown-renderer-Dx9-Ljv0.js","assets/button-sfGyFWfz.js","assets/utils-CT-Dw22R.js","assets/dist-ZlK7I-y-.js","assets/dialog-CP2cYR59.js","assets/use-browser-overlay-block-DyprQSIG.js","assets/browser-overlay-block-CiDtkfup.js","assets/dist-DIjomljy.js","assets/dist-BZvmHCxP.js","assets/Combination-lwI_j-mU.js","assets/tooltip-B6ziVyTv.js","assets/dist-DiMgghKn.js","assets/dist-mdooLpmq.js","assets/use-toast-xpb5jNtN.js","assets/explorer-tab-context-BxUVwWQQ.js","assets/use-open-chat-dock-panel-D1D5bnsL.js","assets/chat-dock-context-DIyMsJHM.js","assets/api-ODizoHnY.js","assets/store-Be_7VK0D.js","assets/main-tab-context-Byl1LybL.js","assets/chunk-QFMPRPBF-COsSkB7x.js","assets/query-keys-5QPW6Dv-.js","assets/alert-dialog-FQ5_FqBX.js","assets/async-loading-fallback-C173aA9v.js","assets/scroll-area-nbNFO91g.js","assets/dist-OixawqbU.js","assets/use-suspense-resource-Dkz6ddFN.js","assets/suspense-resource-DnYnmTbs.js","assets/create-project-workspace-BiRMezO9.js","assets/ndjson-stream-DeGpE5o5.js","assets/scenic-chrome-CbN3vum7.js","assets/dist-CWq9XRXF.js","assets/dist-DjKXDRW7.js","assets/dist-CWnEmdyL.js","assets/dist-DrpdKPSI.js","assets/dist-CSssbxDI.js","assets/useInfiniteQuery-DUeUxDcu.js","assets/index-DPMRI86E.css","assets/async-error-boundary-DCDTsNTO.js","assets/card-D5k0GHxM.js","assets/context-menu-Bo0OMC7-.js","assets/explorer-view-B4WJUy7s.js","assets/monaco-setup-DU2h1v3K.js","assets/monaco-lJcjGRXq.js","assets/monaco-BQve5vfS.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,r as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{at as i}from"./dist-ZlK7I-y-.js";import{r as a}from"./store-Be_7VK0D.js";import{w as o}from"./dist-DIjomljy.js";import{t as s}from"./utils-CT-Dw22R.js";import{n as c,r as l}from"./async-loading-fallback-C173aA9v.js";import{n as u}from"./scroll-area-nbNFO91g.js";import{t as d}from"./use-toast-xpb5jNtN.js";import{n as f}from"./explorer-tab-context-BxUVwWQQ.js";import{at as p,c as m,d as ee,dn as h,it as g,l as _,nt as v,rt as y,tt as b,u as x}from"./index-Bmkj1Qwa.js";import{t as S}from"./async-error-boundary-DCDTsNTO.js";var C=e(t(),1),w=r(),te=(0,C.lazy)(()=>n(()=>import(`./explorer-tree-DvD1-WW3.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]))),ne=(0,C.lazy)(()=>n(()=>import(`./explorer-view-B4WJUy7s.js`),__vite__mapDeps([45,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,46,47,48])));function T(){let e=a(e=>e.selectedThreadId),t=m(),[n,r]=(0,C.useState)(null),[T,E]=(0,C.useState)(!0),[D,O]=(0,C.useState)(null),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(0),{pendingExplorerPath:P,setPendingExplorerPath:F,explorerClearPath:I,setExplorerClearPath:L,triggerExplorerRefresh:R}=f();(0,C.useEffect)(()=>{function e(e){p(e.dataTransfer)&&e.preventDefault()}return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[]),(0,C.useEffect)(()=>{E(!0)},[e]);let z=(0,C.useCallback)(e=>{r(e),t&&E(!1)},[t]),B=(0,C.useCallback)(()=>{E(!0)},[]),V=(0,C.useCallback)(e=>{r(e),t&&E(!1)},[t]);(0,C.useEffect)(()=>{P&&(r({name:P.split(`/`).pop()??P,path:P,type:`file`}),t&&E(!1),F(null))},[t,P,F]),(0,C.useEffect)(()=>{I&&(n&&(n.path===I||n.path.startsWith(I+`/`))&&(r(null),t&&E(!0)),L(null))},[I,t,n,L]);function H(){N.current=0,M(!1)}function U(e){p(e.dataTransfer)&&(N.current+=1,M(!0))}function W(e){p(e.dataTransfer)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function G(e){p(e.dataTransfer)&&(N.current=Math.max(0,N.current-1),N.current===0&&M(!1))}function K(e){if(!p(e.dataTransfer))return;e.preventDefault(),H();let{files:t,skippedFolders:n}=g(e.dataTransfer);n>0&&d({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),t.length!==0&&O({files:t,dirPath:``})}let q=(0,C.useCallback)((e,t)=>{N.current=0,M(!1),O({files:e,dirPath:t})},[]);async function J(){if(!(!D||!e||k)){A(!0);try{let{copied:t,failures:n}=await y(e,D.dirPath,D.files);t.length>0&&R(),d(v(D,t.length,n))}finally{A(!1),O(null)}}}let Y={onDragEnter:U,onDragOver:W,onDragLeave:G,onDrop:K},X=j?(0,w.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-50 flex items-center justify-center bg-background/70`,children:(0,w.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border-2 border-dashed border-primary bg-background px-6 py-4`,children:[(0,w.jsx)(o,{className:`h-4 w-4 text-primary`}),(0,w.jsx)(`span`,{className:i.label,children:`Drop files to copy them into the repository`})]})}):null,Z=(0,w.jsx)(u,{className:`h-full`,children:e?(0,w.jsx)(h,{threadId:e,children:(0,w.jsx)(S,{fallbackTitle:`Failed to load files`,children:(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(l,{}),children:(0,w.jsx)(te,{threadId:e,selectedPath:n?.path??null,onNodeSelect:z,onFilesDrop:q})})})}):(0,w.jsx)(`p`,{className:s(i.caption,`px-3 py-4 text-center`),children:`No thread selected.`})}),Q=(0,w.jsx)(C.Suspense,{fallback:(0,w.jsx)(c,{}),children:(0,w.jsx)(ne,{selectedFile:n,showTreeBackButton:t&&!T,onShowTree:B,onFileCreated:V})}),$=(0,w.jsx)(b,{pendingDrop:D,dropCopying:k,onConfirm:()=>{J()},onDismiss:()=>{O(null)}});return t?(0,w.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,w.jsx)(`div`,{className:s(`flex-1 min-h-0 overflow-hidden`,!T&&`hidden`),children:Z}),(0,w.jsx)(`div`,{className:s(`flex-1 min-h-0 overflow-hidden`,T&&`hidden`),children:Q})]}):(0,w.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,w.jsxs)(ee,{direction:`horizontal`,className:`flex-1 overflow-hidden`,children:[(0,w.jsx)(x,{defaultSize:25,minSize:15,maxSize:50,className:`overflow-hidden border-r border-border`,children:Z}),(0,w.jsx)(_,{withHandle:!0}),(0,w.jsx)(x,{className:`overflow-hidden`,children:Q})]})]})}export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{at as i}from"./dist-ZlK7I-y-.js";import{Dn as a,Gt as o,Jt as s,Kt as c,i as l,kn as u,q as d}from"./dist-DIjomljy.js";import{s as f,t as p}from"./utils-CT-Dw22R.js";import{r as m,t as h}from"./async-loading-fallback-C173aA9v.js";import{t as g}from"./use-toast-xpb5jNtN.js";import{a as _,i as v,n as y,o as b}from"./dist-BZvmHCxP.js";import"./dialog-CP2cYR59.js";import{n as x}from"./explorer-tab-context-BxUVwWQQ.js";import{a as S,c as C,i as w,n as T,r as E,t as D}from"./alert-dialog-FQ5_FqBX.js";import{t as O}from"./suspense-resource-DnYnmTbs.js";import{t as k}from"./dist-DrpdKPSI.js";import{t as A}from"./use-suspense-resource-Dkz6ddFN.js";import{Dt as j,Ft as M,Lt as N,at as P,cn as F,ct as I,dt as L,fn as R,ft as z,it as B,ln as ee,mt as te,ot as ne,sn as re,st as ie}from"./index-Bmkj1Qwa.js";import{a as ae,i as V,n as oe,r as H,t as se}from"./context-menu-Bo0OMC7-.js";import{t as ce}from"./async-error-boundary-DCDTsNTO.js";var U=e(n(),1),W=t(),le=1,ue=.9,G=.8,de=.17,K=.1,fe=.999,pe=.9999,me=.99,he=/[\\\/_+.#"@\[\(\{&]/,ge=/[\\\/_+.#"@\[\(\{&]/g,_e=/[\s-]/,ve=/[\s-]/g;function ye(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?le:me;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=ye(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=le:he.test(e.charAt(l-1))?(d*=G,p=e.slice(i,l-1).match(ge),p&&i>0&&(d*=fe**+p.length)):_e.test(e.charAt(l-1))?(d*=ue,m=e.slice(i,l-1).match(ve),m&&i>0&&(d*=fe**+m.length)):(d*=de,i>0&&(d*=fe**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=pe)),(d<K&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=ye(e,t,n,r,l+1,a+2,o),f*K>d&&(d=f*K)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function be(e){return e.toLowerCase().replace(ve,` `)}function xe(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,ye(e,t,be(e),be(t),0,0,{})}var q=`[cmdk-group=""]`,Se=`[cmdk-group-items=""]`,Ce=`[cmdk-group-heading=""]`,we=`[cmdk-item=""]`,Te=`${we}:not([aria-disabled="true"])`,Ee=`cmdk-item-select`,J=`data-value`,De=(e,t,n)=>xe(e,t,n),Oe=U.createContext(void 0),Y=()=>U.useContext(Oe),ke=U.createContext(void 0),Ae=()=>U.useContext(ke),je=U.createContext(void 0),Me=U.forwardRef((e,t)=>{let n=We(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=We(()=>new Set),i=We(()=>new Map),a=We(()=>new Map),o=We(()=>new Set),s=Ue(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=l(),b=l(),x=l(),S=U.useRef(null),C=Ke();Z(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),Z(()=>{C(6,j)},[]);let w=U.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)A(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=M()?.id,w.emit()}),r||C(5,j),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=U.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{A(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();C(4,()=>{A(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??De;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Se);t?t.appendChild(e.parentElement===t?e:e.closest(`${Se} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Se} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${q}[${J}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(J);w.setState(`value`,e||void 0)}function A(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(q)?.querySelector(Ce))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return S.current?.querySelector(`${we}[aria-selected="true"]`)}function N(){return Array.from(S.current?.querySelectorAll(Te)||[])}function P(e){let t=N()[e];t&&w.setState(`value`,t.getAttribute(J))}function F(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(J))}function I(e){let t=M()?.closest(q),n;for(;t&&!n;)t=e>0?Ve(t,q):He(t,q),n=t?.querySelector(Te);n?w.setState(`value`,n.getAttribute(J)):F(e)}let L=()=>P(N().length-1),R=e=>{e.preventDefault(),e.metaKey?L():e.altKey?I(1):F(1)},z=e=>{e.preventDefault(),e.metaKey?P(0):e.altKey?I(-1):F(-1)};return U.createElement(k.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&R(e);break;case`ArrowDown`:R(e);break;case`p`:case`k`:_&&e.ctrlKey&&z(e);break;case`ArrowUp`:z(e);break;case`Home`:e.preventDefault(),P(0);break;case`End`:e.preventDefault(),L();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(Ee);t.dispatchEvent(e)}}}}},U.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Ye},c),Je(e,e=>U.createElement(ke.Provider,{value:w},U.createElement(Oe.Provider,{value:T},e))))}),Ne=U.forwardRef((e,t)=>{let n=l(),r=U.useRef(null),i=U.useContext(je),a=Y(),o=Ue(e),s=o.current?.forceMount??i?.forceMount;Z(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Ge(n,r,[e.value,e.children,r],e.keywords),u=Ae(),d=Q(e=>e.value&&e.value===c.current),p=Q(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);U.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Ee,m),()=>t.removeEventListener(Ee,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function h(){u.setState(`value`,c.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return U.createElement(k.div,{ref:f(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!d,"data-disabled":!!g,"data-selected":!!d,onPointerMove:g||a.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),Pe=U.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=l(),s=U.useRef(null),c=U.useRef(null),u=l(),d=Y(),p=Q(e=>i||d.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);Z(()=>d.group(o),[]),Ge(o,s,[e.value,e.heading,c]);let m=U.useMemo(()=>({id:o,forceMount:i}),[i]);return U.createElement(k.div,{ref:f(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:p?void 0:!0},n&&U.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),Je(e,e=>U.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},U.createElement(je.Provider,{value:m},e))))}),Fe=U.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=U.useRef(null),a=Q(e=>!e.search);return!n&&!a?null:U.createElement(k.div,{ref:f(i,t),...r,"cmdk-separator":``,role:`separator`})}),Ie=U.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Ae(),o=Q(e=>e.search),s=Q(e=>e.selectedItemId),c=Y();return U.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),U.createElement(k.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Le=U.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=U.useRef(null),o=U.useRef(null),s=Q(e=>e.selectedItemId),c=Y();return U.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),U.createElement(k.div,{ref:f(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Je(e,e=>U.createElement(`div`,{ref:f(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Re=U.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return U.createElement(b,{open:n,onOpenChange:r},U.createElement(_,{container:o},U.createElement(v,{"cmdk-overlay":``,className:i}),U.createElement(y,{"aria-label":e.label,"cmdk-dialog":``,className:a},U.createElement(Me,{ref:t,...s}))))}),ze=U.forwardRef((e,t)=>Q(e=>e.filtered.count===0)?U.createElement(k.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Be=U.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return U.createElement(k.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Je(e,e=>U.createElement(`div`,{"aria-hidden":!0},e)))}),X=Object.assign(Me,{List:Le,Item:Ne,Input:Ie,Group:Pe,Separator:Fe,Dialog:Re,Empty:ze,Loading:Be});function Ve(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function He(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ue(e){let t=U.useRef(e);return Z(()=>{t.current=e}),t}var Z=typeof window>`u`?U.useEffect:U.useLayoutEffect;function We(e){let t=U.useRef();return t.current===void 0&&(t.current=e()),t}function Q(e){let t=Ae(),n=()=>e(t.snapshot());return U.useSyncExternalStore(t.subscribe,n,n)}function Ge(e,t,n,r=[]){let i=U.useRef(),a=Y();return Z(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(J,s),i.current=s}),i}var Ke=()=>{let[e,t]=U.useState(),n=We(()=>new Map);return Z(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function qe(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Je({asChild:e,children:t},n){return e&&U.isValidElement(t)?U.cloneElement(qe(t),{ref:t.ref},n(t.props.children)):n(t)}var Ye={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},$=r(),Xe=U.forwardRef((e,t)=>{let n=(0,W.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=p(`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(X,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Xe.displayName=X.displayName;var Ze=U.forwardRef((e,t)=>{let n=(0,W.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(d,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=p(`flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==t||n[8]!==o?(s=(0,$.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[a,(0,$.jsx)(X.Input,{ref:t,className:o,...i})]}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});Ze.displayName=X.Input.displayName;var Qe=U.forwardRef((e,t)=>{let n=(0,W.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=p(`max-h-[300px] overflow-y-auto overflow-x-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(X.List,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Qe.displayName=X.List.displayName;var $e=U.forwardRef((e,t)=>{let n=(0,W.c)(4),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=p(i.bodyMuted,`py-6 text-center`),n[0]=r):r=n[0];let a;return n[1]!==e||n[2]!==t?(a=(0,$.jsx)(X.Empty,{ref:t,className:r,...e}),n[1]=e,n[2]=t,n[3]=a):a=n[3],a});$e.displayName=X.Empty.displayName;var et=U.forwardRef((e,t)=>{let n=(0,W.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=p(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(X.Group,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});et.displayName=X.Group.displayName;var tt=U.forwardRef((e,t)=>{let n=(0,W.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=p(`-mx-1 h-px bg-divider`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,$.jsx)(X.Separator,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});tt.displayName=X.Separator.displayName;var nt=U.forwardRef((e,t)=>{let n=(0,W.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=p(p(i.body,`relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`),r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,$.jsx)(X.Item,{ref:t,className:o,...a}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});nt.displayName=X.Item.displayName;var rt=e=>{let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=p(i.compact,`ml-auto tracking-widest text-muted-foreground`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,$.jsx)(`span`,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o};rt.displayName=`CommandShortcut`;var it=100,at=500;function ot(e){return e.trim().toLowerCase().split(/\s+/).filter(Boolean)}function st(e,t){return t.length===0?!0:t.every(t=>e.haystack.includes(t))}function ct(e,t,n){if(t.length===0)return[];let r=[];for(let n of e)if(st(n,t)&&(r.push(n.node),r.length>=at))break;return r.sort((e,t)=>lt(e,t,n)).slice(0,it)}function lt(e,t,n){let r=n.trim().toLowerCase(),i=e.name.toLowerCase(),a=t.name.toLowerCase(),o=r?i.startsWith(r):!1;return o===(r?a.startsWith(r):!1)?e.type===t.type?e.path.localeCompare(t.path):e.type===`folder`?-1:1:o?-1:1}function ut(e){let t=(0,W.c)(38),{items:n,isReady:r,onRequestIndex:a,onOpenChange:s,onSelect:c}=e,l=r===void 0?!1:r,u=(0,U.useRef)(null),d=(0,U.useRef)(!1),f=(0,U.useRef)(!1),[m,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)(``),v=(0,U.useDeferredValue)(g),y;t[0]===a?y=t[1]:(y=function(){f.current||(f.current=!0,a())},t[0]=a,t[1]=y);let b=y,x;t[2]!==v||t[3]!==n?(x=ct(n,ot(v),v),t[2]=v,t[3]=n,t[4]=x):x=t[4];let S=x,C,w;t[5]!==s||t[6]!==g?(C=()=>{let e=g.trim().length>0;h(e),d.current!==e&&(d.current=e,s(e))},w=[s,g],t[5]=s,t[6]=g,t[7]=C,t[8]=w):(C=t[7],w=t[8]),(0,U.useEffect)(C,w);let T;t[9]===s?T=t[10]:(T=function(e){e||_(``),h(e),s(e),e&&requestAnimationFrame(()=>u.current?.focus())},t[9]=s,t[10]=T);let E=T,D;t[11]!==s||t[12]!==c?(D=function(e){c(e),h(!1),s(!1),_(``)},t[11]=s,t[12]=c,t[13]=D):D=t[13];let O=D,k;t[14]===b?k=t[15]:(k=e=>{b(),_(e.target.value)},t[14]=b,t[15]=k);let A;t[16]!==g||t[17]!==b||t[18]!==k?(A=(0,$.jsx)(ee,{asChild:!0,children:(0,$.jsx)(`div`,{className:`bg-transparent`,children:(0,$.jsx)(M,{ref:u,value:g,onPointerDown:b,onChange:k,placeholder:`Search files and folders`,className:`pr-[4px]`})})}),t[16]=g,t[17]=b,t[18]=k,t[19]=A):A=t[19];let j;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(j=p(i.compact,`py-4`),t[20]=j):j=t[20];let P=l?`No matches found.`:`Indexing files and folders...`,I;t[21]===P?I=t[22]:(I=(0,$.jsx)($e,{className:j,children:P}),t[21]=P,t[22]=I);let L;if(t[23]!==O||t[24]!==S){let e;t[26]===O?e=t[27]:(e=e=>(0,$.jsxs)(nt,{value:e.path,onSelect:()=>O(e),className:e.ignored?`opacity-50`:void 0,children:[e.type===`folder`?(0,$.jsx)(o,{className:`h-4 w-4 text-muted-foreground`}):(0,$.jsx)(N,{filename:e.name}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`div`,{className:`truncate`,children:e.name}),(0,$.jsx)(`div`,{className:p(i.compact,`truncate text-muted-foreground`),children:e.path})]})]},e.path),t[26]=O,t[27]=e),L=S.map(e),t[23]=O,t[24]=S,t[25]=L}else L=t[25];let R;t[28]===L?R=t[29]:(R=(0,$.jsx)(et,{children:L}),t[28]=L,t[29]=R);let z;t[30]!==I||t[31]!==R?(z=(0,$.jsx)(F,{align:`start`,side:`bottom`,sideOffset:4,onOpenAutoFocus:dt,className:`w-[var(--radix-popover-trigger-width)] p-0`,children:(0,$.jsx)(Xe,{shouldFilter:!1,children:(0,$.jsxs)(Qe,{children:[I,R]})})}),t[30]=I,t[31]=R,t[32]=z):z=t[32];let B;return t[33]!==E||t[34]!==m||t[35]!==z||t[36]!==A?(B=(0,$.jsxs)(re,{open:m,onOpenChange:E,children:[A,z]}),t[33]=E,t[34]=m,t[35]=z,t[36]=A,t[37]=B):B=t[37],B}function dt(e){return e.preventDefault()}function ft(e,t,n){return`explorer-dir:${e}:${t}:${n}`}function pt(e){let t=(0,W.c)(12),{threadId:n,dirPath:r,version:i,children:a}=e,o;t[0]!==r||t[1]!==n||t[2]!==i?(o=ft(n,r,i),t[0]=r,t[1]=n,t[2]=i,t[3]=o):o=t[3];let s;t[4]!==r||t[5]!==n?(s=()=>L(n,r).then(mt),t[4]=r,t[5]=n,t[6]=s):s=t[6];let c=A(o,s),l;t[7]!==a||t[8]!==c?(l=a(c),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;return t[10]===l?u=t[11]:(u=(0,$.jsx)($.Fragment,{children:l}),t[10]=l,t[11]=u),u}function mt(e){return e.entries}function ht(e){let t=(0,W.c)(17),{defaultValue:n,onCommit:r,onCancel:a,level:o,basePadding:s,icon:c}=e,l=(0,U.useRef)(null),u,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{l.current?.focus(),l.current?.select()},d=[],t[0]=u,t[1]=d):(u=t[0],d=t[1]),(0,U.useEffect)(u,d);let f;t[2]!==a||t[3]!==r?(f=function(e){if(e.key===`Enter`){let e=l.current?.value.trim()??``;e?r(e):a()}else e.key===`Escape`&&a()},t[2]=a,t[3]=r,t[4]=f):f=t[4];let p=f,m;t[5]!==a||t[6]!==r?(m=function(){let e=l.current?.value.trim()??``;e?r(e):a()},t[5]=a,t[6]=r,t[7]=m):m=t[7];let h=m,g;t[8]!==n||t[9]!==h||t[10]!==p?(g=(0,$.jsx)(`input`,{ref:l,defaultValue:n,onKeyDown:p,onBlur:h,className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`,onClick:gt}),t[8]=n,t[9]=h,t[10]=p,t[11]=g):g=t[11];let _;return t[12]!==s||t[13]!==c||t[14]!==o||t[15]!==g?(_=(0,$.jsxs)(j,{level:o,basePadding:s,className:i.conversationBody,children:[c,g]}),t[12]=s,t[13]=c,t[14]=o,t[15]=g,t[16]=_):_=t[16],_}function gt(e){return e.stopPropagation()}function _t(e){return e.map(e=>({node:e,haystack:`${e.name} ${e.path}`.toLowerCase()}))}function vt(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(0,t):``}var yt=(0,U.memo)(function e({node:t,level:n,threadId:r,selectedPath:l,expandedPaths:d,getDirVersion:f,renamingPath:m,newItemIn:_,onToggleFolder:v,onSelectNode:y,onStartRename:b,onCommitRename:x,onCancelRename:S,onDelete:C,onOpen:w,onCopyReference:T,onNewFile:E,onNewFolder:D,onCommitNewItem:O,onCancelNewItem:k,dropTargetPath:A,onFolderDropTargetChange:M,onFilesDrop:F}){let I=d.has(t.path),L=m===t.path,R=_?.dirPath===t.path&&I,z=A===t.path;return t.type===`folder`?(0,$.jsxs)(se,{children:[(0,$.jsx)(ae,{asChild:!0,children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(j,{level:n,basePadding:10,selected:l===t.path,className:p(i.conversationBody,t.ignored&&`opacity-50`,z&&`bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-primary`),onClick:e=>{e.stopPropagation(),v(t)},onDragOver:e=>{P(e.dataTransfer)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,z||M(t.path))},onDragLeave:e=>{P(e.dataTransfer)&&(e.currentTarget.contains(e.relatedTarget)||z&&M(null))},onDrop:e=>{if(!P(e.dataTransfer))return;e.preventDefault(),e.stopPropagation(),M(null);let{files:n,skippedFolders:r}=B(e.dataTransfer);r>0&&g({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),n.length>0&&F(n,t.path)},children:[(0,$.jsx)(`span`,{className:`text-muted-foreground w-3 flex-shrink-0`,children:I?(0,$.jsx)(u,{className:`h-3 w-3`}):(0,$.jsx)(a,{className:`h-3 w-3`})}),L?(0,$.jsxs)($.Fragment,{children:[I?(0,$.jsx)(c,{className:`h-4 w-4 flex-shrink-0`}):(0,$.jsx)(o,{className:`h-4 w-4 flex-shrink-0`}),(0,$.jsx)(`input`,{autoFocus:!0,defaultValue:t.name,onKeyDown:e=>{if(e.key===`Enter`){let n=e.target.value.trim();n?x(t,n):S()}else e.key===`Escape`&&S()},onBlur:e=>{let n=e.target.value.trim();n?x(t,n):S()},onClick:e=>e.stopPropagation(),className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`})]}):(0,$.jsxs)($.Fragment,{children:[I?(0,$.jsx)(c,{className:`h-4 w-4 flex-shrink-0`}):(0,$.jsx)(o,{className:`h-4 w-4 flex-shrink-0`}),(0,$.jsx)(`span`,{className:`flex-1 truncate`,children:t.name})]})]}),I&&(0,$.jsx)(`div`,{children:(0,$.jsx)(U.Suspense,{fallback:(0,$.jsx)(h,{}),children:(0,$.jsx)(pt,{threadId:r,dirPath:t.path,version:f(t.path),children:t=>(0,$.jsxs)($.Fragment,{children:[R&&(0,$.jsx)(ht,{defaultValue:``,level:n+1,basePadding:_.type===`folder`?10:22,icon:_.type===`folder`?(0,$.jsx)(o,{className:`h-4 w-4 flex-shrink-0`}):(0,$.jsx)(s,{className:`h-4 w-4 flex-shrink-0 text-muted-foreground`}),onCommit:O,onCancel:k}),t.map(t=>(0,$.jsx)(e,{node:t,level:n+1,threadId:r,selectedPath:l,expandedPaths:d,getDirVersion:f,renamingPath:m,newItemIn:_,onToggleFolder:v,onSelectNode:y,onStartRename:b,onCommitRename:x,onCancelRename:S,onDelete:C,onOpen:w,onCopyReference:T,onNewFile:E,onNewFolder:D,onCommitNewItem:O,onCancelNewItem:k,dropTargetPath:A,onFolderDropTargetChange:M,onFilesDrop:F},t.path))]})})})})]})}),(0,$.jsxs)(oe,{children:[(0,$.jsx)(H,{onSelect:()=>w(t),children:`Open`}),(0,$.jsx)(V,{}),(0,$.jsx)(H,{onSelect:()=>E(t.path),children:`New File...`}),(0,$.jsx)(H,{onSelect:()=>D(t.path),children:`New Folder...`}),(0,$.jsx)(V,{}),(0,$.jsx)(H,{onSelect:()=>T(t),children:`Copy Reference`}),(0,$.jsx)(H,{onSelect:()=>b(t),children:`Rename...`}),(0,$.jsx)(H,{onSelect:()=>C(t),className:`text-destructive focus:text-destructive`,children:`Delete`})]})]}):(0,$.jsxs)(se,{children:[(0,$.jsx)(ae,{asChild:!0,children:(0,$.jsxs)(j,{level:n,basePadding:22,selected:l===t.path,className:p(i.conversationBody,t.ignored&&`opacity-50`),onClick:()=>y(t),children:[(0,$.jsx)(N,{filename:t.name}),L?(0,$.jsx)(`input`,{autoFocus:!0,defaultValue:t.name,onKeyDown:e=>{if(e.key===`Enter`){let n=e.target.value.trim();n?x(t,n):S()}else e.key===`Escape`&&S()},onBlur:e=>{let n=e.target.value.trim();n?x(t,n):S()},onClick:e=>e.stopPropagation(),className:`flex-1 min-w-0 bg-transparent outline-none border border-border rounded px-1 text-base`}):(0,$.jsx)(`span`,{className:`flex-1 truncate`,children:t.name})]})}),(0,$.jsxs)(oe,{children:[(0,$.jsx)(H,{onSelect:()=>w(t),children:`Open`}),(0,$.jsx)(V,{}),(0,$.jsx)(H,{onSelect:()=>E(vt(t.path)),children:`New File...`}),(0,$.jsx)(H,{onSelect:()=>D(vt(t.path)),children:`New Folder...`}),(0,$.jsx)(V,{}),(0,$.jsx)(H,{onSelect:()=>T(t),children:`Copy Reference`}),(0,$.jsx)(H,{onSelect:()=>b(t),children:`Rename...`}),(0,$.jsx)(H,{onSelect:()=>C(t),className:`text-destructive focus:text-destructive`,children:`Delete`})]})]})}),bt=new Map;function xt({threadId:e,selectedPath:t,onNodeSelect:n,onFilesDrop:r}){let[i,a]=(0,U.useState)(()=>new Map([[``,0]])),[c,l]=(0,U.useState)(new Set),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null),[h,_]=(0,U.useState)(null),[v,y]=(0,U.useState)(null),[b,k]=(0,U.useState)(!1),[A,j]=(0,U.useState)([]),[M,N]=(0,U.useState)(!1),[P,F]=(0,U.useState)(!1),B=(0,U.useRef)(null),ee=(0,U.useRef)(0),re=(0,U.useRef)(null),{explorerRefreshTick:V,pendingExplorerPath:W,setExplorerClearPath:le}=x(),{fetchUnifiedStatus:ue}=R(),G=(0,U.useMemo)(()=>`${e}:${V}`,[V,e]),de=(0,U.useCallback)(e=>{(0,U.startTransition)(()=>{k(t=>t===e?t:e)})},[]),K=(0,U.useCallback)(async()=>{if(!e)return;let t=bt.get(G);if(t){j(t),N(!0);return}if(B.current!==G){B.current=G,j([]),N(!1);try{let t=_t((await L(e,``,!0)).entries);bt.set(G,t),j(t),N(!0)}catch{j([]),N(!1)}finally{B.current===G&&(B.current=null)}}},[G,e]),fe=(0,U.useCallback)(()=>{F(!0)},[]),pe=(0,U.useCallback)(()=>{bt.delete(G),j([]),N(!1)},[G]),me=(0,U.useCallback)(()=>{pe(),P&&K()},[pe,K,P]),he=(0,U.useCallback)(e=>i.get(e)??0,[i]),ge=(0,U.useCallback)(e=>{a(t=>{let n=new Map(t);return n.set(e,(t.get(e)??0)+1),n})},[]),_e=(0,U.useCallback)(t=>{e&&(O(ft(e,t,he(t))),ge(t))},[ge,he,e]),ve=(0,U.useCallback)(t=>{if(!e)return;let n=t.path.split(`/`);t.type===`file`&&n.pop();let r=[],i=``;for(let e of n)i=i?`${i}/${e}`:e,r.push(i);l(e=>{let t=new Set(e);for(let e of r)t.add(e);return t})},[e]);(0,U.useEffect)(()=>{if(!e)return;let t=re.current!==null&&re.current!==e;re.current=e,t&&(a(new Map([[``,0]])),l(new Set),d(null),p(null),ee.current=V)},[V,e]),(0,U.useEffect)(()=>{!e||V<=ee.current||(ee.current=V,a(t=>{let n=new Set([``]);for(let e of c)n.add(e);let r=new Map(t);for(let i of n){let n=t.get(i)??0;O(ft(e,i,n)),r.set(i,n+1)}return r}))},[V,c,e]),(0,U.useEffect)(()=>{j([]),N(!1),F(!1),B.current=null},[G]),(0,U.useEffect)(()=>{!P||!e||K()},[K,P,e]),(0,U.useEffect)(()=>{if(!W||!e)return;let t=W.split(`/`);t.pop();let n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);if(n.length!==0){l(e=>{let t=new Set(e);for(let e of n)t.add(e);return t});for(let e of n)a(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})}},[W,e]);function ye(e){c.has(e.path)?l(t=>{let n=new Set(t);return n.delete(e.path),n}):(l(t=>new Set(t).add(e.path)),a(t=>{if(t.has(e.path))return t;let n=new Map(t);return n.set(e.path,0),n}))}function be(e){_(e)}async function xe(t){try{await z(e,t.path)}catch{g({title:`Error`,description:`Failed to open "${t.name}"`,variant:`destructive`})}}async function q(e){try{await navigator.clipboard.writeText(e.path);let t=g({title:`Copied`,description:`Reference copied to clipboard.`});window.setTimeout(()=>{t.dismiss()},2e3)}catch{g({title:`Error`,description:`Failed to copy reference for "${e.name}"`,variant:`destructive`})}}async function Se(){if(!h)return;let t=h;_(null);try{await I(e,t.path),le(t.path),_e(vt(t.path)),me(),ue(!0),l(e=>{let n=new Set(e);for(let e of n)(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}),a(e=>{let n=new Map(e);for(let e of n.keys())(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n})}catch{g({title:`Error`,description:`Failed to move "${t.name}" to trash`,variant:`destructive`})}}function Ce(e){p(null),d(e.path)}async function we(t,n){if(n===t.name){d(null);return}d(null);try{await te(e,t.path,n),_e(vt(t.path)),me(),ue(!0),t.type===`folder`&&(l(e=>{let n=new Set(e);for(let e of n)(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}),a(e=>{let n=new Map(e);for(let e of n.keys())(e===t.path||e.startsWith(t.path+`/`))&&n.delete(e);return n}))}catch{g({title:`Error`,description:`Failed to rename "${t.name}"`,variant:`destructive`})}}function Te(e){d(null),c.has(e)||(l(t=>new Set(t).add(e)),a(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})),p({dirPath:e,type:`file`})}function Ee(e){d(null),c.has(e)||(l(t=>new Set(t).add(e)),a(t=>{if(t.has(e))return t;let n=new Map(t);return n.set(e,0),n})),p({dirPath:e,type:`folder`})}async function J(t){if(!f)return;let{dirPath:n,type:r}=f;p(null);try{r===`file`?await ne(e,n,t):await ie(e,n,t),_e(n),me(),ue(!0)}catch{g({title:`Error`,description:`Failed to create ${r} "${t}"`,variant:`destructive`})}}function De(){p(null)}let Oe=(0,U.useCallback)((e,t)=>{r?.(e,t)},[r]);function Y(e){ve(e),e.type===`file`&&n(e)}let ke=f?.dirPath===``?(0,$.jsx)(ht,{defaultValue:``,level:0,basePadding:f.type===`folder`?10:22,icon:f.type===`folder`?(0,$.jsx)(o,{className:`h-4 w-4 flex-shrink-0`}):(0,$.jsx)(s,{className:`h-4 w-4 flex-shrink-0 text-muted-foreground`}),onCommit:J,onCancel:De}):null;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(D,{open:h!==null,onOpenChange:e=>!e&&_(null),children:(0,$.jsxs)(w,{children:[(0,$.jsx)(C,{children:`Move to Trash`}),(0,$.jsxs)(S,{children:[`Move “`,h?.name,`” to trash?`]}),(0,$.jsxs)(`div`,{className:`flex gap-3 justify-end`,children:[(0,$.jsx)(E,{children:`Cancel`}),(0,$.jsx)(T,{onClick:()=>void Se(),children:`Move to Trash`})]})]})}),(0,$.jsx)(`div`,{className:`border-b border-border px-2 py-2`,children:(0,$.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(ut,{items:A,isReady:M,onRequestIndex:fe,onOpenChange:de,onSelect:e=>Y(e)},G)})})}),(0,$.jsxs)(se,{children:[(0,$.jsx)(ae,{asChild:!0,disabled:b,children:(0,$.jsx)(`div`,{className:`py-2 min-h-full`,children:(0,$.jsx)(ce,{fallbackTitle:`Failed to load files`,onRetry:()=>_e(``),children:(0,$.jsx)(U.Suspense,{fallback:(0,$.jsx)(m,{}),children:(0,$.jsx)(pt,{threadId:e,dirPath:``,version:he(``),children:r=>(0,$.jsxs)($.Fragment,{children:[ke,r.map(r=>(0,$.jsx)(yt,{node:r,level:0,threadId:e,selectedPath:t,expandedPaths:c,getDirVersion:he,renamingPath:u,newItemIn:f,onToggleFolder:ye,onSelectNode:n,onStartRename:Ce,onCommitRename:we,onCancelRename:()=>d(null),onDelete:be,onOpen:xe,onCopyReference:q,onNewFile:Te,onNewFolder:Ee,onCommitNewItem:J,onCancelNewItem:De,dropTargetPath:v,onFolderDropTargetChange:y,onFilesDrop:Oe},r.path))]})})})})})}),(0,$.jsxs)(oe,{children:[(0,$.jsx)(H,{onSelect:()=>Te(``),children:`New File...`}),(0,$.jsx)(H,{onSelect:()=>Ee(``),children:`New Folder...`})]})]})]})}export{xt as default};
|