1(() => { 2 var __getOwnPropNames = Object.getOwnPropertyNames; 3 var __commonJS = (cb, mod) => function __require() { 4 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 5 }; 6 var require_public_pricing = __commonJS({ 7 "assets/js/public-pricing.jsx"() { 8 const { useState, useEffect } = React; 9 const PUBLIC_FREE_API_RATE_LIMITS = { 10 starter: 20, 11 growth: 50, 12 pro: 100, 13 ultra: 300 14 }; 15 const PUBLIC_FREE_API_RATE_LIMIT_DEFAULT = 2; 16 const PublicPlansSection = ({ 17 activeTab, 18 setActiveTab, 19 selectedPlan, 20 setSelectedPlan, 21 selectedPayg, 22 setSelectedPayg, 23 isAnnual, 24 setIsAnnual, 25 plans, 26 paygPlans 27 }) => { 28 const calculateCostPerCredit = (price, credits) => { 29 const priceNum = parseFloat(price.replace("$", "").replace(",", "")); 30 const creditsNum = parseFloat(credits.replace(/,/g, "")); 31 const costPerCredit = priceNum / creditsNum; 32 if (costPerCredit < 0.01) { 33 return costPerCredit.toFixed(5); 34 } else if (costPerCredit < 0.1) { 35 return costPerCredit.toFixed(4); 36 } else { 37 return costPerCredit.toFixed(2); 38 } 39 }; 40 const calculateCPM = (price, credits) => { 41 const priceNum = parseFloat(price.replace("$", "").replace(",", "")); 42 const creditsNum = parseFloat(credits.replace(",", "")); 43 return (priceNum / creditsNum * 1e3).toFixed(2); 44 }; 45 const calculateCapabilityUses = (credits, creditCost) => { 46 const creditsNum = parseFloat(credits.replace(",", "")); 47 return Math.floor(creditsNum / creditCost).toLocaleString(); 48 }; 49 const getCurrentPlanDetails = () => { 50 if (activeTab === "subscription") { 51 const plan = plans[selectedPlan] || plans["starter"]; 52 if (!plan) { 53 return { 54 name: "Starter", 55 monthlyPrice: "$49", 56 annualPrice: "$588", 57 monthlyCredits: "4,000", 58 annualCredits: "4,800", 59 displayPrice: "$49", 60 displayCredits: "4,000", 61 credits: "4,000", 62 costPerCredit: "0.0123", 63 cpm: "12.30" 64 }; 65 } 66 const displayPrice = isAnnual ? plan.annualPrice : plan.monthlyPrice; 67 const displayCredits = isAnnual ? plan.annualCredits : plan.monthlyCredits; 68 if (displayPrice === "Contact Sales" || displayCredits === "Custom") { 69 return { 70 ...plan, 71 displayPrice, 72 displayCredits, 73 credits: displayCredits, 74 costPerCredit: "Contact Sales", 75 cpm: "Contact Sales" 76 }; 77 } 78 const costPerCredit = calculateCostPerCredit(displayPrice, displayCredits); 79 const cpm = calculateCPM(displayPrice, displayCredits); 80 return { ...plan, displayPrice, displayCredits, credits: displayCredits, costPerCredit, cpm }; 81 } else { 82 const plan = paygPlans[selectedPayg] || paygPlans["3788"]; 83 if (!plan) { 84 return { 85 price: "$100", 86 credits: "3,788", 87 costPerCredit: "0.0264", 88 cpm: "26.40" 89 }; 90 } 91 const costPerCredit = calculateCostPerCredit(plan.price, plan.credits); 92 const cpm = calculateCPM(plan.price, plan.credits); 93 return { ...plan, costPerCredit, cpm }; 94 } 95 }; 96 const currentPlan = getCurrentPlanDetails(); 97 return /* @__PURE__ */ React.createElement("div", { className: "bg-white border border-zinc-200 rounded-2xl shadow-sm overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "bg-gradient-to-r from-purple-600 to-purple-700 text-white px-6 py-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-center gap-3 text-center sm:text-left" }
97, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 20 20" }, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" })), /* @__PURE__ */ React.createElement("span", { className: "font-semibold text-lg" }, "Start with a 3-Day Free Trial")), /* @__PURE__ */ React.createElement("span", { className: "text-purple-100" }, "\u2022"), /* @__PURE__ */ React.createElement("span", { className: "text-sm" }, "10 credits included \u2022 All features unlocked \u2022 No credit card required"))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col lg:flex-row" }, /* @__PURE__ */ React.createElement("div", { className: "w-full lg:w-2/3 border-r border-zinc-200" }, /* @__PURE__ */ React.createElement("div", { className: "flex border-b border-zinc-200" }, /* @__PURE__ */ React.createElement( 98 "button", 99 { 100 onClick: () => setActiveTab("subscription"), 101 className: `w-1/2 py-4 px-6 text-center font-medium focus:outline-none transition-colors duration-150 ease-in-out ${activeTab === "subscription" ? "bg-purple-50 text-purple-700 border-b-2 border-purple-500" : "text-zinc-600 hover:text-zinc-900"}` 102 },
103 /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "font-medium" }, "Annual Subscription"), /* @__PURE__ */ React.createElement("div", { className: "text-xs mt-1 font-normal opacity-75" }, isAnnual ? "Credits issued immediately, expire in a year" : "Monthly credits issued monthly, expire every month")) 104 ), /* @__PURE__ */ React.createElement( 105 "button", 106 { 107 onClick: () => setActiveTab("payg"), 108 className: `w-1/2 py-4 px-6 text-center font-medium focus:outline-none transition-colors duration-150 ease-in-out ${activeTab === "payg" ? "bg-purple-50 text-purple-700 border-b-2 border-purple-500" : "text-zinc-600 hover:text-zinc-900"}` 109 }, 110 /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "font-medium" }, "Pay As You Go"), /* @__PURE__ */ React.createElement("div", { className: "text-xs mt-1 font-normal opacity-75" }, "90-day validity for packs shown (extends with purchases)"))
111 )), /* @__PURE__ */ React.createElement("div", { className: "p-6 lg:p-8" }, activeTab === "subscription" ? /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center mb-8 space-x-3 flex-wrap" }, /* @__PURE__ */ React.createElement("span", { className: `text-xs sm:text-sm text-center transition-colors duration-200 ${isAnnual ? "text-zinc-500" : "text-zinc-900 font-medium"}` }, /* @__PURE__ */ React.createElement("span", { className: "hidden xl:inline" }, "Annual plan, Paid monthly"), /* @__PURE__ */ React.createElement("span", { className: "xl:hidden" }, "Annual plan,", /* @__PURE__ */ React.createElement("br", null), "Paid monthly")), /* @__PURE__ */ React.createElement( 112 "button", 113 { 114 className: `relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2 ${isAnnual ? "bg-purple-600" : "bg-zinc-200"}`, 115 onClick: () => setIsAnnual(!isAnnual) 116 },
117 /* @__PURE__ */ React.createElement( 118 "span", 119 { 120 className: `pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out ${isAnnual ? "translate-x-5" : "translate-x-0"}` 121 } 122 ) 123 ), /* @__PURE__ */ React.createElement("span", { className: `text-xs sm:text-sm text-center transition-colors duration-200 ${isAnnual ? "text-zinc-900 font-medium" : "text-zinc-500"}` }, /* @__PURE__ */ React.createElement("span", { className: "hidden xl:inline" }, "Annual plan, Paid annually", " ", /* @__PURE__ */ React.createElement("span", { className: "inline-block px-2 py-1 text-xs font-semibold bg-emerald-100 text-emerald-700 rounded-full" }, "+2 MONTHS FREE CREDITS")), /* @__PURE__ */ React.createElement("span", { className: "xl:hidden" }, "Annual plan,", /* @__PURE__ */ React.createElement("br", null), "Paid annually", /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("span", { className: "inline-block mt-1 px-2 py-1 text-xs font-semibold bg-emerald-100 text-emerald-700 rounded-full" }, "+2 MONTHS FREE CREDITS")))), /* @__PURE__ */ React.createElement("div", { className: "rounded-xl border border-zinc-200 overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React.createElement("table", { className: "min-w-full divide-y divide-zinc-200 bg-white" }, /* @__PURE__ */ React.createElement("thead", { className: "bg-zinc-50" }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider" }, "Plan"), /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider font-bold" }, "Price"), /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider" }, "Credits/mo"), /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider" }, "Cost/Credit"))), /* @__PURE__ */ React.createElement("tbody", { className: "divide-y divide-zinc-200" }, Object.entries(plans).map(([planKey, plan]) => { 124 const displayPrice = isAnnual ? plan.annualPrice : plan.monthlyPrice; 125 const displayCredits = isAnnual ? plan.annualCredits : plan.monthlyCredits; 126 const costPerCredit = calculateCostPerCredit(displayPrice, displayCredits); 127 return /* @__PURE__ */ React.createElement( 128 "tr", 129 { 130 key: planKey, 131 onClick: () => setSelectedPlan(planKey), 132 className: `transition-colors ${selectedPlan === planKey ? "bg-purple-50" : "cursor-pointer hover:bg-purple-50/50"}` 133 },
134 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-sm font-medium ${selectedPlan === planKey ? "text-purple-800" : "text-zinc-900"}` }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React.createElement("span", null, plan.name), planKey === "growth" && /* @__PURE__ */ React.createElement("span", { className: "ml-2 text-xs font-semibold text-emerald-700" }, "(Popular)"))), 135 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-lg font-bold ${selectedPlan === planKey ? "text-purple-800" : "text-zinc-900"}` }, planKey === "enterprise" ? "Contact Sales" : /* @__PURE__ */ React.createElement(React.Fragment, null, displayPrice, isAnnual ? /* @__PURE__ */ React.createElement("span", { className: "text-sm font-normal text-zinc-500 ml-1" }, "/ yr") : /* @__PURE__ */ React.createElement("span", { className: "text-sm font-normal text-zinc-500 ml-1" }, "/ mo"))), 136 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-sm ${selectedPlan === planKey ? "text-purple-800 font-medium" : "text-zinc-900"}` }, planKey === "enterprise" ? "Custom" : displayCredits),
137 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-sm ${selectedPlan === planKey ? "text-purple-800 font-medium" : "text-zinc-900"}` }, planKey === "enterprise" ? "Contact Sales" : `$${costPerCredit}`) 138 ); 139 })))))) : /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "rounded-xl border border-zinc-200 overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "overflow-x-auto" }, /* @__PURE__ */ React.createElement("table", { className: "min-w-full divide-y divide-zinc-200 bg-white" }, /* @__PURE__ */ React.createElement("thead", { className: "bg-zinc-50" }, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider" }, "Credits"), /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider" }, "Cost/Credit"), /* @__PURE__ */ React.createElement("th", { scope: "col", className: "px-6 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider font-bold" }, "Price"))), /* @__PURE__ */ React.createElement("tbody", { className: "divide-y divide-zinc-200" }, Object.entries(paygPlans).map(([key, plan]) => { 140 const costPerCredit = calculateCostPerCredit(plan.price, plan.credits); 141 return /* @__PURE__ */ React.createElement( 142 "tr", 143 { 144 key, 145 onClick: () => setSelectedPayg(key), 146 className: `cursor-pointer hover:bg-purple-50/50 transition-colors ${selectedPayg === key ? "bg-purple-50" : ""}` 147 },
148 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-sm font-medium ${selectedPayg === key ? "text-purple-800" : "text-zinc-900"}` }, plan.credits), 149 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-sm ${selectedPayg === key ? "text-purple-700" : "text-zinc-600"}` }, "$", costPerCredit), 150 /* @__PURE__ */ React.createElement("td", { className: `px-6 py-4 whitespace-nowrap text-lg font-bold ${selectedPayg === key ? "text-purple-800" : "text-zinc-900"}` }, plan.price) 151 ); 152 })))))))), /* @__PURE__ */ React.createElement("div", { className: "bg-zinc-50/50 lg:w-1/3 flex" }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col w-full min-h-full p-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex-1 pb-6" }, activeTab === "subscription" ? /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800 mb-6" }, currentPlan.name), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline" }, /* @__PURE__ */ React.createElement("span", { className: "text-4xl font-bold text-zinc-900" }, currentPlan.displayPrice), currentPlan.displayPrice !== "Contact Sales" && /* @__PURE__ */ React.createElement("span", { className: "ml-1 text-lg text-zinc-600" }
152, isAnnual ? "/ yr" : "/ mo")), /* @__PURE__ */ React.createElement("span", { className: "text-sm text-zinc-600 mt-1" }, currentPlan.displayPrice === "Contact Sales" ? "Custom enterprise pricing" : isAnnual ? "Annual plan, paid annually" : "Annual plan, paid monthly"))), /* @__PURE__ */ React.createElement("div", { className: "space-y-3 mt-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-coin w-5 h-5 mr-3 text-purple-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm font-medium" }, currentPlan.displayCredits === "Custom" ? "Custom credit volume" : `${currentPlan.displayCredits} credits`, isAnnual && currentPlan.displayCredits !== "Custom" && currentPlan.monthlyCredits !== "Custom" && /* @__PURE__ */ React.createElement("span", { className: "text-emerald-600 ml-1" }, "(+", Math.floor(parseInt(currentPlan.monthlyCredits.replace(/,/g, "")) * 0.2).toLocaleString(), " bonus)"), currentPlan.displayCredits !== "Custom" && /* @__PURE__ */ React.createElement("span", { className: "text-zinc-500 font-normal" }, " ", isAnnual ? "/ yr" : "/ mo"))), /* @__PURE__ */ React.createElement("div", { className: "border-t border-zinc-200 pt-3" }, /* @__PURE__ */ React.createElement("h5", { className: "text-xs font-semibold text-zinc-700 uppercase tracking-wider mb-3" }, "What's included"), (() => { 153 const COSTS = window.PublicPricingConfig && window.PublicPricingConfig.CONFIG.CREDIT_COSTS || {}; 154 const isEnterprise = selectedPlan === "enterprise"; 155 const periodSuffix = isAnnual ? " / yr" : " / mo"; 156 const cap = (cost) => isEnterprise ? "Custom" : `~${calculateCapabilityUses(currentPlan.displayCredits, cost)}`; 157 const rateLimit = isEnterprise ? "Custom" : `${PUBLIC_FREE_API_RATE_LIMITS[selectedPlan] || PUBLIC_FREE_API_RATE_LIMIT_DEFAULT} req/min`; 158 const rows = [ 159 [COSTS.CUSTOMER_LISTING_PER_RESULT || 2, "customer rows"], 160 [COSTS.COMPANY_DETAILS || 3, "company profiles"], 161 [COSTS.COMPANY_FUNDING_BASE || 2, "company funding lookups"], 162 [COSTS.COMPANY_UPDATES || 2, "company update fetches"], 163 [COSTS.COMPETITOR_LISTING_MIN || 5, "competitor lookups"], 164 [COSTS.PERSON_PROFILE || 3, "person profiles"], 165 [COSTS.EMPLOYEE_SEARCH_BASE || 2, "employee searches"],
166 [COSTS.WORK_EMAIL_HIT || 2, "work-email lookups"] 167 ]; 168 return /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, rows.map(([cost, label]) => /* @__PURE__ */ React.createElement("div", { key: label, className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-check w-4 h-4 mr-3 text-green-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, cap(cost), " ", label, periodSuffix))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-gauge w-4 h-4 mr-3 text-blue-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, "Free endpoint rate limit: ", /* @__PURE__ */ React.createElement("strong", null, rateLimit))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-envelope-simple w-4 h-4 mr-3 text-purple-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, "Supportive for Gmail", /* @__PURE__ */ React.createElement("span", { className: "ml-2 px-1.5 py-0.5 text-[10px] font-bold bg-purple-100 text-purple-700 rounded-full uppercase tracking-wider" }, "Included"))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-headset w-4 h-4 mr-3 text-green-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, isEnterprise ? "Priority support" : "Standard support")), /* @__PURE__ */ React.createElement("div", { className: "flex items-start text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-warning w-4 h-4 mr-3 mt-0.5 text-amber-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, "Credits expire at the end of each billing period")), /* @__P
168URE__ */ React.createElement("p", { className: "text-xs text-zinc-500 leading-relaxed pt-1" }, "Credits are shared across products - each row is the maximum if you spent every credit on that one product.")); 169 })()))) : /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", { className: "text-center" }, /* @__PURE__ */ React.createElement("div", { className: "inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-purple-100 text-purple-800 mb-6" }, "Pay As You Go"), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center mb-2" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-baseline" }, /* @__PURE__ */ React.createElement("span", { className: "text-4xl font-bold text-zinc-900" }, currentPlan.price)), /* @__PURE__ */ React.createElement("span", { className: "text-sm text-zinc-600 mt-1" }, "One-time payment \xB7 ", currentPlan.validity || "90 days", " validity"))), /* @__PURE__ */ React.createElement("div", { className: "space-y-3 mt-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-coin w-5 h-5 mr-3 text-purple-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", { className: "text-sm font-medium" }, currentPlan.credits, " credits total")), /* @__PURE__ */ React.createElement("div", { className: "border-t border-zinc-200 pt-3" }, /* @__PURE__ */ React.createElement("h5", { className: "text-xs font-semibold text-zinc-700 uppercase tracking-wider mb-3" }, "What's included"), (() => { 170 const COSTS = window.PublicPricingConfig && window.PublicPricingConfig.CONFIG.CREDIT_COSTS || {}; 171 const cap = (cost) => `~${calculateCapabilityUses(currentPlan.credits, cost)}`; 172 const rows = [ 173 [COSTS.CUSTOMER_LISTING_PER_RESULT || 2, "customer rows"], 174 [COSTS.COMPANY_DETAILS || 3, "company profiles"], 175 [COSTS.COMPANY_FUNDING_BASE || 2, "company funding lookups"], 176 [COSTS.COMPANY_UPDATES || 2, "company update fetches"], 177 [COSTS.COMPETITOR_LISTING_MIN || 5, "competitor lookups"], 178 [COSTS.PERSON_PROFILE || 3, "person profiles"], 179 [COSTS.EMPLOYEE_SEARCH_BASE || 2, "employee searches"],
180 [COSTS.WORK_EMAIL_HIT || 2, "work-email lookups"] 181 ]; 182 return /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, rows.map(([cost, label]) => /* @__PURE__ */ React.createElement("div", { key: label, className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-check w-4 h-4 mr-3 text-green-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, cap(cost), " ", label, " per pack"))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-clock w-4 h-4 mr-3 text-blue-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, currentPlan.validity || "90 days", " validity")), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-700" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-gauge w-4 h-4 mr-3 text-blue-500 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, "Free endpoint rate limit: ", /* @__PURE__ */ React.createElement("strong", null, PUBLIC_FREE_API_RATE_LIMIT_DEFAULT, " req/min"))), /* @__PURE__ */ React.createElement("div", { className: "flex items-center text-sm text-zinc-500" }, /* @__PURE__ */ React.createElement("i", { className: "ph-bold ph-x-circle w-4 h-4 mr-3 text-zinc-400 flex-shrink-0" }), /* @__PURE__ */ React.createElement("span", null, "Supportive for Gmail", /* @__PURE__ */ React.createElement("span", { className: "ml-2 px-1.5 py-0.5 text-[10px] font-bold bg-zinc-200 text-zinc-600 rounded-full uppercase tracking-wider" }, "Subscription only"))), /* @__PURE__ */ React.createElement("p", { className: "text-xs text-zinc-500 leading-relaxed pt-1" }, "Credits are shared across products - each row is the maximum if you spent every credit on that one product.")); 183 })())))), /* @__PURE__ */ React.createElement("a", { href: "/auth/register", className: "block w-full px-4 py-3 text-sm font-medium text-white bg-purple-600 rounded-xl hover:bg-purple-700 transition-colors mt-8 lg:mt-auto text-center" }, "Start Now"))))); 184 }; 185 const PublicPricingApp = () => { 186 const config = window.PublicPricingConfig; 187 const plans = config.getPlans(); 188 const paygPlans = config.getPaygPlans(); 189 const uiConstants = config.getUIConstants(); 190 const [activeTab, setActiveTab] = useState("subscription"); 191 const [selectedPlan, setSelectedPlan] = useState(uiConstants.DEFAULT_SELECTED_PLAN); 192 const [selectedPayg, setSelectedPayg] = useState(uiConstants.DEFAULT_SELECTED_PAYG); 193 const [isAnnual, setIsAnnual] = useState(uiConstants.DEFAULT_IS_ANNUAL); 194 return /* @__PURE__ */ React.createElement("div", { className: "max-w-7xl mx-auto mt-16" }, /* @__PURE__ */ React.createElement("div", { className: "max-w-5xl mx-auto" }, /* @__PURE__ */ React.createElement( 195 PublicPlansSection, 196 { 197 activeTab,
198 setActiveTab, 199 selectedPlan, 200 setSelectedPlan, 201 selectedPayg, 202 setSelectedPayg, 203 isAnnual, 204 setIsAnnual, 205 plans, 206 paygPlans 207 } 208 ))); 209 }; 210 function mountReactApp() { 211 console.log("Attempting to mount React app"); 212 if (typeof React === "undefined") { 213 console.error("React is not loaded!"); 214 return false; 215 } 216 if (typeof ReactDOM === "undefined") { 217 console.error("ReactDOM is not loaded!"); 218 return false; 219 } 220 if (typeof window.PublicPricingConfig === "undefined") { 221 console.error("PublicPricingConfig is not loaded!"); 222 return false; 223 } 224 const root = document.getElementById("pricing-react-root"); 225 if (root) { 226 console.log("Found root element, mounting app"); 227 try { 228 if (ReactDOM.createRoot) { 229 console.log("Using React 18 createRoot API"); 230 const reactRoot = ReactDOM.createRoot(root); 231 reactRoot.render(/* @__PURE__ */ React.createElement(PublicPricingApp, null)); 232 } else { 233 console.log("Using legacy ReactDOM.render API"); 234 ReactDOM.render(/* @__PURE__ */ React.createElement(PublicPricingApp, null), root); 235 } 236 console.log("React app mounted successfully"); 237 return true; 238 } catch (error) { 239 console.error("Error mounting React app:", error); 240 return false; 241 } 242 } else { 243 console.error("Could not find pricing-react-root element"); 244 return false; 245 } 246 } 247 let retryCount = 0; 248 const maxRetries = 50; 249 function initializeApp() { 250 if (document.readyState === "loading") { 251 document.addEventListener("DOMContentLoaded", initializeApp); 252 return; 253 } 254 console.log("DOM ready, checking if we can mount app", `(attempt ${retryCount + 1})`); 255 if (typeof React === "undefined" || typeof ReactDOM === "undefined") { 256 if (retryCount < maxRetries) { 257 console.log("React not ready yet, retrying in 100ms..."); 258 retryCount++; 259 setTimeout(initializeApp, 100); 260 return; 261 } else { 262 console.error("React failed to load after maximum retries"); 263 showFallbackMessage("React libraries failed to load"); 264 return; 265 } 266 } 267 if (typeof window.PublicPricingConfig === "undefined") { 268 if (retryCount < maxRetries) { 269 console.log("PublicPricingConfig not ready yet, retrying in 50ms..."); 270 retryCount++; 271 setTimeout(initializeApp, 50); 272 return; 273 } else { 274 console.error("PublicPricingConfig failed to load after maximum retries"); 275 showFallbackMessage("Pricing configuration failed to load"); 276 return; 277 } 278 } 279 if (!mountReactApp()) { 280 showFallbackMessage("Failed to mount pricing table"); 281 } 282 } 283 function showFallbackMessage(reason) { 284 const root = document.getElementById("pricing-react-root"); 285 if (root) { 286 root.innerHTML = ` 287 <div class="bg-yellow-50 border border-yellow-200 rounded-lg p-6 text-center"> 288 <div class="text-yellow-800 mb-2"> 289 <svg class="mx-auto h-8 w-8 mb-2" fill="currentColor" viewBox="0 0 20 20"> 290 <path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/> 291 </svg> 292 </div> 293 <h3 class="text-lg font-medium text-yellow-800 mb-2">Pricing Table Loading Issue</h3> 294 <p class="text-yellow-700 text-sm mb-4">${reason}. Please refresh the page or contact support if the issue persists.</p> 295 <button onclick="location.reload()" class="px-4 py-2 bg-yellow-600 text-white rounded-lg hover:bg-yellow-700 transition-colors"> 296 Refresh Page 297 </button> 298 </div> 299 `; 300 } 301 } 302 initializeApp(); 303 } 304 }); 305 require_public_pricing(); 306})(); 307//# sourceMappingURL=public-pricing.js.map
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.