PageSourceSearch

https://pdftoofxconverter.com/build/assets/Credits-CE3kvKnl.js

js pdftoofxconverter.com collected 2026-09-24 14:50:12 UTC 9,387 bytes, 18 lines download raw bytes

1import{r as j,j as e,C as L,a as w,b as y,A as S,c as o,F as u,B as v}from"./bootstrap-vendor-BVnlr3j0.js";import{H as B,D as T,b as F}from"./app-XqWmSGGq.js";import{A}from"./AppLayout-C1D-6Vug.js";import{a3 as C,I as N,y as G,O as U,E as O,o as V}from"./icons-vendor-C9Abni-h.js";import{_ as r}from"./Footer-DP5Vhz1J.js";/* empty css            */var q="v3",H=function(s){return s===3?"v3":s},k="https://js.stripe.com",J="".concat(k,"/v3"),W=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,X=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var M=function(s){return W.test(s)||X.test(s)},Y=function(){for(var s=document.querySelectorAll('script[src^="'.concat(k,'"]')),t=0;t<s.length;t++){var a=s[t];if(M(a.src))return a}return null},_=function(s){var t="",a=document.createElement("script");a.src="".concat(J).concat(t);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(a),a},$=function(s,t){!s||!s._registerWrapper||s._registerWrapper({name:"stripe-js",version:"5.10.0",startTime:t})},h=null,f=null,b=null,z=function(s){return function(t){s(new Error("Failed to load Stripe.js",{cause:t}))}},D=function(s,t){return function(){window.Stripe?s(window.Stripe):t(new Error("Stripe.js not available"))}},K=function(s){return h!==null?h:(h=new Promise(function(t,a){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var i=Y();if(!(i&&s)){if(!i)i=_(s);else if(i&&b!==null&&f!==null){var c;i.removeEventListener("load",b),i.removeEventListener("error",f),(c=i.parentNode)===null||c===void 0||c.removeChild(i),i=_(s)}}b=D(t,a),f=z(a),i.addEventListener("load",b),i.addEventListener("error",f)}catch(l){a(l);return}}),h.catch(function(t){return h=null,Promise.reject(t)}))},Q=function(s,t,a){if(s===null)return null;var i=t[0],c=i.match(/^pk_test/),l=H(s.version),p=q;c&&l!==p&&console.warn("Stripe.js@".concat(l," was loaded on the page, but @stripe/stripe-js@").concat("5.10.0"," expected Stripe.js@").concat(p,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var d=s.apply(void 0,t);return $(d,a),d},x,E=!1,P=function(){return x||(x=K(null).catch(function(s){return x=null,Promise.reject(s)}),x)};Promise.resolve().then(function(){return P()}).catch(function(n){E||console.warn(n)});var Z=function(){for(var s=arguments.length,t=new Array(s),a=0;a<s;a++)t[a]=arguments[a];E=!0;var i=Date.now();return P().then(function(c){return Q(c,t,i)})};function ce({auth:n}){const[s,t]=j.useState("10"),[a,i]=j.useState(""),[c,l]=j.useState(!1),[p,d]=j.useState(""),R=.5,I=async()=>{if(!n.user){window.location.href="/login";return}if(s==="custom"&&(!a||isNaN(a)||a<=0)){d(r("credits.error.validation"));return}l(!0),d("");try{const m=parseInt(s==="custom"?a:s),g=await F.post("/create-stripe-session",{credits:m});g.data.sessionId?await(await Z("pk_live_51Qgdv7KCGc9yRQcpjJuMXnhjOZXjMaBmFuBLBfErBhcsIZSdbNb6HbBc3ENws6RgPrMH0qpjlI7KyrY15aYqP3WC00Nla0D1BY")).redirectToCheckout({sessionId:g.data.sessionId}):d(r("credits.error.checkout"))}catch(m){d(m.response?.data?.message||r("credits.error.generic"))}finally{l(!1)}};return e.jsxs(A,{title:r("credits.meta.title"),description:r("credits.meta.description"),children:[e.jsx(B,{title:r("credits.page.title")}),e.jsx("section",{className:"credits-section py-5",children:e.jsxs(L,{children:[e.jsx(w,{className:"justify-content-center mb-5",children:e.jsxs(y,{lg:8,className:"text-center",children:[e.jsx("h1",{className:"display-4 fw-bold mb-3",children:r("credits.page.title")}),e.jsx("p",{className:"lead text-muted",children:r("credits.page.subtitle")})]})}),e.jsx(w,{className:"justify-content-center",children:e.jsxs(y,{lg:6,children:[p&&e.jsxs(S,{variant:"danger",className:"mb-4",children:[e.jsx(C,{className:"me-2"}),p]}),e.jsx(o,{className:"border-0 shadow-sm",children:e.jsx(o.Body,{className:"p-4",children:e.jsxs("div",{className:"credit-packages",children:[e.jsx(o,{className:`mb-3 cursor-pointer ${s==="10"?"border-primary":""}`,onClick:()=>{t("10"),i("")},children:e.jsx(o.Body,{children:e.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-1",children:r("credits.packages.popular.title")}),e.jsx("p",{className:"text-muted mb-0",children:r("credits.packages.popular.subtitle")})]}),e.jsxs("div",{className:"text-end",children:[e.jsx("h4",{className:"mb-0",children:r("credits.packages.popular.price")}),e.jsx("small",{className:"text-muted",children:r("credits.packages.popular.per_credit")})]}),e.jsx(u.Check,{type:"radio",checked:s==="10",onChange:()=>{}})]})})}),e.jsx(o,{className:`mb-3 cursor-pointer ${s==="20"?"border-primary":""}`,onClick:()=>{t("20"),i("")},children:e.jsxs(o.Body,{children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-1",children:r("credits.packages.best_value.title")}),e.jsx("p",{className:"text-muted mb-0",children:r("credits.packages.best_value.subtitle")})]}),e.jsxs("div",{className:"text-end",children:[e.jsx("h4",{className:"mb-0",children:r("credits.packages.best_value.price")}),e.jsx("small",{className:"text-muted",children:r("credits.packages.best_value.per_credit")})]}),e.jsx(u.Check,{type:"radio",checked:s==="20",onChange:()=>{}})]}),s==="20"&&e.jsx(S,{variant:"info",className:"mt-3 mb-0",children:e.jsx("div",{className:"d-flex flex-column gap-3",children:e.jsxs("div",{className:"d-flex align-items-start",children:[e.jsx(C,{className:"text-primary me-2 mt-1"}),e.jsxs("div",{children:[e.jsx("h6",{className:"mb-1",children:r("credits.starter_promo.title")}),e.jsx("p",{className:"text-muted mb-2",children:r("credits.starter_promo.description")}),e.jsxs("div",{className:"comparison-table mb-3",children:[e.jsxs("div",{className:"d-flex justify-content-between mb-2 border-bottom pb-2",children:[e.jsx("span",{className:"text-muted",children:r("credits.starter_promo.comparison.credits")}),e.jsx("span",{className:"fw-bold",children:r("credits.starter_promo.comparison.credits_value")})]}),e.jsxs("div",{className:"d-flex justify-content-between mb-2",children:[e.jsx("span",{className:"text-muted",children:r("credits.starter_promo.comparison.starter")}),e.jsx("span",{className:"fw-bold text-primary",children:r("credits.starter_promo.comparison.starter_value")})]})]}),e.jsxs("div",{className:"benefits mb-3",children:[e.jsxs("div",{className:"d-flex align-items-center mb-2",children:[e.jsx(N,{className:"text-success me-2"}),e.jsx("span",{children:r("credits.starter_promo.benefits.pages")})]}),e.jsxs("div",{className:"d-flex align-items-center mb-2",children:[e.jsx(N,{className:"text-success me-2"}),e.jsx("span",{children:r("credits.starter_promo.benefits.batch")})]}),e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx(N,{className:"text-success me-2"}),e.jsx("span",{children:r("credits.starter_promo.benefits.support")})]})]}),e.jsxs(v,{variant:"primary",size:"sm",className:"w-100",onClick:m=>{m.stopPropagation(),window.location.href="/pricing"},children:[e.jsx(G,{className:"me-2"}),r("credits.starter_promo.cta")]})]})]})})})]})}),e.jsx(o,{className:`mb-4 cursor-pointer ${s==="custom"?"border-primary":""}`,onClick:()=>t("custom"),children:e.jsxs(o.Body,{children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center mb-3",children:[e.jsxs("div",{children:[e.jsx("h5",{className:"mb-1",children:r("credits.packages.custom.title")}),e.jsx("p",{className:"text-muted mb-0",children:r("credits.packages.custom.subtitle")})]}),e.jsx(u.Check,{type:"radio",checked:s==="custom",onChange:()=>{}})]}),s==="custom"&&e.jsxs(u.Group,{children:[e.jsx(u.Control,{type:"number",min:"1",value:a,onChange:m=>i(m.target.value),placeholder:r("credits.packages.custom.placeholder"),className:"text-center"}),e.jsx("div",{className:"text-center mt-2",children:e.jsx("small",{className:"text-muted",children:r("credits.packages.custom.total",{amount:a&&!isNaN(a)&&a>0?(a*R).toFixed(2):"0.00"})})})]})]})}),e.jsxs(v,{variant:"primary",size:"lg",className:"w-100",onClick:I,disabled:c,
1children:[e.jsx(U,{className:"me-2"}),c?r("credits.buttons.purchase.processing"):r("credits.buttons.purchase.default")]})]})})}),e.jsx("div",{className:"mt-4",children:e.jsxs(v,{variant:"outline-primary",className:"w-100",href:T("dashboard"),children:[e.jsx(O,{className:"me-2"}),r("credits.buttons.history")]})}),e.jsx("div",{className:"text-center mt-4",children:e.jsxs("p",{className:"text-muted mb-0",children:[r("credits.footer.premium_prompt")," ",e.jsxs(v,{variant:"link",className:"p-0 align-baseline",onClick:()=>window.location.href="/pricing",children:[r("credits.buttons.premium")," ",e.jsx(V,{className:"ms-1"})]})]})})]})})]})}),e.jsx("style",{children:`
2                .cursor-pointer {
3                    cursor: pointer;
4                }
5
6                .card {
7                    transition: all 0.3s ease;
8                }
9
10                .card:hover {
11                    transform: translateY(-2px);
12                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
13                }
14
15                .border-primary {
16                    border-width: 2px !important;
17                }
18            `})]})}export{ce as default};

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.