1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,85149,e=>{"use strict";e.s(["CHROME_EXTENSION_URL",0,"https://chrome.google.com/webstore/detail/bmkfilhgjhbjkhgdkoghnigdkniadail"])},32189,(e,t,n)=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},65156,(e,t,n)=>{"use strict";var r=e.r(32189);function a(){}function i(){}i.resetWarningCache=a,t.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},45009,(e,t,n)=>{t.exports=e.r(65156)()},40259,11860,67668,e=>{"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,r="dahlia",a="https://js.stripe.com",i="".concat(a,"/").concat(r,"/stripe.js"),o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,c=function(){for(var e=document.querySelectorAll('script[src^="'.concat(a,'"]')),t=0;t<e.length;t++){var n,r=e[t];if(n=r.src,o.test(n)||s.test(n))return r}return null},l=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(i).concat(t);var r=document.head||document.body;if(!r)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},d=function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:t})},u=null,p=null,m=null,h=function(e,n,a){if(null===e)return null;var i,o=n[0];if("string"!=typeof o)throw Error("Expected publishable key to be of type string, got type ".concat(t(o)," instead."));var s=o.match(/^pk_test/),c=3===(i=e.version)?"v3":i;s&&c!==r&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(r,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=e.apply(void 0,n);return d(l,a),l},f=!1,x=function(){return n||(n=(null!==u?u:(u=new Promise(function(e,t){if("u"<typeof window||"u"<typeof document)return void e(null);if(window.Stripe,window.Stripe)return void e(window.Stripe);try{var n,r=c();r?r&&null!==m&&null!==p&&(r.removeEventListener("load",m),r.removeEventListener("error",p),null==(n=r.parentNode)||n.removeChild(r),r=l(null)):r=l(null),m=function(){window.Stripe?e(window.Stripe):t(Error("Stripe.js not available"))},p=function(e){t(Error("Failed to load Stripe.js",{cause:e}))},r.addEventListener("load",m),r.addEventListener("error",p)}catch(e){t(e);return}})).catch(function(e){return u=null,Promise.reject(e)})).catch(function(e){return n=null,Promise.reject(e)}))};Promise.resolve().then(function(){return x()}).catch(function(e){f||console.warn(e)}),e.s(["loadStripe",0,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];f=!0;var r=Date.now();return x().then(function(e){return h(e,t,r)})}],11860),e.s([],40259);var b=e.i(71645),y=e.i(45009);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,a=e&&("u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=a){var i=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var w=function(e,t,n){var r=!!n,a=b.default.useRef(n);b.default.useEffect(function(){a.current=n},[n]),b.default.useEffect(function(){if(!r||!e)return function(){};var n=function(){a.current&&a.current.apply(a,arguments)};return e.on(t,n),function(){e.off(t,n)}},[r,t,e,a])},N=function(e){var t=b.default.useRef(e);return b.default.useEffect(function(){t.current=e},[e]),t.current},E=function(e){return null!==e&&"object"===k(e)},P="[object Object]",O=function e(t,n){if(!E(t)||!E(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var a=Object.prototype.toString.call(t)===P;if(a!==(Object.prototype.toString.call(n)===P))return!1;if(!a&&!r)return t===n;var i=Object.keys(t),o=Object.keys(n);if(i.length!==o.length)return!1;for(var s={},c=0;c<i.length;c+=1)s[i[c]]=!0;for(var l=0;l<o.length;l+=1)s[o[l]]=!0;var d=Object.keys(s);return d.length===i.length&&d.every(function(r){return e(t[r],n[r])})},A="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;if(null===e||E(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment)return e;throw Error(t)},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A;if(E(e)&&"function"==typeof e.then)return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return I(e,t)})};var n=I(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},T=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"6.2.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.2.0",url:"https://stripe.com/docs/stripe-js/react"}))},U=b.default.createContext(null);U.displayName="ElementsContext";var D=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e};y.default.any,y.default.object,y.default.func.isRequired;var L=b.default.createContext(null);L.displayName="CheckoutContext";var F=function(e){var t=b.default.useContext(L),n=b.default.useContext(U);if(!t)return D(n,e);if(!n)return t;throw Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."))},_=["mode"],W=function(e,t,n){var r="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Element"),a=t?function(e){F("mounts <".concat(r,">"));var t=e.id,n=e.className;return b.default.createElement("div",{id:t,className:n})}:function(t){var n,a=t.id,i=t.className,o=t.options,s=void 0===o?{}:o,c=t.onBlur,l=t.onFocus,d=t.onReady,u=t.onChange,p=t.onEscape,m=t.onClick,h=t.onLoadError,f=t.onLoaderStart,x=t.onNetworksChange,y=t.onConfirm,g=t.onCancel,k=t.onShippingAddressChange,S=t.onShippingRateChange,P=t.onSavedPaymentMethodRemove,A=t.onSavedPaymentMethodUpdate,I=F("mounts <".concat(r,">
1")),R="elements"in I?I.elements:null,T="checkoutState"in I?I.checkoutState:null,U=(null==T?void 0:T.type)==="success"||(null==T?void 0:T.type)==="loading"?T.sdk:null,D=C(b.default.useState(null),2),L=D[0],W=D[1],Y=b.default.useRef(null),B=b.default.useRef(null);w(L,"blur",c),w(L,"focus",l),w(L,"escape",p),w(L,"click",m),w(L,"loaderror",h),w(L,"loaderstart",f),w(L,"networkschange",x),w(L,"confirm",y),w(L,"cancel",g),w(L,"shippingaddresschange",k),w(L,"shippingratechange",S),w(L,"savedpaymentmethodremove",P),w(L,"savedpaymentmethodupdate",A),w(L,"change",u),d&&(n="expressCheckout"===e?d:function(){d(L)}),w(L,"ready",n),b.default.useLayoutEffect(function(){if(null===Y.current&&null!==B.current&&(R||U)){var t=null;if(U)switch(e){case"paymentForm":t=U.createForm(s);break;case"payment":t=U.createPaymentElement(s);break;case"address":if("mode"in s){var n=s.mode,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(s,_);if("shipping"===n)t=U.createShippingAddressElement(a);else if("billing"===n)t=U.createBillingAddressElement(a);else throw Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":t=U.createExpressCheckoutElement(s);break;case"currencySelector":t=U.createCurrencySelectorElement();break;case"taxId":t=U.createTaxIdElement(s);break;case"contactDetails":t=U.createContactDetailsElement();break;default:throw Error("<".concat(r,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}else R&&(t=R.create(e,s));Y.current=t,W(t),t&&t.mount(B.current)}},[R,U,s]);var $=N(s);return b.default.useEffect(function(){if(Y.current){var e,t,n,r=(e=s,t=$,n=["paymentRequest"],E(e)?Object.keys(e).reduce(function(r,a){var i=!E(t)||!O(e[a],t[a]);return n.includes(a)?(i&&console.warn("Unsupported prop change: options.".concat(a," is not a mutable property.")),r):i?v(v({},r||{}),{},j({},a,e[a])):r},null):null);r&&"update"in Y.current&&Y.current.update(r)}},[s,$]),b.default.useLayoutEffect(function(){return function(){if(Y.current&&"function"==typeof Y.current.destroy)try{Y.current.destroy(),Y.current=null}catch(e){}}},[]),b.default.createElement("div",{id:a,className:i,ref:B})};return a.propTypes={id:y.default.string,className:y.default.string,onChange:y.default.func,onBlur:y.default.func,onFocus:y.default.func,onReady:y.default.func,onEscape:y.default.func,onClick:y.default.func,onLoadError:y.default.func,onLoaderStart:y.default.func,onNetworksChange:y.default.func,onConfirm:y.default.func,onCancel:y.default.func,onShippingAddressChange:y.default.func,onShippingRateChange:y.default.func,onSavedPaymentMethodRemove:y.default.func,onSavedPaymentMethodUpdate:y.default.func,options:y.default.object},a.displayName=r,a.__elementType=e,a},Y="u"<typeof window,B=b.default.createContext(null);B.displayName="EmbeddedCheckoutProviderContext";var $=function(){var e=b.default.useContext(B);if(!e)throw Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},q=Y?function(e){var t=e.id,n=e.className;return $(),b.default.createElement("div",{id:t,className:n})}:function(e){var t=e.id,n=e.className,r=$().embeddedCheckout,a=b.default.useRef(!1),i=b.default.useRef(null);return b.default.useLayoutEffect(function(){return!a.current&&r&&null!==i.current&&(r.mount(i.current),a.current=!0),function(){if(a.current&&r)try{r.unmount(),a.current=!1}catch(e){}}},[r]),b.default.createElement("div",{ref:i,id:t,className:n})};W("auBankAccount",Y),W("card",Y),W("cardNumber",Y),W("cardExpiry",Y),W("cardCvc",Y),W("iban",Y),W("payment",Y),W("expressCheckout",Y),W("paymentRequestButton",Y),W("linkAuthentication",Y),W("contactDetails",Y),W("address",Y),W("shippingAddress",Y),W("paymentMethodMessaging",Y),W("taxId",Y),W("issuingCardNumberDis
1play",Y),W("issuingCardCvcDisplay",Y),W("issuingCardExpiryDisplay",Y),W("issuingCardPinDisplay",Y),W("issuingCardCopyButton",Y),e.s(["EmbeddedCheckout",0,q,"EmbeddedCheckoutProvider",0,function(e){var t=e.stripe,n=e.options,r=e.children,a=b.default.useMemo(function(){return R(t,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[t]),i=b.default.useRef(null),o=b.default.useRef(null),s=C(b.default.useState({embeddedCheckout:null}),2),c=s[0],l=s[1];b.default.useEffect(function(){if(!o.current&&!i.current){var e=function(e){o.current||i.current||(o.current=e,i.current=o.current.createEmbeddedCheckoutPage(n).then(function(e){l({embeddedCheckout:e})}))};"async"===a.tag&&!o.current&&(n.clientSecret||n.fetchClientSecret)?a.stripePromise.then(function(t){t&&e(t)}):"sync"===a.tag&&!o.current&&(n.clientSecret||n.fetchClientSecret)&&e(a.stripe)}},[a,n,c,o]),b.default.useEffect(function(){return function(){c.embeddedCheckout?(i.current=null,c.embeddedCheckout.destroy()):i.current&&i.current.then(function(){i.current=null,c.embeddedCheckout&&c.embeddedCheckout.destroy()})}},[c.embeddedCheckout]),b.default.useEffect(function(){T(o)},[o]);var d=N(t);b.default.useEffect(function(){null!==d&&d!==t&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[d,t]);var u=N(n);return b.default.useEffect(function(){if(null!=u){if(null==n)return void console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");void 0===n.clientSecret&&void 0===n.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=u.clientSecret&&n.clientSecret!==u.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=u.fetchClientSecret&&n.fetchClientSecret!==u.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=u.onComplete&&n.onComplete!==u.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=u.onShippingDetailsChange&&n.onShippingDetailsChange!==u.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=u.onLineItemsChange&&n.onLineItemsChange!==u.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[u,n]),b.default.createElement(B.Provider,{value:c},r)}],67668)},58666,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(18566),a=e.i(48148),i=e.i(75157),o=e.i(37727);let s=["200 scans/month","Detailed AI explanations","30-day scan history","Bulk URL upload (10)","Browser extension"],c=["REST API access","Webhook notifications","90-day history (reduced to 30)","Bulk CSV upload"],l=["200 scans/month","Detailed AI explanations","30-day scan history","Bulk URL upload (10)","Browser extension"],d=["1,500 API calls / month","REST API + JSON access","Webhook notifications","90-day scan history","Bulk CSV upload"];function u({children:e,onClose:n}){return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-ink-950/40",onClick:n}),(0,t.jsxs)("div",{className:"relative w-full max-w-[480px] bg-surface border border-ink-100 animate-fade-in",children:[(0,t.jsx)("div",{className:"h-2 w-full bg-suspect"}),(0,t.jsxs)("div",{className:"p-7 sm:p-8",children:[(0,t.jsx)("button",{onClick:n,className:"absolute top-4 right-4 p-2 text-ink-500 hover:text-ink-950 transition-colors","aria-label":"Close",children:(0,t.jsx)(o.X,{className:"w-4 h-4",strokeWidth:1.5})}),e]})]})]})}function p({label:e,items:n,color:r}){let a="safe"===r?"text-safe":"scam"===r?"text-scam":"text-ink-500";return(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("div",{className:"label-classification mb-3",children:e}),(0,t.jsx)("ul",{className:"space-y-2",children:n.map(e=>(0,t.jsxs)("li",{className:`mono text-[12px] leading-[1.55] ${a}`,children:["· ",e]},e))})]})}function m({currentPlan:e,targetPlan:r,periodEnd:a,onClose:i,onSuccess:o}
1){let[h,f]=(0,n.useState)(!1),[x,b]=(0,n.useState)(null),y="api"===e?"API":"Pro",g=a?new Date(a).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):null,v=async()=>{f(!0),b(null);try{let e=await fetch("/api/billing/downgrade",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targetPlan:r})}),t=await e.json();if(t.success)if("scheduled_downgrade"===t.action){let e=t.effectiveDate?new Date(1e3*t.effectiveDate).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):g||"your next billing date";o(`Switching to Pro on ${e}`)}else{let e=t.endsAt?new Date(1e3*t.endsAt).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):g||"your next billing date";o(`Benefits active until ${e}`)}else b(t.error||"Something went wrong")}finally{f(!1)}};return"api"===e&&"pro"===r?(0,t.jsxs)(u,{onClose:i,children:[(0,t.jsx)("div",{className:"label-classification mb-3",children:"Plan Switch"}),(0,t.jsx)("h2",{className:"text-[24px] font-medium text-ink-950 tracking-[-0.02em] mb-4",children:"Switch to Pro?"}),(0,t.jsxs)("p",{className:"text-[16px] leading-[1.55] text-ink-700 mb-6",children:["Your API plan continues until"," ",(0,t.jsx)("span",{className:"text-ink-950 mono text-[13px]",children:g||"the end of your billing period"}),". After that, your plan switches to Pro ($2.99/month)."]}),(0,t.jsx)(p,{label:"You keep",items:s,color:"safe"}),(0,t.jsx)(p,{label:"You lose",items:c,color:"ink"}),x&&(0,t.jsx)("p",{className:"mb-4 mono text-[11px] uppercase tracking-[0.14em] text-scam",children:x}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{onClick:i,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 bg-ink-950 text-paper hover:bg-ink-700 transition-colors",children:"Keep API"}),(0,t.jsx)("button",{onClick:v,disabled:h,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 border border-ink-200 text-ink-700 hover:border-ink-950 hover:text-ink-950 transition-colors disabled:opacity-40",children:h?"Schedulingâ¦":"Switch to Pro"})]})]}):(0,t.jsxs)(u,{onClose:i,children:[(0,t.jsx)("div",{className:"label-classification text-suspect mb-3",children:"Cancellation"}),(0,t.jsxs)("h2",{className:"text-[24px] font-medium text-ink-950 tracking-[-0.02em] mb-4",children:["Cancel ",y," plan?"]}),(0,t.jsxs)("p",{className:"text-[16px] leading-[1.55] text-ink-700 mb-6",children:["Your ",y," benefits continue until"," ",(0,t.jsx)("span",{className:"text-ink-950 mono text-[13px]",children:g||"the end of your billing period"}),". After that, you're on the Free plan with five scans per day."]}),(0,t.jsx)(p,{label:"You lose",items:"api"===e?d:l,color:"scam"}),x&&(0,t.jsx)("p",{className:"mb-4 mono text-[11px] uppercase tracking-[0.14em] text-scam",children:x}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsxs)("button",{onClick:i,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 bg-ink-950 text-paper hover:bg-ink-700 transition-colors",children:["Keep ",y]}),(0,t.jsx)("button",{onClick:v,disabled:h,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 border border-ink-200 text-ink-700 hover:border-scam hover:text-scam transition-colors disabled:opacity-40",children:h?"Cancellingâ¦":"Cancel plan"})]})]})}let h={free:"Free",pro:"Pro",api:"Pro + API",enterprise:"Enterprise"};function f({currentPlan:e,targetPlan:r,targetPrice:a,onClose:i}){let[s,c]=(0,n.useState)(!1),[l,d]=(0,n.useState)(null),u=h[e]||e,p=h[r]||r,m=async()=>{c(!0),d(null);try{let e=await fetch("/api/billing/upgrade",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:"api"===r?"api":"pro"})}),t=await e.json();if(t.url){window.location.href=t.url;return}t.error&&d(t.error)}catch{d("Something went wrong. Please try again.")}finally{c(!1)}};return(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-ink-950/40",onClick:i}),(0,t.jsxs)("div",{className:"relative w-full max-w-[480px] bg-surface border border-ink-100 animate-fade-in",children:[(0,t.jsx)("div",{className:"h-2 w-full bg-ink-950"}),(0,t.jsxs)("div",{className:"p-7 sm:p-8",children:[(0,t.jsx)("button",{onClick:i,className:"absolute top-4 right-4 p-2 text-ink-500 hover:text-ink-950 transition-colors","aria-label":"Close",children:(0,t.jsx)(o.X,{className:"w-4 h-4",strokeWidth:1.5})}),(0,t.jsx)("div",{className:"label-classification mb-3",children:"Upgrade"}),(0,t.jsxs)("h2",{className:"text-[24px] font-medium text-ink-950 tracking-[-0.02em] mb-6",children:["Upgrade to ",p,"."]}),(0,t.jsxs)("div",{className:"border-t border-ink-100 mb-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 py-4 border-b border-ink-100 mono text-[12px] uppercase tracking-[0.14em]",children:[(0,t.jsx)("span",{className:"text-ink-400",children:"From"}),(0,t.jsx)("span",{className:"text-ink-950 text-right",children:u})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 py-4 border-b border-ink-100 mono text-[12px] uppercase tracking-[0.14em]",children:[(0,t.jsx)("span",{className:"text-ink-400",children:"To"}),(0,t.jsx)("span",{className:"text-ink-950 text-right",children:p})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 py-4 mono text-[12px] uppercase tracking-[0.14em]",children:[(0,t.jsx)("span",{className:"text-ink-400",children:"Price"}),(0,t.jsxs)("span",{className:"text-ink-950 text-right tabular-nums",children:["$",a.toFixed(2)," / month"]})]})]}),(0,t.jsx)("p",{className:"text-[14px] text-ink-500 leading-[1.55] mb-6",children:"You'll be redirected to Stripe to complete the upgrade. Pricing is prorated based on the time remaining in your current billing period."}),l&&(0,t.jsx)("p",{className:"mb-4 mono text-[11px] uppercase tracking-[0.14em] text-scam",children:l}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("button",{onClick:i,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 border border-ink-200 text-ink-700 hover:border-ink-950 hover:text-ink-950 transition-colors",children:"Cancel"}),(0,t.jsx)("button",{onClick:m,disabled:s,className:"flex-1 mono text-[12px] uppercase tracking-[0.14em] py-3 bg-ink-950 text-paper hover:bg-ink-700 transition-colors disabled:opacity-40",children:s?"Redirectingâ¦":"Continue â"})]})]})]})]})}e.i(47167);var x=e.i(26732);e.i(40259);var b=e.i(11860),y=e.i(67668);let g=(0,b.loadStripe)("pk_live_51TC05C1rWH9xqwb0hATACn9pk23EKc9xfEVZsIuAaxH3R3EXFe8dX25912lcFop2vK4PxDzF4jCQzvHnIlhNtKkL00fhCeLvUF");function v({plan:e,onClose:a}){let{status:i}
1=(0,x.useSession)(),o=(0,r.useRouter)(),[s,c]=(0,n.useState)(null);(0,n.useEffect)(()=>{"unauthenticated"===i&&e&&o.push(`/auth/signin?callbackUrl=${encodeURIComponent("/pricing?plan="+e)}`)},[i,e,o]),(0,n.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&a()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,a]),(0,n.useEffect)(()=>(e&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow=""}),[e]);let l=(0,n.useCallback)(async()=>{try{let t=await fetch("/api/checkout/embedded",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:e})}),n=await t.json();if(!t.ok)throw c(n.error||"Failed to initialize checkout"),Error(n.error);if(!n.clientSecret)throw c("Failed to initialize payment form"),Error("No client secret");return c(null),n.clientSecret}catch(e){throw c(e.message||"Payment initialization failed"),e}},[e]);if(!e||"loading"===i||"unauthenticated"===i)return null;let d="api"===e?"Pro + API":"Pro",u="api"===e?"$19.99":"$2.99",p="api"===e?["1,500 scans/month","REST API + JSON","90-day history","Webhook notifications"]:["200 scans/month","Detailed AI analysis","30-day history","Browser extension"];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[9998]",onClick:a}),(0,t.jsx)("div",{className:"fixed inset-0 z-[9999] flex items-end sm:items-center justify-center p-0 sm:p-4",children:(0,t.jsxs)("div",{className:"w-full sm:max-w-[560px] max-h-[95vh] sm:max-h-[90vh] overflow-y-auto bg-paper border-t sm:border border-ink-100 animate-slide-up",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"sticky top-0 bg-paper border-b border-ink-100 px-6 py-4 flex items-center justify-between z-10",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-mono text-[10px] tracking-[0.12em] uppercase text-ink-500",children:"Checkout"}),(0,t.jsxs)("p",{className:"text-[18px] font-medium text-ink-950 mt-0.5",children:[d," · ",u,"/mo"]})]}),(0,t.jsx)("button",{onClick:a,className:"w-8 h-8 flex items-center justify-center text-ink-400 hover:text-ink-950 transition-colors","aria-label":"Close",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,t.jsx)("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})})]}),(0,t.jsx)("div",{className:"px-6 py-4 border-b border-ink-100",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-[13px] text-ink-500",children:p.map((e,n)=>(0,t.jsxs)("span",{children:["· ",e]},n))})}),s&&(0,t.jsx)("div",{className:"mx-6 mt-4 p-3 border border-scam/20 bg-scam-tint",children:(0,t.jsx)("p",{className:"text-[13px] text-scam font-mono",children:s})}),(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)(y.EmbeddedCheckoutProvider,{stripe:g,options:{fetchClientSecret:l},children:(0,t.jsx)(y.EmbeddedCheckout,{})})}),(0,t.jsx)("div",{className:"px-6 pb-6",children:(0,t.jsx)("p",{className:"text-[11px] text-ink-300 font-mono",children:"Secure payment via Stripe · Cancel anytime"})})]})})]})}var k=e.i(20133),j=e.i(85149),C=e.i(75679);let S=["free","pro","api","enterprise"],w={free:0,pro:1,api:2,enterprise:3},N={free:"Free",pro:"Pro",api:"Pro + API",enterprise:"Enterprise"},E={free:{amount:"$0",cadence:"forever"},pro:{amount:"$2.99",cadence:"per month"},api:{amount:"$19.99",cadence:"per month"},enterprise:{amount:"Custom",cadence:"annual"}},P={free:0,pro:2.99,api:19.99,enterprise:0},O={free:"Five scans a day, the full six-layer engine, and basic AI explanations. Enough for the cautious individual who gets the occasional suspicious message.",pro:"Two hundred scans a month with detailed AI breakdowns, thirty days of history, and the Chrome extension that guards your Gmail. Less than a dollar a week for peace of mind.",api:"Fifteen hundred calls a month. Full REST API, webhook notifications, ninety-day history. For developers integrating scam detection.",enterprise:"Unlimited calls, custom detection rules, one-year retention, and dedicated support with SLA. For platforms with serious volume."},A={free:["5 scans per day","All 6 detection layers","Basic AI explanations","30+ languages"],pro:["200 scans / month","All 6 detection layers","Detailed AI explanations","30-day scan history","Bulk URL upload (10)","Browser extension"],api:["1,500 calls / month","Everything in Pro","REST API + JSON","Webhook notifications","90-day scan history","Bulk CSV upload"],enterprise:["Unlimited calls","Everything in Pro + API","Custom detection rules","1-year retention","Dedicated support + SLA"]};e.s(["default",0,function(){let e=(0,a.useTranslations)("pricing");(0,r.useRouter)();
1let[o,s]=(0,n.useState)(null),[c,l]=(0,n.useState)(null),[d,u]=(0,n.useState)(null),[p,h]=(0,n.useState)(null),[x,b]=(0,n.useState)(null),[y,g]=(0,n.useState)(null),[I,R]=(0,n.useState)(null);(0,n.useEffect)(()=>{(0,C.trackEvent)("pricing_viewed")},[]),(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("plan");("pro"===e||"api"===e)&&(R(e),window.history.replaceState({},"",window.location.pathname))},[]),(0,n.useEffect)(()=>{fetch("/api/me").then(e=>e.json()).then(e=>s(e)),fetch("/api/billing/details").then(e=>e.json()).then(e=>l(e.currentPeriodEnd||null))},[]);let T=o?.plan||"free",U=w[T]??0,D=o?.pendingPlan||null,L=async e=>{if("enterprise"===e){window.location.href="mailto:[email protected]";return}let t=w[e];t<U?u(e):U>0&&t>U?h(e):((0,C.trackEvent)("checkout_started",{plan:e,source:"pricing"}),R(e))};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("section",{className:"px-6 pb-16 md:pb-24",children:(0,t.jsxs)("div",{className:"max-w-[840px] mx-auto",children:[(x||D&&!x)&&(0,t.jsxs)("div",{className:"mb-12 border-l-2 border-suspect pl-6 py-3",children:[(0,t.jsx)("div",{className:"label-classification text-suspect mb-1",children:x?"Cancellation Scheduled":"Plan Change Scheduled"}),(0,t.jsx)("p",{className:"text-[16px] text-ink-950 leading-[1.55]",children:x||(0,t.jsxs)(t.Fragment,{children:["Switching to ",(0,t.jsx)("span",{className:"text-ink-950",children:N[D]||D})," at the end of the current billing period."]})})]}),(0,t.jsx)("div",{className:"border-t border-ink-100",children:S.map(n=>{let r,a=(r=w[n],"enterprise"===n?{label:"Contact sales",primary:!1,disabled:!1}:D===n?{label:"Scheduled",primary:!1,disabled:!0}:x&&r<U?{label:"Cancellation scheduled",primary:!1,disabled:!0}:n===T?{label:"Current plan",primary:!1,disabled:!0}:r<U?{label:"Downgrade",primary:!1,disabled:!1}:"free"===T?{label:"pro"===n?"Start Pro â $2.99/mo":"api"===n?"Start Pro + API â $19.99/mo":"Start",primary:!0,disabled:!1}:{label:"Upgrade",primary:!0,disabled:!1}),o=E[n],s=n===T,c="pro"===n;return(0,t.jsxs)("article",{className:"py-12 border-b border-ink-100",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)("h2",{className:"text-[24px] font-medium text-ink-950 tracking-[-0.02em]",children:e(`${n}.name`)}),c&&!s&&(0,t.jsx)("span",{className:"mono text-[10px] uppercase tracking-[0.14em] text-ink-950 border border-ink-950 px-1.5 py-[2px]",children:"Most Popular"}),s&&(0,t.jsx)("span",{className:"mono text-[10px] uppercase tracking-[0.14em] text-safe border border-safe px-1.5 py-[2px]",children:"Current"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-[30px] font-medium tracking-[-0.02em] text-ink-950 tabular-nums",children:o.amount}),(0,t.jsx)("span",{className:"ml-2 mono text-[11px] uppercase tracking-[0.14em] text-ink-400",children:o.cadence})]}),(0,t.jsx)("p",{className:"mt-4 text-[16px] leading-[1.55] text-ink-700 max-w-[480px]",children:O[n]}),(0,t.jsxs)("ul",{className:"mt-6 grid grid-cols-1 sm:grid-cols-2 gap-x-12 gap-y-2",children:[A[n].map(e=>(0,t.jsxs)("li",{className:"mono text-[12px] text-ink-700 leading-[1.55]",children:["· ",e]},e)),"pro"===n&&(0,t.jsxs)("li",{className:"flex items-center gap-2 text-[14px] text-ink-700",children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsx)("span",{children:"Chrome extension included"}),(0,t.jsx)("a",{href:j.CHROME_EXTENSION_URL,target:"_blank",rel:"noopener noreferrer",className:"text-[12px] text-ink-400 hover:text-ink-950 underline",children:"install"})]})]}),(0,t.jsx)("button",{onClick:()=>L(n),disabled:a.disabled||y===n,className:(0,i.cn)("mt-8 mono text-[12px] uppercase tracking-[0.14em] font-medium h-12 w-full transition-colors active:translate-y-px disabled:cursor-not-allowed disabled:opacity-40",a.primary?"bg-ink-950 text-paper hover:bg-ink-700 border border-ink-950":"bg-transparent text-ink-700 border border-ink-200 hover:border-ink-950 hover:text-ink-950"),children:y===n?"Redirectingâ¦":a.label})]},n)})}),(0,t.jsxs)("div",{className:"mt-12 grid grid-cols-1 sm:grid-cols-3 gap-6 border-t border-ink-100 pt-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mono text-[10px] uppercase tracking-[0.14em] text-ink-400 mb-1",children:"Cancel Anytime"}),(0,t.jsx)("p",{className:"text-[14px] text-ink-700 leading-[1.55]",children:"No contracts. Cancel from your dashboard in one click."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mono text-[10px] uppercase tracking-[0.14em] text-ink-400 mb-1",children:"Secure Payments"}),(0,t.jsx)("p",{className:"text-[14px] text-ink-700 leading-[1.55]",children:"Processed by Stripe. We never see or store your card details."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mono text-[10px] uppercase tracking-[0.14em] text-ink-400 mb-1",children:"Privacy-First"}),(0,t.jsx)("p",{className:"text-[14px] text-ink-700 leading-[1.55]",children:"Scanned content is never stored. Only anonymized metadata for detection."})]})]}),U>0&&(0,t.jsx)("div",{className:"mt-12 border-l-2 border-ink-300 pl-6 py-3",children:(0,t.jsxs)("p",{className:"text-[14px] text-ink-700 leading-[1.55]",children:["Manage your payment method, view invoices, or cancel anytime from your"," ",(0,t.jsx)(k.Link,{href:"/billing",className:"link-un
1derline text-ink-950",children:"billing page"}),"."]})})]})}),d&&(0,t.jsx)(m,{currentPlan:T,targetPlan:d,periodEnd:c,onClose:()=>u(null),onSuccess:e=>{u(null),b(e)}}),p&&(0,t.jsx)(f,{currentPlan:T,targetPlan:p,currentPrice:P[T]??0,targetPrice:P[p]??0,periodEnd:c,onClose:()=>h(null),onSuccess:()=>h(null)}),(0,t.jsx)(v,{plan:I,onClose:()=>R(null)})]})}],58666)},31878,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(75157);let a=[{q:"Can I cancel anytime?",a:"Yes. Cancel from your billing dashboard at any time â one click, no hoops. Your benefits continue through the end of the current billing period."},{q:"What payment methods do you accept?",a:"All major credit cards via Stripe. We never store your payment details on our servers."},{q:"What happens when I reach my limit?",a:"Free users get five scans per day, resetting at midnight UTC. Pro users get 200 scans per month. If you hit the limit, you can upgrade instantly â no data is lost."},{q:"Is my data private?",a:"Yes. We never store the content you scan. Only anonymized metadata is kept to improve our detection. We are privacy-first by design â see our Privacy Policy for details."},{q:"Can I switch between plans?",a:"Yes. Upgrades take effect immediately, prorated. Downgrades take effect at the end of your current billing period â no benefits are lost early."},{q:"Do I need an account to use IsThisAScam?",a:"No. The free tier works instantly with no signup. You only need an account if you upgrade to Pro for scan history and the Chrome extension."},{q:"How accurate is the detection?",a:"Our 6-layer engine cross-references 70+ threat databases, checks domain intelligence, verifies email authentication, and runs AI analysis. No single-point-of-failure â if one layer misses something, the others catch it."}];e.s(["default",0,function(){let[e,i]=(0,n.useState)(null);return(0,t.jsx)("section",{className:"px-6 py-24 md:py-32 border-t border-ink-100",children:(0,t.jsx)("div",{className:"max-w-[840px] mx-auto",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-x-12 gap-y-12",children:[(0,t.jsxs)("div",{className:"md:col-span-4",children:[(0,t.jsx)("div",{className:"label-classification mb-6",children:"Questions"}),(0,t.jsx)("h2",{className:"text-[28px] sm:text-[36px] font-medium tracking-[-0.03em] leading-[1.1] text-ink-950 mb-4",children:"Things people ask before paying."}),(0,t.jsxs)("p",{className:"text-[16px] leading-[1.55] text-ink-700 max-w-[36ch]",children:["Don't see your question? Email"," ",(0,t.jsx)("a",{href:"mailto:[email protected]",className:"link-underline text-ink-950 mono text-[13px]",children:"[email protected]"}),"."]})]}),(0,t.jsx)("div",{className:"md:col-span-8",children:(0,t.jsx)("div",{className:"border-t border-ink-100",children:a.map((n,a)=>(0,t.jsxs)("div",{className:"border-b border-ink-100",children:[(0,t.jsxs)("button",{onClick:()=>i(e===a?null:a),className:"w-full py-6 flex items-baseline justify-between gap-6 text-left group",children:[(0,t.jsx)("span",{className:"text-[16px] font-medium text-ink-950 tracking-[-0.01em]",children:n.q}),(0,t.jsx)("span",{className:(0,r.cn)("mono text-[14px] text-ink-400 transition-transform shrink-0",e===a&&"rotate-45"),children:"+"})]}),e===a&&(0,t.jsx)("div",{className:"pb-6 text-[16px] text-ink-700 leading-[1.55] max-w-[58ch] animate-fade-in",children:n.a})]},a))})})]})})})}])}]);
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.