@samyx/preview-stacks-ui 0.31.0 → 0.33.0
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/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js +2 -0
- package/dist/assets/{ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js.map → ActionButton.vue_vue_type_script_setup_true_lang-AGS1FKpY.js.map} +1 -1
- package/dist/assets/{AxesTab-BNAORqpJ.js → AxesTab-DlGjhnwi.js} +2 -2
- package/dist/assets/{AxesTab-BNAORqpJ.js.map → AxesTab-DlGjhnwi.js.map} +1 -1
- package/dist/assets/ConfigTab-BiqFZrvm.js +2 -0
- package/dist/assets/{ConfigTab-8Ifz-gnA.js.map → ConfigTab-BiqFZrvm.js.map} +1 -1
- package/dist/assets/{ConfigView-CPj8QeBo.js → ConfigView-CsQJIt52.js} +2 -2
- package/dist/assets/{ConfigView-CPj8QeBo.js.map → ConfigView-CsQJIt52.js.map} +1 -1
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-BxG7GEFo.js +2 -0
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-BxG7GEFo.js.map +1 -0
- package/dist/assets/DangerTab-COq-R4Dz.js +2 -0
- package/dist/assets/DangerTab-COq-R4Dz.js.map +1 -0
- package/dist/assets/DashboardView-DTI9n2-Z.js +2 -0
- package/dist/assets/{DashboardView-CuDBbXnZ.js.map → DashboardView-DTI9n2-Z.js.map} +1 -1
- package/dist/assets/DeploymentDetailView-BBMtQ9vE.js +2 -0
- package/dist/assets/{DeploymentDetailView-qtlOQQ0z.js.map → DeploymentDetailView-BBMtQ9vE.js.map} +1 -1
- package/dist/assets/DeploymentsView-BCXfIFud.js +2 -0
- package/dist/assets/DeploymentsView-BCXfIFud.js.map +1 -0
- package/dist/assets/DialogTrigger-D4yBGqUf.js +2 -0
- package/dist/assets/DialogTrigger-D4yBGqUf.js.map +1 -0
- package/dist/assets/{EquivalentCommand-DX5xFW-p.js → EquivalentCommand-D0dyw0Wd.js} +3 -3
- package/dist/assets/{EquivalentCommand-DX5xFW-p.js.map → EquivalentCommand-D0dyw0Wd.js.map} +1 -1
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js → ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js} +2 -2
- package/dist/assets/{ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js.map → ErrorNote.vue_vue_type_script_setup_true_lang-BrBUwK6j.js.map} +1 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CTbPBhLs.js +2 -0
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-CTbPBhLs.js.map +1 -0
- package/dist/assets/JobDetailView-DIEijrhl.js +2 -0
- package/dist/assets/JobDetailView-DIEijrhl.js.map +1 -0
- package/dist/assets/JobsView-CC7lre3Q.css +1 -0
- package/dist/assets/JobsView-Dw4-yNCj.js +2 -0
- package/dist/assets/JobsView-Dw4-yNCj.js.map +1 -0
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-B3YVBpn-.js +3 -0
- package/dist/assets/{LogViewer.vue_vue_type_script_setup_true_lang-Sg8LzIyX.js.map → LogViewer.vue_vue_type_script_setup_true_lang-B3YVBpn-.js.map} +1 -1
- package/dist/assets/{LoginView-Gpnnyg1m.js → LoginView-NgcWC4N0.js} +2 -2
- package/dist/assets/{LoginView-Gpnnyg1m.js.map → LoginView-NgcWC4N0.js.map} +1 -1
- package/dist/assets/LogsTab-oWjSPx9O.js +6 -0
- package/dist/assets/{LogsTab-CZ0fNgsO.js.map → LogsTab-oWjSPx9O.js.map} +1 -1
- package/dist/assets/{NotFoundView-BE2kvYuP.js → NotFoundView-DnQQJSu_.js} +2 -2
- package/dist/assets/{NotFoundView-BE2kvYuP.js.map → NotFoundView-DnQQJSu_.js.map} +1 -1
- package/dist/assets/NotifiersView-CvP3L81J.js +2 -0
- package/dist/assets/{NotifiersView-Df_CM6Bj.js.map → NotifiersView-CvP3L81J.js.map} +1 -1
- package/dist/assets/OverviewTab-C10J0ywh.js +2 -0
- package/dist/assets/{OverviewTab-BSeic8dR.js.map → OverviewTab-C10J0ywh.js.map} +1 -1
- package/dist/assets/PublicLogsView-DqMmMbtf.js +4 -0
- package/dist/assets/{PublicLogsView-BDyvxkgj.js.map → PublicLogsView-DqMmMbtf.js.map} +1 -1
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js → RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js} +2 -2
- package/dist/assets/{RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js.map → RefreshButton.vue_vue_type_script_setup_true_lang-8Tme6z_i.js.map} +1 -1
- package/dist/assets/RegistriesView-DIa3mCyc.js +2 -0
- package/dist/assets/{RegistriesView-DMzsLFcT.js.map → RegistriesView-DIa3mCyc.js.map} +1 -1
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-eoX10cnp.js +2 -0
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-eoX10cnp.js.map +1 -0
- package/dist/assets/{RequiresTab-DkuxJsEj.js → RequiresTab-Dde68lOF.js} +2 -2
- package/dist/assets/{RequiresTab-DkuxJsEj.js.map → RequiresTab-Dde68lOF.js.map} +1 -1
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js +2 -0
- package/dist/assets/RouteTarget.vue_vue_type_script_setup_true_lang-DgcXRES0.js.map +1 -0
- package/dist/assets/RoutingView-oXXCIL07.js +9 -0
- package/dist/assets/RoutingView-oXXCIL07.js.map +1 -0
- package/dist/assets/RoutingView-tn0RQdqM.css +0 -0
- package/dist/assets/RuntimeTab-By55qdsQ.css +1 -0
- package/dist/assets/RuntimeTab-DFxU8OLh.js +2 -0
- package/dist/assets/RuntimeTab-DFxU8OLh.js.map +1 -0
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-Bjd8KlYw.js +2 -0
- package/dist/assets/{SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js.map → SelectMenu.vue_vue_type_script_setup_true_lang-Bjd8KlYw.js.map} +1 -1
- package/dist/assets/SettingsView-DwSmnNbU.js +2 -0
- package/dist/assets/SettingsView-DwSmnNbU.js.map +1 -0
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js → SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js} +2 -2
- package/dist/assets/{SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js.map → SkeletonList.vue_vue_type_script_setup_true_lang-CvoOnzDO.js.map} +1 -1
- package/dist/assets/SpecDetailView-D10gsC8W.js +2 -0
- package/dist/assets/{SpecDetailView-BlHaL1Y8.js.map → SpecDetailView-D10gsC8W.js.map} +1 -1
- package/dist/assets/SpecsView-BU962Blv.js +2 -0
- package/dist/assets/{SpecsView-C-bS2Av2.js.map → SpecsView-BU962Blv.js.map} +1 -1
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-aKprkHCF.js → SsoMark.vue_vue_type_script_setup_true_lang-BzRkYwRn.js} +2 -2
- package/dist/assets/{SsoMark.vue_vue_type_script_setup_true_lang-aKprkHCF.js.map → SsoMark.vue_vue_type_script_setup_true_lang-BzRkYwRn.js.map} +1 -1
- package/dist/assets/SsoView-AzBjKwF_.css +1 -0
- package/dist/assets/SsoView-BJO4vMED.js +2 -0
- package/dist/assets/SsoView-BJO4vMED.js.map +1 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-CzLuB-ZI.js +2 -0
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-CzLuB-ZI.js.map +1 -0
- package/dist/assets/{SubmitView-s5haxS9q.js → SubmitView-CChPoIvR.js} +5 -5
- package/dist/assets/{SubmitView-s5haxS9q.js.map → SubmitView-CChPoIvR.js.map} +1 -1
- package/dist/assets/SwarmView-xPA-5INc.js +2 -0
- package/dist/assets/{SwarmView-skNbhHws.js.map → SwarmView-xPA-5INc.js.map} +1 -1
- package/dist/assets/Teleport-Bg1yDCl9.js +4 -0
- package/dist/assets/{Teleport-CKfsIrp8.js.map → Teleport-Bg1yDCl9.js.map} +1 -1
- package/dist/assets/TerminalTab-jUQlwJpM.js +3 -0
- package/dist/assets/{TerminalTab-CPuFkMzh.js.map → TerminalTab-jUQlwJpM.js.map} +1 -1
- package/dist/assets/UsersView-Bd8B9pLD.css +1 -0
- package/dist/assets/UsersView-DcjfdY6Q.js +2 -0
- package/dist/assets/UsersView-DcjfdY6Q.js.map +1 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-gohbG3IW.js +2 -0
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-gohbG3IW.js.map +1 -0
- package/dist/assets/VarIO-BVE8A4Ur.css +1 -0
- package/dist/assets/VarIO-gtGLr9Br.js +15 -0
- package/dist/assets/VarIO-gtGLr9Br.js.map +1 -0
- package/dist/assets/VariablesView-Ck3IyRCN.css +1 -0
- package/dist/assets/VariablesView-DSXnmTTH.js +3 -0
- package/dist/assets/VariablesView-DSXnmTTH.js.map +1 -0
- package/dist/assets/index-B1ONXQzZ.css +1 -0
- package/dist/assets/index-DB2WhG8N.js +154 -0
- package/dist/assets/index-DB2WhG8N.js.map +1 -0
- package/dist/assets/useDeployment-B7wpJY-X.js +2 -0
- package/dist/assets/{useDeployment-CV0kcdoc.js.map → useDeployment-B7wpJY-X.js.map} +1 -1
- package/dist/assets/useJobQueue-D5JkRJNX.js +2 -0
- package/dist/assets/useJobQueue-D5JkRJNX.js.map +1 -0
- package/dist/index.html +2 -2
- package/package.json +2 -1
- package/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js +0 -2
- package/dist/assets/ConfigTab-8Ifz-gnA.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-B0PJUns4.js +0 -2
- package/dist/assets/ConflictNote.vue_vue_type_script_setup_true_lang-B0PJUns4.js.map +0 -1
- package/dist/assets/DangerTab-BwXkb6Rr.js +0 -2
- package/dist/assets/DangerTab-BwXkb6Rr.js.map +0 -1
- package/dist/assets/DashboardView-CuDBbXnZ.js +0 -2
- package/dist/assets/DeploymentDetailView-qtlOQQ0z.js +0 -2
- package/dist/assets/DeploymentsView-CQwTTlTI.js +0 -2
- package/dist/assets/DeploymentsView-CQwTTlTI.js.map +0 -1
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js +0 -2
- package/dist/assets/HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js.map +0 -1
- package/dist/assets/JobDetailView-BgoEL7EB.js +0 -2
- package/dist/assets/JobDetailView-BgoEL7EB.js.map +0 -1
- package/dist/assets/JobsView-CVG0iuN4.js +0 -2
- package/dist/assets/JobsView-CVG0iuN4.js.map +0 -1
- package/dist/assets/LogViewer.vue_vue_type_script_setup_true_lang-Sg8LzIyX.js +0 -3
- package/dist/assets/LogsTab-CZ0fNgsO.js +0 -6
- package/dist/assets/NotifiersView-Df_CM6Bj.js +0 -2
- package/dist/assets/OverviewTab-BSeic8dR.js +0 -2
- package/dist/assets/PublicLogsView-BDyvxkgj.js +0 -4
- package/dist/assets/RegistriesView-DMzsLFcT.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js +0 -2
- package/dist/assets/RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js.map +0 -1
- package/dist/assets/RoutingView-BEJ3iJ9c.js +0 -9
- package/dist/assets/RoutingView-BEJ3iJ9c.js.map +0 -1
- package/dist/assets/RuntimeTab-DY8ZYeng.css +0 -1
- package/dist/assets/RuntimeTab-bWJuLJcn.js +0 -2
- package/dist/assets/RuntimeTab-bWJuLJcn.js.map +0 -1
- package/dist/assets/SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js +0 -2
- package/dist/assets/SettingsView-CgwOmLat.js +0 -2
- package/dist/assets/SettingsView-CgwOmLat.js.map +0 -1
- package/dist/assets/SpecDetailView-BlHaL1Y8.js +0 -2
- package/dist/assets/SpecsView-C-bS2Av2.js +0 -2
- package/dist/assets/SsoView-BUz2EaVq.js +0 -2
- package/dist/assets/SsoView-BUz2EaVq.js.map +0 -1
- package/dist/assets/SsoView-JmlPQGWM.css +0 -1
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js +0 -2
- package/dist/assets/StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js.map +0 -1
- package/dist/assets/SwarmView-skNbhHws.js +0 -2
- package/dist/assets/Teleport-CKfsIrp8.js +0 -4
- package/dist/assets/TerminalTab-CPuFkMzh.js +0 -3
- package/dist/assets/UsersView-Be77zCYE.css +0 -1
- package/dist/assets/UsersView-CIfFPshj.js +0 -2
- package/dist/assets/UsersView-CIfFPshj.js.map +0 -1
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-JwR7DqO1.js +0 -2
- package/dist/assets/VarEditor.vue_vue_type_script_setup_true_lang-JwR7DqO1.js.map +0 -1
- package/dist/assets/VariablesView-ByeOvDGJ.css +0 -1
- package/dist/assets/VariablesView-DatC33mT.js +0 -2
- package/dist/assets/VariablesView-DatC33mT.js.map +0 -1
- package/dist/assets/index-B_k9b7xG.css +0 -1
- package/dist/assets/index-T3JGe9ku.js +0 -154
- package/dist/assets/index-T3JGe9ku.js.map +0 -1
- package/dist/assets/useDeployment-CV0kcdoc.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js +0 -2
- package/dist/assets/useFormat-DIlTY5Dl.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ht=e=>{throw TypeError(e)};var fn=(e,t,n)=>t.has(e)||ht("Cannot "+n);var Ae=(e,t,n)=>(fn(e,t,"read from private field"),n?n.call(e):t.get(e)),gt=(e,t,n)=>t.has(e)?ht("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{j as Mt,k as pn,l as Ve,e as mn,r as hn,g as Vt,S as vt,P as Y,c as Ce,a as me,m as gn,u as yt,n as wt,i as vn,f as yn,F as wn,D as xn,o as xt,p as bn,h as Sn,b as Lt,q as Cn,T as _n}from"./Teleport-CKfsIrp8.js";import{j as E,k as q,a8 as Le,a9 as An,aa as Pn,ab as On,ac as En,K as he,ad as qn,d as k,ae as bt,J as de,af as Rn,ag as Tn,o as $,z as L,w as R,$ as V,u as w,ah as Ft,ai as we,R as $n,aj as Bn,ak as kn,c as Z,e as N,a2 as ne,D as Nt,al as In,a1 as it,g as Ee,r as zt,F as lt,a as xe,h as Oe,N as Dn,a0 as Pe,a6 as Ht,a3 as Wt,a4 as jt,am as Mn,f as Kt,an as Vn,ao as Ln,t as Ge}from"./index-T3JGe9ku.js";function St(e){return typeof e=="string"?`'${e}'`:new Fn().serialize(e)}const Fn=(function(){var t;class e{constructor(){gt(this,t,new Map)}compare(o,r){const i=typeof o,l=typeof r;return i==="string"&&l==="string"?o.localeCompare(r):i==="number"&&l==="number"?o-r:String.prototype.localeCompare.call(this.serialize(o,!0),this.serialize(r,!0))}serialize(o,r){if(o===null)return"null";switch(typeof o){case"string":return r?o:`'${o}'`;case"bigint":return`${o}n`;case"object":return this.$object(o);case"function":return this.$function(o)}return String(o)}serializeObject(o){const r=Object.prototype.toString.call(o);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),o);const i=o.constructor,l=i===Object||i===void 0?"":i.name;if(l!==""&&globalThis[l]===i)return this.serializeBuiltInType(l,o);if(typeof o.toJSON=="function"){const a=o.toJSON();return l+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(l,Object.entries(o))}serializeBuiltInType(o,r){const i=this["$"+o];if(i)return i.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(o,r.entries());throw new Error(`Cannot serialize ${o}`)}serializeObjectEntries(o,r){const i=Array.from(r).sort((a,s)=>this.compare(a[0],s[0]));let l=`${o}{`;for(let a=0;a<i.length;a++){const[s,u]=i[a];l+=`${this.serialize(s,!0)}:${this.serialize(u)}`,a<i.length-1&&(l+=",")}return l+"}"}$object(o){let r=Ae(this,t).get(o);return r===void 0&&(Ae(this,t).set(o,`#${Ae(this,t).size}`),r=this.serializeObject(o),Ae(this,t).set(o,r)),r}$function(o){const r=Function.prototype.toString.call(o);return r.slice(-15)==="[native code] }"?`${o.name||""}()[native]`:`${o.name}(${o.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(o){let r="[";for(let i=0;i<o.length;i++)r+=this.serialize(o[i]),i<o.length-1&&(r+=",");return r+"]"}$Date(o){try{return`Date(${o.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(o){return`ArrayBuffer[${new Uint8Array(o).join(",")}]`}$Set(o){return`Set${this.$Array(Array.from(o).sort((r,i)=>this.compare(r,i)))}`}$Map(o){return this.serializeObjectEntries("Map",o.entries())}}t=new WeakMap;for(const n of["Error","RegExp","URL"])e.prototype["$"+n]=function(o){return`${n}(${o})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])e.prototype["$"+n]=function(o){return`${n}[${o.join("n,")}${o.length>0?"n":""}]`};return e})();function Nn(e,t){return e===t||St(e)===St(t)}function Ct(e,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(t,e))}function zn(e){const t=Mt({dir:E("ltr")});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}let Je=0;function Hn(){Le(e=>{if(!pn)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??_t()),document.body.insertAdjacentElement("beforeend",t[1]??_t()),Je++,e(()=>{Je===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Je--})})}function _t(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Wn(e){return q(()=>{var t;return An(e)?!!((t=Ve(e))!=null&&t.closest("form")):!0})}function at(e){const t=Pn(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((r,i)=>{const l=(t==null?void 0:t.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=En(e);return q(()=>{const r={},i=(t==null?void 0:t.vnode.props)??{};return Object.keys(i).forEach(l=>{r[On(l)]=i[l]}),Object.keys({...n,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function jn(e,t){const n=at(e),o=t?mn(t):{};return q(()=>({...n.value,...o}))}function Kn(e){const t=E(),n=q(()=>{var r;return((r=t.value)==null?void 0:r.width)??0}),o=q(()=>{var r;return((r=t.value)==null?void 0:r.height)??0});return he(()=>{const r=Ve(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let s,u;if("borderBoxSize"in a){const p=a.borderBoxSize,f=Array.isArray(p)?p[0]:p;s=f.inlineSize,u=f.blockSize}else s=r.offsetWidth,u=r.offsetHeight;t.value={width:s,height:u}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else t.value=void 0}),{width:n,height:o}}function Ut(e){const t=hn("",1e3);return{search:t,handleTypeaheadSearch:(r,i)=>{t.value=t.value+r;{const l=Vt(),a=i.map(d=>{var c,m;return{...d,textValue:((c=d.value)==null?void 0:c.textValue)??((m=d.ref.textContent)==null?void 0:m.trim())??""}}),s=a.find(d=>d.ref===l),u=a.map(d=>d.textValue),p=Yn(u,t.value,s==null?void 0:s.textValue),f=a.find(d=>d.textValue===p);return f&&f.ref.focus(),f==null?void 0:f.ref}},resetTypeahead:()=>{t.value=""}}}function Un(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Yn(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=Un(e,Math.max(i,0));r.length===1&&(l=l.filter(u=>u!==n));const s=l.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}function At(){const e=E(),t=q(()=>{var n,o;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(o=e.value)==null?void 0:o.$el.nextElementSibling:Ve(e)});return{primitiveElement:e,currentElement:t}}const Pt="data-reka-collection-item";function Te(e={}){const{key:t="",isProvider:n=!1}=e,o=`${t}CollectionProvider`;let r;if(n){const p=E(new Map);r={collectionRef:E(),itemMap:p},Tn(o,r)}else r=qn(o);const i=(p=!1)=>{const f=r.collectionRef.value;if(!f)return[];const d=Array.from(f.querySelectorAll(`[${Pt}]`)),m=Array.from(r.itemMap.value.values()).sort((y,x)=>d.indexOf(y.ref)-d.indexOf(x.ref));return p?m:m.filter(y=>y.ref.dataset.disabled!=="")},l=k({name:"CollectionSlot",inheritAttrs:!1,setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return de(m,()=>{r.collectionRef.value=m.value}),()=>bt(vt,{ref:c,...d},f)}}),a=k({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(p,{slots:f,attrs:d}){const{primitiveElement:c,currentElement:m}=At();return Le(y=>{if(m.value){const x=Rn(m.value);r.itemMap.value.set(x,{ref:m.value,value:p.value}),y(()=>r.itemMap.value.delete(x))}}),()=>bt(vt,{...d,[Pt]:"",ref:c},f)}}),s=q(()=>Array.from(r.itemMap.value.values())),u=q(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:u,CollectionSlot:l,CollectionItem:a}}var Xn=k({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>($(),L(w(Y),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:R(()=>[V(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Gn=Xn;const[Yt,Jn]=Ce("PopperRoot");var Zn=k({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Jn({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>V(n.$slots,"default")}}),Qn=Zn,eo=k({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=me(),r=Yt();return Ft(()=>{r.onAnchorChange(t.reference??o.value)}),(i,l)=>($(),L(w(Y),{ref:w(n),as:i.as,"as-child":i.asChild},{default:R(()=>[V(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),to=eo;function no(e){return e!==null}function oo(e){return{name:"transformOrigin",options:e,fn(t){var x,_,g;const{placement:n,rects:o,middlewareData:r}=t,l=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=l?0:e.arrowWidth,s=l?0:e.arrowHeight,[u,p]=et(n),f={start:"0%",center:"50%",end:"100%"}[p],d=(((_=r.arrow)==null?void 0:_.x)??0)+a/2,c=(((g=r.arrow)==null?void 0:g.y)??0)+s/2;let m="",y="";return u==="bottom"?(m=l?f:`${d}px`,y=`${-s}px`):u==="top"?(m=l?f:`${d}px`,y=`${o.floating.height+s}px`):u==="right"?(m=`${-s}px`,y=l?f:`${c}px`):u==="left"&&(m=`${o.floating.width+s}px`,y=l?f:`${c}px`),{data:{x:m,y}}}}}function et(e){const[t,n="center"]=e.split("-");return[t,n]}const ro=["top","right","bottom","left"],ie=Math.min,Q=Math.max,ke=Math.round,Be=Math.floor,ee=e=>({x:e,y:e}),io={left:"right",right:"left",bottom:"top",top:"bottom"};function Xt(e,t,n){return Q(e,ie(t,n))}function te(e,t){return typeof e=="function"?e(t):e}function le(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function U(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ct(e){return st(U(e))}function lo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=ct(e),i=ut(r);let l=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Ie(l)),[l,Ie(l)]}function ao(e){const t=Ie(e);return[tt(e),t,tt(t)]}function tt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ot=["left","right"],Et=["right","left"],so=["top","bottom"],uo=["bottom","top"];function co(e,t,n){switch(e){case"top":case"bottom":return n?t?Et:Ot:t?Ot:Et;case"left":case"right":return t?so:uo;default:return[]}}function fo(e,t,n,o){const r=_e(e);let i=co(le(e),n==="start",o);return r&&(i=i.map(l=>l+"-"+r),t&&(i=i.concat(i.map(tt)))),i}function Ie(e){const t=le(e);return io[t]+e.slice(t.length)}function po(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function Gt(e){return typeof e!="number"?po(e):{top:e,right:e,bottom:e,left:e}}function De(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function qt(e,t,n){let{reference:o,floating:r}=e;const i=U(t),l=ct(t),a=ut(l),s=le(t),u=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[a]/2-r[a]/2;let c;switch(s){case"top":c={x:p,y:o.y-r.height};break;case"bottom":c={x:p,y:o.y+o.height};break;case"right":c={x:o.x+o.width,y:f};break;case"left":c={x:o.x-r.width,y:f};break;default:c={x:o.x,y:o.y}}const m=_e(t);return m&&(c[l]+=d*(m==="end"?1:-1)*(n&&u?-1:1)),c}async function mo(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:c=0}=te(t,e),m=Gt(c),x=a[d?f==="floating"?"reference":"floating":f],_=De(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:p,strategy:s})),g=f==="floating"?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),h=await(i.isElement==null?void 0:i.isElement(C))&&await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1},S=De(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:C,strategy:s}):g);return{top:(_.top-S.top+m.top)/h.y,bottom:(S.bottom-_.bottom+m.bottom)/h.y,left:(_.left-S.left+m.left)/h.x,right:(S.right-_.right+m.right)/h.x}}const ho=50,go=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:mo},s=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:f}=qt(u,o,s),d=o,c=0;const m={};for(let y=0;y<i.length;y++){const x=i[y];if(!x)continue;const{name:_,fn:g}=x,{x:C,y:h,data:S,reset:v}=await g({x:p,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=C??p,f=h??f,m[_]={...m[_],...S},v&&c<ho&&(c++,typeof v=="object"&&(v.placement&&(d=v.placement),v.rects&&(u=v.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:r}):v.rects),{x:p,y:f}=qt(u,d,s)),y=-1)}return{x:p,y:f,placement:d,strategy:r,middlewareData:m}},vo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:l,elements:a,middlewareData:s}=t,{element:u,padding:p=0}=te(e,t)||{};if(u==null)return{};const f=Gt(p),d={x:n,y:o},c=ct(r),m=ut(c),y=await l.getDimensions(u),x=c==="y",_=x?"top":"left",g=x?"bottom":"right",C=x?"clientHeight":"clientWidth",h=i.reference[m]+i.reference[c]-d[c]-i.floating[m],S=d[c]-i.reference[c],v=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=v?v[C]:0;(!b||!await(l.isElement==null?void 0:l.isElement(v)))&&(b=a.floating[C]||i.floating[m]);const A=h/2-S/2,P=b/2-y[m]/2-1,O=ie(f[_],P),I=ie(f[g],P),T=b-y[m]-I,B=b/2-y[m]/2+A,D=Xt(O,B,T),z=!s.arrow&&_e(r)!=null&&B!==D&&i.reference[m]/2-(B<O?O:I)-y[m]/2<0,F=z?B<O?B-O:B-T:0;return{[c]:d[c]+F,data:{[c]:D,centerOffset:B-D-F,...z&&{alignmentOffset:F}},reset:z}}}),yo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=te(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const _=le(r),g=U(a),C=le(a)===a,h=await(s.isRTL==null?void 0:s.isRTL(u.floating)),S=d||(C||!y?[Ie(a)]:ao(a)),v=m!=="none";!d&&v&&S.push(...fo(a,y,m,h));const b=[a,...S],A=await s.detectOverflow(t,x),P=[];let O=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&P.push(A[_]),f){const D=lo(r,l,h);P.push(A[D[0]],A[D[1]])}if(O=[...O,{placement:r,overflows:P}],!P.every(D=>D<=0)){var I,T;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,z=b[D];if(z&&(!(f==="alignment"?g!==U(z):!1)||O.every(M=>U(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:z}};let F=(T=O.filter(W=>W.overflows[0]<=0).sort((W,M)=>W.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!F)switch(c){case"bestFit":{var B;const W=(B=O.filter(M=>{if(v){const K=U(M.placement);return K===g||K==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(K=>K>0).reduce((K,ye)=>K+ye,0)]).sort((M,K)=>M[1]-K[1])[0])==null?void 0:B[0];W&&(F=W);break}case"initialPlacement":F=a;break}if(r!==F)return{reset:{placement:F}}}return{}}}};function Rt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tt(e){return ro.some(t=>e[t]>=0)}const wo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=te(e,t);switch(r){case"referenceHidden":{const l=await o.detectOverflow(t,{...i,elementContext:"reference"}),a=Rt(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Tt(a)}}}case"escaped":{const l=await o.detectOverflow(t,{...i,altBoundary:!0}),a=Rt(l,n.floating);return{data:{escapedOffsets:a,escaped:Tt(a)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function xo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),l=le(n),a=_e(n),s=U(n)==="y",u=Jt.has(l)?-1:1,p=i&&s?-1:1,f=te(t,e);let{mainAxis:d,crossAxis:c,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(c=a==="end"?m*-1:m),s?{x:c*p,y:d*u}:{x:d*u,y:c*p}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:a}=t,s=await xo(t,e);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},So=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:C,y:h}=g;return{x:C,y:h}}},...u}=te(e,t),p={x:n,y:o},f=await i.detectOverflow(t,u),d=U(r),c=st(d);let m=p[c],y=p[d];const x=(g,C)=>Xt(C+f[g==="y"?"top":"left"],C,C-f[g==="y"?"bottom":"right"]);l&&(m=x(c,m)),a&&(y=x(d,y));const _=s.fn({...t,[c]:m,[d]:y});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[c]:l,[d]:a}}}}}},Co=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:l,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:p=!0,crossAxis:f=!0}=te(e,t),d={x:r,y:i},c=U(l),m=st(c);let y=d[m],x=d[c];const _=te(u,t),g=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(p){const S=m==="y"?"height":"width",v=a.reference[m]-a.floating[S]+g.mainAxis,b=a.reference[m]+a.reference[S]-g.mainAxis;y<v?y=v:y>b&&(y=b)}if(f){var C,h;const S=m==="y"?"width":"height",v=Jt.has(le(l)),b=a.reference[c]-a.floating[S]+(v&&((C=s.offset)==null?void 0:C[c])||0)+(v?0:g.crossAxis),A=a.reference[c]+a.reference[S]+(v?0:((h=s.offset)==null?void 0:h[c])||0)-(v?g.crossAxis:0);x<b?x=b:x>A&&(x=A)}return{[m]:y,[c]:x}}}},_o=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:l=()=>{},...a}=te(e,t),s=await r.detectOverflow(t,a),u=le(n),p=_e(n),f=U(n)==="y",{width:d,height:c}=o.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=p===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,m=p==="end"?"top":"bottom");const x=c-s.top-s.bottom,_=d-s.left-s.right,g=ie(c-s[m],x),C=ie(d-s[y],_),h=t.middlewareData.shift,S=!h;let v=g,b=C;h!=null&&h.enabled.x&&(b=_),h!=null&&h.enabled.y&&(v=x),S&&!p&&(f?b=d-2*Q(s.left,s.right):v=c-2*Q(s.top,s.bottom)),await l({...t,availableWidth:b,availableHeight:v});const A=await r.getDimensions(i.floating);return d!==A.width||c!==A.height?{reset:{rects:!0}}:{}}}};function Fe(){return typeof window<"u"}function ge(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oe(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return Fe()?e instanceof Node||e instanceof H(e).Node:!1}function X(e){return Fe()?e instanceof Element||e instanceof H(e).Element:!1}function ae(e){return Fe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function $t(e){return!Fe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function Ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Ao(e){return/^(table|td|th)$/.test(ge(e))}function ze(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Po=/transform|translate|scale|rotate|perspective|filter/,Oo=/paint|layout|strict|content/,ce=e=>!!e&&e!=="none";let Ze;function ft(e){const t=X(e)?G(e):e;return ce(t.transform)||ce(t.translate)||ce(t.scale)||ce(t.rotate)||ce(t.perspective)||!pt()&&(ce(t.backdropFilter)||ce(t.filter))||Po.test(t.willChange||"")||Oo.test(t.contain||"")}function Eo(e){let t=fe(e);for(;ae(t)&&!qe(t);){if(ft(t))return t;if(ze(t))return null;t=fe(t)}return null}function pt(){return Ze==null&&(Ze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ze}function qe(e){return/^(html|body|#document)$/.test(ge(e))}function G(e){return H(e).getComputedStyle(e)}function He(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(ge(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$t(e)&&e.host||oe(e);return $t(t)?t.host:t}function Zt(e){const t=fe(e);return qe(t)?(e.ownerDocument||e).body:ae(t)&&Ne(t)?t:Zt(t)}function Re(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Zt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=H(r);if(i){const a=nt(l);return t.concat(l,l.visualViewport||[],Ne(r)?r:[],a&&n?Re(a):[])}else return t.concat(r,Re(r,[],n))}function nt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qt(e){const t=G(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ae(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,a=ke(n)!==i||ke(o)!==l;return a&&(n=i,o=l),{width:n,height:o,$:a}}function mt(e){return X(e)?e:e.contextElement}function Se(e){const t=mt(e);if(!ae(t))return ee(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Qt(t);let l=(i?ke(n.width):n.width)/o,a=(i?ke(n.height):n.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const qo=ee(0);function en(e){const t=H(e);return!pt()||!t.visualViewport?qo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ro(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function pe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=mt(e);let l=ee(1);t&&(o?X(o)&&(l=Se(o)):l=Se(e));const a=Ro(i,n,o)?en(i):ee(0);let s=(r.left+a.x)/l.x,u=(r.top+a.y)/l.y,p=r.width/l.x,f=r.height/l.y;if(i&&o){const d=H(i),c=X(o)?H(o):o;let m=d,y=nt(m);for(;y&&c!==m;){const x=Se(y),_=y.getBoundingClientRect(),g=G(y),C=_.left+(y.clientLeft+parseFloat(g.paddingLeft))*x.x,h=_.top+(y.clientTop+parseFloat(g.paddingTop))*x.y;s*=x.x,u*=x.y,p*=x.x,f*=x.y,s+=C,u+=h,m=H(y),y=nt(m)}}return De({width:p,height:f,x:s,y:u})}function We(e,t){const n=He(e).scrollLeft;return t?t.left+n:pe(oe(e)).left+n}function tn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-We(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function To(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=oe(o),a=t?ze(t.floating):!1;if(o===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ee(1);const p=ee(0),f=ae(o);if((f||!i)&&((ge(o)!=="body"||Ne(l))&&(s=He(o)),f)){const c=pe(o);u=Se(o),p.x=c.x+o.clientLeft,p.y=c.y+o.clientTop}const d=l&&!f&&!i?tn(l,s):ee(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+p.x+d.x,y:n.y*u.y-s.scrollTop*u.y+p.y+d.y}}function $o(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Bo(e){const t=He(e),n=e.ownerDocument.body,o=Q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+We(e);const l=-t.scrollTop;return G(n).direction==="rtl"&&(i+=Q(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:l}}const ko=25;function Io(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=H(e),i=oe(e),l=r.visualViewport;let a=i.clientWidth,s=i.clientHeight,u=0,p=0;if(l){const d=!pt()||t==="fixed";o?d||(u=-l.offsetLeft,p=-l.offsetTop):(a=l.width,s=l.height,d&&(u=l.offsetLeft,p=l.offsetTop))}if(We(i)<=0){const d=i.ownerDocument,c=d.body,m=getComputedStyle(c),y=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(i.clientWidth-c.clientWidth-y),_=getComputedStyle(i).scrollbarGutter==="stable both-edges"?x/2:x;_<=ko&&(a-=_)}return{width:a,height:s,x:u,y:p}}function Do(e,t){const n=pe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Se(e),l=e.clientWidth*i.x,a=e.clientHeight*i.y,s=r*i.x,u=o*i.y;return{width:l,height:a,x:s,y:u}}function Bt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Io(e,n,t);else if(t==="document")o=Bo(oe(e));else if(X(t))o=Do(t,n);else{const r=en(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return De(o)}function Mo(e,t){const n=t.get(e);if(n)return n;let o=Re(e,[],!1).filter(a=>X(a)&&ge(a)!=="body"),r=null;const i=G(e).position==="fixed";let l=i?fe(e):e;for(;X(l)&&!qe(l);){const a=G(l),s=ft(l),u=r?r.position:i?"fixed":"";!s&&(u==="fixed"||u==="absolute"&&a.position==="static")?o=o.filter(f=>f!==l):r=a,l=fe(l)}return t.set(e,o),o}function Vo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:Mo(t,this._c):[].concat(n),o],a=Bt(t,l[0],r);let s=a.top,u=a.right,p=a.bottom,f=a.left;for(let d=1;d<l.length;d++){const c=Bt(t,l[d],r);s=Q(c.top,s),u=ie(c.right,u),p=ie(c.bottom,p),f=Q(c.left,f)}return{width:u-f,height:p-s,x:f,y:s}}function Lo(e){const{width:t,height:n}=Qt(e);return{width:t,height:n}}function Fo(e,t,n){const o=ae(t),r=oe(t),i=n==="fixed",l=pe(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=ee(0);if((o||!i)&&((ge(t)!=="body"||Ne(r))&&(a=He(t)),o)){const d=pe(t,!0,i,t);s.x=d.x+t.clientLeft,s.y=d.y+t.clientTop}!o&&r&&(s.x=We(r));const u=r&&!o&&!i?tn(r,a):ee(0),p=l.left+a.scrollLeft-s.x-u.x,f=l.top+a.scrollTop-s.y-u.y;return{x:p,y:f,width:l.width,height:l.height}}function Qe(e){return G(e).position==="static"}function kt(e,t){if(!ae(e)||G(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function nn(e,t){const n=H(e);if(ze(e))return n;if(!ae(e)){let r=fe(e);for(;r&&!qe(r);){if(X(r)&&!Qe(r))return r;r=fe(r)}return n}let o=kt(e,t);for(;o&&Ao(o)&&Qe(o);)o=kt(o,t);return o&&qe(o)&&Qe(o)&&!ft(o)?n:o||Eo(e)||n}const No=async function(e){const t=this.getOffsetParent||nn,n=this.getDimensions,o=await n(e.floating);return{reference:Fo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zo(e){return G(e).direction==="rtl"}const Ho={convertOffsetParentRelativeRectToViewportRelativeRect:To,getDocumentElement:oe,getClippingRect:Vo,getOffsetParent:nn,getElementRects:No,getClientRects:$o,getDimensions:Lo,getScale:Se,isElement:X,isRTL:zo};function on(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Wo(e,t,n){let o=null,r;const i=oe(e);function l(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function a(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),l();const d=e.getBoundingClientRect(),{left:c,top:m,width:y,height:x}=d;if(p||t(),!y||!x)return;const _=Be(m),g=Be(i.clientWidth-(c+y)),C=Be(i.clientHeight-(m+x)),h=Be(c),v={rootMargin:-_+"px "+-g+"px "+-C+"px "+-h+"px",threshold:Q(0,ie(1,f))||1};let b=!0;function A(P){const O=P[0].intersectionRatio;if(!on(d,e.getBoundingClientRect()))return a();if(O!==f){if(!b)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{o=new IntersectionObserver(A,{...v,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,v)}o.observe(e)}const s=H(e),u=()=>a(n);return s.addEventListener("resize",u),a(!0),()=>{s.removeEventListener("resize",u),l()}}function jo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=o,u=mt(e),p=r||i?[...u?Re(u):[],...t?Re(t):[]]:[];p.forEach(_=>{r&&_.addEventListener("scroll",n),i&&_.addEventListener("resize",n)});const f=u&&a?Wo(u,n,i):null;let d=-1,c=null;l&&(c=new ResizeObserver(_=>{let[g]=_;g&&g.target===u&&c&&t&&(c.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=c)==null||C.observe(t)})),n()}),u&&!s&&c.observe(u),t&&c.observe(t));let m,y=s?pe(e):null;s&&x();function x(){const _=pe(e);y&&!on(y,_)&&n(),y=_,m=requestAnimationFrame(x)}return n(),()=>{var _;p.forEach(g=>{r&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(_=c)==null||_.disconnect(),c=null,s&&cancelAnimationFrame(m)}}const Ko=bo,Uo=So,It=yo,Yo=_o,Xo=wo,Go=vo,Jo=Co,Zo=(e,t,n)=>{const o=new Map,r=n??{},i={...Ho,...r.platform,_c:o};return go(e,t,{...r,platform:i})};function Qo(e){return e!=null&&typeof e=="object"&&"$el"in e}function ot(e){if(Qo(e)){const t=e.$el;return dt(t)&&ge(t)==="#comment"?null:t}return e}function be(e){return typeof e=="function"?e():w(e)}function er(e){return{name:"arrow",options:e,fn(t){const n=ot(be(e.element));return n==null?{}:Go({element:n,padding:e.padding}).fn(t)}}}function rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dt(e,t){const n=rn(e);return Math.round(t*n)/n}function tr(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,r=q(()=>{var b;return(b=be(n.open))!=null?b:!0}),i=q(()=>be(n.middleware)),l=q(()=>{var b;return(b=be(n.placement))!=null?b:"bottom"}),a=q(()=>{var b;return(b=be(n.strategy))!=null?b:"absolute"}),s=q(()=>{var b;return(b=be(n.transform))!=null?b:!0}),u=q(()=>ot(e.value)),p=q(()=>ot(t.value)),f=E(0),d=E(0),c=E(a.value),m=E(l.value),y=$n({}),x=E(!1),_=q(()=>{const b={position:c.value,left:"0",top:"0"};if(!p.value)return b;const A=Dt(p.value,f.value),P=Dt(p.value,d.value);return s.value?{...b,transform:"translate("+A+"px, "+P+"px)",...rn(p.value)>=1.5&&{willChange:"transform"}}:{position:c.value,left:A+"px",top:P+"px"}});let g;function C(){if(u.value==null||p.value==null)return;const b=r.value;Zo(u.value,p.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(A=>{f.value=A.x,d.value=A.y,c.value=A.strategy,m.value=A.placement,y.value=A.middlewareData,x.value=b!==!1})}function h(){typeof g=="function"&&(g(),g=void 0)}function S(){if(h(),o===void 0){C();return}if(u.value!=null&&p.value!=null){g=o(u.value,p.value,C);return}}function v(){r.value||(x.value=!1)}return de([i,l,a,r],C,{flush:"sync"}),de([u,p],S,{flush:"sync"}),de(r,v,{flush:"sync"}),Bn()&&kn(h),{x:we(f),y:we(d),strategy:we(c),placement:we(m),middlewareData:we(y),isPositioned:we(x),floatingStyles:_,update:C}}const nr={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Yr,or]=Ce("PopperContent");var rr=k({inheritAttrs:!1,__name:"PopperContent",props:In({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...nr}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,r=Yt(),{forwardRef:i,currentElement:l}=me(),a=E(),s=E(),{width:u,height:p}=Kn(s),f=q(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),d=q(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),c=q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=q(()=>({padding:d.value,boundary:c.value.filter(no),altBoundary:c.value.length>0})),y=q(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),x=gn(()=>[Ko({mainAxis:n.sideOffset+p.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),n.avoidCollisions&&Uo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Jo():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&It({...m.value,...y.value}),Yo({...m.value,apply:({elements:T,rects:B,availableWidth:D,availableHeight:z})=>{const{width:F,height:W}=B.reference,M=T.floating.style;M.setProperty("--reka-popper-available-width",`${D}px`),M.setProperty("--reka-popper-available-height",`${z}px`),M.setProperty("--reka-popper-anchor-width",`${F}px`),M.setProperty("--reka-popper-anchor-height",`${W}px`)}}),s.value&&er({element:s.value,padding:n.arrowPadding}),oo({arrowWidth:u.value,arrowHeight:p.value}),n.hideWhenDetached&&Xo({strategy:"referenceHidden",...m.value})]),_=q(()=>n.reference??r.anchor.value),{floatingStyles:g,placement:C,isPositioned:h,middlewareData:S}=tr(_,a,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...T)=>jo(...T,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:x}),v=q(()=>et(C.value)[0]),b=q(()=>et(C.value)[1]);Ft(()=>{h.value&&o("placed")});const A=q(()=>{var B;const T=((B=S.value.arrow)==null?void 0:B.centerOffset)!==0;return n.hideShiftedArrow&&T}),P=E("");Le(()=>{l.value&&(P.value=window.getComputedStyle(l.value).zIndex)});const O=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.x)??0}),I=q(()=>{var T;return((T=S.value.arrow)==null?void 0:T.y)??0});return or({placedSide:v,onArrowChange:T=>s.value=T,arrowX:O,arrowY:I,shouldHideArrow:A}),(T,B)=>{var D,z,F;return $(),Z("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Nt({...w(g),transform:w(h)?w(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:P.value,"--reka-popper-transform-origin":[(D=w(S).transformOrigin)==null?void 0:D.x,(z=w(S).transformOrigin)==null?void 0:z.y].join(" "),...((F=w(S).hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[N(w(Y),ne({ref:w(i)},T.$attrs,{"as-child":n.asChild,as:T.as,"data-side":v.value,"data-align":b.value,style:{animation:w(h)?void 0:"none"}}),{default:R(()=>[V(T.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),ir=rr;function lr(e){const t=Mt({nonce:E()});return q(()=>{var n;return(e==null?void 0:e.value)||((n=t.nonce)==null?void 0:n.value)})}const ar=[" ","Enter","ArrowUp","ArrowDown"],sr=[" ","Enter"],j=10;function Me(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(o=>rt(o,t,n)):rt(e,t,n)}function rt(e,t,n){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof n=="function"?n(e,t):typeof n=="string"?(e==null?void 0:e[n])===(t==null?void 0:t[n]):Nn(e,t)}function ur(e){return e==null||e===""||Array.isArray(e)&&e.length===0}const cr={key:0,value:""},[ve,ln]=Ce("SelectRoot");var dr=k({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const n=e,o=t,{required:r,disabled:i,multiple:l,dir:a}=it(n),s=yt(n,"modelValue",o,{defaultValue:n.defaultValue??(l.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),u=yt(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0}),p=E(),f=E(),d=E({x:0,y:0}),c=q(()=>{var h;return l.value&&Array.isArray(s.value)?((h=s.value)==null?void 0:h.length)===0:wt(s.value)});Te({isProvider:!0});const m=zn(a),y=Wn(p),x=E(new Set),_=q(()=>Array.from(x.value).map(h=>h.value).join(";"));function g(h){if(l.value){const S=Array.isArray(s.value)?[...s.value]:[],v=S.findIndex(b=>rt(b,h,n.by));v===-1?S.push(h):S.splice(v,1),s.value=[...S]}else s.value=h}function C(h){return Array.from(x.value).find(S=>Me(h,S.value,n.by))}return ln({triggerElement:p,onTriggerChange:h=>{p.value=h},valueElement:f,onValueElementChange:h=>{f.value=h},contentId:"",modelValue:s,onValueChange:g,by:n.by,open:u,multiple:l,required:r,onOpenChange:h=>{u.value=h},dir:m,triggerPointerDownPosRef:d,disabled:i,isEmptyModelValue:c,optionsSet:x,onOptionAdd:h=>{const S=C(h.value);S&&x.value.delete(S),x.value.add(h)},onOptionRemove:h=>{const S=C(h.value);S&&x.value.delete(S)}}),(h,S)=>($(),L(w(Qn),null,{default:R(()=>[V(h.$slots,"default",{modelValue:w(s),open:w(u)}),w(y)&&h.name?($(),L(mr,{key:_.value,"aria-hidden":"true",tabindex:"-1",multiple:w(l),required:w(r),name:h.name,autocomplete:h.autocomplete,disabled:w(i),value:w(s)},{default:R(()=>[w(wt)(w(s))?($(),Z("option",cr)):Ee("v-if",!0),($(!0),Z(lt,null,zt(Array.from(x.value),v=>($(),Z("option",ne({key:v.value??""},{ref_for:!0},v),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ee("v-if",!0)]),_:3}))}}),fr=dr,pr=k({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,n=E(),o=ve();de(()=>t.value,(i,l)=>{const a=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==l&&u&&n.value){const p=new Event("change",{bubbles:!0});u.call(n.value,i),n.value.dispatchEvent(p)}});function r(i){o.onValueChange(i.target.value)}return(i,l)=>($(),L(w(Gn),{"as-child":""},{default:R(()=>[xe("select",ne({ref_key:"selectElement",ref:n},t,{onInput:r}),[V(i.$slots,"default")],16)]),_:3}))}}),mr=pr,hr=k({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:j},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const n=at(e);return(o,r)=>($(),L(w(ir),ne(w(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:R(()=>[V(o.$slots,"default")]),_:3},16))}}),gr=hr;const vr={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[je,an]=Ce("SelectContent");var yr=k({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=ve();Hn(),vn(n.bodyLock);const{CollectionSlot:i,getItems:l}=Te(),a=E();yn(a);const{search:s,handleTypeaheadSearch:u}=Ut(),p=E(),f=E(),d=E(),c=E(!1),m=E(!1),y=E(!1);function x(){f.value&&a.value&&xt([f.value,a.value])}de(c,()=>{x()});const{onOpenChange:_,triggerPointerDownPosRef:g}=r;Le(v=>{if(!a.value)return;let b={x:0,y:0};const A=O=>{var I,T;b={x:Math.abs(Math.round(O.pageX)-(((I=g.value)==null?void 0:I.x)??0)),y:Math.abs(Math.round(O.pageY)-(((T=g.value)==null?void 0:T.y)??0))}},P=O=>{var I;O.pointerType!=="touch"&&(b.x<=10&&b.y<=10?O.preventDefault():(I=a.value)!=null&&I.contains(O.target)||_(!1),document.removeEventListener("pointermove",A),g.value=null)};g.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",P,{capture:!0,once:!0})),v(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",P,{capture:!0})})});function C(v){const b=v.ctrlKey||v.altKey||v.metaKey;if(v.key==="Tab"&&v.preventDefault(),!b&&v.key.length===1&&u(v.key,l()),["ArrowUp","ArrowDown","Home","End"].includes(v.key)){let P=[...l().map(O=>O.ref)];if(["ArrowUp","End"].includes(v.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(v.key)){const O=v.target,I=P.indexOf(O);P=P.slice(I+1)}setTimeout(()=>xt(P)),v.preventDefault()}}const h=q(()=>n.position==="popper"?n:{}),S=at(h.value);return an({content:a,viewport:p,onViewportChange:v=>{p.value=v},itemRefCallback:(v,b,A)=>{const P=!m.value&&!A,O=Me(r.modelValue.value,b,r.by);if(r.multiple.value){if(y.value)return;(O||P)&&(f.value=v,O&&(y.value=!0))}else(O||P)&&(f.value=v);P&&(m.value=!0)},selectedItem:f,selectedItemText:d,onItemLeave:()=>{var v;(v=a.value)==null||v.focus()},itemTextRefCallback:(v,b,A)=>{const P=!m.value&&!A;(Me(r.modelValue.value,b,r.by)||P)&&(d.value=v)},focusSelectedItem:x,position:n.position,isPositioned:c,searchRef:s}),(v,b)=>($(),L(w(i),null,{default:R(()=>[N(w(wn),{"as-child":"",onMountAutoFocus:b[6]||(b[6]=Oe(()=>{},["prevent"])),onUnmountAutoFocus:b[7]||(b[7]=A=>{var P;o("closeAutoFocus",A),!A.defaultPrevented&&((P=w(r).triggerElement.value)==null||P.focus({preventScroll:!0}),A.preventDefault())})},{default:R(()=>[N(w(xn),{"as-child":"","disable-outside-pointer-events":v.disableOutsidePointerEvents,onFocusOutside:b[2]||(b[2]=Oe(()=>{},["prevent"])),onDismiss:b[3]||(b[3]=A=>w(r).onOpenChange(!1)),onEscapeKeyDown:b[4]||(b[4]=A=>o("escapeKeyDown",A)),onPointerDownOutside:b[5]||(b[5]=A=>o("pointerDownOutside",A))},{default:R(()=>[($(),L(Dn(v.position==="popper"?gr:Cr),ne({...v.$attrs,...w(S)},{id:w(r).contentId,ref:A=>{if(!A)return;const P=w(Ve)(A);P!=null&&P.hasAttribute("data-reka-popper-content-wrapper")?a.value=P.firstElementChild:a.value=P},role:"listbox","data-state":w(r).open.value?"open":"closed",dir:w(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:b[0]||(b[0]=Oe(()=>{},["prevent"])),onPlaced:b[1]||(b[1]=A=>c.value=!0),onKeydown:C}),{default:R(()=>[V(v.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),wr=yr;const[xr,br]=Ce("SelectItemAlignedPosition");var Sr=k({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const n=e,o=t,{getItems:r}=Te(),i=ve(),l=je(),a=E(!1),s=E(!0),u=E(),{forwardRef:p,currentElement:f}=me(),{viewport:d,selectedItem:c,selectedItemText:m,focusSelectedItem:y}=l;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&f.value&&(d!=null&&d.value)&&(c!=null&&c.value)&&(m!=null&&m.value)){const C=i.triggerElement.value.getBoundingClientRect(),h=f.value.getBoundingClientRect(),S=i.valueElement.value.getBoundingClientRect(),v=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const J=v.left-h.left,re=S.left-J,se=C.left-re,ue=C.width+se,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.left=`${Xe}px`}else{const J=h.right-v.right,re=window.innerWidth-S.right-J,se=window.innerWidth-C.right-re,ue=C.width+se,Ue=Math.max(ue,h.width),Ye=window.innerWidth-j,Xe=Ct(re,j,Math.max(j,Ye-Ue));u.value.style.minWidth=`${ue}px`,u.value.style.right=`${Xe}px`}const b=r().map(J=>J.ref),A=window.innerHeight-j*2,P=d.value.scrollHeight,O=window.getComputedStyle(f.value),I=Number.parseInt(O.borderTopWidth,10),T=Number.parseInt(O.paddingTop,10),B=Number.parseInt(O.borderBottomWidth,10),D=Number.parseInt(O.paddingBottom,10),z=I+T+P+D+B,F=Math.min(c.value.offsetHeight*5,z),W=window.getComputedStyle(d.value),M=Number.parseInt(W.paddingTop,10),K=Number.parseInt(W.paddingBottom,10),ye=C.top+C.height/2-j,un=A-ye,Ke=c.value.offsetHeight/2,cn=c.value.offsetTop+Ke,$e=I+T+cn,dn=z-$e;if($e<=ye){const J=c.value===b.at(-1);u.value.style.bottom="0px";const re=f.value.clientHeight-d.value.offsetTop-d.value.offsetHeight,se=Math.max(un,Ke+(J?K:0)+re+B),ue=$e+se;u.value.style.height=`${ue}px`}else{const J=c.value===b[0];u.value.style.top="0px";const se=Math.max(ye,I+d.value.offsetTop+(J?M:0)+Ke)+dn;u.value.style.height=`${se}px`,d.value.scrollTop=$e-ye+d.value.offsetTop}u.value.style.margin=`${j}px 0`,u.value.style.minHeight=`${F}px`,u.value.style.maxHeight=`${A}px`,o("placed"),requestAnimationFrame(()=>a.value=!0)}}const _=E("");he(async()=>{await Pe(),x(),f.value&&(_.value=window.getComputedStyle(f.value).zIndex)});function g(C){C&&s.value===!0&&(x(),y==null||y(),s.value=!1)}return bn(i.triggerElement,()=>{x()}),br({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:g}),(C,h)=>($(),Z("div",{ref_key:"contentWrapperElement",ref:u,style:Nt({display:"flex",flexDirection:"column",position:"fixed",zIndex:_.value})},[N(w(Y),ne({ref:w(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:R(()=>[V(C.$slots,"default")]),_:3},16)],4))}}),Cr=Sr,_r=k({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return ln(e.context),an(vr),(n,o)=>V(n.$slots,"default")}}),Ar=_r;const Pr={key:1};var Or=k({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,r=jn(n,t),i=ve(),l=E();he(()=>{l.value=new DocumentFragment});const a=E(),s=q(()=>n.forceMount||i.open.value),u=E(s.value);let p;function f(){p&&(clearTimeout(p),p=void 0)}return de(s,(d,c,m)=>{f(),p=setTimeout(()=>{u.value=s.value,p=void 0}),m(f)}),Ht(f),(d,c)=>{var m;return s.value||u.value||(m=a.value)!=null&&m.present?($(),L(w(Sn),{key:0,ref_key:"presenceRef",ref:a,present:s.value},{default:R(()=>[N(wr,Wt(jt({...w(r),...d.$attrs})),{default:R(()=>[V(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):l.value?($(),Z("div",Pr,[($(),L(Mn,{to:l.value},[N(Ar,{context:w(i)},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ee("v-if",!0)}}}),Er=Or;const[sn,qr]=Ce("SelectItem");var Rr=k({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,o=t,{disabled:r}=it(n),i=ve(),l=je(),{forwardRef:a,currentElement:s}=me(),{CollectionItem:u}=Te(),p=q(()=>{var h;return Me((h=i.modelValue)==null?void 0:h.value,n.value,i.by)}),f=E(!1),d=E(n.textValue??""),c=Lt(void 0,"reka-select-item-text"),m="select.select";async function y(h){if(h.defaultPrevented)return;const S={originalEvent:h,value:n.value};Cn(m,x,S)}async function x(h){await Pe(),o("select",h),!h.defaultPrevented&&(r.value||(i.onValueChange(n.value),i.multiple.value||i.onOpenChange(!1)))}async function _(h){var S,v;await Pe(),!h.defaultPrevented&&(r.value?(S=l.onItemLeave)==null||S.call(l):(v=h.currentTarget)==null||v.focus({preventScroll:!0}))}async function g(h){var S;await Pe(),!h.defaultPrevented&&h.currentTarget===Vt()&&((S=l.onItemLeave)==null||S.call(l))}async function C(h){var v;await Pe(),!(h.defaultPrevented||((v=l.searchRef)==null?void 0:v.value)!==""&&h.key===" ")&&(sr.includes(h.key)&&y(h),h.key===" "&&h.preventDefault())}if(n.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return he(()=>{s.value&&l.itemRefCallback(s.value,n.value,n.disabled)}),qr({value:n.value,disabled:r,textId:c,isSelected:p,onItemTextChange:h=>{d.value=((d.value||(h==null?void 0:h.textContent))??"").trim()}}),(h,S)=>($(),L(w(u),{value:{textValue:d.value}},{default:R(()=>[N(w(Y),{ref:w(a),role:"option","aria-labelledby":w(c),"data-highlighted":f.value?"":void 0,"aria-selected":p.value,"data-state":p.value?"checked":"unchecked","aria-disabled":w(r)||void 0,"data-disabled":w(r)?"":void 0,tabindex:w(r)?void 0:-1,as:h.as,"as-child":h.asChild,onFocus:S[0]||(S[0]=v=>f.value=!0),onBlur:S[1]||(S[1]=v=>f.value=!1),onPointerup:y,onPointerdown:S[2]||(S[2]=v=>{v.currentTarget.focus({preventScroll:!0})}),onTouchend:S[3]||(S[3]=Oe(()=>{},["prevent","stop"])),onPointermove:_,onPointerleave:g,onKeydown:C},{default:R(()=>[V(h.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),Tr=Rr,$r=k({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=sn();return(o,r)=>w(n).isSelected.value?($(),L(w(Y),ne({key:0,"aria-hidden":"true"},t),{default:R(()=>[V(o.$slots,"default")]),_:3},16)):Ee("v-if",!0)}}),Br=$r,kr=k({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=ve(),o=je(),r=sn(),{forwardRef:i,currentElement:l}=me(),a=q(()=>{var s,u;return{value:r.value,disabled:r.disabled.value,textContent:((s=l.value)==null?void 0:s.textContent)??((u=r.value)==null?void 0:u.toString())??""}});return he(()=>{l.value&&(r.onItemTextChange(l.value),o.itemTextRefCallback(l.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),Ht(()=>{n.onOptionRemove(a.value)}),(s,u)=>($(),L(w(Y),ne({id:w(r).textId,ref:w(i)},{...t,...s.$attrs}),{default:R(()=>[V(s.$slots,"default")]),_:3},16,["id"]))}}),Ir=kr,Dr=k({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,o)=>($(),L(w(_n),Wt(jt(t)),{default:R(()=>[V(n.$slots,"default")]),_:3},16))}}),Mr=Dr,Vr=k({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=ve(),{forwardRef:o,currentElement:r}=me(),i=q(()=>{var d;return((d=n.disabled)==null?void 0:d.value)||t.disabled});n.contentId||(n.contentId=Lt(void 0,"reka-select-content")),he(()=>{n.onTriggerChange(r.value)});const{getItems:l}=Te(),{search:a,handleTypeaheadSearch:s,resetTypeahead:u}=Ut();function p(){i.value||(n.onOpenChange(!0),u())}function f(d){p(),n.triggerPointerDownPosRef.value={x:Math.round(d.pageX),y:Math.round(d.pageY)}}return(d,c)=>($(),L(w(to),{"as-child":"",reference:d.reference},{default:R(()=>{var m,y,x,_;return[N(w(Y),{ref:w(o),role:"combobox",type:d.as==="button"?"button":void 0,"aria-controls":w(n).contentId,"aria-expanded":w(n).open.value||!1,"aria-required":(m=w(n).required)==null?void 0:m.value,"aria-autocomplete":"none",disabled:i.value,dir:(y=w(n))==null?void 0:y.dir.value,"data-state":(x=w(n))!=null&&x.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":w(ur)((_=w(n).modelValue)==null?void 0:_.value)?"":void 0,"as-child":d.asChild,as:d.as,onClick:c[0]||(c[0]=g=>{var C;(C=g==null?void 0:g.currentTarget)==null||C.focus()}),onPointerdown:c[1]||(c[1]=g=>{if(g.pointerType==="touch")return g.preventDefault();const C=g.target;C.hasPointerCapture(g.pointerId)&&C.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(f(g),g.preventDefault())}),onPointerup:c[2]||(c[2]=Oe(g=>{g.pointerType==="touch"&&f(g)},["prevent"])),onKeydown:c[3]||(c[3]=g=>{const C=w(a)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&C&&g.key===" "||(w(s)(g.key,w(l)()),w(ar).includes(g.key)&&(p(),g.preventDefault()))})},{default:R(()=>[V(d.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),Lr=Vr,Fr=k({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:n}=it(t),o=lr(n),r=je(),i=r.position==="item-aligned"?xr():void 0,{forwardRef:l,currentElement:a}=me();he(()=>{r==null||r.onViewportChange(a.value)});const s=E(0);function u(p){const f=p.currentTarget,{shouldExpandOnScrollRef:d,contentWrapper:c}=i??{};if(d!=null&&d.value&&(c!=null&&c.value)){const m=Math.abs(s.value-f.scrollTop);if(m>0){const y=window.innerHeight-j*2,x=Number.parseFloat(c.value.style.minHeight),_=Number.parseFloat(c.value.style.height),g=Math.max(x,_);if(g<y){const C=g+m,h=Math.min(y,C),S=C-h;c.value.style.height=`${h}px`,c.value.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,c.value.style.justifyContent="flex-end")}}}s.value=f.scrollTop}return(p,f)=>($(),Z(lt,null,[N(w(Y),ne({ref:w(l),"data-reka-select-viewport":"",role:"presentation"},{...p.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[V(p.$slots,"default")]),_:3},16),N(w(Y),{as:"style",nonce:w(o)},{default:R(()=>f[0]||(f[0]=[Kt(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Nr=Fr;const zr={class:"selm-value"},Hr={key:0,class:"selm-hint"},Xr=k({__name:"SelectMenu",props:Ln({options:{},label:{},disabled:{type:Boolean},placeholder:{},id:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Vn(e,"modelValue");return(n,o)=>($(),L(w(fr),{modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=r=>t.value=r),disabled:e.disabled},{default:R(()=>[N(w(Lr),{id:e.id,class:"selm-trigger","aria-label":e.label},{default:R(()=>{var r;return[xe("span",zr,Ge(((r=e.options.find(i=>i.value===t.value))==null?void 0:r.label)??e.placeholder??"—"),1),o[1]||(o[1]=xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true",class:"selm-caret"},[xe("path",{d:"m6 9 6 6 6-6",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]}),_:1},8,["id","aria-label"]),N(w(Mr),null,{default:R(()=>[N(w(Er),{class:"selm-list",position:"popper","side-offset":6},{default:R(()=>[N(w(Nr),null,{default:R(()=>[($(!0),Z(lt,null,zt(e.options,r=>($(),L(w(Tr),{key:r.value,value:r.value,class:"selm-opt"},{default:R(()=>[N(w(Ir),null,{default:R(()=>[Kt(Ge(r.label),1)]),_:2},1024),r.hint?($(),Z("span",Hr,Ge(r.hint),1)):Ee("",!0),N(w(Br),{class:"selm-tick"},{default:R(()=>[...o[2]||(o[2]=[xe("svg",{viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},[xe("path",{d:"m5 13 4 4L19 7",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","disabled"]))}});export{Xr as _};
|
|
2
|
-
//# sourceMappingURL=SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as _,c as d,a as t,i as f,v as x,u as s,V as o,f as n,e as k,w as v,_ as c,a5 as B,t as u,g as m,z as E,F as S,A as l,j as y,k as g,a7 as A,O as L,o as r}from"./index-T3JGe9ku.js";import{_ as T}from"./ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js";import{_ as b}from"./SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js";import"./Teleport-CKfsIrp8.js";const U={class:"panel settings-form"},$={class:"field"},D={class:"mute hint"},N={class:"field"},F=["type"],R={class:"row",style:{"margin-top":"var(--s2)"}},M={key:2,class:"mute",style:{"font-size":"var(--t-xs)"}},j={class:"mute hint"},q={class:"row",style:{gap:"8px","margin-top":"4px"}},z=["disabled"],H={key:0,class:"mute"},I={key:1,class:"bad"},O={class:"panel"},P={class:"field"},W={class:"field"},Y=_({__name:"SettingsView",setup(G){const p=y(!1),h=y(!1),w=g(()=>{const i=o.token;return i.startsWith("pstack_pat_")?"Looks like a personal token.":/^[0-9a-f]{40,}$/i.test(i)?"Looks like a machine token.":`${i.length} characters — this does not look like a pstack token.`}),V=g(()=>{var i;return((i=l.health)==null?void 0:i.authEnforced)??null});async function C(){p.value=!0;try{await A(),L(l.healthError?"error":"ok",l.healthError||"Control plane reachable")}finally{p.value=!1}}return(i,e)=>(r(),d("div",null,[e[19]||(e[19]=t("div",{class:"page-head"},[t("div",null,[t("h1",null,"Settings"),t("div",{class:"sub"},"Stored in this browser only. Nothing here is sent to the server.")])],-1)),t("section",U,[e[14]||(e[14]=t("h2",{class:"phead-title"},"Connection",-1)),t("div",$,[e[8]||(e[8]=t("label",{for:"apiBase"},"API base URL",-1)),f(t("input",{id:"apiBase","onUpdate:modelValue":e[0]||(e[0]=a=>s(o).apiBase=a),type:"url",spellcheck:"false",placeholder:"(same origin)"},null,512),[[x,s(o).apiBase,void 0,{trim:!0}]]),t("div",D,[e[7]||(e[7]=n(" Leave it empty unless you are pointing this page at another host. ",-1)),k(c,{label:"about the API base URL"},{default:v(()=>[...e[6]||(e[6]=[n(" Empty means same-origin, which is how the control stack serves this page — the browser never makes a cross-origin request, so there is no CORS to configure. Set an absolute URL only for a development session against a remote host. ",-1)])]),_:1})])]),t("div",N,[e[11]||(e[11]=t("label",{for:"token"},"Access token",-1)),f(t("input",{id:"token","onUpdate:modelValue":e[1]||(e[1]=a=>s(o).token=a),type:h.value||!s(o).token?"text":"password",name:"pstack-access-token",autocomplete:"off","data-1p-ignore":"","data-lpignore":"true","data-bwignore":"","data-form-type":"other",spellcheck:"false",placeholder:"paste the token from pstack init"},null,8,F),[[B,s(o).token,void 0,{trim:!0}]]),t("div",R,[s(o).token?(r(),d("button",{key:0,class:"ghost sm",onClick:e[2]||(e[2]=a=>h.value=!h.value)},u(h.value?"Hide":"Show"),1)):m("",!0),s(o).token?(r(),E(T,{key:1,variant:"ghost",class:"sm",confirm:"Clear it?",onRun:e[3]||(e[3]=a=>s(o).token="")},{default:v(()=>[...e[9]||(e[9]=[n(" Clear ",-1)])]),_:1})):m("",!0),s(o).token?(r(),d("span",M,u(w.value),1)):m("",!0)]),t("div",j,[e[10]||(e[10]=n(" Authenticates every request — signing in with an account does the same job, so set this only for token-based access (the machine token, or a personal token from your account). ",-1)),V.value===!1?(r(),d(S,{key:0},[n(" This server is not asking for one — it only accepts connections from this machine, so a token here is harmless but unnecessary. ")],64)):m("",!0)])]),t("div",q,[t("button",{class:"btn",disabled:p.value,onClick:C},u(p.value?"Checking…":"Test connection"),9,z),s(l).health?(r(),d("span",H,[n(" Connected to pstack "+u(s(l).health.version)+" ",1),k(c,{label:"where data is stored"},{default:v(()=>[e[12]||(e[12]=n(" Deployment records and stored specs live in ",-1)),t("code",null,u(s(l).health.dataDir),1),e[13]||(e[13]=n(" on the host. ",-1))]),_:1})])):s(l).healthError?(r(),d("span",I,u(s(l).healthError),1)):m("",!0)])]),t("section",O,[e[18]||(e[18]=t("h2",{class:"phead-title"},"Appearance",-1)),t("div",P,[e[15]||(e[15]=t("label",{for:"theme"},"Theme",-1)),k(b,{modelValue:s(o).theme,"onUpdate:modelValue":e[4]||(e[4]=a=>s(o).theme=a),id:"theme",label:"Theme",options:[{value:"system",label:"Follow the system"},{value:"dark",label:"Dark"},{value:"light",label:"Light"}]},null,8,["modelValue"])]),t("div",W,[e[16]||(e[16]=t("label",{for:"motion"},"Motion",-1)),k(b,{modelValue:s(o).motion,"onUpdate:modelValue":e[5]||(e[5]=a=>s(o).motion=a),id:"motion",label:"Motion",options:[{value:"system",label:"Follow the system"},{value:"full",label:"Always animate"},{value:"none",label:"No animation"}]},null,8,["modelValue"]),e[17]||(e[17]=t("div",{class:"mute hint"}," “Follow the system” uses your device's reduce-motion setting. The other two override it, in either direction. ",-1))])])]))}});export{Y as default};
|
|
2
|
-
//# sourceMappingURL=SettingsView-CgwOmLat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsView-CgwOmLat.js","sources":["../../src/views/SettingsView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Settings: where the API is, how to authenticate to it, and how the app looks.\n *\n * Everything here is client-side and persisted to localStorage by `useSettings` — nothing is sent\n * to the server, and there is nothing to save. Bindings write through immediately.\n */\nimport { computed, ref } from 'vue';\nimport { settings } from '../composables/useSettings';\nimport { state, loadHealth } from '../composables/useControlPlane';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport SelectMenu from '../components/SelectMenu.vue';\n\nconst checking = ref(false);\nconst reveal = ref(false);\n\n/**\n * What is in the token box, described without printing it.\n *\n * The point is to make a WRONG value visible at a glance. A password autofilled into this field is\n * short and matches neither shape, and \"12 characters, not a pstack token\" is the sentence that\n * ends the mystery — before this, the only symptom was every page 401ing.\n */\nconst tokenShape = computed(() => {\n const t = settings.token;\n if (t.startsWith('pstack_pat_')) return 'Looks like a personal token.';\n if (/^[0-9a-f]{40,}$/i.test(t)) return 'Looks like a machine token.';\n return `${t.length} characters — this does not look like a pstack token.`;\n});\n\n/**\n * The server tells us whether it enforces auth. When it does not, it is bound to loopback and a\n * token would be pointless — worth saying, so nobody hunts for one that was never issued.\n */\nconst authEnforced = computed(() => state.health?.authEnforced ?? null);\n\nasync function recheck(): Promise<void> {\n checking.value = true;\n try {\n await loadHealth();\n toast(state.healthError ? 'error' : 'ok', state.healthError || 'Control plane reachable');\n } finally {\n checking.value = false;\n }\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>Settings</h1>\n <div class=\"sub\">Stored in this browser only. Nothing here is sent to the server.</div>\n </div>\n </div>\n\n <!-- `settings-form` caps the field widths: a URL input stretched to the panel's full 1500px\n reads as a text editor, not a form — see the rule in app.css. -->\n <section class=\"panel settings-form\">\n <h2 class=\"phead-title\">Connection</h2>\n\n <div class=\"field\">\n <label for=\"apiBase\">API base URL</label>\n <input\n id=\"apiBase\"\n v-model.trim=\"settings.apiBase\"\n type=\"url\"\n spellcheck=\"false\"\n placeholder=\"(same origin)\"\n />\n <div class=\"mute hint\">\n Leave it empty unless you are pointing this page at another host.\n <InfoHint label=\"about the API base URL\">\n Empty means same-origin, which is how the control stack serves this page — the browser\n never makes a cross-origin request, so there is no CORS to configure. Set an absolute\n URL only for a development session against a remote host.\n </InfoHint>\n </div>\n </div>\n\n <div class=\"field\">\n <label for=\"token\">Access token</label>\n <!--\n NOT `type=\"password\"`, and none of these attributes are decorative.\n\n This field is why \"opening Settings signs me out\" was a real bug. A password input is an\n autofill magnet: Chrome and every password manager fill one on sight and ignore\n `autocomplete=\"off\"` while doing it. The filled value went straight through `v-model` into\n localStorage and onto every request as `Authorization: Bearer <someone's password>` — and\n the server used to treat a bad bearer as a hard refusal rather than falling back to the\n session cookie, so a perfectly good login 401'd on every route until site data was cleared.\n\n The server now falls through (that is the real fix), and this field stops inviting the\n fill: a text input that masks itself only while it holds a value, named nothing like a\n password, with the ignore hints the managers respect.\n -->\n <input\n id=\"token\"\n v-model.trim=\"settings.token\"\n :type=\"reveal || !settings.token ? 'text' : 'password'\"\n name=\"pstack-access-token\"\n autocomplete=\"off\"\n data-1p-ignore\n data-lpignore=\"true\"\n data-bwignore\n data-form-type=\"other\"\n spellcheck=\"false\"\n placeholder=\"paste the token from pstack init\"\n />\n <div class=\"row\" style=\"margin-top: var(--s2)\">\n <button v-if=\"settings.token\" class=\"ghost sm\" @click=\"reveal = !reveal\">\n {{ reveal ? 'Hide' : 'Show' }}\n </button>\n <ActionButton\n v-if=\"settings.token\"\n variant=\"ghost\"\n class=\"sm\"\n confirm=\"Clear it?\"\n @run=\"settings.token = ''\"\n >\n Clear\n </ActionButton>\n <span v-if=\"settings.token\" class=\"mute\" style=\"font-size: var(--t-xs)\">\n {{ tokenShape }}\n </span>\n </div>\n <div class=\"mute hint\">\n Authenticates every request — signing in with an account does the same job, so set this\n only for token-based access (the machine token, or a personal token from your account).\n <template v-if=\"authEnforced === false\">\n This server is not asking for one — it only accepts connections from this machine, so a\n token here is harmless but unnecessary.\n </template>\n </div>\n </div>\n\n <div class=\"row\" style=\"gap: 8px; margin-top: 4px\">\n <button class=\"btn\" :disabled=\"checking\" @click=\"recheck\">\n {{ checking ? 'Checking…' : 'Test connection' }}\n </button>\n <span v-if=\"state.health\" class=\"mute\">\n Connected to pstack {{ state.health.version }}\n <InfoHint label=\"where data is stored\">\n Deployment records and stored specs live in\n <code>{{ state.health.dataDir }}</code> on the host.\n </InfoHint>\n </span>\n <span v-else-if=\"state.healthError\" class=\"bad\">{{ state.healthError }}</span>\n </div>\n </section>\n\n <section class=\"panel\">\n <h2 class=\"phead-title\">Appearance</h2>\n\n <div class=\"field\">\n <label for=\"theme\">Theme</label>\n <SelectMenu\n v-model=\"settings.theme\" id=\"theme\"\n label=\"Theme\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'dark', label: 'Dark' },\n { value: 'light', label: 'Light' },\n ]\"\n />\n </div>\n\n <div class=\"field\">\n <label for=\"motion\">Motion</label>\n <SelectMenu\n v-model=\"settings.motion\" id=\"motion\"\n label=\"Motion\"\n :options=\"[\n { value: 'system', label: 'Follow the system' },\n { value: 'full', label: 'Always animate' },\n { value: 'none', label: 'No animation' },\n ]\"\n />\n <div class=\"mute hint\">\n “Follow the system” uses your device's reduce-motion setting. The other two override it,\n in either direction.\n </div>\n </div>\n </section>\n </div>\n</template>\n"],"names":["checking","ref","reveal","tokenShape","computed","t","settings","authEnforced","_a","state","recheck","loadHealth","toast","_createElementBlock","_createElementVNode","_hoisted_1","_cache","_hoisted_2","$event","_unref","_hoisted_3","_createVNode","InfoHint","_hoisted_4","_hoisted_6","_createBlock","ActionButton","_hoisted_7","_toDisplayString","_hoisted_8","_Fragment","_hoisted_9","_hoisted_10","_openBlock","_hoisted_11","_createTextVNode","_hoisted_12","_hoisted_13","_hoisted_14","SelectMenu","_hoisted_15"],"mappings":"szBAeA,MAAMA,EAAWC,EAAI,EAAK,EACpBC,EAASD,EAAI,EAAK,EASlBE,EAAaC,EAAS,IAAM,CAChC,MAAMC,EAAIC,EAAS,MACnB,OAAID,EAAE,WAAW,aAAa,EAAU,+BACpC,mBAAmB,KAAKA,CAAC,EAAU,8BAChC,GAAGA,EAAE,MAAM,uDACpB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AGvB,EAAA,EAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as z,J as V,A,G as B,c as n,a as s,e as c,w as d,t as o,E as D,u as h,g as m,z as b,F as g,f as l,_ as N,r as I,j as v,k as L,l as R,o as t,V as U,p as E,C as S}from"./index-T3JGe9ku.js";import{s as j,c as $}from"./useFormat-DIlTY5Dl.js";import{_ as q}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js";import{_ as F}from"./ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js";const T={class:"page-head"},G={class:"mute",style:{"font-size":"var(--t-sm)"}},H={style:{"font-size":"var(--t-xl)"}},J={class:"sub"},P={key:0},W={key:1},K={key:2},M={key:3,class:"mute"},O={key:1,class:"panel"},Q={class:"banner failed"},X={class:"panel"},Y={key:1,class:"kvlist"},Z={class:"k"},ee={class:"v"},se={key:0},te={key:1,class:"mute"},ne={class:"v"},ae={key:1,class:"mute"},oe={class:"v"},le={class:"v"},ie={key:0,class:"panel"},de={key:0,class:"banner plain"},re={key:1,class:"code"},ue={key:2,class:"mute"},ye=z({__name:"SpecDetailView",props:{name:{}},setup(y){const k=y,a=v(null),r=v(!0),u=v(""),p=v(!1);async function w(){r.value=!0,p.value=!1;const i=await E.getAuthed(`/api/specs/${encodeURIComponent(k.name)}`);if(r.value=!1,i.status===404){p.value=!0;return}if(!i.ok){u.value=S(i,"load this spec");return}u.value="",a.value=i.body}V(()=>k.name,w,{immediate:!0}),V(()=>U.token,w),A.deploymentsLoaded||B();const C=L(()=>A.deployments.filter(i=>i.specName===k.name));return(i,e)=>{var x;const f=R("RouterLink");return t(),n("div",null,[s("div",T,[s("div",null,[s("div",G,[c(f,{to:"/specs"},{default:d(()=>[...e[0]||(e[0]=[l("← specs",-1)])]),_:1})]),s("h1",H,o(y.name),1),s("div",J,[(x=a.value)!=null&&x.description?(t(),n("span",P,o(a.value.description),1)):p.value?(t(),n("span",W,"not found")):r.value?(t(),n("span",K,"loading…")):(t(),n("span",M,"no description"))])]),e[1]||(e[1]=s("span",{class:"grow"},null,-1)),a.value?(t(),n("span",{key:0,class:D(["badge",a.value.kind])},o(h(j)(a.value.kind)),3)):m("",!0)]),u.value?(t(),b(F,{key:0,text:u.value,title:"Could not load this spec."},null,8,["text"])):m("",!0),p.value?(t(),n("section",O,[s("div",Q,[s("b",null,"No spec named “"+o(y.name)+"”.",1),e[2]||(e[2]=s("p",null,"It may have been deleted, or this is an older link.",-1))])])):(t(),n(g,{key:2},[s("section",X,[r.value?(t(),b(q,{key:0,rows:4})):a.value?(t(),n("ul",Y,[s("li",null,[s("span",Z,[e[4]||(e[4]=l(" Needs ",-1)),c(N,{label:"what needs means"},{default:d(()=>[...e[3]||(e[3]=[l(" Variables the spec uses but does not set. Every deployment referencing it supplies these, which is how one spec serves many stacks — and a missing one is refused by name rather than filled in blank. ",-1)])]),_:1})]),s("span",ee,[a.value.requiredVars.length?(t(),n("b",se,o(a.value.requiredVars.join(", ")),1)):(t(),n("span",te,"nothing — every value is fixed by the spec"))])]),s("li",null,[e[6]||(e[6]=s("span",{class:"k"},"Used by",-1)),s("span",ne,[C.value.length?(t(),n(g,{key:0},[(t(!0),n(g,null,I(C.value,_=>(t(),b(f,{key:_.id,to:`/deployments/${encodeURIComponent(_.id)}`,style:{"margin-right":"10px"}},{default:d(()=>[l(o(_.id),1)]),_:2},1032,["to"]))),128)),c(N,{label:"why this matters"},{default:d(()=>[...e[5]||(e[5]=[l(" Deleting a spec while a deployment still references it is refused: that deployment could no longer be resolved, and one that cannot be resolved can never be torn down. ",-1)])]),_:1})],64)):(t(),n("span",ae,"no deployments reference it"))])]),s("li",null,[e[7]||(e[7]=s("span",{class:"k"},"Created",-1)),s("span",oe,o(h($)(a.value.createdAt)),1)]),s("li",null,[e[8]||(e[8]=s("span",{class:"k"},"Updated",-1)),s("span",le,o(h($)(a.value.updatedAt)),1)])])):m("",!0)]),a.value?(t(),n("section",ie,[e[13]||(e[13]=s("div",{class:"phead"},[s("h2",{class:"section"},"Source")],-1)),a.value.sourceWithheld?(t(),n("div",de,[e[12]||(e[12]=s("b",null,"Hidden without an access token.",-1)),s("p",null,[e[10]||(e[10]=l(" A spec's hooks are shell commands, and they often carry a password or an API token inline — so the server does not send the file to an unauthenticated reader. ",-1)),c(f,{to:"/settings"},{default:d(()=>[...e[9]||(e[9]=[l("Add your token",-1)])]),_:1}),e[11]||(e[11]=l(" to see it. ",-1))])])):a.value.source?(t(),n("pre",re,o(a.value.source),1)):(t(),n("p",ue,"The server returned no source for this spec."))])):m("",!0)],64))])}}});export{ye as default};
|
|
2
|
-
//# sourceMappingURL=SpecDetailView-BlHaL1Y8.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as q,A as k,G as L,c as a,a as t,f as l,e as i,w as y,_ as C,z as x,g as f,F as N,i as U,v as T,r as $,t as r,j as p,p as E,C as z,k as V,l as B,o as s,D,E as A,u as R}from"./index-T3JGe9ku.js";import{s as j}from"./useFormat-DIlTY5Dl.js";import{_ as F}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js";import{_ as I}from"./ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js";import{_ as M}from"./RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js";import{E as P}from"./EquivalentCommand-DX5xFW-p.js";import{_ as G}from"./RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const K={class:"page-head"},W={class:"sub"},H={key:1,class:"panel"},J={key:2,class:"panel"},O={class:"field",style:{"max-width":"320px","margin-bottom":"var(--s4)"}},Q={class:"cards","data-testid":"specs.list"},X={class:"stagger"},Y={class:"name","data-label":"name"},Z={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},ee={"data-label":"kind"},te={"data-label":"needs"},se={key:0},ne={key:1,class:"mute"},oe={"data-label":"used by"},ae={key:0},le={key:1,class:"mute"},ie={class:"dim nowrap","data-label":"updated"},re={key:0},de={colspan:"5",class:"mute"},pe={key:2,class:"banner plain"},we=q({__name:"SpecsView",setup(ue){const u=p([]),v=p(!1),m=p(""),h=p(!1),c=p("");async function b(){const o=await E.get("/api/specs");if(v.value=!0,o.status===404){h.value=!0;return}if(!o.ok){m.value=z(o,"load specs");return}m.value="",u.value=o.body.specs??[]}b(),k.deploymentsLoaded||L();const _=V(()=>{const o=new Map;for(const e of k.deployments){if(!e.specName)continue;const d=o.get(e.specName)??[];d.push(e.id),o.set(e.specName,d)}return o}),w=V(()=>{const o=c.value.trim().toLowerCase();return o?u.value.filter(e=>e.name.toLowerCase().includes(o)||(e.description??"").toLowerCase().includes(o)):u.value});return(o,e)=>{const d=B("RouterLink");return s(),a("div",null,[t("div",K,[t("div",null,[e[3]||(e[3]=t("h1",null,"Specs",-1)),t("div",W,[e[2]||(e[2]=l(" Stored once, used by any number of deployments ",-1)),i(C,{label:"why store a spec"},{default:y(()=>[...e[1]||(e[1]=[l(" Without this, every deployment carries its own copy — 50 open pull requests meant 50 identical files, and fixing a teardown step meant re-submitting it 50 times. ",-1)])]),_:1})])]),e[4]||(e[4]=t("span",{class:"grow"},null,-1)),i(G,{run:b})]),m.value?(s(),x(I,{key:0,text:m.value,title:"Could not load the specs."},null,8,["text"])):f("",!0),h.value?(s(),a("section",H,[...e[5]||(e[5]=[t("div",{class:"banner plain"},[t("b",null,"This server has no stored specs."),t("p",null," It is an older build of pstack — every deployment carries its own copy of its spec, which still works. Upgrade the host to store specs and reference them by name. ")],-1)])])):(s(),a("section",J,[v.value?u.value.length?(s(),a(N,{key:1},[t("div",O,[e[6]||(e[6]=t("label",{for:"q"},"Search",-1)),U(t("input",{id:"q","onUpdate:modelValue":e[0]||(e[0]=n=>c.value=n),type:"search",placeholder:"name or description"},null,512),[[T,c.value]])]),t("table",Q,[t("thead",null,[t("tr",null,[e[9]||(e[9]=t("th",null,"Name",-1)),e[10]||(e[10]=t("th",null,"Kind",-1)),t("th",null,[e[8]||(e[8]=l(" needs ",-1)),i(C,{label:"what needs means"},{default:y(()=>[...e[7]||(e[7]=[l(" Variables the spec uses but does not set. Every deployment referencing it must supply these, which is how one spec serves many stacks. ",-1)])]),_:1})]),e[11]||(e[11]=t("th",null,"Used by",-1)),e[12]||(e[12]=t("th",null,"Updated",-1))])]),t("tbody",X,[(s(!0),a(N,null,$(w.value,(n,S)=>{var g;return s(),a("tr",{key:n.name,style:D({"--i":S})},[t("td",Y,[i(d,{to:`/specs/${encodeURIComponent(n.name)}`},{default:y(()=>[l(r(n.name),1)]),_:2},1032,["to"]),n.description?(s(),a("div",Z,r(n.description),1)):f("",!0)]),t("td",ee,[t("span",{class:A(["badge",n.kind])},r(R(j)(n.kind)),3)]),t("td",te,[n.requiredVars.length?(s(),a("span",se,r(n.requiredVars.join(", ")),1)):(s(),a("span",ne,"nothing"))]),t("td",oe,[(g=_.value.get(n.name))!=null&&g.length?(s(),a("span",ae,r(_.value.get(n.name).length)+" deployment(s) ",1)):(s(),a("span",le,"nothing yet"))]),t("td",ie,[i(M,{at:n.updatedAt},null,8,["at"])])],4)}),128)),w.value.length?f("",!0):(s(),a("tr",re,[t("td",de,"No spec matches “"+r(c.value)+"”.",1)]))])])],64)):(s(),a("div",pe,[e[16]||(e[16]=t("b",null,"No specs stored yet.",-1)),t("p",null,[e[14]||(e[14]=l(" A deployment can carry its own spec inline — see ",-1)),i(d,{to:"/submit"},{default:y(()=>[...e[13]||(e[13]=[l("Submit",-1)])]),_:1}),e[15]||(e[15]=l(" — and that is all you need for a one-off. Storing one here pays off when several deployments share it. ",-1))]),e[17]||(e[17]=t("p",{class:"mute"},"This page cannot store one yet — the command below does.",-1)),i(P,{what:"storing a spec",method:"PUT",path:"/api/specs/my-spec",body:{spec:"…the contents of your preview.yml…"},cli:"pstack validate -f preview.yml # then PUT it with the curl above"})])):(s(),x(F,{key:0,rows:3}))]))])}}});export{we as default};
|
|
2
|
-
//# sourceMappingURL=SpecsView-C-bS2Av2.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as ne,c as r,a as s,f as a,e as f,w as $,_ as F,g as h,z as j,F as b,t as d,i as u,I as ae,v as p,r as V,Z as ie,j as y,p as q,C as G,k as x,O as L,o as i,u as re,D as de}from"./index-T3JGe9ku.js";import{s as ue}from"./useFormat-DIlTY5Dl.js";import{_ as W}from"./ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js";import{_ as Y}from"./ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js";import{_ as pe}from"./HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js";import{_ as ce}from"./RelativeTime.vue_vue_type_script_setup_true_lang-D4NO-r5D.js";import{_ as me}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js";import{_ as T}from"./SsoMark.vue_vue_type_script_setup_true_lang-aKprkHCF.js";import{_ as ve}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Teleport-CKfsIrp8.js";const he={class:"page-head"},fe={class:"sub"},ye={class:"panel"},ge={class:"phead"},ke={class:"section"},be={class:"mute"},we={class:"check"},Ue={key:0,class:"banner plain"},xe=["href"],Ce={class:"field"},_e={class:"row sso-copy"},$e={class:"sso-url"},Ie={key:1,class:"field"},Ae={class:"field"},Re=["placeholder"],Oe={class:"hint"},Se=["for"],Ve=["id","onUpdate:modelValue"],Le={class:"field"},Ee=["data-incomplete"],De={class:"hint"},ze={key:1,class:"field"},je={class:"field"},qe={class:"field"},Ge={class:"hint"},Te={class:"field"},Me=["placeholder"],Ne=["open"],Ke={class:"field"},Be={class:"field"},He={class:"field"},Pe={class:"field"},Fe={class:"field"},We={class:"section",style:{"margin-top":"var(--s4)"}},Ye={class:"row",style:{"flex-wrap":"wrap",gap:"var(--s3)"}},Ze=["for"],Je=["id","onUpdate:modelValue"],Qe={class:"panel"},Xe={class:"field"},es={class:"field"},ss={key:0,class:"field"},ts={key:1,class:"hint"},os={class:"row",style:{gap:"var(--s3)"}},ls={key:3,class:"panel"},ns={class:"phead"},as={class:"section"},is={class:"sso-tiles"},rs=["onClick"],ds={class:"sso-tile-mode"},us={class:"panel"},ps={class:"sso-cards stagger"},cs={class:"sso-card-main"},ms={class:"sso-card-head"},vs={class:"mute"},hs={key:0,class:"badge off"},fs={class:"sso-card-sub"},ys={class:"row-actions"},gs=["onClick"],ks={class:"panel"},bs={class:"row sso-copy"},ws={class:"sso-url"},Us=ne({__name:"SsoView",setup(xs){const E={subject:"sub",username:"preferred_username",email:"email",name:"name",avatar:"picture"},M=()=>({mode:"oidc",enabled:!0,label:"",clientId:"",discoveryUrl:"",provider:"",authorizeUrl:"",tokenUrl:"",userInfoUrl:"",emailsUrl:"",groupsUrl:"",scopes:"",claimMap:{...E},allowedEmailDomains:[],allowedUsernames:[],requiredGroups:[],defaultRole:"admin"}),w=y([]),I=y([]),A=y(""),R=y(!1),g=y(""),o=y(null),C=y(!1),O=y(!1),U=y("");async function D(){const t=await q.get("/api/sso/config");if(R.value=!0,!t.ok){g.value=G(t,"read the sign-on settings");return}g.value="",w.value=t.body.providers??[],I.value=t.body.presets??[],A.value=t.body.callbackUrl}D();const N=x(()=>!o.value&&(C.value||R.value&&!g.value&&w.value.length===0)),Z=x(()=>[...I.value.map(t=>({preset:t,id:t.key,label:t.label,mode:t.mode})),{preset:null,id:"custom-oauth2",label:"Custom OAuth 2.0",mode:"oauth2"},{preset:null,id:"custom-oidc",label:"Custom OpenID Connect",mode:"oidc"}]);function J(t){const e=new Set(w.value.map(n=>n.key));if(!e.has(t))return t;for(let n=2;;n++)if(!e.has(`${t}-${n}`))return`${t}-${n}`}function Q(t){const e=t.preset,n=M();n.mode=t.mode,n.provider=e?e.key:t.mode==="oauth2"?"custom":"",e&&(n.label=e.label,n.scopes=e.scopes,n.claimMap={...E,...e.claimMap},e.mode==="oauth2"?(n.authorizeUrl=e.authorizeUrl,n.tokenUrl=e.tokenUrl,n.userInfoUrl=e.userInfoUrl):e.discoveryUrl.includes("<")||(n.discoveryUrl=e.discoveryUrl)),o.value={originalKey:null,key:J(e?e.key:t.mode==="oauth2"?"custom":"oidc"),preset:e,form:n,secret:"",secretSet:!1,domains:"",usernames:"",groups:"",placeholders:{}},U.value="",C.value=!1}function X(t){o.value={originalKey:t.key,key:t.key,preset:I.value.find(e=>e.key===t.config.provider)??null,form:{...M(),...t.config,claimMap:{...E,...t.config.claimMap}},secret:"",secretSet:t.secretSet,domains:(t.config.allowedEmailDomains??[]).join(", "),usernames:(t.config.allowedUsernames??[]).join(", "),groups:(t.config.requiredGroups??[]).join(", "),placeholders:{}},U.value="",C.value=!1}const _=x(()=>{const t=o.value;if(!t||t.originalKey!==null||!t.preset||t.form.mode!=="oidc")return null;const e=t.preset.discoveryUrl;if(!e.includes("<"))return null;const n=[],c=/<([^>]+)>/g;let m=0;for(let v=c.exec(e);v;v=c.exec(e))v.index>m&&n.push(e.slice(m,v.index)),n.push({ph:v[1]??""}),m=v.index+v[0].length;return m<e.length&&n.push(e.slice(m)),n}),K=x(()=>(_.value??[]).flatMap(t=>typeof t=="string"?[]:[t.ph])),S=x(()=>{const t=_.value,e=o.value;return!t||!e?"":t.map(n=>{var c;return typeof n=="string"?n:((c=e.placeholders[n.ph])==null?void 0:c.trim())||`<${n.ph}>`}).join("")}),ee=/^[a-z0-9][a-z0-9-]{0,31}$/,B=x(()=>{const t=o.value;if(!t)return"nothing is being edited";const e=t.key.trim();if(!ee.test(e))return"the key must be a lowercase slug of letters, digits and dashes (32 at most)";if(t.originalKey===null&&w.value.some(n=>n.key===e))return`a provider is already stored under "${e}" — edit that one instead, or pick another key`;if(!t.form.clientId.trim())return"the client id is required";if(!t.secretSet&&!t.secret.trim())return"the client secret is required";if(t.form.mode==="oidc"){const n=_.value?S.value:t.form.discoveryUrl.trim();if(!n)return"the issuer is required";if(n.includes("<"))return"fill in the issuer placeholder first"}else if(!t.form.authorizeUrl.trim()||!t.form.tokenUrl.trim())return"the authorize and token URLs are required";return""}),z=t=>t.split(",").map(e=>e.trim()).filter(Boolean);async function se(){const t=o.value;if(!t)return;O.value=!0;const e={...t.form,key:t.key.trim(),clientSecret:t.secret.trim(),discoveryUrl:_.value?S.value:t.form.discoveryUrl,allowedEmailDomains:z(t.domains),allowedUsernames:z(t.usernames),requiredGroups:t.form.mode==="oidc"?[]:z(t.groups)},n=await q.put("/api/sso/config",e);if(O.value=!1,!n.ok){U.value=G(n,"save the provider");return}U.value="",L("ok",t.form.mode==="oidc"?"Saved — the issuer answered, so the settings are known good.":"Saved."),o.value=null,D()}async function te(t){const e=await q.del(`/api/sso/config/${t.key}`);if(!e.ok){g.value=G(e,"remove the provider");return}L("ok",`Removed ${t.key}. Existing accounts keep working.`),D()}async function H(){try{await navigator.clipboard.writeText(A.value),L("ok","Copied.")}catch{L("error","Could not reach the clipboard — select the text and copy it.")}}function oe(t){if(t.mode==="oidc")try{return`OpenID Connect · ${new URL(t.discoveryUrl).hostname}`}catch{return"OpenID Connect"}const e=I.value.find(n=>n.key===t.provider);return e?`OAuth 2.0 · ${e.label}`:"OAuth 2.0 · custom endpoints"}function le(t){var n,c,m;const e=[];return(n=t.allowedEmailDomains)!=null&&n.length&&e.push(`domains ${t.allowedEmailDomains.join(", ")}`),(c=t.allowedUsernames)!=null&&c.length&&e.push(`usernames ${t.allowedUsernames.join(", ")}`),(m=t.requiredGroups)!=null&&m.length&&e.push(`groups ${t.requiredGroups.join(", ")}`),e.length?`lets in ${e.join("; ")}`:"lets in anyone the provider allows"}return(t,e)=>{var n,c,m,v;return i(),r("div",null,[s("div",he,[s("div",null,[s("h1",null,[e[19]||(e[19]=a(" Single sign-on ",-1)),f(pe,{title:"How single sign-on works here"},{default:$(()=>[...e[18]||(e[18]=[s("p",null,[s("b",null,"This service is the relying party and nothing more."),a(" You register an OAuth or OIDC application in your own organisation and paste its client id and secret here. Your directory stays yours — no accounts are copied, and nothing is synchronised. ")],-1),s("p",null,[s("b",null,"Anyone who authenticates gets an account"),a(", created on their first sign-in. That is deliberate: your provider already decides who may authenticate (Workspace restricts to internal users, a GitHub app can be org-approved), and duplicating that policy here would just be a second list to keep in step. Narrow it with the sign-in rules on each provider if you need to. ")],-1),s("p",null,[s("b",null,"Identity is the provider's subject, not the email."),a(" Someone changing their address keeps their account, their history and their tokens. An address is only used to adopt an account that already exists here, and only when the provider says it is verified. ")],-1),s("p",null,[s("b",null,"Several providers share the accounts."),a(" Each shows up as its own button on the login page, and the same person arriving from the same directory is the same account — nothing about local accounts or personal tokens changes either way. ")],-1)])]),_:1})]),s("div",fe,[e[21]||(e[21]=a(" Let people sign in with the identity providers you already run ",-1)),f(F,{label:"what is stored"},{default:$(()=>[...e[20]||(e[20]=[a(" One row per provider: the endpoints, the client id, and the client secret. The secret has no read path — this page only learns whether one is stored, and leaving the field empty keeps it. ",-1)])]),_:1})])]),e[22]||(e[22]=s("span",{class:"grow"},null,-1)),R.value&&!g.value&&!o.value&&!N.value?(i(),r("button",{key:0,class:"primary",onClick:e[0]||(e[0]=l=>C.value=!0)},"Add provider")):h("",!0)]),g.value?(i(),j(Y,{key:0,text:g.value,title:"Single sign-on."},null,8,["text"])):h("",!0),R.value?o.value?(i(),r(b,{key:2},[s("section",ye,[s("div",ge,[f(T,{preset:o.value.form.provider,size:20},null,8,["preset"]),s("h2",ke,d(o.value.originalKey?`Edit ${o.value.originalKey}`:`Add ${((n=o.value.preset)==null?void 0:n.label)??(o.value.form.mode==="oidc"?"an OpenID Connect issuer":"a custom OAuth 2.0 provider")}`),1),s("span",be,d(o.value.form.mode==="oidc"?"OpenID Connect":"OAuth 2.0"),1),e[24]||(e[24]=s("span",{class:"grow"},null,-1)),s("label",we,[u(s("input",{"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.form.enabled=l),type:"checkbox"},null,512),[[ae,o.value.form.enabled]]),e[23]||(e[23]=a(" Enabled",-1))])]),o.value.preset?(i(),r("div",Ue,[s("b",null,"Register the app with "+d(o.value.preset.label),1),s("p",null,d(o.value.preset.setupHint),1),s("p",null,[s("a",{href:o.value.preset.setupUrl,target:"_blank",rel:"noopener"}," Create the app in "+d(o.value.preset.label)+" → ",9,xe)])])):h("",!0),s("div",Ce,[e[25]||(e[25]=s("label",null,"Redirect URI",-1)),s("div",_e,[s("code",$e,d(A.value),1),s("button",{type:"button",onClick:H},"Copy")]),e[26]||(e[26]=s("p",{class:"hint"}," Paste this into the provider's application as the redirect / callback URL. It has to match byte for byte, and it is the same for every provider on this host — a mismatch is the single most common reason the exchange fails, and the provider's error rarely says so. ",-1))]),o.value.originalKey?h("",!0):(i(),r("div",Ie,[e[27]||(e[27]=s("label",{for:"sso-key"},"Key",-1)),u(s("input",{id:"sso-key","onUpdate:modelValue":e[2]||(e[2]=l=>o.value.key=l),type:"text",spellcheck:"false",class:"sso-key"},null,512),[[p,o.value.key]]),e[28]||(e[28]=s("p",{class:"hint"}," This host's name for the provider — it appears in the sign-in URL and in exports, never to the person signing in. Lowercase letters, digits and dashes. ",-1))])),s("div",Ae,[e[29]||(e[29]=s("label",{for:"sso-label"},"Button text",-1)),u(s("input",{id:"sso-label","onUpdate:modelValue":e[3]||(e[3]=l=>o.value.form.label=l),type:"text",placeholder:((c=o.value.preset)==null?void 0:c.label)||"Acme SSO"},null,8,Re),[[p,o.value.form.label]]),s("p",Oe,"The login page draws it as “Continue with "+d(o.value.form.label||((m=o.value.preset)==null?void 0:m.label)||"…")+"”.",1)]),o.value.form.mode==="oidc"?(i(),r(b,{key:2},[_.value?(i(),r(b,{key:0},[(i(!0),r(b,null,V(K.value,l=>(i(),r("div",{key:l,class:"field"},[s("label",{for:`ph-${l}`},d(re(ue)(l)),9,Se),u(s("input",{id:`ph-${l}`,"onUpdate:modelValue":k=>o.value.placeholders[l]=k,type:"text",spellcheck:"false",class:"sso-key"},null,8,Ve),[[p,o.value.placeholders[l]]])]))),128)),s("div",Le,[e[30]||(e[30]=s("label",null,"Issuer",-1)),s("code",{class:"sso-url","data-incomplete":S.value.includes("<")||void 0},d(S.value),9,Ee),s("p",De," Assembled from the value"+d(K.value.length>1?"s":"")+" above — "+d((v=o.value.preset)==null?void 0:v.label)+" gives every account its own issuer, so there is no single URL a preset could carry. It is fetched when you save, so a typo is refused here rather than at someone's first login. ",1)])],64)):(i(),r("div",ze,[e[31]||(e[31]=s("label",{for:"sso-issuer"},"Issuer",-1)),u(s("input",{id:"sso-issuer","onUpdate:modelValue":e[4]||(e[4]=l=>o.value.form.discoveryUrl=l),type:"text",spellcheck:"false",placeholder:"https://accounts.google.com"},null,512),[[p,o.value.form.discoveryUrl]]),e[32]||(e[32]=s("p",{class:"hint"},[a(" Or the full "),s("code",null,"…/.well-known/openid-configuration"),a(" URL. Everything but the client id and secret is discovered from it, and it is fetched when you save — so a typo is refused here rather than at someone's first login. ")],-1))]))],64)):h("",!0),s("div",je,[e[33]||(e[33]=s("label",{for:"sso-client"},"Client id",-1)),u(s("input",{id:"sso-client","onUpdate:modelValue":e[5]||(e[5]=l=>o.value.form.clientId=l),type:"text",spellcheck:"false",autocomplete:"off"},null,512),[[p,o.value.form.clientId]])]),s("div",qe,[e[34]||(e[34]=s("label",{for:"sso-secret"},"Client secret",-1)),u(s("input",{id:"sso-secret","onUpdate:modelValue":e[6]||(e[6]=l=>o.value.secret=l),type:"password",spellcheck:"false",autocomplete:"new-password"},null,512),[[p,o.value.secret]]),s("p",Ge," Write-only. "+d(o.value.secretSet?"A secret is stored — leave this empty to keep it.":"Stored on save and never returned by any route."),1)]),s("div",Te,[e[35]||(e[35]=s("label",{for:"sso-scopes"},"Scopes",-1)),u(s("input",{id:"sso-scopes","onUpdate:modelValue":e[7]||(e[7]=l=>o.value.form.scopes=l),type:"text",spellcheck:"false",placeholder:o.value.form.mode==="oidc"?"openid profile email":""},null,8,Me),[[p,o.value.form.scopes]])]),o.value.form.mode==="oauth2"?(i(),r("details",{key:3,class:"sso-adv",open:!o.value.preset},[e[46]||(e[46]=s("summary",null,"Endpoints and claim mapping",-1)),s("div",Ke,[e[36]||(e[36]=s("label",{for:"sso-auth"},"Authorize URL",-1)),u(s("input",{id:"sso-auth","onUpdate:modelValue":e[8]||(e[8]=l=>o.value.form.authorizeUrl=l),type:"text",spellcheck:"false"},null,512),[[p,o.value.form.authorizeUrl]])]),s("div",Be,[e[37]||(e[37]=s("label",{for:"sso-token"},"Token URL",-1)),u(s("input",{id:"sso-token","onUpdate:modelValue":e[9]||(e[9]=l=>o.value.form.tokenUrl=l),type:"text",spellcheck:"false"},null,512),[[p,o.value.form.tokenUrl]])]),s("div",He,[e[38]||(e[38]=s("label",{for:"sso-userinfo"},"User info URL",-1)),u(s("input",{id:"sso-userinfo","onUpdate:modelValue":e[10]||(e[10]=l=>o.value.form.userInfoUrl=l),type:"text",spellcheck:"false"},null,512),[[p,o.value.form.userInfoUrl]]),e[39]||(e[39]=s("p",{class:"hint"},"Leave empty to take the identity from the token response alone — a subject and nothing else.",-1))]),s("div",Pe,[e[40]||(e[40]=s("label",{for:"sso-emails"},[a("Emails URL "),s("span",{class:"mute"},"(optional)")],-1)),u(s("input",{id:"sso-emails","onUpdate:modelValue":e[11]||(e[11]=l=>o.value.form.emailsUrl=l),type:"text",spellcheck:"false"},null,512),[[p,o.value.form.emailsUrl]]),e[41]||(e[41]=s("p",{class:"hint"}," Only consulted when the profile carries no address — which is GitHub's default. Filled in automatically for a preset, and needed only if you pointed the user info URL at your own host. ",-1))]),s("div",Fe,[e[42]||(e[42]=s("label",{for:"sso-groups-url"},[a("Groups URL "),s("span",{class:"mute"},"(optional)")],-1)),u(s("input",{id:"sso-groups-url","onUpdate:modelValue":e[12]||(e[12]=l=>o.value.form.groupsUrl=l),type:"text",spellcheck:"false"},null,512),[[p,o.value.form.groupsUrl]]),e[43]||(e[43]=s("p",{class:"hint"}," Where this host asks which groups someone is in. Only consulted when there is a group rule below. Filled in automatically for a preset — but only while the user info URL is still the preset's, because a self-hosted host's token must not be sent to the public one, so a self-hosted provider needs this typed. ",-1))]),s("h3",We,[e[45]||(e[45]=a(" Claim mapping ",-1)),f(F,{label:"what this is"},{default:$(()=>[...e[44]||(e[44]=[a(" Which key of the provider's user response holds each field. Flat lookups, not expressions. A preset fills these in; you only touch them for a provider nobody has written a preset for. ",-1)])]),_:1})]),s("div",Ye,[(i(),r(b,null,V(["subject","username","email","name","avatar"],l=>s("div",{key:l,class:"field inline"},[s("label",{for:`cm-${l}`},d(l),9,Ze),u(s("input",{id:`cm-${l}`,"onUpdate:modelValue":k=>o.value.form.claimMap[l]=k,type:"text",spellcheck:"false",style:{width:"11rem"}},null,8,Je),[[p,o.value.form.claimMap[l]]])])),64))])],8,Ne)):h("",!0)]),s("section",Qe,[e[53]||(e[53]=s("div",{class:"phead"},[s("h2",{class:"section"},"Who gets an account")],-1)),e[54]||(e[54]=s("p",{class:"dim"},[a(" By default, anyone this provider lets authenticate. It already owns that decision; this is only here for the case where the application you registered is broader than the people who should reach this control plane. "),s("b",null,"Any one entry in a list is enough to satisfy that list, and every list you fill in has to be satisfied"),a(" — fill all three in and a login needs a listed domain, a matching username, and one of the groups. A list left empty is not a rule at all: it lets everyone past that check, it does not lock everyone out. ")],-1)),s("div",Xe,[e[47]||(e[47]=s("label",{for:"sso-domains"},"Allowed email domains",-1)),u(s("input",{id:"sso-domains","onUpdate:modelValue":e[13]||(e[13]=l=>o.value.domains=l),type:"text",spellcheck:"false",placeholder:"example.com, corp.example"},null,512),[[p,o.value.domains]]),e[48]||(e[48]=s("p",{class:"hint"},[a(" Comma-separated; subdomains count. Empty means no restriction. "),s("b",null,"Non-empty means a login with no email address at all is refused too"),a(" — a provider that hides the address (a private GitHub profile with no "),s("code",null,"user:email"),a(" scope) cannot be checked, so it is not waved through. ")],-1))]),s("div",es,[e[49]||(e[49]=s("label",{for:"sso-usernames"},"Allowed usernames",-1)),u(s("input",{id:"sso-usernames","onUpdate:modelValue":e[14]||(e[14]=l=>o.value.usernames=l),type:"text",spellcheck:"false",placeholder:"octocat, qa-[0-9]*"},null,512),[[p,o.value.usernames]]),e[50]||(e[50]=ie('<p class="hint" data-v-8383cb2f> Comma-separated patterns, case-insensitive: <code data-v-8383cb2f>*</code>, <code data-v-8383cb2f>?</code> and <code data-v-8383cb2f>[0-9]</code> classes. Empty means no restriction. <b data-v-8383cb2f>Non-empty means a login whose provider sends no username is refused too</b> — so this is a rule for a provider that actually has usernames (GitHub's <code data-v-8383cb2f>login</code>, GitLab's <code data-v-8383cb2f>username</code>). On an OpenID Connect issuer that sends no <code data-v-8383cb2f>preferred_username</code> it refuses everyone rather than nobody, so set it only where you know the provider sends one. </p>',1))]),o.value.form.mode==="oauth2"?(i(),r("div",ss,[e[51]||(e[51]=s("label",{for:"sso-groups"},"Required groups",-1)),u(s("input",{id:"sso-groups","onUpdate:modelValue":e[15]||(e[15]=l=>o.value.groups=l),type:"text",spellcheck:"false",placeholder:"acme, acme/backend"},null,512),[[p,o.value.groups]]),e[52]||(e[52]=s("p",{class:"hint"},[a(" Comma-separated, and "),s("b",null,"exact names, not patterns"),a(" — an organisation login, or a group path like "),s("code",null,"acme/backend"),a(". Case-insensitive. Empty means no restriction. Non-empty makes every sign-in ask the provider for that person's groups, so it needs the OAuth scope that endpoint requires: "),s("b",null,"add it to Scopes above, or the save is refused"),a(" — and the refusal names the scope. It also needs a provider whose group list this host knows how to read, which the save checks by name. If that call does not answer, the sign-in is refused rather than allowed. ")],-1))])):(i(),r("p",ts," A group rule needs a provider whose groups endpoint this host knows how to read — an OAuth 2.0 preset (GitHub, GitLab), not a discovered OpenID Connect issuer — so there is none here. "))]),U.value?(i(),j(Y,{key:0,text:U.value,title:"Not saved."},null,8,["text"])):h("",!0),s("div",os,[f(W,{variant:"primary",pending:O.value,disabled:O.value||!!B.value,title:B.value||void 0,onClick:se},{default:$(()=>[a(d(o.value.originalKey?"Save changes":"Add provider"),1)]),_:1},8,["pending","disabled","title"]),s("button",{class:"ghost",onClick:e[16]||(e[16]=l=>o.value=null)},"Cancel")])],64)):N.value?(i(),r("section",ls,[s("div",ns,[s("h2",as,d(w.value.length?"Add a provider":"Pick a provider"),1),e[55]||(e[55]=s("span",{class:"grow"},null,-1)),w.value.length?(i(),r("button",{key:0,class:"ghost",onClick:e[17]||(e[17]=l=>C.value=!1)},"Cancel")):h("",!0)]),e[56]||(e[56]=s("p",{class:"dim"}," Pick where your team already signs in. A preset knows the provider's endpoints and its quirks — the only things it cannot know are the client id and secret you get when you register the app, and the form that opens says exactly where to do that. ",-1)),s("div",is,[(i(!0),r(b,null,V(Z.value,l=>{var k;return i(),r("button",{key:l.id,class:"sso-tile",onClick:P=>Q(l)},[f(T,{preset:((k=l.preset)==null?void 0:k.key)??"custom",size:22},null,8,["preset"]),s("span",null,d(l.label),1),s("span",ds,d(l.mode==="oidc"?"OpenID Connect":"OAuth 2.0"),1)],8,rs)}),128))])])):g.value?h("",!0):(i(),r(b,{key:4},[s("section",us,[e[58]||(e[58]=s("div",{class:"phead"},[s("h2",{class:"section"},"Providers")],-1)),s("div",ps,[(i(!0),r(b,null,V(w.value,(l,k)=>(i(),r("div",{key:l.key,class:"sso-card",style:de({"--i":k})},[f(T,{preset:l.config.provider,size:22},null,8,["preset"]),s("div",cs,[s("div",ms,[s("b",null,d(l.config.label),1),s("code",vs,d(l.key),1),l.config.enabled?h("",!0):(i(),r("span",hs,"disabled"))]),s("div",fs,[a(d(oe(l.config))+" · "+d(le(l.config))+" · updated ",1),f(ce,{at:l.updatedAt},null,8,["at"])])]),s("div",ys,[s("button",{class:"ghost sm",onClick:P=>X(l)},"Edit",8,gs),f(W,{variant:"ghost",class:"sm sso-remove",confirm:`Remove ${l.key}?`,onRun:P=>te(l)},{default:$(()=>[...e[57]||(e[57]=[a(" Remove ",-1)])]),_:1},8,["confirm","onRun"])])],4))),128))]),e[59]||(e[59]=s("p",{class:"mute",style:{"font-size":"var(--t-sm)","margin-top":"var(--s3)"}}," Removing a provider does not delete anyone. Those accounts keep their personal tokens, and pointing the same provider back at this host re-links them by subject. ",-1))]),s("section",ks,[e[60]||(e[60]=s("div",{class:"phead"},[s("h2",{class:"section"},"Callback URL")],-1)),e[61]||(e[61]=s("p",{class:"dim"}," The redirect URI to register with every provider — one URL for all of them, built by the server so it cannot drift from the one the sign-in flow actually sends. ",-1)),s("div",bs,[s("code",ws,d(A.value),1),s("button",{type:"button",onClick:H},"Copy")])])],64)):(i(),j(me,{key:1,rows:4}))])}}}),Es=ve(Us,[["__scopeId","data-v-8383cb2f"]]);export{Es as default};
|
|
2
|
-
//# sourceMappingURL=SsoView-BUz2EaVq.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SsoView-BUz2EaVq.js","sources":["../../src/views/SsoView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Single sign-on: the identity providers this host lets people sign in with.\n *\n * THE POINT OF THE PAGE is that nobody has to create accounts here any more. Whoever can\n * authenticate against the operator's directory can sign in, and the account appears on first\n * login. The provider keeps owning who is allowed — Google Workspace restricts to internal users,\n * a GitHub OAuth app can be org-approved — and this page deliberately does not rebuild that policy.\n *\n * The page is a LIST now, not one form: a host stores several providers, each under an\n * operator-chosen key. Three states, exclusive by construction —\n * - the list the stored providers as cards, plus the callback URL;\n * - the picker \"Add provider\": a grid of preset tiles. A preset knows everything about a\n * provider except the two values only the operator has (client id + secret),\n * so picking one leaves a form that is mostly already filled in;\n * - the form one provider being added or edited.\n *\n * THREE THINGS THE FORM MUST NOT GET WRONG:\n *\n * 1. The callback URL is READ-ONLY and comes from the server. It has to match what is registered\n * on the provider's side byte for byte, and a value typed here (or derived from\n * `location.origin`) would drift from the one the flow actually sends the moment the UI is\n * reached by a second hostname. It is ONE URL for every provider.\n * 2. The client secret is write-only. A read answers `secretSet` and nothing else; on an\n * existing provider an EMPTY field means \"keep what is stored\" (the server's rule), so an\n * operator editing the label cannot silently wipe it.\n * 3. A template preset's issuer (`https://<your-domain>.okta.com/…`) is not a value — the\n * placeholder renders as its own required field and the URL is assembled in view, because the\n * server refuses the template saved verbatim and the operator should never meet that refusal.\n */\nimport { computed, ref } from 'vue';\nimport { api, problem } from '../api/client';\nimport type { ClaimMap, SsoConfig, SsoConfigResponse, SsoPreset, SsoProviderEntry } from '../api/types';\nimport { sentence } from '../composables/useFormat';\nimport { toast } from '../composables/useToasts';\nimport ActionButton from '../components/ActionButton.vue';\nimport ErrorNote from '../components/ErrorNote.vue';\nimport HelpModal from '../components/HelpModal.vue';\nimport InfoHint from '../components/InfoHint.vue';\nimport RelativeTime from '../components/RelativeTime.vue';\nimport SkeletonList from '../components/SkeletonList.vue';\nimport SsoMark from '../components/SsoMark.vue';\n\nconst OIDC_CLAIMS: ClaimMap = { subject: 'sub', username: 'preferred_username', email: 'email', name: 'name', avatar: 'picture' };\n\nconst blank = (): SsoConfig => ({\n mode: 'oidc',\n enabled: true,\n label: '',\n clientId: '',\n discoveryUrl: '',\n provider: '',\n authorizeUrl: '',\n tokenUrl: '',\n userInfoUrl: '',\n emailsUrl: '',\n groupsUrl: '',\n scopes: '',\n claimMap: { ...OIDC_CLAIMS },\n allowedEmailDomains: [],\n allowedUsernames: [],\n requiredGroups: [],\n defaultRole: 'admin',\n});\n\nconst providers = ref<SsoProviderEntry[]>([]);\nconst presets = ref<SsoPreset[]>([]);\nconst callbackUrl = ref('');\nconst loaded = ref(false);\nconst listError = ref('');\n\ntype Editing = {\n /** null while adding; otherwise the stored key being edited. The key is the row's identity. */\n originalKey: string | null;\n key: string;\n /** The preset the config came from, for the setup walkthrough and the template flow. */\n preset: SsoPreset | null;\n form: SsoConfig;\n secret: string;\n secretSet: boolean;\n // The three rule lists are edited as comma-separated text, split on save. A `string[]` bound to\n // an input cannot hold \"acme,\" while someone is still typing the second entry.\n domains: string;\n usernames: string;\n groups: string;\n /** One value per `<placeholder>` in a template preset's issuer, keyed by placeholder name. */\n placeholders: Record<string, string>;\n};\nconst editing = ref<Editing | null>(null);\nconst picking = ref(false);\nconst saving = ref(false);\nconst formError = ref('');\n\nasync function load(): Promise<void> {\n const r = await api.get<SsoConfigResponse>('/api/sso/config');\n loaded.value = true;\n if (!r.ok) {\n listError.value = problem(r, 'read the sign-on settings');\n return;\n }\n listError.value = '';\n providers.value = r.body.providers ?? [];\n presets.value = r.body.presets ?? [];\n callbackUrl.value = r.body.callbackUrl;\n}\nvoid load();\n\n/** With nothing configured the picker IS the page — an empty list with a button would be a detour. */\nconst showPicker = computed(() => !editing.value && (picking.value || (loaded.value && !listError.value && providers.value.length === 0)));\n\nconst pickerTiles = computed(() => [\n ...presets.value.map((p) => ({ preset: p as SsoPreset | null, id: p.key, label: p.label, mode: p.mode })),\n { preset: null, id: 'custom-oauth2', label: 'Custom OAuth 2.0', mode: 'oauth2' as const },\n { preset: null, id: 'custom-oidc', label: 'Custom OpenID Connect', mode: 'oidc' as const },\n]);\n\n/** A free slug for a second provider on the same preset: github, github-2, github-3… */\nfunction suggestKey(base: string): string {\n const taken = new Set(providers.value.map((p) => p.key));\n if (!taken.has(base)) return base;\n for (let n = 2; ; n++) if (!taken.has(`${base}-${n}`)) return `${base}-${n}`;\n}\n\nfunction startAdd(tile: { preset: SsoPreset | null; mode: 'oidc' | 'oauth2' }): void {\n const p = tile.preset;\n const f = blank();\n f.mode = tile.mode;\n f.provider = p ? p.key : tile.mode === 'oauth2' ? 'custom' : '';\n if (p) {\n f.label = p.label;\n f.scopes = p.scopes;\n f.claimMap = { ...OIDC_CLAIMS, ...p.claimMap };\n if (p.mode === 'oauth2') {\n f.authorizeUrl = p.authorizeUrl;\n f.tokenUrl = p.tokenUrl;\n f.userInfoUrl = p.userInfoUrl;\n // emailsUrl/groupsUrl left blank on purpose: the server fills the preset's own back in, and\n // only while userInfoUrl is still the preset's — a self-hosted host's token must not be sent\n // to the public endpoints.\n } else if (!p.discoveryUrl.includes('<')) {\n f.discoveryUrl = p.discoveryUrl;\n }\n }\n editing.value = {\n originalKey: null,\n key: suggestKey(p ? p.key : tile.mode === 'oauth2' ? 'custom' : 'oidc'),\n preset: p,\n form: f,\n secret: '',\n secretSet: false,\n domains: '',\n usernames: '',\n groups: '',\n placeholders: {},\n };\n formError.value = '';\n picking.value = false;\n}\n\nfunction startEdit(entry: SsoProviderEntry): void {\n editing.value = {\n originalKey: entry.key,\n key: entry.key,\n preset: presets.value.find((x) => x.key === entry.config.provider) ?? null,\n form: { ...blank(), ...entry.config, claimMap: { ...OIDC_CLAIMS, ...entry.config.claimMap } },\n secret: '',\n secretSet: entry.secretSet,\n domains: (entry.config.allowedEmailDomains ?? []).join(', '),\n usernames: (entry.config.allowedUsernames ?? []).join(', '),\n groups: (entry.config.requiredGroups ?? []).join(', '),\n placeholders: {},\n };\n formError.value = '';\n picking.value = false;\n}\n\n/**\n * The template flow, add-mode only: an existing row's issuer is already concrete, whatever preset\n * it came from. Splits `https://<your-domain>.okta.com/…` into literals and placeholder names.\n */\nconst templateParts = computed<Array<string | { ph: string }> | null>(() => {\n const e = editing.value;\n if (!e || e.originalKey !== null || !e.preset || e.form.mode !== 'oidc') return null;\n const t = e.preset.discoveryUrl;\n if (!t.includes('<')) return null;\n const parts: Array<string | { ph: string }> = [];\n const re = /<([^>]+)>/g;\n let last = 0;\n for (let m = re.exec(t); m; m = re.exec(t)) {\n if (m.index > last) parts.push(t.slice(last, m.index));\n parts.push({ ph: m[1] ?? '' });\n last = m.index + m[0].length;\n }\n if (last < t.length) parts.push(t.slice(last));\n return parts;\n});\n\nconst placeholderNames = computed(() =>\n (templateParts.value ?? []).flatMap((p) => (typeof p === 'string' ? [] : [p.ph])),\n);\n\n/** The issuer as assembled so far. An unfilled placeholder stays visible as `<name>`. */\nconst assembledDiscovery = computed(() => {\n const parts = templateParts.value;\n const e = editing.value;\n if (!parts || !e) return '';\n return parts.map((p) => (typeof p === 'string' ? p : e.placeholders[p.ph]?.trim() || `<${p.ph}>`)).join('');\n});\n\nconst keyRe = /^[a-z0-9][a-z0-9-]{0,31}$/;\n\n/** Why the save button is disabled — shown as its title, per the disabled-controls rule. */\nconst cannotSave = computed<string>(() => {\n const e = editing.value;\n if (!e) return 'nothing is being edited';\n const key = e.key.trim();\n if (!keyRe.test(key)) return 'the key must be a lowercase slug of letters, digits and dashes (32 at most)';\n if (e.originalKey === null && providers.value.some((p) => p.key === key))\n return `a provider is already stored under \"${key}\" — edit that one instead, or pick another key`;\n if (!e.form.clientId.trim()) return 'the client id is required';\n if (!e.secretSet && !e.secret.trim()) return 'the client secret is required';\n if (e.form.mode === 'oidc') {\n const url = templateParts.value ? assembledDiscovery.value : e.form.discoveryUrl.trim();\n if (!url) return 'the issuer is required';\n if (url.includes('<')) return 'fill in the issuer placeholder first';\n } else if (!e.form.authorizeUrl.trim() || !e.form.tokenUrl.trim()) {\n return 'the authorize and token URLs are required';\n }\n return '';\n});\n\nconst list = (s: string): string[] => s.split(',').map((v) => v.trim()).filter(Boolean);\n\nasync function save(): Promise<void> {\n const e = editing.value;\n if (!e) return;\n saving.value = true;\n // Annotated, not inline: `api.put` takes `unknown`, so without a type here a mistyped field\n // (`allowedUsernams`) would compile, the server would see no such field, the rule would silently\n // restrict nobody, and the form would say \"Saved\".\n const body: SsoConfig & { key: string; clientSecret: string } = {\n ...e.form,\n key: e.key.trim(),\n clientSecret: e.secret.trim(),\n discoveryUrl: templateParts.value ? assembledDiscovery.value : e.form.discoveryUrl,\n allowedEmailDomains: list(e.domains),\n allowedUsernames: list(e.usernames),\n requiredGroups: e.form.mode === 'oidc' ? [] : list(e.groups),\n };\n const r = await api.put<{ ok: boolean; key: string }>('/api/sso/config', body);\n saving.value = false;\n if (!r.ok) {\n // Verbatim, right above the button that was pressed — the refusals are written to be read\n // (the scope refusal names the scope; the template refusal names the placeholder).\n formError.value = problem(r, 'save the provider');\n return;\n }\n formError.value = '';\n toast('ok', e.form.mode === 'oidc' ? 'Saved — the issuer answered, so the settings are known good.' : 'Saved.');\n editing.value = null;\n void load();\n}\n\nasync function remove(entry: SsoProviderEntry): Promise<void> {\n const r = await api.del(`/api/sso/config/${entry.key}`);\n if (!r.ok) {\n listError.value = problem(r, 'remove the provider');\n return;\n }\n toast('ok', `Removed ${entry.key}. Existing accounts keep working.`);\n void load();\n}\n\nasync function copyCallback(): Promise<void> {\n try {\n await navigator.clipboard.writeText(callbackUrl.value);\n toast('ok', 'Copied.');\n } catch {\n toast('error', 'Could not reach the clipboard — select the text and copy it.');\n }\n}\n\n/** The card's second line, first half: what kind of provider this row talks to. */\nfunction whereLine(c: SsoConfig): string {\n if (c.mode === 'oidc') {\n try {\n return `OpenID Connect · ${new URL(c.discoveryUrl).hostname}`;\n } catch {\n return 'OpenID Connect';\n }\n }\n const p = presets.value.find((x) => x.key === c.provider);\n return p ? `OAuth 2.0 · ${p.label}` : 'OAuth 2.0 · custom endpoints';\n}\n\n/** The card's second line, second half: the sign-in rules, or the honest default. */\nfunction rulesLine(c: SsoConfig): string {\n const parts: string[] = [];\n if (c.allowedEmailDomains?.length) parts.push(`domains ${c.allowedEmailDomains.join(', ')}`);\n if (c.allowedUsernames?.length) parts.push(`usernames ${c.allowedUsernames.join(', ')}`);\n if (c.requiredGroups?.length) parts.push(`groups ${c.requiredGroups.join(', ')}`);\n return parts.length ? `lets in ${parts.join('; ')}` : 'lets in anyone the provider allows';\n}\n</script>\n\n<template>\n <div>\n <div class=\"page-head\">\n <div>\n <h1>\n Single sign-on\n <HelpModal title=\"How single sign-on works here\">\n <p>\n <b>This service is the relying party and nothing more.</b> You register an OAuth or\n OIDC application in your own organisation and paste its client id and secret here. Your\n directory stays yours — no accounts are copied, and nothing is synchronised.\n </p>\n <p>\n <b>Anyone who authenticates gets an account</b>, created on their first sign-in. That is\n deliberate: your provider already decides who may authenticate (Workspace restricts to\n internal users, a GitHub app can be org-approved), and duplicating that policy here\n would just be a second list to keep in step. Narrow it with the sign-in rules on each\n provider if you need to.\n </p>\n <p>\n <b>Identity is the provider's subject, not the email.</b> Someone changing their\n address keeps their account, their history and their tokens. An address is only used to\n adopt an account that already exists here, and only when the provider says it is\n verified.\n </p>\n <p>\n <b>Several providers share the accounts.</b> Each shows up as its own button on the\n login page, and the same person arriving from the same directory is the same account —\n nothing about local accounts or personal tokens changes either way.\n </p>\n </HelpModal>\n </h1>\n <div class=\"sub\">\n Let people sign in with the identity providers you already run\n <InfoHint label=\"what is stored\">\n One row per provider: the endpoints, the client id, and the client secret. The secret has\n no read path — this page only learns whether one is stored, and leaving the field empty\n keeps it.\n </InfoHint>\n </div>\n </div>\n <span class=\"grow\" />\n <button v-if=\"loaded && !listError && !editing && !showPicker\" class=\"primary\" @click=\"picking = true\">Add provider</button>\n </div>\n\n <ErrorNote v-if=\"listError\" :text=\"listError\" title=\"Single sign-on.\" />\n <SkeletonList v-if=\"!loaded\" :rows=\"4\" />\n\n <!-- ============================ the form: one provider ============================ -->\n <template v-else-if=\"editing\">\n <section class=\"panel\">\n <div class=\"phead\">\n <SsoMark :preset=\"editing.form.provider\" :size=\"20\" />\n <h2 class=\"section\">\n {{\n editing.originalKey\n ? `Edit ${editing.originalKey}`\n : `Add ${editing.preset?.label ?? (editing.form.mode === 'oidc' ? 'an OpenID Connect issuer' : 'a custom OAuth 2.0 provider')}`\n }}\n </h2>\n <span class=\"mute\">{{ editing.form.mode === 'oidc' ? 'OpenID Connect' : 'OAuth 2.0' }}</span>\n <span class=\"grow\" />\n <label class=\"check\"><input v-model=\"editing.form.enabled\" type=\"checkbox\" /> Enabled</label>\n </div>\n\n <!-- The walkthrough: where to create the app, in the preset's own words. -->\n <div v-if=\"editing.preset\" class=\"banner plain\">\n <b>Register the app with {{ editing.preset.label }}</b>\n <p>{{ editing.preset.setupHint }}</p>\n <p>\n <a :href=\"editing.preset.setupUrl\" target=\"_blank\" rel=\"noopener\">\n Create the app in {{ editing.preset.label }} →\n </a>\n </p>\n </div>\n\n <!-- THE thing every operator hunts for, so it lives inside the form, first. -->\n <div class=\"field\">\n <label>Redirect URI</label>\n <div class=\"row sso-copy\">\n <code class=\"sso-url\">{{ callbackUrl }}</code>\n <button type=\"button\" @click=\"copyCallback\">Copy</button>\n </div>\n <p class=\"hint\">\n Paste this into the provider's application as the redirect / callback URL. It has to\n match byte for byte, and it is the same for every provider on this host — a mismatch is\n the single most common reason the exchange fails, and the provider's error rarely says\n so.\n </p>\n </div>\n\n <div v-if=\"!editing.originalKey\" class=\"field\">\n <label for=\"sso-key\">Key</label>\n <input id=\"sso-key\" v-model=\"editing.key\" type=\"text\" spellcheck=\"false\" class=\"sso-key\" />\n <p class=\"hint\">\n This host's name for the provider — it appears in the sign-in URL and in exports, never\n to the person signing in. Lowercase letters, digits and dashes.\n </p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-label\">Button text</label>\n <input id=\"sso-label\" v-model=\"editing.form.label\" type=\"text\" :placeholder=\"editing.preset?.label || 'Acme SSO'\" />\n <p class=\"hint\">The login page draws it as “Continue with {{ editing.form.label || editing.preset?.label || '…' }}”.</p>\n </div>\n\n <!-- ── OIDC: the issuer. A template preset assembles it from the placeholder(s). -->\n <template v-if=\"editing.form.mode === 'oidc'\">\n <template v-if=\"templateParts\">\n <div v-for=\"ph in placeholderNames\" :key=\"ph\" class=\"field\">\n <label :for=\"`ph-${ph}`\">{{ sentence(ph) }}</label>\n <input :id=\"`ph-${ph}`\" v-model=\"editing.placeholders[ph]\" type=\"text\" spellcheck=\"false\" class=\"sso-key\" />\n </div>\n <div class=\"field\">\n <label>Issuer</label>\n <code class=\"sso-url\" :data-incomplete=\"assembledDiscovery.includes('<') || undefined\">{{ assembledDiscovery }}</code>\n <p class=\"hint\">\n Assembled from the value{{ placeholderNames.length > 1 ? 's' : '' }} above —\n {{ editing.preset?.label }} gives every account its own issuer, so there is no single\n URL a preset could carry. It is fetched when you save, so a typo is refused here\n rather than at someone's first login.\n </p>\n </div>\n </template>\n <div v-else class=\"field\">\n <label for=\"sso-issuer\">Issuer</label>\n <input id=\"sso-issuer\" v-model=\"editing.form.discoveryUrl\" type=\"text\" spellcheck=\"false\" placeholder=\"https://accounts.google.com\" />\n <p class=\"hint\">\n Or the full <code>…/.well-known/openid-configuration</code> URL. Everything but the\n client id and secret is discovered from it, and it is fetched when you save — so a typo\n is refused here rather than at someone's first login.\n </p>\n </div>\n </template>\n\n <div class=\"field\">\n <label for=\"sso-client\">Client id</label>\n <input id=\"sso-client\" v-model=\"editing.form.clientId\" type=\"text\" spellcheck=\"false\" autocomplete=\"off\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-secret\">Client secret</label>\n <input id=\"sso-secret\" v-model=\"editing.secret\" type=\"password\" spellcheck=\"false\" autocomplete=\"new-password\" />\n <p class=\"hint\">\n Write-only.\n {{ editing.secretSet ? 'A secret is stored — leave this empty to keep it.' : 'Stored on save and never returned by any route.' }}\n </p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-scopes\">Scopes</label>\n <input id=\"sso-scopes\" v-model=\"editing.form.scopes\" type=\"text\" spellcheck=\"false\" :placeholder=\"editing.form.mode === 'oidc' ? 'openid profile email' : ''\" />\n </div>\n\n <!-- ── OAuth 2.0: the endpoints and the claim mapping. Filled in by the preset, needed\n open only for a custom provider or a self-hosted host — which is exactly the gitlab\n preset with its URLs replaced, so everything stays editable. -->\n <details v-if=\"editing.form.mode === 'oauth2'\" class=\"sso-adv\" :open=\"!editing.preset\">\n <summary>Endpoints and claim mapping</summary>\n\n <div class=\"field\">\n <label for=\"sso-auth\">Authorize URL</label>\n <input id=\"sso-auth\" v-model=\"editing.form.authorizeUrl\" type=\"text\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-token\">Token URL</label>\n <input id=\"sso-token\" v-model=\"editing.form.tokenUrl\" type=\"text\" spellcheck=\"false\" />\n </div>\n <div class=\"field\">\n <label for=\"sso-userinfo\">User info URL</label>\n <input id=\"sso-userinfo\" v-model=\"editing.form.userInfoUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">Leave empty to take the identity from the token response alone — a subject and nothing else.</p>\n </div>\n <div class=\"field\">\n <label for=\"sso-emails\">Emails URL <span class=\"mute\">(optional)</span></label>\n <input id=\"sso-emails\" v-model=\"editing.form.emailsUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">\n Only consulted when the profile carries no address — which is GitHub's default. Filled\n in automatically for a preset, and needed only if you pointed the user info URL at your\n own host.\n </p>\n </div>\n <div class=\"field\">\n <label for=\"sso-groups-url\">Groups URL <span class=\"mute\">(optional)</span></label>\n <input id=\"sso-groups-url\" v-model=\"editing.form.groupsUrl\" type=\"text\" spellcheck=\"false\" />\n <p class=\"hint\">\n Where this host asks which groups someone is in. Only consulted when there is a group\n rule below. Filled in automatically for a preset — but only while the user info URL is\n still the preset's, because a self-hosted host's token must not be sent to the public\n one, so a self-hosted provider needs this typed.\n </p>\n </div>\n\n <h3 class=\"section\" style=\"margin-top: var(--s4)\">\n Claim mapping\n <InfoHint label=\"what this is\">\n Which key of the provider's user response holds each field. Flat lookups, not\n expressions. A preset fills these in; you only touch them for a provider nobody has\n written a preset for.\n </InfoHint>\n </h3>\n <div class=\"row\" style=\"flex-wrap: wrap; gap: var(--s3)\">\n <div v-for=\"k in (['subject', 'username', 'email', 'name', 'avatar'] as const)\" :key=\"k\" class=\"field inline\">\n <label :for=\"`cm-${k}`\">{{ k }}</label>\n <input :id=\"`cm-${k}`\" v-model=\"editing.form.claimMap[k]\" type=\"text\" spellcheck=\"false\" style=\"width: 11rem\" />\n </div>\n </div>\n </details>\n </section>\n\n <!-- ============================ who gets in ============================ -->\n <section class=\"panel\">\n <div class=\"phead\"><h2 class=\"section\">Who gets an account</h2></div>\n <p class=\"dim\">\n By default, anyone this provider lets authenticate. It already owns that decision; this is\n only here for the case where the application you registered is broader than the people who\n should reach this control plane. <b>Any one entry in a list is enough to satisfy that\n list, and every list you fill in has to be satisfied</b> — fill all three in and a login\n needs a listed domain, a matching username, and one of the groups. A list left empty is not\n a rule at all: it lets everyone past that check, it does not lock everyone out.\n </p>\n <div class=\"field\">\n <label for=\"sso-domains\">Allowed email domains</label>\n <input id=\"sso-domains\" v-model=\"editing.domains\" type=\"text\" spellcheck=\"false\" placeholder=\"example.com, corp.example\" />\n <p class=\"hint\">\n Comma-separated; subdomains count. Empty means no restriction. <b>Non-empty means a login\n with no email address at all is refused too</b> — a provider that hides the address (a\n private GitHub profile with no <code>user:email</code> scope) cannot be checked, so it is\n not waved through.\n </p>\n </div>\n\n <div class=\"field\">\n <label for=\"sso-usernames\">Allowed usernames</label>\n <input id=\"sso-usernames\" v-model=\"editing.usernames\" type=\"text\" spellcheck=\"false\" placeholder=\"octocat, qa-[0-9]*\" />\n <p class=\"hint\">\n Comma-separated patterns, case-insensitive: <code>*</code>, <code>?</code> and\n <code>[0-9]</code> classes. Empty means no restriction. <b>Non-empty means a login whose\n provider sends no username is refused too</b> — so this is a rule for a provider that\n actually has usernames (GitHub's <code>login</code>, GitLab's <code>username</code>). On\n an OpenID Connect issuer that sends no <code>preferred_username</code> it refuses\n everyone rather than nobody, so set it only where you know the provider sends one.\n </p>\n </div>\n\n <div v-if=\"editing.form.mode === 'oauth2'\" class=\"field\">\n <label for=\"sso-groups\">Required groups</label>\n <input id=\"sso-groups\" v-model=\"editing.groups\" type=\"text\" spellcheck=\"false\" placeholder=\"acme, acme/backend\" />\n <p class=\"hint\">\n Comma-separated, and <b>exact names, not patterns</b> — an organisation login, or a group\n path like <code>acme/backend</code>. Case-insensitive. Empty means no restriction.\n Non-empty makes every sign-in ask the provider for that person's groups, so it needs the\n OAuth scope that endpoint requires: <b>add it to Scopes above, or the save is refused</b>\n — and the refusal names the scope. It also needs a provider whose group list this host\n knows how to read, which the save checks by name. If that call does not answer, the\n sign-in is refused rather than allowed.\n </p>\n </div>\n <p v-else class=\"hint\">\n A group rule needs a provider whose groups endpoint this host knows how to read — an OAuth\n 2.0 preset (GitHub, GitLab), not a discovered OpenID Connect issuer — so there is none\n here.\n </p>\n </section>\n\n <ErrorNote v-if=\"formError\" :text=\"formError\" title=\"Not saved.\" />\n\n <div class=\"row\" style=\"gap: var(--s3)\">\n <ActionButton variant=\"primary\" :pending=\"saving\" :disabled=\"saving || !!cannotSave\" :title=\"cannotSave || undefined\" @click=\"save\">\n {{ editing.originalKey ? 'Save changes' : 'Add provider' }}\n </ActionButton>\n <button class=\"ghost\" @click=\"editing = null\">Cancel</button>\n </div>\n </template>\n\n <!-- ============================ the picker ============================ -->\n <template v-else-if=\"showPicker\">\n <section class=\"panel\">\n <div class=\"phead\">\n <h2 class=\"section\">{{ providers.length ? 'Add a provider' : 'Pick a provider' }}</h2>\n <span class=\"grow\" />\n <button v-if=\"providers.length\" class=\"ghost\" @click=\"picking = false\">Cancel</button>\n </div>\n <p class=\"dim\">\n Pick where your team already signs in. A preset knows the provider's endpoints and its\n quirks — the only things it cannot know are the client id and secret you get when you\n register the app, and the form that opens says exactly where to do that.\n </p>\n <div class=\"sso-tiles\">\n <button v-for=\"t in pickerTiles\" :key=\"t.id\" class=\"sso-tile\" @click=\"startAdd(t)\">\n <SsoMark :preset=\"t.preset?.key ?? 'custom'\" :size=\"22\" />\n <span>{{ t.label }}</span>\n <span class=\"sso-tile-mode\">{{ t.mode === 'oidc' ? 'OpenID Connect' : 'OAuth 2.0' }}</span>\n </button>\n </div>\n </section>\n </template>\n\n <!-- ============================ the list ============================ -->\n <template v-else-if=\"!listError\">\n <section class=\"panel\">\n <div class=\"phead\"><h2 class=\"section\">Providers</h2></div>\n <div class=\"sso-cards stagger\">\n <div v-for=\"(p, i) in providers\" :key=\"p.key\" class=\"sso-card\" :style=\"{ '--i': i }\">\n <SsoMark :preset=\"p.config.provider\" :size=\"22\" />\n <div class=\"sso-card-main\">\n <div class=\"sso-card-head\">\n <b>{{ p.config.label }}</b>\n <code class=\"mute\">{{ p.key }}</code>\n <span v-if=\"!p.config.enabled\" class=\"badge off\">disabled</span>\n </div>\n <div class=\"sso-card-sub\">\n {{ whereLine(p.config) }} · {{ rulesLine(p.config) }} ·\n updated <RelativeTime :at=\"p.updatedAt\" />\n </div>\n </div>\n <div class=\"row-actions\">\n <button class=\"ghost sm\" @click=\"startEdit(p)\">Edit</button>\n <ActionButton variant=\"ghost\" class=\"sm sso-remove\" :confirm=\"`Remove ${p.key}?`\" @run=\"remove(p)\">\n Remove\n </ActionButton>\n </div>\n </div>\n </div>\n <p class=\"mute\" style=\"font-size: var(--t-sm); margin-top: var(--s3)\">\n Removing a provider does not delete anyone. Those accounts keep their personal tokens, and\n pointing the same provider back at this host re-links them by subject.\n </p>\n </section>\n\n <section class=\"panel\">\n <div class=\"phead\"><h2 class=\"section\">Callback URL</h2></div>\n <p class=\"dim\">\n The redirect URI to register with every provider — one URL for all of them, built by the\n server so it cannot drift from the one the sign-in flow actually sends.\n </p>\n <div class=\"row sso-copy\">\n <code class=\"sso-url\">{{ callbackUrl }}</code>\n <button type=\"button\" @click=\"copyCallback\">Copy</button>\n </div>\n </section>\n </template>\n </div>\n</template>\n\n<style scoped>\n/* ── the picker tiles: brand mark, name, protocol. Grouped boxes inside a panel → r2. */\n.sso-tiles {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n gap: var(--s3);\n}\n.sso-tile {\n flex-direction: column;\n justify-content: center;\n gap: var(--s2);\n padding: var(--s4) var(--s3);\n border-radius: var(--r2);\n}\n.sso-tile-mode {\n font-size: var(--t-xs);\n font-weight: 400;\n color: var(--fg-mute);\n}\n\n/* ── the provider cards. */\n.sso-cards {\n display: flex;\n flex-direction: column;\n gap: var(--s3);\n}\n.sso-card {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--s3);\n border: 1px solid var(--line);\n border-radius: var(--r2);\n padding: var(--s3) var(--s4);\n}\n.sso-card > svg {\n flex: none;\n}\n.sso-card-main {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: var(--s1);\n}\n.sso-card-head {\n display: flex;\n align-items: center;\n gap: var(--s2);\n}\n.sso-card-sub {\n font-size: var(--t-sm);\n color: var(--fg-dim);\n overflow-wrap: anywhere;\n}\n/* Ghost so the row stays quiet, red so nobody mistakes what it does. */\n.sso-remove {\n color: var(--fail);\n}\n\n/* ── the callback URL: the one element here allowed to scroll sideways, never to wrap. */\n.sso-copy {\n align-items: center;\n gap: var(--s3);\n}\n.sso-url {\n flex: 1;\n min-width: 0;\n overflow-x: auto;\n white-space: nowrap;\n}\n/* Block display when it sits alone in a field (the assembled issuer). */\n.field > .sso-url {\n display: block;\n flex: none;\n}\n.sso-url[data-incomplete] {\n color: var(--fg-mute);\n}\n\n/* Slugs and placeholders are short — a 560px input for \"acme\" reads as a text editor. */\n.sso-key {\n max-width: 260px;\n}\n\n/* ── the collapsed endpoint block for a preset. */\n.sso-adv > summary {\n cursor: pointer;\n font-size: var(--t-sm);\n color: var(--fg-dim);\n margin: var(--s4) 0 var(--s2);\n}\n</style>\n"],"names":["OIDC_CLAIMS","blank","providers","ref","presets","callbackUrl","loaded","listError","editing","picking","saving","formError","load","r","api","problem","showPicker","computed","pickerTiles","p","suggestKey","base","taken","startAdd","tile","f","startEdit","entry","x","templateParts","e","t","parts","re","last","m","placeholderNames","assembledDiscovery","_a","keyRe","cannotSave","key","url","list","s","v","save","body","toast","remove","copyCallback","whereLine","c","rulesLine","_b","_c","_createElementBlock","_createElementVNode","_hoisted_1","_createVNode","HelpModal","_cache","_hoisted_2","InfoHint","_createBlock","ErrorNote","_Fragment","_hoisted_3","_hoisted_4","SsoMark","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_7","$event","_openBlock","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_vModelText","_hoisted_14","_hoisted_16","_renderList","ph","_unref","sentence","_hoisted_17","_hoisted_19","_hoisted_20","_hoisted_21","_d","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","k","_hoisted_36","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","ActionButton","_createTextVNode","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_49","_hoisted_50","_hoisted_51","i","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","RelativeTime","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","SkeletonList"],"m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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.sso-tiles[data-v-8383cb2f]{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:var(--s3)}.sso-tile[data-v-8383cb2f]{flex-direction:column;justify-content:center;gap:var(--s2);padding:var(--s4) var(--s3);border-radius:var(--r2)}.sso-tile-mode[data-v-8383cb2f]{font-size:var(--t-xs);font-weight:400;color:var(--fg-mute)}.sso-cards[data-v-8383cb2f]{display:flex;flex-direction:column;gap:var(--s3)}.sso-card[data-v-8383cb2f]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s3);border:1px solid var(--line);border-radius:var(--r2);padding:var(--s3) var(--s4)}.sso-card>svg[data-v-8383cb2f]{flex:none}.sso-card-main[data-v-8383cb2f]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--s1)}.sso-card-head[data-v-8383cb2f]{display:flex;align-items:center;gap:var(--s2)}.sso-card-sub[data-v-8383cb2f]{font-size:var(--t-sm);color:var(--fg-dim);overflow-wrap:anywhere}.sso-remove[data-v-8383cb2f]{color:var(--fail)}.sso-copy[data-v-8383cb2f]{align-items:center;gap:var(--s3)}.sso-url[data-v-8383cb2f]{flex:1;min-width:0;overflow-x:auto;white-space:nowrap}.field>.sso-url[data-v-8383cb2f]{display:block;flex:none}.sso-url[data-incomplete][data-v-8383cb2f]{color:var(--fg-mute)}.sso-key[data-v-8383cb2f]{max-width:260px}.sso-adv>summary[data-v-8383cb2f]{cursor:pointer;font-size:var(--t-sm);color:var(--fg-dim);margin:var(--s4) 0 var(--s2)}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{s}from"./useFormat-DIlTY5Dl.js";import{d as t,c as n,E as o,a as r,f as c,t as l,u as m,o as p}from"./index-T3JGe9ku.js";const u=t({__name:"StateBadge",props:{state:{}},setup(e){return(d,a)=>(p(),n("span",{class:o(["badge",e.state])},[a[0]||(a[0]=r("span",{class:"dot"},null,-1)),c(" "+l(m(s)(e.state)),1)],2))}});export{u as _};
|
|
2
|
-
//# sourceMappingURL=StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StateBadge.vue_vue_type_script_setup_true_lang-C-7EQXcg.js","sources":["../../src/components/StateBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The job states, and only these. Kept in one component so the colour of `leaked` can never drift\n * from the colour of `failed` in one view and not another:\n *\n * ok green · failed red · leaked AMBER · running blue, pulsing · cancelled grey\n *\n * `cancelled` is deliberately quiet: someone meant to stop it, so it is not an alarm — but it is\n * not `ok` either, because whatever the job had already done was left exactly as it was.\n *\n * `leaked` must be unmistakably distinct from `failed`. They are different problems with different\n * owners — \"teardown errored\" versus \"teardown ran and something survived\" — which is why the CLI\n * gives leaked its own exit code, and why this app never renders them in the same colour.\n */\nimport type { JobState } from '../api/types';\nimport { sentence } from '../composables/useFormat';\n\ndefineProps<{ state: JobState }>();\n</script>\n\n<template>\n <span class=\"badge\" :class=\"state\">\n <span class=\"dot\" />\n {{ sentence(state) }}\n </span>\n</template>\n"],"names":["_createElementBlock","_normalizeClass","__props","_createElementVNode","_toDisplayString","_unref","sentence"],"mappings":"2MAqBEA,EAGO,OAAA,CAHD,MAAKC,EAAA,CAAC,QAAgBC,EAAA,KAAK,CAAA,CAAA,eAC/BC,EAAoB,OAAA,CAAd,MAAM,KAAA,EAAK,KAAA,EAAA,KAAG,IACpBC,EAAGC,EAAAC,CAAA,EAASJ,EAAA,KAAK,CAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as U,x as E,M as H,c as o,a as e,f as r,e as c,w as k,_ as F,z as w,g as i,t as l,F as y,r as N,j as u,O as S,o as s,D as I,E as D,u as g,p as V,C as P}from"./index-T3JGe9ku.js";import{s as _}from"./useFormat-DIlTY5Dl.js";import{_ as W}from"./ActionButton.vue_vue_type_script_setup_true_lang-C6PZurL0.js";import{_ as A}from"./ErrorNote.vue_vue_type_script_setup_true_lang-CUZs06O0.js";import{_ as M}from"./HelpModal.vue_vue_type_script_setup_true_lang-ErbSSi6D.js";import{_ as q}from"./RefreshButton.vue_vue_type_script_setup_true_lang-ZUc7pgOx.js";import{_ as z}from"./SelectMenu.vue_vue_type_script_setup_true_lang-DKYlHroe.js";import{_ as G}from"./SkeletonList.vue_vue_type_script_setup_true_lang-Bwex16vy.js";import"./Teleport-CKfsIrp8.js";const L={class:"page-head"},J={class:"sub"},K={key:2,class:"panel"},Q={class:"phead"},X={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},Y={class:"mono"},Z={key:0,class:"banner warn"},ee={key:1,class:"banner plain"},te={key:0,class:"banner warn"},ae={class:"mono"},se={key:1,class:"cards"},oe={class:"stagger"},ne={class:"name","data-label":"hostname"},le={key:0,class:"badge info",title:"the node this control plane runs on"},re={"data-label":"role"},ie={key:0,class:"mute",style:{"font-size":"var(--t-sm)"}},de={"data-label":"status"},ue={"data-label":"availability"},me={"data-label":"engine",class:"mono"},ve={"data-label":"id",class:"mono mute"},he={key:2,class:"mute"},ce={key:3,class:"panel"},pe={class:"kvlist",style:{"margin-bottom":"var(--s4)"}},be={class:"k mono"},fe={class:"v mute"},ke={class:"row",style:{"flex-wrap":"wrap",gap:"var(--s3)","align-items":"flex-end"}},we={class:"field inline"},ye={key:0,class:"field inline"},ge={class:"mute",style:{"font-size":"var(--t-sm)"}},_e={key:1,class:"banner leaked",style:{"margin-top":"var(--s3)"}},xe={class:"code",style:{"white-space":"pre-wrap","word-break":"break-all","max-height":"50vh",overflow:"auto"}},je={class:"row"},Oe=U({__name:"SwarmView",setup(Te){const n=u(null),p=u(""),x=u(!1);async function j(){const d=await V.get("/api/swarm");if(x.value=!0,!d.ok){p.value=P(d,"read the swarm");return}p.value="",n.value={...d.body,nodes:d.body.nodes??[],ports:d.body.ports??[]}}E(j,1e4);const v=u("command"),f=u("ubuntu"),m=u(""),b=u(!1),h=u(""),T=[{value:"command",label:"docker swarm join …",blurb:"One line, for a machine that already runs Docker."},{value:"script",label:"Shell script",blurb:"Installs Docker if missing (get.docker.com), then joins."},{value:"cloud-config",label:"cloud-config",blurb:"User-data for a fresh cloud machine: Docker from the distro, then join."},{value:"token",label:"Token only",blurb:"The bare join token, for your own tooling."}];async function B(){b.value=!0,h.value="",m.value="";const d=`format=${v.value}${v.value==="cloud-config"?`&distro=${encodeURIComponent(f.value)}`:""}`,t=await V.getText(`/api/swarm/join?${d}`);if(b.value=!1,t.status===403){h.value="The join token is admin-only. Sign in as an admin, or use the machine token.";return}if(t.status===409){h.value="This host is not a swarm manager, so there is nothing to join. Nothing was revealed.";return}if(!t.ok){h.value=t.text||`HTTP ${t.status}`;return}m.value=t.text}async function O(){try{await navigator.clipboard.writeText(m.value),S("ok","Copied.")}catch{S("error","Could not reach the clipboard — select the text and copy it.")}}return H(()=>{m.value=""}),(d,t)=>{var C,$;return s(),o("div",null,[e("div",L,[e("div",null,[e("h1",null,[t[4]||(t[4]=r(" Swarm ",-1)),c(M,{title:"How swarm mode works"},{default:k(()=>[...t[3]||(t[3]=[e("p",null,[e("b",null,"This host is the manager."),r(" Previews deploy as swarm stacks — the compose file you submit is converted on every deploy (profiles resolved, "),e("code",null,"restart"),r(" and limits moved under "),e("code",null,"deploy"),r(", Traefik labels onto the service) — and their tasks run on whichever node has room. ")],-1),e("p",null,[e("b",null,"A worker is one command away."),r(" Open the ports below between the machines, run the join material on the new one, and it appears in this table. Nothing else on this host changes: the control plane stays here, the axes and the leak gate never cared which node a container landed on. ")],-1),e("p",null,[e("b",null,"What a worker cannot do."),r(" A shell and stop/start reach only tasks on this node (docker's verbs are node-local); logs reach every node through the manager. A volume a task creates on a worker stays there when the stack is torn down — use named volumes only for data you can lose, and an axis for data you cannot. ")],-1)])]),_:1})]),e("div",J,[t[6]||(t[6]=r(" The nodes previews run on, and how to add one ",-1)),c(F,{label:"where this comes from"},{default:k(()=>[...t[5]||(t[5]=[e("code",null,"docker node ls",-1),r(" on this host, every ten seconds. Nothing is stored — a node that leaves disappears from here the moment docker stops listing it. ",-1)])]),_:1})])]),t[7]||(t[7]=e("span",{class:"grow"},null,-1)),c(q,{run:j})]),p.value?(s(),w(A,{key:0,text:p.value,title:"Could not read the swarm."},null,8,["text"])):i("",!0),!x.value&&!p.value?(s(),w(G,{key:1,rows:4})):n.value?(s(),o("section",K,[e("div",Q,[t[9]||(t[9]=e("h2",{class:"section"},"Nodes",-1)),t[10]||(t[10]=e("span",{class:"grow"},null,-1)),n.value.active&&n.value.managerAddr?(s(),o("span",X,[t[8]||(t[8]=r(" manager ",-1)),e("span",Y,l(n.value.managerAddr),1)])):i("",!0)]),n.value.reachable?n.value.active?(s(),o(y,{key:2},[n.value.error?(s(),o("div",te,[t[13]||(t[13]=e("b",null,"Docker reported a problem.",-1)),e("p",ae,l(n.value.error),1)])):i("",!0),n.value.nodes.length?(s(),o("table",se,[t[14]||(t[14]=e("thead",null,[e("tr",null,[e("th",null,"Hostname"),e("th",null,"Role"),e("th",null,"Status"),e("th",null,"Availability"),e("th",null,"Engine"),e("th",null,"Id")])],-1)),e("tbody",oe,[(s(!0),o(y,null,N(n.value.nodes,(a,R)=>(s(),o("tr",{key:a.id,style:I({"--i":R})},[e("td",ne,[r(l(a.hostname||"—")+" ",1),a.self?(s(),o("span",le,"this node")):i("",!0)]),e("td",re,[e("span",{class:D(["badge",a.role==="manager"?"isolated":""])},l(g(_)(a.role)),3),a.managerStatus?(s(),o("span",ie,l(a.managerStatus),1)):i("",!0)]),e("td",de,[e("span",{class:D(a.status==="ready"?"s-ok":"s-failed")},l(g(_)(a.status)),3)]),e("td",ue,l(g(_)(a.availability||"unknown")),1),e("td",me,l(a.engineVersion||"—"),1),e("td",ve,l(a.id.slice(0,12)),1)],4))),128))])])):(s(),o("p",he,"Docker lists no nodes — on a manager that should at least be this one."))],64)):(s(),o("div",ee,[t[12]||(t[12]=e("b",null,"Not a swarm manager.",-1)),e("p",null,l(n.value.note),1)])):(s(),o("div",Z,[...t[11]||(t[11]=[e("b",null,"Docker did not answer.",-1),e("p",null,"Nothing about the swarm is known right now — which is not the same as there being no swarm.",-1)])]))])):i("",!0),(C=n.value)!=null&&C.active?(s(),o("section",ce,[t[20]||(t[20]=e("div",{class:"phead"},[e("h2",{class:"section"},"Add a worker")],-1)),t[21]||(t[21]=e("p",{class:"dim"}," Open these between the new machine and every other node first — a worker that cannot reach them joins and then never receives a task. ",-1)),e("ul",pe,[(s(!0),o(y,null,N(n.value.ports,a=>(s(),o("li",{key:a.port},[e("span",be,l(a.port),1),e("span",fe,l(a.why),1)]))),128))]),e("div",ke,[e("div",we,[t[15]||(t[15]=e("label",{for:"join-format"},"Give me",-1)),c(z,{id:"join-format","model-value":v.value,label:"What to reveal",options:T.map(a=>({value:a.value,label:a.label})),"onUpdate:modelValue":t[0]||(t[0]=a=>v.value=a)},null,8,["model-value","options"])]),v.value==="cloud-config"?(s(),o("div",ye,[t[16]||(t[16]=e("label",{for:"join-distro"},"Distro",-1)),c(z,{id:"join-distro",modelValue:f.value,"onUpdate:modelValue":t[1]||(t[1]=a=>f.value=a),label:"Which Docker install steps",options:["ubuntu","debian","fedora","suse","arch","alpine"].map(a=>({value:a,label:a}))},null,8,["modelValue","options"])])):i("",!0),c(W,{variant:"primary",pending:b.value,disabled:b.value,onClick:B},{default:k(()=>[...t[17]||(t[17]=[r(" Reveal ",-1)])]),_:1},8,["pending","disabled"]),e("span",ge,l(($=T.find(a=>a.value===v.value))==null?void 0:$.blurb),1)]),h.value?(s(),w(A,{key:0,text:h.value,title:"Nothing was revealed."},null,8,["text"])):i("",!0),m.value?(s(),o("div",_e,[t[18]||(t[18]=e("b",null,"This is a secret — whoever has it can add a node that runs any task here.",-1)),t[19]||(t[19]=e("p",null,[r(" Shown once; it is not stored in this page and is forgotten when you leave. Rotate it on the manager with "),e("code",null,"docker swarm join-token --rotate worker"),r(" if it leaks. ")],-1)),e("pre",xe,l(m.value),1),e("div",je,[e("button",{onClick:O},"Copy"),e("button",{onClick:t[2]||(t[2]=a=>m.value="")},"Hide")])])):i("",!0)])):i("",!0)])}}});export{Oe as default};
|
|
2
|
-
//# sourceMappingURL=SwarmView-skNbhHws.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ad as be,ag as Ee,ap as Oe,a9 as E,M as we,aq as re,aa as x,a8 as F,ar as Se,J as P,R as se,aj as Ae,ak as Pe,j as b,k as w,K as Ce,u as D,a0 as I,F as De,as as Te,ab as _e,at as Le,au as Ie,a6 as ie,av as Me,d as B,a1 as Fe,ae as $,aw as Ne,a2 as xe,ax as Be,o as Y,z as J,w as ae,$ as X,D as ke,W as ue,am as Re,g as je}from"./index-T3JGe9ku.js";function $e(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[u=>{const a=be(o,u);if(a||a===null)return a;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},u=>(Ee(o,u),u)]}function T(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function le(e,t,n){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(s)}function Ue(e){return e==null}function Tt(e,t){var n;const o=se();return F(()=>{o.value=e()},{...t,flush:(n=t==null?void 0:t.flush)!==null&&n!==void 0?n:"sync"}),Se(o)}function Q(e,t){return Ae()?(Pe(e,t),!0):!1}function We(e){let t=!1,n;const o=re(!0);return((...s)=>(t||(n=o.run(()=>e(...s)),t=!0),n))}const _=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ke=e=>typeof e<"u",qe=Object.prototype.toString,ze=e=>qe.call(e)==="[object Object]",ee=He();function He(){var e,t,n;return _&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((n=window)===null||n===void 0?void 0:n.navigator.userAgent))}function K(e){return Array.isArray(e)?e:[e]}function Ve(e){return x()}function Ge(e){if(!_)return e;let t=0,n,o;const s=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return((...r)=>(t+=1,o||(o=re(!0),n=o.run(()=>e(...r))),Q(s),n))}function _t(e,t=1e4){return Oe((n,o)=>{let s=E(e),r;const u=()=>setTimeout(()=>{s=E(e),o()},E(t));return Q(()=>{clearTimeout(r)}),{get(){return n(),s},set(a){s=a,o(),clearTimeout(r),r=u()}}})}function Ye(e,t){Ve()&&we(e,t)}function Je(e,t,n){return P(e,t,{...n,immediate:!0})}const U=_?window:void 0;function N(e){var t;const n=E(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function ce(...e){const t=(o,s,r,u)=>(o.addEventListener(s,r,u),()=>o.removeEventListener(s,r,u)),n=w(()=>{const o=K(E(e[0])).filter(s=>s!=null);return o.every(s=>typeof s!="string")?o:void 0});return Je(()=>{var o,s;return[(o=(s=n.value)===null||s===void 0?void 0:s.map(r=>N(r)))!==null&&o!==void 0?o:[U].filter(r=>r!=null),K(E(n.value?e[1]:e[0])),K(D(n.value?e[2]:e[1])),E(n.value?e[3]:e[2])]},([o,s,r,u],a,f)=>{if(!(o!=null&&o.length)||!(s!=null&&s.length)||!(r!=null&&r.length))return;const v=ze(u)?{...u}:u,l=o.flatMap(i=>s.flatMap(c=>r.map(d=>t(i,c,d,v))));f(()=>{l.forEach(i=>i())})},{flush:"post"})}function de(){const e=se(!1),t=x();return t&&Ce(()=>{e.value=!0},t),e}function Xe(e){const t=de();return w(()=>(t.value,!!e()))}function Qe(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ze(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=U,eventName:r="keydown",passive:u=!1,dedupe:a=!1}=o,f=Qe(t);return ce(s,r,l=>{l.repeat&&E(a)||f(l)&&n(l)},u)}function et(e){return JSON.parse(JSON.stringify(e))}function Lt(e,t,n={}){const{window:o=U,...s}=n;let r;const u=Xe(()=>o&&"ResizeObserver"in o),a=()=>{r&&(r.disconnect(),r=void 0)},f=P(w(()=>{const l=E(e);return Array.isArray(l)?l.map(i=>N(i)):[N(l)]}),l=>{if(a(),u.value&&o){r=new ResizeObserver(t);for(const i of l)i&&r.observe(i,s)}},{immediate:!0,flush:"post"}),v=()=>{a(),f()};return Q(v),{isSupported:u,stop:v}}function It(e,t,n,o={}){var s,r;const{clone:u=!1,passive:a=!1,eventName:f,deep:v=!1,defaultValue:l,shouldEmit:i}=o,c=x(),d=n||(c==null?void 0:c.emit)||(c==null||(s=c.$emit)===null||s===void 0?void 0:s.bind(c))||(c==null||(r=c.proxy)===null||r===void 0||(r=r.$emit)===null||r===void 0?void 0:r.bind(c==null?void 0:c.proxy));let y=f;t||(t="modelValue"),y=y||`update:${t.toString()}`;const h=p=>u?typeof u=="function"?u(p):et(p):p,g=()=>Ke(e[t])?h(e[t]):l,m=p=>{i?i(p)&&d(y,p):d(y,p)};if(a){const p=b(g());let S=!1;return P(()=>e[t],A=>{S||(S=!0,p.value=h(A),I(()=>S=!1))}),P(p,A=>{!S&&(A!==e[t]||v)&&m(A)},{deep:v}),p}else return w({get(){return g()},set(p){m(p)}})}function Z(e){return e?e.flatMap(t=>t.type===De?Z(t.children):[t]):[]}const[fe]=$e("ConfigProvider");function q(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function G(e,t,n=".",o){if(!q(t))return G(e,{},n,o);const s={...t};for(const r of Object.keys(e)){if(r==="__proto__"||r==="constructor")continue;const u=e[r];u!=null&&(o&&o(s,r,u,n)||(Array.isArray(u)&&Array.isArray(s[r])?s[r]=[...u,...s[r]]:q(u)&&q(s[r])?s[r]=G(u,s[r],(n?`${n}.`:"")+r.toString(),o):s[r]=u))}return s}function tt(e){return(...t)=>t.reduce((n,o)=>G(n,o,"",e),{})}const nt=tt(),ot=Ge(()=>{const e=b(new Map),t=b(),n=w(()=>{for(const u of e.value.values())if(u)return!0;return!1}),o=fe({scrollBody:b(!0)});let s=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",ee&&(s==null||s()),t.value=void 0};return P(n,(u,a)=>{var i;if(!_)return;if(!u){a&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const f=window.innerWidth-document.documentElement.clientWidth,v={padding:f,margin:0},l=(i=o.scrollBody)!=null&&i.value?typeof o.scrollBody.value=="object"?nt({padding:o.scrollBody.value.padding===!0?f:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?f:o.scrollBody.value.margin},v):v:{padding:0,margin:0};f>0&&(document.body.style.paddingRight=typeof l.padding=="number"?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin=="number"?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty("--scrollbar-width",`${f}px`),document.body.style.overflow="hidden"),ee&&(s=ce(document,"touchmove",c=>rt(c),{passive:!1})),I(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function Mt(e){const t=Math.random().toString(36).substring(2,7),n=ot();n.value.set(t,e??!1);const o=w({get:()=>n.value.get(t)??!1,set:s=>n.value.set(t,s)});return Ye(()=>{n.value.delete(t)}),o}function ve(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:ve(n)}}function rt(e){const t=e||window.event,n=t.target;return n instanceof Element&&ve(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ft(e){const t=x(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(s=>{o[Te(_e(s))]=(...r)=>e(s,...r)}),o}function pe(){const e=x(),t=b(),n=w(()=>o());Le(()=>{n.value!==o()&&Ie(t)});function o(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:N(t)}const s=Object.assign({},e.exposed),r={};for(const a in e.props)Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(r,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function u(a){if(t.value=a,!!a&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.hasOwn(a,"$el"))){const f=a.$.exposed,v=Object.assign({},r);for(const l in f)Object.defineProperty(v,l,{enumerable:!0,configurable:!0,get:()=>f[l]});e.exposed=v}}return{forwardRef:u,currentRef:t,currentElement:n}}var st=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,k=new WeakMap,R={},z=0,me=function(e){return e&&(e.host||me(e.parentNode))},it=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=me(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},at=function(e,t,n,o){var s=it(t,Array.isArray(e)?e:[e]);R[n]||(R[n]=new WeakMap);var r=R[n],u=[],a=new Set,f=new Set(s),v=function(i){!i||a.has(i)||(a.add(i),v(i.parentNode))};s.forEach(v);var l=function(i){!i||f.has(i)||Array.prototype.forEach.call(i.children,function(c){if(a.has(c))l(c);else try{var d=c.getAttribute(o),y=d!==null&&d!=="false",h=(M.get(c)||0)+1,g=(r.get(c)||0)+1;M.set(c,h),r.set(c,g),u.push(c),h===1&&y&&k.set(c,!0),g===1&&c.setAttribute(n,"true"),y||c.setAttribute(o,"true")}catch(m){console.error("aria-hidden: cannot operate on ",c,m)}})};return l(t),a.clear(),z++,function(){u.forEach(function(i){var c=M.get(i)-1,d=r.get(i)-1;M.set(i,c),r.set(i,d),c||(k.has(i)||i.removeAttribute(o),k.delete(i)),d||i.removeAttribute(n)}),z--,z||(M=new WeakMap,M=new WeakMap,k=new WeakMap,R={})}},ut=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),s=st(e);return s?(o.push.apply(o,Array.from(s.querySelectorAll("[aria-live], script"))),at(o,s,n,"aria-hidden")):function(){return null}};function Nt(e){let t;P(()=>N(e),n=>{let o=!1;try{o=!!(n!=null&&n.closest("[popover]:not(:popover-open)"))}catch{}n&&!o?t=ut(n):t&&t()}),ie(()=>{t&&t()})}function xt(e,t="reka"){var s;let n;const o=fe({useId:void 0});return o.useId?n=o.useId():n=(s=Me)==null?void 0:s(),t?`${t}-${n}`:n}function lt(e,t){const n=b(e);function o(r){return t[n.value][r]??n.value}return{state:n,dispatch:r=>{n.value=o(r)}}}function ct(e,t){var g;const n=b({}),o=b("none"),s=b(e),r=e.value?"mounted":"unmounted";let u;const a=((g=t.value)==null?void 0:g.ownerDocument.defaultView)??U,{state:f,dispatch:v}=lt(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),l=m=>{var p;if(_){const S=new CustomEvent(m,{bubbles:!1,cancelable:!1});(p=t.value)==null||p.dispatchEvent(S)}};P(e,async(m,p)=>{var A;const S=p!==m;if(await I(),S){const W=o.value,L=j(t.value);m?(v("MOUNT"),l("enter"),L==="none"&&l("after-enter")):L==="none"||L==="undefined"||((A=n.value)==null?void 0:A.display)==="none"?(v("UNMOUNT"),l("leave"),l("after-leave")):p&&W!==L?(v("ANIMATION_OUT"),l("leave")):(v("UNMOUNT"),l("after-leave"))}},{immediate:!0});const i=m=>{const p=j(t.value),S=p.includes(CSS.escape(m.animationName)),A=f.value==="mounted"?"enter":"leave";if(m.target===t.value&&S&&(l(`after-${A}`),v("ANIMATION_END"),!s.value)){const W=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",u=a==null?void 0:a.setTimeout(()=>{var L;((L=t.value)==null?void 0:L.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=W)})}m.target===t.value&&p==="none"&&v("ANIMATION_END")},c=m=>{m.target===t.value&&(o.value=j(t.value))},d=P(t,(m,p)=>{m?(n.value=getComputedStyle(m),m.addEventListener("animationstart",c),m.addEventListener("animationcancel",i),m.addEventListener("animationend",i)):(v("ANIMATION_END"),u!==void 0&&(a==null||a.clearTimeout(u)),p==null||p.removeEventListener("animationstart",c),p==null||p.removeEventListener("animationcancel",i),p==null||p.removeEventListener("animationend",i))},{immediate:!0}),y=P(f,()=>{const m=j(t.value);o.value=f.value==="mounted"?m:"none"});return ie(()=>{d(),y()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(f.value))}}function j(e){return e&&getComputedStyle(e).animationName||"none"}var Bt=B({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var v;const{present:o,forceMount:s}=Fe(e),r=b(),{isPresent:u}=ct(o,r);n({present:u});let a=t.default({present:u.value});a=Z(a||[]);const f=x();if(a&&(a==null?void 0:a.length)>1){const l=(v=f==null?void 0:f.parent)!=null&&v.type.name?`<${f.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${l}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(i=>` - ${i}`).join(`
|
|
2
|
-
`)].join(`
|
|
3
|
-
`))}return()=>s.value||o.value||u.value?$(t.default({present:u.value})[0],{ref:l=>{const i=N(l);return typeof(i==null?void 0:i.hasAttribute)>"u"||(i!=null&&i.hasAttribute("data-reka-popper-content-wrapper")?r.value=i.firstElementChild:r.value=i),i}}):null}});const dt=B({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var f;if(!n.default)return null;const o=Z(n.default()),s=o.findIndex(v=>v.type!==Ne);if(s===-1)return o;const r=o[s];(f=r.props)==null||delete f.ref;const u=r.props?xe(t,r.props):t,a=Be({...r,props:{}},u);return o.length===1?a:(o[s]=a,o)}}}),ft=["area","img","input"],ye=B({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&ft.includes(o)?()=>$(o,t):o!=="template"?()=>$(e.as,t,{default:n.default}):()=>$(dt,t,{default:n.default})}}),vt="dismissableLayer.pointerDownOutside",pt="dismissableLayer.focusOutside";function he(e,t){if(!(t instanceof Element))return!1;const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(o===n||s.indexOf(o)<s.indexOf(n)))}function mt(e,t,n=!0){var u;const o=((u=t==null?void 0:t.value)==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=b(!1),r=b(()=>{});return F(a=>{if(!_||!E(n))return;const f=async l=>{const i=l.target;if(!(!(t!=null&&t.value)||!i)){if(he(t.value,i)){s.value=!1;return}if(l.target&&!s.value){let d=function(){le(vt,e,c)};const c={originalEvent:l};l.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=d,o.addEventListener("click",r.value,{once:!0})):d()}else o.removeEventListener("click",r.value);s.value=!1}},v=window.setTimeout(()=>{o.addEventListener("pointerdown",f)},0);a(()=>{window.clearTimeout(v),o.removeEventListener("pointerdown",f),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{E(n)&&(s.value=!0)}}}function yt(e,t,n=!0){var r;const o=((r=t==null?void 0:t.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),s=b(!1);return F(u=>{if(!_||!E(n))return;const a=async f=>{if(!(t!=null&&t.value))return;await I(),await I();const v=f.target;!t.value||!v||he(t.value,v)||f.target&&!s.value&&le(pt,e,{originalEvent:f})};o.addEventListener("focusin",a),u(()=>o.removeEventListener("focusin",a))}),{onFocusCapture:()=>{E(n)&&(s.value=!0)},onBlurCapture:()=>{E(n)&&(s.value=!1)}}}const O=ue({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var ht=B({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:s,currentElement:r}=pe(),u=w(()=>{var d;return((d=r.value)==null?void 0:d.ownerDocument)??globalThis.document}),a=w(()=>O.layersRoot),f=w(()=>r.value?Array.from(a.value).indexOf(r.value):-1),v=w(()=>O.layersWithOutsidePointerEventsDisabled.size>0),l=w(()=>{const d=Array.from(a.value),[y]=[...O.layersWithOutsidePointerEventsDisabled].slice(-1),h=d.indexOf(y);return f.value>=h}),i=mt(async d=>{const y=[...O.branches].some(h=>h==null?void 0:h.contains(d.target));!l.value||y||(o("pointerDownOutside",d),o("interactOutside",d),await I(),d.defaultPrevented||o("dismiss"))},r),c=yt(d=>{[...O.branches].some(h=>h==null?void 0:h.contains(d.target))||(o("focusOutside",d),o("interactOutside",d),d.defaultPrevented||o("dismiss"))},r);return Ze("Escape",d=>{f.value===a.value.size-1&&(o("escapeKeyDown",d),d.defaultPrevented||o("dismiss"))}),P([r,()=>n.disableOutsidePointerEvents],([d,y],h,g)=>{d&&(y&&(O.layersWithOutsidePointerEventsDisabled.size===0&&(O.originalBodyPointerEvents=u.value.body.style.pointerEvents,u.value.body.style.pointerEvents="none"),O.layersWithOutsidePointerEventsDisabled.add(d),g(()=>{O.layersWithOutsidePointerEventsDisabled.delete(d),O.layersWithOutsidePointerEventsDisabled.size===0&&!Ue(O.originalBodyPointerEvents)&&(u.value.body.style.pointerEvents=O.originalBodyPointerEvents)})),a.value.add(d))},{immediate:!0}),F(d=>{d(()=>{r.value&&(a.value.delete(r.value),O.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(d,y)=>(Y(),J(D(ye),{ref:D(s),"as-child":d.asChild,as:d.as,"data-dismissable-layer":"",style:ke({pointerEvents:v.value?l.value?"auto":"none":void 0}),onFocusCapture:D(c).onFocusCapture,onBlurCapture:D(c).onBlurCapture,onPointerdownCapture:D(i).onPointerDownCapture},{default:ae(()=>[X(d.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),kt=ht;const gt=We(()=>b([]));function bt(){const e=gt();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=te(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=te(e.value,t),(n=e.value[0])==null||n.resume()}}}function te(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}const H="focusScope.autoFocusOnMount",V="focusScope.autoFocusOnUnmount",ne={bubbles:!1,cancelable:!0};function Et(e,{select:t=!1}={}){const n=T();for(const o of e)if(C(o,{select:t}),T()!==n)return!0}function Ot(e){const t=ge(e),n=oe(t,e),o=oe(t.reverse(),e);return[n,o]}function ge(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oe(e,t){for(const n of e)if(!wt(n,{upTo:t}))return n}function wt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function St(e){return e instanceof HTMLInputElement&&"select"in e}function C(e,{select:t=!1}={}){if(e&&e.focus){const n=T();e.focus({preventScroll:!0}),e!==n&&St(e)&&t&&e.select()}}var At=B({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,o=t,{currentRef:s,currentElement:r}=pe(),u=b(null),a=bt(),f=ue({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});F(l=>{if(!_)return;const i=r.value;if(!n.trapped)return;function c(g){if(f.paused||!i)return;const m=g.target;i.contains(m)?u.value=m:C(u.value,{select:!0})}function d(g){if(f.paused||!i)return;const m=g.relatedTarget;m!==null&&(i.contains(m)||C(u.value,{select:!0}))}function y(g){const m=u.value;if(m===null||!g.some(A=>A.removedNodes.length>0))return;i.contains(m)||C(i)}document.addEventListener("focusin",c),document.addEventListener("focusout",d);const h=new MutationObserver(y);i&&h.observe(i,{childList:!0,subtree:!0}),l(()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",d),h.disconnect()})}),F(async l=>{const i=r.value;if(await I(),!i)return;a.add(f);const c=T();if(!i.contains(c)){const y=new CustomEvent(H,ne);i.addEventListener(H,h=>o("mountAutoFocus",h)),i.dispatchEvent(y),y.defaultPrevented||(Et(ge(i),{select:!0}),T()===c&&C(i))}l(()=>{i.removeEventListener(H,g=>o("mountAutoFocus",g));const y=new CustomEvent(V,ne),h=g=>{o("unmountAutoFocus",g)};i.addEventListener(V,h),i.dispatchEvent(y),i.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{y.defaultPrevented||C(c??document.body,{select:!0}),i.removeEventListener(V,h),a.remove(f),i.removeAttribute("data-focus-scope-unmounting")},0)})});function v(l){if(!n.loop&&!n.trapped||f.paused)return;const i=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,c=T();if(i&&c){const d=l.currentTarget,[y,h]=Ot(d);y&&h?!l.shiftKey&&c===h?(l.preventDefault(),n.loop&&C(y,{select:!0})):l.shiftKey&&c===y&&(l.preventDefault(),n.loop&&C(h,{select:!0})):c===d&&l.preventDefault()}}return(l,i)=>(Y(),J(D(ye),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":l.asChild,as:l.as,onKeydown:v},{default:ae(()=>[X(l.$slots,"default")]),_:3},8,["as-child","as"]))}}),Rt=At;function jt(e){return e?"open":"closed"}function $t(e){const t=T();for(const n of e)if(n===t||(n.focus(),T()!==t))return}var Pt=B({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=de();return(n,o)=>D(t)||n.forceMount?(Y(),J(Re,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[X(n.$slots,"default")],8,["to","disabled","defer"])):je("v-if",!0)}}),Ut=Pt;export{kt as D,Rt as F,ye as P,dt as S,Ut as T,pe as a,xt as b,$e as c,jt as d,Ft as e,Nt as f,T as g,Bt as h,Mt as i,fe as j,_ as k,N as l,Tt as m,Ue as n,$t as o,Lt as p,le as q,_t as r,It as u};
|
|
4
|
-
//# sourceMappingURL=Teleport-CKfsIrp8.js.map
|