1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5261],{1356:(e,r,t)=>{t.d(r,{C:()=>s,z:()=>i});var a=t(46374);t(87302);var n=t(73482),o=t(34802);function i(e){let{className:r,...t}=e;return(0,a.jsx)(n.Root,{"data-slot":"radio-group",className:(0,o.cn)("grid w-full gap-3",r),...t})}function s(e){let{className:r,icon:t,...i}=e;return t?(0,a.jsx)(n.Item,{"data-slot":"radio-group-item",className:(0,o.cn)("flex shrink-0 cursor-pointer items-center justify-center rounded-full outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50",r),...i,children:t}):(0,a.jsx)(n.Item,{"data-slot":"radio-group-item",className:(0,o.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-transparent bg-input/90 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),...i,children:(0,a.jsx)(n.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,a.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground dark:size-2.5"})})})}},70263:(e,r,t)=>{t.d(r,{RG:()=>w,bL:()=>_,q7:()=>E});var a=t(87302),n=t(9213),o=t(90761),i=t(61204),s=t(98607),l=t(27435),d=t(61484),u=t(92699),c=t(20277),p=t(98033),f=t(46374),m="rovingFocusGroup.onEntryFocus",b={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[g,x,h]=(0,o.N)(v),[y,w]=(0,s.A)(v,[h]),[j,R]=y(v),k=a.forwardRef((e,r)=>(0,f.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,f.jsx)(I,{...e,ref:r})})}));k.displayName=v;var I=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:t,orientation:o,loop:s=!1,dir:l,currentTabStopId:g,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:y,onEntryFocus:w,preventScrollOnEntryFocus:R=!1,...k}=e,I=a.useRef(null),N=(0,i.s)(r,I),C=(0,p.useDirection)(l),[G,_]=(0,c.i)({prop:g,defaultProp:null!=h?h:null,onChange:y,caller:v}),[E,D]=a.useState(!1),A=(0,u.c)(w),K=x(t),T=a.useRef(!1),[L,S]=a.useState(0);return a.useEffect(()=>{let e=I.current;if(e)return e.addEventListener(m,A),()=>e.removeEventListener(m,A)},[A]),(0,f.jsx)(j,{scope:t,orientation:o,dir:C,loop:s,currentTabStopId:G,onItemFocus:a.useCallback(e=>_(e),[_]),onItemShiftTab:a.useCallback(()=>D(!0),[]),onFocusableItemAdd:a.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>S(e=>e-1),[]),children:(0,f.jsx)(d.sG.div,{tabIndex:E||0===L?-1:0,"data-orientation":o,...k,ref:N,style:{outline:"none",...e.style},onMouseDown:(0,n.mK)(e.onMouseDown,()=>{T.current=!0}),onFocus:(0,n.mK)(e.onFocus,e=>{let r=!T.current;if(e.target===e.currentTarget&&r&&!E){let r=new CustomEvent(m,b);if(e.currentTarget.dispatchEvent(r),!r.defaultPrevented){let e=K().filter(e=>e.focusable);F([e.find(e=>e.active),e.find(e=>e.id===G),...e].filter(Boolean).map(e=>e.ref.current),R)}}T.current=!1}),onBlur:(0,n.mK)(e.onBlur,()=>D(!1))})})}),N="RovingFocusGroupItem",C=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:t,focusable:o=!0,active:i=!1,tabStopId:s,children:u,...c}=e,p=(0,l.B)(),m=s||p,b=R(N,t),v=b.currentTabStopId===m,h=x(t),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:j}=b;return a.useEffect(()=>{if(o)return y(),()=>w()},[o,y,w]),(0,f.jsx)(g.ItemSlot,{scope:t,id:m,focusable:o,active:i,children:(0,f.jsx)(d.sG.span,{tabIndex:v?0:-1,"data-orientation":b.orientation,...c,ref:r,onMouseDown:(0,n.mK)(e.onMouseDown,e=>{o?b.onItemFocus(m):e.preventDefault()}),onFocus:(0,n.mK)(e.onFocus,()=>b.onItemFocus(m)),onKeyDown:(0,n.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;let r=function(e,r,t){var a;let n=(a=e.key,"rtl"!==t?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===r&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===r&&["ArrowUp","ArrowDown"].includes(n)))return G[n]}(e,b.orientation,b.dir);if(void 0!==r){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let t=h().filter(e=>
1e.focusable).map(e=>e.ref.current);if("last"===r)t.reverse();else if("prev"===r||"next"===r){"prev"===r&&t.reverse();let a=t.indexOf(e.currentTarget);t=b.loop?function(e,r){return e.map((t,a)=>e[(r+a)%e.length])}(t,a+1):t.slice(a+1)}setTimeout(()=>F(t))}}),children:"function"==typeof u?u({isCurrentTabStop:v,hasTabStop:null!=j}):u})})});C.displayName=N;var G={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function F(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=document.activeElement;for(let a of e)if(a===t||(a.focus({preventScroll:r}),document.activeElement!==t))return}var _=k,E=C},73482:(e,r,t)=>{t.r(r),t.d(r,{Indicator:()=>M,Item:()=>B,RadioGroup:()=>L,RadioGroupIndicator:()=>M,RadioGroupItem:()=>B,Root:()=>L,createRadioGroupScope:()=>E,unstable_ItemBubbleInput:()=>z,unstable_ItemProvider:()=>P,unstable_ItemTrigger:()=>U,unstable_RadioGroupItemBubbleInput:()=>z,unstable_RadioGroupItemProvider:()=>P,unstable_RadioGroupItemTrigger:()=>U});var a=t(87302),n=t(9213),o=t(61204),i=t(98607),s=t(61484),l=t(70263),d=t(20277),u=t(98033),c=t(82175),p=t(9047),f=t(55130),m=t(46374),b="Radio",[v,g]=(0,i.A)(b),[x,h]=v(b);function y(e){let{__scopeRadio:r,checked:t=!1,children:n,disabled:o,form:i,name:s,onCheck:l,required:d,value:u="on",internal_do_not_use_render:c}=e,[p,f]=a.useState(null),[b,v]=a.useState(null),g=a.useRef(!1),h=!p||!!i||!!p.closest("form"),y={checked:t,disabled:o,required:d,name:s,form:i,value:u,control:p,setControl:f,hasConsumerStoppedPropagationRef:g,isFormControl:h,bubbleInput:b,setBubbleInput:v,onCheck:()=>null==l?void 0:l()};return(0,m.jsx)(x,{scope:r,...y,children:"function"==typeof c?c(y):n})}var w="RadioTrigger",j=a.forwardRef((e,r)=>{let{__scopeRadio:t,onClick:a,...i}=e,{checked:l,disabled:d,value:u,setControl:c,onCheck:p,hasConsumerStoppedPropagationRef:f,isFormControl:b,bubbleInput:v}=h(w,t),g=(0,o.s)(r,c);return(0,m.jsx)(s.sG.button,{type:"button",role:"radio","aria-checked":l,"data-state":C(l),"data-disabled":d?"":void 0,disabled:d,value:u,...i,ref:g,onClick:(0,n.mK)(a,e=>{l||p(),v&&b&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});j.displayName=w,a.forwardRef((e,r)=>{let{__scopeRadio:t,name:a,checked:n,required:o,disabled:i,value:s,onCheck:l,form:d,...u}=e;return(0,m.jsx)(y,{__scopeRadio:t,checked:n,disabled:i,required:o,onCheck:l,name:a,form:d,value:s,internal_do_not_use_render:e=>{let{isFormControl:a}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(j,{...u,ref:r,__scopeRadio:t}),a&&(0,m.jsx)(N,{__scopeRadio:t})]})}})}).displayName=b;var R="RadioIndicator",k=a.forwardRef((e,r)=>{let{__scopeRadio:t,forceMount:a,...n}=e,o=h(R,t);return(0,m.jsx)(f.C,{present:a||o.checked,children:(0,m.jsx)(s.sG.span,{"data-state":C(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:r})})});k.displayName=R;var I="RadioBubbleInput",N=a.forwardRef((e,r)=>{let{__scopeRadio:t,...n}=e,{control:i,checked:l,required:d,disabled:u,name:f,value:b,form:v,bubbleInput:g,setBubbleInput:x,hasConsumerStoppedPropagationRef:y}=h(I,t),w=(0,o.s)(r,x),j=(0,p.Z)(l),R=(0,c.X)(i);a.useEffect(()=>{if(!g)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,r=!y.current;if(j!==l&&e){let t=new Event("click",{bubbles:r});e.call(g,l),g.dispatchEvent(t)}},[g,j,l,y]);let k=a.useRef(l);return(0,m.jsx)(s.sG.input,{type:"radio","aria-hidden":!0,defaultChecked:k.current,required:d,disabled:u,name:f,value:b,form:v,...n,tabIndex:-1,ref:w,style:{...n.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function C(e){return e?"checked":"unchecked"}N.displayName=I;var G=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],F="RadioGroup",[_,E]=(0,i.A)(F,[l.RG,g]),D=(0,l.RG)(),A=g(),[K,T]=_(F),L=a.forwardRef((e,r)=>{let{__scopeRadioGroup:t,name:a,defaultValue:n,value:o,required:i=!1,disabled:c=!1,orientation:p,dir:f,loop:b=!0,onValueChange:v,...g}=e,x=D(t),h=(0,u.useDirection)(f),[y,w]=(0,d.i)({prop:o,defaultProp:null!=n?n:null,onChange:v,caller:F});return(0,m.jsx)(K,{scope:t,name:a,required:i,disabled:c,value:y,onValueChange:w,children:(0,m.jsx)(l.bL,{asChild:!0,...x,orientation:p,dir:h,loop:b,children:(0,m.jsx)(s.sG.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":c?"":void 0,dir:h,...g,ref:r})})})});L.displayName=F;var S="RadioGroupItemTrigger";function P(e){let{__scopeRadioGroup:r,value:t,disabled:a,children:n,internal_do_not_use_render:o}=e,i=T("RadioGroupItemProvider",r),s=A(r),l=i.disabled||a;return(0,m.jsx)(y,{...s,checked:i.value===t,disabled:l,required:i.required,name:i.name,value:t,onCheck:()=>i.onValueChange(t),internal_do_not_use_render:o,children:n})}var U=a.forwardRef((e,r)=>{let{__scopeRadioGroup:t,...i}=e,s=D(t),d=A(t),{checked:u,disabled:c}=h(S,d.__scopeRadio),p=a.useRef(null),f=(0,o.s)(r,p),b=a.useRef(!1);return a.useEffect(()=>{let e=e=>
1{G.includes(e.key)&&(b.current=!0)},r=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",r)}},[]),(0,m.jsx)(l.q7,{asChild:!0,...s,focusable:!c,active:u,children:(0,m.jsx)(j,{...d,...i,ref:f,onKeyDown:(0,n.mK)(i.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:(0,n.mK)(i.onFocus,()=>{if(b.current){var e;null==(e=p.current)||e.click()}})})})});U.displayName=S;var B=a.forwardRef((e,r)=>{let{__scopeRadioGroup:t,value:a,disabled:n,...o}=e;return(0,m.jsx)(P,{__scopeRadioGroup:t,value:a,disabled:n,internal_do_not_use_render:e=>{let{isFormControl:a}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(U,{...o,ref:r,__scopeRadioGroup:t}),a&&(0,m.jsx)(z,{__scopeRadioGroup:t})]})}})});B.displayName="RadioGroupItem";var z=a.forwardRef((e,r)=>{let{__scopeRadioGroup:t,...a}=e,n=A(t);return(0,m.jsx)(N,{...n,...a,ref:r})});z.displayName="RadioGroupItemBubbleInput";var M=a.forwardRef((e,r)=>{let{__scopeRadioGroup:t,...a}=e,n=A(t);return(0,m.jsx)(k,{...n,...a,ref:r})});M.displayName="RadioGroupIndicator"},87642:(e,r,t)=>{t.r(r),t.d(r,{CreditTopUpModal:()=>b});var a=t(46374),n=t(87302),o=t(68483),i=t(50563),s=t(9361),l=t(49130),d=t(25225),u=t(31509),c=t(1356),p=t(12682),f=t(73670),m=t(8563);function b(){var e,r;let{slug:t}=(0,o.useParams)(),{isOpen:b,close:v}=(0,d.o)(),{t:g,locale:x}=(0,m.B)(),[h,y]=(0,n.useState)(s.M7[0].id),{startCheckout:w,isLoading:j}=(0,l.V)(t),{data:R,isLoading:k}=i.i.credits.getBalance.useQuery({slug:t},{enabled:b}),I=null!=(e=(0,s.Mf)(h))?e:s.M7[0];return(0,a.jsx)(f.s,{isOpen:b,onOpenChange:e=>{e||v()},modalClassName:"sm:max-w-md",mobileDrawerClassName:"pb-2",headerTitle:g.billing.topUp.title,headerDescription:g.billing.topUp.description,children:(0,a.jsxs)("div",{className:"space-y-5 px-4 pb-4 sm:p-0",children:[(0,a.jsx)("div",{className:"bg-muted/50 flex items-center justify-between rounded-lg border px-3 py-2.5",children:(0,a.jsxs)("span",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[(0,a.jsx)(p.F.zap,{className:"size-4 text-amber-500"}),k?(0,a.jsx)(p.F.loader,{className:"size-4 animate-spin"}):g.billing.topUp.currentBalance(null!=(r=null==R?void 0:R.balance)?r:0)]})}),(0,a.jsxs)("fieldset",{className:"space-y-2.5",children:[(0,a.jsx)("legend",{className:"mb-2 text-sm font-medium",children:g.billing.topUp.selectPack}),(0,a.jsx)(c.z,{value:h,onValueChange:e=>y(e),children:s.M7.map(e=>{let r="credit-pack-".concat(e.id),t=new Intl.NumberFormat(x,{style:"currency",currency:e.currency,maximumFractionDigits:0}).format(e.priceCents/100);return(0,a.jsxs)("label",{htmlFor:r,className:"hover:bg-muted/40 has-data-checked:border-primary/50 has-data-checked:bg-muted/50 flex cursor-pointer items-center gap-3 rounded-lg border p-3 transition-colors",children:[(0,a.jsx)(c.C,{id:r,value:e.id}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 text-sm font-medium tabular-nums",children:[e.credits.toLocaleString(x)," ",g.common.credits.toLowerCase()]}),(0,a.jsx)("span",{className:"text-sm font-semibold tabular-nums",children:t})]},e.id)})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(u.$,{type:"button",className:"w-full",disabled:j,onClick:()=>void w(I.id),children:[j?(0,a.jsx)(p.F.loader,{className:"animate-spin"}):(0,a.jsx)(p.F.creditCard,{}),j?g.billing.topUp.processing:g.billing.topUp.checkout]}),(0,a.jsx)("p",{className:"text-muted-foreground text-center text-xs",children:g.billing.topUp.carryoverNote})]})]})})}}}]);
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.