@skill-map/cli 0.23.1 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{J as n,O as o,Sb as r,X as d,Y as c,ca as s,da as g,hd as i,id as p,md as u}from"./chunk-ZR2E2QJ4.js";var L={triggerLabel:"Settings",triggerTooltip:"Settings",modalTitle:"Settings",closeLabel:"Close",sections:{plugins:"Plugins",general:"General",project:"Project",changelog:"Changelog",about:"About"},general:{heading:"General",intro:"User-scope preferences. These settings live in your home directory (`~/.skill-map/settings.json`) and follow 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."},connectionType:{label:"Edge style",description:"Shape of the lines that connect nodes in the graph view.",options:{segment:{label:"Orthogonal",description:"Right-angled segments (default)."},straight:{label:"Straight",description:"Single straight line."},bezier:{label:"Bezier",description:"Smooth curve."},"adaptive-curve":{label:"Adaptive curve",description:"Curve that follows the connector orientation."}}}},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:",extraFoldersLabel:"Extra folders to scan",extraFoldersDescription:"Additional folders included in the scan. Their files show up in the graph next to this project. Use ~/ for paths inside your home folder. This is the only way to extend the scan beyond this project.",extraFoldersPlaceholder:"~/.claude/agents, /path/to/another/folder",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, ~/.claude",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"},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",aboutScopeLabel:"Scope",aboutFolderLabel:"Project folder",aboutDbLabel:"Project DB",aboutHomeLabel:"Skill-map home",aboutDbValue:(e,t)=>e==="present"?t:`${e} \xB7 ${t}`,aboutLoading:"Loading\u2026",aboutUnknown:"\u2014",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:e=>`No plugins match "${e}".`,pluginsKindFilterAll:"All",pluginsKindFilterA11y:"Filter plugins by kind",pluginsKindFilterOptionA11y:(e,t)=>t?`Show only ${e} extensions`:"Show all kinds",unsavedChangesMessage:e=>e===1?'1 unsaved change. Click "Apply" to persist it.':`${e} 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:e=>e===1?"You have 1 unsaved change.":`You have ${e} unsaved changes.`,keepEditing:"Keep editing",sourceBuiltIn:"Built-in",sourceProject:"Project",sourceGlobal:"Global",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:(e,t)=>t?`Enable plugin ${e}`:`Disable plugin ${e}`,extensionToggle:(e,t)=>t?`Enable ${e}`:`Disable ${e}`,pluginRow:e=>`Plugin ${e} row`,extensionRow:e=>`Extension ${e} row`}};var h={available:"Update available",tooltip:e=>`v${e} is available. Run \`npm i -g @skill-map/cli@latest\` to update.`,a11yLabel:e=>`Update available: version ${e}`,versionLabel:e=>`v${e}`,versionTooltip:e=>`skill-map CLI v${e}`,versionA11yLabel:e=>`Running version ${e}`,fetchFailed:e=>`UpdateCheckService: fetch failed (${e})`};var m=class e{dataSource=o(i);status=s(null);isOutdated=r(()=>this.status()?.isOutdated===!0);latest=r(()=>this.status()?.latest??null);current=r(()=>this.status()?.current??null);async load(){try{let t=await this.dataSource.getUpdateStatus();this.status.set(t)}catch(t){let a=t instanceof Error?t.message:String(t);console.warn(h.fetchFailed(a))}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})};var f={scanFailed:e=>`scan-trigger failed: ${e}`};var y=class e{dataSource=o(i);loader=o(u);scanning=s(!1);scanError=s(null);async run(){if(!this.scanning()){this.scanning.set(!0),this.scanError.set(null);try{await this.dataSource.runScan(),await this.loader.load()}catch(t){let a=t instanceof p||t instanceof Error?t.message:String(t);this.scanError.set(a),console.warn(f.scanFailed(a))}finally{this.scanning.set(!1)}}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})};var v="skill-map.ui.theme",E="app-dark",D="dark",S="(prefers-color-scheme: dark)",k=class e{doc=o(d);destroyRef=o(c);mode=s(this.readInitial());systemPrefersDark=s(this.readSystemPref());resolved=r(()=>{let t=this.mode();return t==="auto"?this.systemPrefersDark()?"dark":"light":t});constructor(){this.subscribeToSystemPref(),g(()=>{let t=this.resolved()==="dark",a=this.doc.documentElement;a.classList.toggle(E,t),a.classList.toggle(D,t);try{this.doc.defaultView?.localStorage.setItem(v,this.mode())}catch{}})}toggle(){this.mode.update(t=>t==="auto"?"light":t==="light"?"dark":"auto")}set(t){this.mode.set(t)}readInitial(){try{let t=this.doc.defaultView?.localStorage.getItem(v);if(t==="auto"||t==="light"||t==="dark")return t}catch{}return"auto"}readSystemPref(){try{return this.doc.defaultView?.matchMedia(S).matches??!1}catch{return!1}}subscribeToSystemPref(){let t=this.doc.defaultView;if(!t||typeof t.matchMedia!="function")return;let a=t.matchMedia(S),l=T=>{this.systemPrefersDark.set(T.matches)};a.addEventListener("change",l),this.destroyRef.onDestroy(()=>a.removeEventListener("change",l))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})};export{h as a,m as b,L as c,y as d,k as e};
@@ -0,0 +1,135 @@
1
+ import{$a as Ne,$c as _t,Aa as Fe,Da as nt,Gb as S,Hc as vt,I as $,Ib as Se,Ic as he,J as U,Ja as re,K as O,Kc as fe,M as b,Ma as P,Na as R,Nc as z,O as M,Oc as Z,Rb as A,Sa as j,Sb as D,Ta as we,Ua as Ie,Uc as I,V as et,Va as it,Vb as u,Vc as ge,Wb as s,Ya as ot,Zc as yt,_ as L,ac as ct,bc as w,ca as V,cc as ht,d as Ke,da as ie,dc as Oe,ea as tt,eb as se,fa as v,fc as xe,gb as q,h as Ye,ha as Ae,hb as rt,ib as st,jb as at,lb as ae,mb as le,n as Xe,na as W,nc as ft,oc as de,qa as Ee,ra as y,sb as lt,t as Je,ub as T,va as B,vb as dt,wa as x,wb as ut,xa as C,ya as oe,za as c}from"./chunk-ZR2E2QJ4.js";import{I as pt,K as ce,P as ke,T as mt,b as ue,d as Te,fa as Le,g as gt}from"./chunk-3R7E3HPC.js";import{a as p,b as F}from"./chunk-Q7L6LLAK.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};