PageSourceSearch

https://www.eigent.ai/_next/static/chunks/6628ca87ac5d5b9f.js

js eigent.ai collected 2026-09-25 13:59:54 UTC 34,558 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,996585,e=>{"use strict";e.s(["COLOR_CSS_VARS",0,{textPrimary:"var(--semantic-text-primary)",textSecondary:"var(--semantic-text-secondary)",textInverse:"var(--semantic-text-inverse)",brand1:"var(--palette-brand-1-strong)",brand2:"var(--palette-brand-2-strong)",brand3:"var(--palette-brand-3-strong)",statusError:"var(--palette-support-error-strong)",statusSuccess:"var(--palette-support-success-strong)",statusWarning:"var(--palette-support-warning-strong)",statusInfo:"var(--palette-support-info-strong)",chartGrid:"var(--semantic-chart-grid)",chartBorder:"var(--semantic-chart-border)"},"COLOR_TOKENS",0,{base:{elevated:"#FFFFFF",ink:"#222222",productInk:"#1D1D1D",canvas:"#F5F5F5",muted:"#EEEEEE",textQuiet:"#AAAAAA",textMuted:"#6B7280",textSecondary:"#4B5563",textStrong:"#111827"},brand:{brand1:{strong:"#155DFC",light:"#DBE7FE",depth:"#B8C8F5",wash:"#E9F0FF"},brand2:{strong:"#009966",light:"#C1D6BB",depth:"#9EC497",wash:"#D8EFD4"},brand3:{strong:"#E17100",light:"#F8EAE1",depth:"#F0C0A0",wash:"#FFF4EC"},camel:{strong:"#4C19E8"}}
1,support:{error:"#E7000B",success:"#00A63E",warning:"#D08700",info:"#0084D1"},illustration:{blueSoft:"#7195FF",coral:"#FF675E",fuchsia:"#ED6AFF",indigo:"#4F39F6",warmSurface:"#F5F4F0",waveBase:"#94A3B899",waveInfo:"#38BDF8"},integration:{discord:"#5865F2"},render:{canvasEnd:"#EBEBEB",emailCanvas:"#F8F9FA",emailText:"#333333",emailLink:"#2563EB",deckBackground:"#111311",elevated90:"#FFFFFFE6",ink06:"#0000000F"}}])},326999,e=>{"use strict";var t=e.i(271645),r=e.i(981140),a=e.i(820783),l=e.i(30030),i=e.i(610772),n=e.i(369340),s=e.i(726330),o=e.i(765491),d=e.i(774606),c=e.i(296626),u=e.i(248425),p=e.i(303536),f=e.i(985369),m=e.i(186312),h=e.i(991918),x=e.i(843476),y="Dialog",[g,v]=(0,l.createContextScope)(y),[b,w]=g(y),C=e=>{let{__scopeDialog:r,children:a,open:l,defaultOpen:s,onOpenChange:o,modal:d=!0}=e,c=t.useRef(null),u=t.useRef(null),[p,f]=(0,n.useControllableState)({prop:l,defaultProp:s??!1,onChange:o,caller:y});return(0,x.jsx)(b,{scope:r,triggerRef:c,contentRef:u,contentId:(0,i.useId)(),titleId:(0,i.useId)(),descriptionId:(0,i.useId)(),open:p,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(e=>!e),[f]),modal:d,children:a})};C.displayName=y;var N="DialogTrigger",_=t.forwardRef((e,t)=>{let{__scopeDialog:l,...i}=e,n=w(N,l),s=(0,a.useComposedRefs)(t,n.triggerRef);return(0,x.jsx)(u.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":Y(n.open),...i,ref:s,onClick:(0,r.composeEventHandlers)(e.onClick,n.onOpenToggle)})});_.displayName=N;var j="DialogPortal",[k,T]=g(j,{forceMount:void 0}),R=e=>{let{__scopeDialog:r,forceMount:a,children:l,container:i}=e,n=w(j,r);return(0,x.jsx)(k,{scope:r,forceMount:a,children:t.Children.map(l,e=>(0,x.jsx)(c.Presence,{present:a||n.open,children:(0,x.jsx)(d.Portal,{asChild:!0,container:i,children:e})}))})};R.displayName=j;var F="DialogOverlay",E=t.forwardRef((e,t)=>{let r=T(F,e.__scopeDialog),{forceMount:a=r.forceMount,...l}=e,i=w(F,e.__scopeDialog);return i.modal?(0,x.jsx)(c.Presence,{present:a||i.open,children:(0,x.jsx)(S,{...l,ref:t})}):null});E.displayName=F;var P=(0,h.createSlot)("DialogOverlay.RemoveScroll"),S=t.forwardRef((e,t)=>{let{__scopeDialog:r,...l}=e,i=w(F,r),n=(0,s.useDismissableLayerSurface)(),o=(0,a.useComposedRefs)(t,n);return(0,x.jsx)(f.RemoveScroll,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,x.jsx)(u.Primitive.div,{"data-state":Y(i.open),...l,ref:o,style:{pointerEvents:"auto",...l.style}})})}),D="DialogContent",I=t.forwardRef((e,t)=>{let r=T(D,e.__scopeDialog),{forceMount:a=r.forceMount,...l}=e,i=w(D,e.__scopeDialog);return(0,x.jsx)(c.Presence,{present:a||i.open,children:i.modal?(0,x.jsx)(L,{...l,ref:t}):(0,x.jsx)(B,{...l,ref:t})})});I.displayName=D;var L=t.forwardRef((e,l)=>{let i=w(D,e.__scopeDialog),n=t.useRef(null),s=(0,a.useComposedRefs)(l,i.contentRef,n);return t.useEffect(()=>{let e=n.current;if(e)return(0,m.hideOthers)(e)},[]),(0,x.jsx)(O,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:(0,r.composeEventHandlers)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=i.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,r.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,r.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),B=t.forwardRef((e,r)=>{let a=w(D,e.__scopeDialog),l=t.useRef(!1),i=t.useRef(!1);return(0,x.jsx)(O,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,n;null==(r=e.onCloseAutoFocus)||r.call(e,t),t.defaultPrevented||(l.current||null==(n=a.triggerRef.current)||n.focus(),t.preventDefault()),l.current=!1,i.current=!1},onInteractOutside:t=>{var r,n;null==(r=e.onInteractOutside)||r.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let s=t.target;(null==(n=a.triggerRef.current)?void 0:n.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),O=t.forwardRef((e,t)=>
1{let{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:i,...n}=e,d=w(D,r);return(0,p.useFocusGuards)(),(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(o.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:i,children:(0,x.jsx)(s.DismissableLayer,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Y(d.open),...n,ref:t,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})}),A="DialogTitle",U=t.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,l=w(A,r);return(0,x.jsx)(u.Primitive.h2,{id:l.titleId,...a,ref:t})});U.displayName=A;var $="DialogDescription",H=t.forwardRef((e,t)=>{let{__scopeDialog:r,...a}=e,l=w($,r);return(0,x.jsx)(u.Primitive.p,{id:l.descriptionId,...a,ref:t})});H.displayName=$;var z="DialogClose",M=t.forwardRef((e,t)=>{let{__scopeDialog:a,...l}=e,i=w(z,a);return(0,x.jsx)(u.Primitive.button,{type:"button",...l,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});function Y(e){return e?"open":"closed"}M.displayName=z,e.s(["Close",()=>M,"Content",()=>I,"Description",()=>H,"Overlay",()=>E,"Portal",()=>R,"Root",()=>C,"Title",()=>U,"Trigger",()=>_])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(326999),l=e.i(37727),i=e.i(361653),i=i;let n=(0,e.i(475254).default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var s=e.i(225913),o=e.i(975157),d=e.i(519455),c=e.i(746798);let u=a.Root,p=a.Trigger,f=a.Portal;a.Close;let m=r.forwardRef((e,r)=>{let{className:l,...i}=e;return(0,t.jsx)(a.Overlay,{ref:r,className:(0,o.cn)("motion-reduce-fade","fixed inset-0 z-50 backdrop-blur-[3px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",l),...i})});m.displayName=a.Overlay.displayName;let h=(0,s.cva)("fixed left-[50%] top-[50%] z-50 flex w-full translate-x-[-50%] translate-y-[-50%] flex-col gap-0 border border-solid border-border bg-surface-elevated shadow-perfect duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:zoom-in-105 data-[state=closed]:zoom-out-95 rounded-2xl scrollbar-hide max-h-[90vh]",{variants:{size:{sm:"max-w-[400px]",md:"max-w-[600px]",lg:"max-w-[900px]"}},defaultVariants:{size:"md"}}),x=r.forwardRef((e,r)=>{let{className:i,children:n,size:s,showCloseButton:c=!0,closeButtonClassName:u,closeButtonIcon:p,onClose:x,headerTitle:b,headerSubtitle:w,headerTooltip:C,headerShowTooltip:N=!1,showBackButton:_=!1,onBackClick:j,showConfirmButton:k=!1,showCancelButton:T=!1,confirmButtonText:R="Confirm",cancelButtonText:F="Cancel",onConfirm:E,onCancel:P,confirmButtonVariant:S="default",cancelButtonVariant:D="outline",footerStacked:I=!1,...L}=e;return(0,t.jsxs)(f,{children:[(0,t.jsx)(m,{}),(0,t.jsxs)(a.Content,{ref:r,className:(0,o.cn)("motion-reduce-fade",h({size:s}),i),...L,children:[(b||w)&&(0,t.jsx)(y,{title:b,subtitle:w,tooltip:C,showTooltip:N,showBackButton:_,onBackClick:j}),(0,t.jsx)(g,{className:"overflow-y-auto",children:n}),(T||k)&&(0,t.jsx)(v,{stacked:I,showCancelButton:T,showConfirmButton:k,cancelButtonText:F,confirmButtonText:R,onCancel:P,onConfirm:E,confirmButtonVariant:S,cancelButtonVariant:D}),c&&(0,t.jsx)(a.Close,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:"ghost",size:"icon",className:(0,o.cn)("absolute right-2 top-2 focus:outline-none focus:ring-0 focus:ring-offset-0",u),onClick:x,children:[p||(0,t.jsx)(l.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})});x.displayName=a.Content.displayName;let y=r.forwardRef((e,r)=>{let{className:l,title:s,subtitle:u,tooltip:p,showTooltip:f=!1,showBackButton:m=!1,onBackClick:h,children:x,...y}=e;return(0,t.jsxs)("div",{ref:r,className:(0,o.cn)("bg-surface-muted flex items-center justify-between p-4 relative shrink-0 w-full gap-2 overflow-hidden rounded-t-xl",l),...y,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",onClick:h,className:"h-6 w-6 p-0 hover:bg-transparent",children:(0,t.jsx)(n,{className:"h-4 w-4 text-icon-primary"})}),(0,t.jsxs)("div",{className:"flex flex-col text-center sm:text-left",children:[s&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(a.Title,{asChild:!0,children:(0,t.jsx)("span",{className:"text-body-md font-bold text-text-primary my-[1px]",children:s})}),f&&p&&(0,t.jsx)(c.TooltipSimple,{content:p,children:(0,t.jsx)(i.default,{className:"h-4 w-4 text-text-primary"})})]}),u&&(0,t.jsx)(a.Description,{asChild:!0,children:(0,t.jsx)("span",{className:"text-label-sm text-text-secondary font-extralight mt-1",children:u})})]})]}),x]})});y.displayName="DialogHeader";let g=r.forwardRef((e,r)=>{let{className:a,...l}=e;return(0,t.jsx)("div",{ref:r,className:(0,o.cn)("flex-1 p-4 min-h-0",a),...l})});g.displayName="DialogContentSection";let v=r.forwardRef((e,r)=>{let{className:a,showConfirmButton:l=!1,showCancelButton:i=!1,confirmButtonText:n="Confirm",cancelButtonText:s="Cancel",onConfirm:c,onCancel:u,confirmButtonVariant:p="default",cancelButtonVariant:f="outline",stacked:m=!1,children:h,...x}=e;return(0,t.jsxs)("div",{ref:r,className:(0,o.cn)("flex gap-2 pb-4 pt-2 px-4 relative shrink-0 w-full",m?"flex-col items-stretch":"flex-row items-center justify-end",a),...x,children:[h,i&&(0,t.jsx)(d.Button,{variant:f,size:"sm",onClick:u,className:(0,o.cn)(m&&"w-full"),children:s}),l&&(0,t.jsx)(d.Button,{variant:p,size:"sm",onClick:c,className:(0,o.cn)(m&&"w-full"),children:n})]})});v.displayName="DialogFooter",e.s(["Dialog",()=>u,"DialogContent",()=>x,"DialogTrigger",()=>p],776639)},165704,e=>{"use strict";let t={plus:{monthly:{amount:"19.99",amountInCents:1999,intervalLabel:"month"},yearly:{amount:"199.90",amountInCents:19990,intervalLabel:"year",monthlyEquivalent:"16.66",monthsFree:2}},pro:{monthly:{amount:"99.99",amountInCents:9999,intervalLabel:"month"},yearly:{amount:"999.90",amountInCents:99990,intervalLabel:"year",monthlyEquivalent:"83.33",monthsFree:2}}};function r(e){return"plus"===e||"pro"===e}function a(e,r){return t[e][r]}e.s(["BILLING_PLANS",0,t,"CREDIT_AWARDS",0,{registration:1e3,invite:500},"SUPPORT_EMAIL",0,"[email protected]","getBillingPrice",()=>a,"isPaidPlanId",()=>r])},341450,e=>{"use strict";function t(e){try{let t=new URL(e),r=t.hostname.toLowerCase();
1if("checkout.stripe.com"===r||"billing.stripe.com"===r||"pay.stripe.com"===r||t.origin===window.location.origin)return!0;return!1}catch{return!1}}e.s(["isTrustedPaymentRedirectUrl",()=>t])},559297,e=>{"use strict";e.i(167225);var t=e.i(843476),r=e.i(271645),a=e.i(519455);let l=(0,e.i(475254).default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var i=e.i(678784),n=e.i(520133),s=e.i(398756),o=e.i(584981),d=e.i(299437),c=e.i(861745),u=e.i(948148),p=e.i(846696),f=e.i(776639),m=e.i(375679),h=e.i(341450),x=e.i(165704),y=e.i(672974),g=e.i(996585);let v="eigent_trial_card_notice_toast_shown",b=null,w=()=>(b||(b=e.A(675340).then(e=>{let{loadStripe:t}=e;return t("pk_live_51Ql7HHGH3MATnUHoOv1s8qZg2zwRB40AF3GcOdgbKwoo6DUbSOReRPGySH9cR1SKauWYDytbg8T5iITwCxBXHJlJ00in3YYZ1f")})),b),C={plus:{amount:x.BILLING_PLANS.plus.monthly.amount,yearlyPerMonth:x.BILLING_PLANS.plus.yearly.monthlyEquivalent},pro:{amount:x.BILLING_PLANS.pro.monthly.amount,yearlyPerMonth:x.BILLING_PLANS.pro.yearly.monthlyEquivalent}};function N(e){return[null==e?void 0:e.checkout_session_id,null==e?void 0:e.sessionId,null==e?void 0:e.session_id,null==e?void 0:e.id].find(e=>"string"==typeof e&&e.startsWith("cs_"))}function _(e,t){let r=null==e?void 0:e.detail,a=r&&"object"==typeof r?r:null,l=(null==a?void 0:a.code)||(null==e?void 0:e.code)||(null==e?void 0:e.error_code),i=(null==a?void 0:a.recovery_url)||(null==e?void 0:e.recovery_url)||(null==e?void 0:e.checkout_url)||(null==e?void 0:e.url),n=(null==a?void 0:a.trial_unavailable_reason)||(null==e?void 0:e.trial_unavailable_reason)||(null==e?void 0:e.trialUnavailableReason),s=(null==a?void 0:a.message)||("string"==typeof r?r:void 0)||(null==e?void 0:e.message)||(null==e?void 0:e.text)||(null==e?void 0:e.error);return{message:"string"==typeof s?s:`HTTP error! status: ${t}`,code:l,requiresPaidConfirmation:!!(null==a?void 0:a.requires_paid_confirmation)||"PAYMENT_TRIAL_NOT_AVAILABLE"===l,recoveryUrl:"string"==typeof i?i:void 0,trialUnavailableReason:"string"==typeof n?n:void 0}}function j(e){var b,j;let{id:k,showFree:T=!0,showPlus:R=!0,showPro:F=!0,showEnterprise:E=!0,buttonClassName:P}=e,S=(0,n.useRouter)(),D=(0,n.usePathname)(),I=(0,s.useStackApp)(),[L,B]=(0,r.useState)(null);(0,r.useEffect)(()=>{var e;let t=!0;return Promise.resolve(null==I||null==(e=I.getUser)?void 0:e.call(I)).then(e=>{t&&B(e??null)}).catch(()=>{}),()=>{t=!1}},[I]);let{isLogin:O}=(0,o.useAuthStore)(),A=(0,u.useTranslations)("pricingPage"),U=(0,r.useRef)(A);U.current=A;let $=(0,c.useLocale)(),H=[{id:"free",iconColor:g.COLOR_TOKENS.brand.brand3.strong,title:A("plans.free.title"),price:{amount:A("plans.free.priceDisplay"),period:""},buttonText:A("plans.free.button"),buttonStyle:"secondary",usageHighlights:A.raw("plans.free.usageHighlights"),features:{includes:{title:A("plans.free.includesTitle"),items:A.raw("plans.free.features")}}},{id:"plus",iconColor:g.COLOR_TOKENS.illustration.fuchsia,title:A("plans.plus.title"),price:{amount:C.plus.amount,period:A("plans.plus.period"),freeTrial:A("plans.plus.freeTrial"),freeTrialActive:A("plans.plus.freeTrialActive"),yearly:x.BILLING_PLANS.plus.yearly.amount,badge:A("plans.plus.badge")},buttonText:A("plans.plus.button"),buttonStyle:"default",usageHighlights:A.raw("plans.plus.usageHighlights"),features:{includes:{title:A("plans.plus.includesTitle"),items:A.raw("plans.plus.features")}}},{id:"pro",iconColor:g.COLOR_TOKENS.illustration.indigo,title:A("plans.pro.title"),price:{amount:C.pro.amount,period:A("plans.pro.period"),freeTrial:A("plans.pro.freeTrial"),freeTrialActive:A("plans.pro.freeTrialActive"),yearly:x.BILLING_PLANS.pro.yearly.amount,badge:A("plans.pro.badge")},buttonText:A("plans.pro.button"),buttonStyle:"default",usageHighlights:A.raw("plans.pro.usageHighlights"),features:{includes:{title:A("plans.pro.includesTitle"),items:A.raw("plans.pro.features")}}},{id:"enterprise",iconColor:g.COLOR_TOKENS.brand.brand1.strong,title:A("plans.enterprise.title"),price:null,buttonText:A("plans.enterprise.button"),buttonStyle:"default",features:{enterprise:{title:A("plans.enterprise.featuresTitle"),items:A.raw("plans.enterprise.features")}}}],z=H.find(e=>"plus"===e.id),M=!!L||O,[Y,G]=(0,r.useState)("monthly"),[K,q]=(0,r.useState)(null),[V,W]=(0,r.useState)(null),[J,Z]=(0,r.useState)(!0),[Q,X]=(0,r.useState)(null),ee=(0,r.useRef)(null),et=(0,r.useRef)(null),er=(0,r.useRef)(null),ea=(0,r.useRef)(!1),[el,ei]=(0,r.useState)(0),[en,es]=(0,r.useState)(0);(0,r.useEffect)(()=>{q(null)},[D]),(0,r.useEffect)(()=>{var e;let t=null==V?void 0:V.plan_period,r=null==V||null==(e=V.plan_key)?void 0:e.toLowerCase();("plus"===r||"pro"===r)&&("monthly"===t||"yearly"===t)&&G(t)},[V]),(0,r.useEffect)(()=>{let e="undefined"!=typeof document?document.referrer:"";(0,m.trackPricingPageViewed)({referrer_path:e})},[]),(0,r.useEffect)(()=>{let e=!1;return(async()=>
1{if(!M){W(null),Z(!1);return}if(!L||await (0,d.ensureAppToken)(I)&&!e)try{let r=await fetch("/api/proxy/v1/subscription",{method:"GET"});if(!r.ok)return;let a=await r.json();if(!e){var t;W(a),Z(!1);let e=new URLSearchParams(window.location.search).get("pay"),r=ea.current;if(r||"undefined"==typeof sessionStorage||(r="1"===sessionStorage.getItem(v)),"success"===e&&!r&&(null==(t=a.plan_key)?void 0:t.toLowerCase())==="free"&&!1===a.trial_available&&"card_fingerprint_already_used"===a.trial_unavailable_reason){ea.current=!0,sessionStorage.setItem(v,"1");let e=U.current;p.toast.info(e("trialCardFingerprintNotice.title"),{description:e("trialCardFingerprintNotice.message"),duration:1e4})}}}catch(t){e||Z(!1)}})(),()=>{e=!0}},[I,M,L]),(0,r.useLayoutEffect)(()=>{let e=ee.current,t=et.current,r=er.current;if(!e||!t||!r)return;let a=null,l=()=>{let e=t.offsetWidth,a=r.offsetWidth;es("monthly"===Y?e:a),ei("monthly"===Y?0:e)},i=()=>{a&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{l(),a=null})};l();let n="undefined"!=typeof ResizeObserver?new ResizeObserver(i):null;return n&&(n.observe(e),n.observe(t),n.observe(r)),window.addEventListener("resize",i,{passive:!0}),()=>{a&&cancelAnimationFrame(a),null==n||n.disconnect(),window.removeEventListener("resize",i)}},[Y]);let eo=H.filter(e=>"free"===e.id?T:"plus"===e.id?R:"pro"===e.id?F:"enterprise"!==e.id||E),ed=e=>{let t="en"===$?"":`/${$}`;return`${window.location.origin}${t}/pricing?pay=${e}`},ec=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"trial-or-active",a="en"===$?"":`/${$}`;return`${window.location.origin}${a}/payment-success?plan=${encodeURIComponent(e)}&period=${t}&confirmation=${r}&session_id={CHECKOUT_SESSION_ID}`},eu=async(e,t)=>{q(t.plan_key);let r=t.plan_key,a=t.period,l=!1;try{let i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await i.json();if(13===n.code||401===i.status||"Could not validate credentials"===n.text){let e=window.location.pathname;S.push(`/signin?callbackUrl=${encodeURIComponent(e)}`);return}if(!i.ok){let r=_(n,i.status);if(r.recoveryUrl)if((0,h.isTrustedPaymentRedirectUrl)(r.recoveryUrl)){l=!0,window.location.href=r.recoveryUrl;return}else p.toast.error("This checkout link could not be verified. Try again or contact support.");if(r.requiresPaidConfirmation&&!t.confirm_paid_without_trial){let a=function(e,t,r){let a,l,i,n;return"card_fingerprint_already_used"===e?{title:"Free trial already used for this card",message:"This payment card has already been used for a 7 day free trial. Each card can only receive one trial, even across different accounts.",details:["Your trial checkout was canceled automatically, so the account stays on the Free plan.","Choose Try another card to open Checkout again and enter a different eligible card.","You can continue with paid checkout now; your card is charged only after Checkout completes."],confirmLabel:"Continue to paid checkout",cancelLabel:"Try another card"}:(a=(0,x.isPaidPlanId)(t)?t:"plus",l=(0,x.getBillingPrice)(a,"yearly"===r?"yearly":"monthly"),i=`$${l.amount}`,n=`$${l.amount}/${l.intervalLabel}`,{title:"Start your subscription now?",message:"Skip the 7-day free trial and get full access today.",details:["Your paid subscription will begin when you complete checkout.",`You'll be charged ${i} today.`,`Your subscription renews automatically at ${n} until cancelled.`],confirmLabel:"Continue to checkout",cancelLabel:"Not now"})}(r.trialUnavailableReason,t.plan_key,t.period);X({url:e,data:t,trialUnavailableReason:r.trialUnavailableReason,...a});return}throw Error(r.message)}if(n.error)throw Error(n.error.message||n.error||"Failed to create checkout session");if(n.plan_changed){l=!0,p.toast.success("Your subscription has been updated."),window.location.reload();return}let s=N(n),o=n.checkout_url||n.url;if(!s){if("string"==typeof o&&(0,h.isTrustedPaymentRedirectUrl)(o)){l=!0,window.location.href=o;return}"string"==typeof o&&p.toast.error("This checkout URL could not be verified. Contact support if this keeps happening.");let e=n.detail||n.message||n.text||"No checkout session ID received from server";throw Error(e)}(0,m.trackCheckoutSessionStarted)({plan_id:r,billing_period:a,checkout_session_id:s}),(0,m.trackCheckoutRedirectToStripe)({plan_id:r,checkout_session_id:s});let d=await w();if(d){let{error:e}=await d.redirectToCheckout({sessionId:s});if(e)throw Error(e.message);l=!0;return}if("string"==typeof o&&(0,h.isTrustedPaymentRedirectUrl)(o)){l=!0,window.location.href=o;return}throw Error("Stripe failed to load. Please refresh and try again.")}catch(t){if(t instanceof Error&&t.message.includes("Could not val
1idate credentials"))return;let e=t instanceof Error?t.message:"Failed to process payment. Please try again.";(0,m.trackCheckoutFailed)({plan_id:r,error_message:e}),p.toast.error(e)}finally{l||q(null)}},ep=async()=>{Q&&(X(null),await eu(Q.url,{...Q.data,confirm_paid_without_trial:!0}))},ef=async()=>{Q&&("card_fingerprint_already_used"!==Q.trialUnavailableReason?X(null):(X(null),await eu(Q.url,{...Q.data,retry_trial_with_new_card:!0})))},em=async e=>{q(e);let t=!1,r=(null==V?void 0:V.plan_period)==="yearly"?"yearly":"monthly";try{let a=await fetch("/api/proxy/v1/upgrade-trial-to-paid",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({success_url:ec(e,r,"paid"),cancel_url:ed("cancel")})}),l=await a.json().catch(()=>({}));if(!a.ok){let e=_(l,a.status);if(e.recoveryUrl)if((0,h.isTrustedPaymentRedirectUrl)(e.recoveryUrl)){t=!0,window.location.href=e.recoveryUrl;return}else p.toast.error("This checkout link could not be verified. Try again or contact support.");throw Error(e.message)}let i=N(l),n=l.checkout_url||l.url;if(i){let e=await w();if(e){t=!0;let{error:r}=await e.redirectToCheckout({sessionId:i});if(r)throw t=!1,Error(r.message);return}if("string"==typeof n&&(0,h.isTrustedPaymentRedirectUrl)(n)){t=!0,window.location.href=n;return}throw Error("Stripe failed to load. Please refresh and try again.")}if("string"==typeof n){if((0,h.isTrustedPaymentRedirectUrl)(n)){t=!0,window.location.href=n;return}throw Error("This checkout URL could not be verified. Contact support if this keeps happening.")}t=!0,p.toast.success("Your paid subscription is active."),window.location.reload()}catch(e){p.toast.error(e instanceof Error?e.message:"Failed to activate paid subscription.")}finally{t||q(null)}},eh=async e=>{if((0,m.trackPlanCtaClicked)({plan_id:e,billing_period:Y,is_authenticated:M}),"free"==e)S.push("/download");else if("enterprise"==e)S.push("/enterprise");else{var t;let r=(null==V?void 0:V.plan_period)==="yearly"?"yearly":"monthly";if((null==V?void 0:V.is_trialing)&&(null==(t=V.plan_key)?void 0:t.toLowerCase())===e&&Y===r)return void await em(e);if(!M){let e=window.location.pathname;S.push(`/signin?callbackUrl=${encodeURIComponent(e)}`);return}if(L)try{if(!await (0,d.ensureAppToken)(I)){let e=window.location.pathname;S.push(`/signin?callbackUrl=${encodeURIComponent(e)}`);return}}catch(t){let e=window.location.pathname;S.push(`/signin?callbackUrl=${encodeURIComponent(e)}`);return}eu("/api/proxy/v1/checkout-plan",{plan_key:e,period:Y,locale:$,success_url:ec(e,Y),cancel_url:ed("cancel")})}},ex=!!((null==V?void 0:V.trial_available)===!1&&(null==V?void 0:V.trial_unavailable_reason)==="card_fingerprint_already_used"&&(null==V||null==(b=V.plan_key)?void 0:b.toLowerCase())==="free"&&!(null==V?void 0:V.is_trialing)),ey=(null==Q?void 0:Q.trialUnavailableReason)==="card_fingerprint_already_used";return(0,t.jsxs)("div",{id:k,className:"flex flex-col",children:[(0,t.jsx)(f.Dialog,{open:!!Q,onOpenChange:e=>{e||X(null)},children:(0,t.jsx)(f.DialogContent,{size:"sm",className:"border-0 bg-surface-elevated text-text-primary shadow-ring-xl [&>div:first-child]:rounded-t-2xl [&>div:first-child]:bg-surface-elevated [&>div:first-child]:overflow-visible",headerTitle:ey?A("trialCardFingerprintDialog.title"):null==Q?void 0:Q.title,showCancelButton:!0,showConfirmButton:!0,footerStacked:ey,cancelButtonVariant:ey?"outline":"ghost",cancelButtonText:ey?A("trialCardFingerprintDialog.tryAnotherCard"):(null==Q?void 0:Q.cancelLabel)||"Not now",confirmButtonText:ey?A("trialCardFingerprintDialog.continuePaidCheckout"):(null==Q?void 0:Q.confirmLabel)||"Continue to checkout",onCancel:()=>void ef(),onConfirm:()=>void ep(),children:ey?(0,t.jsxs)("div",{className:"flex flex-col gap-3 text-sm leading-6 text-text-primary",children:[(0,t.jsx)("p",{className:"whitespace-pre-line",children:A("trialCardFingerprintDialog.intro")}),(0,t.jsx)("ul",{className:"list-disc space-y-2 pl-5",children:A.raw("trialCardFingerprintDialog.bullets").map((e,r)=>(0,t.jsx)("li",{children:e},r))})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 text-text-primary",children:[(null==Q?void 0:Q.message)?(0,t.jsx)("p",{className:"text-sm font-normal leading-6 text-text-primary",children:Q.message}):null,(null==Q||null==(j=Q.details)?void 0:j.length)?(0,t.jsx)("ul",{className:"flex flex-col gap-2 rounded-xl border border-border-subtle bg-surface-muted p-3",children:Q.details.map(e=>(0,t.jsxs)("li",{className:"flex gap-2 text-sm leading-5 text-text-primary",children:[(0,t.jsx)("span",{className:"mt-2 h-1.5 w-1.5 shrink-0 rounded-full bg-brand-2-strong"}),(0,t.jsx)("span",{children:e})]},e))}):null]})})}),(0,t.jsxs)("div",{className:"flex flex-col gap-12 items-center justify-center w-full",children:[(0,t.jsxs)("div",{ref:ee,className:"relative inline-flex w-fit h-12 items-stretch rounded-full border border-border-subtle bg-surface-elevated p-1",children:[(0,t.jsx)("div",{className:`${y.default.billingIndicator} pointer-events-none absolute inset-y-1 left-1 rounded-full bg-surface-muted`,style:{...en>0?{width:en}:{},transform:`translate3d(${el}px, 0, 0)`}}
1),(0,t.jsx)("button",{ref:et,onClick:()=>G("monthly"),className:`relative z-10 flex h-full items-center justify-center gap-1 rounded-full px-4 py-1 transition-[background-color,opacity] duration-200 ease-[var(--motion-ease-out)] cursor-pointer ${"monthly"!==Y?"hover:bg-surface-canvas hover:opacity-80":""}`,children:(0,t.jsx)("span",{className:`text-base font-medium transition-colors duration-200 ${"monthly"===Y?"text-text-primary":"text-text-secondary"}`,children:A("toggle.monthly")})}),(0,t.jsxs)("button",{ref:er,onClick:()=>G("yearly"),className:`relative z-10 flex h-full items-center justify-center gap-x-2 rounded-full px-4 py-1 transition-[background-color,opacity] duration-200 ease-[var(--motion-ease-out)] cursor-pointer ${"yearly"!==Y?"hover:bg-surface-canvas hover:opacity-80":""}`,children:[(0,t.jsx)("span",{className:`text-base font-medium transition-colors duration-200 ${"yearly"===Y?"text-text-primary":"text-text-secondary"}`,children:A("toggle.yearly")}),(0,t.jsx)("span",{className:"text-brand-2-strong text-xs font-semibold whitespace-nowrap px-2 bg-brand-2-strong/10 rounded-full",children:A("toggle.yearlyBadge")})]})]}),ex?(0,t.jsxs)("div",{className:"w-full max-w-3xl rounded-2xl border border-border-subtle bg-surface-muted px-5 py-4 text-left",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-text-primary",children:A("trialCardFingerprintNotice.title")}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-text-secondary",children:A("trialCardFingerprintNotice.message")}),(0,t.jsx)("p",{className:"mt-2 text-xs leading-5 text-text-secondary",children:A("trialCardFingerprintNotice.footer")})]}):null,(0,t.jsx)("div",{className:"flex flex-col gap-8 w-full",children:(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 w-full",children:eo.map(e=>{var r,n,s,o,d;let c,u,p,f,m,h,g,v,b,w,N,_,j,k,T,R,F,E,S,D,I,L,B,O;return c=null==V||null==(r=V.plan_key)?void 0:r.toLowerCase(),u=null==V||null==(n=V.trial_plan_key)?void 0:n.toLowerCase(),p=(null==V?void 0:V.is_trialing)&&u?u:c,f=!J&&p===e.id,h=(m=(null==V?void 0:V.plan_period)==="yearly"?"yearly":"monthly")===Y,g=f&&"free"!==e.id&&h,v=!!(f&&(null==V?void 0:V.is_trialing)&&h),b=(null==V?void 0:V.trial_available)??!(null==V?void 0:V.trial_used),w=(null==V?void 0:V.is_trialing)?A("planCard.onTrial"):(null==V?void 0:V.cancel_at_period_end)?A("planCard.cancelsSoon"):A("planCard.currentPlanBadge"),N="plus"===p||"pro"===p,_="plus"===e.id||"pro"===e.id,j=(0,x.isPaidPlanId)(e.id)?(0,x.getBillingPrice)(e.id,Y):null,k=f&&h,T=e=>"pro"===e?2:"plus"===e?1:"free"===e?0:-1,R=e=>"yearly"===e?1:"monthly"===e?0:-1,F=T(e.id)>T(p)&&R(Y)>=R(m)||T(e.id)===T(p)&&R(Y)>
1R(m),E="yearly"===Y?A("toggle.yearly"):A("toggle.monthly"),S="yearly"===m?A("toggle.yearly"):A("toggle.monthly"),D=v?A("planCard.activatePaidPlan",{plan:e.title,period:S}):k&&"free"!==e.id?A("planCard.currentPlanBadge"):N&&_?(null==V?void 0:V.is_trialing)?F?A("planCard.endTrialUpgrade",{plan:e.title,period:E}):A("planCard.endTrialSwitch",{plan:e.title,period:E}):F?A("planCard.upgradeTo",{plan:e.title,period:E}):A("planCard.switchTo",{plan:e.title,period:E}):!b&&_?A("planCard.subscribeNow"):b&&!f&&_?A("planCard.startTrialCta"):e.buttonText,I=!!(_&&b&&!N&&!v),L=!!(j&&!(k&&!v)),B=j?`$${j.amount}/${A("year"===j.intervalLabel?"planCard.intervalYear":"planCard.intervalMonth")}`:"",O="plus"===e.id,(0,t.jsxs)("div",{className:`${y.default.card} ${O?y.default.highlighted:y.default.plain} relative flex min-h-max flex-1 flex-col p-5 sm:p-6 shadow-lg ${g?"overflow-visible border-2":"overflow-hidden border border-border-subtle"}`,style:g?{borderColor:e.iconColor}:void 0,children:[g?(0,t.jsx)("div",{className:"pointer-events-none absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full px-3 py-0.5 text-xs font-medium text-text-inverse shadow-md",style:{backgroundColor:e.iconColor},children:w}):null,(0,t.jsx)("div",{className:"flex min-h-8 items-start",children:(0,t.jsx)("h3",{className:"text-xl font-semibold tracking-tight text-text-primary",children:e.title})}),(0,t.jsx)("div",{className:"mt-5 flex flex-col gap-3",children:e.price?(0,t.jsx)("div",{className:"flex min-h-11 items-center",children:(0,t.jsx)("div",{className:"flex min-h-6 flex-1 flex-col gap-0.5",children:"free"===e.id?(0,t.jsx)("div",{className:"flex min-h-6 flex-1 flex-col gap-0.5 select-none","aria-hidden":!0,children:(0,t.jsxs)("div",{className:"flex min-h-6 flex-wrap items-baseline gap-x-1 gap-y-1",children:[(0,t.jsx)("span",{className:"invisible text-2xl font-bold text-text-primary",children:"$"}),(0,t.jsx)("span",{className:"invisible text-2xl font-bold text-text-primary",children:"yearly"===Y?C.plus.yearlyPerMonth:C.plus.amount}),(null==z||null==(s=z.price)?void 0:s.period)?(0,t.jsxs)("span",{className:"invisible text-sm text-text-secondary",children:[z.price.period,"yearly"===Y?A("planCard.billedYearly"):""]}):null,"yearly"===Y&&(null==z||null==(o=z.price)?void 0:o.badge)?(0,t.jsx)("span",{className:"invisible rounded-full px-2 py-0.5 text-xs font-semibold",children:z.price.badge}):null]})}):"plus"===e.id||"pro"===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 flex-wrap items-baseline gap-x-1 gap-y-1",children:[(0,t.jsx)("span",{className:"text-2xl font-bold text-text-primary",children:"$"}),(0,t.jsx)("span",{className:"text-2xl font-bold text-text-primary",children:"yearly"===Y?"plus"===e.id?C.plus.yearlyPerMonth:C.pro.yearlyPerMonth:e.price.amount}),e.price.period?(0,t.jsxs)("span",{className:"text-sm text-text-secondary",children:[e.price.period,"yearly"===Y?A("planCard.billedYearly"):""]}):null,"yearly"===Y&&e.price.badge?(0,t.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-semibold text-text-inverse ${g?"":"bg-brand-2-strong"}`,style:g?{backgroundColor:e.iconColor}:void 0,children:e.price.badge}):null]}),"yearly"===Y&&e.price.yearly?(0,t.jsx)("p",{className:"mt-1 text-sm font-semibold text-text-primary",children:A("planCard.yearlyTotal",{price:`$${e.price.yearly}`})}):null]}):null})}):(0,t.jsx)("div",{className:"flex min-h-11 items-center",children:(0,t.jsx)("div",{className:"min-h-6 flex-1"})})}),(0,t.jsxs)("div",{className:"mt-5 flex flex-col gap-5",children:[J&&M?(0,t.jsx)("div",{className:"h-9 w-full animate-pulse rounded-md bg-border/40"}):(0,t.jsx)(a.Button,{variant:"secondary"===e.buttonStyle?"secondary":"default",disabled:K===e.id||k&&"free"!==e.id&&!v,onClick:()=>void eh(e.id),className:(e=>{if(P)return"string"==typeof P?P:P[e]})(e.id),children:K==e.id?A("loading"):D}),L?(0,t.jsx)("p",{className:"text-xs leading-5 text-text-secondary",children:A(I?"planCard.trialDisclosure":"planCard.paidDisclosure",{price:B})}):null,e.features.enterprise?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h4",{className:"text-sm font-bold text-text-primary",children:e.features.enterprise.title}),(0,t.jsx)(l,{className:"h-4 w-4 text-text-secondary"})]}),e.features.enterprise.items.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(i.CheckIcon,{className:"h-6 w-6 text-status-success"}),(0,t.jsx)("span",{className:"text-sm text-text-secondary",children:e})]},r))]}):e.features.includes?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex items-center gap-1 mb-2",children:(0,t.jsxs)("h4",{className:"text-sm font-medium text-text-primary",children:[e.features.includes.title,":"]}
1)}),null==(d=e.usageHighlights)?void 0:d.map((r,a)=>(0,t.jsxs)("div",{className:"flex w-full items-start gap-2",children:[(0,t.jsx)(i.CheckIcon,{className:"my-0.5 h-4 w-4 shrink-0 text-status-success"}),(0,t.jsx)("span",{className:"w-full text-sm leading-relaxed text-text-primary",children:r})]},`${e.id}-usage-${a}`)),e.features.includes.items.map((e,r)=>(0,t.jsxs)("div",{className:"flex w-full items-start gap-2",children:[(0,t.jsx)(i.CheckIcon,{className:"my-0.5 h-4 w-4 shrink-0 text-status-success"}),(0,t.jsx)("span",{className:"w-full text-sm leading-relaxed text-text-primary",children:e})]},r))]}):null]})]},e.id)})})})]})]})}e.s(["default",()=>j],559297)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.