PageSourceSearch

https://lmstudio.ai/_next/static/chunks/3563.7cd293a9e70fd14b.js

js lmstudio.ai collected 2026-10-01 07:25:42 UTC 7,584 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3563],{13563:(e,r,t)=>{t.r(r),t.d(r,{StripeElementsCheckout:()=>v});var a=t(95155),n=t(30926);let s=(0,n.createServerReference)("7f3f9b441a2df0281c9c12b9958a1f795384b211f2",n.callServer,void 0,n.findSourceMapURL,"saAcceptCheckoutTerms");var o=t(47101),l=t(64269),i=t(87082),d=t(97896),c=t(64955),u=t(78206),m=t(94511),f=t(5379),p=t(12115),h=t(33828),x=t(28122);function b(e){return{theme:e?"night":"stripe",variables:{borderRadius:"8px",colorPrimary:e?"#ffffff":"#18181b",colorBackground:e?"#18181b":"#ffffff",colorText:e?"#fafafa":"#18181b",colorDanger:"#dc2626",fontFamily:"Inter, ui-sans-serif, system-ui, sans-serif"}}}let y=(0,p.memo)(function(e){let{diagnostics:r,stopReadiness:t,onReady:n,eyebrow:m,lineItemLabel:y,lineItemLabels:v,lineItemNoun:g,onConfirmStarted:j,onSubmissionStateChange:w,onSuccess:N,showOrderSummary:k,submitLabel:_,title:S}=e,C=(0,u.useCheckout)(),{resolvedTheme:E}=(0,f.D)(),[R,M]=(0,p.useState)(!1),[I,L]=(0,p.useState)(!1),[P,D]=(0,p.useState)(null),O=null!=_?_:"Pay ".concat(C.total.total.amount),A=!0===k||void 0!==v,z=null!==C.recurring,q=!0===C.canConfirm&&I;async function G(e){if(e.preventDefault(),R||!q)return;let t=crypto.randomUUID(),a=performance.now(),n="terms";(0,i.wv)(r,"confirm_started",{operation:"confirm",operationId:t}),M(!0),null==w||w(!0),D(null);try{var o,l;null==j||j();let e=await s(C.id);if("fail"===e.type)throw Error(null!=(o=e.error.message)?o:"Could not record terms acceptance.");n="confirm";let c=await C.confirm();if("error"===c.type){(0,i.wv)(r,"confirm_failed",{operation:n,operationId:t,error:(0,d.sG)(c.error),durationMs:Math.round(performance.now()-a)}),D(null!=(l=c.error.message)?l:"Payment could not be completed."),M(!1),null==w||w(!1);return}(0,i.wv)(r,"confirm_succeeded",{operation:n,operationId:t,durationMs:Math.round(performance.now()-a)}),n="redirect",(0,i.wv)(r,"redirect_started",{operation:n,operationId:t}),(0,i.Io)(),N()}catch(e){(0,i.wv)(r,"redirect"===n?"request_failed":"confirm_failed",{operation:n,operationId:t,error:"terms"===n?"terms":(0,d.sG)(e),durationMs:Math.round(performance.now()-a)}),D(e instanceof Error?e.message:"Payment could not be completed."),M(!1),null==w||w(!1)}}return(0,p.useEffect)(()=>{C.changeAppearance(b("dark"===E))},[C,E]),(0,a.jsx)(c.K,{reportReady:!1,context:r,blockedReason:R?"submitting":I?q?"none":"payment_incomplete":"terms_required",children:(0,a.jsxs)("form",{className:"flex w-full flex-col",onSubmit:G,children:[void 0!==m||void 0!==S?(0,a.jsxs)("header",{className:"order-1 mb-7",children:[void 0!==m?(0,a.jsx)("p",{className:"text-sm text-foreground/55",children:m}):null,void 0!==S?(0,a.jsx)("h2",{className:"mt-1 text-2xl font-semibold tracking-tight",children:S}):null]}):null,A?(0,a.jsxs)("section",{className:"order-2 rounded-xl border border-border/50 p-5","aria-label":"Order summary",children:[(0,a.jsx)("h3",{className:"mb-5 text-lg font-semibold",children:"Order summary"}),(0,a.jsx)("ul",{className:"space-y-3 text-sm",children:C.lineItems.map(e=>{var r,t;return(0,a.jsxs)("li",{className:"flex items-start justify-between gap-4 text-foreground/65",children:[(0,a.jsxs)("span",{children:[null!=(t=null!=(r=null==v?void 0:v[e.id])?r:y)?t:e.name,void 0===g?null:" ".concat(g)," \xd7 ",e.quantity]}),(0,a.jsxs)("span",{className:"tabular-nums",children:[e.total.amount,"/month"]})]},e.id)})}),(0,a.jsxs)("div",{className:"mt-5 flex justify-between border-t border-border/40 pt-5 font-semibold",children:[(0,a.jsx)("span",{children:"Due today"}),(0,a.jsx)("span",{className:"tabular-nums",children:C.total.total.amount})]})]}):null,null!==C.recurring?(0,a.jsxs)("div",{className:"order-2 mt-4 flex gap-3 rounded-xl border border-border/50 p-4 text-sm text-foreground/65",children:[(0,a.jsx)(x.S8s,{"aria-hidden":"true",className:"mt-0.5 size-4 shrink-0"}),(0,a.jsxs)("p",{children:["Your subscription renews monthly at ",C.total.total.amount," until canceled."]})]}):null,(0,a.jsx)("div",{className:(0,l.cn)(A?"order-3":"order-2",A||z?"mt-7":void 0),children:(0,a.jsx)(u.PaymentElement,{onReady:()=>{let e=t();(0,i.wv)(r,"stripe_ready",{operation:"confirm",durationMs:e}),null==n||n(C.id)},onLoadError:()=>{t(),(0,i.wv)(r,"stripe_load_failed",{operation:"confirm",error:"stripe_load"})},options:{layout:"tabs",terms:null===C.recurring?void 0:{card:"never"}}})}),(0,a.jsxs)("label",{className:"order-5 mt-5 flex cursor-pointer items-start gap-3 text-sm leading-6 text-foreground
1/65",children:[(0,a.jsx)("input",{type:"checkbox",className:"mt-1 size-5 shrink-0 cursor-pointer rounded border-border/60 accent-foreground",checked:I,onChange:e=>L(e.target.checked)}),(0,a.jsxs)("span",{children:[z?"You agree that Element Labs will charge your payment method in the amount above now and on a recurring monthly basis until you cancel in accordance with our ":"I agree to the Element Labs ",(0,a.jsx)("a",{className:"underline underline-offset-2 hover:text-foreground",href:"https://lmstudio.ai/hub-terms",rel:"noreferrer",target:"_blank",children:"terms"}),z?". You can cancel at any time in your account settings.":"."]})]}),null!==P?(0,a.jsx)("p",{role:"alert",className:"order-6 mt-4 select-text text-sm text-red-600 dark:text-red-400",children:P}):null,(0,a.jsx)(o.$,{type:"submit",className:"order-7 mt-6 w-full text-base",variant:"inverted",disabled:R||!q,children:R?(0,a.jsx)("span",{className:"loader size-5"}):O}),(0,a.jsxs)("div",{className:"order-8 mt-4 flex items-center justify-center gap-1 text-xs text-foreground/45",children:[(0,a.jsx)("span",{children:"Secure payment processing by"}),(0,a.jsx)(h.rtB,{"aria-label":"Stripe",className:"h-auto w-10 translate-y-px text-[#635bff]"})]})]})})}),v=(0,p.memo)(function(e){let{diagnostics:r,onReady:t,clientSecret:n,eyebrow:s,lineItemLabel:o,lineItemLabels:l,lineItemNoun:d,onConfirmStarted:h,onSubmissionStateChange:x,onSuccess:v,publishableKey:g,showOrderSummary:j,submitLabel:w,title:N}=e,k=(0,p.useRef)({stop:()=>{},startedAt:0}),_=JSON.stringify(r),S=(0,p.useCallback)(()=>(k.current.stop(),Math.round(performance.now()-k.current.startedAt)),[]),[C,E]=(0,p.useState)(null),[R,M]=(0,p.useState)(!1),I=(0,p.useCallback)(async()=>n,[n]),{resolvedTheme:L}=(0,f.D)(),P=(0,p.useMemo)(()=>({fetchClientSecret:I,elementsOptions:{appearance:b("dark"===L),savedPaymentMethod:{enableRedisplay:"auto"}}}),[I,L]);return((0,p.useEffect)(()=>{let e=!1,r=void 0===_?void 0:JSON.parse(_);return(0,i.wv)(r,"stripe_loading",{operation:"confirm"}),k.current={stop:(0,i.rR)(r,"confirm"),startedAt:performance.now()},E(null),M(!1),(0,m.c)(g).then(t=>{if(!e){if(null===t){S(),(0,i.wv)(r,"stripe_load_failed",{operation:"confirm",error:"stripe_load"}),M(!0);return}E(t)}}).catch(()=>{!0!==e&&(S(),(0,i.wv)(r,"stripe_load_failed",{operation:"confirm",error:"stripe_load"}),M(!0))}),()=>{e=!0,S()}},[g,_,S]),R)?(0,a.jsx)("div",{role:"alert",className:"rounded-2xl border border-red-500/30 bg-background-raised p-6 text-sm text-red-600 shadow-md shadow-black/5 dark:text-red-400",children:"Secure checkout could not be loaded. Go back and try again."}):null===C?(0,a.jsx)("div",{className:"flex min-h-80 w-full items-center justify-center","aria-hidden":"true",children:(0,a.jsx)("span",{className:"loader size-6"})}):(0,a.jsx)(c.p,{context:r,onFailure:S,children:(0,a.jsx)(u.CheckoutProvider,{stripe:C,options:P,children:(0,a.jsx)(y,{diagnostics:r,stopReadiness:S,onReady:t,eyebrow:s,lineItemLabel:o,lineItemLabels:l,lineItemNoun:d,onConfirmStarted:h,onSubmissionStateChange:x,onSuccess:v,showOrderSummary:j,submitLabel:w,title:N})})})})}}]);

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.