@skill-map/cli 0.32.0 → 0.34.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.
@@ -0,0 +1,2 @@
1
+ import{a as ze,b as ee,c as Je}from"./chunk-KJQEO6P3.js";import{a as we,b as Ce,c as Te,d as G,e as Re,f as xe,g as Ee,h as Me,i as Oe,j as je,k as Ne,u as w,v as Ke,w as Ue,x as Be}from"./chunk-FQOZBFJ5.js";import{a as E,b as te,c as He,d as Qe,e as Ve}from"./chunk-2QZDJSJN.js";import{Ca as fe,Fa as Q,Ia as ve,J as k,Ja as ye,Ka as S,Mc as Le,N as K,Na as D,Nc as De,O as s,Oa as j,T as B,Ta as g,Tb as m,U as z,Ua as l,Va as c,Wa as b,Z as ue,ac as be,bd as W,ca as ge,cd as Y,da as L,db as V,ea as J,f as me,fb as x,gd as $e,hb as I,id as Z,jd as d,kd as $,la as he,ld as Fe,m as O,md as F,nd as q,oa as a,rc as Pe,sc as Ie,tb as pe,tc as _e,uc as N,vc as Ae,wa as H,wb as u,wc as ke,xb as h,xc as Se,yb as X}from"./chunk-LTQTJU54.js";import"./chunk-3SI3TVER.js";import"./chunk-VB56BUGO.js";var ce="skill-map",P={brand:ce,alpha:"ALPHA - do not use in production",nav:{graph:"Graph",list:"List",searchLabel:"Search nodes (coming soon)",searchTooltip:"Search (coming soon)",listLabel:"List view (coming soon)",listTooltip:"List (coming soon)"},actions:{},badge:{nodes:"nodes",graphInfo:(i,e)=>`Run scan
2
+ ${i.toLocaleString()} nodes \xB7 ${e.toLocaleString()} links`,graphInfoA11y:(i,e)=>`Graph contains ${i} nodes and ${e} links`},a11y:{viewSwitcher:"View switcher"},viewportWarning:{title:"Looks like you're on a small screen",subtitle:"skill-map is built for desktop",body:"The graph and inspector need room to breathe. Pop this open on a screen at least 768px wide. See you there."},documentTitle:(i,e)=>{let t=i?`${i} - ${ce}`:ce;return e?`${t} v${e}`:t}};var Xe=[{path:"",pathMatch:"full",redirectTo:"graph"},{path:"graph",loadComponent:()=>import("./chunk-L3OLNVKI.js").then(i=>i.GraphView),title:P.nav.graph},{path:"list",loadComponent:()=>import("./chunk-TKV6TXTI.js").then(i=>i.ListView),title:P.nav.list},{path:"**",redirectTo:"graph"}];var _={errors:{unknownMode:i=>`SKILL_MAP_MODE: unknown value "${i}"`,restPrefix:i=>`BFF error [${i}]: `,malformedResponse:"BFF returned a malformed response",demoFetchFailed:(i,e)=>`Demo bundle fetch failed for "${i}": ${e}`,demoParseFailed:(i,e)=>`Demo bundle parse failed for "${i}": ${e}`,graphFormatNotInDemo:i=>`Graph format "${i}" is not bundled in demo mode (only "ascii").`}};function ie(i){let e=new TextEncoder().encode(i),t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}var p="/api",ne=class i{http;ws;kindRegistry;contributionsRegistry;constructor(e,t,n,r){this.http=e??s(N),this.ws=t??s(F),this.kindRegistry=n??s(w),this.contributionsRegistry=r??s(ee)}async health(){return this.getJson(`${p}/health`)}async loadScan(){let[e]=await Promise.all([this.getJson(`${p}/scan`),this.listNodes({limit:0}).catch(()=>null)]);return e}async runScan(){return this.patchJson(`${p}/scan`,{},"POST")}async listNodes(e={}){let t=pt(e),n=await this.getJson(`${p}/nodes${t}`);return this.ingestRegistry(n.kindRegistry),this.ingestContributionsRegistry(n.contributionsRegistry),n}async getNode(e,t={}){let n=ie(e),r=t.includeBody?"?include=body":"";try{let o=await this.getJson(`${p}/nodes/${n}${r}`);return this.ingestRegistry(o.kindRegistry),this.ingestContributionsRegistry(o.contributionsRegistry),o}catch(o){if(o instanceof d&&o.code==="not-found")return null;throw o}}async listLinks(e={}){let t=ct(e),n=await this.getJson(`${p}/links${t}`);return this.ingestRegistry(n.kindRegistry),this.ingestContributionsRegistry(n.contributionsRegistry),n}async listIssues(e={}){let t=dt(e),n=await this.getJson(`${p}/issues${t}`);return this.ingestRegistry(n.kindRegistry),this.ingestContributionsRegistry(n.contributionsRegistry),n}async loadGraph(e="ascii"){let t=`${p}/graph?format=${encodeURIComponent(e)}`;try{return await O(this.http.get(t,{responseType:"text"}))}catch(n){throw this.translateError(n)}}async loadConfig(){let e=await this.getJson(`${p}/config`);return this.ingestRegistry(e.kindRegistry),this.ingestContributionsRegistry(e.contributionsRegistry),e.value}async listPlugins(){let e=await this.getJson(`${p}/plugins`);return this.ingestRegistry(e.kindRegistry),this.ingestContributionsRegistry(e.contributionsRegistry),e}async setPluginEnabled(e,t){let n=await this.patchJson(`${p}/plugins/${encodeURIComponent(e)}`,{enabled:t});return this.ingestRegistry(n.kindRegistry),this.ingestContributionsRegistry(n.contributionsRegistry),n}async setPluginExtensionEnabled(e,t,n){let r=await this.patchJson(`${p}/plugins/${encodeURIComponent(e)}/extensions/${encodeURIComponent(t)}`,{enabled:n});return this.ingestRegistry(r.kindRegistry),this.ingestContributionsRegistry(r.contributionsRegistry),r}async applyPluginChanges(e){let t=await this.patchJson(`${p}/plugins`,{changes:e});return this.ingestRegistry(t.kindRegistry),this.ingestContributionsRegistry(t.contributionsRegistry),t}async getPreferences(){return await this.getJson(`${p}/preferences`)}async setPreferences(e){return await this.patchJson(`${p}/preferences`,e)}async getProjectPreferences(){return await this.getJson(`${p}/project-preferences`)}async setProjectPreferences(e){return await this.patchJson(`${p}/project-preferences`,e)}async getProjectIgnore(){return await this.getJson(`${p}/project-ignore`)}async setProjectIgnore(e){return await this.patchJson(`${p}/project-ignore`,e)}async getActiveProvider(){return await this.getJson(`${p}/active-provider`)}async setActiveProvider(e){return await this.patchJson(`${p}/active-provider`,{activeProvider:e})}async setFavorite(e){let t=ie(e);try{await O(this.http.put(`${p}/favorites/${t}`,null))}catch(n){throw this.translateError(n)}}async unsetFavorite(e){let t=ie(e);try{await O(this.http.delete(`${p}/favorites/${t}`))}catch(n){throw this.translateError(n)}}async bumpSidecar(e,t={}){let n={nodePath:e};return t.force!==void 0&&(n.force=t.force),t.confirm!==void 0&&(n.confirm=t.confirm),this.patchJson(`${p}/sidecar/bump`,n,"POST")}async getUpdateStatus(){return this.getJson(`${p}/update-status`)}async getRegisteredAnnotations(){return(await this.getJson(`${p}/annotations/registered`)).items}ingestRegistry(e){e&&this.kindRegistry.ingest(e)}ingestContributionsRegistry(e){this.contributionsRegistry.setRegistry(e)}async lookupContribution(e,t,n){let r=new URLSearchParams({path:n});try{return(await this.getJson(`${p}/contributions/${encodeURIComponent(e)}/${encodeURIComponent(t)}?${r.toString()}`)).items[0]??null}catch{return null}}events(){return this.ws.events$}async getJson(e){try{return await O(this.http.get(e))}catch(t){throw this.translateError(t)}}async patchJson(e,t,n="PATCH"){try{let r=n==="POST"?this.http.post(e,t):this.http.patch(e,t);return await O(r)}catch(r){throw this.translateError(r)}}translateError(e){if(e instanceof d)return e;if(e instanceof _e){let n=mt(e.error);return n?new d(n.error.code,n.error.message,n.error.details):new d("internal",e.message||_.errors.malformedResponse)}let t=e instanceof Error?e.message:String(e);return new d("internal",t)}static \u0275fac=function(t){return new(t||i)(K(N),K(F),K(w),K(ee))};static \u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})};function pt(i){let e=new URLSearchParams;i.kind&&i.kind.length>0&&e.set("kind",i.kind.join(",")),i.hasIssues!==void 0&&e.set("hasIssues",String(i.hasIssues)),i.path&&e.set("path",i.path),i.limit!==void 0&&e.set("limit",String(i.limit)),i.offset!==void 0&&e.set("offset",String(i.offset));let t=e.toString();return t?`?${t}`:""}function ct(i){let e=new URLSearchParams;i.kind&&i.kind.length>0&&e.set("kind",i.kind.join(",")),i.from&&e.set("from",i.from),i.to&&e.set("to",i.to);let t=e.toString();return t?`?${t}`:""}function dt(i){let e=new URLSearchParams;i.severity&&e.set("severity",i.severity),i.analyzerId&&e.set("analyzerId",i.analyzerId),i.node&&e.set("node",i.node);let t=e.toString();return t?`?${t}`:""}function mt(i){if(typeof i!="object"||i===null)return null;let e=i;if(e.ok!==!1)return null;let t=e.error;if(typeof t!="object"||t===null)return null;let n=t;return typeof n.code!="string"||typeof n.message!="string"?null:{ok:!1,error:{code:n.code,message:n.message,details:n.details}}}var ut="data.json",gt="data.meta.json",re=class{constructor(e=globalThis.fetch.bind(globalThis),t){this.fetchImpl=e;this.kindRegistry=t??s(w)}metaPromise=null;dataPromise=null;kindRegistry;async health(){return(await this.loadMeta()).health}async loadScan(){let[e,t]=await Promise.all([this.loadData(),this.loadMeta()]);return this.kindRegistry.ingest(t.nodes.kindRegistry),e}async listNodes(e={}){let t=await this.loadMeta();if(ht(e))return this.kindRegistry.ingest(t.nodes.kindRegistry),t.nodes;let n=await this.loadData(),r=n.issues,o=n.nodes;if(e.kind&&e.kind.length>0){let T=new Set(e.kind);o=o.filter(R=>T.has(R.kind))}if(e.path){let T=yt(e.path);o=o.filter(R=>T.test(R.path))}if(e.hasIssues===!0){let T=Ge(r);o=o.filter(R=>T.has(R.path))}else if(e.hasIssues===!1){let T=Ge(r);o=o.filter(R=>!T.has(R.path))}let f=o.length,y=e.offset??0,A=e.limit??1e3,v=o.slice(y,y+A);return this.kindRegistry.ingest(t.nodes.kindRegistry),{schemaVersion:"1",kind:"nodes",items:v,filters:{kind:e.kind??null,hasIssues:e.hasIssues??null,path:e.path?[e.path]:null},counts:{total:f,returned:v.length,page:{offset:y,limit:A}},kindRegistry:t.nodes.kindRegistry}}async getNode(e,t={}){let[n,r]=await Promise.all([this.loadData(),this.loadMeta()]),o=n.nodes.find(v=>v.path===e);if(!o)return null;let f=n.links.filter(v=>v.target===e),y=n.links.filter(v=>v.source===e),A=n.issues.filter(v=>v.nodeIds.includes(e));return this.kindRegistry.ingest(r.nodes.kindRegistry),{schemaVersion:"1",kind:"node",item:o,links:{incoming:f,outgoing:y},issues:A,kindRegistry:r.nodes.kindRegistry}}async listLinks(e={}){let t=await this.loadMeta();if(ft(e))return this.kindRegistry.ingest(t.links.kindRegistry),t.links;let r=(await this.loadData()).links;if(e.kind&&e.kind.length>0){let o=new Set(e.kind);r=r.filter(f=>o.has(f.kind))}return e.from&&(r=r.filter(o=>o.source===e.from)),e.to&&(r=r.filter(o=>o.target===e.to)),this.kindRegistry.ingest(t.links.kindRegistry),{schemaVersion:"1",kind:"links",items:r,filters:{kind:e.kind??null,from:e.from??null,to:e.to??null},counts:{total:r.length,returned:r.length},kindRegistry:t.links.kindRegistry}}async listIssues(e={}){let t=await this.loadMeta();if(vt(e))return this.kindRegistry.ingest(t.issues.kindRegistry),t.issues;let r=(await this.loadData()).issues;return e.severity&&(r=r.filter(o=>o.severity===e.severity)),e.analyzerId&&(r=r.filter(o=>o.analyzerId===e.analyzerId)),e.node&&(r=r.filter(o=>o.nodeIds.includes(e.node))),this.kindRegistry.ingest(t.issues.kindRegistry),{schemaVersion:"1",kind:"issues",items:r,filters:{severity:e.severity??null,analyzerId:e.analyzerId??null,node:e.node??null},counts:{total:r.length,returned:r.length},kindRegistry:t.issues.kindRegistry}}async loadGraph(e="ascii"){if(e!=="ascii")throw new d("bad-query",_.errors.graphFormatNotInDemo(e));return(await this.loadMeta()).graph.ascii}async loadConfig(){let e=await this.loadMeta();return this.kindRegistry.ingest(e.config.kindRegistry),e.config.value}async listPlugins(){let e=await this.loadMeta();return this.kindRegistry.ingest(e.plugins.kindRegistry),e.plugins}async setFavorite(e){throw new d("demo-readonly","Favorites are not available in demo mode (static bundle is immutable).")}async unsetFavorite(e){throw new d("demo-readonly","Favorites are not available in demo mode (static bundle is immutable).")}async setPluginEnabled(e,t){throw new d("demo-readonly","Plugin toggles are not available in demo mode (static bundle is immutable).")}async setPluginExtensionEnabled(e,t,n){throw new d("demo-readonly","Plugin toggles are not available in demo mode (static bundle is immutable).")}async applyPluginChanges(e){throw new d("demo-readonly","Plugin toggles are not available in demo mode (static bundle is immutable).")}async runScan(){throw new d("demo-readonly","Manual scan is not available in demo mode (static bundle is immutable).")}async getPreferences(){return{updateCheck:{enabled:!0}}}async setPreferences(e){throw new d("demo-readonly","Preference toggles are not available in demo mode (static bundle is immutable).")}async getProjectPreferences(){return{scan:{referencePaths:[]}}}async setProjectPreferences(e){throw new d("demo-readonly","Project preferences are not available in demo mode (static bundle is immutable).")}async getProjectIgnore(){return{patterns:[]}}async setProjectIgnore(e){throw new d("demo-readonly","Ignore patterns are not available in demo mode (static bundle is immutable).")}async getActiveProvider(){return{activeProvider:null,detected:[],source:"none"}}async setActiveProvider(e){throw new d("demo-readonly","Active provider lens is not available in demo mode (static bundle is immutable).")}async lookupContribution(){return null}async bumpSidecar(e,t={}){throw new d("demo-readonly","Sidecar bump is not available in demo mode (static bundle is immutable).")}async getUpdateStatus(){return{current:(await this.loadMeta()).health.implVersion,latest:null,isOutdated:!1,checkedAt:null,shownAt:null}}async getRegisteredAnnotations(){return[]}events(){return me}loadMeta(){return this.metaPromise||(this.metaPromise=this.fetchJson(gt)),this.metaPromise}loadData(){return this.dataPromise||(this.dataPromise=this.fetchJson(ut)),this.dataPromise}async fetchJson(e){let t;try{t=await this.fetchImpl(e)}catch(n){let r=n instanceof Error?n.message:String(n);throw new d("internal",_.errors.demoFetchFailed(e,r))}if(!t.ok)throw new d("internal",_.errors.demoFetchFailed(e,`HTTP ${t.status}`));try{return await t.json()}catch(n){let r=n instanceof Error?n.message:String(n);throw new d("internal",_.errors.demoParseFailed(e,r))}}};function ht(i){return!(i.kind&&i.kind.length>0||i.hasIssues!==void 0||i.path||i.offset!==void 0&&i.offset!==0||i.limit!==void 0)}function ft(i){return!(i.kind&&i.kind.length>0||i.from||i.to)}function vt(i){return!(i.severity||i.analyzerId||i.node)}function Ge(i){let e=new Set;for(let t of i)for(let n of t.nodeIds)e.add(n);return e}function yt(i){let t=i.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${t}$`)}function We(){let i=s($);if(i==="live")return new ne(s(N),s(F));if(i==="demo")return new re;let e=i;throw new Error(_.errors.unknownMode(String(e)))}var Ye="search",Ze="kinds",qe="linkKinds",et="stabilities",tt="hasIssues",it="staleOnly",nt="favoritesOnly",oe=class i{filters=s(Be);router=s(Re);activatedRoute=s(Ce);kindRegistry=s(w);destroyRef=s(ue);suppressUrlReadback=!1;constructor(){this.applyUrlToFilters(this.currentParams()),this.router.events.pipe($e(this.destroyRef)).subscribe(e=>{if(e instanceof we){if(this.suppressUrlReadback)return;this.applyUrlToFilters(this.currentParams())}}),J(()=>{let e=this.computeQueryParams();this.writeQueryParams(e)})}currentParams(){let e=this.router.parseUrl(this.router.url),t=new URLSearchParams;for(let[n,r]of Object.entries(e.queryParams))Array.isArray(r)?t.set(n,r.join(",")):r!=null&&t.set(n,String(r));return this.activatedRoute,t}applyUrlToFilters(e){let t=e.get(Ye)??"";t!==this.filters.searchText()&&this.filters.setSearchText(t);let n=bt(e.get(Ze),this.kindRegistry.kinds().map(v=>v.name));de(n,this.filters.selectedKinds())||this.filters.setKinds(n);let r=Pt(e.get(et));de(r,this.filters.selectedStabilities())||this.filters.setStabilities(r);let o=e.get(tt)==="true";o!==this.filters.hasIssuesOnly()&&this.filters.setHasIssuesOnly(o);let f=e.get(it)==="true";f!==this.filters.staleOnly()&&this.filters.setStaleOnly(f);let y=e.get(nt)==="true";y!==this.filters.favoritesOnly()&&this.filters.setFavoritesOnly(y);let A=It(e.get(qe));de(A,this.filters.selectedLinkKinds())||this.filters.setLinkKinds(A)}computeQueryParams(){let e=this.filters.searchText().trim(),t=this.filters.selectedKinds(),n=this.filters.selectedLinkKinds(),r=this.filters.selectedStabilities(),o=this.filters.hasIssuesOnly(),f=this.filters.staleOnly(),y=this.filters.favoritesOnly();return{[Ye]:e.length>0?e:null,[Ze]:t.length>0?t.join(","):null,[qe]:n.length>0?n.join(","):null,[et]:r.length>0?r.join(","):null,[tt]:o?"true":null,[it]:f?"true":null,[nt]:y?"true":null}}writeQueryParams(e){let t=this.currentParams(),n=new Map(Object.entries(e)),r=!1;for(let[o,f]of n)if((t.get(o)??null)!==f){r=!0;break}r&&(this.suppressUrlReadback=!0,this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:e,queryParamsHandling:"merge",replaceUrl:!0}).finally(()=>{setTimeout(()=>{this.suppressUrlReadback=!1},0)}))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})};function bt(i,e){if(!i)return[];let t=new Set(e);return i.split(",").map(n=>n.trim()).filter(n=>t.has(n))}function Pt(i){if(!i)return[];let e=new Set(Ke);return i.split(",").map(t=>t.trim()).filter(t=>e.has(t))}function It(i){if(!i)return[];let e=new Set(Ue);return i.split(",").map(t=>t.trim()).filter(t=>e.has(t))}function de(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(i[t]!==e[t])return!1;return!0}var rt={healthFailed:i=>`ProjectInfoService: /api/health probe failed (${i})`};var C=class i{dataSource=s(Z);status=L(null);cwd=m(()=>this.status()?.cwd??null);implVersion=m(()=>this.status()?.implVersion??null);async load(){try{let e=await this.dataSource.health();this.status.set(e)}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(rt.healthFailed(t))}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})};var se=class i extends G{title=s(Se);projectInfo=s(C);constructor(){super(),J(()=>{let e=ot(this.projectInfo.cwd()),t=this.projectInfo.implVersion();this.title.setTitle(P.documentTitle(e,t))})}updateTitle(e){let t=ot(this.projectInfo.cwd()),n=this.projectInfo.implVersion();this.title.setTitle(P.documentTitle(t,n))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})};function ot(i){if(!i)return null;let e=i.replace(/[\\/]+$/,"");if(!e||e===".")return null;let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return(t>=0?e.slice(t+1):e)||null}function _t(...i){for(let e of i)Promise.resolve(e.load())}var st={providers:[ge(),Me(Xe,Oe()),{provide:G,useClass:se},Ae(ke()),De({}),Q(async()=>{let i=s(Le),[{default:e},{definePreset:t}]=await Promise.all([import("./chunk-DZBSELHN.js"),import("./chunk-NGIFGXW7.js")]),n=t(e,{semantic:{primary:{50:"#F5F3FF",100:"#EDE9FE",200:"#DDD6FE",300:"#C4B5FD",400:"#A78BFA",500:"#8B5CF6",600:"#7C3AED",700:"#6D28D9",800:"#4C1D95",900:"#2E1065",950:"#1E0A4D"}}});i.setThemeConfig({theme:{preset:n,options:{darkModeSelector:".app-dark"}}})}),{provide:$,useFactory:Fe},{provide:Z,useFactory:We},Q(()=>{_t(s(q),s(te),s(C))}),Q(()=>{s(oe),s(ze)})]};var M={toggleToAuto:"Switch to auto theme (follow system)",toggleToLight:"Switch to light theme",toggleToDark:"Switch to dark theme",currentAuto:"Auto theme (follows system)",currentLight:"Light theme",currentDark:"Dark theme"};var at={body:"You are viewing a static demo of skill-map's UI. Install it:",installCommand:"npm i -g @skill-map/cli",homeCta:"\u2190 Back to skill-map.dev",homeHref:"/",dismissAria:"Dismiss demo banner"};function St(i,e){if(i&1){let t=V();l(0,"div",0),b(1,"span",1),l(2,"p",2),u(3),l(4,"code",3),u(5),c()(),l(6,"a",4),u(7),c(),l(8,"p-button",5),x("onClick",function(){B(t);let r=I();return z(r.dismiss())}),c()()}if(i&2){let t=I();a(3),X(" ",t.texts.body," "),a(2),h(t.texts.installCommand),a(),g("href",t.texts.homeHref,he),a(),h(t.texts.homeCta),a(),g("ariaLabel",t.texts.dismissAria)("text",!0)("rounded",!0)}}var lt="sm.demoBannerDismissed",ae=class i{mode=s($);texts=at;dismissed=L(this.readDismissed());visible=m(()=>this.mode==="demo"&&!this.dismissed());dismiss(){this.dismissed.set(!0);try{globalThis.localStorage?.setItem(lt,"1")}catch{}}readDismissed(){if(this.mode!=="demo")return!0;try{return globalThis.localStorage?.getItem(lt)==="1"}catch{return!1}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=H({type:i,selectors:[["sm-demo-banner"]],decls:1,vars:1,consts:[["role","status","data-testid","demo-banner",1,"demo-banner"],["aria-hidden","true",1,"demo-banner__icon","fa-solid","fa-circle-info"],[1,"demo-banner__body"],["data-testid","demo-banner-install",1,"demo-banner__cmd"],["data-testid","demo-banner-home",1,"demo-banner__home",3,"href"],["icon","fa-solid fa-xmark","severity","secondary","size","small","data-testid","demo-banner-dismiss",3,"onClick","ariaLabel","text","rounded"]],template:function(t,n){t&1&&D(0,St,9,7,"div",0),t&2&&j(n.visible()?0:-1)},dependencies:[Y,W],styles:["[_nghost-%COMP%]{display:block}.demo-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.5rem 1rem;border-bottom:1px solid var(--p-content-border-color);background:var(--p-highlight-background);color:var(--p-text-color);font-size:.875rem}.demo-banner__icon[_ngcontent-%COMP%]{font-size:1.1rem;color:var(--p-primary-color)}.demo-banner__body[_ngcontent-%COMP%]{flex:1 1 auto;margin:0;line-height:1.4}.demo-banner__cmd[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);background:var(--p-content-background);border:1px solid var(--p-content-border-color);border-radius:var(--sm-radius-md);padding:.05rem .4rem;font-size:.85em;margin-left:.25rem}.demo-banner__home[_ngcontent-%COMP%]{color:var(--p-primary-color);font-weight:500;text-decoration:none;white-space:nowrap}.demo-banner__home[_ngcontent-%COMP%]:hover, .demo-banner__home[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}"],changeDetection:0})};var wt=()=>[import("./chunk-MHWM2642.js").then(i=>i.SettingsModal)];function Ct(i,e){if(i&1&&(l(0,"span",10),u(1),c()),i&2){let t=I();g("pTooltip",t.versionTooltip()),S("aria-label",t.versionA11y()),a(),h(t.versionLabel())}}function Tt(i,e){if(i&1&&(l(0,"a",12),b(1,"i",26),l(2,"span"),u(3),c()()),i&2){let t=I();g("pTooltip",t.updateChipTooltip()),S("aria-label",t.updateChipA11y()),a(3),h(t.updateChipText)}}function Rt(i,e){if(i&1&&(l(0,"p",13),u(1),c()),i&2){let t=I();a(),h(t.rootLabel())}}function xt(i,e){if(i&1){let t=V();l(0,"sm-settings-modal",27),x("visibleChange",function(r){B(t);let o=I();return z(o.settingsOpen.set(r))}),c()}if(i&2){let t=I();g("visible",t.settingsOpen())}}var le=class i{loader=s(q);theme=s(Ve);projectInfo=s(C);scanTrigger=s(Qe);updateCheck=s(te);texts=P;settingsTexts=He;settingsOpen=L(!1);openSettings(){this.settingsOpen.set(!0)}scanning=this.scanTrigger.scanning;scanError=this.scanTrigger.scanError;triggerScan(){return this.scanTrigger.run()}updateChipText=E.available;updateChipTooltip=m(()=>E.tooltip(this.updateCheck.latest()??""));updateChipA11y=m(()=>E.a11yLabel(this.updateCheck.latest()??""));versionLabel=m(()=>E.versionLabel(this.updateCheck.current()??""));versionTooltip=m(()=>E.versionTooltip(this.updateCheck.current()??""));versionA11y=m(()=>E.versionA11yLabel(this.updateCheck.current()??""));count=this.loader.count;linkCount=m(()=>this.loader.scan()?.links?.length??0);graphInfoTooltip=m(()=>P.badge.graphInfo(this.count(),this.linkCount()));graphInfoA11y=m(()=>P.badge.graphInfoA11y(this.count(),this.linkCount()));rootLabel=m(()=>{let e=this.projectInfo.cwd();if(e&&e!==".")return e;let t=this.loader.scan()?.roots??[];if(t.length===0)return"";let n=t[0].replace(/[\\/]+$/,"");return!n||n==="."?"":n});isDevMode=be();themeMode=this.theme.mode;markSrc=m(()=>this.theme.extraTheme()==="matrix"?"skill-map-mark-matrix.svg":this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");themeIcon=m(()=>{switch(this.themeMode()){case"auto":return"pi pi-desktop";case"light":return"pi pi-sun";case"dark":return"fa-regular fa-moon"}});themeLabel=m(()=>{switch(this.themeMode()){case"auto":return M.toggleToLight;case"light":return M.toggleToDark;case"dark":return M.toggleToAuto}});themeTooltip=m(()=>{switch(this.themeMode()){case"auto":return M.currentAuto;case"light":return M.currentLight;case"dark":return M.currentDark}});toggleTheme(){this.theme.toggle()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=H({type:i,selectors:[["sm-root"]],decls:40,vars:35,consts:[["role","alert","data-testid","viewport-warning",1,"viewport-warning"],[1,"viewport-warning__card"],["aria-hidden","true",1,"fa-solid","fa-desktop","viewport-warning__icon"],[1,"viewport-warning__title"],[1,"viewport-warning__subtitle"],[1,"viewport-warning__body"],["data-testid","shell",1,"shell"],["data-testid","shell-topbar",1,"shell__topbar"],[1,"shell__brand"],["width","32","height","32","priority","","alt","","aria-hidden","true",1,"shell__brand-mark",3,"ngSrc"],["tooltipPosition","bottom","data-testid","shell-version",1,"shell__version",3,"pTooltip"],[1,"shell__alpha"],["href","https://www.npmjs.com/package/@skill-map/cli","target","_blank","rel","noopener noreferrer","tooltipPosition","bottom","data-testid","shell-update-chip",1,"shell__update-chip",3,"pTooltip"],[1,"shell__tag"],["data-testid","shell-nav",1,"shell__nav"],["type","button","tooltipPosition","bottom","tabindex","-1","aria-disabled","true","data-testid","nav-search",1,"shell__nav-search",3,"pTooltip"],["aria-hidden","true",1,"pi","pi-search"],["slot","topbar.nav.start",3,"node"],["routerLink","/graph","routerLinkActive","is-active","data-testid","nav-graph"],["type","button","tooltipPosition","bottom","tabindex","-1","aria-disabled","true","data-testid","nav-list",1,"shell__nav-disabled",3,"pTooltip"],[1,"shell__actions"],["type","button","tooltipPosition","bottom","data-testid","shell-refresh",1,"shell__refresh",3,"click","pTooltip","disabled"],["aria-hidden","true",1,"pi","pi-sync"],["severity","secondary","size","small","data-testid","action-theme-toggle",3,"onClick","icon","ariaLabel","pTooltip","text","rounded"],["icon","pi pi-sliders-h","severity","secondary","size","small","data-testid","action-settings",3,"onClick","ariaLabel","pTooltip","text","rounded"],[1,"shell__main"],["aria-hidden","true",1,"pi","pi-download"],[3,"visibleChange","visible"]],template:function(t,n){if(t&1&&(l(0,"div",0)(1,"div",1),b(2,"i",2),l(3,"h2",3),u(4),c(),l(5,"p",4),u(6),c(),l(7,"p",5),u(8),c()()(),l(9,"div",6),b(10,"sm-demo-banner"),l(11,"header",7)(12,"div",8),b(13,"img",9),l(14,"div")(15,"h1"),u(16),D(17,Ct,2,3,"span",10),l(18,"span",11),u(19),c(),D(20,Tt,4,3,"a",12),c(),D(21,Rt,2,1,"p",13),c()(),l(22,"nav",14)(23,"button",15),b(24,"i",16),c(),b(25,"sm-view-contributions-host",17),l(26,"a",18),u(27),c(),l(28,"button",19),u(29),c()(),l(30,"div",20)(31,"button",21),x("click",function(){return n.triggerScan()}),b(32,"i",22),c(),l(33,"p-button",23),x("onClick",function(){return n.toggleTheme()}),c(),l(34,"p-button",24),x("onClick",function(){return n.openSettings()}),c()()(),l(35,"main",25),b(36,"router-outlet"),c(),fe(37,xt,1,1),ve(38,37,wt),c()),t&2){let r;a(4),h(n.texts.viewportWarning.title),a(2),h(n.texts.viewportWarning.subtitle),a(2),h(n.texts.viewportWarning.body),a(5),g("ngSrc",n.markSrc()),a(3),X(" ",n.texts.brand," "),a(),j((r=n.updateCheck.current())?17:-1,r),a(),S("aria-label",n.texts.alpha),a(),h(n.texts.alpha),a(),j(n.updateCheck.isOutdated()&&!n.isDevMode?20:-1),a(),j(n.rootLabel()?21:-1),a(),S("aria-label",n.texts.a11y.viewSwitcher),a(),g("pTooltip",n.texts.nav.searchTooltip),S("aria-label",n.texts.nav.searchLabel),a(2),g("node",null),a(2),h(n.texts.nav.graph),a(),g("pTooltip",n.texts.nav.listTooltip),S("aria-label",n.texts.nav.listLabel),a(),h(n.texts.nav.list),a(2),pe("is-spinning",n.scanning()),g("pTooltip",n.graphInfoTooltip())("disabled",n.scanning()),S("aria-label",n.graphInfoA11y()),a(),pe("pi-spin",n.scanning()),a(),g("icon",n.themeIcon())("ariaLabel",n.themeLabel())("pTooltip",n.themeTooltip())("text",!0)("rounded",!0),a(),g("ariaLabel",n.settingsTexts.a11y.triggerLabel)("pTooltip",n.settingsTexts.triggerTooltip)("text",!0)("rounded",!0),a(4),ye(n.settingsOpen())}},dependencies:[Te,xe,Ee,Y,W,Ne,je,Pe,ae,Je],styles:["[_nghost-%COMP%]{display:block;height:100dvh;--shell-topbar-bg: #FFFFFF;--shell-topbar-border: var(--sm-violet-100);--shell-topbar-text: var(--sm-violet-800);--shell-topbar-text-strong: var(--sm-violet-900);--shell-topbar-text-muted: var(--sm-violet-600);--shell-topbar-hover-bg: color-mix(in srgb, var(--sm-violet-500) 10%, transparent);--shell-topbar-active-bg: var(--sm-violet-100);--shell-topbar-active-text: var(--sm-violet-800);--shell-topbar-badge-bg: var(--sm-violet-100)}.app-dark[_nghost-%COMP%], .app-dark [_nghost-%COMP%]{--shell-topbar-bg: #1A1B22;--shell-topbar-border: color-mix(in srgb, var(--sm-violet-300) 8%, transparent);--shell-topbar-text: var(--sm-violet-100);--shell-topbar-text-strong: var(--sm-violet-100);--shell-topbar-text-muted: var(--sm-violet-300);--shell-topbar-hover-bg: color-mix(in srgb, var(--sm-violet-400) 12%, transparent);--shell-topbar-active-bg: color-mix(in srgb, var(--sm-violet-500) 22%, transparent);--shell-topbar-active-text: var(--sm-violet-100);--shell-topbar-badge-bg: color-mix(in srgb, var(--sm-violet-500) 14%, transparent)}.shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100dvh}.shell__topbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:.75rem 1.5rem;background:color-mix(in srgb,var(--shell-topbar-bg) 85%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-bottom:1px solid var(--shell-topbar-border);color:var(--shell-topbar-text)}.shell__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.shell__brand-mark[_ngcontent-%COMP%]{width:2rem;height:2rem;display:block}.shell__brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:1.05rem;font-weight:600;letter-spacing:-.01em;color:var(--shell-topbar-text-strong)}.shell__alpha[_ngcontent-%COMP%]{font-family:var(--sm-font-display-brand);font-weight:600;font-size:10px;line-height:1;letter-spacing:.06em;text-transform:uppercase;color:#ad322b;background:#ad322b14;border-radius:var(--sm-radius-sm);padding:4px 8px;margin-left:8px;-webkit-user-select:none;user-select:none;display:inline-block;vertical-align:middle;white-space:nowrap}.app-dark[_nghost-%COMP%] .shell__alpha[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .shell__alpha[_ngcontent-%COMP%]{color:#e07570;background:#cf464024}.shell__version[_ngcontent-%COMP%]{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:var(--sm-radius-sm);font-family:var(--p-monospace-font-family);font-size:11px;line-height:1;font-weight:500;letter-spacing:.02em;color:var(--p-text-muted-color);background:var(--p-content-hover-background);vertical-align:middle;-webkit-user-select:text;user-select:text}.shell__update-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:3px 8px;font-size:11px;line-height:1;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--p-primary-color);background:var(--p-primary-50);border:1px solid var(--p-primary-200);border-radius:var(--sm-radius-pill);text-decoration:none;transition:background-color .12s ease,color .12s ease;vertical-align:middle}.shell__update-chip[_ngcontent-%COMP%]:hover, .shell__update-chip[_ngcontent-%COMP%]:focus-visible{background:var(--p-primary-100);color:var(--p-primary-700)}.shell__update-chip[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px;transform:translateY(1px)}.app-dark[_nghost-%COMP%] .shell__update-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .shell__update-chip[_ngcontent-%COMP%]{color:var(--p-primary-300);background:#ffffff0a;border-color:var(--p-primary-700)}.shell__tag[_ngcontent-%COMP%]{margin:.35rem 0 0;font-size:.72rem;color:var(--shell-topbar-text-muted);letter-spacing:.02em;text-transform:uppercase}.shell__nav[_ngcontent-%COMP%]{display:flex;gap:.25rem;margin-left:auto}.shell__nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:.5rem .9rem;border-radius:.5rem;font-size:.9rem;font-weight:500;color:var(--shell-topbar-text-muted);transition:background .15s ease,color .15s ease}.shell__nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:var(--shell-topbar-hover-bg);color:var(--shell-topbar-text-strong)}.shell__nav[_ngcontent-%COMP%] a.is-active[_ngcontent-%COMP%]{background:var(--shell-topbar-active-bg);color:var(--shell-topbar-active-text)}.shell__nav-disabled[_ngcontent-%COMP%]{padding:.5rem .9rem;border:none;background:transparent;border-radius:.5rem;font-size:.9rem;font-weight:500;color:var(--shell-topbar-text-muted);cursor:not-allowed;opacity:.55;font-family:inherit}.shell__nav-search[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:none;border-radius:.5rem;background:transparent;color:var(--shell-topbar-text-muted);cursor:not-allowed;opacity:.55;transition:background .15s ease,color .15s ease,opacity .15s ease}.shell__nav-search[_ngcontent-%COMP%]:hover:not([aria-disabled=true]){background:var(--shell-topbar-hover-bg);color:var(--shell-topbar-text-strong);opacity:1}.shell__nav-search[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.95rem}.shell__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;--p-button-text-secondary-color: var(--shell-topbar-text-muted);--p-button-text-secondary-hover-color: var(--shell-topbar-text-strong);--p-button-text-secondary-hover-background: var(--shell-topbar-hover-bg);--p-button-text-secondary-active-color: var(--shell-topbar-text-strong);--p-button-text-secondary-active-background: var(--shell-topbar-hover-bg)}.shell__refresh[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:var(--sm-radius-pill);background:transparent;color:var(--shell-topbar-text-muted);cursor:pointer;transition:background .15s ease,color .15s ease}.shell__refresh[_ngcontent-%COMP%]:hover:not(:disabled), .shell__refresh[_ngcontent-%COMP%]:focus-visible:not(:disabled){background:var(--shell-topbar-hover-bg);color:var(--shell-topbar-text-strong);outline:none}.shell__refresh[_ngcontent-%COMP%]:disabled{cursor:progress;opacity:.7}.shell__refresh[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem}.shell__main[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;width:100%}@media(max-width:1280px){.shell__topbar[_ngcontent-%COMP%]{gap:1rem;padding:.5rem 1rem}.shell__tag[_ngcontent-%COMP%]{display:none}.shell__nav[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:.4rem .7rem;font-size:.85rem}}.viewport-warning[_ngcontent-%COMP%]{display:none}@media(max-width:767px){.viewport-warning[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:1.5rem;background:var(--sm-bg-content)}.viewport-warning__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.85rem;max-width:22rem}.viewport-warning__icon[_ngcontent-%COMP%]{font-size:3rem;color:var(--p-primary-color);margin-bottom:.25rem}.viewport-warning__title[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;font-weight:700;color:var(--p-text-color);line-height:1.25}.viewport-warning__subtitle[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:500;color:var(--p-primary-color);line-height:1.35}.viewport-warning__body[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);line-height:1.5;font-size:.9rem}.shell[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};Ie(le,st).catch(i=>console.error(i));
@@ -66,7 +66,7 @@ CREATE TABLE scan_links (
66
66
  source_path TEXT NOT NULL,
67
67
  target_path TEXT NOT NULL,
68
68
  kind TEXT NOT NULL,
69
- confidence TEXT NOT NULL,
69
+ confidence REAL NOT NULL,
70
70
  sources_json TEXT NOT NULL,
71
71
  original_trigger TEXT,
72
72
  normalized_trigger TEXT,
@@ -75,7 +75,7 @@ CREATE TABLE scan_links (
75
75
  location_offset INTEGER,
76
76
  raw TEXT,
77
77
  CONSTRAINT ck_scan_links_kind CHECK (kind IN ('invokes','references','mentions','supersedes')),
78
- CONSTRAINT ck_scan_links_confidence CHECK (confidence IN ('high','medium','low'))
78
+ CONSTRAINT ck_scan_links_confidence CHECK (confidence >= 0.0 AND confidence <= 1.0)
79
79
  );
80
80
  CREATE INDEX ix_scan_links_source_path ON scan_links(source_path);
81
81
  CREATE INDEX ix_scan_links_target_path ON scan_links(target_path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-map/cli",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "skill-map reference implementation — kernel + CLI + adapters.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -56,9 +56,10 @@
56
56
  "js-yaml": "4.1.1",
57
57
  "kysely": "0.28.17",
58
58
  "semver": "7.7.4",
59
+ "smol-toml": "1.6.1",
59
60
  "typanion": "3.14.0",
60
61
  "ws": "8.20.0",
61
- "@skill-map/spec": "0.30.0"
62
+ "@skill-map/spec": "0.32.0"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@eslint/js": "10.0.1",
@@ -1 +0,0 @@
1
- import{J as n,O as o,Tb as s,Y as p,Z as h,da as r,ea as u,id as c,jd as m,nd as b}from"./chunk-LTQTJU54.js";var w={triggerLabel:"Settings",triggerTooltip:"Settings",modalTitle:"Settings",closeLabel:"Close",sections:{plugins:"Plugins",general:"General",project:"Project",changelog:"Changelog",about:"About"},general:{heading:"General",intro:"Per-machine preferences. The update-check toggle is the only setting that lives outside the project; it persists at `~/.skill-map/settings.json` and follows you across projects.",loadErrorPrefix:"Could not load preferences:",saveErrorPrefix:"Could not save preferences:",toggles:{"updateCheck.enabled":{label:"Check for updates",description:"Check npm for newer @skill-map/cli releases."}},localPreferences:{heading:"This browser",intro:"Visual preferences saved in this browser only. They won't sync to another machine."},extraTheme:{label:"Theme",description:"Pick a specialty theme. Overrides the topbar dark/light toggle while active; click that toggle to exit.",options:{none:{label:"None",description:"Use the topbar dark/light toggle."},matrix:{label:"Matrix",description:"Cyber-green retint on the dark palette."}}}},project:{heading:"Project",intro:"These settings apply only to this project and are saved in its `.skill-map/settings.local.json` file.",loadErrorPrefix:"Could not load project settings:",saveErrorPrefix:"Could not save project settings:",referencePathsLabel:"Folders for link validation",referencePathsDescription:'Folders checked only to validate links. Files here are not indexed and do not appear in the graph, they just stop "broken link" warnings when a link points to a real file outside this project.',referencePathsPlaceholder:"~/Documents/research",commaForbidden:"Add one path at a time, without commas.",addPathLabel:"Add path",removePathLabel:"Remove",confirmDialogHeader:"Allow access to folders outside this project?",confirmDialogIntro:"This change lets the scan read files in:",confirmDialogAccept:"Allow access",confirmDialogReject:"Cancel",ignorePatternsLabel:"Ignored patterns",ignorePatternsDescription:"Patterns that exclude files and folders from the scan, stored in `.skillmapignore` at the project root. Same syntax as `.gitignore` (one pattern per line). Comments (`# ...`) and blank lines in the file are preserved on save; the list below only shows active patterns.",ignorePatternsPlaceholder:"secrets.md",ignorePatternEmpty:"Pattern cannot be empty or whitespace-only.",ignorePatternHasControlChar:"Pattern must be a single line without control characters.",ignorePatternDuplicate:"This pattern is already in the list.",addIgnorePatternLabel:"Add pattern",removeIgnorePatternLabel:"Remove"},changelogHeading:"Changelog",changelogIntro:"What's new in skill-map. Each entry covers a release of @skill-map/cli (the CLI + bundled UI) and lists the user-facing changes plus the workspace(s) each one affects.",changelogEmpty:"No release notes yet. Future releases will populate this list automatically from the changesets shipped in each PR.",changelogInternalRelease:"Internal release. Focus on stability, infra, and refactors. No user-facing changes this time.",changelogAffectedPackages:"Affected packages",aboutHeading:"About",aboutIntro:"Version information for the running CLI / server.",aboutCliLabel:"skill-map CLI",aboutSpecLabel:"Spec version",aboutSchemaLabel:"Schema version",aboutFolderLabel:"Project folder",aboutDbLabel:"Project DB",aboutDbValue:(t,e)=>t==="present"?e:`${t} \xB7 ${e}`,aboutLoading:"Loading\u2026",aboutUnknown:"-",aboutErrorPrefix:"Could not read health endpoint:",aboutLinksHeading:"Links",aboutWebsiteLabel:"Website",aboutGithubLabel:"GitHub",aboutWebsiteUrl:"https://skill-map.dev/",aboutGithubUrl:"https://github.com/crystian/skill-map",aboutStarHeading:"Enjoying skill-map?",aboutStarBody:"If it's useful to you, drop us a star on GitHub, it helps a lot and keeps the project alive.",aboutStarCta:"Star on GitHub",aboutStarA11y:"Open the skill-map repository on GitHub to give it a star",pluginsHeading:"Plugins",pluginsIntro:"Enable or disable installed plugins.",pluginsSearchPlaceholder:"Filter by name\u2026",pluginsSearchA11y:"Filter plugins by name",pluginsSearchEmpty:t=>`No plugins match "${t}".`,pluginsKindFilterAll:"All",pluginsKindFilterA11y:"Filter plugins by kind",pluginsKindFilterOptionA11y:(t,e)=>e?`Show only ${t} extensions`:"Show all kinds",unsavedChangesMessage:t=>t===1?'1 unsaved change. Click "Apply" to persist it.':`${t} unsaved changes. Click "Apply" to persist them.`,startsAsDisabledRowHint:"This plugin started disabled and is not loaded in memory. Restart `sm serve` for the change to take effect.",startsAsDisabledFooterHint:"Some plugins were disabled when the server started. Consider restarting `sm serve` so they take effect.",discardChanges:"Discard",applyAndClose:"Apply",discardA11y:"Discard pending plugin changes",applyA11y:"Apply pending plugin changes and refresh the graph",confirmCloseTitle:"Apply pending changes?",confirmCloseBody:t=>t===1?"You have 1 unsaved change.":`You have ${t} unsaved changes.`,keepEditing:"Keep editing",sourceBuiltIn:"Built-in",sourceProject:"Project",enabledLabel:"Enabled",disabledLabel:"Disabled",lockedLabel:"Locked",lockedTooltip:"Locked by the host (cannot be toggled).",expandLabel:"Show extensions",collapseLabel:"Hide extensions",statusFailure:{"incompatible-spec":"Incompatible spec version","invalid-manifest":"Invalid manifest","load-error":"Failed to load","id-collision":"Plugin id collision"},loading:"Loading plugins\u2026",empty:"No plugins installed.",errorPrefix:"Could not load plugins:",toggleErrorPrefix:"Toggle failed:",a11y:{triggerLabel:"Open settings",pluginToggle:(t,e)=>e?`Enable plugin ${t}`:`Disable plugin ${t}`,extensionToggle:(t,e)=>e?`Enable ${t}`:`Disable ${t}`,pluginRow:t=>`Plugin ${t} row`,extensionRow:t=>`Extension ${t} row`}};var f={available:"Update available",tooltip:t=>`v${t} is available. Run \`npm i -g @skill-map/cli@latest\` to update.`,a11yLabel:t=>`Update available: version ${t}`,versionLabel:t=>`v${t}`,versionTooltip:t=>`skill-map CLI v${t}`,versionA11yLabel:t=>`Running version ${t}`,fetchFailed:t=>`UpdateCheckService: fetch failed (${t})`};var y=class t{dataSource=o(c);status=r(null);isOutdated=s(()=>this.status()?.isOutdated===!0);latest=s(()=>this.status()?.latest??null);current=s(()=>this.status()?.current??null);async load(){try{let e=await this.dataSource.getUpdateStatus();this.status.set(e)}catch(e){let a=e instanceof Error?e.message:String(e);console.warn(f.fetchFailed(a))}}static \u0275fac=function(a){return new(a||t)};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})};var T={scanFailed:t=>`scan-trigger failed: ${t}`};var k=class t{dataSource=o(c);loader=o(b);scanning=r(!1);scanError=r(null);async run(){if(!this.scanning()){this.scanning.set(!0),this.scanError.set(null);try{await this.dataSource.runScan(),await this.loader.load()}catch(e){let a=e instanceof m||e instanceof Error?e.message:String(e);this.scanError.set(a),console.warn(T.scanFailed(a))}finally{this.scanning.set(!1)}}}static \u0275fac=function(a){return new(a||t)};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})};var S="skill-map.ui.theme",g="skill-map.ui.extra-theme",A="app-dark",x="dark",C="app-matrix",E="(prefers-color-scheme: dark)",D="favicon.svg",I="favicon-matrix.svg",L='link[rel="icon"][type="image/svg+xml"]',P=class t{doc=o(p);destroyRef=o(h);mode=r(this.readInitialMode());extraTheme=r(this.readInitialExtra());systemPrefersDark=r(this.readSystemPref());resolved=s(()=>{let e=this.mode();return e==="auto"?this.systemPrefersDark()?"dark":"light":e});constructor(){this.subscribeToSystemPref(),u(()=>{let e=this.extraTheme(),i=this.resolved()==="dark"||e==="matrix",l=this.doc.documentElement;l.classList.toggle(A,i),l.classList.toggle(x,i),l.classList.toggle(C,e==="matrix"),this.applyFavicon(e==="matrix"?I:D);try{let d=this.doc.defaultView?.localStorage;d?.setItem(S,this.mode()),e===null?d?.removeItem(g):d?.setItem(g,e)}catch{}})}toggle(){this.extraTheme()!==null&&this.extraTheme.set(null),this.mode.update(e=>e==="auto"?"light":e==="light"?"dark":"auto")}set(e){this.mode.set(e)}setExtraTheme(e){this.extraTheme.set(e)}readInitialMode(){try{let e=this.doc.defaultView?.localStorage.getItem(S);if(e==="auto"||e==="light"||e==="dark")return e}catch{}return"auto"}readInitialExtra(){try{let e=this.doc.defaultView?.localStorage.getItem(g);if(e==="matrix")return e}catch{}return null}readSystemPref(){try{return this.doc.defaultView?.matchMedia(E).matches??!1}catch{return!1}}applyFavicon(e){let a=this.doc.querySelector(L);a&&a.getAttribute("href")!==e&&a.setAttribute("href",e)}subscribeToSystemPref(){let e=this.doc.defaultView;if(!e||typeof e.matchMedia!="function")return;let a=e.matchMedia(E),i=l=>{this.systemPrefersDark.set(l.matches)};a.addEventListener("change",i),this.destroyRef.onDestroy(()=>a.removeEventListener("change",i))}static \u0275fac=function(a){return new(a||t)};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})};export{f as a,y as b,w as c,k as d,P as e};
@@ -1,135 +0,0 @@
1
- import{$ as L,Aa as c,Ba as Fe,Ea as nt,Hb as S,I as $,Ic as vt,J as U,Jb as Se,Jc as he,K as O,Ka as re,Lc as fe,M as b,Na as P,O as M,Oa as R,Oc as z,Pc as Z,Sb as A,Ta as j,Tb as D,Ua as we,V as et,Va as Ie,Vc as I,Wa as it,Wb as u,Wc as ge,Xb as s,Za as ot,_c as yt,ab as Ne,ad as _t,bc as ct,cc as w,d as Ke,da as V,dc as ht,ea as ie,ec as Oe,fa as tt,fb as se,ga as v,gc as xe,h as Ye,hb as q,ia as Ae,ib as rt,jb as st,kb as at,mb as ae,n as Xe,nb as le,oa as W,oc as ft,pc as de,ra as Ee,sa as y,t as Je,tb as lt,vb as T,wa as B,wb as dt,xa as x,xb as ut,ya as C,za as oe}from"./chunk-LTQTJU54.js";import{J as pt,L as ce,Q as ke,U as mt,b as ue,d as Te,g as gt,ga as Le}from"./chunk-3SI3TVER.js";import{a as p,b as F}from"./chunk-VB56BUGO.js";var Xt=["data-p-icon","times"],si=(()=>{class t extends yt{static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275cmp=B({type:t,selectors:[["","data-p-icon","times"]],features:[c],attrs:Xt,decls:1,vars:0,consts:[["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(i,o){i&1&&(et(),ot(0,"path",0))},encapsulation:2})}return t})();var Jt=Object.defineProperty,Ct=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,bt=(t,n,e)=>n in t?Jt(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,Dt=(t,n)=>{for(var e in n||(n={}))en.call(n,e)&&bt(t,e,n[e]);if(Ct)for(var e of Ct(n))tn.call(n,e)&&bt(t,e,n[e]);return t},nn=(t,n,e)=>new Promise((i,o)=>{var r=l=>{try{g(e.next(l))}catch(h){o(h)}},a=l=>{try{g(e.throw(l))}catch(h){o(h)}},g=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,a);g((e=e.apply(t,n)).next())}),pe="animation",K="transition";function on(t){return t?t.disabled||!!(t.safe&&pt()):!1}function rn(t,n){return t?Dt(Dt({},t),Object.entries(n).reduce((e,[i,o])=>{var r;return e[i]=(r=t[i])!=null?r:o,e},{})):n}function sn(t){let{name:n,enterClass:e,leaveClass:i}=t||{};return{enter:{from:e?.from||`${n}-enter-from`,to:e?.to||`${n}-enter-to`,active:e?.active||`${n}-enter-active`},leave:{from:i?.from||`${n}-leave-from`,to:i?.to||`${n}-leave-to`,active:i?.active||`${n}-leave-active`}}}function an(t){return{enter:{onBefore:t?.onBeforeEnter,onStart:t?.onEnter,onAfter:t?.onAfterEnter,onCancelled:t?.onEnterCancelled},leave:{onBefore:t?.onBeforeLeave,onStart:t?.onLeave,onAfter:t?.onAfterLeave,onCancelled:t?.onLeaveCancelled}}}function ln(t,n){let e=window.getComputedStyle(t),i=m=>{let N=e[`${m}Delay`],E=e[`${m}Duration`];return[N.split(", ").map(Le),E.split(", ").map(Le)]},[o,r]=i(K),[a,g]=i(pe),l=Math.max(...r.map((m,N)=>m+o[N])),h=Math.max(...g.map((m,N)=>m+a[N])),d,f=0,_=0;return n===K?l>0&&(d=K,f=l,_=r.length):n===pe?h>0&&(d=pe,f=h,_=g.length):(f=Math.max(l,h),d=f>0?l>h?K:pe:void 0,_=d?d===K?r.length:g.length:0),{type:d,timeout:f,count:_}}function me(t,n){return typeof t=="number"?t:typeof t=="object"&&t[n]!=null?t[n]:null}function dn(t,n=!0,e=!1){if(!n&&!e)return;let i=gt(t);n&&ke(t,"--pui-motion-height",i.height+"px"),e&&ke(t,"--pui-motion-width",i.width+"px")}var un={name:"p",safe:!0,disabled:!1,enter:!0,leave:!0,autoHeight:!0,autoWidth:!1};function Be(t,n){if(!t)throw new Error("Element is required.");let e={},i=!1,o={},r=null,a={},g=d=>{if(Object.assign(e,rn(d,un)),!e.enter&&!e.leave)throw new Error("Enter or leave must be true.");a=an(e),i=on(e),o=sn(e),r=null},l=d=>nn(null,null,function*(){r?.();let{onBefore:f,onStart:_,onAfter:m,onCancelled:N}=a[d]||{},E={element:t};if(i){f?.(E),_?.(E),m?.(E);return}let{from:We,active:qe,to:ze}=o[d]||{};return dn(t,e.autoHeight,e.autoWidth),f?.(E),ue(t,We),ue(t,qe),t.offsetHeight,Te(t,We),ue(t,ze),_?.(E),new Promise(Ze=>{let Kt=me(e.duration,d),Qe=()=>{Te(t,[ze,qe]),r=null},Yt=()=>{Qe(),m?.(E),Ze()};r=()=>{Qe(),N?.(E),Ze()},hn(t,e.type,Kt,Yt)})});g(n);let h={enter:()=>e.enter?l("enter"):Promise.resolve(),leave:()=>e.leave?l("leave"):Promise.resolve(),cancel:()=>{r?.(),r=null},update:(d,f)=>{if(!d)throw new Error("Element is required.");t=d,h.cancel(),g(f)}};return e.appear&&h.enter(),h}var cn=0;function hn(t,n,e,i){let o=t._motionEndId=++cn,r=()=>{o===t._motionEndId&&i()};if(e!=null)return setTimeout(r,e);let{type:a,timeout:g,count:l}=ln(t,n);if(!a){i();return}let h=a+"end",d=0,f=()=>{t.removeEventListener(h,_,!0),r()},_=m=>{m.target===t&&++d>=l&&f()};t.addEventListener(h,_,{capture:!0,once:!0}),setTimeout(()=>{d<l&&f()},g+1)}var gn=["*"];function pn(t,n){t&1&&st(0)}var ve=new WeakMap;function Y(t,n){if(t)switch(ve.has(t)||ve.set(t,{display:t.style.display,visibility:t.style.visibility,maxHeight:t.style.maxHeight,overflow:t.style.overflow}),n){case"display":t.style.display="none";break;case"visibility":t.style.visibility="hidden",t.style.maxHeight="0",t.style.overflow="hidden";break}}function ye(t,n){if(!t)return;let e=ve.get(t)??t.style;switch(n){case"display":t.style.display=e?.display||"";break;case"visibility":t.style.visibility=e?.visibility||"",t.style.maxHeight=e?.maxHeight||"",t.style.overflow=e?.overflow||"";break}ve.delete(t)}var mn=`
2
- .p-motion {
3
- display: block;
4
- }
5
- `,vn={root:"p-motion"},Pe=(()=>{class t extends fe{name="motion";style=mn;classes=vn;static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275prov=U({token:t,factory:t.\u0275fac})}return t})();var Mt=new b("MOTION_INSTANCE"),yn=(()=>{class t extends Z{$pcMotion=M(Mt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=M(I,{self:!0});onAfterViewChecked(){let i=this.options()?.root||{};this.bindDirectiveInstance.setAttrs(p(p({},this.ptms(["host","root"])),i))}_componentStyle=M(Pe);visible=s(!1);mountOnEnter=s(!0);unmountOnLeave=s(!0);name=s(void 0);type=s(void 0);safe=s(void 0);disabled=s(!1);appear=s(!1);enter=s(!0);leave=s(!0);duration=s(void 0);hideStrategy=s("display");enterFromClass=s(void 0);enterToClass=s(void 0);enterActiveClass=s(void 0);leaveFromClass=s(void 0);leaveToClass=s(void 0);leaveActiveClass=s(void 0);options=s({});onBeforeEnter=u();onEnter=u();onAfterEnter=u();onEnterCancelled=u();onBeforeLeave=u();onLeave=u();onAfterLeave=u();onLeaveCancelled=u();motionOptions=D(()=>{let e=this.options();return{name:e.name??this.name(),type:e.type??this.type(),safe:e.safe??this.safe(),disabled:e.disabled??this.disabled(),appear:!1,enter:e.enter??this.enter(),leave:e.leave??this.leave(),duration:e.duration??this.duration(),enterClass:{from:e.enterClass?.from??(e.name?void 0:this.enterFromClass()),to:e.enterClass?.to??(e.name?void 0:this.enterToClass()),active:e.enterClass?.active??(e.name?void 0:this.enterActiveClass())},leaveClass:{from:e.leaveClass?.from??(e.name?void 0:this.leaveFromClass()),to:e.leaveClass?.to??(e.name?void 0:this.leaveToClass()),active:e.leaveClass?.active??(e.name?void 0:this.leaveActiveClass())},onBeforeEnter:e.onBeforeEnter??this.handleBeforeEnter,onEnter:e.onEnter??this.handleEnter,onAfterEnter:e.onAfterEnter??this.handleAfterEnter,onEnterCancelled:e.onEnterCancelled??this.handleEnterCancelled,onBeforeLeave:e.onBeforeLeave??this.handleBeforeLeave,onLeave:e.onLeave??this.handleLeave,onAfterLeave:e.onAfterLeave??this.handleAfterLeave,onLeaveCancelled:e.onLeaveCancelled??this.handleLeaveCancelled}});motion;isInitialMount=!0;cancelled=!1;destroyed=!1;rendered=V(!1);handleBeforeEnter=e=>!this.destroyed&&this.onBeforeEnter.emit(e);handleEnter=e=>!this.destroyed&&this.onEnter.emit(e);handleAfterEnter=e=>!this.destroyed&&this.onAfterEnter.emit(e);handleEnterCancelled=e=>!this.destroyed&&this.onEnterCancelled.emit(e);handleBeforeLeave=e=>!this.destroyed&&this.onBeforeLeave.emit(e);handleLeave=e=>!this.destroyed&&this.onLeave.emit(e);handleAfterLeave=e=>!this.destroyed&&this.onAfterLeave.emit(e);handleLeaveCancelled=e=>!this.destroyed&&this.onLeaveCancelled.emit(e);constructor(){super(),ie(()=>{let e=this.hideStrategy();this.isInitialMount?(Y(this.$el,e),this.rendered.set(this.visible()&&this.mountOnEnter()||!this.mountOnEnter())):this.visible()&&!this.rendered()&&(Y(this.$el,e),this.rendered.set(!0))}),ie(()=>{this.motion||(this.motion=Be(this.$el,this.motionOptions()))}),Oe(async()=>{if(!this.$el)return;let e=this.isInitialMount&&this.visible()&&this.appear(),i=this.hideStrategy();this.visible()?(await ce(),ye(this.$el,i),(e||!this.isInitialMount)&&(this.applyMotionDuration("enter"),this.motion?.enter())):this.isInitialMount||(await ce(),this.applyMotionDuration("leave"),this.motion?.leave()?.then(async()=>{this.$el&&!this.cancelled&&!this.visible()&&(Y(this.$el,i),this.unmountOnLeave()&&(await ce(),this.cancelled||this.rendered.set(!1)))})),this.isInitialMount=!1})}applyMotionDuration(e){let i=A(this.motionOptions),o=me(i.duration,e);if(o==null||!this.$el)return;let r=this.$el,a=`${o}ms`;i.type==="transition"?r.style.transitionDuration=a:r.style.animationDuration=a}onDestroy(){this.destroyed=!0,this.cancelled=!0,this.motion?.cancel(),this.motion=void 0,ye(this.$el,this.hideStrategy()),this.$el?.remove(),this.isInitialMount=!0}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=B({type:t,selectors:[["p-motion"]],hostVars:2,hostBindings:function(i,o){i&2&&T(o.cx("root"))},inputs:{visible:[1,"visible"],mountOnEnter:[1,"mountOnEnter"],unmountOnLeave:[1,"unmountOnLeave"],name:[1,"name"],type:[1,"type"],safe:[1,"safe"],disabled:[1,"disabled"],appear:[1,"appear"],enter:[1,"enter"],leave:[1,"leave"],duration:[1,"duration"],hideStrategy:[1,"hideStrategy"],enterFromClass:[1,"enterFromClass"],enterToClass:[1,"enterToClass"],enterActiveClass:[1,"enterActiveClass"],leaveFromClass:[1,"leaveFromClass"],leaveToClass:[1,"leaveToClass"],leaveActiveClass:[1,"leaveActiveClass"],options:[1,"options"]},outputs:{onBeforeEnter:"onBeforeEnter",onEnter:"onEnter",onAfterEnter:"onAfterEnter",onEnterCancelled:"onEnterCancelled",onBeforeLeave:"onBeforeLeave",onLeave:"onLeave",onAfterLeave:"onAfterLeave",onLeaveCancelled:"onLeaveCancelled"},features:[S([Pe,{provide:Mt,useExisting:t},{provide:z,useExisting:t}]),oe([I]),c],ngContentSelectors:gn,decls:1,vars:1,template:function(i,o){i&1&&(rt(),P(0,pn,1,0)),i&2&&R(o.rendered()?0:-1)},dependencies:[de,ge],encapsulation:2})}return t})(),Vt=new b("MOTION_DIRECTIVE_INSTANCE"),Di=(()=>{class t extends Z{$pcMotionDirective=M(Vt,{optional:!0,skipSelf:!0})??void 0;visible=s(!1,{alias:"pMotion"});name=s(void 0,{alias:"pMotionName"});type=s(void 0,{alias:"pMotionType"});safe=s(void 0,{alias:"pMotionSafe"});disabled=s(!1,{alias:"pMotionDisabled"});appear=s(!1,{alias:"pMotionAppear"});enter=s(!0,{alias:"pMotionEnter"});leave=s(!0,{alias:"pMotionLeave"});duration=s(void 0,{alias:"pMotionDuration"});hideStrategy=s("display",{alias:"pMotionHideStrategy"});enterFromClass=s(void 0,{alias:"pMotionEnterFromClass"});enterToClass=s(void 0,{alias:"pMotionEnterToClass"});enterActiveClass=s(void 0,{alias:"pMotionEnterActiveClass"});leaveFromClass=s(void 0,{alias:"pMotionLeaveFromClass"});leaveToClass=s(void 0,{alias:"pMotionLeaveToClass"});leaveActiveClass=s(void 0,{alias:"pMotionLeaveActiveClass"});options=s({},{alias:"pMotionOptions"});onBeforeEnter=u({alias:"pMotionOnBeforeEnter"});onEnter=u({alias:"pMotionOnEnter"});onAfterEnter=u({alias:"pMotionOnAfterEnter"});onEnterCancelled=u({alias:"pMotionOnEnterCancelled"});onBeforeLeave=u({alias:"pMotionOnBeforeLeave"});onLeave=u({alias:"pMotionOnLeave"});onAfterLeave=u({alias:"pMotionOnAfterLeave"});onLeaveCancelled=u({alias:"pMotionOnLeaveCancelled"});motionOptions=D(()=>{let e=this.options()??{};return{name:e.name??this.name(),type:e.type??this.type(),safe:e.safe??this.safe(),disabled:e.disabled??this.disabled(),appear:!1,enter:e.enter??this.enter(),leave:e.leave??this.leave(),duration:e.duration??this.duration(),enterClass:{from:e.enterClass?.from??(e.name?void 0:this.enterFromClass()),to:e.enterClass?.to??(e.name?void 0:this.enterToClass()),active:e.enterClass?.active??(e.name?void 0:this.enterActiveClass())},leaveClass:{from:e.leaveClass?.from??(e.name?void 0:this.leaveFromClass()),to:e.leaveClass?.to??(e.name?void 0:this.leaveToClass()),active:e.leaveClass?.active??(e.name?void 0:this.leaveActiveClass())},onBeforeEnter:e.onBeforeEnter??this.handleBeforeEnter,onEnter:e.onEnter??this.handleEnter,onAfterEnter:e.onAfterEnter??this.handleAfterEnter,onEnterCancelled:e.onEnterCancelled??this.handleEnterCancelled,onBeforeLeave:e.onBeforeLeave??this.handleBeforeLeave,onLeave:e.onLeave??this.handleLeave,onAfterLeave:e.onAfterLeave??this.handleAfterLeave,onLeaveCancelled:e.onLeaveCancelled??this.handleLeaveCancelled}});motion;isInitialMount=!0;cancelled=!1;destroyed=!1;handleBeforeEnter=e=>!this.destroyed&&this.onBeforeEnter.emit(e);handleEnter=e=>!this.destroyed&&this.onEnter.emit(e);handleAfterEnter=e=>!this.destroyed&&this.onAfterEnter.emit(e);handleEnterCancelled=e=>!this.destroyed&&this.onEnterCancelled.emit(e);handleBeforeLeave=e=>!this.destroyed&&this.onBeforeLeave.emit(e);handleLeave=e=>!this.destroyed&&this.onLeave.emit(e);handleAfterLeave=e=>!this.destroyed&&this.onAfterLeave.emit(e);handleLeaveCancelled=e=>!this.destroyed&&this.onLeaveCancelled.emit(e);constructor(){super(),ie(()=>{this.motion||(this.motion=Be(this.$el,this.motionOptions()))}),Oe(()=>{if(!this.$el)return;let e=this.isInitialMount&&this.visible()&&this.appear(),i=this.hideStrategy();this.visible()?(ye(this.$el,i),(e||!this.isInitialMount)&&(this.applyMotionDuration("enter"),this.motion?.enter())):this.isInitialMount?Y(this.$el,i):(this.applyMotionDuration("leave"),this.motion?.leave()?.then(()=>{this.$el&&!this.cancelled&&!this.visible()&&Y(this.$el,i)})),this.isInitialMount=!1})}applyMotionDuration(e){let i=A(this.motionOptions),o=me(i.duration,e);if(o==null||!this.$el)return;let r=this.$el,a=`${o}ms`;i.type==="transition"?r.style.transitionDuration=a:r.style.animationDuration=a}onDestroy(){this.destroyed=!0,this.cancelled=!0,this.motion?.cancel(),this.motion=void 0,ye(this.$el,this.hideStrategy()),this.$el?.remove(),this.isInitialMount=!0}static \u0275fac=function(i){return new(i||t)};static \u0275dir=C({type:t,selectors:[["","pMotion",""]],inputs:{visible:[1,"pMotion","visible"],name:[1,"pMotionName","name"],type:[1,"pMotionType","type"],safe:[1,"pMotionSafe","safe"],disabled:[1,"pMotionDisabled","disabled"],appear:[1,"pMotionAppear","appear"],enter:[1,"pMotionEnter","enter"],leave:[1,"pMotionLeave","leave"],duration:[1,"pMotionDuration","duration"],hideStrategy:[1,"pMotionHideStrategy","hideStrategy"],enterFromClass:[1,"pMotionEnterFromClass","enterFromClass"],enterToClass:[1,"pMotionEnterToClass","enterToClass"],enterActiveClass:[1,"pMotionEnterActiveClass","enterActiveClass"],leaveFromClass:[1,"pMotionLeaveFromClass","leaveFromClass"],leaveToClass:[1,"pMotionLeaveToClass","leaveToClass"],leaveActiveClass:[1,"pMotionLeaveActiveClass","leaveActiveClass"],options:[1,"pMotionOptions","options"]},outputs:{onBeforeEnter:"pMotionOnBeforeEnter",onEnter:"pMotionOnEnter",onAfterEnter:"pMotionOnAfterEnter",onEnterCancelled:"pMotionOnEnterCancelled",onBeforeLeave:"pMotionOnBeforeLeave",onLeave:"pMotionOnLeave",onAfterLeave:"pMotionOnAfterLeave",onLeaveCancelled:"pMotionOnLeaveCancelled"},features:[S([Pe,{provide:Vt,useExisting:t},{provide:z,useExisting:t}]),c]})}return t})(),Mi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=x({type:t});static \u0275inj=O({imports:[yn]})}return t})();var Ot=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||t)(y(Ee),y(Ae))};static \u0275dir=C({type:t})}return t})(),_n=(()=>{class t extends Ot{static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275dir=C({type:t,features:[c]})}return t})(),Me=new b("");var Cn={provide:Me,useExisting:$(()=>xt),multi:!0};function bn(){let t=xe()?xe().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var Dn=new b(""),xt=(()=>{class t extends Ot{_compositionMode;_composing=!1;constructor(e,i,o){super(e,i),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!bn())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||t)(y(Ee),y(Ae),y(Dn,8))};static \u0275dir=C({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&se("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[S([Cn]),c]})}return t})();var Mn=new b(""),Vn=new b("");function Tt(t){return t!=null}function kt(t){return nt(t)?Ye(t):t}function Lt(t){let n={};return t.forEach(e=>{n=e!=null?p(p({},n),e):n}),Object.keys(n).length===0?null:n}function Bt(t,n){return n.map(e=>e(t))}function An(t){return!t.validate}function Pt(t){return t.map(n=>An(n)?n:e=>n.validate(e))}function En(t){if(!t)return null;let n=t.filter(Tt);return n.length==0?null:function(e){return Lt(Bt(e,n))}}function Rt(t){return t!=null?En(Pt(t)):null}function Fn(t){if(!t)return null;let n=t.filter(Tt);return n.length==0?null:function(e){let i=Bt(e,n).map(kt);return Je(i).pipe(Xe(Lt))}}function jt(t){return t!=null?Fn(Pt(t)):null}function At(t,n){return t===null?[n]:Array.isArray(t)?[...t,n]:[t,n]}function wn(t){return t._rawValidators}function In(t){return t._rawAsyncValidators}function Re(t){return t?Array.isArray(t)?t:[t]:[]}function Ce(t,n){return Array.isArray(t)?t.includes(n):t===n}function Et(t,n){let e=Re(n);return Re(t).forEach(o=>{Ce(e,o)||e.push(o)}),e}function Ft(t,n){return Re(n).filter(e=>!Ce(t,e))}var be=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Rt(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=jt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control?.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},je=class extends be{name;get formDirective(){return null}get path(){return null}},ne=class extends be{_parent=null;name=null;valueAccessor=null},Ge=class{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var zi=(()=>{class t extends Ge{constructor(e){super(e)}static \u0275fac=function(i){return new(i||t)(y(ne,2))};static \u0275dir=C({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&lt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[c]})}return t})();var X="VALID",_e="INVALID",G="PENDING",J="DISABLED",k=class{},De=class extends k{value;source;constructor(n,e){super(),this.value=n,this.source=e}},ee=class extends k{pristine;source;constructor(n,e){super(),this.pristine=n,this.source=e}},te=class extends k{touched;source;constructor(n,e){super(),this.touched=n,this.source=e}},H=class extends k{status;source;constructor(n,e){super(),this.status=n,this.source=e}};var He=class extends k{source;constructor(n){super(),this.source=n}};function Nn(t){return(Ve(t)?t.validators:t)||null}function Sn(t){return Array.isArray(t)?Rt(t):t||null}function On(t,n){return(Ve(n)?n.asyncValidators:t)||null}function xn(t){return Array.isArray(t)?jt(t):t||null}function Ve(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}var $e=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,e){this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return A(this.statusReactive)}set status(n){A(()=>this.statusReactive.set(n))}_status=D(()=>this.statusReactive());statusReactive=V(void 0);get valid(){return this.status===X}get invalid(){return this.status===_e}get pending(){return this.status===G}get disabled(){return this.status===J}get enabled(){return this.status!==J}errors;get pristine(){return A(this.pristineReactive)}set pristine(n){A(()=>this.pristineReactive.set(n))}_pristine=D(()=>this.pristineReactive());pristineReactive=V(!0);get dirty(){return!this.pristine}get touched(){return A(this.touchedReactive)}set touched(n){A(()=>this.touchedReactive.set(n))}_touched=D(()=>this.touchedReactive());touchedReactive=V(!1);get untouched(){return!this.touched}_events=new Ke;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(Et(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(Et(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(Ft(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(Ft(n,this._rawAsyncValidators))}hasValidator(n){return Ce(this._rawValidators,n)}hasAsyncValidator(n){return Ce(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let e=this.touched===!1;this.touched=!0;let i=n.sourceControl??this;n.onlySelf||this._parent?.markAsTouched(F(p({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new te(!0,i))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(n))}markAsUntouched(n={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:i})}),n.onlySelf||this._parent?._updateTouched(n,i),e&&n.emitEvent!==!1&&this._events.next(new te(!1,i))}markAsDirty(n={}){let e=this.pristine===!0;this.pristine=!1;let i=n.sourceControl??this;n.onlySelf||this._parent?.markAsDirty(F(p({},n),{sourceControl:i})),e&&n.emitEvent!==!1&&this._events.next(new ee(!1,i))}markAsPristine(n={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=n.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),n.onlySelf||this._parent?._updatePristine(n,i),e&&n.emitEvent!==!1&&this._events.next(new ee(!0,i))}markAsPending(n={}){this.status=G;let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new H(this.status,e)),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.markAsPending(F(p({},n),{sourceControl:e}))}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=J,this.errors=null,this._forEachChild(o=>{o.disable(F(p({},n),{onlySelf:!0}))}),this._updateValue();let i=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new De(this.value,i)),this._events.next(new H(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(F(p({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=X,this._forEachChild(i=>{i.enable(F(p({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(F(p({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n,e){n.onlySelf||(this._parent?.updateValueAndValidity(n),n.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X||this.status===G)&&this._runAsyncValidator(i,n.emitEvent)}let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new De(this.value,e)),this._events.next(new H(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.updateValueAndValidity(F(p({},n),{sourceControl:e}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?J:X}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,e){if(this.asyncValidator){this.status=G,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:n!==!1};let i=kt(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,o)=>i&&i._find(o),this)}getError(n,e){let i=e?this.get(e):this;return i?.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,e,i){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||i)&&this._events.next(new H(this.status,e)),this._parent&&this._parent._updateControlsErrors(n,e,i)}_initObservables(){this.valueChanges=new L,this.statusChanges=new L}_calculateStatus(){return this._allControlsDisabled()?J:this.errors?_e:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(G)?G:this._anyControlsHaveStatus(_e)?_e:X}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,e){let i=!this._anyControlsDirty(),o=this.pristine!==i;this.pristine=i,n.onlySelf||this._parent?._updatePristine(n,e),o&&this._events.next(new ee(this.pristine,e))}_updateTouched(n={},e){this.touched=this._anyControlsTouched(),this._events.next(new te(this.touched,e)),n.onlySelf||this._parent?._updateTouched(n,e)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){Ve(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=Sn(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=xn(this._rawAsyncValidators)}};var Gt=new b("",{factory:()=>Ue}),Ue="always";function Tn(t,n){return[...n.path,t]}function kn(t,n,e=Ue){Bn(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(t.disabled),Pn(t,n),jn(t,n),Rn(t,n),Ln(t,n)}function wt(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function Ln(t,n){if(n.valueAccessor.setDisabledState){let e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function Bn(t,n){let e=wn(t);n.validator!==null?t.setValidators(At(e,n.validator)):typeof e=="function"&&t.setValidators([e]);let i=In(t);n.asyncValidator!==null?t.setAsyncValidators(At(i,n.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let o=()=>t.updateValueAndValidity();wt(n._rawValidators,o),wt(n._rawAsyncValidators,o)}function Pn(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Ht(t,n)})}function Rn(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Ht(t,n),t.updateOn!=="submit"&&t.markAsTouched()})}function Ht(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function jn(t,n){let e=(i,o)=>{n.valueAccessor.writeValue(i),o&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function Gn(t,n){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function Hn(t){return Object.getPrototypeOf(t.constructor)===_n}function $n(t,n){if(!n)return null;Array.isArray(n);let e,i,o;return n.forEach(r=>{r.constructor===xt?e=r:Hn(r)?i=r:o=r}),o||i||e||null}function It(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}function Nt(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var Un=class extends $e{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,e,i){super(Nn(e),On(i,e)),this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ve(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Nt(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new He(this))}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){It(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){It(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){Nt(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};var Wn={provide:ne,useExisting:$(()=>qn)},St=Promise.resolve(),qn=(()=>{class t extends ne{_changeDetectorRef;callSetDisabledState;control=new Un;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new L;constructor(e,i,o,r,a,g){super(),this._changeDetectorRef=a,this.callSetDisabledState=g,this._parent=e,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=$n(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Gn(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){kn(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){St.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,o=i!==0&&w(i);St.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Tn(e,this._parent):[e]}static \u0275fac=function(i){return new(i||t)(y(je,9),y(Mn,10),y(Vn,10),y(Me,10),y(ct,8),y(Gt,8))};static \u0275dir=C({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[S([Wn]),c,tt]})}return t})();var zn=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=x({type:t});static \u0275inj=O({})}return t})();var Qi=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Gt,useValue:e.callSetDisabledState??Ue}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=x({type:t});static \u0275inj=O({imports:[zn]})}return t})();var $t=`
6
- .p-togglebutton {
7
- display: inline-flex;
8
- cursor: pointer;
9
- user-select: none;
10
- overflow: hidden;
11
- position: relative;
12
- color: dt('togglebutton.color');
13
- background: dt('togglebutton.background');
14
- border: 1px solid dt('togglebutton.border.color');
15
- padding: dt('togglebutton.padding');
16
- font-size: 1rem;
17
- font-family: inherit;
18
- font-feature-settings: inherit;
19
- transition:
20
- background dt('togglebutton.transition.duration'),
21
- color dt('togglebutton.transition.duration'),
22
- border-color dt('togglebutton.transition.duration'),
23
- outline-color dt('togglebutton.transition.duration'),
24
- box-shadow dt('togglebutton.transition.duration');
25
- border-radius: dt('togglebutton.border.radius');
26
- outline-color: transparent;
27
- font-weight: dt('togglebutton.font.weight');
28
- }
29
-
30
- .p-togglebutton-content {
31
- display: inline-flex;
32
- flex: 1 1 auto;
33
- align-items: center;
34
- justify-content: center;
35
- gap: dt('togglebutton.gap');
36
- padding: dt('togglebutton.content.padding');
37
- background: transparent;
38
- border-radius: dt('togglebutton.content.border.radius');
39
- transition:
40
- background dt('togglebutton.transition.duration'),
41
- color dt('togglebutton.transition.duration'),
42
- border-color dt('togglebutton.transition.duration'),
43
- outline-color dt('togglebutton.transition.duration'),
44
- box-shadow dt('togglebutton.transition.duration');
45
- }
46
-
47
- .p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover {
48
- background: dt('togglebutton.hover.background');
49
- color: dt('togglebutton.hover.color');
50
- }
51
-
52
- .p-togglebutton.p-togglebutton-checked {
53
- background: dt('togglebutton.checked.background');
54
- border-color: dt('togglebutton.checked.border.color');
55
- color: dt('togglebutton.checked.color');
56
- }
57
-
58
- .p-togglebutton-checked .p-togglebutton-content {
59
- background: dt('togglebutton.content.checked.background');
60
- box-shadow: dt('togglebutton.content.checked.shadow');
61
- }
62
-
63
- .p-togglebutton:focus-visible {
64
- box-shadow: dt('togglebutton.focus.ring.shadow');
65
- outline: dt('togglebutton.focus.ring.width') dt('togglebutton.focus.ring.style') dt('togglebutton.focus.ring.color');
66
- outline-offset: dt('togglebutton.focus.ring.offset');
67
- }
68
-
69
- .p-togglebutton.p-invalid {
70
- border-color: dt('togglebutton.invalid.border.color');
71
- }
72
-
73
- .p-togglebutton:disabled {
74
- opacity: 1;
75
- cursor: default;
76
- background: dt('togglebutton.disabled.background');
77
- border-color: dt('togglebutton.disabled.border.color');
78
- color: dt('togglebutton.disabled.color');
79
- }
80
-
81
- .p-togglebutton-label,
82
- .p-togglebutton-icon {
83
- position: relative;
84
- transition: none;
85
- }
86
-
87
- .p-togglebutton-icon {
88
- color: dt('togglebutton.icon.color');
89
- }
90
-
91
- .p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover .p-togglebutton-icon {
92
- color: dt('togglebutton.icon.hover.color');
93
- }
94
-
95
- .p-togglebutton.p-togglebutton-checked .p-togglebutton-icon {
96
- color: dt('togglebutton.icon.checked.color');
97
- }
98
-
99
- .p-togglebutton:disabled .p-togglebutton-icon {
100
- color: dt('togglebutton.icon.disabled.color');
101
- }
102
-
103
- .p-togglebutton-sm {
104
- padding: dt('togglebutton.sm.padding');
105
- font-size: dt('togglebutton.sm.font.size');
106
- }
107
-
108
- .p-togglebutton-sm .p-togglebutton-content {
109
- padding: dt('togglebutton.content.sm.padding');
110
- }
111
-
112
- .p-togglebutton-lg {
113
- padding: dt('togglebutton.lg.padding');
114
- font-size: dt('togglebutton.lg.font.size');
115
- }
116
-
117
- .p-togglebutton-lg .p-togglebutton-content {
118
- padding: dt('togglebutton.content.lg.padding');
119
- }
120
-
121
- .p-togglebutton-fluid {
122
- width: 100%;
123
- }
124
- `;var Ut=(()=>{class t extends Z{modelValue=V(void 0);$filled=D(()=>mt(this.modelValue()));writeModelValue(e){this.modelValue.set(e)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275dir=C({type:t,features:[c]})}return t})();var Wt=(()=>{class t extends Ut{required=s(void 0,{transform:w});invalid=s(void 0,{transform:w});disabled=s(void 0,{transform:w});name=s();_disabled=V(!1);$disabled=D(()=>this.disabled()||this._disabled());onModelChange=()=>{};onModelTouched=()=>{};writeDisabledState(e){this._disabled.set(e)}writeControlValue(e,i){}writeValue(e){this.writeControlValue(e,this.writeModelValue.bind(this))}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.writeDisabledState(e),this.cd.markForCheck()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275dir=C({type:t,inputs:{required:[1,"required"],invalid:[1,"invalid"],disabled:[1,"disabled"],name:[1,"name"]},features:[c]})}return t})();var Zn=["icon"],Qn=["content"],Zt=t=>({$implicit:t});function Kn(t,n){t&1&&Ne(0)}function Yn(t,n){if(t&1&&it(0,"span",0),t&2){let e=q(3);T(e.cn(e.cx("icon"),e.checked?e.onIcon:e.offIcon,e.iconPos==="left"?e.cx("iconLeft"):e.cx("iconRight"))),j("pBind",e.ptm("icon"))}}function Xn(t,n){if(t&1&&P(0,Yn,1,3,"span",2),t&2){let e=q(2);R(e.onIcon||e.offIcon?0:-1)}}function Jn(t,n){t&1&&Ne(0)}function ei(t,n){if(t&1&&Fe(0,Jn,1,0,"ng-container",1),t&2){let e=q(2);j("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",Se(2,Zt,e.checked))}}function ti(t,n){if(t&1&&(P(0,Xn,1,1)(1,ei,1,4,"ng-container"),we(2,"span",0),dt(3),Ie()),t&2){let e=q();R(e.iconTemplate?1:0),W(2),T(e.cx("label")),j("pBind",e.ptm("label")),W(),ut(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var ni=`
125
- ${$t}
126
-
127
- /* For PrimeNG (iconPos) */
128
- .p-togglebutton-icon-right {
129
- order: 1;
130
- }
131
-
132
- .p-togglebutton.ng-invalid.ng-dirty {
133
- border-color: dt('togglebutton.invalid.border.color');
134
- }
135
- `,ii={root:({instance:t})=>["p-togglebutton p-component",{"p-togglebutton-checked":t.checked,"p-invalid":t.invalid(),"p-disabled":t.$disabled(),"p-togglebutton-sm p-inputfield-sm":t.size==="small","p-togglebutton-lg p-inputfield-lg":t.size==="large","p-togglebutton-fluid":t.fluid()}],content:"p-togglebutton-content",icon:"p-togglebutton-icon",iconLeft:"p-togglebutton-icon-left",iconRight:"p-togglebutton-icon-right",label:"p-togglebutton-label"},qt=(()=>{class t extends fe{name="togglebutton";style=ni;classes=ii;static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275prov=U({token:t,factory:t.\u0275fac})}return t})();var zt=new b("TOGGLEBUTTON_INSTANCE"),oi={provide:Me,useExisting:$(()=>Qt),multi:!0},Qt=(()=>{class t extends Wt{componentName="ToggleButton";$pcToggleButton=M(zt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=M(I,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onKeyDown(e){switch(e.code){case"Enter":this.toggle(e),e.preventDefault();break;case"Space":this.toggle(e),e.preventDefault();break}}toggle(e){!this.$disabled()&&!(this.allowEmpty===!1&&this.checked)&&(this.checked=!this.checked,this.writeModelValue(this.checked),this.onModelChange(this.checked),this.onModelTouched(),this.onChange.emit({originalEvent:e,checked:this.checked}),this.cd.markForCheck())}onLabel="Yes";offLabel="No";onIcon;offIcon;ariaLabel;ariaLabelledBy;styleClass;inputId;tabindex=0;iconPos="left";autofocus;size;allowEmpty;fluid=s(void 0,{transform:w});onChange=new L;iconTemplate;contentTemplate;templates;checked=!1;onInit(){(this.checked===null||this.checked===void 0)&&(this.checked=!1)}_componentStyle=M(qt);onBlur(){this.onModelTouched()}get hasOnLabel(){return this.onLabel&&this.onLabel.length>0}get hasOffLabel(){return this.offLabel&&this.offLabel.length>0}get active(){return this.checked===!0}_iconTemplate;_contentTemplate;onAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}writeControlValue(e,i){this.checked=e,i(e),this.cd.markForCheck()}get dataP(){return this.cn({checked:this.active,invalid:this.invalid(),[this.size]:this.size})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=v(t)))(o||t)}})();static \u0275cmp=B({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(i,o,r){if(i&1&&at(r,Zn,4)(r,Qn,4)(r,vt,4),i&2){let a;ae(a=le())&&(o.iconTemplate=a.first),ae(a=le())&&(o.contentTemplate=a.first),ae(a=le())&&(o.templates=a)}},hostVars:11,hostBindings:function(i,o){i&1&&se("keydown",function(a){return o.onKeyDown(a)})("click",function(a){return o.toggle(a)}),i&2&&(re("aria-labelledby",o.ariaLabelledBy)("aria-label",o.ariaLabel)("aria-pressed",o.checked?"true":"false")("role","button")("tabindex",o.tabindex!==void 0?o.tabindex:o.$disabled()?-1:0)("data-pc-name","togglebutton")("data-p-checked",o.active)("data-p-disabled",o.$disabled())("data-p",o.dataP),T(o.cn(o.cx("root"),o.styleClass)))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",ht],iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",w],size:"size",allowEmpty:"allowEmpty",fluid:[1,"fluid"]},outputs:{onChange:"onChange"},features:[S([oi,qt,{provide:zt,useExisting:t},{provide:z,useExisting:t}]),oe([_t,I]),c],decls:3,vars:9,consts:[[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class","pBind"]],template:function(i,o){i&1&&(we(0,"span",0),Fe(1,Kn,1,0,"ng-container",1),P(2,ti,4,5),Ie()),i&2&&(T(o.cx("content")),j("pBind",o.ptm("content")),re("data-p",o.dataP),W(),j("ngTemplateOutlet",o.contentTemplate||o._contentTemplate)("ngTemplateOutletContext",Se(7,Zt,o.checked)),W(),R(o.contentTemplate?-1:2))},dependencies:[de,ft,he,ge,I],encapsulation:2,changeDetection:0})}return t})(),Io=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=x({type:t});static \u0275inj=O({imports:[Qt,he,he]})}return t})();export{si as a,yn as b,Di as c,Mi as d,Me as e,xt as f,ne as g,zi as h,qn as i,Qi as j,Ut as k,Wt as l,Qt as m,Io as n};