1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[47402],{47402:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var s=r(95155),i=r(96199),a=r(34513),o=r(20063),n=r(58261),l=r(52619),c=r.n(l),d=r(12115),m=r(15927),x=r(88979),h=r(84987),u=r(1559),p=r(17244),g=r(45871);let b=[{question:"What is this migration tool?",answer:"This tool transfers your existing QuickBox license from the Classic QuickBox (quickbox.io) system to the new V3 platform. All your activation entitlements will be preserved."},{question:"Why do I need to enter my quickbox.io password?",answer:"To prevent unauthorized migration of licenses, we verify that you own the API key by authenticating with your quickbox.io account. Your password is sent securely over HTTPS, used only for one-time verification, and is <strong>never stored</strong> on our servers."},{question:"What if I have 2FA enabled on my quickbox.io account?",answer:"No problem! Our secure migration system bypasses 2FA specifically for this one-time verification. Just use your normal quickbox.io username and password. This is safe because we validate ownership of the API key on the server side."},{question:"Why should I migrate?",answer:"The new V3 system offers improved security, a modern dashboard for managing your licenses, real-time activation monitoring, and enhanced support features."},{question:"What happens to my current activations?",answer:"Your activation count transfers directly. If you have a 5-activation license, your new V3 license will also have 5 activations. No activation slots are lost."},{question:"Is this process reversible?",answer:"Once migrated, your old API key will be deactivated and a new V3 key will be issued. This ensures you don't accidentally use the old key. Your servers will need to be re-activated with the new key."},{question:"Do I need to do anything on my server after migrating?",answer:'Yes. After migration, run <code class="bg-white/10 px-1.5 py-0.5 rounded text-[#2aebcb]">qb manage api</code> on each server and enter your new API key when prompted.'},{question:"Does this affect my data on the server?",answer:"No, your data on the server will not be affected by this migration. The process only changes the API key used for activation and does not modify any of your existing data or configurations."}],y=[{title:"Enable & Prepare",description:'Visit Settings â Preferences and toggle on "Legacy License Migration." Then run `qb manage api` on your server to copy the legacy key and optional instance IDs.',link:{label:"Open Settings",href:"/dashboard/settings?tab=preferences"}},{title:"Verify Ownership",description:"Enter your quickbox.io username/password plus the legacy API key below, then click Verify License. This unlocks Step 2 and shows the migration summary.",link:{label:"Jump to Verification",href:"#migration-verify"}},{title:"Migrate & Update Servers",description:"Approve the confirmation modal, copy your new API key, then run `qb manage api -o deactivate`, `qb manage api -k NEW_KEY`, and `qb manage telemetry -o on` on every server.",link:{label:"View Post-Migration Steps",href:"#post-migration"}}],f=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(e);function w(){var e,t;let{data:r,status:l}=(0,i.wV)(),w=(0,o.useRouter)(),v=(0,u.d)(),j=(0,p.S)(),[N,k]=(0,d.useState)(!1),[A,C]=(0,d.useState)(!1),[S,L]=(0,d.useState)(!1),[P,F]=(0,d.useState)(""),[E,I]=(0,d.useState)(""),[M,T]=(0,d.useState)(""),[q,D]=(0,d.useState)(""),[V,B]=(0,d.useState)(null),[Y,W]=(0,d.useState)(null),[K,O]=(0,d.useState)(null),[H,z]=(0,d.useState)([]),[Q,R]=(0,d.useState)(null),[_,U]=(0,d.useState)(null),[X,J]=(0,d.useState)(null),[G,Z]=(0,d.useState)(!1),[$,ee]=(0,d.useState)(null),et=!!(null==r?void 0:r.impersonating),er=!!((null==r||null==(t=r.user)||null==(e=t.permissions)?void 0:e.includes("admin.migrations.manage"))||et),es=H.some(e=>"verified"===e.status),ei=er||es;(0,d.useEffect)(()=>{"unauthenticated"===l&&(0,n.j)(w)},[l,w]),(0,d.useEffect)(()=>{"authenticated"===l&&ea()},[l]),(0,d.useEffect)(()=>(window.scrollTo(0,0),window.location.hash&&!sessionStorage.getItem("allowHashScroll")&&window.history.replaceState(null,"",window.location.pathname+window.location.search),sessionStorage.setItem("allowHashScroll","true"),()=>{sessionStorage.removeItem("allowHashScroll")}),[]);let ea=async()=>{k(!0);try{let e=await fetch("/api/user/migration/verify");if(e.ok){let t=(await e.json()).migrations||[];z(t),O(e=>{if(e)return e;let r=t.filter(e=>"verified"===e.status).sort((e,t)=>
1new Date(t.verifiedAt||0).getTime()-new Date(e.verifiedAt||0).getTime())[0];return r?(Z(!1),r):e})}}catch(e){console.error("Failed to fetch migrations:",e)}finally{k(!1)}},eo=async e=>{e.preventDefault(),B(null),W(null),O(null),R(null),U(null),J(null),ee(null),C(!0);try{let e=await fetch("/api/user/migration/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:P,instanceId:E||void 0,wpUsername:M,wpPassword:q})}),s=await e.json();if(!e.ok){v.error(s.error||"Verification failed"),B(s.error||"Verification failed");return}if(s.success){var t,r;v.success("API key verified successfully!"),W("API key verified successfully! You can now proceed with migration."),O({...s.migration,isSubscription:null!=(r=null==(t=s.legacyKey)?void 0:t.isSubscription)&&r}),await ea()}}catch(e){v.error("Network error. Please try again."),B("Network error. Please try again."),console.error("Verification error:",e)}finally{C(!1)}},en=async e=>{if(!G)return void Z(!0);B(null),W(null),R(null),U(null),J(null),ee(null),L(!0);try{let t=await fetch("/api/user/migration/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({migrationId:e,confirmDeactivation:!0})}),r=await t.json();if(!t.ok){v.error(r.error||"Migration failed"),B(r.error||"Migration failed");return}r.success&&(v.success("Migration completed successfully! \uD83C\uDF89"),W("Migration completed successfully!"),R(r.license.fullKey),U(r.apiKey.key),J(r.order.id),ee(r.license),O(null),F(""),I(""),T(""),D(""),Z(!1),await ea(),r.warnings&&r.warnings.length>0&&(console.warn("Migration warnings:",r.warnings),v.warning("Note: ".concat(r.warnings.join(", ")))))}catch(e){v.error("Network error. Please try again."),B("Network error. Please try again."),console.error("Migration error:",e)}finally{L(!1)}},el=async e=>{if(await j.confirm({title:"Cancel Migration",message:"Are you sure you want to cancel this migration? You can verify your key again later.",confirmText:"Cancel Migration",cancelText:"Keep It",type:"warning",icon:"warning"}))try{let t=await fetch("/api/user/migration/execute?id=".concat(e),{method:"DELETE"});if(t.ok)v.success("Migration cancelled successfully"),await ea(),O(null);else{let e=await t.json();v.error(e.error||"Failed to cancel migration")}}catch(e){v.error("Network error. Please try again."),console.error("Cancel error:",e)}},ec=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!er)return void v.error("You do not have permission to manage migration records.");if(await j.confirm({title:t?"Delete Migration Audit Record":"Delete Migration Record",message:t?"This will delete the migration audit record, allowing you to re-migrate this key. Your existing license and API key will remain active. Continue?":"This will permanently delete this migration record. This action cannot be undone.",confirmText:"Delete Permanently",cancelText:"Keep Record",type:"danger",icon:"error"}))try{let r=await fetch("/api/user/migration/execute?id=".concat(e,"&action=delete").concat(t?"&force=true":""),{method:"DELETE"}),s=await r.json();r.ok?(v.success(s.message||"Migration record deleted"),await ea()):v.error(s.error||"Failed to delete migration")}catch(e){v.error("Network error. Please try again."),console.error("Delete error:",e)}},ed=async()=>{if(!er)return void v.error("You do not have permission to manage migration records.");let e=H.filter(e=>["failed","cancelled"].includes(e.status)).length;if(0===e)return void v.warning("No failed or cancelled migrations to delete");if(await j.confirm({title:"Delete All Failed Migrations",message:"This will permanently delete ".concat(e," failed/cancelled migration record(s). This action cannot be undone."),confirmText:"Delete ".concat(e," Record").concat(e>1?"s":""),cancelText:"Cancel",type:"danger",icon:"error"}))try{let t=await fetch("/api/user/migration/execute?action=delete-all-failed",{method:"DELETE"}),r=await t.json();t.ok?(v.success(r.message||"Deleted ".concat(e," migration(s)")),await ea()):v.error(r.error||"Failed to delete migrations")}catch(e){v.error("Network error. Please try again."),console.error("Delete all error:",e)}};return"loading"===l||N?(0,s.jsx)(a.N,{children:(0,s.jsx)("div",{className:"flex justify-center items-center min-h-[400px]",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#26AE7F]"})})}):(0,s.jsx)(a.N,{children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-bold text-white",children:"License Migration"}),(0,s.jsx)("p",{className:"mt-2 text-gray-400",children:"Transfer your existing QuickBox license to the new V3 platform"})]}),(0,s.jsx)("div",{className:"grid gap-4 md:grid-cols-3",children:y.map((e,t)=>(0,s.jsxs)("div",{className:"p-4 rounded-xl border border-white/10 bg-gradient-to-br from-white/5 to-transparent",children:[(0,s.jsxs)("p",{className:"text-xs uppercase tracking-[0.2em] text-[#26AE7F] mb-2",children:["Step ",t+1]}),(0,s.jsx)("h3",{className:"text-lg font-semibold text-white mb-2",children:e.title}),(0,s.jsx)("p",{className:"text-sm text-gray-300 mb-3 leading-relaxed",dangerouslySetInnerHTML:{__html:e.description.replace(/`([^`]+)`/g,'<code class="bg-white/10 px-1.5 py-0 rounded text-[#2aebcb] font-mono text-xs">$1</code>')}}),e.link&&(0,s.jsxs)(c(),{href:e.link.href,className:"inline-flex items-center text-sm font-medium text-[#2aebcb] hover:text-white transition-colors",children:[e.link.label,(0,s.jsx)("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]},e.title))}),Q&&(0,s.jsxs)(m.P.div,{id:"post-migration",initial:{opacity:0,y:-10}
1,animate:{opacity:1,y:0},className:"bg-gradient-to-br from-[#26AE7F]/20 to-[#2aebcb]/10 border border-[#26AE7F]/30 rounded-xl p-6 backdrop-blur-sm",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-[#2aebcb] mb-4",children:"\uD83C\uDF89 Migration Complete!"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-gray-300",children:"Your Classic QuickBox license has been successfully migrated to V3! Below are your new credentials."}),$&&(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-4",children:[(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"text-xs uppercase tracking-wider text-gray-400 mb-1",children:"License Type"}),(0,s.jsx)("dd",{className:"text-white font-medium",children:$.isLifetime?"Lifetime (no expiration)":"Subscription (".concat("yearly"===$.grandfatheredBillingCycle?"Yearly":"Monthly",")")})]}),!$.isLifetime&&$.expiresAt&&(0,s.jsxs)("p",{className:"text-xs text-gray-400 mt-1",children:["Classic billing period ends on"," ",new Date($.expiresAt).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})]})]}),(0,s.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-4",children:(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"text-xs uppercase tracking-wider text-gray-400 mb-1",children:"Classic Price Preserved"}),$.grandfatheredPrice?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("dd",{className:"text-[#2aebcb] font-semibold",children:[f($.grandfatheredPrice)," ","lifetime"===$.grandfatheredBillingCycle?"(one-time)":"/ ".concat($.grandfatheredBillingCycle||"monthly")]}),!$.isLifetime&&$.standardPrice&&(0,s.jsxs)("p",{className:"text-xs text-gray-400 mt-1",children:["Standard price: ",f($.standardPrice)," / ",$.grandfatheredBillingCycle||"monthly"]}),$.isLifetime&&(0,s.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"This forever preserves the amount you paid on Classic QuickBox."})]}):(0,s.jsx)("dd",{className:"text-gray-300",children:"Not available from classic records"})]})})]}),X&&(0,s.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-4",children:(0,s.jsxs)("p",{className:"text-sm text-gray-400",children:[(0,s.jsx)("span",{className:"text-white font-medium",children:"Migration Order:"})," ",X]})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-white mb-2",children:"New V3 License Key"}),(0,s.jsx)("div",{className:"bg-[#0e1726] border border-[#26AE7F]/40 rounded-lg p-4 font-mono text-sm break-all text-[#2aebcb]",children:Q}),(0,s.jsx)("button",{onClick:async()=>{try{await navigator.clipboard.writeText(Q||""),v.success("License key copied to clipboard")}catch(e){console.error("Failed to copy license key:",e),v.error("Failed to copy license key")}},className:"mt-2 px-4 py-2 bg-[#26AE7F] text-[#060818] font-semibold rounded-lg hover:bg-[#2aebcb] transition-colors text-sm",children:"Copy License Key"})]}),_&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-sm font-medium text-white mb-2",children:["New API Key ",(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"(Use this to activate your servers)"})]}),(0,s.jsx)("div",{className:"bg-[#0e1726] border border-purple-500/40 rounded-lg p-4 font-mono text-sm break-all text-purple-400",children:_}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,s.jsx)("button",{onClick:async()=>{try{await navigator.clipboard.writeText(_||""),v.success("API key copied to clipboard")}catch(e){console.error("Failed to copy API key:",e),v.error("Failed to copy API key")}},className:"px-4 py-2 bg-purple-500 text-white font-semibold rounded-lg hover:bg-purple-600 transition-colors text-sm",children:"Copy API Key"}),(0,s.jsxs)("span",{className:"text-xs text-gray-400",children:["\uD83D\uDD10 You can view this key anytime from your ",(0,s.jsx)(c(),{href:"/dashboard/api-keys",className:"text-[#2aebcb] hover:underline",children:"API Keys"})," page"]})]})]}),(0,s.jsxs)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-4 mt-4",children:[(0,s.jsx)("h3",{className:"font-medium text-white mb-2",children:"Next Steps:"}),(0,s.jsxs)("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-300",children:[(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{className:"text-white",children:"Update each server:"})," SSH into your QuickBox servers and run"," ",(0,s.jsx)("code",{className:"bg-white/10 px-1.5 py-0.5 rounded text-[#2aebcb]",children:"qb manage api -o deactivate"})]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{className:"text-white",children:"Activate with new key:"})," Use your new API key above when prompted"]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{className:"text-white",children:"Verify:"})," Check"," ",(0,s.jsx)(c(),{href:"/dashboard/licenses",className:"text-[#2aebcb] hover:underline",children:"your license dashboard"})," ","to see activations"]})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3 pt-2",children:[(0,s.jsx)(c(),{href:"/dashboard/licenses",className:"px-4 py-2 bg-white/10 text-white font-medium rounded-lg hover:bg-white/20 transition-colors",children:"View My Licenses"}),(0,s.jsx)(c(),{href:"/dashboard/api-keys",className:"px-4 py-2 bg-white/10 text-white font-medium rounded-lg hover:bg-white/20 transition-colors",children:"Manage API Keys"})]})]})]}),V&&(0,s.jsx)(m.P.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"bg-red-500/10 border border-red-500/30 rounded-xl p-4 text-red-400 backdrop-blur-sm",children:V}),Y&&!Q&&(0,s.jsx)(m.P.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-[#26AE7F]/10 border border-[#26AE7F]/30 rounded-xl p-4 text-[#2aebcb] backdrop-blur-sm",children:Y}),(0,s.jsxs)("div",{id:"migration-verify",className:"bg-gradient-to-br from-white/5 to-white/0 backdrop-blur-sm border border-white/10 rounded-xl p-6",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-4",children:"Step 1: Verify Your Current License"}),(0,s.jsxs)("div",{className:"bg-[#2aebcb]/10 border border-[#2aebcb]/30 rounded-lg p-4 mb-6",children:[(0,s.jsxs)("h3",{className:"font-medium text-[#2aebcb] mb-3 flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"How to find your API Key"]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:"Option 1: Via Server Command"}),(0,s.jsx)("p",{className:"text-sm text-gray-300 mb-2",children:"Run the following command on your QuickBox server:"}),(0,s.jsx)("code",{className:"block bg-[#0e1726] border border-white/10 rounded px-3 py-2 text-sm font-mono text-[#2aebcb]",children:"qb manage api"}),(0,s.jsxs)("p",{className:"text-xs text-gray-400 mt-1",children:["Look for the ",(0,s.jsx)("span",{className:"text-white font-medium",children:"api key"})," value in the output."]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:"Option 2: Via Classic Website"}),(0,s.jsx)("p",{className:"text-sm text-gray-300 mb-1",children:"Visit your account on the Classic QuickBox website:"}),(0,s.jsxs)("a",{href:"https://quickbox.io/my-account/api-keys/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#2aebcb] hover:text-white hover:underline inline-flex items-center gap-1",children:["https://quickbox.io/my-account/api-keys/",(0,s.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:"Option 3: Via Dashboard"}),(0,s.jsxs)("p",{className:"text-sm text-gray-300",children:["Log into your QuickBox Pro server dashboard and navigate to ",(0,s.jsx)("span",{className:"text-white font-medium",children:"System â API Control"})," page."]})]})]})]}),(0,s.jsxs)("form",{onSubmit:eo,className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"apiKey",className:"block text-sm font-medium text-gray-300",children:"API Key *"}),(0,s.jsx)("input",{type:"text",id:"apiKey",value:P,onChange:e=>F(e.target.value),required:!0,placeholder:"e.g., 71894cddb17e546a63ea2243ab69a1dc75beaa31",className:"mt-1 block w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-white placeholder-gray-500 focus:border-[#26AE7F] focus:ring-1 focus:ring-[#26AE7F] focus:outline-none transition-colors font-mono text-sm",autoComplete:"off","data-lpignore":"true","data-form-type":"other","data-1p-ignore":"true"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Your current API key from quickbox.io"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"instanceId",className:"block text-sm font-medium text-gray-300",children:["Instance ID ",(0,s.jsx)("span",{className:"text-gray-500",children:"(Optional)"})]}),(0,s.jsx)("input",{type:"text",id:"instanceId",value:E,onChange:e=>I(e.target.value),placeholder:"e.g., YmYyY2Q2YzEyZjk2",className:"mt-1 block w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-white placeholder-gray-500 focus:border-[#26AE7F] focus:ring-1 focus:ring-[#26AE7F] focus:outline-none transition-colors font-mono text-sm",autoComplete:"off","data-lpignore":"true","data-form-type":"other","data-1p-ignore":"true"}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:['Found as "instance id" in the ',(0,s.jsx)("code",{className:"text-[#2aebcb]",children:"qb manage api"})," output"]})]}),(0,s.jsxs)("div",{className:"border-t border-white/10 pt-4 mt-4",children:[(0,s.jsxs)("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-lg p-4 mb-4",children:[(0,s.jsxs)("h4",{className:"text-sm font-medium text-amber-400 flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Ownership Verification Required"]}),(0,s.jsx)("p",{className:"text-xs text-gray-300 mt-2",children:"To prevent unauthorized migration, we need to verify you own this API key by authenticating with your quickbox.io account."}),(0,s.jsxs)("div",{className:"text-xs text-gray-400 mt-2 space-y-1",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{className:"text-[#2aebcb]",children:"â Works with 2FA enabled accounts"})}),(0,s.jsx)("p",{className:"ml-2",children:"Our secure migration system handles 2FA automatically. Just use your normal quickbox.io username and password."})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"wpUsername",className:"block text-sm font-medium text-gray-300",children:"quickbox.io Username or Email *"}),(0,s.jsx)("input",{type:"text",id:"wpUsername",value:M,onChange:e=>T(e.target.value),required:!0,placeholder:"your-username",className:"mt-1 block w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-white placeholder-gray-500 focus:border-[#26AE7F] focus:ring-1 focus:ring-[#26AE7F] focus:outline-none transition-colors text-sm",autoComplete:"off","data-lpignore":"true","data-form-type":"other","data-1p-ignore":"true"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"wpPassword",className:"block text-sm font-medium text-gray-300",children:"quickbox.io Password *"}),(0,s.jsx)("input",{type:"password",id:"wpPassword",value:q,onChange:e=>D(e.target.value),required:!0,placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢",className:"mt-1 block w-full rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-white placeholder-gray-500 focus:border-[#26AE7F] focus:ring-1 focus:ring-[#26AE7F] focus:outline-none transition-colors text-sm",autoComplete:"off","data-lpignore":"true","data-form-type":"other","data-1p-ignore":"true"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Your regular quickbox.io password (2FA is handled automatically)"})]})]})]}),(0,s.jsx)("button",{type:"submit",disabled:A||!P.trim()||!M.trim()||!q.trim(),className:"w-full px-4 py-2 bg-[#26AE7F] text-[#060818] font-semibold rounded-lg hover:bg-[#2aebcb] disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:A?(0,s.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,s.jsxs)("svg",{className:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.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"})]}),"Verifying License..."]}
1):"Verify License"})]})]}),H.some(e=>"verified"===e.status)&&!Q&&(0,s.jsxs)(m.P.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-[#2aebcb]/10 border border-[#2aebcb]/30 rounded-xl p-4 text-sm text-[#2aebcb] backdrop-blur-sm flex items-start gap-3",children:[(0,s.jsx)("svg",{className:"w-5 h-5 flex-shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,s.jsx)("span",{children:"One step left to finish your migration â confirm below to receive your new license and API key."})]}),K&&"verified"===K.status&&(0,s.jsxs)(m.P.div,{id:"migration-confirm",initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-gradient-to-br from-white/5 to-white/0 backdrop-blur-sm border border-white/10 rounded-xl p-6",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white mb-4",children:"Step 2: Confirm Migration"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"bg-[#26AE7F]/10 border border-[#26AE7F]/30 rounded-lg p-4",children:[(0,s.jsxs)("h3",{className:"font-medium text-[#2aebcb] mb-3 flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"License Verified Successfully"]}),(0,s.jsxs)("dl",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",children:[(0,s.jsxs)("div",{className:"bg-white/5 rounded-lg p-3",children:[(0,s.jsx)("dt",{className:"text-gray-400 text-xs uppercase tracking-wider mb-1",children:"New License Format"}),(0,s.jsxs)("dd",{className:"text-white font-medium font-mono",children:[K.isSubscription?"QBPRO":"LEGACY","-",K.classicActivations,"-XXXXXXXX"]}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:K.isSubscription?"Subscription license":"Lifetime license (no expiration)"})]}),(0,s.jsxs)("div",{className:"bg-white/5 rounded-lg p-3",children:[(0,s.jsx)("dt",{className:"text-gray-400 text-xs uppercase tracking-wider mb-1",children:"Server Activations"}),(0,s.jsxs)("dd",{className:"text-white font-medium",children:[K.classicActivations," server",1!==K.classicActivations?"s":""]})]})]})]}),G?(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-sm text-red-300",children:[(0,s.jsxs)("p",{className:"font-medium mb-2 flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Final Confirmation"]}),(0,s.jsx)("p",{className:"ml-7",children:"This will permanently migrate your license to the V3 platform. Your current API key will be deactivated immediately."})]}),(0,s.jsx)("button",{onClick:()=>en(K.id),disabled:S,className:"w-full px-4 py-2 bg-[#26AE7F] text-[#060818] font-semibold rounded-lg hover:bg-[#2aebcb] disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:S?(0,s.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,s.jsxs)("svg",{className:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[(0,s.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,s.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"})]}),"Migrating..."]}):"Yes, Migrate My License"}),(0,s.jsx)("button",{onClick:()=>Z(!1),disabled:S,className:"w-full px-4 py-2 bg-white/5 text-gray-300 border border-white/10 rounded-lg hover:bg-white/10 transition-colors",children:"Go Back"})]}):(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-4 text-sm text-yellow-300",children:[(0,s.jsxs)("p",{className:"font-medium mb-2 flex items-center gap-2",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Before you proceed:"]}),(0,s.jsxs)("ul",{className:"list-disc list-inside space-y-1 ml-7",children:[(0,s.jsx)("li",{children:"Your current API key will stop working"}),(0,s.jsx)("li",{children:"A new API key will be generated for the V3 platform"}),(0,s.jsx)("li",{children:"You'll need to update each server with the new key"}),(0,s.jsx)("li",{children:"Your activation count will be preserved"})]})]}),(0,s.jsx)("button",{onClick:()=>Z(!0),className:"w-full px-4 py-2 bg-[#26AE7F] text-[#060818] font-semibold rounded-lg hover:bg-[#2aebcb] transition-colors",children:"Continue to Migration"}),(0,s.jsx)("button",{onClick:()=>el(K.id),className:"w-full px-4 py-2 bg-white/5 text-gray-300 border border-white/10 rounded-lg hover:bg-white/10 transition-colors",children:"Cancel"})]})]})]}),H.length>0&&(0,s.jsxs)("div",{className:"bg-gradient-to-br from-white/5 to-white/0 backdrop-blur-sm border border-white/10 rounded-xl p-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Migration History"}),er&&H.some(e=>["failed","cancelled"].includes(e.status))&&(0,s.jsx)("button",{onClick:ed,className:"px-3 py-1.5 text-xs bg-red-500/10 text-red-400 border border-red-500/30 rounded-lg hover:bg-red-500/20 transition-colors",children:"Delete All Failed"})]}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full divide-y divide-white/10",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Legacy Key"}),(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Activations"}),(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Status"}),(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Date"}),(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"New License"}),ei&&(0,s.jsx)("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Actions"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-white/5",children:H.map(e=>(0,s.jsxs)("tr",{className:"hover:bg-white/5 transition-colors",children:[(0,s.jsx)("td",{className:"px-4 py-3 text-sm font-mono text-[#2aebcb]",children:e.classicApiKey}),(0,s.jsxs)("td",{className:"px-4 py-3 text-sm text-gray-300",children:[e.classicActivations," server",1!==e.classicActivations?"s":""]}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm",children:(0,s.jsx)("span",{className:"inline-flex px-2 py-1 text-xs font-medium rounded-lg ".concat("migrated"===e.status?"bg-[#26AE7F]/20 text-[#26AE7F] border border-[#26AE7F]/30":"verified"===e.status?"bg-[#2aebcb]/20 text-[#2aebcb] border border-[#2aebcb]/30":"failed"===e.status?"bg-red-500/20 text-red-400 border border-red-500/30":"bg-white/10 text-gray-400 border border-white/10"),children:e.status})}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm text-gray-400",children:new Date(e.migratedAt||e.verifiedAt||e.createdAt).toLocaleDateString()}),(0,s.jsx)("td",{className:"px-4 py-3 text-sm",children:e.newLicense?(0,s.jsx)(c(),{href:"/dashboard/licenses",className:"text-[#26AE7F] hover:text-[#2aebcb] underline transition-colors",children:"View License"}):(0,s.jsx)("span",{className:"text-gray-600",children:"-"})}),ei&&(0,s.jsx)("td",{className:"px-4 py-3 text-sm",children:"verified"===e.status?(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{onClick:()=>{B(null),W(null),O(e),Z(!1),setTimeout(()=>{var e;
1null==(e=document.getElementById("migration-confirm"))||e.scrollIntoView({behavior:"smooth",block:"start"})},100)},className:"text-[#2aebcb] hover:text-white text-xs font-medium underline transition-colors",children:"Continue migration"}),er&&(0,s.jsx)("button",{onClick:()=>el(e.id),className:"text-yellow-400 hover:text-yellow-300 text-xs underline transition-colors",children:"Cancel"})]}):er?"migrated"===e.status?(0,s.jsx)(g.m,{content:"Delete audit record to allow re-migration",position:"left",children:(0,s.jsx)("button",{onClick:()=>ec(e.id,!0),className:"text-gray-500 hover:text-red-400 text-xs underline transition-colors",children:"Delete Record"})}):(0,s.jsx)("button",{onClick:()=>ec(e.id),className:"text-red-400 hover:text-red-300 text-xs underline transition-colors",children:"Delete"}):(0,s.jsx)("span",{className:"text-gray-600",children:"-"})})]},e.id))})]})})]}),(0,s.jsxs)("div",{className:"bg-gradient-to-br from-white/5 to-white/0 backdrop-blur-sm border border-white/10 rounded-xl p-6",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white mb-2",children:"Frequently Asked Questions"}),(0,s.jsx)(h.default,{items:b})]}),(0,s.jsx)(x.default,{})]})})}},84987:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var s=r(95155),i=r(12115),a=r(30124);function o(e){let{items:t,allowMultiple:r=!1}=e,[o,n]=(0,i.useState)(new Set),l=(0,i.useRef)([]),[c,d]=(0,i.useState)([]);return(0,i.useEffect)(()=>{d(l.current.map(e=>(null==e?void 0:e.scrollHeight)||0))},[t]),(0,s.jsx)("div",{className:"space-y-2 my-8",children:t.map((e,t)=>{let i=o.has(t);return(0,s.jsxs)("div",{className:"border border-gray-800 rounded-lg overflow-hidden bg-gray-900/30",children:[(0,s.jsxs)("button",{onClick:()=>{n(e=>{let s=new Set(e);return s.has(t)?s.delete(t):(r||s.clear(),s.add(t)),s})},className:"w-full flex items-center justify-between p-4 text-left hover:bg-gray-800/50 transition-colors group","aria-expanded":i,children:[(0,s.jsx)("span",{className:"font-medium text-foreground pr-8",children:e.question}),(0,s.jsx)("svg",{className:"w-5 h-5 text-gray-500 shrink-0 transition-transform duration-300 ".concat(i?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(0,s.jsx)("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{maxHeight:i?"".concat(c[t]+32,"px"):"0px",opacity:+!!i},children:(0,s.jsx)("div",{ref:e=>{l.current[t]=e},className:"px-4 py-4 text-gray-400 leading-relaxed faq-content",dangerouslySetInnerHTML:{__html:e.answer.replace(/`([^`]+)`/g,(e,t)=>'<code class="'.concat(a.p,'">').concat(t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"</code>")).replace(/<code>/g,'<code class="'.concat(a.p,'">'))}})})]},t)})})}}}]);
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.