PageSourceSearch

https://icover.pipixel.ai/_next/static/chunks/4bd6db24750adcc2.js

js pipixel.ai collected 2026-10-05 15:13:57 UTC 47,714 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62326,e=>{"use strict";var t=e.i(67209),r=e.i(45575),s=e.i(9165);function a(){let e,a,i=(0,t.c)(6),l=(0,r.useTranslations)("Common"),n=(0,r.useTranslations)("Auth"),o=(0,r.useTranslations)("Studio");i[0]!==n||i[1]!==l||i[2]!==o?(e=(e,t)=>{if(e instanceof s.ApiError){if(e.message&&"An error occurred"!==e.message)return e.message;if(["network","server","timeout","unknown","unauthorized"].includes(e.code))return l(`error.${e.code}`)}if(t){let[e,...r]=t.split("."),s=r.join(".");return"Auth"===e?n(s):"Studio"===e?o(s):"Common"===e?l(s):n(t)}return l("error.unknown")},i[0]=n,i[1]=l,i[2]=o,i[3]=e):e=i[3];let c=e;return i[4]!==c?(a={getErrorMessage:c},i[4]=c,i[5]=a):a=i[5],a}e.s(["useApiError",()=>a])},4745,(e,t,r)=>{"use strict";function s({widthInt:e,heightInt:t,blurWidth:r,blurHeight:s,blurDataURL:a,objectFit:i}){let l=r?40*r:e,n=s?40*s:t,o=l&&n?`viewBox='0 0 ${l} ${n}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${o}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${o?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},58684,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},3637,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(87741);let s=e.r(48917),a=e.r(4745),i=e.r(58684),l=["-moz-initial","fill","none","scale-down",void 0];function n(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:m,quality:p,width:h,height:f,fill:x=!1,style:g,overrideSrc:b,onLoad:y,onLoadingComplete:v,placeholder:j="empty",blurDataURL:w,fetchPriority:S,decoding:k="async",layout:N,objectFit:_,objectPosition:P,lazyBoundary:C,lazyRoot:z,...M},E){var O;let $,L,R,{imgConf:A,showAltText:D,blurComplete:T,defaultLoader:I}=E,F=A||i.imageConfigDefault;if("allSizes"in F)$=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);$={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===I)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=M.loader||I;delete M.loader,delete M.srcSet;let H="__next_img_default"in q;if(H){if("custom"===$.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,
2configurable:!0})}else{let e=q;q=t=>{let{config:r,...s}=t;return e(s)}}if(N){"fill"===N&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[N];e&&(g={...g,...e});let r={responsive:"100vw",fill:"100vw"}[N];r&&!t&&(t=r)}let B="",U=o(h),V=o(f);if((O=e)&&"object"==typeof O&&(n(O)||void 0!==O.src)){let t=n(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(L=t.blurWidth,R=t.blurHeight,w=w||t.blurDataURL,B=t.src,!x)if(U||V){if(U&&!V){let e=U/t.width;V=Math.round(t.height*e)}else if(!U&&V){let e=V/t.height;U=Math.round(t.width*e)}}else U=t.width,V=t.height}let X=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,X=!1),$.unoptimized&&(r=!0),H&&!$.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let W=o(p),G=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:_,objectPosition:P}:{},D?{}:{color:"transparent"},g),J=T||"empty"===j?null:"blur"===j?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:U,heightInt:V,blurWidth:L,blurHeight:R,blurDataURL:w||"",objectFit:G.objectFit})}")`:`url("${j}")`,Z=l.includes(G.objectFit)?"fill"===G.objectFit?"100% 100%":"cover":G.objectFit,K=J?{backgroundSize:Z,backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},Q=function({config:e,src:t,unoptimized:r,width:a,quality:i,sizes:l,loader:n}){if(r){let e=(0,s.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},r,s){if(s){let r=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=r.exec(s);)a.push(parseInt(e[2]));if(a.length){let r=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,l),d=o.length-1;return{sizes:l||"w"!==c?l:"100vw",srcSet:o.map((r,s)=>`${n({config:e,src:t,quality:i,width:r})} ${"w"===c?r:s+1}${c}`).join(", "),src:n({config:e,src:t,quality:i,width:o[d]})}}({config:$,src:e,unoptimized:r,width:U,quality:W,sizes:t,loader:q}),Y=X?"lazy":u;return{props:{...M,loading:Y,fetchPriority:S,width:U,height:V,decoding:k,className:m,style:{...G,...K},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:r,preload:d||c,placeholder:j,fill:x}}}},23866,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let s=e.r(89591),a="undefined"==typeof window,i=a?()=>{}:s.useLayoutEffect,l=a?()=>{}:s.useEffect;function n(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),n()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},73842,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return f},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(44066),n=e.r(11798),o=l._(e.r(89591)),c=i._(e.r(23866)),d=e.r(21597);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>
2"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(87741);let p=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,s,a;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?i=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!l)&&s.has(t)?i=!1:(s.add(t),a[r]=s)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let f=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,n.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},90248,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let s=e.r(81258)._(e.r(89591)),a=e.r(58684),i=s.default.createContext(a.imageConfigDefault)},53104,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return s}});let s=e.r(81258)._(e.r(89591)).default.createContext(null)},5590,(e,t,r)=>{"use strict";function s(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return s}})},7481,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let s=e.r(5590),a=e.r(48917);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,s.findClosestQuality)(i,e),n=(0,a.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${l}${t.startsWith("/")&&n?`&dpl=${n}`:""}`}i.__next_img_default=!0;let l=i},52861,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(81258),a=e.r(44066),i=e.r(11798),l=a._(e.r(89591)),n=s._(e.r(12056)),o=s._(e.r(73842)),c=e.r(3637),d=e.r(58684),u=e.r(90248);e.r(87741);let m=e.r(53104),p=s._(e.r(7481)),h=e.r(3787),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function x(e,t,r,s,a,i,l){let n=e?.src;e&&e["data-loaded-src"]!==n&&(e["data-loaded-src"]=n,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function g(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)(({src:e,srcSet:t,sizes:r,height:s,width:a,decoding:n,className:o,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:p,fill:f,onLoadRef:b,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:j,sizesInput:w,onLoad:S,onError:k,...N},_)=>{let P=(0,l.useCallback)(e=>{e&&(k&&(e.src=e.src),e.complete&&x(e,u,b,y,v,p,w))},[e,u,b,y,v,k,p,w]),C=(0,h.useMergedRef)(_,P);return(0,i.jsx)("img",{...N,...g(d),loading:m,width:a,height:s,decoding:n,"data-nimg":f?"fill":"1",className:o,style:c,sizes:r,srcSet:t,src:e,ref:C,onLoad:e=>{x(e.currentTarget,u,b,y,v,p,w)},onError:e=>{j(!0),"empty"!==u&&v(!0),k&&k(e)}})});function y({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&n.default.preload?(n.default.preload(t.src,r),null):(0,i.jsx)(o.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(m.RouterContext),s=(0,l.useContext)(u.ImageConfigContext),a=(0,l.useMemo)(()=>{let e=f||s||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>
3e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"undefined"==typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:n,onLoadingComplete:o}=e,h=(0,l.useRef)(n);(0,l.useEffect)(()=>{h.current=n},[n]);let x=(0,l.useRef)(o);(0,l.useEffect)(()=>{x.current=o},[o]);let[g,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),{props:S,meta:k}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:a,blurComplete:g,showAltText:j});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...S,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:h,onLoadingCompleteRef:x,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),k.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:S}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18844,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return d},getImageProps:function(){return c}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(3637),n=e.r(52861),o=i._(e.r(7481));function c(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=n.Image},46461,(e,t,r)=>{t.exports=e.r(18844)},98081,e=>{"use strict";let t=(0,e.i(98631).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],98081)},72200,e=>{"use strict";let t=(0,e.i(98631).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],72200)},44705,e=>{"use strict";var t=e.i(8186),r=e.i(89591),s=e.i(5301),a=r["use".trim()],i=e.i(36627),l=e.i(80379),n=e.i(48702),o=e.i(11798),c=e.i(83061);let{Link:d,redirect:u,usePathname:m,useRouter:p,getPathname:h}=function(e){let{Link:d,config:u,getPathname:m,...p}=function(e,s){var c,d,u;let m={...c=s||{},localePrefix:"object"==typeof(u=c.localePrefix)?u:{mode:u||"always"},localeCookie:!!((d=c.localeCookie)??1)&&{name:"NEXT_LOCALE",sameSite:"lax",..."object"==typeof d&&d},localeDetection:c.localeDetection??!0,alternateLinks:c.alternateLinks??!0},p=m.pathnames,h=(0,r.forwardRef)(function({href:t,locale:r,...s},n){let c,d;"object"==typeof t?(c=t.pathname,d=t.params):c=t;let u=(0,i.isLocalizableHref)(t),h=e(),x=(0,i.isPromise)(h)?a(h):h,g=u?f({locale:r||x,href:null==p?c:{pathname:c,params:d},forcePrefix:null!=r||void 0}):c;return(0,o.jsx)(l.default,{ref:n,href:"object"==typeof t?{...t,pathname:g}:g,locale:r,localeCookie:m.localeCookie,...s})});function f(e){let t,{forcePrefix:r,href:s,locale:a}=e;return null==p?"object"==typeof s?(t=s.pathname,s.query&&(t+=(0,n.serializeSearchParams)(s.query))):t=s:t=(0,n.compileLocalizedPathname)({locale:a,...(0,n.normalizeNameOrNameWithParams)(s),pathnames:m.pathnames}),(0,n.applyPathnamePrefix)(t,a,m,r)}function x(e){return function(t,...r){return e(f(t),...r)}}return{config:m,Link:h,redirect:x(t.redirect),permanentRedirect:x(t.permanentRedirect),getPathname:f}}(s.useLocale,e);return{...p,Link:d,usePathname:function(){let e,a,l=(e=(0,t.usePathname)(),a=(0,s.useLocale)(),(0,r.useMemo)(()=>{if(!e)return e;let t=e,r=(0,i.getLocalePrefix)(a,u.localePrefix);if((0,i.hasPathnamePrefixed)(r,e))t=(0,i.unprefixPathname)(e,r);else if("never"!==u.localePrefix.mode&&u.localePrefix.prefixes){let r=(0,i.getLocaleAsPrefix)(a);(0,i.hasPathnamePrefixed)(r,e)&&(t=(0,i.unprefixPathname)(e,r))}return t},[u.localePrefix,a,e])),o=(0,s.useLocale)();return(0,r.useMemo)(()=>l&&u.pathnames?(0,n.getRoute)(o,l,u.pathnames):l,[o,l])},useRouter:function(){let e=(0,t.useRouter)(),a=(0,s.useLocale)(),i=(0,t.usePathname)();return(0,r.useMemo)(()=>{function t(e){return function(t,r){let{locale:s,...l}=r||{},n=[m({href:t,locale:s||a,forcePrefix:null!=s||void 0})];Object.keys(l).length>0&&n.push(l),(0,c.default)(u.localeCookie,i,a,s),e(...n)}}return{...e,push:t(e.push),replace:t(e.replace),prefetch:t(e.prefetch)}},[a,i,e])},getPathname:m}}({locales:["en","zh"],defaultLocale:"en",localePrefix:"always"});e.s(["Link",0,d,"usePathname",0,m,"useRouter",0,p],44705)},31196,e=>{"use strict";let t=(0,e.i(98631).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",()=>t],31196)},95953,15682,e=>{"use strict";var t=e.i(98631);let r=(0,t.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);e.s(["Edit",()=>r],95953);let s=(0,t.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>s],15682)},3812,7723,e=>{"use strict";var t=e.i(98631);let r=(0,t.default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);e.s(["MessageCircle",()=>r],3812);let s=(0,t.default)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["HelpCircle",()=>s],7723)},74515,e=>{"use strict";let t=(0,e.i(98631).default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);e.s(["BookOpen",()=>t],74515)},31747,e=>{"use strict";let t=(0,e.i(98631).default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Link",()=>t],31747)},16024,e=>{"use strict";let t=(0,e.i(98631).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],16024)},53154,e=>{"use strict";let t=(0,e.i(98631).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],53154)},17687,e=>{"use strict";let t=(0,e.i(98631).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",()=>t],17687)},33746,e=>{"use strict";let t=(0,e.i(98631).default)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",()=>t],33746)}
3,93964,e=>{"use strict";let t=(0,e.i(98631).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],93964)},10307,e=>{"use strict";let t=(0,e.i(98631).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],10307)},3898,36623,e=>{"use strict";var t=e.i(98631);let r=(0,t.default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>r],3898);let s=(0,t.default)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);e.s(["Box",()=>s],36623)},22230,e=>{"use strict";let t=(0,e.i(98631).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],22230)},83690,97197,44199,e=>{"use strict";var t=e.i(98631);let r=(0,t.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>r],83690);let s=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>s],97197);let a=(0,t.default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit3",()=>a],44199)},67938,e=>{"use strict";let t=(0,e.i(98631).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",()=>t],67938)},82508,71628,e=>{"use strict";var t=e.i(11798),r=e.i(89591),s=e.i(45575),a=e.i(5301),i=e.i(54267),l=e.i(23007),n=e.i(28781),o=e.i(5300);let c=(0,e.i(98631).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>c],71628);var d=e.i(53154),u=e.i(58697),m=e.i(9186),p=e.i(9165),h=e.i(35226),f=e.i(31016),x=e.i(14202),g=e.i(54747);let b=({onClose:e,showTitle:a=!0})=>{let i=(0,s.useTranslations)(),[l,n]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),[m,b]=(0,r.useState)(!1),[y,v]=(0,r.useState)(!1),[j,w]=(0,r.useState)([]);r.default.useEffect(()=>{(async()=>{try{let e=[...await p.api.getPublicCreditPacks()].sort((e,t)=>e.credit_amount-t.credit_amount),t=[i("Studio.credits.packs.light"),i("Studio.credits.packs.value"),i("Studio.credits.packs.pro"),i("Studio.credits.packs.enterprise")];w(e.map((e,r)=>({id:e.id,amount:e.credit_amount,price:Number(e.current_price),description:t[r]||i("Studio.credits.packs.value"),popular:1===r})))}catch(e){g.toast.error(e?.message||"Failed to load credit packs")}})()},[i]);let S=async e=>{n(e),u(!0);try{let t=j[e];if(!t?.id)throw Error("Credit pack is unavailable");let r=await p.api.createPaypalCreditPackOrder(t.id),s=r?.paypal_order?.links||[],a=s.find(e=>e?.rel==="approve")?.href;if(!a)throw Error("PayPal approval link is missing");window.location.href=a}catch(e){g.toast.error(e?.message||"Failed to start PayPal credit purchase"),u(!1),n(null)}},k=()=>{v(!0)};return m?(0,t.jsxs)(x.motion.div,{initial:{opacity:0,scale:.8}
3,animate:{opacity:1,scale:1},className:"text-center py-16 relative z-10",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-green-100 mb-6",children:(0,t.jsx)(f.CheckCircle,{size:40,className:"text-green-500"})}),(0,t.jsx)("h2",{className:"text-2xl font-black text-slate-900 mb-4",children:i("Studio.credits.purchaseSuccess.title")}),(0,t.jsx)("p",{className:"text-lg text-slate-600 mb-8",children:i("Studio.credits.purchaseSuccess.message",{amount:null!==l?j[l].amount:0})}),(0,t.jsx)("p",{className:"text-sm text-slate-400",children:i("Studio.credits.purchaseSuccess.autoClose")})]}):(0,t.jsx)("div",{className:"max-w-6xl mx-auto relative z-10",children:y?(0,t.jsx)("div",{className:"relative z-10",children:(0,t.jsx)(()=>{let[e,s]=(0,r.useState)(100),[a,l]=(0,r.useState)("100"),[n,o]=(0,r.useState)(!1),c=r.default.useRef(null),u=.05*e,m=(e-100)/19900*100,p=e=>{if(!c.current)return 100;let t=c.current.getBoundingClientRect();return Math.max(100,Math.min(2e4,Math.round(Math.max(0,Math.min(100,(e-t.left)/t.width*100))/100*19900)+100))};return r.default.useEffect(()=>{let e=e=>{if(n){let t=p(e.clientX);s(t),l(t.toString())}},t=()=>{o(!1)},r=e=>{if(n){let t=p(e.touches[0].clientX);s(t),l(t.toString())}},a=()=>{o(!1)};return n&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),document.addEventListener("touchmove",r),document.addEventListener("touchend",a)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",a)}},[n]),(0,t.jsxs)("div",{className:"max-w-2xl mx-auto relative z-10",children:[(0,t.jsxs)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),v(!1)},className:"mb-6 flex items-center gap-2 text-slate-500 hover:text-slate-700 transition-colors cursor-pointer",children:[(0,t.jsx)(d.ArrowLeft,{size:20}),i("Studio.credits.custom.backToPacks")]}),(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h2",{className:"text-2xl font-black text-slate-900 mb-2",children:i("Studio.credits.custom.title")}),(0,t.jsx)("p",{className:"text-slate-500",children:i("Studio.credits.custom.subtitle")})]}),(0,t.jsxs)("div",{className:"bg-white rounded-2xl p-6 border border-slate-100 mb-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-slate-600",children:[100,i("Studio.credits.custom.minCredits")]}),(0,t.jsxs)("span",{className:"text-sm font-medium text-slate-600",children:[2e4.toLocaleString(),i("Studio.credits.custom.maxCredits")]})]}),(0,t.jsxs)("div",{ref:c,className:"relative h-2 bg-slate-100 rounded-full cursor-pointer",onClick:e=>{let t=p(e.clientX);s(t),l(t.toString())},onMouseDown:e=>{e.preventDefault(),o(!0);let t=p(e.clientX);s(t),l(t.toString())},onTouchStart:e=>{o(!0);let t=p(e.touches[0].clientX);s(t),l(t.toString())},children:[(0,t.jsx)("div",{className:"h-full bg-gradient-to-r from-yellow-400 to-yellow-600 rounded-full transition-all duration-75 pointer-events-none",style:{width:`${m}%`}}),(0,t.jsx)(x.motion.div,{className:`absolute top-1/2 -translate-y-1/2 w-6 h-6 bg-white rounded-full shadow-md border border-slate-200 flex items-center justify-center pointer-events-none ${n?"scale-110 shadow-lg":""}`,style:{left:`calc(${m}% - 12px)`},animate:{scale:n?1.1:1},transition:{duration:.1},children:(0,t.jsx)("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"})})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-center",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:"number",min:100,max:2e4,step:1,value:a,onChange:e=>{l(e.target.value)},onBlur:()=>{let e=parseInt(a)||100;s(e=Math.max(100,Math.min(2e4,e))),l(e.toString())},className:"w-40 px-4 py-3 rounded-xl border border-slate-200 focus:border-yellow-400 focus:ring-2 focus:ring-yellow-200 transition-all text-lg font-bold text-center",placeholder:i("Studio.credits.custom.inputPlaceholder")}),(0,t.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-400 text-sm",children:i("Studio.credits.credits")})]})}),(0,t.jsx)("p",{className:"text-center text-xs text-slate-400 mt-2",children:i("Studio.credits.custom.minHint")})]}),(0,t.jsxs)("div",{className:"bg-gradient-to-br from-yellow-50 to-amber-50 rounded-2xl p-6 border border-yellow-100 mb-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-slate-600 mb-1",children:i("Studio.credits.custom.getCredits")}),(0,t.jsx)("p",{className:"text-3xl font-black text-yellow-600",children:e.toLocaleStr
3ing()})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("p",{className:"text-sm text-slate-600 mb-1",children:i("Studio.credits.custom.amount")}),(0,t.jsxs)("p",{className:"text-3xl font-black text-slate-900",children:["$",u.toFixed(2)]})]})]}),(0,t.jsx)("p",{className:"text-xs text-slate-500 mt-4",children:i("Studio.credits.custom.rate")})]}),(0,t.jsx)(x.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},className:"w-full py-4 rounded-xl bg-yellow-400 text-yellow-900 font-bold hover:bg-yellow-500 transition-all shadow-md",children:i("Studio.credits.custom.confirm",{amount:u.toFixed(2)})})]})},{})}):(0,t.jsxs)("div",{className:"relative z-10",children:[a&&(0,t.jsxs)("div",{className:"text-center mb-12",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-yellow-100 text-yellow-800 text-sm font-bold mb-4",children:[(0,t.jsx)(o.Zap,{size:16}),i("Studio.credits.badge")]}),(0,t.jsx)("h2",{className:"text-3xl font-black text-slate-900 mb-4",children:i("Studio.credits.purchaseTitle")}),(0,t.jsxs)("p",{className:"text-slate-500 max-w-2xl mx-auto",children:[i("Studio.credits.purchaseSubtitle"),(0,t.jsx)("button",{onClick:k,className:"text-blue-500 hover:text-blue-600 font-bold underline mx-1",children:i("Studio.credits.customRecharge")})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:j.map((e,r)=>(0,t.jsxs)(x.motion.div,{whileHover:{y:-4},className:`relative bg-white rounded-2xl p-6 border transition-all duration-300 ${e.popular?"border-yellow-400 shadow-lg":"border-slate-100 hover:border-slate-200 shadow-sm"}`,children:[e.popular&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-yellow-400 text-yellow-900 px-4 py-1 rounded-full text-xs font-black whitespace-nowrap",children:i("Studio.credits.popular")}),(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsx)("div",{className:"text-4xl font-black text-slate-900 mb-2",children:e.amount.toLocaleString()}),(0,t.jsx)("div",{className:"text-sm text-slate-400 font-medium",children:i("Studio.credits.creditsLabel")})]}),(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsxs)("div",{className:"text-2xl font-bold text-slate-900",children:["$",e.price.toFixed(2)]}),(0,t.jsxs)("div",{className:"text-xs text-slate-400 mt-1",children:["$",(e.price/e.amount).toFixed(3),"/",i("Studio.credits.perCredit")]})]}),(0,t.jsx)("p",{className:"text-xs text-slate-500 text-center mb-6",children:e.description}),(0,t.jsx)(x.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>S(r),disabled:c&&l===r,className:`w-full py-3 rounded-xl font-bold transition-all ${e.popular?"bg-yellow-400 text-yellow-900 hover:bg-yellow-500":"bg-slate-900 text-white hover:bg-slate-800"} ${c&&l===r?"opacity-70 cursor-not-allowed":""}`,children:c&&l===r?(0,t.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,t.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i("Studio.credits.processing")]}):i("Studio.credits.buyNow")})]},r))}),(0,t.jsx)("div",{className:"mt-12 text-center",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-4 p-6 bg-gradient-to-r from-slate-50 to-slate-100 rounded-2xl",children:[(0,t.jsxs)("div",{className:"text-left",children:[(0,t.jsx)("h3",{className:"font-bold text-slate-900 mb-1",children:i("Studio.credits.custom.needMore")}),(0,t.jsx)("p",{className:"text-sm text-slate-500",children:i("Studio.credits.custom.supportRange")})]}),(0,t.jsxs)(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:k,className:"flex items-center gap-2 px-6 py-3 bg-white rounded-xl font-bold text-slate-900 shadow-sm hover:shadow-md transition-all border border-slate-200",children:[(0,t.jsx)(h.CreditCard,{size:18}),i("Studio.credits.customRecharge")]})]})}),(0,t.jsxs)("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-6 text-center",children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-3",children:(0,t.jsx)(o.Zap,{size:20,className:"text-blue-600"})}),(0,t.jsx)("h4",{className:"font-bold text-slate-900 mb-2",children:i("Studio.credits.features.instant.title")}),(0,t.jsx)("p",{className:"text-sm text-slate-500",children:i("Studio.credits.features.instant.desc")})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-3",children:(0,t.jsx)(f.CheckCircle,{size:20,className:"text-green-600"})}),(0,t.jsx)("h4",{className:"font-bold text-slate-900 mb-2",children:i("Studio.credits.features.permanent.title")}),(0,t.jsx)("p",{className:"text-sm text-slate-500",children:i("Studio.credits.features.permanent.desc")})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mx-auto mb-3",children:(0,t.jsx)(h.CreditCard,{size:20,className:"text-purple-600"})}),(0,t.jsx)("h4",{className:"font-bold text-slate-900 mb-2",children:i("Studio.credits.features.secure.title")}),(0,t.jsx)("p",{className:"text-sm text-slate-500",children:i("Studio.credits.features.secure.desc")})]})]})]})})};e.s(["default",0,({user:e,isModal:h=!1,onClose:f})=>{let x=(0,s.useTranslations)(),y=(0,a.useLocale)(),{plans:v,features:j,loading:w}=(0,u.usePricingData)(),[S,k]=(0,r.useState)(v),[N,_]=(0,r.useState)(j),[P,C]=(0,r.useState)(w),{tier:z,isSubscribed:M}=(0,m.useSubscriptionFeatures)(),[E,O]=(0,r.useState)([]),[$,L]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null);(0,r.useEffect)(()=>{(async()=>{try{let e=await p.api.getUserSubscriptions();O(e)}catch(e){}})()},[]),(0,r.useEffect)(()=>{(async()=>{let e=new URLSearchParams(window.location.search),t=e.get("paypal_flow"),r=e.get("token"),s=e.get("
3credit_pack_id");if("credit"===t&&r&&s)try{await p.api.capturePaypalCreditPackOrder(r,s),g.toast.success("Credit pack purchased successfully")}catch(e){g.toast.error(e?.message||"Credit purchase capture failed")}finally{e.delete("paypal_flow"),e.delete("token"),e.delete("PayerID"),e.delete("credit_pack_id");let t=e.toString(),r=`${window.location.pathname}${t?`?${t}`:""}`;window.history.replaceState({},"",r)}})()},[]),(0,r.useEffect)(()=>{k(v),_(j),C(w)},[v,j,w]),(0,r.useEffect)(()=>{if(!h||!f)return;let e=e=>{"Escape"===e.key&&f()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[h,f]);let[D,T]=(0,r.useState)("yearly"),[I,F]=(0,r.useState)("USD"),q=r.default.useMemo(()=>{let e=S.filter(e=>e.period===D&&e.currency===I);return[{id:"basic",name:"Basic",price:e.find(e=>"basic"===e.tier)?.current_price?.toString()||"6.9",originalPrice:e.find(e=>"basic"===e.tier)?.original_price?.toString()||"6.9",pricingPlanId:e.find(e=>"basic"===e.tier)?.id||"",currency:I,period:D,description:x("Studio.subscription.modal.basicDesc"),features:N.filter(e=>e.applicable_tiers.includes("basic")&&e.is_active).sort((e,t)=>e.display_order-t.display_order).map(e=>{let t=e.name,r=e.description;try{"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof r&&(r=JSON.parse(r))}catch(e){}let s="object"==typeof t?t[y]||t.zh||"":String(t||""),a=e.monthly_credits&&e.monthly_credits>0?e.monthly_credits:void 0;return{name:s,description:"object"==typeof r?r[y]||r.zh||"":String(r||""),monthlyCredits:a}}),cta:"选择 Basic",highlight:!1,isPopular:!1,isBestValue:e.find(e=>"basic"===e.tier)?.is_best_value||!1},{id:"pro",name:"Pro",price:e.find(e=>"pro"===e.tier)?.current_price?.toString()||"29.9",originalPrice:e.find(e=>"pro"===e.tier)?.original_price?.toString()||"29.9",pricingPlanId:e.find(e=>"pro"===e.tier)?.id||"",currency:I,period:D,description:x("Studio.subscription.modal.proDesc"),features:N.filter(e=>e.applicable_tiers.includes("pro")&&e.is_active).sort((e,t)=>e.display_order-t.display_order).map(e=>{let t=e.name,r=e.description;try{"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof r&&(r=JSON.parse(r))}catch(e){}let s="object"==typeof t?t[y]||t.zh||"":String(t||""),a=e.monthly_credits&&e.monthly_credits>0?e.monthly_credits:void 0;return{name:s,description:"object"==typeof r?r[y]||r.zh||"":String(r||""),monthlyCredits:a}}),cta:"选择 Pro",highlight:!0,isPopular:e.find(e=>"pro"===e.tier)?.is_popular||!1,isBestValue:e.find(e=>"pro"===e.tier)?.is_best_value||!1}]},[S,N,D,I,x,y]),H=()=>{L(!1)},B=async(e,t)=>{if(!t)return void g.toast.error("Pricing plan is not available yet. Please refresh and try again.");try{A(e);let r=await p.api.createPaypalSubscription(t),s=r?.paypal_subscription?.links||[],a=s.find(e=>e?.rel==="approve")?.href;if(!a)return void g.toast.error("PayPal approval link is missing.");window.location.href=a}catch(e){g.toast.error(e?.message||"Failed to create PayPal subscription")}finally{A(null)}},U=(0,t.jsxs)("div",{className:`mx-auto ${h?"max-w-6xl space-y-8":"max-w-6xl space-y-16"}`,children:[(0,t.jsxs)("header",{className:"flex items-center justify-center gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5 rounded-full bg-slate-900 text-white text-xs font-bold uppercase tracking-[0.2em]",children:[(0,t.jsx)(l.Crown,{size:14,className:"text-yellow-400"})," ",x("Studio.subscription.modal.badge")]}),(0,t.jsx)("h1",{className:"text-3xl font-black tracking-tight text-slate-900",children:x("Studio.subscription.modal.title")})]}),(0,t.jsxs)("div",{className:"flex flex-row items-center justify-center gap-4 sm:gap-6 relative",children:[(0,t.jsxs)("div",{className:"inline-flex p-1.5 bg-white rounded-xl shadow-sm border border-slate-100",children:[(0,t.jsx)("button",{className:`px-6 py-2.5 rounded-lg text-sm font-bold transition-all ${"monthly"===D?"bg-slate-900 text-white":"text-slate-600 hover:bg-slate-50"}`,onClick:()=>T("monthly"),children:x("Studio.subscription.modal.monthly")}),(0,t.jsx)("button",{className:`px-6 py-2.5 rounded-lg text-sm font-bold transition-all ${"yearly"===D?"bg-slate-900 text-white":"text-slate-600 hover:bg-slate-50"}`,onClick:()=>T("yearly"),children:x("Studio.subscription.modal.yearly")})]}),(0,t.jsxs)("button",{onClick:()=>{L(!0)},className:"flex items-center gap-2 px-5 py-2.5 bg-yellow-400 text-yellow-900 rounded-xl font-bold hover:bg-yellow-500 transition-all whitespace-nowrap text-sm absolute right-0",children:[(0,t.jsx)(o.Zap,{size:18}),x("Studio.subscription.modal.buyCredits")]})]}),P?(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsx)("div",{className:"w-10 h-10 border-4 border-slate-200 border-t-slate-900 rounded-full animate-spin"})}):(0,t.jsx)("div",{className:`grid grid-cols-2 gap-${h?"6":"3"} max-w-${h?"3xl":"lg"} mx-auto`,children:q.map(e=>{var r;let s,a=(r=e.id,e.period,0===(s=E.filter(e=>(e.plan_id||"").toLowerCase().includes(r.toLowerCase())&&("active"===e.status||"trialing"===e.status))).length?null:s.map(e=>({expiryDate:new Date(e.current_period_end).toLocaleDateString("zh-CN"),planName:e.plan_name||e.plan_id}))),l=a&&a.length>0;return(0,t.jsxs)("div",{className:`relative bg-white rounded-2xl p-${h?"6":"3"} border transition-all duration-500 flex flex-col ${l?"border-green-500 shadow-lg ring-2 ring-green-100":e.highlight?"border-slate-900 shadow-lg":"border-slate-100 hover:border-slate-200 shadow-sm"}`,children:[e.isPopular&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-slate-900 text-white px-4 py-1 rounded-full text-xs font-black uppercase tracking-wider shadow-md",children:x("Studio.subscription.modal.mostPopular")}),!e.isPopular&&e.isBestValue&&(0,t.jsx)("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-gradient-to-r from-amber-400 to-yellow-500 text-white px-4 py-1 rounded-full text-xs font-black uppercase tracking-wider shadow-md",children:x("Studio.subscription.modal.bestValue")}),(0,t.jsxs)("div",{className:"mb-4 text-center",children:[(0,t.jsx)("h3",{className:`${h?"text-xl":"text-sm"} font-black text-slate-900`,children:e.name}),(0,t.jsx)("p",{className:`${h?"text-sm":"text-[10px]"} text-slate-400`,children:e.description})]}),(0,t.jsxs)("div",{className:"mb-4 text-center",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-center gap-1",children:[(0,t.jsxs)("span",{className:`${h?"text-4xl":"text-2xl"} font-black text-slate-900`,children:["$","yearly"===e.period?(parseFloat(e.price)/12).toFixed(2):e.price]}),(0,t.jsxs)("span",{className:`${h?"text-sm":"text-[10px]"} text-slate-400`,children:["/",x("Studio.subscription.modal.perMonth")]})]}),"yearly"===e.period&&(0,t.jsx)("div",{className:"mt-1",children:(0,t.jsx)("span",{className:`${h?"text-xs":"text-[10px]"} text-slate-400`,children:x("Landing.pricing.yearlyTotal",{amount:`$${parseFloat(e.price).toFixed(2)}`})})}),parseFloat(e.originalPrice)>parseFloat(e.price)&&"yearly"!==e.period&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-2",children:[(0,t.jsxs)("span",{className:`${h?"text-sm":"text-[10px]"} text-slate-400 line-through`,children:["$",e.originalPrice]}),(0,t.jsxs)("span",{className:`${h?"text-sm":"text-[10px]"} font-bold text-green-600`,children:[Math.round((1-parseFloat(e.price)/parseFloat(e.originalPrice))*100),"%OFF"]})]}),l&&(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-center gap-2",children:[(0,t.jsx)("span",{className:`${h?"text-xs":"text-[10px]"} font-bold text-green-600 bg-green-50 px-2 py-0.5 rounded-full`,children:x("Studio.subscription.modal.purchased")}),(0,t.jsx)("div",{className:`${h?"text-xs":"text-[10px]"} text-slate-400 flex items-center gap-0.5`,children:a.map((e,r)=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c,{size:10}),x("Studio.subscription.modal.expires"),": ",e.expiryDate]},r))})]})]}),(0,t.jsx)("div",{className:`space-y-2 mb-4 flex-1 ${h?"overflow-y-auto max-h-[200px] pr-2":""}`,children:e.features.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-slate-600",children:[(0,t.jsx)("div",{className:`${h?"w-5 h-5":"w-3 h-3"} rounded-full flex items-center justify-center flex-shrink-0 ${l?"bg-green-500 text-white":"bg-slate-100 text-slate-300"}`,children:(0,t.jsx)(i.Check,{size:h?10:6,strokeWidth:4})}),(0,t.jsxs)("span",{className:"truncate",children:[e.name,e.monthlyCredits?` ${e.monthlyCredits}`:""]})]},r))}),(0,t.jsx)("button",{disabled:!!l,onClick:()=>!l&&B(e.id,e.pricingPlanId),className:`w-full py-3 rounded-xl font-bold text-sm transition-all ${l?"bg-green-100 text-green-700 cursor-default":e.highlight?"bg-slate-900 text-white hover:bg-slate-800":"bg-slate-50 text-slate-900 hover:bg-slate-100 border border-slate-200"}`,children:l?x("Studio.subscription.modal.renew"):R===e.id?"Redirecting...":x("Studio.subscription.modal.buy")})]},e.id)})})]});return h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:(0,t.jsxs)("div",{className:"bg-white rounded-2xl shadow-xl w-full max-w-4xl max-h-[85vh] overflow-hidden relative mx-4 flex flex-col",children:[(0,t.jsx)("button",{onClick:f,className:"absolute top-3 right-3 w-8 h-8 flex items-center justify-center rounded-full bg-slate-100 hover:bg-slate-200 transition-colors z-10",children:(0,t.jsx)(n.X,{size:16})}),(0,t.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:U})]})}),$&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-[60]",children:(0,t.jsxs)("div",{className:"bg-white rounded-3xl shadow-2xl w-full max-w-4xl max-h-[85vh] overflow-hidden relative flex flex-col",children:[(0,t.jsxs)("button",{onClick:H,className:"absolute top-4 left-4 flex items-center gap-2 px-4 py-2 rounded-full bg-slate-100 hover:bg-slate-200 transition-colors z-10 text-sm font-medium text-slate-700",children:[(0,t.jsx)(d.ArrowLeft,{size:16}),x("Studio.subscription.modal.backToSubscription")]}),(0,t.jsx)("button",{onClick:()=>{H(),f&&f()},className:"absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-slate-100 hover:bg-slate-200 transition-colors z-10",children:(0,t.jsx)(n.X,{size:20})}),(0,t.jsx)("div",{className:"p-8 pt-16 overflow-y-auto flex-1",children:(0,t.jsx)(b,{onClose:H,showTitle:!0})})]})})]}):(0,t.jsxs)("div",{className:"py-8 flex flex-col items-center max-w-5xl mx-auto",children:[U,$&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-[60]",children:(0,t.jsxs)("div",{className:"bg-white rounded-3xl shadow-2xl w-full max-w-4xl max-h-[90vh] overflow-hidden relative",children:[(0,t.jsxs)("button",{onClick:H,className:"absolute top-4 left-4 flex items-center gap-2 px-4 py-2 rounded-full bg-slate-100 hover:bg-slate-200 transition-colors z-10 text-sm font-medium text-slate-700",children:[(0,t.jsx)(d.ArrowLeft,{size:16}),x("Studio.subscription.modal.backToSubscription")]}),(0,t.jsx)("button",{onClick:H,className:"absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-slate-100 hover:bg-slate-200 transition-colors z-10",children:(0,t.jsx)(n.X,{size:20})}),(0,t.jsx)("div",{className:"p-8 pt-16 overflow-y-auto max-h-[90vh]",children:(0,t.jsx)(b,{onClose:H,showTitle:!0})})]})})]})}],82508)}]);

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.