PageSourceSearch

https://verisight.ai/_app/immutable/nodes/16.DJa7dbbB.js

js verisight.ai collected 2026-10-05 14:47:42 UTC 10,705 bytes, 4 lines download raw bytes

1import"../chunks/Bzak7iHL.js";import{a as Qe}from"../chunks/CDNIKcq5.js";import{a_ as Fe,z as s,aW as Ve,a3 as Ye,ai as w,b8 as $,$ as Je,T as i,al as e,W as V,af as M,bt as f,bf as p,b3 as r,bl as P,bc as u,bm as pe,aQ as te,bi as q}from"../chunks/CK5hUeLe.js";import{s as Xe,i as K,a as Se}from"../chunks/2b-3-0EY.js";import{k as ye}from"../chunks/CEAO9kUM.js";import{e as Te,i as Ze}from"../chunks/D_I6LT_Q.js";import{c as ue}from"../chunks/D6NOs28h.js";import{h as et}from"../chunks/DgjAN2B0.js";import{g as tt}from"../chunks/DKDfsD-8.js";import{p as at}from"../chunks/BMetosE_.js";import{aW as rt,z as lt,y as nt}from"../chunks/BPJ293ms.js";import{l as _e}from"../chunks/BHaOeUdi.js";import{M as ot}from"../chunks/B2dumxsU.js";import{c as Ee,T as Le,e as xe,k as st}from"../chunks/B83E2IWw.js";import{P as it}from"../chunks/DqHLCTud.js";import{t,l as pt}from"../chunks/X5IA7BCB.js";import{S as ce}from"../chunks/CirL7OlB.js";import{E as ut}from"../chunks/OIWft53k.js";import{E as ct}from"../chunks/CNAIpf7d.js";import{L as dt}from"../chunks/DfTOu0G-.js";import{B as Ce}from"../chunks/DFBbskDZ.js";import{I as gt}from"../chunks/7PfmFM1r.js";import{a as Me,A as Ae}from"../chunks/qwO6nyQD.js";import{C as mt}from"../chunks/CrZUO_DH.js";import{S as vt}from"../chunks/CLtvDvSb.js";var ft=w('<div class="flex flex-col gap-2 text-sm"><p><span class="font-medium capitalize"> </span> </p> <p class="text-muted-foreground"> </p> <p class="text-muted-foreground"> </p> <p class="text-muted-foreground"> <!></p></div>'),_t=w('<span class="font-medium text-emerald-700 dark:text-emerald-400"> </span>'),xt=w('<span class="text-muted-foreground"> </span>'),$t=w('<span class="text-amber-700 dark:text-amber-400"> </span>'),bt=w('<li class="flex items-center justify-between gap-3 rounded-lg border border-border px-3 py-2 text-sm"><span> </span> <!></li>'),ht=w('<ul class="m-0 flex list-none flex-col gap-2 p-0"></ul>'),Bt=w('<p class="mt-0 mb-4 text-sm text-muted-foreground"> <a href="/admin/features" class="text-primary underline-offset-2 hover:underline"> </a>.</p> <div class="mb-4 flex flex-col gap-3"><div class="relative min-w-0"><!> <!></div> <!></div> <!>',1),wt=w(' <code class="text-xs">STRIPE_BILLING_*</code> ',1),kt=w('<div><h3 class="font-semibold"> </h3> <p class="mt-1 text-2xl font-bold"> </p> <p class="text-xs text-muted-foreground"> </p> <p class="mt-2 text-sm text-muted-foreground"> </p> <p class="mt-1 flex-1 text-xs text-muted-foreground"> </p> <!></div>'),Pt=w('<div class="grid gap-4 sm:grid-cols-3"></div>'),St=w('<p class="mt-0 text-sm text-muted-foreground"> </p> <p class="mb-0 mt-2 break-all rounded-md bg-muted px-3 py-2 font-mono text-sm"> </p>',1),yt=w("<!> <!>",1),Tt=w("<!> <!> <!> <!> <!>",1),Et=w('<div class="mx-auto flex max-w-3xl flex-col gap-5"><!> <!></div>');function ta(Ie,Oe){Fe(Oe,!0);const $e=()=>Se(at,"$page",be),ae=()=>Se(pt,"$locale",be),[be,Ne]=Xe();let de=q(!0),z=q(""),re=q(null),le=q(!1),d=q(null),ge=q(""),ne=q("all");const De=f(()=>typeof window<"u"?`${window.location.origin}/public/stripe/billing-webhook`:"/public/stripe/billing-webhook");Qe(async()=>{$e().url.searchParams.get("checkout");const a=_e();if(!(a!=null&&a.accessToken)){$(z,t("common.notSignedIn"),!0),$(de,!1);return}try{const n=await rt(a.accessToken);$(d,n.billing,!0)}catch(n){$(z,n instanceof Error?n.message:String(n),!0)}finally{$(de,!1)}});async function Ue(l){const a=_e();if(a!=null&&a.accessToken){$(re,l,!0),$(z,"");try{const n=await nt(a.accessToken,{plan:l});window.location.href=n.checkout_url}catch(n){$(z,n instanceof Error?n.message:String(n),!0),$(re,null)}}}async function ze(){const l=_e();if(l!=null&&l.accessToken){$(le,!0),$(z,"");try{const a=await lt(l.accessToken);window.location.href=a.portal_url}catch(a){$(z,a instanceof Error?a.message:String(a),!0),$(le,!1)}}}function He(l){switch(l){case"active":return t("page.planBilling.statusActive");case"trialing":return t("page.planBilling.statusTrial");case"past_due":return t("page.planBilling.statusPastDue");case"canceled":return t("page.planBilling.statusCanceled");default:return l.replaceAll("_"," ")}}function he(l,a){return a.modules_enabled[l]?"on":a.modules_available[l]?"off":"upgrade"}const Re=f(()=>(ae(),[{value:"all",label:t("common.all")},{value:"on",label:t("page.planBilling.moduleOn")},{value:"off",label:t("page.planBilling.moduleOff")},{value:"upgrade",label:t("page.planBilling.requiresUpgrade")}])),Be=f(()=>{ae();const l=e(d);if(!l)return[];const a=e(ge).trim().toLowerCase();return Le.filter(n=>{const H=he(n,l);return e(ne)!=="all"&&H!==e(ne)?!1:a?`${xe(n)} ${n}`.toLowerCase().includes(a):!0})});function We(l,a){const n=st(l,a.plan,a.modules_by_plan);if(n.length===0)return t("page.planBilling.sameModuleAccess");const H=n.slice(0,4).map(T=>xe(T)),Y=n.length>4?` ${t("page.planBilling.andMore",{count:n.length-4})}`:"";return t("page.planBilling.unlocksModules",{names:H.join(", "),extra:Y})}var me=Et();et("sycr78",l=>{Ye(a=>{Je.title=a??""},[()=>t("page.planBilling.docTitle")])});var we=i(me);ye(we,ae,l=>{{const a=Y=>{var T=V(),j=M(T);{var oe=G=>{Ce(G,{variant:"outline",get disabled(){return e(le)},onclick:()=>void ze(),children:(Q,ke)=>{te();var J=pe();P(se=>u(J,se),[()=>e(le)?t("page.planBilling.opening"):t("page.planBilling.manageSubscription")]),s(Q,J)},$$slots:{default:!0}})};K(j,G=>{var Q;(Q=e(d))!=null&&Q.has_subscription&&G(oe)})}s(Y,T)};let n=f(()=>t("page.planBilling.title")),H=f(()=>t("page.planBilling.description"));it(l,{get title(){return e(n)},get description(){return e(H)},actions:a,$$slots:{actions:!0}})}});var qe=p(we,2);ye(qe,ae,l=>{var a=V(),n=M(a);{var H=T=>{{let j=f(()=>t("common.loading"));dt(T,{get label(){return e(j)}})}},Y=T=>{var j=Tt(),oe=M(j);ut(oe,{get message(){return e(z)}});var G=p(oe,2);{var Q=b=>{var S=V(),N=M(S);ue(N,()=>Ae,(y,x)=>{x(y,{children:(h,D)=>{var _=V(),v=M(_);ue(v,()=>Me,(o,m)=>{m(o,{class:"text-green-700 dark:text-green-400",children:(k,A)=>{te();var B=pe();P(I=>u(B,I),[()=>t("page.planBilling.checkoutComplete")]),s(k,B)},$$slots:{default:!0}})}),s(h,_)},$$slots:{default:!0}})}),s(b,S)},ke=f(()=>$e().url.searchParams.get("checkout")==="success");K(G,b=>{e(ke)&&b(Q)})}var J=p(G,2);{let b=f(()=>t("page.planBilling.currentPlan"));ce(J,{get title(){return e(b)},children:(S,N)=>{var y=ft(),x=i(y),h=i(x),D=i(h,!0);r(h);var _=p(h);r(x);var v=p(x,2),o=i(v,!0);r(v);var m=p(v,2),k=i(m,!0);r(m);var A=p(m,2),B=i(A),I=p(B);{var O=c=>{var g=pe();P(E=>u(g,`·
2							${E??""}`),[()=>t("page.planBilling.renews",{date:new Date(e(d).current_period_end).toLocaleDateString()})]),s(c,g)};K(I,c=>{e(d).current_period_end&&c(O)})}r(A),r(y),P((c,g,E,U,F,R)=>{u(D,e(d).plan),u(_,` · ${c??""}
3						·
4						${g??""}`),u(o,E),u(k,U),u(B,`${F??""} ${R??""} `)},[()=>t("page.planBilling.formTemplatesCount",{count:e(d).plan_limits.form_templates}),()=>t("page.planBilling.serviceWorkflowsCount",{count:e(d).plan_limits.service_workflows}
4),()=>t("page.planBilling.modulesEnabledSummary",{enabledCount:Ee(e(d).modules_enabled),totalCount:Le.length,availableCount:Ee(e(d).modules_available)}),()=>t("page.planBilling.activeTechniciansBilled",{count:e(d).active_technicians,plural:e(d).active_technicians===1?"":"s"}),()=>t("page.planBilling.subscriptionLabel"),()=>He(e(d).subscription_status)]),s(S,y)},$$slots:{default:!0}})}var se=p(J,2);{let b=f(()=>t("page.planBilling.featureModules"));ce(se,{get title(){return e(b)},children:(S,N)=>{var y=Bt(),x=M(y),h=i(x),D=p(h),_=i(D,!0);r(D),te(),r(x);var v=p(x,2),o=i(v),m=i(o);vt(m,{class:"pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"});var k=p(m,2);{let c=f(()=>t("page.features.searchModulesPlaceholder")),g=f(()=>t("common.search"));gt(k,{class:"pl-8",get placeholder(){return e(c)},get"aria-label"(){return e(g)},get value(){return e(ge)},set value(E){$(ge,E,!0)}})}r(o);var A=p(o,2);mt(A,{get options(){return e(Re)},get value(){return e(ne)},onSelect:c=>$(ne,c,!0)}),r(v);var B=p(v,2);{var I=c=>{{let g=f(()=>t("page.features.noModuleMatches"));ct(c,{get title(){return e(g)}})}},O=c=>{var g=ht();Te(g,20,()=>e(Be),E=>E,(E,U)=>{const F=f(()=>he(U,e(d)));var R=bt(),W=i(R),X=i(W,!0);r(W);var ve=p(W,2);{var Pe=L=>{var C=_t(),Z=i(C,!0);r(C),P(ee=>u(Z,ee),[()=>t("page.planBilling.moduleOn")]),s(L,C)},ie=L=>{var C=xt(),Z=i(C,!0);r(C),P(ee=>u(Z,ee),[()=>t("page.planBilling.moduleOff")]),s(L,C)},fe=L=>{var C=$t(),Z=i(C,!0);r(C),P(ee=>u(Z,ee),[()=>t("page.planBilling.requiresUpgrade")]),s(L,C)};K(ve,L=>{e(F)==="on"?L(Pe):e(F)==="off"?L(ie,1):L(fe,-1)})}r(R),P(L=>u(X,L),[()=>xe(U)]),s(E,R)}),r(g),s(c,g)};K(B,c=>{e(Be).length===0?c(I):c(O,-1)})}P((c,g)=>{u(h,`${c??""} `),u(_,g)},[()=>t("page.planBilling.modulesControlHint"),()=>t("page.planBilling.featuresLinkText")]),s(S,y)},$$slots:{default:!0}})}var Ke=p(se,2);{var je=b=>{var S=V(),N=M(S);ue(N,()=>Ae,(y,x)=>{x(y,{children:(h,D)=>{var _=V(),v=M(_);ue(v,()=>Me,(o,m)=>{m(o,{children:(k,A)=>{te();var B=wt(),I=M(B),O=p(I,2);P((c,g)=>{u(I,`${c??""} `),u(O,` ${g??""}`)},[()=>t("page.planBilling.billingNotConfigured"),()=>t("page.planBilling.envVarsHint")]),s(k,B)},$$slots:{default:!0}})}),s(h,_)},$$slots:{default:!0}})}),s(b,S)},Ge=b=>{var S=yt(),N=M(S);{let x=f(()=>t("page.planBilling.changePlan"));ce(N,{get title(){return e(x)},children:(h,D)=>{var _=Pt();Te(_,21,()=>ot.pricing.plans,Ze,(v,o)=>{var m=kt(),k=i(m),A=i(k,!0);r(k);var B=p(k,2),I=i(B);r(B);var O=p(B,2),c=i(O,!0);r(O);var g=p(O,2),E=i(g,!0);r(g);var U=p(g,2),F=i(U,!0);r(U);var R=p(U,2);{let W=f(()=>e(d).plan===e(o).id?"secondary":"default"),X=f(()=>e(d).plan===e(o).id||e(re)!==null);Ce(R,{class:"mt-4 w-full",get variant(){return e(W)},get disabled(){return e(X)},onclick:()=>void Ue(e(o).id),children:(ve,Pe)=>{te();var ie=pe();P(fe=>u(ie,fe),[()=>e(re)===e(o).id?t("page.planBilling.redirecting"):e(d).plan===e(o).id?t("page.planBilling.currentPlanButton"):t("page.planBilling.choosePlan",{name:e(o).name})]),s(ve,ie)},$$slots:{default:!0}})}r(m),P((W,X)=>{tt(m,1,`flex flex-col rounded-lg border p-4 ${e(d).plan===e(o).id?"border-primary ring-1 ring-primary":""}`),u(A,e(o).name),u(I,`$${e(o).price??""}`),u(c,W),u(E,e(o).description),u(F,X)},[()=>t("page.planBilling.perPeriod",{period:e(o).period}),()=>We(e(o).id,e(d))]),s(v,m)}),r(_),s(h,_)},$$slots:{default:!0}})}var y=p(N,2);{let x=f(()=>t("page.planBilling.webhookEndpoint"));ce(y,{get title(){return e(x)},children:(h,D)=>{var _=St(),v=M(_),o=i(v,!0);r(v);var m=p(v,2),k=i(m,!0);r(m),P(A=>{u(o,A),u(k,e(De))},[()=>t("page.planBilling.webhookHint")]),s(h,_)},$$slots:{default:!0}})}s(b,S)};K(Ke,b=>{e(d).billing_configured?b(Ge,-1):b(je)})}s(T,j)};K(n,T=>{e(de)?T(H):e(d)&&T(Y,1)})}s(l,a)}),r(me),s(Ie,me),Ve(),Ne()}export{ta as component};

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.