PageSourceSearch

https://site.netpeaksoftware.com/distx/index.CmV5ed1e.js

js netpeaksoftware.com collected 2026-09-24 18:03:43 UTC 8,206 bytes, 1 lines download raw bytes

1import{r as v,a4 as O,d as z,u as U,v as q,a3 as Z,f as R,g as G,a0 as X,a5 as Y,o as c,h as l,i as t,k as n,t as i,n as W,l as S,F as N,G as j,C as J,O as Q}from"./entry.0SPLWlBF.js";import{_ as x}from"./baseInput.scss.1R0vz4Cq.js";import{u as ee}from"./useSeoMetaWrapper.-Iw3wxei.js";import{b as te}from"./billing.service.5BwhDU5q.js";const H=4e3,se=5*60*1e3,D=1e4,ae=6e4,V=p=>{var d;const a=p??{};return((d=a.response)==null?void 0:d.status)??a.statusCode??null},ne=p=>{const{data:a}=p??{};return typeof(a==null?void 0:a.error)=="string"?a.error:null},ie=p=>{var _,u;const a=(u=(_=(p??{}).response)==null?void 0:_.headers)==null?void 0:u.get("retry-after");if(!a)return D;const d=Number(a),k=Number.isFinite(d)?d*1e3:Date.parse(a)-Date.now();return!Number.isFinite(k)||k<=0?D:Math.min(k,ae)},re=()=>{const{getSwitcherCheckoutSession:p,recoverSwitcherLicense:a}=te(),d=v("loading"),k=v(""),_=v(!1);let u=null,w=null,f=!1;const $=()=>{f=!0,u&&(clearTimeout(u),u=null),w&&(w(),w=null)},g=h=>{d.value=h,$()},M=h=>new Promise(s=>{w=s,u=setTimeout(s,h)}),m=async h=>{try{const s=await p(h);return f?null:(s==null?void 0:s.status)==="ready"&&(s!=null&&s.key)?(k.value=s.key,_.value=s.auto_activated===!0,g("ready"),null):(s==null?void 0:s.status)==="expired"?(g("expired"),null):H}catch(s){if(f)return null;const o=V(s);return o===429?ie(s):ne(s)==="invalid_request"||o!==null&&o>=400&&o<500?(g("unavailable"),null):H}},b=async h=>{if(!h){g("unavailable");return}f=!1;const s=Date.now()+se;for(;!f;){const o=await m(h);if(o===null||f)return;if(s-Date.now()<o){g("failed");return}await M(o)}},E=async h=>{try{return await a(h),"sent"}catch(s){return V(s)===429?"rate_limited":"error"}};return O($),{state:d,licenseKey:k,autoActivated:_,start:b,stop:$,recover:E}},oe={class:"switcher_thanks"},ce={class:"switcher_thanks__card","aria-live":"polite"},le={key:0,class:"switcher_thanks__state"},_e=t("i",{class:"fa-solid fa-spinner-third fa-spin switcher_thanks__icon","aria-hidden":"true"},null,-1),he={class:"switcher_thanks__title heading heading--h4"},de={class:"switcher_thanks__text"},ue={key:1,class:"switcher_thanks__state"},pe=t("i",{class:"fa-solid fa-circle-check switcher_thanks__icon switcher_thanks__icon--success","aria-hidden":"true"},null,-1),ke={class:"switcher_thanks__title heading heading--h4"},we={class:"switcher_thanks__text"},fe={class:"switcher_thanks__key"},me={class:"switcher_thanks__copy_status",role:"status"},ye={key:0},ve={key:1,class:"switcher_thanks__error"},ge={class:"switcher_thanks__subtitle heading heading--h5"},be={class:"switcher_thanks__text"},Te={class:"switcher_thanks__note"},$e={class:"switcher_thanks__subtitle switcher_thanks__subtitle--start heading heading--h5"},Me={class:"switcher_thanks__steps"},Le=["innerHTML"],Ae=["innerHTML"],Ee=["innerHTML"],Re={class:"switcher_thanks__note"},Se={key:2,class:"switcher_thanks__state"},Ce=t("i",{class:"fa-regular fa-envelope switcher_thanks__icon","aria-hidden":"true"},null,-1),Ie={class:"switcher_thanks__title heading heading--h4"},Ne={class:"switcher_thanks__text"},He={key:0,class:"switcher_thanks__note switcher_thanks__note--success",role:"status"},De=t("i",{class:"fa-solid fa-circle-check","aria-hidden":"true"},null,-1),Ve=["disabled"],Fe={key:0,class:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"},Ke={key:0,class:"switcher_thanks__error",role:"alert"},Pe={key:3,class:"switcher_thanks__state"},Be=t("i",{class:"fa-solid fa-circle-exclamation switcher_thanks__icon switcher_thanks__icon--warning","aria-hidden":"true"},null,-1),Oe={class:"switcher_thanks__title heading heading--h4"},ze={class:"switcher_thanks__text"},Ue=["innerHTML"],qe=4e3,F=64,We=z({__name:"index",setup(p){const{t:a,locale:d}=U({}),k=q();ee({title:a("switcher_thanks.title"),description:a("switcher_thanks.metaDescription"),isIndexable:!1,ogImage:"https://static.netpeaksoftware.com/media/general/image/netpeak-software.png"}),Z({htmlAttrs:{lang:d.value}});const{state:_,licenseKey:u,autoActivated:w,start:f,recover:$}=re(),g=R(()=>_.value==="expired"||_.value==="unavailable");G(()=>{const e=k.query.session_id;f(typeof e=="string"?e.trim():"")});const M=v(null),m=v("");let b=null;const E=()=>{var I;const e=M.value,r=(I=window.getSelection)==null?void 0:I.call(window);if(!e||!r)return!1;const y=document.createRange();return y.selectNodeContents(e),r.removeAllRanges(),r.addRange(y),!0},h=async()=>{var r;let e=!1;try{(r=navigator.clipboard)!=null&&r.writeText&&(await navigator.clipboard.writeText(u.value),e=!0)}catch{}if(!e&&E())try{e=document.execCommand("copy")}catch{e=!1}m.value=e?"success":"error",b&&clearTimeout(b),b=setTimeout(()=>{m.value=""},qe)};X(()=>{b&&clearTimeout(b)});const s=/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,64})$/,o=v(""),T=v("idle"),L=v(""),A=Y({title:a("auth.emailInputTitle"),placeholder:a("auth.emailInputPlaceholder"),error:!1,success:!1,type:"email",errorText:"",additionalClass:"NS-label__input-email",iconClass:"fa-envelope",name:"email",autocomplete:"email",tabindex:1}),C=R(()=>o.value.length<=F&&s.test(o.value)),K=R(()=>T.value==="sending"||!C.value),P=e=>{const r=e.length===0||e.length<=F&&s.test(e);A.error=!r,A.success=r&&e.length>0,A.errorText=r?"":a("auth.signup_emailRegExpError")},B=async()=>
1{if(!C.value||T.value==="sending")return;T.value="sending",L.value="";const e=await $(o.value.trim());if(e==="sent"){T.value="sent";return}T.value="idle",L.value=a(e==="rate_limited"?"switcher_thanks.recover_rate_limited":"switcher_thanks.recover_error")};return(e,r)=>(c(),l("div",oe,[t("div",ce,[n(_)==="loading"?(c(),l("div",le,[_e,t("h1",he,i(e.$t("switcher_thanks.pending_title")),1),t("p",de,i(e.$t("switcher_thanks.pending_description")),1)])):n(_)==="ready"?(c(),l("div",ue,[pe,t("h1",ke,i(n(w)?e.$t("switcher_thanks.activated_title"):e.$t("switcher_thanks.ready_title")),1),t("p",we,i(n(w)?e.$t("switcher_thanks.activated_description"):e.$t("switcher_thanks.ready_description")),1),t("div",fe,[t("code",{ref_key:"keyNode",ref:M,class:"switcher_thanks__key__value"},i(n(u)),513),t("button",{type:"button",class:"button-l button-secondary-normal switcher_thanks__key__copy",onClick:h},[t("i",{class:W(["fa-regular",n(m)==="success"?"fa-check":"fa-copy"]),"aria-hidden":"true"},null,2),t("span",null,i(n(m)==="success"?e.$t("switcher_thanks.copied"):e.$t("switcher_thanks.copy")),1)])]),t("p",me,[n(m)==="success"?(c(),l("span",ye,i(e.$t("switcher_thanks.copy_success")),1)):n(m)==="error"?(c(),l("span",ve,i(e.$t("switcher_thanks.copy_error")),1)):S("",!0)]),n(w)?(c(),l(N,{key:0},[t("h2",ge,i(e.$t("switcher_thanks.keep_title")),1),t("p",be,i(e.$t("switcher_thanks.keep_description")),1),t("p",Te,i(e.$t("switcher_thanks.activated_fallback")),1)],64)):(c(),l(N,{key:1},[t("h2",$e,i(e.$t("switcher_thanks.steps_title")),1),t("ol",Me,[t("li",{innerHTML:e.$t("switcher_thanks.step_open")},null,8,Le),t("li",{innerHTML:e.$t("switcher_thanks.step_enter")},null,8,Ae),t("li",{innerHTML:e.$t("switcher_thanks.step_done")},null,8,Ee)])],64)),t("p",Re,i(e.$t("switcher_thanks.ready_email_note")),1)])):n(g)?(c(),l("div",Se,[Ce,t("h1",Ie,i(n(_)==="expired"?e.$t("switcher_thanks.expired_title"):e.$t("switcher_thanks.unavailable_title")),1),t("p",Ne,i(n(_)==="expired"?e.$t("switcher_thanks.expired_description"):e.$t("switcher_thanks.unavailable_description")),1),n(T)==="sent"?(c(),l("p",He,[De,t("span",null,i(e.$t("switcher_thanks.recover_sent")),1)])):(c(),l("form",{key:1,class:"switcher_thanks__form",novalidate:"",onSubmit:j(B,["prevent"])},[J(x,{modelValue:n(o),"onUpdate:modelValue":r[0]||(r[0]=y=>Q(o)?o.value=y:null),params:n(A),onInput:r[1]||(r[1]=y=>o.value=y),onChange:r[2]||(r[2]=y=>P(y))},null,8,["modelValue","params"]),t("button",{type:"submit",class:"button-l button-secondary-normal switcher_thanks__form__submit",disabled:n(K)},[n(T)==="sending"?(c(),l("i",Fe)):S("",!0),t("span",null,i(e.$t("switcher_thanks.recover_submit")),1)],8,Ve),n(L)?(c(),l("p",Ke,i(n(L)),1)):S("",!0)],32))])):(c(),l("div",Pe,[Be,t("h1",Oe,i(e.$t("switcher_thanks.failed_title")),1),t("p",ze,i(e.$t("switcher_thanks.failed_description")),1),t("p",{class:"switcher_thanks__text",innerHTML:e.$t("switcher_thanks.failed_support")},null,8,Ue)]))])]))}});export{We 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.