PageSourceSearch

https://dashboard.iproyal.com/assets/index-2cHCp59y.js

js iproyal.com collected 2026-10-01 10:41:27 UTC 9,840 bytes, 3 lines download raw bytes

1/** See vendor.LICENSE.txt for 3rd party license information */
2import{a as G}from"./OrganizationDeletedDialog-DeCOWxzA.js";import{a as $,bc as N,o as m,M as w,Q as o,z as l,u as e,T as V,O as c,_ as h,c as k,V as z,w as g,W as _,b as T,ae as K,ad as W,y as E,v as Y,ax as A,ay as J,F as U,at as X,av as R,f1 as Z,aT as ee,ac as B,i as y,f2 as ae,ag as te,S as se,a5 as D,as as oe,f3 as ie,f4 as ne,e as re}from"./_withdraw-status-label-C_XHOxxk.js";import{_ as le}from"./UnitSelect.vue_vue_type_script_setup_true_lang-Dn2tpLIK.js";import{u as ce}from"./use-delete-whitelist-Dh1zMnjQ.js";import{_ as de}from"./ProjectsList.vue_vue_type_script_setup_true_lang-U32pABBD.js";import{g as fe}from"./(residential)-C_-xRbuE.js";import{a as ue}from"./projects-DDiJpIlV.js";import{L as me,u as ge,_ as pe}from"./regle-schemas.min-Bzceocc8.js";import{o as he,p as ye,b as be,n as M}from"./order-auth-validators-DYWxMx4R.js";import{b as je,d as _e,T as ve}from"./TextField-YbFGomOL.js";import{_ as ze}from"./context-switch-options-query-pIv-ckxF.js";import{S as xe}from"./Select-BqGC1HL3.js";import"./index-DzVsRdPj.js";import"./use-paginated-query-D3hWjuAx.js";import"./use-pagination-PsreJ_Jb.js";import"./Field.vue_vue_type_script_setup_true_lang-9W-nBLQ-.js";import"./OrderStatusIndicator.vue_vue_type_script_setup_true_lang-BBoeNZpA.js";import"./PhoneNumberOption.vue_vue_type_script_setup_true_lang-Dqu4aX3f.js";import"./subscription-features-Sot5Ax5k.js";
2import"./survicate-mrno6alq.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"0a9fdbed"},a._sentryModuleMetadata=a._sentryModuleMetadata||{},a._sentryModuleMetadata[new a.Error().stack]=(function(s){for(var n=1;n<arguments.length;n++){var d=arguments[n];if(d!=null)for(var f in d)d.hasOwnProperty(f)&&(s[f]=d[f])}return s})({},a._sentryModuleMetadata[new a.Error().stack],{"_sentryBundlerPluginAppKey:iproyal-dashboard-frontend":!0});var i=new a.Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="057f3319-03c1-4e88-a0e5-c78572a8b978",a._sentryDebugIdIdentifier="sentry-dbid-057f3319-03c1-4e88-a0e5-c78572a8b978")}catch{}})();const we={class:"w-full max-w-698 rounded-12 bg-neutral-0 p-20"},Pe={class:"flex flex-col items-center gap-8 bg-brand-50 p-20"},Te={class:"size-fit rounded-full bg-neutral-0 p-8"},ke={class:"flex flex-col gap-24"},Ce={class:"text-center font-semibold"},Ie=$({__name:"NoProjectsCard",props:{organizationId:{}},setup(a){const{canCreateProject:i}=N(["createProject"]);return(s,n)=>(m(),w("div",we,[o("div",Pe,[o("div",Te,[l(e(V),{class:"size-32 text-brand-400",type:"order"})]),o("div",ke,[o("p",Ce,c(("m"in s?s.m:e(h)).dashOrgTabProjectsNoProjectsCreated()),1),e(i)?(m(),k(e(z),{key:0,as:"RouterLink",to:{name:"/[[context]]/organizations/[organizationId]/projects/create/",params:{organizationId:a.organizationId}},kind:"outlined"},{default:g(()=>[l(e(V),{type:"plus",class:"size-24"}),_(" "+c(("m"in s?s.m:e(h)).dashOrgTabProjectsCreateNewProject()),1)]),_:1},8,["to"])):T("",!0)])])]))}}),$e=a=>K({apiType:"residential",method:"POST",path:`v1/residential-users/${a.appHash}/give-traffic`,body:{amount:a.traffic}}),Le=(a,i)=>{const{r$:s}=me(a,he({projectId:M(),traffic:ye(be(M(),0),_e(.01),je(W(i)))})),n=ge(s);return{r$:s,field:n}},Se={class:"flex w-full flex-col gap-20 sm:gap-40"},Oe={class:"tp-headline-s md:tp-headline-m"},Ve={class:"flex flex-col gap-10"},Ae={class:"flex flex-col gap-20 rounded-8 bg-neutral-0 p-16"},Re={class:"text-left tp-title text-brand-400 uppercase"},Be={class:"flex w-full items-center justify-center rounded-8 bg-brand-100 p-8"},De={class:"tp-headline-m text-brand-400"},Me={class:"flex flex-col gap-16 md:flex-row md:gap-24"},Ne=$({__name:"AssignTrafficDialogContent",props:{organizationId:{},projectsLimit:{}},emits:["close"],async setup(a,{emit:i}){let s,n;const d=i,{common:f}=E(),b=Y(),{data:C,refresh:L}=A({key:()=>["assign-traffic-royal-settings"],query:()=>fe("royal")}),{data:S,refresh:O}=A({key:()=>["assign-traffic-projects",a.organizationId],query:({signal:t})=>ue({organizationId:a.organizationId,page:1,perPage:a.projectsLimit},{signal:t})});[s,n]=J(()=>Promise.all([L(),O()])),await s,n();const v=y(()=>(S.value?.data??[]).filter(t=>t.trafficSource==="own")),p=y(()=>v.value.length===0),u=y(()=>C.value?.gbBalance??0),r=U({projectId:v.value[0]?.id,traffic:void 0}),{r$:P,field:j}=Le(r.value,u),F=y(()=>v.value.find(t=>t.id===r.value.projectId)),{mutate:Q,isLoading:q}=X({mutation:t=>$e(t),onError:t=>{R.error(t,"assign-traffic")},onSuccess:()=>{b.invalidateQueries({key:["assign-traffic-royal-settings"]}),b.invalidateQueries({key:["assign-traffic-projects"]}),R({id:"assign-traffic",message:Z()}),d("close")}}),H=()=>{const t=F.value;t&&r.value.traffic&&Q({appHash:t.appHash,traffic:r.value.traffic})};return(t,x)=>(m(),w("div",Se,[o("h2",Oe,c(("m"in t?t.m:e(h)).dashProjectsAssignResidentialTraffic()),1),o("div",Ve,[o("div",Ae,[o("span",Re,c(("m"in t?t.m:e(h)).dashProjectsOrganizationTrafficBalance()),1),o("div",Be,[o("span",De,c(e(f).gbQuantity(e(ee)(e(u),2))),1)])]),l(e(ze),{type:"warn",class:"rounded-8 tp-body-xs"},{default:g(()=>[_(c(("m"in t?t.m:e(h)).dashProjectsTrafficCanOnlyBeAssignedToOwnProjects()),1)]),_:1})]),l(e(pe),{regle:e(P),class:"flex flex-col gap-8",onSubmit:H},{default:g(()=>[l(e(xe),B({modelValue:e(r).projectId,"onUpdate:modelValue":x[0]||(x[0]=I=>e(r).projectId=I)},e(j)("projectId"),{options:e(v),"value-key":"id","label-key":"name",label:e(f).orgControlPanelProject(),disabled:e(p),placeholder:("m"in t?t.m:e(h)).dashProjectsTrafficAssignNoProjectsAvailable()}),null,16,["modelValue","options","label","disabled","placeholder"]),l(e(ve),B({modelValue:e(r).traffic,"onUpdate:modelValue":x[1]||(x[1]=I=>e(r).traffic=I)},e(j)("traffic"),{type:"number",label:("m"in t?t.m:e(h)).dashProjectsTrafficToAssign(),step:.01,min:.01,disabled:e(p),max:e(u)}),null,16,["modelValue","label","disabled","max"]),o("div",Me,[l(e(z),{class:"w-full md:basis-1/2",disabled:e(q)||e(p)||e(P).$invalid,type:"submit","color-scheme":"secondary"},{default:g(()=>[_(c(e(f).assignTraffic()),1)]),_:1},8,["disabled"]),l(e(z),{kind:"outlined",class:"w-full md:basis-1/2",onClick:x[2]||(x[2]=I=>d("close"))},{default:g(()=>[_(c(e(f).cancel()),1)]),_:1})])]),_:1},8,["regle"])]))}}),Ee={class:"w-full overflow-hidden rounded-12 shadow-s transition-opacity duration-500"},Ue={class:"flex flex-col gap-8 bg-neutral-0 p-12 sm:pl-20 lg:h-64"},Fe={class:"flex flex-row items-center justify-start gap-8"},Qe={class:"flex shrink-0 flex-row gap-4"},qe={class:"whitespace-nowrap"},He={class:"ml-auto flex gap-12 max-xs:hidden"},Ge={key:1,class:"inline-flex"},Ke={class:"flex w-full flex-col gap-12 xs:hidden"},We={key:1,class:"inline-flex w-full"},Ye=$({__name:"ProjectsCard",props:{organization:{}},setup(a){const{common:i}=E(),{mutate:s,isLoading:n}=ae(),d=u=>{s({context:{type:"project",id:u,organizationId:a.organization.id},redirectTo:{name:"/[[context]]/organizations/[organizationId]/projects/[projectId]/(project)",params:{organizationId:a.organization.id,projectId:u}}})},f=y(()=>a.organization.projectsCount===1?ie():ne({count:a.organization.projectsCount})),b=y(()=>a.organization.totalProjectsCount>=a.organization.projectsLimit),{canCreateProject:C,canSetRoyalUsageLimits:L}=N(["createProject","setRoyalUsageLimits"]),{hasUsageBilling:S,isUsageBillingLoading:O}=ce(),v=y(()=>L.value&&!O.value&&!S.value),p=U(!1);return(u,r)=>{const P=te("tooltip");return m(),w(se,null,[o("div",Ee,[o("div",Ue,[o("div",Fe,[o("div",Qe,[l(e(V),{type:"proxy-tester",class:"size-24 text-brand-400"}),o("span",qe,c(e(f)),1)]),o("div",He,[e(v)?(m(),k(e(z),{key:0,kind:"filled","color-scheme":"secondary",size:"m",disabled:e(n),onClick:r[0]||(r[0]=j=>p.value=!0)},{default:g(()=>[_(c(e(i).assignTraffic()),1)]),_:1},8,["disabled"])):T("",!0),e(C)?D((m(),w("span",Ge,[l(e(z),{as:"RouterLink",to:{name:"/[[context]]/organizations/[organizationId]/projects/create/",params:{organizationId:a.organization.id}},disabled:e(n)||e(b),kind:"outlined",size:"m",class:"text-center"},{default:g(()=>[_(c(("m"in u?u.m:e(h)).dashOrgAllOrgScreenCreateProject()),1)]),_:1},8,["to","disabled"])])),[[P,e(b)&&e(i).projectLimitReachedTooltip()]]):T("",!0)])]),o("div",Ke,[e(v)?(m(),k(e(z),{key:0,kind:"filled","color-scheme":"secondary",size:"s",class:"w-full",disabled:e(n),onClick:r[1]||(r[1]=j=>p.value=!0)},{default:g(()=>[_(c(e(i).assignTraffic()),1)]),_:1},8,["disabled"])):T("",!0),e(C)?D((m(),w("span",We,[l(e(z),{as:"RouterLink",to:{name:"/[[context]]/organizations/[organizationId]/projects/create/",params:{organizationId:a.organization.id}},disabled:e(n)||e(b),kind:"outlined",size:"s",class:"w-full"},{default:g(()=>[_(c(("m"in u?u.m:e(h)).dashOrgAllOrgScreenCreateProject()),1)]),_:1},8,["to","disabled"])])),[[P,e(b)&&e(i).projectLimitReachedTooltip()]]):T("",!0)])]),l(de,{"organization-id":a.organization.id,onSwitchToProjectContext:d},null,8,["organization-id"])]),l(le,{modelValue:e(p),"onUpdate:modelValue":r[2]||(r[2]=j=>
2oe(p)?p.value=j:null),class:"flex max-h-[min(90dvh,640px)] w-full flex-col overflow-y-auto bg-neutral-50 p-24 md:p-40"},{default:g(({close:j})=>[l(Ne,{"organization-id":a.organization.id,"projects-limit":a.organization.projectsLimit,onClose:j},null,8,["organization-id","projects-limit","onClose"])]),_:1},8,["modelValue"])],64)}}}),Je={class:"content-enter-animation flex w-full flex-row justify-center"},ba=$({__name:"index",setup(a){const{data:i}=G(),s=re(),n=y(()=>Number(s.params.organizationId)),d=y(()=>i.value.projectsCount>0);return(f,b)=>(m(),w("section",Je,[e(d)?(m(),k(Ye,{key:0,organization:e(i)},null,8,["organization"])):(m(),k(Ie,{key:1,"organization-id":e(n)},null,8,["organization-id"]))]))}});export{ba as default};
3//# sourceMappingURL=index-2cHCp59y.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.