@highstate/designer 0.32.0 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{Xz3NF3WC.js → 05ZAo7fc.js} +1 -1
- package/.output/public/_nuxt/{CTkO6yS9.js → 2oj-U4iW.js} +1 -1
- package/.output/public/_nuxt/{C1-5g_Qv.js → 4ixytvLV.js} +1 -1
- package/.output/public/_nuxt/{CpjRFk6R.js → 96kQTf02.js} +1 -1
- package/.output/public/_nuxt/{DW3fpWuG.js → AP6ofMIl.js} +1 -1
- package/.output/public/_nuxt/{DzV7Jf8P.js → B4sso3Qi.js} +1 -1
- package/.output/public/_nuxt/{BPg7RDKJ.js → B8VZ6lPX.js} +1 -1
- package/.output/public/_nuxt/{ClSYLg4N.js → B8qYOkTO.js} +1 -1
- package/.output/public/_nuxt/{DYYv6Ju9.js → B8vRdJsS.js} +2 -2
- package/.output/public/_nuxt/{xdCyoE2x.js → BDRUMjWC.js} +1 -1
- package/.output/public/_nuxt/{DL1q6e3k.js → BDVLqVNl.js} +1 -1
- package/.output/public/_nuxt/{2ClViFgn.js → BF5H4dkt.js} +1 -1
- package/.output/public/_nuxt/{CxZgR8Mt.js → BFQPTP7z.js} +1 -1
- package/.output/public/_nuxt/{Ceck2_WG.js → BLNFaWRI.js} +1 -1
- package/.output/public/_nuxt/{Bb6QHRP-.js → BOKdp5uy.js} +1 -1
- package/.output/public/_nuxt/{CpbCkvPA.js → BQIuX-e8.js} +1 -1
- package/.output/public/_nuxt/{JCFuFBLB.js → BQn8TCpH.js} +1 -1
- package/.output/public/_nuxt/{D_YMaTD5.js → BR3j6sCq.js} +1 -1
- package/.output/public/_nuxt/{BF8a0XlF.js → BSDyDOUh.js} +1 -1
- package/.output/public/_nuxt/{D8dRU7nl.js → BUkiEZRS.js} +1 -1
- package/.output/public/_nuxt/{SZAmo-8w.js → BXMmAs0F.js} +1 -1
- package/.output/public/_nuxt/{DKOmQMkq.js → BZlwst7p.js} +1 -1
- package/.output/public/_nuxt/{DdtyE3Y5.js → B_-SqyPD.js} +1 -1
- package/.output/public/_nuxt/BhmLCeSc.js +14 -0
- package/.output/public/_nuxt/{BCQh32s5.js → Bme3Qqko.js} +1 -1
- package/.output/public/_nuxt/{n-szFsmh.js → BoU8AaDx.js} +1 -1
- package/.output/public/_nuxt/{DnNOOTKY.js → BrqPQtBH.js} +1 -1
- package/.output/public/_nuxt/{D0M3xEzp.js → Bsi7mtxo.js} +1 -1
- package/.output/public/_nuxt/{BG32vSW8.js → BtRiCtf6.js} +1 -1
- package/.output/public/_nuxt/{CoGQaz8N.js → BtaKz0Mo.js} +1 -1
- package/.output/public/_nuxt/{Dc-PHGbi.js → Btq1JU4p.js} +1 -1
- package/.output/public/_nuxt/{BjuaAObh.js → Bwb67i0N.js} +1 -1
- package/.output/public/_nuxt/BzjID9Cq.js +1 -0
- package/.output/public/_nuxt/{CiQ26sNy.js → C1l91at_.js} +1 -1
- package/.output/public/_nuxt/{BMvFv6jI.js → C2bV0W-5.js} +1 -1
- package/.output/public/_nuxt/{DttQ70UV.js → C3NuDuKi.js} +1 -1
- package/.output/public/_nuxt/{Bs-wwfdd.js → C4dTL9FW.js} +1 -1
- package/.output/public/_nuxt/{Dk9bQRO2.js → CD9IZzyL.js} +1 -1
- package/.output/public/_nuxt/{WGzqBhEG.js → CFZqHRXm.js} +1 -1
- package/.output/public/_nuxt/{DOPHuNj2.js → CGlo_kMv.js} +1 -1
- package/.output/public/_nuxt/{Dl8wxmO8.js → CITemtQf.js} +1 -1
- package/.output/public/_nuxt/{DVHc-zO_.js → CMJSUK-H.js} +1 -1
- package/.output/public/_nuxt/{G0qolO8B.js → CNZHVYcD.js} +1 -1
- package/.output/public/_nuxt/{zfwnkxT3.js → CQAev7YK.js} +1 -1
- package/.output/public/_nuxt/{BOtKQbTN.js → CWuIhYUV.js} +1 -1
- package/.output/public/_nuxt/{DORBRPXG.js → CXpmtNyA.js} +1 -1
- package/.output/public/_nuxt/{CtguGxHp.js → CegcRqck.js} +1 -1
- package/.output/public/_nuxt/{sOT1GCi-.js → Ch2Gy_Jq.js} +1 -1
- package/.output/public/_nuxt/{C92v3IW9.js → Ch6YNyRb.js} +1 -1
- package/.output/public/_nuxt/{igN4Qe67.js → CltdJCW3.js} +1 -1
- package/.output/public/_nuxt/{ftQbM3fg.js → Cn9OSQgD.js} +1 -1
- package/.output/public/_nuxt/{3qWXgFCD.js → Co6lpfLf.js} +1 -1
- package/.output/public/_nuxt/{DSSkXANV.js → CqPpACsD.js} +1 -1
- package/.output/public/_nuxt/{CTDKJDhG.js → CrE5okCm.js} +1 -1
- package/.output/public/_nuxt/{Dw4Cg7Nf.js → CrOrgbVb.js} +1 -1
- package/.output/public/_nuxt/{ooX9n-54.js → Cuw2bLWd.js} +1 -1
- package/.output/public/_nuxt/{C-RMEQ9Z.js → CwMykgI6.js} +1 -1
- package/.output/public/_nuxt/{BRO81Gh9.js → D-Kh5EX5.js} +1 -1
- package/.output/public/_nuxt/{ix1dx0up.js → D50quJR4.js} +1 -1
- package/.output/public/_nuxt/{jzdHQpVv.js → D6GHI16b.js} +1 -1
- package/.output/public/_nuxt/{DMTt8zZn.js → D6PbEaHW.js} +1 -1
- package/.output/public/_nuxt/{IQBJjCG8.js → DBje7PVL.js} +1 -1
- package/.output/public/_nuxt/{Cn9bba5D.js → DDKV2N_x.js} +1 -1
- package/.output/public/_nuxt/{DZSueAzq.js → DGoEMI0x.js} +1 -1
- package/.output/public/_nuxt/{cgHfLQv-.js → DMbE9tLB.js} +1 -1
- package/.output/public/_nuxt/{c2EdAFRI.js → DOO3m68g.js} +1 -1
- package/.output/public/_nuxt/{C4MBnvUO.js → DR2GUCqH.js} +1 -1
- package/.output/public/_nuxt/{D6DrLYm7.js → DU-GKTYY.js} +1 -1
- package/.output/public/_nuxt/{B4j9HAJX.js → DWbGXq4Q.js} +1 -1
- package/.output/public/_nuxt/{CtVqDXHG.js → DWqRK0NR.js} +1 -1
- package/.output/public/_nuxt/{BthfZtMx.js → DYMAo4nl.js} +1 -1
- package/.output/public/_nuxt/{YBDYc8lc.js → D_mxv-NW.js} +1 -1
- package/.output/public/_nuxt/{CYaxpVzZ.js → Dcdtlnln.js} +1 -1
- package/.output/public/_nuxt/{CsuxycK3.js → DfKsQ0_h.js} +1 -1
- package/.output/public/_nuxt/{DSJf9dJs.js → Dkt4PhLY.js} +69 -69
- package/.output/public/_nuxt/{BQhkXItu.js → DnXR4SG8.js} +1 -1
- package/.output/public/_nuxt/{BqXMlJ7D.js → DnmYE2hf.js} +1 -1
- package/.output/public/_nuxt/DrEWV2WJ.js +1 -0
- package/.output/public/_nuxt/{COEP9Jq2.js → Duykt1dX.js} +1 -1
- package/.output/public/_nuxt/{1p9U4j8j.js → DvOzJv-i.js} +1 -1
- package/.output/public/_nuxt/{CvXF1v08.js → DxIPlWEU.js} +1 -1
- package/.output/public/_nuxt/{jp5CTwjY.js → DxxzwePY.js} +1 -1
- package/.output/public/_nuxt/{BWPqy388.js → EmGx9W_F.js} +1 -1
- package/.output/public/_nuxt/{_WIkkhJ8.js → K3E_qicM.js} +1 -1
- package/.output/public/_nuxt/{CC4yodQy.js → MyTZFNw6.js} +1 -1
- package/.output/public/_nuxt/{C9SmO5m-.js → NNwhZZ4z.js} +1 -1
- package/.output/public/_nuxt/{pGWezSXB.js → RA0k-Q4I.js} +1 -1
- package/.output/public/_nuxt/{D_9XBU8V.js → RQ44M8RZ.js} +1 -1
- package/.output/public/_nuxt/{CDK5YcCn.js → ZqcSKg2e.js} +1 -1
- package/.output/public/_nuxt/{IQzC2XZ3.js → _3dvg993.js} +1 -1
- package/.output/public/_nuxt/{D_ZubeWp.js → _Sr4W3xW.js} +1 -1
- package/.output/public/_nuxt/{D4C51duU.js → _TRWl8-u.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/5d3cf5e5-db2e-40bd-b427-023e7971fda6.json +1 -0
- package/.output/public/_nuxt/builds/meta/cc38984b-84f8-4937-af1b-13b64458d5ad.json +1 -0
- package/.output/public/_nuxt/builds/meta/e11bbb3c-952c-46c9-b642-72eef3ba9f20.json +1 -0
- package/.output/public/_nuxt/{Bql8Hogy.js → c3AKS-Ee.js} +1 -1
- package/.output/public/_nuxt/{Cl-cugS2.js → chz_nfvE.js} +1 -1
- package/.output/public/_nuxt/edge-router-CProgLJ1.js +1 -0
- package/.output/public/_nuxt/{entry.hgEPkmv8.css → entry.CpWDKWI4.css} +1 -1
- package/.output/public/_nuxt/{BlIU6Z4u.js → fILPAltm.js} +1 -1
- package/.output/public/_nuxt/{Be0j4D2z.js → fXN7TtPn.js} +1 -1
- package/.output/public/_nuxt/{CK9VabtY.js → g6XwbvFc.js} +1 -1
- package/.output/public/_nuxt/{h0qwTEic.js → la-p9_wj.js} +1 -1
- package/.output/public/_nuxt/{C7DMsgeV.js → mP3i2iAJ.js} +1 -1
- package/.output/public/_nuxt/{BHtmV7ym.js → pWOVCGZF.js} +1 -1
- package/.output/public/_nuxt/{BnTmh09t.js → rnKGjtV6.js} +1 -1
- package/.output/public/_nuxt/{Bawx1qcZ.js → vUjy9bZb.js} +1 -1
- package/.output/public/_nuxt/{CFLii-L2.js → wQOKtWNx.js} +1 -1
- package/.output/public/_nuxt/{BvmKIGhu.js → yrHNnoUa.js} +1 -1
- package/.output/public/libavoid.wasm +0 -0
- package/.output/server/index.mjs +1181 -1167
- package/.output/server/package.json +1 -1
- package/package.json +5 -4
- package/.output/public/_nuxt/5HvNzaKq.js +0 -1
- package/.output/public/_nuxt/DCken9xV.js +0 -14
- package/.output/public/_nuxt/DxJbSEBH.js +0 -1
- package/.output/public/_nuxt/builds/meta/2fb84624-3ce9-43ea-94fb-c5d537778bf1.json +0 -1
- package/.output/public/_nuxt/edge-router-BdPMCV6u.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"#entry";import{_ as y}from"./
|
|
1
|
+
import"#entry";import{_ as y}from"./CXpmtNyA.js";import{S as P,b as i}from"./la-p9_wj.js";import"./CrE5okCm.js";import{_ as b,a as p}from"./BtaKz0Mo.js";import{E as v,aG as o,V as B,Y as k,_ as c,a8 as $,W as r,D as s,aO as u}from"./AP6ofMIl.js";const C={class:"d-flex justify-center ga-1"},D=v({__name:"ApiKeysTable",props:u({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:u(["delete","rotate"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(a){const d=o(a,"search"),n=o(a,"sortBy"),l=o(a,"page"),m=o(a,"itemsPerPage"),h=[i.name,i.id,{title:"Owner",key:"owner",sortable:!1},i.createdAt,i.actions];return(g,t)=>(B(),k(s(P),{search:d.value,"onUpdate:search":t[0]||(t[0]=e=>d.value=e),"sort-by":n.value,"onUpdate:sortBy":t[1]||(t[1]=e=>n.value=e),page:l.value,"onUpdate:page":t[2]||(t[2]=e=>l.value=e),"items-per-page":m.value,"onUpdate:itemsPerPage":t[3]||(t[3]=e=>m.value=e),headers:h,data:a.data,loading:a.loading,"hide-header":a.hideHeader,height:a.height},{"item.owner":c(({item:e})=>[r(s(y),{item:e},null,8,["item"])]),"item.actions":c(({item:e})=>[$("div",C,[r(s(b),{"page-name":"settings.api-key-details","page-params":{projectId:a.projectId,apiKeyId:e.id}},null,8,["page-params"]),r(s(p),{icon:"mdi-refresh",tooltip:"Rotate token",disabled:e.managed,onClick:f=>g.$emit("rotate",e)},null,8,["disabled","onClick"]),r(s(p),{icon:"mdi-delete-outline",tooltip:"Delete API key",color:"error",disabled:e.managed,onClick:f=>g.$emit("delete",e)},null,8,["disabled","onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{D as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as P,_ as U,u as h,v as q}from"#entry";import{S as L}from"./
|
|
1
|
+
import{t as P,_ as U,u as h,v as q}from"#entry";import{S as L}from"./CrE5okCm.js";import{_ as N,I as j}from"./_3dvg993.js";import{E as M,aG as J,u as z,aP as $,V as p,J as B,D as e,Y as w,aI as O,_ as o,ab as g,a9 as E,a3 as x,a8 as r,W as l,a as R,aN as G,ah as V,a5 as F,a6 as H,aQ as K,aO as Q,r as c,j as T,Z as W,aR as Y,aS as Z,$ as X,a0 as ee,aJ as te,aK as ae}from"./AP6ofMIl.js";import{B as le}from"./D6PbEaHW.js";import{D as ne,a as oe}from"./CegcRqck.js";import{O as ie}from"./BQn8TCpH.js";import{_ as se}from"./Ch2Gy_Jq.js";import{u as de}from"./CrOrgbVb.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./Btq1JU4p.js";import"./DfKsQ0_h.js";import"./B4sso3Qi.js";import"./BtRiCtf6.js";const re={class:"pa-4"},ue={class:"binding-form mb-6"},ce={class:"text-right"},me={key:0},ve=M({__name:"BackendRoleBindingsTable",props:Q({roleId:{},readonly:{type:Boolean}},{count:{default:0},countModifiers:{}}),emits:["update:count"],async setup(v){let u,y;const k=J(v,"count"),{$client:S}=z(),b=c([]),n=c([]),d=c(null),s=c(!1),m=c(null),I=T(()=>{const i=new Map(b.value.map(a=>[a.serviceAccountId,a]));return n.value.filter(a=>i.has(a.id)).map(a=>({...a,binding:i.get(a.id)}))}),C=T(()=>{const i=new Set(b.value.map(a=>a.serviceAccountId));return n.value.filter(a=>!i.has(a.id)&&!a.systemName)});async function A(){s.value=!0;try{const i=await S.backendServiceAccountSettings.getRoleBindingsByRole.query({roleId:v.roleId}),a=await P(t=>S.backendServiceAccountSettings.query.query(t));b.value=i,k.value=i.length,n.value=a,m.value=null}catch(i){m.value=i instanceof Error?i.message:"Failed to load role bindings"}finally{s.value=!1}}async function _(){if(d.value){s.value=!0;try{await S.backendServiceAccountSettings.addRoleBinding.mutate({roleId:v.roleId,serviceAccountId:d.value}),d.value=null,await A()}catch(i){m.value=i instanceof Error?i.message:"Failed to update role bindings"}finally{s.value=!1}}}async function D(i){s.value=!0;try{await S.backendServiceAccountSettings.removeRoleBinding.mutate({roleId:v.roleId,serviceAccountId:i}),await A()}catch(a){m.value=a instanceof Error?a.message:"Failed to update role bindings"}finally{s.value=!1}}return[u,y]=$(()=>A()),await u,y(),(i,a)=>(p(),B("div",re,[e(m)?(p(),w(O,{key:0,type:"error",density:"compact",class:"mb-4"},{default:o(()=>[g(E(e(m)),1)]),_:1})):x("",!0),r("div",ue,[l(G,{modelValue:e(d),"onUpdate:modelValue":a[0]||(a[0]=t=>R(d)?d.value=t:null),items:e(C),"item-title":"meta.title","item-value":"id",label:"Service account",density:"compact",variant:"outlined","hide-details":"",disabled:v.readonly||e(s)},null,8,["modelValue","items","disabled"]),l(V,{class:"binding-action",color:"primary",disabled:v.readonly||!e(d),loading:e(s),onClick:_},{default:o(()=>[...a[1]||(a[1]=[g(" Add ",-1)])]),_:1},8,["disabled","loading"])]),l(K,null,{default:o(()=>[a[3]||(a[3]=r("thead",null,[r("tr",null,[r("th",null,"Service account"),r("th",null,"Created"),r("th",{class:"text-right"},"Actions")])],-1)),r("tbody",null,[(p(!0),B(F,null,H(e(I),t=>(p(),B("tr",{key:t.id},[r("td",null,E(t.meta.title),1),r("td",null,[l(N,{value:t.binding.createdAt},null,8,["value"])]),r("td",ce,[l(V,{icon:"mdi-delete-outline",variant:"text",size:"small",disabled:v.readonly||!!t.systemName,onClick:f=>D(t.id)},null,8,["disabled","onClick"])])]))),128)),!e(s)&&e(I).length===0?(p(),B("tr",me,[...a[2]||(a[2]=[r("td",{colspan:"3",class:"text-center text-medium-emphasis py-4"},"No service accounts",-1)])])):x("",!0)])]),_:1})]))}}),fe=U(ve,[["__scopeId","data-v-d34dd208"]]),pe={class:"d-flex ga-2"},Ne=M({__name:"[roleId]",props:{params:{}},async setup(v){let u,y;const k=de(),S=h(),b=v.params.roleId,n=c(([u,y]=$(()=>k.get(b)),u=await u,y(),u)),d=c(!1),s=c(!1),m=c(!1),I=c(!1),C=c(0),A=([u,y]=$(()=>k.getRestrictionOptions()),u=await u,y(),u);if(!n.value)throw q({statusCode:404,statusMessage:"Backend role not found"});const _=[{key:"id",label:"Role ID"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last updated"}];async function D(a){m.value=!0;try{n.value=await k.update(b,a),d.value=!1}finally{m.value=!1}}async function i(){I.value=!0;try{await k.delete(b),await S.push({name:"settings.backend-roles"})}finally{I.value=!1}}return(a,t)=>(p(),B(F,null,[e(n)?(p(),w(e(oe),{key:0},{default:o(()=>[l(e(L),{meta:e(n).meta,"fallback-icon":"mdi-shield-account",title:e(n).meta.title,description:e(n).meta.description},Y({_:2},[e(n).systemName?void 0:{name:"actions",fn:o(()=>[r("div",pe,[l(V,{variant:"outlined","prepend-icon":"mdi-pencil",onClick:t[0]||(t[0]=f=>d.value=!0)},{default:o(()=>[...t[6]||(t[6]=[g(" Edit ",-1)])]),_:1}),l(V,{color:"error",variant:"outlined","prepend-icon":"mdi-delete",onClick:t[1]||(t[1]=f=>s.value=!0)},{default:o(()=>[...t[7]||(t[7]=[g(" Delete ",-1)])]),_:1})])]),key:"0"}]),1032,["meta","title","description"]),e(n).systemName?(p(),w(O,{key:0,type:"info",variant:"tonal",style:{flex:"none"}},{default:o(()=>[...t[8]||(t[8]=[g(" This system-managed role is read-only. ",-1)])]),_:1})):x("",!0),l(e(ne),{title:"Backend Role Details",items:_},{"item.id":o(()=>[l(e(j),{value:e(n).id},null,8,["value"])]),"item.createdAt":o(()=>[l(e(N),{value:e(n).createdAt},null,8,["value"])]),"item.updatedAt":o(()=>[l(e(N),{value:e(n).updatedAt},null,8,["value"])]),_:1}),l(Z,{elevation:0},{default:o(()=>[l(e(ie),{title:"Rules",data:e(n).rules,icon:"mdi-code-braces"},null,8,["data"]),l(e(se),{title:"Service Accounts",icon:"mdi-account-circle",count:e(C)},{default:o(()=>[l(e(fe),{count:e(C),"onUpdate:count":t[2]||(t[2]=f=>R(C)?C.value=f:null),"role-id":e(n).id,readonly:!!e(n).systemName},null,8,["count","role-id","readonly"])]),_:1},8,["count"])]),_:1})]),_:1})):x("",!0),e(n)?(p(),w(e(le),{key:1,visible:e(d),"onUpdate:visible":t[3]||(t[3]=f=>R(d)?d.value=f:null),role:e(n),loading:e(m),"restriction-options":e(A),onSave:D},null,8,["visible","role","loading","restriction-options"])):x("",!0),l(W,{modelValue:e(s),"onUpdate:modelValue":t[5]||(t[5]=f=>R(s)?s.value=f:null),"max-width":"480"},{default:o(()=>[l(X,{title:"Delete backend role"},{default:o(()=>[l(ee,null,{default:o(()=>[...t[9]||(t[9]=[g("This permanently deletes the role and all of its bindings.",-1)])]),_:1}),l(te,null,{default:o(()=>[l(ae),l(V,{variant:"text",onClick:t[4]||(t[4]=f=>s.value=!1)},{default:o(()=>[...t[10]||(t[10]=[g("Cancel",-1)])]),_:1}),l(V,{color:"error",loading:e(I),onClick:i},{default:o(()=>[...t[11]||(t[11]=[g("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});export{Ne as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as B}from"#entry";import{E as w,V as y,Y as g,ac as M,aR as L,_ as t,W as n,b1 as E,D as c,af as N,ab as i,a9 as u,ad as p,ae as I,a3 as h,al as r,aG as S,r as b,a_ as T,w as D,M as Y,b4 as G,a4 as O,aO as P,n as R}from"./AP6ofMIl.js";import{I as U}from"./yrHNnoUa.js";const q=w({__name:"ContextMenuItem",props:{title:{},subtitle:{},color:{},icon:{},customIcon:{},disabled:{type:Boolean},loading:{type:Boolean}},emits:["click"],setup(e,{emit:d}){const a=d;return(o,s)=>(y(),g(M,{disabled:e.disabled,onClick:s[0]||(s[0]=m=>a("click"))},L({append:t(()=>[r(o.$slots,"append")]),default:t(()=>[n(p,{color:e.color},{default:t(()=>[i(u(e.title),1)]),_:1},8,["color"]),e.subtitle?(y(),g(I,{key:0,color:e.color},{default:t(()=>[i(u(e.subtitle),1)]),_:1},8,["color"])):h("",!0),r(o.$slots,"default")]),_:2},[e.loading?{name:"prepend",fn:t(()=>[n(E,{indeterminate:"",color:"primary"})]),key:"0"}:e.customIcon?{name:"prepend",fn:t(()=>[n(c(B),{icon:e.customIcon,color:e.color,style:{"margin-right":"-20px",width:"24px",height:"24px"}},null,8,["icon","color"])]),key:"1"}:e.icon?{name:"prepend",fn:t(()=>[n(N,{color:e.color,style:{"margin-right":"-20px"}},{default:t(()=>[i(u(e.icon),1)]),_:1},8,["color"])]),key:"2"}:void 0]),1032,["disabled"]))}}),z=w({__name:"GenericContextMenu",props:P({title:{},subtitle:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e,{expose:d}){const a=S(e,"visible"),o=b(a.value),s=b(0),m=b(0),x=T("contextMenu"),C=async l=>{l.preventDefault(),a.value=!1,s.value=l.clientX,m.value=l.clientY,o.value=!0,await R(),a.value=!0};return D(a,(l,f,v)=>{if(!l)return;o.value=!0;const V=k=>{const $=x.value?.$el;k.target instanceof Node&&$?.contains(k.target)||(a.value=!1)};window.addEventListener("mousedown",V),v(()=>window.removeEventListener("mousedown",V))},{immediate:!0,flush:"sync"}),Y(()=>{a.value=!1}),d({showContextMenu:C}),(l,f)=>c(o)?(y(),g(G,{key:0,modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=v=>a.value=v),target:[c(s),c(m)],location:"end","close-on-content-click":!1},{default:t(()=>[n(O,{ref_key:"contextMenu",ref:x,density:"compact",variant:"text",style:{"padding-bottom":"0"}},{default:t(()=>[r(l.$slots,"header",{},()=>[n(M,{class:"mb-2"},{default:t(()=>[n(p,null,{default:t(()=>[i(u(e.title),1)]),_:1}),n(I,{class:"d-flex align-center",style:{"font-family":"monospace"}},{default:t(()=>[i(u(e.subtitle)+" ",1),n(U,{content:e.subtitle},null,8,["content"])]),_:1})]),_:1})]),r(l.$slots,"default")]),_:3},512)]),_:3},8,["modelValue","target"])):h("",!0)}});export{q as _,z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aH as h}from"#entry";import{E as u,aG as s,V as c,Y as f,D as i,_ as o,W as g,ab as y,a9 as P,aO as b}from"./
|
|
1
|
+
import{aH as h}from"#entry";import{E as u,aG as s,V as c,Y as f,D as i,_ as o,W as g,ab as y,a9 as P,aO as b}from"./AP6ofMIl.js";import{S as v,b as r}from"./la-p9_wj.js";import"./CrE5okCm.js";import{I as B}from"./_3dvg993.js";import{_ as H}from"./BtaKz0Mo.js";const S=u({__name:"ArtifactsTable",props:b({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(a){const d=s(a,"search"),l=s(a,"sortBy"),n=s(a,"page"),m=s(a,"itemsPerPage"),p=[r.name,r.id,{key:"hash",title:"Hash"},{key:"size",title:"Size"},r.createdAt,r.actions];return(I,t)=>(c(),f(i(v),{search:d.value,"onUpdate:search":t[0]||(t[0]=e=>d.value=e),"sort-by":l.value,"onUpdate:sortBy":t[1]||(t[1]=e=>l.value=e),page:n.value,"onUpdate:page":t[2]||(t[2]=e=>n.value=e),"items-per-page":m.value,"onUpdate:itemsPerPage":t[3]||(t[3]=e=>m.value=e),headers:p,data:a.data,loading:a.loading,"hide-header":a.hideHeader,height:a.height},{"item.hash":o(({item:e})=>[g(i(B),{value:e.hash,"copy-full-text":"Copy full hash"},null,8,["value"])]),"item.size":o(({item:e})=>[y(P(i(h)(e.size)),1)]),"item.actions":o(({item:e})=>[g(i(H),{"page-name":"settings.artifact-details","page-params":{projectId:a.projectId,artifactId:e.id}},null,8,["page-params"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{S as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as $,L as C,D as M,v as x,E as V,n as z}from"#entry";import{t as L}from"./M3Z1JMP1.js";import{_ as N}from"./
|
|
1
|
+
import{Q as $,L as C,D as M,v as x,E as V,n as z}from"#entry";import{t as L}from"./M3Z1JMP1.js";import{_ as N}from"./CXpmtNyA.js";import{E as w,aG as b,V as h,Y as A,D as e,_ as p,W as u,ah as O,a8 as D,a9 as U,aa as E,ab as H,aO as I,aP as g,aS as R}from"./AP6ofMIl.js";import{S as F}from"./CrE5okCm.js";import{_ as G}from"./Duykt1dX.js";import{_ as B,I as Q}from"./_3dvg993.js";import{D as W,a as Y}from"./CegcRqck.js";import{O as q}from"./BQn8TCpH.js";import{_ as T}from"./Ch2Gy_Jq.js";import{S as J,b as j}from"./la-p9_wj.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./CD9IZzyL.js";import"./D-Kh5EX5.js";import"./Btq1JU4p.js";import"./DOO3m68g.js";import"./DfKsQ0_h.js";import"./BtaKz0Mo.js";import"./B4sso3Qi.js";const K={class:"text-body-2"},X=w({__name:"TerminalSessionsTable",props:I({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:I(["openSession"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(n,{emit:i}){const l=i,v=b(n,"search"),f=b(n,"sortBy"),c=b(n,"page"),o=b(n,"itemsPerPage"),d=[j.id,{title:"Started",key:"startedAt"},{title:"Finished",key:"finishedAt"},{title:"Duration",key:"duration"},j.actions],m=(y,r)=>{const t=new Date(y),s=(r?new Date(r):new Date).getTime()-t.getTime(),P=Math.floor(s/1e3),S=Math.floor(P/60),k=Math.floor(S/60);return k>0?`${k}h ${S%60}m ${P%60}s`:S>0?`${S}m ${P%60}s`:`${P}s`};return(y,r)=>(h(),A(e(J),{search:v.value,"onUpdate:search":r[0]||(r[0]=t=>v.value=t),"sort-by":f.value,"onUpdate:sortBy":r[1]||(r[1]=t=>f.value=t),page:c.value,"onUpdate:page":r[2]||(r[2]=t=>c.value=t),"items-per-page":o.value,"onUpdate:itemsPerPage":r[3]||(r[3]=t=>o.value=t),headers:d,data:n.data,loading:n.loading,"hide-header":n.hideHeader},{"item.startedAt":p(({item:t})=>[u(e(B),{value:t.startedAt},null,8,["value"])]),"item.finishedAt":p(({item:t})=>[t.finishedAt?(h(),A(e(B),{key:0,value:t.finishedAt},null,8,["value"])):(h(),A(E,{key:1,size:"small",color:"success",variant:"outlined"},{default:p(()=>[...r[4]||(r[4]=[H("Running",-1)])]),_:1}))]),"item.duration":p(({item:t})=>[D("div",K,U(m(t.startedAt,t.finishedAt)),1)]),"item.actions":p(({item:t})=>[u(O,{variant:"text",icon:"mdi-open-in-new",size:"small",onClick:a=>l("openSession",t.id)},null,8,["onClick"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header"]))}}),Z={class:"text-body-2"},Se=w({__name:"[terminalId]",props:{params:{}},async setup(n){let i,l;const v=$(),f=C(),{projectStore:c}=M();c.initializing?([i,l]=g(()=>V(()=>c.initialized).toBe(!0)),await i,l(),c.addLibraryRoot()):([i,l]=g(()=>c.initialize1()),await i,l(),[i,l]=g(()=>c.initialize2()),await i,l());const o=([i,l]=g(()=>v.get(n.params.terminalId)),i=await i,l(),i);if(!o)throw x({statusCode:404,statusMessage:"Terminal not found"});const d=v.sessions(n.params.terminalId),m=f.forTerminal(n.params.terminalId);[i,l]=g(()=>d.load()),await i,l(),[i,l]=g(()=>m.load()),await i,l();const y=[{key:"terminalId",label:"Terminal ID"},{key:"name",label:"Name"},{key:"serviceAccount",label:"Owner"},{key:"createdAt",label:"Created"},{key:"updatedAt",label:"Last Updated"}],r=t=>{z({name:"terminal-session",params:{projectId:n.params.projectId,sessionId:t}})};return(t,a)=>(h(),A(e(Y),null,{default:p(()=>[u(F,{meta:e(o).meta,"fallback-icon":"mdi-console",title:e(o).meta.title||e(o).name||"Unnamed Terminal",status:e(o).status,"status-map":e(L),description:e(o).meta.description},null,8,["meta","title","status","status-map","description"]),u(e(W),{title:"Terminal Details",items:y},{"item.terminalId":p(()=>[u(e(Q),{value:e(o).id},null,8,["value"])]),"item.name":p(()=>[D("div",Z,U(e(o).name||"N/A"),1)]),"item.serviceAccount":p(()=>[u(e(N),{item:e(o)},null,8,["item"])]),"item.createdAt":p(()=>[u(e(B),{value:e(o).createdAt},null,8,["value"])]),"item.updatedAt":p(()=>[u(e(B),{value:e(o).updatedAt},null,8,["value"])]),_:1}),u(R,{elevation:0},{default:p(()=>[u(e(q),{title:"Spec",data:e(o).spec},null,8,["data"]),u(e(T),{title:"Sessions",icon:"mdi-console",count:e(d).data.value.total},{default:p(()=>[u(e(X),{search:e(d).search.value,"onUpdate:search":a[0]||(a[0]=s=>e(d).search.value=s),"sort-by":e(d).sortBy.value,"onUpdate:sortBy":a[1]||(a[1]=s=>e(d).sortBy.value=s),page:e(d).page.value,"onUpdate:page":a[2]||(a[2]=s=>e(d).page.value=s),"items-per-page":e(d).itemsPerPage.value,"onUpdate:itemsPerPage":a[3]||(a[3]=s=>e(d).itemsPerPage.value=s),"project-id":n.params.projectId,data:e(d).data.value,loading:e(d).isLoading.value,"hide-header":!0,onOpenSession:r},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"]),u(e(T),{title:"Artifacts",icon:"mdi-package-variant",count:e(m).data.value.total},{default:p(()=>[u(e(G),{search:e(m).search.value,"onUpdate:search":a[4]||(a[4]=s=>e(m).search.value=s),"sort-by":e(m).sortBy.value,"onUpdate:sortBy":a[5]||(a[5]=s=>e(m).sortBy.value=s),page:e(m).page.value,"onUpdate:page":a[6]||(a[6]=s=>e(m).page.value=s),"items-per-page":e(m).itemsPerPage.value,"onUpdate:itemsPerPage":a[7]||(a[7]=s=>e(m).itemsPerPage.value=s),"project-id":n.params.projectId,data:e(m).data.value,loading:e(m).isLoading.value,"hide-header":""},null,8,["search","sort-by","page","items-per-page","project-id","data","loading"])]),_:1},8,["count"])]),_:1})]),_:1}))}});export{Se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as F,c as J,W as Q,g as X,i as ee,b as te,n as se,_ as A,r as ne}from"./D_9XBU8V.js";import{Y as oe,Z as ae}from"#entry";import{E as re,d as ie,w as G,H as le,P as ce,V as f,Y as E,aH as de,a as W,D as a,_ as k,aZ as ue,W as h,ah as U,af as L,ab as x,a3 as V,a1 as pe,aW as me,J as P,a5 as z,aI as $,a8 as N,a9 as T,aa as ye,a2 as fe,a6 as we,r as j,j as H}from"./DW3fpWuG.js";async function q(e,s){const t=await X(),n=await s.encrypt(t),l=oe(n),c=await ee(t);return{meta:e,encryptedIdentity:l,recipient:c}}async function he(e,s){const t=new F;return t.setPassphrase(e),{type:"password",...await q(s,t)}}async function ge(e,s){if(!e.title)throw new Error("Display name is required for passkey unlock method");const t=await J({keyName:`[${s.id}] ${s.name} | ${e.title}`}),n=new F;return n.addRecipient(new Q({identity:t})),{type:"passkey",...await q(e,n),passkeyIdentity:t}}function Ae(e,s){const t={title:e.title,description:e.description};if(e.type==="password")return he(e.password,t);if(e.type==="passkey")return ge(t,s);throw new Error(`Unsupported unlock method type: ${e.type}`)}const M=te,O=se;function I(e,s){let t=[];for(let n=0;n<Math.max(e.length,s.length);n++)t.push([e[n],s[n]]);return t}function B(...e){return e.reduce((s,t)=>new Set([...s,...t]),new Set)}function ve(...e){return e.reduce((s,t)=>new Set(Array.from(s).filter(n=>t.has(n))))}const y={sec:1e3};y.min=60*y.sec;y.h=60*y.min;y.d=24*y.h;y.mo=30*y.d;y.y=365*y.mo;function ke(e){if(Number.isNaN(e))return"never";if(e>y.y*100)return"centuries";let s=[];for(let[t,n]of Object.entries(y).reverse()){if(e<n)continue;let l=Math.floor(e/n);s.push(`${l}${t}`),e-=l*n}return s.length>0?s.join(" "):"0 sec"}const u={};u[1]=new Set("0123456789");u["@"]=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");u.v=new Set("aeiouy");u.c=new Set("bcdfghjklmnpqrstvwxz");u.a=B(u.v,u.c);for(const e of"vca")u[e.toUpperCase()]=new Set(Array.from(u[e]).map(s=>s.toUpperCase()));u.l=B(u.a,u.A);u.n=B(u.l,u[1]);u["*"]=B(u.n,u["@"]);const be={s:"cv",S:"Cv"};function Ve(e,s){if(Array.isArray(e)||(e=Array.from(e)),s<0||s>=e.length)throw new Error("Out of bounds index access");return e[s]}function Pe(e,s){let t=M(s),n=[];for(const l of e){const c=BigInt(l);n.push(Number(t%c)),t/=c}return{values:n,entropyLeft:t}}function Y(e){let s=0;for(let t=e;t;s++,t>>=1n);return s-1}function S(e,s){return ke(Number(e)/s*1e3)}function Ne(e){const s=[[1005,"too guessable"],[1000005,"very guessable"],[100000005,"somewhat guessable"],[10000000005,"safely unguessable"]];let t="very unguessable";for(const[n,l]of s)if(e<=BigInt(n)){t=l;break}return t}function K(e){const t=3416.6666666666665/(2*(y.y/1e3)),l=(360+6*320)/6,c=.12,o=(c+c*.33)/60/1e3,b=l*o+t,w=v=>Number(e/BigInt(v))*b;return{score:Ne(e),guesses:{online_throttling:S(e,100/(y.h/1e3)),online:S(e,10),slow:S(e,1e4),fast:S(e,1e10)},costs:{luks:w(22779),filevault2:w(151300),macos:w(1019200),pbkdf2:w(3029200)}}}class Ee{constructor(s){s=s.split("").map(t=>be[t]||t).join(""),this.chars=s.split(""),this.length=this.chars.length,this.sets=this.chars.map(t=>u[t]||new Set([t])),this.lengths=this.sets.map(t=>t.size),this.cardinality=this.sets.reduce((t,n)=>t*BigInt(n.size),1n),this.entropy=Y(this.cardinality)}apply(s){if(this.cardinality>=2n**BigInt(8*s.length/2))throw new Error("Not enough entropy");const{entropyLeft:t,values:n}=Pe(this.lengths,s);return{password:I(this.sets,n).map(([c,d])=>Ve(c,d)).join(""),entropyLeft:t}}inverse({password:s,entropyLeft:t}){const n=I(this.sets,s.split("")).map(([c,d])=>Array.from(c).indexOf(d)),l=I(this.sets,n).reduceRight((c,[d,o])=>c*BigInt(d.size)+BigInt(o),0n);return O(t*this.cardinality+l)}estimate(){return K(this.cardinality)}}const _=e=>new Ee(e),C=[];for(let e=0;e<17;e++)for(let s=0;s<3;s++)for(let t=0;t<2;t++){const n=["cvccvc","cvccvc","cvccvc"];n[s]=t?"1cvcvc":"cvccv1";const l=n.join("-");let c;for(let d=0,o=0;d<l.length;d++){const g=l[d];["c","v"].includes(g)&&(o===e&&(c=l.slice(0,d)+g.toUpperCase()+l.slice(d+1)),o++)}if(!c)throw new Error("Cannot find uppercase syllable index");C.push(c)}const Ce=(()=>{const e=BigInt(C.length),s=_(C[0]).cardinality*e;return{length:20,cardinality:s,entropy:Y(s),estimate:()=>K(s),apply:t=>{let n=M(t);const l=Number(n%e);return _(C[l]).apply(O(n/e))},inverse(t){const l=t.password.split("").map(g=>{const b=Object.entries(u).filter(([w,v])=>["c","v","C","V","1"].includes(w)).map(([w,v])=>[w,ve(v,new Set([g]))]).filter(([w,v])=>v.size>0);if(b.length>1)throw new Error("Too much possible values, cannot detect mask.");return b.length?b[0][0]:g}).join(""),c=C.indexOf(l);if(c<0)throw new Error("Unknown mask");const d=_(C[c]).inverse(t),o=M(d);return O(o*e+BigInt(c))}}})(),xe={class:"ml-2"},Te={key:0,class:"mt-1"},Se={key:1},Be={key:1,class:"mb-4"},Ue={class:"d-flex justify-space-between align-center mb-2"},Ie={class:"text-caption text-medium-emphasis mt-1"},_e={key:0,class:"mt-2"},Me={class:"text-caption text-medium-emphasis ml-4"},Ge=re({__name:"UnlockMethodForm",props:{showTypeSelector:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},showDisplayName:{type:Boolean,default:!0},initialType:{default:"password"},displayNameLabel:{default:"Display Name"},displayNameHint:{default:"A friendly name to identify this unlock method"},passwordHint:{default:"Password must be strong enough to resist offline attacks"},defaultDisplayName:{default:""},defaultDescription:{default:""}},emits:["update:valid","update:form"],setup(e,{expose:s,emit:t}){const n=e,l=t,c=j(!1),d=j(!1),o=ie({type:n.initialType,title:"",description:"",password:"",confirmPassword:""}),g=H(()=>n.showDisplayName?[r=>!!r||"Display name is required",r=>r&&r.length<=100||"Display name must be less than 100 characters"]:[]),b=[r=>!!r||"Password is required"],w=[r=>!!r||"Confirm password is required",r=>r===o.password||"Passwords do not match"],v=()=>{const r=Ce.apply(ne(32)).password;o.password=r,o.confirmPassword=r,d.value=!0},m=H(()=>{if(!o.password)return null;const r=ae.zxcvbn(o.password),i={0:"very-weak",1:"weak",2:"fair",3:"strong",4:"very-strong"},p=Math.max(0,Math.min(4,r.score));return{score:r.score/4*100,level:i[p],estimatedCrackTime:r.crack_times_display.offline_slow_hashing_1e4_per_second||"unknown",recommendations:r.feedback.suggestions||[],warning:r.feedback.warning||void 0}}),R=r=>{switch(r){case"very-weak":return"error";case"weak":return"warning";case"fair":return"info";case"strong":return"success";case"very-strong":return"success";default:return"info"}},D=r=>{switch(r){case"password":return"mdi-key-variant";case"passkey":return"mdi-fingerprint";default:return"mdi-lock"}},Z=()=>{o.type=n.initialType,o.title=n.defaultDisplayName,o.description=n.defaultDescription,o.password="",o.confirmPassword="",d.value=!1};return G(c,r=>{l("update:valid",r)}),G(o,r=>{l("update:form",{...r})},{deep:!0}),le(()=>{o.title=n.defaultDisplayName,o.description=n.defaultDescription}),s({resetForm:Z,form:ce(o)}),(r,i)=>(f(),E(de,{modelValue:a(c),"onUpdate:modelValue":i[6]||(i[6]=p=>W(c)?c.value=p:null)},{default:k(()=>[e.showTypeSelector?(f(),E(ue,{key:0,modelValue:a(o).type,"onUpdate:modelValue":i[0]||(i[0]=p=>a(o).type=p),mandatory:"",variant:"outlined",density:"compact",divided:"",class:"w-100 mb-6"},{default:k(()=>[h(U,{value:"password",class:"flex-grow-1"},{default:k(()=>[h(L,{icon:D("password"),class:"mr-2"},null,8,["icon"]),i[7]||(i[7]=x(" Password ",-1))]),_:1}),h(U,{value:"passkey",class:"flex-grow-1"},{default:k(()=>[h(L,{icon:D("passkey"),class:"mr-2"},null,8,["icon"]),i[8]||(i[8]=x(" Passkey ",-1))]),_:1})]),_:1},8,["modelValue"])):V("",!0),e.showDisplayName?(f(),E(pe,{key:1,modelValue:a(o).title,"onUpdate:modelValue":i[1]||(i[1]=p=>a(o).title=p),class:"mb-4",variant:"outlined",density:"compact",label:e.displayNameLabel,rules:a(g),placeholder:"My unlock method",hint:e.displayNameHint,"persistent-hint":""},null,8,["modelValue","label","rules","hint"])):V("",!0),e.showDescription?(f(),E(me,{key:2,modelValue:a(o).description,"onUpdate:modelValue":i[2]||(i[2]=p=>a(o).description=p),class:"mb-4",variant:"outlined",density:"compact",label:"Description",placeholder:"Optional description for this unlock method",rows:"2","auto-grow":"","hide-details":""},null,8,["modelValue"])):V("",!0),a(o).type==="password"?(f(),P(z,{key:3},[h(a(A),{modelValue:a(o).password,"onUpdate:modelValue":i[3]||(i[3]=p=>a(o).password=p),visible:a(d),"onUpdate:visible":i[4]||(i[4]=p=>W(d)?d.value=p:null),class:"mb-4",label:"Password",rules:b,hint:e.passwordHint,"persistent-hint":""},null,8,["modelValue","visible","hint"]),h(U,{type:"button",class:"mb-4",variant:"tonal","prepend-icon":"mdi-auto-fix",onClick:v},{default:k(()=>[...i[9]||(i[9]=[x(" Generate Secure Password ",-1)])]),_:1}),h(a(A),{modelValue:a(o).confirmPassword,"onUpdate:modelValue":i[5]||(i[5]=p=>a(o).confirmPassword=p),class:"mb-4",label:"Confirm Password",rules:w},null,8,["modelValue"]),a(m)&&a(m).score<40?(f(),E($,{key:0,type:a(m).score<20?"error":"warning",density:"compact",class:"mb-4"},{default:k(()=>[N("div",xe,[N("strong",null,T(a(m).score<20?"Very Weak":"Weak")+" Password:",1),a(m).warning?(f(),P("div",Te,T(a(m).warning),1)):(f(),P("div",Se," This password may be vulnerable to offline attacks. Consider using a stronger password. "))])]),_:1},8,["type"])):V("",!0),a(m)?(f(),P("div",Be,[N("div",Ue,[i[10]||(i[10]=N("span",{class:"text-caption"},"Password Strength",-1)),h(ye,{color:R(a(m).level),size:"small",variant:"flat"},{default:k(()=>[x(T(a(m).level.replace("-"," ").toUpperCase()),1)]),_:1},8,["color"])]),h(fe,{"model-value":a(m).score,color:R(a(m).level),height:"6",rounded:""},null,8,["model-value","color"]),N("div",Ie," Estimated crack time: "+T(a(m).estimatedCrackTime),1),a(m).recommendations.length>0?(f(),P("div",_e,[i[11]||(i[11]=N("div",{class:"text-caption font-weight-medium mb-1"},"Suggestions:",-1)),N("ul",Me,[(f(!0),P(z,null,we(a(m).recommendations,p=>(f(),P("li",{key:p},T(p),1))),128))])])):V("",!0)])):V("",!0)],64)):a(o).type==="passkey"?(f(),E($,{key:4,type:"info",density:"compact",class:"mb-4"},{default:k(()=>[...i[12]||(i[12]=[x(" You'll be prompted to create a passkey using your device's biometric authentication or security key when you click Create. ",-1)])]),_:1})):V("",!0)]),_:1},8,["modelValue"]))}});export{Ge as _,Ae as c};
|
|
1
|
+
import{E as F,c as J,W as Q,g as X,i as ee,b as te,n as se,_ as A,r as ne}from"./RQ44M8RZ.js";import{Y as oe,Z as ae}from"#entry";import{E as re,d as ie,w as G,H as le,P as ce,V as f,Y as E,aH as de,a as W,D as a,_ as k,aZ as ue,W as h,ah as U,af as L,ab as x,a3 as V,a1 as pe,aW as me,J as P,a5 as z,aI as $,a8 as N,a9 as T,aa as ye,a2 as fe,a6 as we,r as j,j as H}from"./AP6ofMIl.js";async function q(e,s){const t=await X(),n=await s.encrypt(t),l=oe(n),c=await ee(t);return{meta:e,encryptedIdentity:l,recipient:c}}async function he(e,s){const t=new F;return t.setPassphrase(e),{type:"password",...await q(s,t)}}async function ge(e,s){if(!e.title)throw new Error("Display name is required for passkey unlock method");const t=await J({keyName:`[${s.id}] ${s.name} | ${e.title}`}),n=new F;return n.addRecipient(new Q({identity:t})),{type:"passkey",...await q(e,n),passkeyIdentity:t}}function Ae(e,s){const t={title:e.title,description:e.description};if(e.type==="password")return he(e.password,t);if(e.type==="passkey")return ge(t,s);throw new Error(`Unsupported unlock method type: ${e.type}`)}const M=te,O=se;function I(e,s){let t=[];for(let n=0;n<Math.max(e.length,s.length);n++)t.push([e[n],s[n]]);return t}function B(...e){return e.reduce((s,t)=>new Set([...s,...t]),new Set)}function ve(...e){return e.reduce((s,t)=>new Set(Array.from(s).filter(n=>t.has(n))))}const y={sec:1e3};y.min=60*y.sec;y.h=60*y.min;y.d=24*y.h;y.mo=30*y.d;y.y=365*y.mo;function ke(e){if(Number.isNaN(e))return"never";if(e>y.y*100)return"centuries";let s=[];for(let[t,n]of Object.entries(y).reverse()){if(e<n)continue;let l=Math.floor(e/n);s.push(`${l}${t}`),e-=l*n}return s.length>0?s.join(" "):"0 sec"}const u={};u[1]=new Set("0123456789");u["@"]=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");u.v=new Set("aeiouy");u.c=new Set("bcdfghjklmnpqrstvwxz");u.a=B(u.v,u.c);for(const e of"vca")u[e.toUpperCase()]=new Set(Array.from(u[e]).map(s=>s.toUpperCase()));u.l=B(u.a,u.A);u.n=B(u.l,u[1]);u["*"]=B(u.n,u["@"]);const be={s:"cv",S:"Cv"};function Ve(e,s){if(Array.isArray(e)||(e=Array.from(e)),s<0||s>=e.length)throw new Error("Out of bounds index access");return e[s]}function Pe(e,s){let t=M(s),n=[];for(const l of e){const c=BigInt(l);n.push(Number(t%c)),t/=c}return{values:n,entropyLeft:t}}function Y(e){let s=0;for(let t=e;t;s++,t>>=1n);return s-1}function S(e,s){return ke(Number(e)/s*1e3)}function Ne(e){const s=[[1005,"too guessable"],[1000005,"very guessable"],[100000005,"somewhat guessable"],[10000000005,"safely unguessable"]];let t="very unguessable";for(const[n,l]of s)if(e<=BigInt(n)){t=l;break}return t}function K(e){const t=3416.6666666666665/(2*(y.y/1e3)),l=(360+6*320)/6,c=.12,o=(c+c*.33)/60/1e3,b=l*o+t,w=v=>Number(e/BigInt(v))*b;return{score:Ne(e),guesses:{online_throttling:S(e,100/(y.h/1e3)),online:S(e,10),slow:S(e,1e4),fast:S(e,1e10)},costs:{luks:w(22779),filevault2:w(151300),macos:w(1019200),pbkdf2:w(3029200)}}}class Ee{constructor(s){s=s.split("").map(t=>be[t]||t).join(""),this.chars=s.split(""),this.length=this.chars.length,this.sets=this.chars.map(t=>u[t]||new Set([t])),this.lengths=this.sets.map(t=>t.size),this.cardinality=this.sets.reduce((t,n)=>t*BigInt(n.size),1n),this.entropy=Y(this.cardinality)}apply(s){if(this.cardinality>=2n**BigInt(8*s.length/2))throw new Error("Not enough entropy");const{entropyLeft:t,values:n}=Pe(this.lengths,s);return{password:I(this.sets,n).map(([c,d])=>Ve(c,d)).join(""),entropyLeft:t}}inverse({password:s,entropyLeft:t}){const n=I(this.sets,s.split("")).map(([c,d])=>Array.from(c).indexOf(d)),l=I(this.sets,n).reduceRight((c,[d,o])=>c*BigInt(d.size)+BigInt(o),0n);return O(t*this.cardinality+l)}estimate(){return K(this.cardinality)}}const _=e=>new Ee(e),C=[];for(let e=0;e<17;e++)for(let s=0;s<3;s++)for(let t=0;t<2;t++){const n=["cvccvc","cvccvc","cvccvc"];n[s]=t?"1cvcvc":"cvccv1";const l=n.join("-");let c;for(let d=0,o=0;d<l.length;d++){const g=l[d];["c","v"].includes(g)&&(o===e&&(c=l.slice(0,d)+g.toUpperCase()+l.slice(d+1)),o++)}if(!c)throw new Error("Cannot find uppercase syllable index");C.push(c)}const Ce=(()=>{const e=BigInt(C.length),s=_(C[0]).cardinality*e;return{length:20,cardinality:s,entropy:Y(s),estimate:()=>K(s),apply:t=>{let n=M(t);const l=Number(n%e);return _(C[l]).apply(O(n/e))},inverse(t){const l=t.password.split("").map(g=>{const b=Object.entries(u).filter(([w,v])=>["c","v","C","V","1"].includes(w)).map(([w,v])=>[w,ve(v,new Set([g]))]).filter(([w,v])=>v.size>0);if(b.length>1)throw new Error("Too much possible values, cannot detect mask.");return b.length?b[0][0]:g}).join(""),c=C.indexOf(l);if(c<0)throw new Error("Unknown mask");const d=_(C[c]).inverse(t),o=M(d);return O(o*e+BigInt(c))}}})(),xe={class:"ml-2"},Te={key:0,class:"mt-1"},Se={key:1},Be={key:1,class:"mb-4"},Ue={class:"d-flex justify-space-between align-center mb-2"},Ie={class:"text-caption text-medium-emphasis mt-1"},_e={key:0,class:"mt-2"},Me={class:"text-caption text-medium-emphasis ml-4"},Ge=re({__name:"UnlockMethodForm",props:{showTypeSelector:{type:Boolean,default:!0},showDescription:{type:Boolean,default:!0},showDisplayName:{type:Boolean,default:!0},initialType:{default:"password"},displayNameLabel:{default:"Display Name"},displayNameHint:{default:"A friendly name to identify this unlock method"},passwordHint:{default:"Password must be strong enough to resist offline attacks"},defaultDisplayName:{default:""},defaultDescription:{default:""}},emits:["update:valid","update:form"],setup(e,{expose:s,emit:t}){const n=e,l=t,c=j(!1),d=j(!1),o=ie({type:n.initialType,title:"",description:"",password:"",confirmPassword:""}),g=H(()=>n.showDisplayName?[r=>!!r||"Display name is required",r=>r&&r.length<=100||"Display name must be less than 100 characters"]:[]),b=[r=>!!r||"Password is required"],w=[r=>!!r||"Confirm password is required",r=>r===o.password||"Passwords do not match"],v=()=>{const r=Ce.apply(ne(32)).password;o.password=r,o.confirmPassword=r,d.value=!0},m=H(()=>{if(!o.password)return null;const r=ae.zxcvbn(o.password),i={0:"very-weak",1:"weak",2:"fair",3:"strong",4:"very-strong"},p=Math.max(0,Math.min(4,r.score));return{score:r.score/4*100,level:i[p],estimatedCrackTime:r.crack_times_display.offline_slow_hashing_1e4_per_second||"unknown",recommendations:r.feedback.suggestions||[],warning:r.feedback.warning||void 0}}),R=r=>{switch(r){case"very-weak":return"error";case"weak":return"warning";case"fair":return"info";case"strong":return"success";case"very-strong":return"success";default:return"info"}},D=r=>{switch(r){case"password":return"mdi-key-variant";case"passkey":return"mdi-fingerprint";default:return"mdi-lock"}},Z=()=>{o.type=n.initialType,o.title=n.defaultDisplayName,o.description=n.defaultDescription,o.password="",o.confirmPassword="",d.value=!1};return G(c,r=>{l("update:valid",r)}),G(o,r=>{l("update:form",{...r})},{deep:!0}),le(()=>{o.title=n.defaultDisplayName,o.description=n.defaultDescription}),s({resetForm:Z,form:ce(o)}),(r,i)=>(f(),E(de,{modelValue:a(c),"onUpdate:modelValue":i[6]||(i[6]=p=>W(c)?c.value=p:null)},{default:k(()=>[e.showTypeSelector?(f(),E(ue,{key:0,modelValue:a(o).type,"onUpdate:modelValue":i[0]||(i[0]=p=>a(o).type=p),mandatory:"",variant:"outlined",density:"compact",divided:"",class:"w-100 mb-6"},{default:k(()=>[h(U,{value:"password",class:"flex-grow-1"},{default:k(()=>[h(L,{icon:D("password"),class:"mr-2"},null,8,["icon"]),i[7]||(i[7]=x(" Password ",-1))]),_:1}),h(U,{value:"passkey",class:"flex-grow-1"},{default:k(()=>[h(L,{icon:D("passkey"),class:"mr-2"},null,8,["icon"]),i[8]||(i[8]=x(" Passkey ",-1))]),_:1})]),_:1},8,["modelValue"])):V("",!0),e.showDisplayName?(f(),E(pe,{key:1,modelValue:a(o).title,"onUpdate:modelValue":i[1]||(i[1]=p=>a(o).title=p),class:"mb-4",variant:"outlined",density:"compact",label:e.displayNameLabel,rules:a(g),placeholder:"My unlock method",hint:e.displayNameHint,"persistent-hint":""},null,8,["modelValue","label","rules","hint"])):V("",!0),e.showDescription?(f(),E(me,{key:2,modelValue:a(o).description,"onUpdate:modelValue":i[2]||(i[2]=p=>a(o).description=p),class:"mb-4",variant:"outlined",density:"compact",label:"Description",placeholder:"Optional description for this unlock method",rows:"2","auto-grow":"","hide-details":""},null,8,["modelValue"])):V("",!0),a(o).type==="password"?(f(),P(z,{key:3},[h(a(A),{modelValue:a(o).password,"onUpdate:modelValue":i[3]||(i[3]=p=>a(o).password=p),visible:a(d),"onUpdate:visible":i[4]||(i[4]=p=>W(d)?d.value=p:null),class:"mb-4",label:"Password",rules:b,hint:e.passwordHint,"persistent-hint":""},null,8,["modelValue","visible","hint"]),h(U,{type:"button",class:"mb-4",variant:"tonal","prepend-icon":"mdi-auto-fix",onClick:v},{default:k(()=>[...i[9]||(i[9]=[x(" Generate Secure Password ",-1)])]),_:1}),h(a(A),{modelValue:a(o).confirmPassword,"onUpdate:modelValue":i[5]||(i[5]=p=>a(o).confirmPassword=p),class:"mb-4",label:"Confirm Password",rules:w},null,8,["modelValue"]),a(m)&&a(m).score<40?(f(),E($,{key:0,type:a(m).score<20?"error":"warning",density:"compact",class:"mb-4"},{default:k(()=>[N("div",xe,[N("strong",null,T(a(m).score<20?"Very Weak":"Weak")+" Password:",1),a(m).warning?(f(),P("div",Te,T(a(m).warning),1)):(f(),P("div",Se," This password may be vulnerable to offline attacks. Consider using a stronger password. "))])]),_:1},8,["type"])):V("",!0),a(m)?(f(),P("div",Be,[N("div",Ue,[i[10]||(i[10]=N("span",{class:"text-caption"},"Password Strength",-1)),h(ye,{color:R(a(m).level),size:"small",variant:"flat"},{default:k(()=>[x(T(a(m).level.replace("-"," ").toUpperCase()),1)]),_:1},8,["color"])]),h(fe,{"model-value":a(m).score,color:R(a(m).level),height:"6",rounded:""},null,8,["model-value","color"]),N("div",Ie," Estimated crack time: "+T(a(m).estimatedCrackTime),1),a(m).recommendations.length>0?(f(),P("div",_e,[i[11]||(i[11]=N("div",{class:"text-caption font-weight-medium mb-1"},"Suggestions:",-1)),N("ul",Me,[(f(!0),P(z,null,we(a(m).recommendations,p=>(f(),P("li",{key:p},T(p),1))),128))])])):V("",!0)])):V("",!0)],64)):a(o).type==="passkey"?(f(),E($,{key:4,type:"info",density:"compact",class:"mb-4"},{default:k(()=>[...i[12]||(i[12]=[x(" You'll be prompted to create a passkey using your device's biometric authentication or security key when you click Create. ",-1)])]),_:1})):V("",!0)]),_:1},8,["modelValue"]))}});export{Ge as _,Ae as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as S,I as C,v as D,E as $,n as A}from"#entry";import{E as h,aG as f,V as P,Y as V,D as e,_ as n,a8 as B,W as s,ab as L,a9 as j,aa as M,aO as b,u as U,aP as k,aS as W}from"./
|
|
1
|
+
import{D as S,I as C,v as D,E as $,n as A}from"#entry";import{E as h,aG as f,V as P,Y as V,D as e,_ as n,a8 as B,W as s,ab as L,a9 as j,aa as M,aO as b,u as U,aP as k,aS as W}from"./AP6ofMIl.js";import{_ as z}from"./DOO3m68g.js";import{S as E}from"./CrE5okCm.js";import{I as x,_ as T}from"./_3dvg993.js";import{D as H,a as N}from"./CegcRqck.js";import{_ as R}from"./Ch2Gy_Jq.js";import{w as G}from"./M3Z1JMP1.js";import{_ as O}from"./DfKsQ0_h.js";import{S as Y,b as y}from"./la-p9_wj.js";import{_ as q,a as I}from"./BtaKz0Mo.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./D-Kh5EX5.js";import"./Btq1JU4p.js";const F={class:"d-flex justify-end gap-1"},J=h({__name:"WorkerVersionsTable",props:b({projectId:{},workerId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:b(["viewLogs","restartVersion"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(a,{emit:i}){const l=i,m=f(a,"search"),g=f(a,"sortBy"),v=f(a,"page"),o=f(a,"itemsPerPage"),w=[{title:"Status",key:"status",sortable:!1},y.name,y.id,{title:"Digest",key:"digest",sortable:!1},{title:"Enabled",key:"enabled",sortable:!1},y.createdAt,y.actions];return(r,d)=>(P(),V(e(Y),{search:m.value,"onUpdate:search":d[0]||(d[0]=t=>m.value=t),"sort-by":g.value,"onUpdate:sortBy":d[1]||(d[1]=t=>g.value=t),page:v.value,"onUpdate:page":d[2]||(d[2]=t=>v.value=t),"items-per-page":o.value,"onUpdate:itemsPerPage":d[3]||(d[3]=t=>o.value=t),headers:w,data:a.data,loading:a.loading,"hide-header":a.hideHeader,height:a.height},{"item.status":n(({item:t})=>[s(e(O),{status:t.status,"status-map":e(G)},null,8,["status","status-map"])]),"item.digest":n(({item:t})=>[s(e(x),{value:t.digest,truncate:!0,"copy-full-text":"Copy full digest"},null,8,["value"])]),"item.enabled":n(({item:t})=>[s(M,{size:"small",color:t.enabled?"success":"secondary",class:"text-uppercase"},{default:n(()=>[L(j(t.enabled?"Enabled":"Disabled"),1)]),_:2},1032,["color"])]),"item.actions":n(({item:t})=>[B("div",F,[s(e(q),{"page-name":"settings.worker-version-details","page-params":{projectId:a.projectId,workerId:a.workerId,versionId:t.id}},null,8,["page-params"]),s(e(I),{icon:"mdi-restart",tooltip:"Restart Worker Version",variant:"text",size:"small",onClick:p=>l("restartVersion",t.id)},null,8,["onClick"]),s(e(I),{icon:"mdi-console",tooltip:"View Logs",variant:"text",size:"small",onClick:p=>l("viewLogs",t.id)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),K={class:"text-body-2"},ue=h({__name:"[workerId]",props:{params:{}},async setup(a){let i,l;const{projectStore:m}=S(),g=C(),{$client:v}=U();m.initializing?([i,l]=k(()=>$(()=>m.initialized).toBe(!0)),await i,l(),m.addLibraryRoot()):([i,l]=k(()=>m.initialize1()),await i,l(),[i,l]=k(()=>m.initialize2()),await i,l());const o=([i,l]=k(()=>g.get(a.params.workerId)),i=await i,l(),i);if(!o)throw D({statusCode:404,statusMessage:"Worker not found"});const w=[{key:"workerId",label:"Worker ID"},{key:"identity",label:"Identity"},{key:"serviceAccount",label:"Service Account"},{key:"createdAt",label:"Created"}],r=g.versions(a.params.workerId);r.load();const d=p=>{A({name:"worker-version-logs",params:{projectId:a.params.projectId,workerVersionId:p}})},t=async p=>{await v.worker.restartVersion.mutate({projectId:a.params.projectId,workerVersionId:p})};return(p,u)=>(P(),V(e(N),null,{default:n(()=>[s(E,{meta:e(o).meta,"fallback-icon":"mdi-progress-wrench",title:e(o).meta.title||e(o).identity,description:e(o).meta.description},null,8,["meta","title","description"]),s(e(H),{title:"Worker Details",items:w},{"item.workerId":n(()=>[s(e(x),{value:e(o).id},null,8,["value"])]),"item.identity":n(()=>[B("div",K,j(e(o).identity),1)]),"item.serviceAccount":n(()=>[s(e(z),{item:e(o)},null,8,["item"])]),"item.createdAt":n(()=>[s(e(T),{value:e(o).createdAt},null,8,["value"])]),_:1}),s(W,{elevation:0},{default:n(()=>[s(e(R),{title:"Worker Versions",icon:"mdi-source-branch",count:e(r).data.value.total},{default:n(()=>[s(e(J),{search:e(r).search.value,"onUpdate:search":u[0]||(u[0]=c=>e(r).search.value=c),"sort-by":e(r).sortBy.value,"onUpdate:sortBy":u[1]||(u[1]=c=>e(r).sortBy.value=c),page:e(r).page.value,"onUpdate:page":u[2]||(u[2]=c=>e(r).page.value=c),"items-per-page":e(r).itemsPerPage.value,"onUpdate:itemsPerPage":u[3]||(u[3]=c=>e(r).itemsPerPage.value=c),"project-id":a.params.projectId,"worker-id":a.params.workerId,data:e(r).data.value,loading:e(r).isLoading.value,"hide-header":!0,onRestartVersion:t,onViewLogs:d},null,8,["search","sort-by","page","items-per-page","project-id","worker-id","data","loading"])]),_:1},8,["count"])]),_:1})]),_:1}))}});export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as W,s as Y}from"./
|
|
1
|
+
import{V as W,s as Y}from"./B4sso3Qi.js";import{M as z,_ as F}from"#entry";import{_ as G}from"./chz_nfvE.js";import{E as J,aG as Z,w as H,V as D,Y as K,_ as n,W as s,$ as Q,a0 as X,aU as h,aV as N,a8 as V,a1 as k,a as y,D as r,aW as _,aN as ee,aI as te,ab as x,a3 as ae,ag as le,aJ as se,aK as ie,ah as S,Z as re,aO as T,r as p,j as u}from"./AP6ofMIl.js";import"./CrE5okCm.js";const ne={class:"builder"},oe={class:"preview"},ue=J({__name:"ProjectApiKeyDialog",props:T({apiKey:{},serviceAccounts:{},restrictionOptions:{},loading:{type:Boolean}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:T(["save"],["update:visible"]),setup(l,{emit:U}){const m=Z(l,"visible"),j=U,v=p(""),f=p(""),d=p(),o=p(""),i=p([]),B=u(()=>Y(i.value)),A=u(()=>l.serviceAccounts.find(a=>a.id===d.value)?.rules??[]),M=u(()=>!!v.value.trim()),O=u(()=>l.serviceAccounts.some(a=>a.id===d.value)),P=u(()=>!o.value||!Number.isNaN(new Date(o.value).getTime())),b=u(()=>i.value.length===0||z.safeParse(i.value).success),w=u(()=>i.value.length===0||i.value.every(a=>a.permissions.every(e=>A.value.some(t=>t.permissions.includes(e)&&$(t,a))))),I=u(()=>M.value&&O.value&&P.value&&b.value&&w.value);H(()=>[m.value,l.apiKey,l.serviceAccounts],()=>{m.value&&(v.value=l.apiKey?.meta.title??"",f.value=l.apiKey?.meta.description??"",d.value=l.apiKey?.serviceAccountId??l.serviceAccounts.find(a=>a.systemName==="admin")?.id,o.value=l.apiKey?.expiresAt?R(l.apiKey.expiresAt):"",i.value=l.apiKey?.restrictionRules??[])},{immediate:!0});function R(a){const e=new Date(a),t=e.getTimezoneOffset()*6e4;return new Date(e.getTime()-t).toISOString().slice(0,16)}function q(){!I.value||!d.value||j("save",{meta:{title:v.value.trim(),description:f.value.trim()||void 0},serviceAccountId:d.value,restrictionRules:i.value,expiresAt:o.value?new Date(o.value):null})}function E(a){d.value=a,i.value=[]}function $(a,e){return a.restrictions?e.restrictions?a.restrictions.every(t=>{const c=e.restrictions?.find(g=>g.type===t.type);if(!c)return!1;if(t.type==="self")return!0;if(c.type==="self")return!1;const L=C(t);return C(c).every(g=>L.includes(g))&&(!("recursive"in c)||!c.recursive||"recursive"in t&&t.recursive)}):!1:!0}function C(a){switch(a.type){case"resources":return a.resourceIds;case"instances":return a.instanceIds;case"owners":return a.serviceAccountIds;case"workers":return a.workerIds}}return(a,e)=>(D(),K(re,{modelValue:m.value,"onUpdate:modelValue":e[5]||(e[5]=t=>m.value=t),"max-width":"1200",class:"api-key-dialog"},{default:n(()=>[s(Q,{title:l.apiKey?"Edit project API key":"Create project API key"},{default:n(()=>[s(X,{class:"content"},{default:n(()=>[s(h,{"no-gutters":"",class:"fill-height"},{default:n(()=>[s(N,{cols:"12",md:"6",class:"pr-md-4 column"},{default:n(()=>[e[7]||(e[7]=V("div",{class:"text-overline mb-2"},"Metadata",-1)),s(k,{modelValue:r(v),"onUpdate:modelValue":e[0]||(e[0]=t=>y(v)?v.value=t:null),class:"flex-grow-0",label:"Title",variant:"outlined",density:"compact",rules:[t=>!!t?.trim()||"Title is required"],required:""},null,8,["modelValue","rules"]),s(_,{modelValue:r(f),"onUpdate:modelValue":e[1]||(e[1]=t=>y(f)?f.value=t:null),class:"flex-grow-0",label:"Description",variant:"outlined",density:"compact",rows:"2"},null,8,["modelValue"]),s(ee,{"model-value":r(d),class:"flex-grow-0",items:l.serviceAccounts,"item-title":"meta.title","item-value":"id",label:"Service account",variant:"outlined",density:"compact",rules:[t=>l.serviceAccounts.some(c=>c.id===t)||"Service account is required"],required:"","onUpdate:modelValue":E},null,8,["model-value","items","rules"]),s(k,{modelValue:r(o),"onUpdate:modelValue":e[2]||(e[2]=t=>y(o)?o.value=t:null),class:"expires-at-field flex-grow-0",type:"datetime-local",label:"Expires at",variant:"outlined",density:"compact",clearable:"",rules:[t=>!t||!Number.isNaN(new Date(t).getTime())||"Expiration must be a valid date and time"]},null,8,["modelValue","rules"]),V("div",ne,[s(G,{modelValue:r(i),"onUpdate:modelValue":e[3]||(e[3]=t=>y(i)?i.value=t:null),options:l.restrictionOptions,"allowed-rules":r(A),"section-title":"Restriction Rules","allow-empty":""},null,8,["modelValue","options","allowed-rules"])]),r(i).length>0&&r(b)&&!r(w)?(D(),K(te,{key:0,type:"error",variant:"outlined",density:"compact",class:"flex-grow-0 mt-2"},{default:n(()=>[...e[6]||(e[6]=[x(" Restriction rules exceed the selected service account permissions. ",-1)])]),_:1})):ae("",!0)]),_:1}),s(le,{vertical:"",class:"d-none d-md-flex"}),s(N,{cols:"12",md:"6",class:"pl-md-4 column"},{default:n(()=>[e[8]||(e[8]=V("div",{class:"text-overline mb-2"},"Restriction preview",-1)),V("div",oe,[s(r(W),{value:r(B),theme:"dark-plus",language:"yaml",options:{readOnly:!0,minimap:{enabled:!1},automaticLayout:!0}},null,8,["value"])])]),_:1})]),_:1})]),_:1}),s(se,null,{default:n(()=>[s(ie),s(S,{disabled:l.loading,onClick:e[4]||(e[4]=t=>m.value=!1)},{default:n(()=>[...e[9]||(e[9]=[x("Cancel",-1)])]),_:1},8,["disabled"]),s(S,{color:"primary",disabled:!r(I),loading:l.loading,onClick:q},{default:n(()=>[...e[10]||(e[10]=[x("Save",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"]))}}),Ve=F(ue,[["__scopeId","data-v-2f9316e5"]]);export{Ve as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as M}from"#entry";import{E as D,aG as b,V as S,Y as R,_ as l,a8 as T,W as o,D as a,aO as V,aP as h,J as N,a as C,Z as A,a5 as O,r as v,ah as P,ab as B,$ as E,a0 as I,a9 as J,aJ as L,aK as j}from"./
|
|
1
|
+
import{u as M}from"#entry";import{E as D,aG as b,V as S,Y as R,_ as l,a8 as T,W as o,D as a,aO as V,aP as h,J as N,a as C,Z as A,a5 as O,r as v,ah as P,ab as B,$ as E,a0 as I,a9 as J,aJ as L,aK as j}from"./AP6ofMIl.js";import"./CrE5okCm.js";import{B as F}from"./D6PbEaHW.js";import{S as G,b as k}from"./la-p9_wj.js";import{_ as H,a as K}from"./BtaKz0Mo.js";import{S as W}from"./BR3j6sCq.js";import{u as Y}from"./CrOrgbVb.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./Btq1JU4p.js";import"./DfKsQ0_h.js";import"./B4sso3Qi.js";import"./_3dvg993.js";import"./BtRiCtf6.js";const Z={class:"d-flex justify-center ga-1"},q=D({__name:"BackendRolesTable",props:V({data:{},loading:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:V(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(r){const d=b(r,"search"),g=b(r,"sortBy"),t=b(r,"page"),c=b(r,"itemsPerPage"),m=[k.name,k.createdAt,k.actions];return(n,i)=>(S(),R(a(G),{search:d.value,"onUpdate:search":i[0]||(i[0]=s=>d.value=s),"sort-by":g.value,"onUpdate:sortBy":i[1]||(i[1]=s=>g.value=s),page:t.value,"onUpdate:page":i[2]||(i[2]=s=>t.value=s),"items-per-page":c.value,"onUpdate:itemsPerPage":i[3]||(i[3]=s=>c.value=s),headers:m,data:r.data,loading:r.loading,height:r.height},{"item.actions":l(({item:s})=>[T("div",Z,[o(a(H),{"page-name":"settings.backend-role-details","page-params":{roleId:s.id}},null,8,["page-params"]),o(a(K),{icon:"mdi-delete-outline",tooltip:"Delete role",color:"error",disabled:!!s.systemName,onClick:f=>n.$emit("delete",s)},null,8,["disabled","onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","height"]))}}),ue=D({__name:"index",async setup(r){let d,g;const t=Y(),c=M(),m=v(!1),n=v(!1),i=v(null),s=v(!1),f=v(!1),U=([d,g]=h(()=>t.getRestrictionOptions()),d=await d,g(),d);async function x(y){s.value=!0;try{const e=await t.create(y);m.value=!1,await c.push({name:"settings.backend-role-details",params:{roleId:e.id}})}finally{s.value=!1}}function w(y){i.value=y,n.value=!0}async function $(){if(i.value){f.value=!0;try{await t.delete(i.value.id),n.value=!1,i.value=null}finally{f.value=!1}}}return t.items.load(),(y,e)=>(S(),N(O,null,[o(a(W),{title:"Backend Roles",icon:"mdi-shield-account",description:"Manage roles that grant backend-wide permissions to service accounts."},{actions:l(()=>[o(P,{color:"primary","prepend-icon":"mdi-plus",onClick:e[0]||(e[0]=u=>m.value=!0)},{default:l(()=>[...e[8]||(e[8]=[B("Create role",-1)])]),_:1})]),default:l(({height:u})=>[o(a(q),{search:a(t).items.search,"onUpdate:search":e[1]||(e[1]=p=>a(t).items.search=p),"sort-by":a(t).items.sortBy,"onUpdate:sortBy":e[2]||(e[2]=p=>a(t).items.sortBy=p),page:a(t).items.page,"onUpdate:page":e[3]||(e[3]=p=>a(t).items.page=p),"items-per-page":a(t).items.itemsPerPage,"onUpdate:itemsPerPage":e[4]||(e[4]=p=>a(t).items.itemsPerPage=p),data:a(t).items.data,loading:a(t).items.isLoading,height:u,onDelete:w},null,8,["search","sort-by","page","items-per-page","data","loading","height"])]),_:1}),o(a(F),{visible:a(m),"onUpdate:visible":e[5]||(e[5]=u=>C(m)?m.value=u:null),loading:a(s),"restriction-options":a(U),onSave:x},null,8,["visible","loading","restriction-options"]),o(A,{modelValue:a(n),"onUpdate:modelValue":e[7]||(e[7]=u=>C(n)?n.value=u:null),"max-width":"480"},{default:l(()=>[o(E,{title:"Delete backend role"},{default:l(()=>[o(I,null,{default:l(()=>[B(' This permanently deletes "'+J(a(i)?.meta.title)+'" and all of its bindings. ',1)]),_:1}),o(L,null,{default:l(()=>[o(j),o(P,{disabled:a(f),onClick:e[6]||(e[6]=u=>n.value=!1)},{default:l(()=>[...e[9]||(e[9]=[B("Cancel",-1)])]),_:1},8,["disabled"]),o(P,{color:"error",loading:a(f),onClick:$},{default:l(()=>[...e[10]||(e[10]=[B("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as U}from"#entry";import{E as C,aG as y,V as D,Y as $,_ as n,a8 as x,W as o,D as a,aO as V,J as M,a as S,Z as T,a5 as w,r as g,ah as P,ab as b,$ as h,a0 as N,a9 as j,aJ as E,aK as I}from"./
|
|
1
|
+
import{u as U}from"#entry";import{E as C,aG as y,V as D,Y as $,_ as n,a8 as x,W as o,D as a,aO as V,J as M,a as S,Z as T,a5 as w,r as g,ah as P,ab as b,$ as h,a0 as N,a9 as j,aJ as E,aK as I}from"./AP6ofMIl.js";import"./CrE5okCm.js";import{u as J,_ as L}from"./D50quJR4.js";import{S as R,b as B}from"./la-p9_wj.js";import{_ as F,a as G}from"./BtaKz0Mo.js";import{S as H}from"./BR3j6sCq.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./Btq1JU4p.js";import"./DfKsQ0_h.js";import"./_3dvg993.js";const K={class:"d-flex justify-center ga-1"},O=C({__name:"BackendServiceAccountsTable",props:V({data:{},loading:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:V(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(r){const t=y(r,"search"),v=y(r,"sortBy"),d=y(r,"page"),l=y(r,"itemsPerPage"),u=[B.name,B.createdAt,B.actions];return(p,s)=>(D(),$(a(R),{search:t.value,"onUpdate:search":s[0]||(s[0]=i=>t.value=i),"sort-by":v.value,"onUpdate:sortBy":s[1]||(s[1]=i=>v.value=i),page:d.value,"onUpdate:page":s[2]||(s[2]=i=>d.value=i),"items-per-page":l.value,"onUpdate:itemsPerPage":s[3]||(s[3]=i=>l.value=i),headers:u,data:r.data,loading:r.loading,height:r.height},{"item.actions":n(({item:i})=>[x("div",K,[o(a(F),{"page-name":"settings.backend-service-account-details","page-params":{serviceAccountId:i.id}},null,8,["page-params"]),o(a(G),{icon:"mdi-delete-outline",tooltip:"Delete service account",color:"error",disabled:!!i.systemName,onClick:k=>p.$emit("delete",i)},null,8,["disabled","onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","height"]))}}),ie=C({__name:"index",setup(r){const t=J(),v=U(),d=g(!1),l=g(!1),u=g(null),p=g(!1),s=g(!1);async function i(f){p.value=!0;try{const e=await t.create(f);d.value=!1,await v.push({name:"settings.backend-service-account-details",params:{serviceAccountId:e.id}})}finally{p.value=!1}}function k(f){u.value=f,l.value=!0}async function A(){if(u.value){s.value=!0;try{await t.delete(u.value.id),l.value=!1,u.value=null}finally{s.value=!1}}}return t.items.load(),(f,e)=>(D(),M(w,null,[o(a(H),{title:"Backend Service Accounts",icon:"mdi-account-key",description:"Manage non-human identities that access backend and project resources."},{actions:n(()=>[o(P,{color:"primary","prepend-icon":"mdi-plus",onClick:e[0]||(e[0]=m=>d.value=!0)},{default:n(()=>[...e[8]||(e[8]=[b(" Create service account ",-1)])]),_:1})]),default:n(({height:m})=>[o(a(O),{search:a(t).items.search,"onUpdate:search":e[1]||(e[1]=c=>a(t).items.search=c),"sort-by":a(t).items.sortBy,"onUpdate:sortBy":e[2]||(e[2]=c=>a(t).items.sortBy=c),page:a(t).items.page,"onUpdate:page":e[3]||(e[3]=c=>a(t).items.page=c),"items-per-page":a(t).items.itemsPerPage,"onUpdate:itemsPerPage":e[4]||(e[4]=c=>a(t).items.itemsPerPage=c),data:a(t).items.data,loading:a(t).items.isLoading,height:m,onDelete:k},null,8,["search","sort-by","page","items-per-page","data","loading","height"])]),_:1}),o(a(L),{visible:a(d),"onUpdate:visible":e[5]||(e[5]=m=>S(d)?d.value=m:null),loading:a(p),onSave:i},null,8,["visible","loading"]),o(T,{modelValue:a(l),"onUpdate:modelValue":e[7]||(e[7]=m=>S(l)?l.value=m:null),"max-width":"480"},{default:n(()=>[o(h,{title:"Delete backend service account"},{default:n(()=>[o(N,null,{default:n(()=>[b(' This permanently deletes "'+j(a(u)?.meta.title)+'" and all of its role and project bindings. ',1)]),_:1}),o(E,null,{default:n(()=>[o(I),o(P,{disabled:a(s),onClick:e[6]||(e[6]=m=>l.value=!1)},{default:n(()=>[...e[9]||(e[9]=[b("Cancel",-1)])]),_:1},8,["disabled"]),o(P,{color:"error",loading:a(s),onClick:A},{default:n(()=>[...e[10]||(e[10]=[b("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}});export{ie as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aI as C,aJ as V,aK as O,aL as E,D as P,t as j,_}from"#entry";import{_ as y}from"./
|
|
1
|
+
import{aI as C,aJ as V,aK as O,aL as E,D as P,t as j,_}from"#entry";import{_ as y}from"./Btq1JU4p.js";import{E as x,u as $,M as N,V as m,Y as f,D as s,r as I,w as W,b4 as B,a as w,_ as d,W as p,b5 as L,b6 as R,a3 as M,b7 as z,a8 as h,am as b,an as k,a9 as S,b8 as D,J as H,au as K,aa as U,j as v}from"./AP6ofMIl.js";import{G as T}from"./DMbE9tLB.js";const A={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},Y={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},q={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},G={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},J={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},X={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},F={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Q={error:"error",evaluated:"success",evaluating:"primary"};function Z(e){return e.instanceId.startsWith(`${E}:`)}function ee(e){return e.instanceId.startsWith("system.import.")}function te(e,r){return Z(e)&&e.status==="deployed"?{name:"instance-state",status:"exported",title:"State",message:"All entities from this instance are exported and can be imported in other projects.",icon:"export",color:"success",order:5,important:!1}:ee(e)&&e.status==="deployed"?{name:"instance-state",status:"imported",title:"State",message:"Entities from another project are imported and available for other instances.",icon:"import",color:"success",order:5,important:!1}:e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:J[e.status],color:X[e.status],order:5,important:!1}}function ae(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function oe(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:q[t.status],color:G[t.status],important:V(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ne(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:F[e.status],color:Q[e.status],important:e.status==="error",order:15}}function se(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function re(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:A[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??Y[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function ie(e,r,t,i){const o=[];if(e&&e.status!=="undeployed"?o.push(te(e,t)):o.push(ae()),e?.lastOperationState&&o.push(oe(e,r)),e?.evaluationState&&o.push(ne(e.evaluationState)),i&&o.push(se(i)),e?.customStatuses)for(const u of e.customStatuses)o.push(re(u));return o.sort((u,c)=>u.order-c.order)}const ce=x({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=P(),{$client:t}=$();let i=null;const o=c=>{const l=c.split(`
|
|
2
2
|
`);for(const n of l)i.writeln(n)};if(C(e.operationState.status)){const{unsubscribe:c}=t.logs.watchInstanceLogs.subscribe({stateId:e.operationState.stateId,operationId:e.operationState.operationId},{onData:l=>{i&&o(l.content)}});N(c)}const u=async c=>{i=c;const l=await j(n=>t.logs.getInstanceLogs.query({projectId:r.projectId,stateId:e.operationState.stateId,operationId:e.operationState.operationId,...n}));for(const n of l)o(n.content)};return(c,l)=>(m(),f(s(T),{class:"mt-2 mb-2",columns:80,rows:24,onLoad:u}))}}),le={key:0,class:"d-flex align-center justify-center",style:{width:"100%",height:"100%"}},ue={class:"d-flex flex-column"},de=x({__name:"InstanceStatusBadge",props:{state:{},operation:{},expectedInputHash:{},validationOutput:{}},setup(e){const r=v(()=>ie(e.state,e.operation,e.expectedInputHash,e.validationOutput)),t=v(()=>r.value.find(n=>n.important)??r.value[0]),i=I(t.value.name),o=I(!1);W([t,e.state],()=>{o.value||(i.value=t.value.name)},{immediate:!0});const u=n=>n.startsWith("#")?{}:{[`text-${n}`]:!0},c=n=>n.startsWith("#")?{color:n}:{},l=v(()=>t.value.progress!==void 0&&t.value.progress<100);return(n,g)=>(m(),f(B,{modelValue:s(o),"onUpdate:modelValue":g[1]||(g[1]=a=>w(o)?o.value=a:null),"open-on-hover":"","close-on-content-click":!1,location:"end"},{activator:d(({props:a})=>[p(U,K(a,{color:s(t).color,style:[{width:"44px"},{padding:s(l)?"0":void 0}],class:"status-chip"}),{default:d(()=>[s(l)?(m(),H("div",le,S(s(t).progress)+"% ",1)):(m(),f(s(y),{key:1,size:20,icon:`mdi-${s(t).icon}`,"custom-icon":s(t).customIcon},null,8,["icon","custom-icon"]))]),_:1},16,["color","style"])]),default:d(()=>[p(D,{color:"black"},{default:d(()=>[p(L,{modelValue:s(i),"onUpdate:modelValue":g[0]||(g[0]=a=>w(i)?i.value=a:null),items:s(r)},{tab:d(({item:a})=>[p(z,{value:a.name},{default:d(()=>[p(s(y),{size:22,icon:`mdi-${a.icon}`,"custom-icon":a.customIcon,color:a.color,class:"mr-2"},null,8,["icon","custom-icon","color"]),h("div",ue,[h("div",{class:k(["font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.title),7),h("div",{class:k(["text-caption font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.status),7)])]),_:2},1032,["value"])]),item:d(({item:a})=>[p(R,{value:a.name},{default:d(()=>[a.logs?e.state?.lastOperationState?.operationId?(m(),f(ce,{key:e.state.lastOperationState.operationId,"instance-id":e.state.id,operationState:e.state.lastOperationState},null,8,["instance-id","operationState"])):M("",!0):(m(),f(s(T),{key:0,class:"mt-2 mb-2",columns:80,rows:24,content:a.message},null,8,["content"]))]),_:2},1032,["value"])]),_:1},8,["modelValue","items"])]),_:1})]),_:1},8,["modelValue"]))}}),he=_(de,[["__scopeId","data-v-c4fa59ee"]]);export{he as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as y,u as S,s as b}from"#entry";import{S as C,b as d}from"./
|
|
1
|
+
import{g as y,u as S,s as b}from"#entry";import{S as C,b as d}from"./la-p9_wj.js";import"./CrE5okCm.js";import{S as w}from"./BR3j6sCq.js";import{E as k,Y as B,_ as u,D as s,V as x,W as g,a as n,ah as L,r as i,j as U}from"./AP6ofMIl.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./_3dvg993.js";import"./Btq1JU4p.js";import"./DfKsQ0_h.js";const Y=k({__name:"project-list",setup(D){const m=y(),f=S(),j=[d.name,d.id,d.createdAt,{key:"actions",title:"Actions"}],r=i(""),P=b(r,300),l=i(),c=i(1),p=i(10),h=U(()=>{const a=P.value.toLowerCase().trim(),e=a?m.projects.filter(o=>o.id.includes(a)||o.meta.title.toLowerCase().includes(a)||o.meta.description?.toLowerCase().includes(a)):m.projects;return{items:e,total:e.length}}),v=a=>{f.push({name:"project",params:{projectId:a}})};return(a,e)=>(x(),B(s(w),{title:"Projects",icon:"mdi-folder-multiple",description:"Manage your projects and their associated instances, secrets, and settings. Projects encapsulate all configurations and data for your application."},{default:u(({height:o})=>[g(s(C),{search:s(r),"onUpdate:search":e[0]||(e[0]=t=>n(r)?r.value=t:null),"sort-by":s(l),"onUpdate:sortBy":e[1]||(e[1]=t=>n(l)?l.value=t:null),page:s(c),"onUpdate:page":e[2]||(e[2]=t=>n(c)?c.value=t:null),"items-per-page":s(p),"onUpdate:itemsPerPage":e[3]||(e[3]=t=>n(p)?p.value=t:null),headers:j,data:s(h),loading:!1,height:o},{"item.actions":u(({item:t})=>[g(L,{icon:"mdi-arrow-right",variant:"text",size:"small",onClick:V=>v(t.id)},null,8,["onClick"])]),_:1},8,["search","sort-by","page","items-per-page","data","height"])]),_:1}))}});export{Y as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as J,a0 as at}from"#entry";import{E as fn,aG as se,a_ as an,V as ln,Y as un,a1 as hn,_ as ie,W as dn,af as yn,ab as gn,a9 as pn}from"./DW3fpWuG.js";const yt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function lt(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function vt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wn(e,t){lt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function dt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function It(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const xn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function bn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function mn(e){for(let t=0;t<e.length;t++)e[t]=bn(e[t]);return e}const ce=xn?e=>e:mn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",En=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ve(e){if(lt(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=En[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function fe(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function Xt(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,o=0;s<n;s++,o+=2){const c=fe(e.charCodeAt(o)),i=fe(e.charCodeAt(o+1));if(c===void 0||i===void 0){const f=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+o)}r[s]=c*16+i}return r}function _e(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function At(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function ae(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function An(e){const t=r=>e().update(At(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function st(e=32){if(yt&&typeof yt.getRandomValues=="function")return yt.getRandomValues(new Uint8Array(e));if(yt&&typeof yt.randomBytes=="function")return Uint8Array.from(yt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=At(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?t.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=t.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),dt(o)}update(t){return vt(this),this.iHash.update(t),this}digestInto(t){vt(this),lt(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=o,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,At(n),At(t))}const Ht=Uint8Array.from([0]),le=Uint8Array.of();function Bn(e,t,n,r=32){St(e),W(r);const s=e.outputLen;if(r>255*s)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/s);n===void 0&&(n=le);const c=new Uint8Array(o*s),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let u=0;u<o;u++)Ht[0]=u+1,f.update(u===0?le:l).update(n).update(Ht).digestInto(l),c.set(l,s*u),i._cloneInto(f);return i.destroy(),f.destroy(),dt(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,s)=>Bn(e,ke(e,t,n),r,s);function Un(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function In(e,t,n){return e&t^~e&n}function vn(e,t,n){return e&t^e&n^t&n}class _n extends Se{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=It(this.buffer)}update(t){vt(this),t=At(t),lt(t);const{view:n,buffer:r,blockLen:s}=this,o=t.length;for(let c=0;c<o;){const i=Math.min(s-this.pos,o-c);if(i===s){const f=It(t);for(;s<=o-c;c+=s)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){vt(this),wn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:o}=this;let{pos:c}=this;n[c++]=128,dt(this.buffer.subarray(c)),this.padOffset>s-c&&(this.process(r,0),c=0);for(let h=c;h<s;h++)n[h]=0;Un(r,s-8,BigInt(this.length*8),o),this.process(r,0);const i=It(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)i.setUint32(4*h,u[h],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:o,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=o,t.length=s,t.pos=i,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ln=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ct=new Uint32Array(64);class Sn extends _n{constructor(t=32){super(64,t,8,!1),this.A=it[0]|0,this.B=it[1]|0,this.C=it[2]|0,this.D=it[3]|0,this.E=it[4]|0,this.F=it[5]|0,this.G=it[6]|0,this.H=it[7]|0}get(){const{A:t,B:n,C:r,D:s,E:o,F:c,G:i,H:f}=this;return[t,n,r,s,o,c,i,f]}set(t,n,r,s,o,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let h=0;h<16;h++,n+=4)ct[h]=t.getUint32(n,!1);for(let h=16;h<64;h++){const a=ct[h-15],d=ct[h-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;ct[h]=g+ct[h-7]+w+ct[h-16]|0}let{A:r,B:s,C:o,D:c,E:i,F:f,G:l,H:u}=this;for(let h=0;h<64;h++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=u+a+In(i,f,l)+Ln[h]+ct[h]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+vn(r,s,o)|0;u=l,l=f,f=i,i=c+d|0,c=o,o=s,s=r,r=d+g|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,s,o,c,i,f,l,u)}roundClean(){dt(ct)}destroy(){this.set(0,0,0,0,0,0,0,0),dt(this.buffer)}}const Dt=An(()=>new Sn),ot=Dt;function Cn(e,t,n,r){St(e);const s=Le({dkLen:32,asyncTick:10},r),{c:o,dkLen:c,asyncTick:i}=s;if(W(o),W(c),W(i),o<1)throw new Error("iterations (c) should be >= 1");const f=ae(t),l=ae(n),u=new Uint8Array(c),h=mt.create(e,f),a=h._cloneInto().update(l);return{c:o,dkLen:c,asyncTick:i,DK:u,PRF:h,PRFSalt:a}}function kn(e,t,n,r,s){return e.destroy(),t.destroy(),r&&r.destroy(),dt(s),n}function Te(e,t,n,r){const{c:s,dkLen:o,DK:c,PRF:i,PRFSalt:f}=Cn(e,t,n,r);let l;const u=new Uint8Array(4),h=It(u),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<o;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);h.setInt32(0,d,!1),(l=f._cloneInto(l)).update(u).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<s;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return kn(i,f,c,l,a)}function ue(e,t,n,r,s,o){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],u=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],M=e[t++]^n[r++],$=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let N=0;N<8;N+=2)v^=T(C+B|0,7),b^=T(v+C|0,9),B^=T(b+v|0,13),C^=T(B+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),U^=T(I+k|0,7),q^=T(U+I|0,9),k^=T(q+U|0,13),I^=T(k+q|0,18),L^=T(_+A|0,7),x^=T(L+_|0,9),A^=T(x+L|0,13),_^=T(A+x|0,18),H^=T(C+L|0,7),q^=T(H+C|0,9),L^=T(q+H|0,13),C^=T(L+q|0,18),k^=T(S+v|0,7),x^=T(k+S|0,9),v^=T(x+k|0,13),S^=T(v+x|0,18),A^=T(I+m|0,7),b^=T(A+I|0,9),m^=T(b+A|0,13),I^=T(m+b|0,18),B^=T(_+U|0,7),y^=T(B+_|0,9),U^=T(y+B|0,13),_^=T(U+y|0,18);s[o++]=c+C|0,s[o++]=i+H|0,s[o++]=f+q|0,s[o++]=l+L|0,s[o++]=u+v|0,s[o++]=h+S|0,s[o++]=a+k|0,s[o++]=d+x|0,s[o++]=w+b|0,s[o++]=g+m|0,s[o++]=p+I|0,s[o++]=E+A|0,s[o++]=M+B|0,s[o++]=$+y|0,s[o++]=O+U|0,s[o++]=z+_|0}function Nt(e,t,n,r,s){let o=r+0,c=r+16*s;for(let i=0;i<16;i++)n[c+i]=e[t+(2*s-1)*16+i];for(let i=0;i<s;i++,o+=16,t+=16)ue(n,c,e,t,n,o),i>0&&(c+=16),ue(n,o,e,t+=16,n,c)}function Tn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:s,r:o,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:u}=r;if(W(s),W(o),W(c),W(i),W(f),W(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const h=128*o,a=h/4,d=Math.pow(2,32);if(s<=1||(s&s-1)!==0||s>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(h*(s+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Dt,e,t,{c:1,dkLen:h*c}),p=Kt(g),E=Kt(new Uint8Array(h*s)),M=Kt(new Uint8Array(h));let $=()=>{};if(u){const O=2*s*c,z=Math.max(Math.floor(O/1e4),1);let C=0;$=()=>{C++,u&&(!(C%z)||C===O)&&u(C/O)}}return{N:s,r:o,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:M,blockMixCb:$,asyncTick:f}}function Kn(e,t,n,r,s){const o=Te(Dt,e,n,{c:1,dkLen:t});return dt(n,r,s),o}function Ke(e,t,n){const{N:r,r:s,p:o,dkLen:c,blockSize32:i,V:f,B32:l,B:u,tmp:h,blockMixCb:a}=Tn(e,t,n);ce(l);for(let d=0;d<o;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,s),a();Nt(f,(r-1)*i,l,w,s),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)h[E]=l[w+E]^f[p*i+E];Nt(h,0,l,w,s),a()}}return ce(l),Kn(e,c,u,f,h)}function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function qt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Hn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ft(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Nn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const qn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Mn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Mn(e);else if(He(e))e=$t(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function On(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Rn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const $n=(e,t)=>{function n(r,...s){if(j(r),!qn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const u=s[0];if(!u)throw new Error("nonce / iv required");e.varSizeNonce?j(u):j(u,e.nonceLength)}const o=e.tagLength;o&&s[1]!==void 0&&j(s[1]);const c=t(r,...s),i=(u,h)=>{if(h!==void 0){if(u!==2)throw new Error("cipher output not supported");j(h)}};let f=!1;return{encrypt(u,h){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(u),i(c.encrypt.length,h),c.encrypt(u,h)},decrypt(u,h){if(j(u),o&&u.length<o)throw new Error("invalid ciphertext length: smaller than tagLength="+o);return i(c.decrypt.length,h),c.decrypt(u,h)}}}return Object.assign(n,e),n};function de(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!jn(t))throw new Error("invalid output, must be aligned");return t}function ye(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function zn(e,t,n){Ot(n);const r=new Uint8Array(16),s=Nn(r);return ye(s,0,BigInt(t),n),ye(s,8,BigInt(e),n),r}function jn(e){return e.byteOffset%4===0}function $t(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Vn=Ne("expand 16-byte k"),Pn=Ne("expand 32-byte k"),Wn=ft(Vn),Gn=ft(Pn);function K(e,t){return e<<t|e>>>32-t}function zt(e){return e.byteOffset%4===0}const Bt=64,Xn=16,qe=2**32-1,ge=new Uint32Array;function Dn(e,t,n,r,s,o,c,i){const f=s.length,l=new Uint8Array(Bt),u=ft(l),h=zt(s)&&zt(o),a=h?ft(s):ge,d=h?ft(o):ge;for(let w=0;w<f;c++){if(e(t,n,r,u,c,i),c>=qe)throw new Error("arx: counter overflow");const g=Math.min(Bt,f-w);if(h&&g===Bt){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,M;E<Xn;E++)M=p+E,d[M]=a[M]^u[E];w+=Bt;continue}for(let p=0,E;p<g;p++)E=w+p,o[E]=s[E]^l[p];w+=g}}function Yn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:s,counterRight:o,rounds:c}=On({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return qt(s),qt(c),Ot(o),Ot(n),(i,f,l,u,h=0)=>{j(i),j(f),j(l);const a=l.length;if(u===void 0&&(u=new Uint8Array(a)),j(u),qt(h),h<0||h>=qe)throw new Error("arx: counter overflow");if(u.length<a)throw new Error(`arx: output (${u.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=$t(i)),p=Gn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Wn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);zt(f)||d.push(f=$t(f));const E=ft(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ft(f.subarray(0,16)),E),f=f.subarray(16)}const M=16-s;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,o?0:12-f.length),f=O,d.push(f)}const $=ft(f);return Dn(e,p,E,$,l,u,h,c),xt(...d),u}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Zn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),s=R(t,4),o=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|s<<6)&7939,this.r[3]=(s>>>7|o<<9)&8191,this.r[4]=(o>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=R(t,16+2*u)}process(t,n,r=!1){const s=r?0:2048,{h:o,r:c}=this,i=c[0],f=c[1],l=c[2],u=c[3],h=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),M=R(t,n+2),$=R(t,n+4),O=R(t,n+6),z=R(t,n+8),C=R(t,n+10),H=R(t,n+12),q=R(t,n+14);let L=o[0]+(E&8191),v=o[1]+((E>>>13|M<<3)&8191),S=o[2]+((M>>>10|$<<6)&8191),k=o[3]+(($>>>7|O<<9)&8191),x=o[4]+((O>>>4|z<<12)&8191),b=o[5]+(z>>>1&8191),m=o[6]+((z>>>14|C<<2)&8191),I=o[7]+((C>>>11|H<<5)&8191),A=o[8]+((H>>>8|q<<8)&8191),B=o[9]+(q>>>5|s),y=0,U=y+L*i+v*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=U>>>13,U&=8191,U+=b*(5*a)+m*(5*h)+I*(5*u)+A*(5*l)+B*(5*f),y+=U>>>13,U&=8191;let _=y+L*f+v*i+S*(5*p)+k*(5*g)+x*(5*w);y=_>>>13,_&=8191,_+=b*(5*d)+m*(5*a)+I*(5*h)+A*(5*u)+B*(5*l),y+=_>>>13,_&=8191;let N=y+L*l+v*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+I*(5*a)+A*(5*h)+B*(5*u),y+=N>>>13,N&=8191;let P=y+L*u+v*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+I*(5*d)+A*(5*a)+B*(5*h),y+=P>>>13,P&=8191;let tt=y+L*h+v*u+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+I*(5*w)+A*(5*d)+B*(5*a),y+=tt>>>13,tt&=8191;let Y=y+L*a+v*h+S*u+k*l+x*f;y=Y>>>13,Y&=8191,Y+=b*i+m*(5*p)+I*(5*g)+A*(5*w)+B*(5*d),y+=Y>>>13,Y&=8191;let Z=y+L*d+v*a+S*h+k*u+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+I*(5*p)+A*(5*g)+B*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+v*d+S*a+k*h+x*u;y=F>>>13,F&=8191,F+=b*l+m*f+I*i+A*(5*p)+B*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+v*w+S*d+k*a+x*h;y=et>>>13,et&=8191,et+=b*u+m*l+I*f+A*i+B*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+v*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*h+m*u+I*l+A*f+B*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+U|0,U=y&8191,y=y>>>13,_+=y,o[0]=U,o[1]=_,o[2]=N,o[3]=P,o[4]=tt,o[5]=Y,o[6]=Z,o[7]=F,o[8]=et,o[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=s,s=t[i]>>>13,t[i]&=8191;t[0]+=s*5,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,r[0]=t[0]+5,s=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+s,s=r[i]>>>13,r[i]&=8191;r[9]-=8192;let o=(s^1)-1;for(let i=0;i<10;i++)r[i]&=o;o=~o;for(let i=0;i<10;i++)t[i]=t[i]&o|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,s=t.length;for(let o=0;o<s;){const c=Math.min(r-this.pos,s-o);if(c===r){for(;r<=s-o;o+=r)this.process(t,o);continue}n.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Hn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:s}=this;if(s){for(n[s++]=1;s<16;s++)n[s]=0;this.process(n,0,!0)}this.finalize();let o=0;for(let c=0;c<8;c++)t[o++]=r[c]>>>0,t[o++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Fn(e){const t=(r,s)=>e(s).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Qn=Fn(e=>new Zn(e));function Jn(e,t,n,r,s,o=20){let c=e[0],i=e[1],f=e[2],l=e[3],u=t[0],h=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],M=s,$=n[0],O=n[1],z=n[2],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let P=0;P<o;P+=2)C=C+v|0,B=K(B^C,16),b=b+B|0,v=K(v^b,12),C=C+v|0,B=K(B^C,8),b=b+B|0,v=K(v^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),q=q+k|0,U=K(U^q,16),I=I+U|0,k=K(k^I,12),q=q+k|0,U=K(U^q,8),I=I+U|0,k=K(k^I,7),L=L+x|0,_=K(_^L,16),A=A+_|0,x=K(x^A,12),L=L+x|0,_=K(_^L,8),A=A+_|0,x=K(x^A,7),C=C+S|0,_=K(_^C,16),I=I+_|0,S=K(S^I,12),C=C+S|0,_=K(_^C,8),I=I+_|0,S=K(S^I,7),H=H+k|0,B=K(B^H,16),A=A+B|0,k=K(k^A,12),H=H+k|0,B=K(B^H,8),A=A+B|0,k=K(k^A,7),q=q+x|0,y=K(y^q,16),b=b+y|0,x=K(x^b,12),q=q+x|0,y=K(y^q,8),b=b+y|0,x=K(x^b,7),L=L+v|0,U=K(U^L,16),m=m+U|0,v=K(v^m,12),L=L+v|0,U=K(U^L,8),m=m+U|0,v=K(v^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+q|0,r[N++]=l+L|0,r[N++]=u+v|0,r[N++]=h+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+I|0,r[N++]=E+A|0,r[N++]=M+B|0,r[N++]=$+y|0,r[N++]=O+U|0,r[N++]=z+_|0}const tr=Yn(Jn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),er=new Uint8Array(16),pe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(er.subarray(n))},nr=new Uint8Array(32);function we(e,t,n,r,s){const o=e(t,n,nr),c=Qn.create(o);s&&pe(c,s),pe(c,r);const i=zn(r.length,s?s.length:0,!0);c.update(i);const f=c.digest();return xt(o,i),f}const rr=e=>(t,n,r)=>({encrypt(o,c){const i=o.length;c=de(i+16,c,!1),c.set(o);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=we(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(o,c){c=de(o.length-16,c,!1);const i=o.subarray(0,-16),f=o.subarray(-16),l=we(e,t,n,i,r);if(!Rn(f,l))throw new Error("invalid tag");return c.set(o.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=$n({blockSize:64,nonceLength:12,tagLength:16},rr(tr));const Me=BigInt(0),xe=BigInt(1);function or(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Me:BigInt("0x"+e)}function sr(e){return Oe(ve(e))}function jt(e){return lt(e),Oe(ve(Uint8Array.from(e).reverse()))}function Re(e,t){return Xt(e.toString(16).padStart(t*2,"0"))}function $e(e,t){return Re(e,t).reverse()}function oo(e){return Xt(or(e))}function be(e,t,n){let r;if(typeof t=="string")try{r=Xt(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(Ue(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}const Mt=e=>typeof e=="bigint"&&Me<=e;function ir(e,t,n){return Mt(e)&&Mt(t)&&Mt(n)&&t<=e&&e<n}function me(e,t,n,r){if(!ir(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const cr=e=>(xe<<BigInt(e))-xe;function fr(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(s,o,c){const i=e[s];if(c&&i===void 0)return;const f=typeof i;if(f!==o||i===null)throw new Error(`param "${s}" is invalid: expected ${o}, got ${f}`)}Object.entries(t).forEach(([s,o])=>r(s,o,!1)),Object.entries(n).forEach(([s,o])=>r(s,o,!0))}const V=BigInt(0),G=BigInt(1),ht=BigInt(2),ze=BigInt(3),je=BigInt(4),Ve=BigInt(5),ar=BigInt(7),Pe=BigInt(8),lr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function D(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function Ee(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,s=V,o=G;for(;n!==V;){const i=r/n,f=r%n,l=s-o*i;r=n,n=f,s=o,o=l}if(r!==G)throw new Error("invert: does not exist");return X(s,t)}function Yt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Yt(e,r,t),r}function ur(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),s=e.pow(r,n),o=e.mul(t,s),c=e.mul(e.mul(o,ht),s),i=e.mul(o,e.sub(c,e.ONE));return Yt(e,i,t),i}function hr(e){const t=Zt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),s=n(t,r),o=n(t,t.neg(r)),c=(e+ar)/We;return(i,f)=>{let l=i.pow(f,c),u=i.mul(l,r);const h=i.mul(l,s),a=i.mul(l,o),d=i.eql(i.sqr(u),f),w=i.eql(i.sqr(h),f);l=i.cmov(l,u,d),u=i.cmov(a,h,w);const g=i.eql(i.sqr(u),f),p=i.cmov(l,u,g);return Yt(i,p,f),p}}function Xe(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const s=Zt(e);for(;Ae(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let o=s.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ae(f,l)!==1)throw new Error("Cannot find square root");let u=n,h=f.mul(f.ONE,o),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===u)throw new Error("Cannot find square root");const p=G<<BigInt(u-w-1),E=f.pow(h,p);u=w,h=f.sqr(E),a=f.mul(a,h),d=f.mul(d,E)}return d}}function dr(e){return e%je===ze?Ge:e%Pe===Ve?ur:e%We===lr?hr(e):Xe(e)}function yr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,s=t;for(;n>V;)n&G&&(r=e.mul(r,s)),s=e.sqr(s),n>>=G;return r}function gr(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),o=e.inv(s);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),o),r}function Ae(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),s=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!s&&!o&&!c)throw new Error("invalid Legendre symbol result");return s?1:o?0:-1}function pr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Zt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let s,o,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(s=a.BITS),a.sqrt&&(o=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(s=t),r.sqrt&&(o=r.sqrt);const{nBitLength:f,nByteLength:l}=pr(e,s);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const h=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:cr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!h.is0(a)&&h.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>yr(h,a,d),div:(a,d)=>X(a*Ee(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>Ee(a,e),sqrt:o||(a=>(u||(u=dr(e)),u(h,a))),toBytes:a=>n?$e(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):sr(a);if(c&&(w=X(w,e)),!d&&!h.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>gr(h,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(h)}const Et=BigInt(0),gt=BigInt(1),Ut=BigInt(2);function wr(e){return fr(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function xr(e){const t=wr(e),{P:n,type:r,adjustScalarBytes:s,powPminus2:o,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||st,l=i?255:448,u=i?32:56,h=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?Ut**BigInt(254):Ut**BigInt(447),w=i?BigInt(8)*Ut**BigInt(251)-gt:BigInt(4)*Ut**BigInt(445)-gt,g=d+w+gt,p=x=>X(x,n),E=M(h);function M(x){return $e(p(x),u)}function $(x){const b=be("u coordinate",x,u);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(s(be("scalar",x,u)))}function z(x,b){const m=q($(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return M(m)}function C(x){return z(x,E)}function H(x,b,m){const I=p(x*(b-m));return b=p(b-I),m=p(m+I),{x_2:b,x_3:m}}function q(x,b){me("u",x,Et,n),me("scalar",b,d,g);const m=b,I=x;let A=gt,B=Et,y=x,U=gt,_=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P>_^=tt,{x_2:A,x_3:y}=H(_,A,y),{x_2:B,x_3:U}=H(_,B,U),_=tt;const Y=A+B,Z=p(Y*Y),F=A-B,et=p(F*F),nt=Z-et,sn=y+U,cn=y-U,ee=p(cn*Y),ne=p(sn*F),re=ee+ne,oe=ee-ne;y=p(re*re),U=p(I*p(oe*oe)),A=p(Z*et),B=p(nt*(Z+p(a*nt)))}({x_2:A,x_3:y}=H(_,A,y)),{x_2:B,x_3:U}=H(_,B,U);const N=o(B);return p(A*N)}const L={secretKey:u,publicKey:u,seed:u},v=(x=f(u))=>(lt(x,L.seed),x);function S(x){const b=v(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>z(x,b),getPublicKey:x=>C(x),scalarMult:z,scalarMultBase:C,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:E.slice(),lengths:L}}const br=BigInt(1),Be=BigInt(2),mr=BigInt(3),Er=BigInt(5),Ar=BigInt(8),De=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Br={p:De,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Ar,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Ur(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),o=De,i=e*e%o*e%o,f=D(i,Be,o)*i%o,l=D(f,br,o)*e%o,u=D(l,Er,o)*l%o,h=D(u,t,o)*u%o,a=D(h,n,o)*h%o,d=D(a,r,o)*a%o,w=D(d,s,o)*d%o,g=D(w,s,o)*d%o,p=D(g,t,o)*u%o;return{pow_p_5_8:D(p,Be,o)*e%o,b2:i}}function Ir(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const vr=Zt(Br.p,{isLE:!0}),Vt=(()=>{const e=vr.ORDER;return xr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Ur(t);return X(D(n,mr,e)*r,e)},adjustScalarBytes:Ir})})(),Ye=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Ft(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Lr(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},Ye,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function _t(e){return await Ze(async()=>Ft(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const _r=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Lr(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([..._r,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},Ye,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Sr{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),Cr(pt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=pt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:pt(this.transcript)}}}function Cr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function pt(e){const t=e.reduce(((s,o)=>s+o.length),0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function kr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Tr(e,t){const n=e.getReader(),r=[];let s=0;for(;s<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),s+=l.length}n.releaseLock();const o=pt(r),c=o.subarray(0,t),i=Lt(e,o.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Kr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const o of n)if(o.length===0)throw Error("invalid stanza");const r=[];for(;;){const o=await e.readLine();if(o===null)throw Error("invalid stanza");const c=J.decode(o);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const s=pt(r);return{s:new Ct(n,s)}}async function Hr(e){const t=new Sr(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s,next:o}=await Kr(t);if(s!==void 0){r.push(s);continue}if(!o.startsWith("--- "))throw Error("invalid header");const c=J.decode(o.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-o.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{$ as J,a0 as at}from"#entry";import{E as fn,aG as se,a_ as an,V as ln,Y as un,a1 as hn,_ as ie,W as dn,af as yn,ab as gn,a9 as pn}from"./AP6ofMIl.js";const yt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function lt(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function vt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wn(e,t){lt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function dt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function It(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const xn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function bn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function mn(e){for(let t=0;t<e.length;t++)e[t]=bn(e[t]);return e}const ce=xn?e=>e:mn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",En=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ve(e){if(lt(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=En[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function fe(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function Xt(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,o=0;s<n;s++,o+=2){const c=fe(e.charCodeAt(o)),i=fe(e.charCodeAt(o+1));if(c===void 0||i===void 0){const f=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+o)}r[s]=c*16+i}return r}function _e(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function At(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function ae(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function An(e){const t=r=>e().update(At(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function st(e=32){if(yt&&typeof yt.getRandomValues=="function")return yt.getRandomValues(new Uint8Array(e));if(yt&&typeof yt.randomBytes=="function")return Uint8Array.from(yt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=At(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?t.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=t.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),dt(o)}update(t){return vt(this),this.iHash.update(t),this}digestInto(t){vt(this),lt(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=o,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,At(n),At(t))}const Ht=Uint8Array.from([0]),le=Uint8Array.of();function Bn(e,t,n,r=32){St(e),W(r);const s=e.outputLen;if(r>255*s)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/s);n===void 0&&(n=le);const c=new Uint8Array(o*s),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let u=0;u<o;u++)Ht[0]=u+1,f.update(u===0?le:l).update(n).update(Ht).digestInto(l),c.set(l,s*u),i._cloneInto(f);return i.destroy(),f.destroy(),dt(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,s)=>Bn(e,ke(e,t,n),r,s);function Un(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function In(e,t,n){return e&t^~e&n}function vn(e,t,n){return e&t^e&n^t&n}class _n extends Se{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=It(this.buffer)}update(t){vt(this),t=At(t),lt(t);const{view:n,buffer:r,blockLen:s}=this,o=t.length;for(let c=0;c<o;){const i=Math.min(s-this.pos,o-c);if(i===s){const f=It(t);for(;s<=o-c;c+=s)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){vt(this),wn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:o}=this;let{pos:c}=this;n[c++]=128,dt(this.buffer.subarray(c)),this.padOffset>s-c&&(this.process(r,0),c=0);for(let h=c;h<s;h++)n[h]=0;Un(r,s-8,BigInt(this.length*8),o),this.process(r,0);const i=It(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)i.setUint32(4*h,u[h],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:o,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=o,t.length=s,t.pos=i,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ln=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ct=new Uint32Array(64);class Sn extends _n{constructor(t=32){super(64,t,8,!1),this.A=it[0]|0,this.B=it[1]|0,this.C=it[2]|0,this.D=it[3]|0,this.E=it[4]|0,this.F=it[5]|0,this.G=it[6]|0,this.H=it[7]|0}get(){const{A:t,B:n,C:r,D:s,E:o,F:c,G:i,H:f}=this;return[t,n,r,s,o,c,i,f]}set(t,n,r,s,o,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let h=0;h<16;h++,n+=4)ct[h]=t.getUint32(n,!1);for(let h=16;h<64;h++){const a=ct[h-15],d=ct[h-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;ct[h]=g+ct[h-7]+w+ct[h-16]|0}let{A:r,B:s,C:o,D:c,E:i,F:f,G:l,H:u}=this;for(let h=0;h<64;h++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=u+a+In(i,f,l)+Ln[h]+ct[h]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+vn(r,s,o)|0;u=l,l=f,f=i,i=c+d|0,c=o,o=s,s=r,r=d+g|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,s,o,c,i,f,l,u)}roundClean(){dt(ct)}destroy(){this.set(0,0,0,0,0,0,0,0),dt(this.buffer)}}const Dt=An(()=>new Sn),ot=Dt;function Cn(e,t,n,r){St(e);const s=Le({dkLen:32,asyncTick:10},r),{c:o,dkLen:c,asyncTick:i}=s;if(W(o),W(c),W(i),o<1)throw new Error("iterations (c) should be >= 1");const f=ae(t),l=ae(n),u=new Uint8Array(c),h=mt.create(e,f),a=h._cloneInto().update(l);return{c:o,dkLen:c,asyncTick:i,DK:u,PRF:h,PRFSalt:a}}function kn(e,t,n,r,s){return e.destroy(),t.destroy(),r&&r.destroy(),dt(s),n}function Te(e,t,n,r){const{c:s,dkLen:o,DK:c,PRF:i,PRFSalt:f}=Cn(e,t,n,r);let l;const u=new Uint8Array(4),h=It(u),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<o;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);h.setInt32(0,d,!1),(l=f._cloneInto(l)).update(u).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<s;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return kn(i,f,c,l,a)}function ue(e,t,n,r,s,o){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],u=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],M=e[t++]^n[r++],$=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let N=0;N<8;N+=2)v^=T(C+B|0,7),b^=T(v+C|0,9),B^=T(b+v|0,13),C^=T(B+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),U^=T(I+k|0,7),q^=T(U+I|0,9),k^=T(q+U|0,13),I^=T(k+q|0,18),L^=T(_+A|0,7),x^=T(L+_|0,9),A^=T(x+L|0,13),_^=T(A+x|0,18),H^=T(C+L|0,7),q^=T(H+C|0,9),L^=T(q+H|0,13),C^=T(L+q|0,18),k^=T(S+v|0,7),x^=T(k+S|0,9),v^=T(x+k|0,13),S^=T(v+x|0,18),A^=T(I+m|0,7),b^=T(A+I|0,9),m^=T(b+A|0,13),I^=T(m+b|0,18),B^=T(_+U|0,7),y^=T(B+_|0,9),U^=T(y+B|0,13),_^=T(U+y|0,18);s[o++]=c+C|0,s[o++]=i+H|0,s[o++]=f+q|0,s[o++]=l+L|0,s[o++]=u+v|0,s[o++]=h+S|0,s[o++]=a+k|0,s[o++]=d+x|0,s[o++]=w+b|0,s[o++]=g+m|0,s[o++]=p+I|0,s[o++]=E+A|0,s[o++]=M+B|0,s[o++]=$+y|0,s[o++]=O+U|0,s[o++]=z+_|0}function Nt(e,t,n,r,s){let o=r+0,c=r+16*s;for(let i=0;i<16;i++)n[c+i]=e[t+(2*s-1)*16+i];for(let i=0;i<s;i++,o+=16,t+=16)ue(n,c,e,t,n,o),i>0&&(c+=16),ue(n,o,e,t+=16,n,c)}function Tn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:s,r:o,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:u}=r;if(W(s),W(o),W(c),W(i),W(f),W(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const h=128*o,a=h/4,d=Math.pow(2,32);if(s<=1||(s&s-1)!==0||s>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(h*(s+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Dt,e,t,{c:1,dkLen:h*c}),p=Kt(g),E=Kt(new Uint8Array(h*s)),M=Kt(new Uint8Array(h));let $=()=>{};if(u){const O=2*s*c,z=Math.max(Math.floor(O/1e4),1);let C=0;$=()=>{C++,u&&(!(C%z)||C===O)&&u(C/O)}}return{N:s,r:o,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:M,blockMixCb:$,asyncTick:f}}function Kn(e,t,n,r,s){const o=Te(Dt,e,n,{c:1,dkLen:t});return dt(n,r,s),o}function Ke(e,t,n){const{N:r,r:s,p:o,dkLen:c,blockSize32:i,V:f,B32:l,B:u,tmp:h,blockMixCb:a}=Tn(e,t,n);ce(l);for(let d=0;d<o;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,s),a();Nt(f,(r-1)*i,l,w,s),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)h[E]=l[w+E]^f[p*i+E];Nt(h,0,l,w,s),a()}}return ce(l),Kn(e,c,u,f,h)}function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function qt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Hn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ft(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Nn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const qn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Mn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Mn(e);else if(He(e))e=$t(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function On(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Rn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const $n=(e,t)=>{function n(r,...s){if(j(r),!qn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const u=s[0];if(!u)throw new Error("nonce / iv required");e.varSizeNonce?j(u):j(u,e.nonceLength)}const o=e.tagLength;o&&s[1]!==void 0&&j(s[1]);const c=t(r,...s),i=(u,h)=>{if(h!==void 0){if(u!==2)throw new Error("cipher output not supported");j(h)}};let f=!1;return{encrypt(u,h){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(u),i(c.encrypt.length,h),c.encrypt(u,h)},decrypt(u,h){if(j(u),o&&u.length<o)throw new Error("invalid ciphertext length: smaller than tagLength="+o);return i(c.decrypt.length,h),c.decrypt(u,h)}}}return Object.assign(n,e),n};function de(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!jn(t))throw new Error("invalid output, must be aligned");return t}function ye(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function zn(e,t,n){Ot(n);const r=new Uint8Array(16),s=Nn(r);return ye(s,0,BigInt(t),n),ye(s,8,BigInt(e),n),r}function jn(e){return e.byteOffset%4===0}function $t(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Vn=Ne("expand 16-byte k"),Pn=Ne("expand 32-byte k"),Wn=ft(Vn),Gn=ft(Pn);function K(e,t){return e<<t|e>>>32-t}function zt(e){return e.byteOffset%4===0}const Bt=64,Xn=16,qe=2**32-1,ge=new Uint32Array;function Dn(e,t,n,r,s,o,c,i){const f=s.length,l=new Uint8Array(Bt),u=ft(l),h=zt(s)&&zt(o),a=h?ft(s):ge,d=h?ft(o):ge;for(let w=0;w<f;c++){if(e(t,n,r,u,c,i),c>=qe)throw new Error("arx: counter overflow");const g=Math.min(Bt,f-w);if(h&&g===Bt){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,M;E<Xn;E++)M=p+E,d[M]=a[M]^u[E];w+=Bt;continue}for(let p=0,E;p<g;p++)E=w+p,o[E]=s[E]^l[p];w+=g}}function Yn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:s,counterRight:o,rounds:c}=On({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return qt(s),qt(c),Ot(o),Ot(n),(i,f,l,u,h=0)=>{j(i),j(f),j(l);const a=l.length;if(u===void 0&&(u=new Uint8Array(a)),j(u),qt(h),h<0||h>=qe)throw new Error("arx: counter overflow");if(u.length<a)throw new Error(`arx: output (${u.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=$t(i)),p=Gn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Wn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);zt(f)||d.push(f=$t(f));const E=ft(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ft(f.subarray(0,16)),E),f=f.subarray(16)}const M=16-s;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,o?0:12-f.length),f=O,d.push(f)}const $=ft(f);return Dn(e,p,E,$,l,u,h,c),xt(...d),u}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Zn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),s=R(t,4),o=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|s<<6)&7939,this.r[3]=(s>>>7|o<<9)&8191,this.r[4]=(o>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=R(t,16+2*u)}process(t,n,r=!1){const s=r?0:2048,{h:o,r:c}=this,i=c[0],f=c[1],l=c[2],u=c[3],h=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),M=R(t,n+2),$=R(t,n+4),O=R(t,n+6),z=R(t,n+8),C=R(t,n+10),H=R(t,n+12),q=R(t,n+14);let L=o[0]+(E&8191),v=o[1]+((E>>>13|M<<3)&8191),S=o[2]+((M>>>10|$<<6)&8191),k=o[3]+(($>>>7|O<<9)&8191),x=o[4]+((O>>>4|z<<12)&8191),b=o[5]+(z>>>1&8191),m=o[6]+((z>>>14|C<<2)&8191),I=o[7]+((C>>>11|H<<5)&8191),A=o[8]+((H>>>8|q<<8)&8191),B=o[9]+(q>>>5|s),y=0,U=y+L*i+v*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=U>>>13,U&=8191,U+=b*(5*a)+m*(5*h)+I*(5*u)+A*(5*l)+B*(5*f),y+=U>>>13,U&=8191;let _=y+L*f+v*i+S*(5*p)+k*(5*g)+x*(5*w);y=_>>>13,_&=8191,_+=b*(5*d)+m*(5*a)+I*(5*h)+A*(5*u)+B*(5*l),y+=_>>>13,_&=8191;let N=y+L*l+v*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+I*(5*a)+A*(5*h)+B*(5*u),y+=N>>>13,N&=8191;let P=y+L*u+v*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+I*(5*d)+A*(5*a)+B*(5*h),y+=P>>>13,P&=8191;let tt=y+L*h+v*u+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+I*(5*w)+A*(5*d)+B*(5*a),y+=tt>>>13,tt&=8191;let Y=y+L*a+v*h+S*u+k*l+x*f;y=Y>>>13,Y&=8191,Y+=b*i+m*(5*p)+I*(5*g)+A*(5*w)+B*(5*d),y+=Y>>>13,Y&=8191;let Z=y+L*d+v*a+S*h+k*u+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+I*(5*p)+A*(5*g)+B*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+v*d+S*a+k*h+x*u;y=F>>>13,F&=8191,F+=b*l+m*f+I*i+A*(5*p)+B*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+v*w+S*d+k*a+x*h;y=et>>>13,et&=8191,et+=b*u+m*l+I*f+A*i+B*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+v*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*h+m*u+I*l+A*f+B*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+U|0,U=y&8191,y=y>>>13,_+=y,o[0]=U,o[1]=_,o[2]=N,o[3]=P,o[4]=tt,o[5]=Y,o[6]=Z,o[7]=F,o[8]=et,o[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=s,s=t[i]>>>13,t[i]&=8191;t[0]+=s*5,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,r[0]=t[0]+5,s=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+s,s=r[i]>>>13,r[i]&=8191;r[9]-=8192;let o=(s^1)-1;for(let i=0;i<10;i++)r[i]&=o;o=~o;for(let i=0;i<10;i++)t[i]=t[i]&o|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,s=t.length;for(let o=0;o<s;){const c=Math.min(r-this.pos,s-o);if(c===r){for(;r<=s-o;o+=r)this.process(t,o);continue}n.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Hn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:s}=this;if(s){for(n[s++]=1;s<16;s++)n[s]=0;this.process(n,0,!0)}this.finalize();let o=0;for(let c=0;c<8;c++)t[o++]=r[c]>>>0,t[o++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Fn(e){const t=(r,s)=>e(s).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Qn=Fn(e=>new Zn(e));function Jn(e,t,n,r,s,o=20){let c=e[0],i=e[1],f=e[2],l=e[3],u=t[0],h=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],M=s,$=n[0],O=n[1],z=n[2],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let P=0;P<o;P+=2)C=C+v|0,B=K(B^C,16),b=b+B|0,v=K(v^b,12),C=C+v|0,B=K(B^C,8),b=b+B|0,v=K(v^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),q=q+k|0,U=K(U^q,16),I=I+U|0,k=K(k^I,12),q=q+k|0,U=K(U^q,8),I=I+U|0,k=K(k^I,7),L=L+x|0,_=K(_^L,16),A=A+_|0,x=K(x^A,12),L=L+x|0,_=K(_^L,8),A=A+_|0,x=K(x^A,7),C=C+S|0,_=K(_^C,16),I=I+_|0,S=K(S^I,12),C=C+S|0,_=K(_^C,8),I=I+_|0,S=K(S^I,7),H=H+k|0,B=K(B^H,16),A=A+B|0,k=K(k^A,12),H=H+k|0,B=K(B^H,8),A=A+B|0,k=K(k^A,7),q=q+x|0,y=K(y^q,16),b=b+y|0,x=K(x^b,12),q=q+x|0,y=K(y^q,8),b=b+y|0,x=K(x^b,7),L=L+v|0,U=K(U^L,16),m=m+U|0,v=K(v^m,12),L=L+v|0,U=K(U^L,8),m=m+U|0,v=K(v^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+q|0,r[N++]=l+L|0,r[N++]=u+v|0,r[N++]=h+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+I|0,r[N++]=E+A|0,r[N++]=M+B|0,r[N++]=$+y|0,r[N++]=O+U|0,r[N++]=z+_|0}const tr=Yn(Jn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),er=new Uint8Array(16),pe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(er.subarray(n))},nr=new Uint8Array(32);function we(e,t,n,r,s){const o=e(t,n,nr),c=Qn.create(o);s&&pe(c,s),pe(c,r);const i=zn(r.length,s?s.length:0,!0);c.update(i);const f=c.digest();return xt(o,i),f}const rr=e=>(t,n,r)=>({encrypt(o,c){const i=o.length;c=de(i+16,c,!1),c.set(o);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=we(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(o,c){c=de(o.length-16,c,!1);const i=o.subarray(0,-16),f=o.subarray(-16),l=we(e,t,n,i,r);if(!Rn(f,l))throw new Error("invalid tag");return c.set(o.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=$n({blockSize:64,nonceLength:12,tagLength:16},rr(tr));const Me=BigInt(0),xe=BigInt(1);function or(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Me:BigInt("0x"+e)}function sr(e){return Oe(ve(e))}function jt(e){return lt(e),Oe(ve(Uint8Array.from(e).reverse()))}function Re(e,t){return Xt(e.toString(16).padStart(t*2,"0"))}function $e(e,t){return Re(e,t).reverse()}function oo(e){return Xt(or(e))}function be(e,t,n){let r;if(typeof t=="string")try{r=Xt(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(Ue(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}const Mt=e=>typeof e=="bigint"&&Me<=e;function ir(e,t,n){return Mt(e)&&Mt(t)&&Mt(n)&&t<=e&&e<n}function me(e,t,n,r){if(!ir(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const cr=e=>(xe<<BigInt(e))-xe;function fr(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(s,o,c){const i=e[s];if(c&&i===void 0)return;const f=typeof i;if(f!==o||i===null)throw new Error(`param "${s}" is invalid: expected ${o}, got ${f}`)}Object.entries(t).forEach(([s,o])=>r(s,o,!1)),Object.entries(n).forEach(([s,o])=>r(s,o,!0))}const V=BigInt(0),G=BigInt(1),ht=BigInt(2),ze=BigInt(3),je=BigInt(4),Ve=BigInt(5),ar=BigInt(7),Pe=BigInt(8),lr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function D(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function Ee(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,s=V,o=G;for(;n!==V;){const i=r/n,f=r%n,l=s-o*i;r=n,n=f,s=o,o=l}if(r!==G)throw new Error("invert: does not exist");return X(s,t)}function Yt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Yt(e,r,t),r}function ur(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),s=e.pow(r,n),o=e.mul(t,s),c=e.mul(e.mul(o,ht),s),i=e.mul(o,e.sub(c,e.ONE));return Yt(e,i,t),i}function hr(e){const t=Zt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),s=n(t,r),o=n(t,t.neg(r)),c=(e+ar)/We;return(i,f)=>{let l=i.pow(f,c),u=i.mul(l,r);const h=i.mul(l,s),a=i.mul(l,o),d=i.eql(i.sqr(u),f),w=i.eql(i.sqr(h),f);l=i.cmov(l,u,d),u=i.cmov(a,h,w);const g=i.eql(i.sqr(u),f),p=i.cmov(l,u,g);return Yt(i,p,f),p}}function Xe(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const s=Zt(e);for(;Ae(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let o=s.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ae(f,l)!==1)throw new Error("Cannot find square root");let u=n,h=f.mul(f.ONE,o),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===u)throw new Error("Cannot find square root");const p=G<<BigInt(u-w-1),E=f.pow(h,p);u=w,h=f.sqr(E),a=f.mul(a,h),d=f.mul(d,E)}return d}}function dr(e){return e%je===ze?Ge:e%Pe===Ve?ur:e%We===lr?hr(e):Xe(e)}function yr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,s=t;for(;n>V;)n&G&&(r=e.mul(r,s)),s=e.sqr(s),n>>=G;return r}function gr(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),o=e.inv(s);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),o),r}function Ae(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),s=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!s&&!o&&!c)throw new Error("invalid Legendre symbol result");return s?1:o?0:-1}function pr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Zt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let s,o,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(s=a.BITS),a.sqrt&&(o=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(s=t),r.sqrt&&(o=r.sqrt);const{nBitLength:f,nByteLength:l}=pr(e,s);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const h=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:cr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!h.is0(a)&&h.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>yr(h,a,d),div:(a,d)=>X(a*Ee(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>Ee(a,e),sqrt:o||(a=>(u||(u=dr(e)),u(h,a))),toBytes:a=>n?$e(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):sr(a);if(c&&(w=X(w,e)),!d&&!h.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>gr(h,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(h)}const Et=BigInt(0),gt=BigInt(1),Ut=BigInt(2);function wr(e){return fr(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function xr(e){const t=wr(e),{P:n,type:r,adjustScalarBytes:s,powPminus2:o,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||st,l=i?255:448,u=i?32:56,h=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?Ut**BigInt(254):Ut**BigInt(447),w=i?BigInt(8)*Ut**BigInt(251)-gt:BigInt(4)*Ut**BigInt(445)-gt,g=d+w+gt,p=x=>X(x,n),E=M(h);function M(x){return $e(p(x),u)}function $(x){const b=be("u coordinate",x,u);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(s(be("scalar",x,u)))}function z(x,b){const m=q($(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return M(m)}function C(x){return z(x,E)}function H(x,b,m){const I=p(x*(b-m));return b=p(b-I),m=p(m+I),{x_2:b,x_3:m}}function q(x,b){me("u",x,Et,n),me("scalar",b,d,g);const m=b,I=x;let A=gt,B=Et,y=x,U=gt,_=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P>_^=tt,{x_2:A,x_3:y}=H(_,A,y),{x_2:B,x_3:U}=H(_,B,U),_=tt;const Y=A+B,Z=p(Y*Y),F=A-B,et=p(F*F),nt=Z-et,sn=y+U,cn=y-U,ee=p(cn*Y),ne=p(sn*F),re=ee+ne,oe=ee-ne;y=p(re*re),U=p(I*p(oe*oe)),A=p(Z*et),B=p(nt*(Z+p(a*nt)))}({x_2:A,x_3:y}=H(_,A,y)),{x_2:B,x_3:U}=H(_,B,U);const N=o(B);return p(A*N)}const L={secretKey:u,publicKey:u,seed:u},v=(x=f(u))=>(lt(x,L.seed),x);function S(x){const b=v(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>z(x,b),getPublicKey:x=>C(x),scalarMult:z,scalarMultBase:C,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:E.slice(),lengths:L}}const br=BigInt(1),Be=BigInt(2),mr=BigInt(3),Er=BigInt(5),Ar=BigInt(8),De=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Br={p:De,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Ar,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Ur(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),o=De,i=e*e%o*e%o,f=D(i,Be,o)*i%o,l=D(f,br,o)*e%o,u=D(l,Er,o)*l%o,h=D(u,t,o)*u%o,a=D(h,n,o)*h%o,d=D(a,r,o)*a%o,w=D(d,s,o)*d%o,g=D(w,s,o)*d%o,p=D(g,t,o)*u%o;return{pow_p_5_8:D(p,Be,o)*e%o,b2:i}}function Ir(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const vr=Zt(Br.p,{isLE:!0}),Vt=(()=>{const e=vr.ORDER;return xr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Ur(t);return X(D(n,mr,e)*r,e)},adjustScalarBytes:Ir})})(),Ye=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Ft(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Lr(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},Ye,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function _t(e){return await Ze(async()=>Ft(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const _r=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Lr(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([..._r,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},Ye,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Sr{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),Cr(pt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=pt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:pt(this.transcript)}}}function Cr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function pt(e){const t=e.reduce(((s,o)=>s+o.length),0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function kr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Tr(e,t){const n=e.getReader(),r=[];let s=0;for(;s<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),s+=l.length}n.releaseLock();const o=pt(r),c=o.subarray(0,t),i=Lt(e,o.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Kr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const o of n)if(o.length===0)throw Error("invalid stanza");const r=[];for(;;){const o=await e.readLine();if(o===null)throw Error("invalid stanza");const c=J.decode(o);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const s=pt(r);return{s:new Ct(n,s)}}async function Hr(e){const t=new Sr(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s,next:o}=await Kr(t);if(s!==void 0){r.push(s);continue}if(!o.startsWith("--- "))throw Error("invalid header");const c=J.decode(o.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-o.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
2
|
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
3
|
`);for(let r=0;r<n.body.length;r+=48){let s=r+48;s>n.body.length&&(s=n.body.length),t.push(J.encode(n.body.subarray(r,s))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as a,J as n,a8 as e,W as o,a9 as i,a5 as l,V as r,ag as m}from"./
|
|
1
|
+
import{E as a,J as n,a8 as e,W as o,a9 as i,a5 as l,V as r,ag as m}from"./AP6ofMIl.js";const u={class:"d-flex justify-space-between mb-2"},d={class:"font-weight-medium"},f=a({__name:"about",setup(c){return(t,s)=>(r(),n(l,null,[s[1]||(s[1]=e("div",{class:"d-flex align-center justify-space-between"},[e("div",null,[e("h2",{class:"text-h5 font-weight-medium mb-1"},"About Highstate Designer"),e("p",{class:"text-body-2 text-medium-emphasis ma-0"}," A powerful infrastructure-as-code management tool that helps you design, deploy, and manage cloud infrastructure with ease. ")])],-1)),o(m,{class:"mt-6 mb-6"}),e("div",u,[s[0]||(s[0]=e("span",null,"Version:",-1)),e("span",d,i(t.$config.public.version),1)])],64))}});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as f,V as m,J as p,a8 as u,a9 as n,D as s,W as l,ah as v,_ as c,af as x,ab as d,ai as _}from"./
|
|
1
|
+
import{E as f,V as m,J as p,a8 as u,a9 as n,D as s,W as l,ah as v,_ as c,af as x,ab as d,ai as _}from"./AP6ofMIl.js";import{a3 as h,_ as y}from"#entry";import"./CrE5okCm.js";const $=t=>t?t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"Unknown",g=t=>{if(!t)return"Unknown";const o=Date.now()-t.getTime(),e=Math.floor(o/(1e3*60*60*24)),a=Math.floor(o/(1e3*60*60)),i=Math.floor(o/(1e3*60));return e>0?`${e} day${e===1?"":"s"} ago`:a>0?`${a} hour${a===1?"":"s"} ago`:i>0?`${i} minute${i===1?"":"s"} ago`:"Just now"},T=t=>`${t.slice(0,8)}...${t.slice(-8)}`,b={class:"text-body-2"},C={class:"text-caption text-medium-emphasis"},M=f({__name:"TimeTableCell",props:{value:{}},setup(t){return(r,o)=>(m(),p("div",null,[u("div",b,n(s($)(t.value)),1),u("div",C,n(s(g)(t.value)),1)]))}}),w={class:"d-flex align-center"},I={class:"text-caption text-medium-emphasis font-mono mr-2"},V=f({__name:"IdTableCell",props:{value:{},truncate:{type:Boolean,default:!0},copyFullText:{default:"Copy full ID"}},setup(t){const{copy:r}=h();return(o,e)=>(m(),p("div",w,[u("code",I,n(t.truncate?s(T)(t.value):t.value),1),l(v,{icon:"mdi-content-copy",variant:"text",size:"x-small",onClick:e[0]||(e[0]=a=>s(r)(t.value))},{default:c(()=>[l(x,{size:"16"},{default:c(()=>[...e[1]||(e[1]=[d("mdi-content-copy",-1)])]),_:1}),l(_,{activator:"parent",location:"top"},{default:c(()=>[d(n(t.copyFullText),1)]),_:1})]),_:1})]))}}),N=y(V,[["__scopeId","data-v-0dcfb73b"]]);export{N as I,M as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,f as s}from"#entry";import{V as a,J as i,a8 as t,a9 as r}from"./
|
|
1
|
+
import{_ as o,f as s}from"#entry";import{V as a,J as i,a8 as t,a9 as r}from"./AP6ofMIl.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:500},statusText:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,h)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.status)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusText)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},k=o(f,[["__scopeId","data-v-4b1fbc82"]]);export{k as default};
|